diff --git a/.github/workflows/automation-ci.yml b/.github/workflows/automation-ci.yml index 99406cb73..3cb9b55f7 100644 --- a/.github/workflows/automation-ci.yml +++ b/.github/workflows/automation-ci.yml @@ -16,25 +16,25 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [22.x] steps: # setup code, directories and system wide dependency - name: Checkout web - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch }} path: web fetch-depth: 1 - name: Checkout express server - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: onaio/express-server path: express - name: Checkout fhir automation - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: onaio/fhir-web-automation token: ${{ secrets.ACCESS_TOKEN }} # currently using a PAT -> not the best option. @@ -47,7 +47,7 @@ jobs: java-version: 11 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -100,6 +100,7 @@ jobs: REACT_APP_ENABLE_FHIR_ORGANIZATION=true REACT_APP_ENABLE_FHIR_TEAMS=true REACT_APP_FHIR_ROOT_LOCATION_ID=eff94f33-c356-4634-8795-d52340706ba9 + REACT_APP_FHIR_INVENTORY_LIST_ID=81b674df-e958-4684-8931-8feefa74d6fb REACT_APP_FHIR_PATIENT_SORT_FIELDS=-_lastUpdated REACT_APP_FHIR_PATIENT_BUNDLE_SIZE=5000 REACT_APP_ENABLE_FHIR_HEALTHCARE_SERVICES=false diff --git a/.github/workflows/cd-test.yml b/.github/workflows/cd-test.yml index f5fdddcc7..5d609804a 100644 --- a/.github/workflows/cd-test.yml +++ b/.github/workflows/cd-test.yml @@ -11,15 +11,15 @@ jobs: test: strategy: matrix: - node-version: [16.17.0] + node-version: [22.x] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "yarn" @@ -40,7 +40,7 @@ jobs: - name: Run all tests run: yarn test --verbose --collectCoverage=true --forceExit --detectOpenHandles env: - NODE_OPTIONS: --max_old_space_size=4096 + NODE_OPTIONS: --max_old_space_size=5120 - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 diff --git a/Dockerfile b/Dockerfile index 19d742ae0..10c7d079a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM alpine/git AS sources -RUN git clone --depth=1 --branch=v2.0.1 https://github.com/onaio/express-server.git /usr/src/express-server +# TODO - update the tag here +RUN git clone --branch=v2.1.0 https://github.com/onaio/express-server.git /usr/src/express-server FROM node:16.18-alpine as build @@ -32,7 +33,9 @@ RUN yarn && yarn tsc && npm prune -production --legacy-peer-deps # Remove unused dependencies RUN rm -rf ./node_modules/typescript -FROM node:16.18-alpine as final + + +FROM nikolaik/python-nodejs:python3.12-nodejs22-alpine as final # Use tini for NodeJS application https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals RUN apk add --no-cache tini curl @@ -52,21 +55,17 @@ WORKDIR /usr/src/web COPY --from=build /project/node_modules /usr/src/web/node_modules COPY --from=build /project/app/build /usr/src/web -RUN chown -R node /usr/src/web - WORKDIR /usr/src/app -COPY --from=nodejsbuild /usr/src/express-server/dist /usr/src/app +COPY --from=nodejsbuild /usr/src/express-server/build /usr/src/app COPY --from=nodejsbuild /usr/src/express-server/node_modules /usr/src/app/node_modules -RUN chown -R node /usr/src/app - -USER node +RUN pip install -r /usr/src/app/fhir-tooling/requirements.txt ENV EXPRESS_REACT_BUILD_PATH /usr/src/web/ EXPOSE 3000 -CMD [ "/bin/sh", "-c", "/usr/local/bin/app.sh && node ." ] +CMD [ "/bin/sh", "-c", "/usr/local/bin/app.sh && node /usr/src/app/dist" ] ENTRYPOINT ["/sbin/tini", "--"] diff --git a/app/.env.sample b/app/.env.sample index cbb9d4561..258a0214e 100644 --- a/app/.env.sample +++ b/app/.env.sample @@ -46,3 +46,4 @@ REACT_APP_COMMODITIES_LIST_RESOURCE_ID="uuid" REACT_APP_PRACTITIONER_TO_ORG_ASSIGNMENT_STRATEGY=ONE_TO_MANY REACT_APP_AUTHZ_STRATEGY=keycloak REACT_APP_FHIR_ROOT_LOCATION_ID=uuid +REACT_APP_FHIR_INVENTORY_LIST_ID=uuid diff --git a/app/public/logob.png b/app/public/logob.png new file mode 100644 index 000000000..a211f116e Binary files /dev/null and b/app/public/logob.png differ diff --git a/app/src/App/fhir-apps.tsx b/app/src/App/fhir-apps.tsx index e08d16b0f..e223b2085 100644 --- a/app/src/App/fhir-apps.tsx +++ b/app/src/App/fhir-apps.tsx @@ -79,11 +79,15 @@ import { AffiliationList as FhirTeamAssignment, } from '@opensrp/fhir-team-management'; import { + EusmAddEditLocationUnit, LocationUnitList as FHIRLocationUnitList, NewEditLocationUnit as FHIRNewEditLocationUnit, + URL_SERVICE_POINT_ADD_EDIT, + URL_SERVICE_POINT_LIST, + URL_LOCATION_VIEW_DETAILS, + ViewDetails, AllLocationListFlat as ListAllLocationsFlat, URL_ALL_LOCATIONS, - URL_SERVICE_POINT_LOCATIONS, EusmLocationListFlat, } from '@opensrp/fhir-location-management'; import { @@ -96,6 +100,7 @@ import { patientProps, fhirCreateEditUserProps, commmodityProps, + fhirCreateEditLocationProps, } from './utils'; import './App.css'; import { @@ -114,10 +119,14 @@ import { GroupList, LIST_COMMODITY_URL, LIST_GROUP_URL, + ADD_LOCATION_INVENTORY, + AddLocationInventory, } from '@opensrp/fhir-group-management'; +import { CloseFlag, URL_CLOSE_FLAGS } from '@opensrp/fhir-flag'; import { useTranslation } from '../mls'; import '@opensrp/user-management/dist/index.css'; import { APP_LOGIN_URL } from '../configs/dispatchConfig'; +import { DATA_IMPORT_CREATE_URL, ImportDetailViewDetails, DATA_IMPORT_DETAIL_URL, DATA_IMPORT_LIST_URL, DataImportList, StartDataImport } from '@opensrp/fhir-import'; /** Util function that renders Oauth2 callback components * @@ -195,6 +204,40 @@ const FHIRApps = () => { permissions={['iam_group.read']} component={UserGroupsList} /> + + + + { permissions={['Patient.read']} component={PatientDetails} /> + { exact path={URL_TEAM_ASSIGNMENT} {...teamAffiliationProps} - permissions={['OrganizationAffiliation.read']} + permissions={['OrganizationAffiliation.read', 'Location.read']} component={FhirTeamAssignment} /> { redirectPath={APP_CALLBACK_URL} disableLoginProtection={DISABLE_LOGIN_PROTECTION} exact - path={URL_SERVICE_POINT_LOCATIONS} + path={URL_SERVICE_POINT_LIST} permissions={['Location.read']} component={EusmLocationListFlat} /> @@ -391,6 +443,24 @@ const FHIRApps = () => { permissions={['Location.create']} component={FHIRNewEditLocationUnit} /> + + { permissions={['Location.update']} component={FHIRNewEditLocationUnit} /> + { permissions={['Group.create']} component={CommodityAddEdit} /> + + { component={UserGroupsList} permissions={['iam_group.read']} /> + URL_LOCATION_UNIT, - cancelURLGenerator: () => URL_LOCATION_UNIT, - hidden: ['serviceType', 'latitude', 'longitude'], ...locationUnitProps, }; @@ -114,3 +111,9 @@ export const patientProps = { export const commmodityProps = { listId: COMMODITIES_LIST_RESOURCE_ID, }; + +export const fhirCreateEditLocationProps = { + ...BaseProps, + listId: FHIR_INVENTORY_LIST_ID, + commodityListId: COMMODITIES_LIST_RESOURCE_ID, +}; diff --git a/app/src/assets/images/opensrp2-logo-small.png b/app/src/assets/images/opensrp2-logo-small.png new file mode 100644 index 000000000..a211f116e Binary files /dev/null and b/app/src/assets/images/opensrp2-logo-small.png differ diff --git a/app/src/assets/images/opensrp2-logo.png b/app/src/assets/images/opensrp2-logo.png new file mode 100644 index 000000000..fc3970543 Binary files /dev/null and b/app/src/assets/images/opensrp2-logo.png differ diff --git a/app/src/components/page/Sidebar/Sidebar.css b/app/src/components/page/Sidebar/Sidebar.css index d608a6d7d..931336b10 100644 --- a/app/src/components/page/Sidebar/Sidebar.css +++ b/app/src/components/page/Sidebar/Sidebar.css @@ -1,11 +1,42 @@ .logo { - padding: 1rem 1rem 0.5rem 24px; + height: 72px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + display: flex; + align-items: center; + padding-left: 16px; + + img { + max-height: 40px; + width: auto; + max-width: 100%; + } + + .ant-btn-link:hover { + color: var(--menu-item-text_hover__dark-theme__color); + } +} + +.main-logo img { + height: 26px; } -.logo img { - max-height: 40px; - width: auto; - max-width: 100%; +.small-logo { + button { + display: contents; + } + + img { + height: 38px; + min-width: 38px; + } +} + +.collapse-icon { + color: var(--menu-item-text__dark-theme__color); + padding: 0 16px; + margin-right: 19px; + margin-left: auto; + width: 6px; } .menu-dark, @@ -14,10 +45,20 @@ } .menu-dark ul:last-child { - background: #141414 !important; + background: var(--sub-menu-items__background) !important; +} + +.ant-menu-dark.ant-menu-submenu > .ant-menu { + background: var(--sub-menu-items__background) !important; +} + +.ant-menu-inline-collapsed { + .ant-menu-submenu-title, .ant-menu-item { + padding-inline: 20px !important; + } } -.sidebar-icons { +.menu-dark li svg { font-size: 18px !important; vertical-align: middle; } diff --git a/app/src/components/page/Sidebar/index.tsx b/app/src/components/page/Sidebar/index.tsx index 01446d648..109413862 100644 --- a/app/src/components/page/Sidebar/index.tsx +++ b/app/src/components/page/Sidebar/index.tsx @@ -1,15 +1,16 @@ import React, { useContext, useEffect, useState } from 'react'; import { RouteComponentProps, withRouter } from 'react-router'; import { Dictionary } from '@onaio/utils'; -import { Layout, Menu } from 'antd'; +import { Button, Layout, Menu } from 'antd'; import { Link, useLocation } from 'react-router-dom'; import { URL_HOME } from '../../../constants'; import { Route, getRoutes } from '../../../routes'; import { getActivePath } from './utils'; -import { MAIN_LOGO_SRC, OPENSRP_WEB_VERSION } from '../../../configs/env'; +import { COLLAPSED_LOGO_SRC, MAIN_LOGO_SRC } from '../../../configs/env'; import { useTranslation } from '../../../mls'; import './Sidebar.css'; import { RoleContext } from '@opensrp/rbac'; +import { LeftOutlined } from '@ant-design/icons'; /** interface for SidebarProps */ export interface SidebarProps extends RouteComponentProps { @@ -24,6 +25,7 @@ const defaultSidebarProps: Partial = { /** The Sidebar component */ export const SidebarComponent: React.FC = (props: SidebarProps) => { + const [collapsed, setCollapsed] = useState(false); const { t } = useTranslation(); const { extraData } = props; const { roles } = extraData; @@ -67,16 +69,30 @@ export const SidebarComponent: React.FC = (props: SidebarProps) => const { activePaths } = getActivePath(location.pathname, routes); setCollapsedKeys(activePaths.concat(...collapsedKeys)); }, [location.pathname, routes]); // eslint-disable-line react-hooks/exhaustive-deps - return ( - -
- + setCollapsed(value)} + trigger={null} + width="275px" + className="layout-sider" + breakpoint='md' + > +
+ The logo - {OPENSRP_WEB_VERSION.length > 0 ? ( -

{OPENSRP_WEB_VERSION}

- ) : null} + + {!collapsed && + + }
`; diff --git a/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap b/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap index ca9516470..2fd2bec0b 100644 --- a/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap +++ b/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap @@ -55,14 +55,14 @@ Array [ - Teams + Organizations @@ -70,7 +70,7 @@ Array [ className="admin-link" to="/admin/teams/team-assignment" > - Team Assignment + Organization Assignment @@ -141,14 +141,14 @@ Array [ - Teams + Organizations @@ -156,7 +156,7 @@ Array [ className="admin-link" to="/admin/teams/team-assignment" > - Team Assignment + Organization Assignment @@ -179,9 +179,10 @@ Object { className="ant-layout-sider-children" >
+ +
- Teams + Organizations @@ -350,14 +369,14 @@ Array [ - Teams + Organizations @@ -372,28 +391,3 @@ Array [ , ] `; - -exports[`components/ConnectedSidebar shows the correct logo: Logo 1`] = ` -
- - - - The logo - - - -
-`; diff --git a/app/src/containers/ConnectedSidebar/tests/index.test.tsx b/app/src/containers/ConnectedSidebar/tests/index.test.tsx index ee119a8ef..b04f3316d 100644 --- a/app/src/containers/ConnectedSidebar/tests/index.test.tsx +++ b/app/src/containers/ConnectedSidebar/tests/index.test.tsx @@ -6,9 +6,10 @@ import { MemoryRouter } from 'react-router'; import ConnectedSidebar from '..'; import { store } from '@opensrp/store'; import { act } from 'react-dom/test-utils'; -import toJson from 'enzyme-to-json'; import { superUserRole } from '@opensrp/react-utils'; import { RoleContext } from '@opensrp/rbac'; +import { fireEvent, render } from '@testing-library/react'; +import { COLLAPSED_LOGO_SRC, MAIN_LOGO_SRC } from '../../../configs/env'; jest.mock('../../../configs/env'); jest.mock('../../../configs/settings'); @@ -127,8 +128,8 @@ describe('components/ConnectedSidebar', () => { wrapper.unmount(); }); - it('shows the correct logo', () => { - const wrapper = mount( + it('shows the correct logo & collapse works as expected', () => { + render( @@ -137,27 +138,27 @@ describe('components/ConnectedSidebar', () => { ); - expect(toJson(wrapper.find('.logo'))).toMatchSnapshot('Logo'); - }); - - it('shows version if available', () => { - const envModule = require('../../../configs/env'); - envModule.OPENSRP_WEB_VERSION = 'v1.0.1'; + const mainLogo = document.querySelector("#main-logo") + expect(mainLogo).toBeVisible() // menu not collapsed + expect(mainLogo?.querySelector('img')?.getAttribute('src')).toEqual(MAIN_LOGO_SRC) + const collapseLogo = document.querySelector('#collapsed-logo') + expect(collapseLogo).not.toBeVisible() + expect(collapseLogo?.querySelector('img')?.getAttribute('src')).toEqual(COLLAPSED_LOGO_SRC) - const wrapper = mount( - - - - - - - - ); + // collapse menu + fireEvent.click(document.querySelector(".collapse-icon") as Element) + expect(document.querySelector("#main-logo")).not.toBeVisible() + expect(document.querySelector('#collapsed-logo')).toBeVisible() + expect(document.querySelector(".collapse-icon")).not.toBeInTheDocument() - const version = wrapper.find('.sidebar-version').text(); - expect(version).toMatchInlineSnapshot(`"v1.0.1"`); + // uncollapse menu + fireEvent.click(document.querySelector('#collapsed-logo') as Element) + expect(document.querySelector("#main-logo")).toBeVisible() + expect(document.querySelector('#collapsed-logo')).not.toBeVisible() + expect(document.querySelector(".collapse-icon")).toBeInTheDocument() }); + it('correctly sets open keys', () => { const wrapper = mount( diff --git a/app/src/containers/pages/Home/tests/Home.test.tsx b/app/src/containers/pages/Home/tests/Home.test.tsx index 4038f762c..a6898b014 100644 --- a/app/src/containers/pages/Home/tests/Home.test.tsx +++ b/app/src/containers/pages/Home/tests/Home.test.tsx @@ -64,7 +64,7 @@ describe('containers/pages/Home', () => { expect(Array.from(links).map((x) => x.textContent)).toEqual([ 'User Management', 'Location Management', - 'Team Management', + 'Organization Management', 'Questionnaire Management', ]); links.forEach((link) => { diff --git a/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap b/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap index 48d5e335e..d9c45804b 100644 --- a/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap +++ b/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap @@ -11,24 +11,24 @@ exports[`containers/pages/Home renders Home correctly & changes Title of page 2: `; -exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Questionnaire Management 1`] = ` +exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Organization Management 1`] = ` `; -exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Team Management 1`] = ` +exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Questionnaire Management 1`] = ` `; diff --git a/app/src/routes/index.tsx b/app/src/routes/index.tsx index fd573f04d..2528754e7 100644 --- a/app/src/routes/index.tsx +++ b/app/src/routes/index.tsx @@ -1,4 +1,5 @@ import { DashboardOutlined, IdcardOutlined } from '@ant-design/icons'; +import UploadIcon from '@2fd/ant-design-icons/lib/Upload'; import { ENABLE_HEALTHCARE_SERVICES, ENABLE_FHIR_GROUP, @@ -17,7 +18,7 @@ import { URL_USER_ROLES, URL_FHIR_CARE_TEAM, } from '../constants'; -import { URL_ALL_LOCATIONS, URL_SERVICE_POINT_LOCATIONS } from '@opensrp/fhir-location-management'; +import { URL_ALL_LOCATIONS, URL_SERVICE_POINT_LIST } from '@opensrp/fhir-location-management'; import { QUEST_VIEW_URL } from '@opensrp/fhir-views'; import type { TFunction } from '@opensrp/i18n'; import { LIST_HEALTHCARE_URL } from '@opensrp/fhir-healthcare-service'; @@ -31,6 +32,7 @@ import { import React from 'react'; import { UserRole } from '@opensrp/rbac/dist/types/roleDefinition'; import { getConfig, eusmProjectCode } from '@opensrp/pkg-config'; +import { DATA_IMPORT_LIST_URL } from '@opensrp/fhir-import'; /** Interface for menu items */ export interface Route { @@ -110,10 +112,10 @@ export function getRoutes(roles: string[], t: TFunction, userRole: UserRole): Ro ], }, { - title: t('Inventory'), - key: 'inventory', + title: t('Service Points Inventory'), + key: 'service-points-inventory', isHomePageLink: true, - url: URL_SERVICE_POINT_LOCATIONS, + url: URL_SERVICE_POINT_LIST, permissions: ['Location.read', 'Group.read'], enabled: COMPOSITE_ENABLE_LOCATIONS_MANAGEMENT && getConfig('projectCode') === eusmProjectCode, @@ -127,19 +129,24 @@ export function getRoutes(roles: string[], t: TFunction, userRole: UserRole): Ro url: URL_FHIR_CARE_TEAM, }, { - title: t('Team Management'), - key: 'team-management', + title: t('Organization Management'), + key: 'org-management', isHomePageLink: true, permissions: ['Organization.read'], url: URL_TEAMS, enabled: COMPOSITE_ENABLE_TEAM_MANAGEMENT, children: [ - { title: t('Teams'), url: URL_TEAMS, key: 'TEAMS', permissions: ['Organization.read'] }, { - permissions: ['OrganizationAffiliation.read'], - title: t('Team Assignment'), + title: t('Organizations'), + url: URL_TEAMS, + key: 'ORGS', + permissions: ['Organization.read'], + }, + { + permissions: ['OrganizationAffiliation.read', 'Location.read'], + title: t('Organization Assignment'), url: URL_TEAM_ASSIGNMENT, - key: 'team-assignment', + key: 'org-assignment', enabled: ENABLE_TEAMS_ASSIGNMENT_MODULE, }, ], @@ -187,6 +194,15 @@ export function getRoutes(roles: string[], t: TFunction, userRole: UserRole): Ro url: LIST_PATIENTS_URL, isHomePageLink: true, }, + { + otherProps: { icon: }, + title: t('Data Imports'), + key: 'data-import', + enabled: true, + permissions: ['WebDataImport.read'], + url: DATA_IMPORT_LIST_URL, + isHomePageLink: true, + }, ]; return filterFalsyRoutes(routes, userRole); diff --git a/app/src/routes/tests/index.test.tsx b/app/src/routes/tests/index.test.tsx index 0a6de722f..b1b3f5828 100644 --- a/app/src/routes/tests/index.test.tsx +++ b/app/src/routes/tests/index.test.tsx @@ -161,20 +161,20 @@ describe('routes', () => { { children: [ { - key: 'TEAMS', - title: 'Teams', + key: 'ORGS', + title: 'Organizations', url: '/admin/teams', }, { enabled: true, - key: 'team-assignment', - title: 'Team Assignment', + key: 'org-assignment', + title: 'Organization Assignment', url: '/admin/teams/team-assignment', }, ], enabled: true, - key: 'team-management', - title: 'Team Management', + key: 'org-management', + title: 'Organization Management', }, { enabled: true, key: 'fhir-quest', title: 'Questionnaire Management', url: '/quest' }, ], @@ -202,7 +202,7 @@ describe('routes', () => { superUserRole ); const parentKeys = routes.flatMap((x) => x.children).map((x) => x.key); - expect(parentKeys).toContain('team-management'); + expect(parentKeys).toContain('org-management'); expect(parentKeys).toContain('user-management'); expect(parentKeys).toContain('location-management'); }); diff --git a/docker/confd_env.toml b/docker/confd_env.toml index b46ca74e8..998bb6b88 100644 --- a/docker/confd_env.toml +++ b/docker/confd_env.toml @@ -34,6 +34,7 @@ keys = [ "/react/app/default/plan/duration/days", "/react/app/date/format", "/react/app/main/logo/src", + "/react/app/collapsed/logo/src", "/react/app/plan/assignment/at/geo/level", "/react/app/task/generation/status", "/react/app/default/plan/version", diff --git a/docker/config.js.tmpl b/docker/config.js.tmpl index 25b8d9fa3..16774fea5 100644 --- a/docker/config.js.tmpl +++ b/docker/config.js.tmpl @@ -23,6 +23,7 @@ window._env_ = { REACT_APP_LANGUAGE_CODE: "{{ getv "/react/app/language/code" "en" }}", REACT_APP_DATE_FORMAT: "{{ getv "/react/app/date/format" "yyyy-MM-DD" }}", REACT_APP_MAIN_LOGO_SRC: "{{ getv "/react/app/main/logo/src" "" }}", + REACT_APP_COLLAPSED_LOGO_SRC: "{{ getv "/react/app/collapsed/logo/src" ""}}", REACT_APP_OPENSRP_OAUTH_SCOPES: "{{ getv "/react/app/opensrp/oauth/scopes" "profile" }}", REACT_APP_ENABLE_LOCATIONS: "{{ getv "/react/app/enable/locations" "false" }}", REACT_APP_ENABLE_TEAMS: "{{ getv "/react/app/enable/teams" "false" }}", @@ -45,6 +46,7 @@ window._env_ = { REACT_APP_SENTRY_CONFIG_JSON: "{{ getv "/react/app/opensrp/sentry/config/json" "" }}", REACT_APP_ENABLE_FHIR_LOCATIONS: "{{ getv "/react/app/enable/fhir/locations" "false" }}", REACT_APP_FHIR_ROOT_LOCATION_ID: "{{ getv "react/app/fhir/root/location/id" "" }}", + REACT_APP_FHIR_INVENTORY_LIST_ID: "{{ getv "react/app/fhir/inventory/list/id" "" }}", REACT_APP_ENABLE_QUEST: "{{ getv "react/app/enable/quest" "false" }}", REACT_APP_ENABLE_FHIR_HEALTHCARE_SERVICES: "{{ getv "/react/app/enable/fhir/healthcare/services" "false" }}", REACT_APP_ENABLE_FHIR_GROUP: "{{ getv "/react/app/enable/fhir/group" "false" }}", diff --git a/docs/I18n.md b/docs/I18n.md index 2440e30d3..ff23f6344 100644 --- a/docs/I18n.md +++ b/docs/I18n.md @@ -118,7 +118,7 @@ One way to handle this situation is to extract the labels into props. One can th Whilst this is easy enough it does not scale well for huge components that make use of several util functions that also have their own translatable strings. -An alternative way and how we do it, is to allow passing a `namespace` string prop to the component. This props instructs the component on where to look up instructions per component instance. Here is an example in code +An alternative way and how we do it, is to allow passing a `namespace` string prop to the component. This props instructs the component on where to look up translations per component instance. Here is an example in code ```typescript export function Component({ i18nNamespace }: { i18nNamespace: string }) { diff --git a/docs/env.md b/docs/env.md index 485d69c29..e77ddf7b7 100644 --- a/docs/env.md +++ b/docs/env.md @@ -110,6 +110,12 @@ Below is a list of currently supported environment variables: - **Optional**(`string`) - default: `https://github.com/OpenSRP/web/raw/master/app/src/assets/images/opensrp-logo-color.png` +- **REACT_APP_COLLAPSED_LOGO_SRC** + + - Configures the collapsed menu logo src url. + - **Optional**(`string`) + - default: `https://github.com/OpenSRP/web/raw/master/app/src/assets/images/opensrp2-logo-small.png` + - **REACT_APP_SUPPORTED_LANGUAGES** - Use alongside the language switcher, customize the options available for language switching. @@ -258,6 +264,12 @@ Below is a list of currently supported environment variables: - default: `ONE_TO_MANY` - **REACT_APP_AUTHZ_STRATEGY** + - defines which authorization strategy to use. This affects how roles and permissions fetched from the Authorization server are parsed and used in the web app.Currently only keycloak is supported which means Role based acces will only work when using keycloak as the IAM server. - **Required**(`keycloak`). - default: `keycloak` + +- **REACT_APP_FHIR_INVENTORY_LIST_ID** + + - Id of List that will hold all created inventories for a given web instance + - **Optional**_(`string`)_ diff --git a/docs/fhir-web-docker-deployment.md b/docs/fhir-web-docker-deployment.md index 7b0bc1a2f..8bfe6a25d 100644 --- a/docs/fhir-web-docker-deployment.md +++ b/docs/fhir-web-docker-deployment.md @@ -150,6 +150,7 @@ We use different technologies to deploy fhir-web. This documentation will focus // UUID's REACT_APP_FHIR_ROOT_LOCATION_ID: '', REACT_APP_COMMODITIES_LIST_RESOURCE_ID: '', + REACT_APP_FHIR_INVENTORY_LIST_ID: '', // toggle fhir-web modules REACT_APP_ENABLE_FHIR_CARE_TEAM: 'false', diff --git a/docs/rbac.md b/docs/rbac.md index e90b4b23f..5b788f27f 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -4,7 +4,7 @@ Fhir web Rbac implementation limits what logged in users can see and actions the ## Approach -The rbac module provisions an internal role definition and plugins that can parse IAM role information into the pre-defined internal role representation. [This comment](https://github.com/onaio/fhir-web/issues/1182#issuecomment-1486729934) has more information on what this role definition looks like. +The rbac module provisions an internal role definition and plugins that can parse IAM role information into the pre-defined internal role representation. [This comment](https://github.com/onaio/fhir-web/issues/1411#issuecomment-2175911075) has more information on what this role definition looks like. The following adapters exist and can be configured using the `REACT_APP_AUTHZ_STRATEGY` env diff --git a/jest.config.js b/jest.config.js index 15e33d0f2..85f88ec61 100644 --- a/jest.config.js +++ b/jest.config.js @@ -25,6 +25,7 @@ module.exports = { '\\.(css|less|scss)$': 'identity-obj-proxy', }, testEnvironment: 'jsdom', + testTimeout: 10000, coverageThreshold: { global: { branches: 80, diff --git a/packages/fhir-care-team/src/components/CreateEditCareTeam/Form.tsx b/packages/fhir-care-team/src/components/CreateEditCareTeam/Form.tsx index d51b1ab32..fe2048f2c 100644 --- a/packages/fhir-care-team/src/components/CreateEditCareTeam/Form.tsx +++ b/packages/fhir-care-team/src/components/CreateEditCareTeam/Form.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { useHistory } from 'react-router'; import { Button, Col, Row, Form, Input, Radio, Select } from 'antd'; -import { PageHeader } from '@opensrp/react-utils'; +import { BodyLayout } from '@opensrp/react-utils'; import { sendErrorNotification } from '@opensrp/notifications'; import { FormFields, @@ -29,6 +29,7 @@ export interface CareTeamFormProps { fhirBaseURL: string; practitioners: IPractitioner[]; organizations: IOrganization[]; + disabled?: string[]; } /** @@ -37,7 +38,7 @@ export interface CareTeamFormProps { * @param {object} props - component props */ const CareTeamForm: React.FC = (props: CareTeamFormProps) => { - const { fhirBaseURL, initialValues, practitioners, organizations } = props; + const { fhirBaseURL, initialValues, practitioners, organizations, disabled } = props; const [isSubmitting, setIsSubmitting] = useState(false); const history = useHistory(); const { t } = useTranslation(); @@ -51,105 +52,111 @@ const CareTeamForm: React.FC = (props: CareTeamFormProps) => { label: t('Inactive'), value: 'inactive' }, ]; - return ( - - {/** If email is provided render edit group otherwise add group */} - + const pageTitle = initialValues.id + ? t('Edit Care Team | {{name}}', { name: initialValues.name }) + : t('Create Care Team'); + const headerProps = { + pageHeaderProps: { + title: pageTitle, + onBack: undefined, + }, + }; - -
{ - setIsSubmitting(true); - submitForm(values, initialValues, fhirBaseURL, organizations, practitioners, t) - .catch(() => { - if (initialValues.id) { - sendErrorNotification(t('There was a problem updating the Care Team')); - } else { - sendErrorNotification(t('There was a problem creating the Care Team')); - } - }) - .finally(() => setIsSubmitting(false)); - }} - > - + return ( + + + {/** If email is provided render edit group otherwise add group */} + + { + setIsSubmitting(true); + submitForm(values, initialValues, fhirBaseURL, organizations, practitioners, t) + .catch(() => { + if (initialValues.id) { + sendErrorNotification(t('There was a problem updating the Care Team')); + } else { + sendErrorNotification(t('There was a problem creating the Care Team')); + } + }) + .finally(() => setIsSubmitting(false)); + }} + > + - + - - - + + + - - - {statusOptions.map((e) => ( - - {e.label} - - ))} - - + + + {statusOptions.map((e) => ( + + {e.label} + + ))} + + - - + - - + - - - - - - - + + + + + + +
+ ); }; diff --git a/packages/fhir-care-team/src/components/CreateEditCareTeam/index.tsx b/packages/fhir-care-team/src/components/CreateEditCareTeam/index.tsx index 63aaa0019..1c3482ec8 100644 --- a/packages/fhir-care-team/src/components/CreateEditCareTeam/index.tsx +++ b/packages/fhir-care-team/src/components/CreateEditCareTeam/index.tsx @@ -13,7 +13,9 @@ import { import { FHIR_CARE_TEAM, FHIR_PRACTITIONERS, + managingOrganizations, organizationResourceType, + practitionerParticipants, practitionerResourceType, ROUTE_PARAM_CARE_TEAM_ID, } from '../../constants'; @@ -23,6 +25,7 @@ import { useTranslation } from '../../mls'; import { IPractitioner } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPractitioner'; import { ICareTeam } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICareTeam'; import { IOrganization } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IOrganization'; +import { useUserRole } from '@opensrp/rbac'; // Interface for route params interface RouteParams { @@ -44,6 +47,7 @@ export type CreateEditCareTeamProps = EditCareTeamProps & RouteComponentProps = (props: CreateEditCareTeamProps) => { const { fhirBaseURL } = props; + const userRole = useUserRole(); const params = useParams(); const careTeamId = params[ROUTE_PARAM_CARE_TEAM_ID]; const { t } = useTranslation(); @@ -60,21 +64,25 @@ const CreateEditCareTeam: React.FC = (props: CreateEdit } ); + const hasReadOrgs = userRole.hasPermissions(['Organization.read']); const organizations = useQuery( organizationResourceType, async () => loadAllResources(fhirBaseURL, organizationResourceType), { onError: () => sendErrorNotification(t('There was a problem fetching organizations')), select: (res) => getResourcesFromBundle(res), + enabled: hasReadOrgs, } ); + const hasReadPractitioner = userRole.hasPermissions(['Practitioner.read']); const fhirPractitioners = useQuery( FHIR_PRACTITIONERS, async () => loadAllResources(fhirBaseURL, practitionerResourceType, { active: true }), { onError: () => sendErrorNotification(t('There was a problem fetching practitioners')), select: (res) => getResourcesFromBundle(res), + enabled: hasReadPractitioner, } ); @@ -92,11 +100,19 @@ const CreateEditCareTeam: React.FC = (props: CreateEdit const buildInitialValues = getCareTeamFormFields(singleCareTeam.data as ICareTeam); + const disabledFields: string[] = []; + if (!hasReadOrgs) { + disabledFields.push(managingOrganizations); + } + if (!hasReadPractitioner) { + disabledFields.push(practitionerParticipants); + } const careTeamFormProps = { fhirBaseURL, initialValues: buildInitialValues, organizations: organizations.data ?? [], practitioners: fhirPractitioners.data ?? [], + disabled: disabledFields, }; return ( diff --git a/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/form.test.tsx b/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/form.test.tsx index 94067e472..4f49028d0 100644 --- a/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/form.test.tsx +++ b/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/form.test.tsx @@ -66,6 +66,9 @@ describe('components/forms/CreateTeamForm', () => { }); wrapper.update(); + await act(async () => { + await flushPromises(); + }); // name is required and has no default expect(wrapper.find('#name .ant-form-item').text()).toMatchInlineSnapshot( `"NameName is Required"` diff --git a/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/index.test.tsx b/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/index.test.tsx index 36afeae04..e3a91b566 100644 --- a/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/index.test.tsx +++ b/packages/fhir-care-team/src/components/CreateEditCareTeam/tests/index.test.tsx @@ -25,6 +25,8 @@ import { screen, render } from '@testing-library/react'; import userEvents from '@testing-library/user-event'; import { careTeam1, careTeam4201Edited, organizations } from './fixtures'; import flushPromises from 'flush-promises'; +import { RoleContext } from '@opensrp/rbac'; +import { superUserRole } from '@opensrp/react-utils'; jest.mock('fhirclient', () => { return jest.requireActual('fhirclient/lib/entry/browser'); @@ -56,14 +58,16 @@ const AppWrapper = (props: any) => { return ( - - - - - - - - + + + + + + + + + + ); diff --git a/packages/fhir-care-team/src/components/ListView/index.tsx b/packages/fhir-care-team/src/components/ListView/index.tsx index 937b0bb6e..798616591 100644 --- a/packages/fhir-care-team/src/components/ListView/index.tsx +++ b/packages/fhir-care-team/src/components/ListView/index.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { Helmet } from 'react-helmet'; import { Row, Col, Button, Divider, Dropdown, Popconfirm } from 'antd'; import type { MenuProps } from 'antd'; -import { PageHeader } from '@opensrp/react-utils'; +import { BodyLayout } from '@opensrp/react-utils'; import { MoreOutlined, PlusOutlined } from '@ant-design/icons'; import { RouteComponentProps } from 'react-router'; import { useHistory, Link } from 'react-router-dom'; @@ -119,7 +119,7 @@ export const CareTeamList: React.FC = (props: CareTeamLis }, { key: '2', - permissions: [], + permissions: ['CareTeam.read'], label: (
`; exports[`1157 - view details errors out for careTeam 3500 5`] = `
-
- - Patient - +
+ Patient
-
- -
    -
  • - Peter James Chalmers -
  • -
-
+
+
    +
  • + Peter James Chalmers +
  • +
`; exports[`1157 - view details errors out for careTeam 3500 6`] = `
-
- - Managing organizations - +
+ Managing organizations
-
- +
`; exports[`Closes on clicking cancel (X) 1`] = `
-
- - CareTeam ID - +
+ CareTeam ID
-
- - 142534 - +
+ 142534
`; exports[`Closes on clicking cancel (X) 2`] = `
-
- - Identifier - +
+ Identifier
-
- - 99c4dde5-3aca-4a4b-8b33-b50142e05da6 - +
+ 99c4dde5-3aca-4a4b-8b33-b50142e05da6
`; exports[`Closes on clicking cancel (X) 3`] = `
-
- - Name - +
+ Name
-
- - Brown Bag - +
+ Brown Bag
`; exports[`Closes on clicking cancel (X) 4`] = `
-
- - status - +
+ status
-
- - active - +
+ active
`; exports[`Closes on clicking cancel (X) 5`] = `
-
- - Participants - +
+ Participants
-
- -
    -
  • -
    +
      +
    • +
      +
      -
      -
      -
      - - Practitioner - -
      -
      + Practitioner + +
      +
        - -
          -
        • - AeHIN Demo -
        • -
        -
        -
      -
      -
      -
      -
    • -
    - +
  • + AeHIN Demo +
  • +
+
+
+ + + + `; exports[`Closes on clicking cancel (X) 6`] = `
-
- - Practitioner - +
+ Practitioner
-
- -
    -
  • - AeHIN Demo -
  • -
-
+
+
    +
  • + AeHIN Demo +
  • +
`; exports[`Closes on clicking cancel (X) 7`] = `
-
- - Managing organizations - +
+ Managing organizations
-
- +
`; exports[`works correctly 1`] = `
-
- - CareTeam ID - +
+ CareTeam ID
-
- - 131411 - +
+ 131411
`; exports[`works correctly 2`] = `
-
- - Identifier - +
+ Identifier
-
- - 93bc9c3d-6321-41b0-9b93-1275d7114e22 - +
+ 93bc9c3d-6321-41b0-9b93-1275d7114e22
`; exports[`works correctly 3`] = `
-
- - Name - +
+ Name
-
- - Care Team One - +
+ Care Team One
`; exports[`works correctly 4`] = `
-
- - status - +
+ status
-
- - active - +
+ active
`; exports[`works correctly 5`] = `
-
- - Participants - +
+ Participants
-
- -
    -
  • -
    +
      +
    • +
      +
      -
      -
      -
      - - Practitioner - -
      -
      + Practitioner + +
      +
        - -
          -
        • - Ward test hey N test Tester family -
        • -
        • - Ward test hey N test Tester family -
        • -
        -
        -
      -
      -
      -
      -
    • -
    - +
  • + Ward test hey N test Tester family +
  • +
  • + Ward test hey N test Tester family +
  • +
+
+
+ + + + `; exports[`works correctly 6`] = `
-
- - Practitioner - +
+ Practitioner
-
- -
    -
  • - Ward test hey N test Tester family -
  • -
  • - Ward test hey N test Tester family -
  • -
-
+
+
    +
  • + Ward test hey N test Tester family +
  • +
  • + Ward test hey N test Tester family +
  • +
`; exports[`works correctly 7`] = `
-
- - Managing organizations - +
+ Managing organizations
-
- +
`; diff --git a/packages/fhir-care-team/src/components/ViewDetails/tests/index.test.tsx b/packages/fhir-care-team/src/components/ViewDetails/tests/index.test.tsx index 013209f94..0693dc5a3 100644 --- a/packages/fhir-care-team/src/components/ViewDetails/tests/index.test.tsx +++ b/packages/fhir-care-team/src/components/ViewDetails/tests/index.test.tsx @@ -77,7 +77,7 @@ test('works correctly', async () => { // see view details contents const keyValuePairs = document.querySelectorAll( - 'div[data-testid="key-value"] .singleKeyValue-pair' + 'div[data-testid="key-value"] .singleKeyValue-pair__default' ); keyValuePairs.forEach((pair) => { expect(pair).toMatchSnapshot(); @@ -105,7 +105,7 @@ test('Closes on clicking cancel (X) ', async () => { // see view details contents const keyValuePairs = document.querySelectorAll( - 'div[data-testid="key-value"] .singleKeyValue-pair' + 'div[data-testid="key-value"] .singleKeyValue-pair__default' ); keyValuePairs.forEach((pair) => { expect(pair).toMatchSnapshot(); @@ -145,7 +145,7 @@ test('1157 - view details errors out for careTeam 3500', async () => { // see view details contents const keyValuePairs = document.querySelectorAll( - 'div[data-testid="key-value"] .singleKeyValue-pair' + 'div[data-testid="key-value"] .singleKeyValue-pair__default' ); keyValuePairs.forEach((pair) => { expect(pair).toMatchSnapshot(); diff --git a/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/index.tsx b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/index.tsx new file mode 100644 index 000000000..83a496fe8 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/index.tsx @@ -0,0 +1,237 @@ +import React from 'react'; +import { + GenericTabsView, + GenericTabsViewProps, + TabTableProps, + TabsTable, + TabsTitle, + sideViewQuery, + useSearchParams, +} from '@opensrp/react-utils'; +import { + carePlanResourceType, + conditionResourceType, + encounterResourceType, + immunizationResourceType, + taskResourceType, +} from '../../../constants'; +import { useTranslation } from '../../../mls'; +import { defaultSearchParamsFactory, sidePreviewDetailsExtractor } from '../utils'; +import { + parseCareplanList, + columns as carePlanColumns, + carePlanSideViewData, +} from '../ResourceSchema/CarePlan'; +import { + parseImmunizationList, + columns as immunizationColumns, + immunizationSearchParams, + immunizationSideViewData, +} from '../ResourceSchema/Immunization'; +import { + parseEncounterList, + columns as encounterColumns, + encounterPreviewExtractor, +} from '../ResourceSchema/Encounter'; +import { + parseConditionList, + columns as conditionColumns, + conditionSideViewData, +} from '../ResourceSchema/Condition'; +import { + parseTaskList, + columns as taskColumns, + taskSearchParams, + taskSideViewData, +} from '../ResourceSchema/Task'; +import { IImmunization } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IImmunization'; +import { IEncounter } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IEncounter'; +import { ICondition } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICondition'; +import { ITask } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ITask'; +import { ICarePlan } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICarePlan'; +import { Coding } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/coding'; +import { Button } from 'antd'; +import { useUserRole } from '@opensrp/rbac'; + +/** Populated table tabs wrapper props */ +export interface PopulatedTableTabsProps { + fhirBaseURL: string; + patientId: string; +} + +/** + * Patient details view table tabs + * + * @param props - PopulatedTableTabs component props + */ +export const PopulatedTableTabs: React.FC = ( + props: PopulatedTableTabsProps +) => { + const { fhirBaseURL, patientId } = props; + const { t } = useTranslation(); + const userRole = useUserRole(); + + const { addParams, removeParam } = useSearchParams(); + const hasCareTeamRead = userRole.hasPermissions(['CareTeam.read']); + const hasConditionRead = userRole.hasPermissions(['Condition.read']); + const hasTaskRead = userRole.hasPermissions(['Task.read']); + const hasImmunizationRead = userRole.hasPermissions(['Immunization.read']); + const hasEncounterRead = userRole.hasPermissions(['Encounter.read']); + + const defaultTableData = { + resourceId: patientId, + fhirBaseURL, + searchParamsFactory: defaultSearchParamsFactory, + }; + + const tableActionColumn = { + title: t('Actions'), + render: (value: Coding) => ( + + ), + }; + + const carePlanTableData: TabTableProps = { + ...defaultTableData, + resourceType: carePlanResourceType, + tableColumns: [...carePlanColumns(t), tableActionColumn], + tableDataGetter: parseCareplanList, + extractSideViewDetails: sidePreviewDetailsExtractor( + patientId, + carePlanSideViewData, + () => removeParam(sideViewQuery) + ), + }; + + const conditionTableData: TabTableProps = { + ...defaultTableData, + resourceType: conditionResourceType, + tableColumns: [...conditionColumns(t), tableActionColumn], + tableDataGetter: parseConditionList, + extractSideViewDetails: sidePreviewDetailsExtractor( + patientId, + conditionSideViewData, + () => removeParam(sideViewQuery) + ), + }; + + const taskTableData: TabTableProps = { + ...defaultTableData, + resourceType: taskResourceType, + tableColumns: [...taskColumns(t), tableActionColumn], + tableDataGetter: parseTaskList, + searchParamsFactory: taskSearchParams, + extractSideViewDetails: sidePreviewDetailsExtractor(patientId, taskSideViewData, () => + removeParam(sideViewQuery) + ), + }; + + const immunizationTableData: TabTableProps = { + ...defaultTableData, + resourceType: immunizationResourceType, + tableColumns: [...immunizationColumns(t), tableActionColumn], + tableDataGetter: parseImmunizationList, + searchParamsFactory: immunizationSearchParams, + extractSideViewDetails: sidePreviewDetailsExtractor( + patientId, + immunizationSideViewData, + () => removeParam(sideViewQuery) + ), + }; + + const patientEncounterTableData: TabTableProps = { + ...defaultTableData, + resourceType: encounterResourceType, + tableColumns: [...encounterColumns(t), tableActionColumn], + tableDataGetter: parseEncounterList, + extractSideViewDetails: sidePreviewDetailsExtractor( + patientId, + encounterPreviewExtractor, + () => removeParam(sideViewQuery) + ), + }; + + const tabViewProps: GenericTabsViewProps = { + tabViewId: 'tabView', + sideViewQueryName: sideViewQuery, + size: 'small', + items: [ + { + label: ( + + ), + key: 'carePlan', + children: {...carePlanTableData} />, + disabled: !hasCareTeamRead, + }, + { + label: ( + + ), + key: 'condition', + children: {...conditionTableData} />, + disabled: !hasConditionRead, + }, + { + label: ( + + ), + key: 'task', + children: {...taskTableData} />, + disabled: !hasTaskRead, + }, + { + label: ( + + ), + key: 'immunization', + children: {...immunizationTableData} />, + disabled: !hasImmunizationRead, + }, + { + label: ( + + ), + key: 'patientEncounter', + children: {...patientEncounterTableData} />, + disabled: !hasEncounterRead, + }, + ], + }; + + return ; +}; + +export const MemoizePopulatedTableTabs = React.memo(PopulatedTableTabs); diff --git a/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/__snapshots__/index.test.tsx.snap b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/__snapshots__/index.test.tsx.snap new file mode 100644 index 000000000..9bdc65f21 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/__snapshots__/index.test.tsx.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Condition tab renders correctly 1`] = `"77386006confirmedID: 349d8947-3009-4fb3-b3d5-99ff30aa5614CategorystageOnset dateClinical statusactiveView full details"`; + +exports[`Patient encounter tab renders correctly 1`] = `"AMBfinishedID: a1f3a048-8863-42b7-9d2e-2e9efbbca9a8ReasonPeriodInvalid Date-Invalid DateService Type581Episode of careView full details"`; + +exports[`Task tab renders correctly 1`] = `"Hygiene VisitcompletedID: 14205Period9/30/2021-10/1/2021PriorityStatuscompletedIntentorderView full details"`; + +exports[`immunization encounter tab renders correctly 1`] = `"SARSCoV2 mRNA vaccinecompletedID: 979Date recorded7/29/2021protocol applied1statuscompletedReasonView full details"`; diff --git a/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/fixtures.ts b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/fixtures.ts new file mode 100644 index 000000000..31f3c2b8f --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/fixtures.ts @@ -0,0 +1,419 @@ +export const resourceEntriesCount = { + resourceType: 'Bundle', + id: '3eaa135c-9c14-42fe-b8d2-ef49433df4b0', + meta: { + lastUpdated: '2024-05-21T11:17:09.771+00:00', + tag: [ + { + system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationValue', + code: 'SUBSETTED', + display: 'Resource encoded in summary mode', + }, + ], + }, + type: 'searchset', + total: 1, +}; + +export const patientCarePlans = { + resourceType: 'Bundle', + id: 'af38769d-f360-459e-bb6e-f847b23f473b', + meta: { + lastUpdated: '2024-05-21T11:20:31.528+00:00', + }, + type: 'searchset', + total: 1, + link: [ + { + relation: 'self', + url: 'https://fhir.labs.smartregister.org/fhir/CarePlan/_search?_count=5&_format=json&_getpagesoffset=0&_total=accurate&subject%3APatient=1', + }, + ], + entry: [ + { + fullUrl: 'https://fhir.labs.smartregister.org/fhir/CarePlan/131386', + resource: { + resourceType: 'CarePlan', + id: '131386', + meta: { + versionId: '2', + lastUpdated: '2023-04-03T06:52:38.201+00:00', + source: '#f54fd89f7239e443', + }, + identifier: [ + { + use: 'official', + value: 'ee7a758e-9cb4-4146-b864-1857a1593bc3', + }, + ], + instantiatesCanonical: ['PlanDefinition/131372'], + status: 'completed', + intent: 'plan', + title: 'Child Routine visit Plan', + description: 'This defines the schedule of care for patients under 5 years old', + subject: { + reference: 'Patient/1', + }, + period: { + start: '2022-05-26T00:00:00', + end: '2025-05-14T00:00:00', + }, + created: '2022-05-26T03:24:04+05:00', + author: { + reference: 'Practitioner/94398', + }, + activity: [ + { + outcomeReference: [ + { + reference: 'Task/61002532-e414-4223-9ea7-747ebe71f75e', + }, + ], + detail: { + kind: 'Task', + code: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation', + code: 'MO', + display: 'MO', + }, + ], + text: 'MO', + }, + status: 'in-progress', + scheduledTiming: { + event: ['2022-06-01T00:00:00'], + repeat: { + count: 36, + countMax: 59, + duration: 2, + durationMax: 4, + durationUnit: 'h', + frequency: 1, + frequencyMax: 1, + period: 1, + periodMax: 1, + periodUnit: 'mo', + }, + }, + performer: [ + { + reference: 'Practitioner/94398', + }, + ], + description: 'Child Monthly Routine Visit', + }, + }, + ], + }, + search: { + mode: 'match', + }, + }, + ], +}; + +export const patientConditions = { + resourceType: 'Bundle', + id: '3109b334-7b7d-4d16-881d-7ade9f65beba', + meta: { + lastUpdated: '2024-05-22T09:46:56.785+00:00', + }, + type: 'searchset', + total: 1, + link: [ + { + relation: 'self', + url: 'https://fhir.labs.smartregister.org/fhir/Condition/_search?_count=5&_format=json&_getpagesoffset=0&_total=accurate&subject%3APatient=1', + }, + ], + entry: [ + { + fullUrl: + 'https://fhir.labs.smartregister.org/fhir/Condition/349d8947-3009-4fb3-b3d5-99ff30aa5614', + resource: { + resourceType: 'Condition', + id: '349d8947-3009-4fb3-b3d5-99ff30aa5614', + meta: { + versionId: '2', + lastUpdated: '2022-06-27T03:23:29.601+00:00', + source: '#c6f633c24d9e6c4b', + }, + clinicalStatus: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/condition-clinical', + code: 'active', + }, + ], + }, + verificationStatus: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/condition-ver-status', + code: 'confirmed', + }, + ], + }, + code: { + coding: [ + { + system: 'http://snomed.info/sct', + code: '77386006', + }, + ], + text: 'Pregnant', + }, + subject: { + reference: 'Patient/1', + }, + recordedDate: '2021-12-14T19:40:38+05:00', + }, + search: { + mode: 'match', + }, + }, + ], +}; + +export const patientTask = { + resourceType: 'Bundle', + id: 'b8d0ad5e-c704-4dd9-abcd-0c6e880691bf', + meta: { + lastUpdated: '2024-05-22T09:56:08.452+00:00', + }, + type: 'searchset', + total: 1, + link: [ + { + relation: 'self', + url: 'https://fhir.labs.smartregister.org/fhir/Task/_search?_count=5&_format=json&_getpagesoffset=0&_total=accurate&patient=1', + }, + ], + entry: [ + { + fullUrl: 'https://fhir.labs.smartregister.org/fhir/Task/14205', + resource: { + resourceType: 'Task', + id: '14205', + meta: { + versionId: '5', + lastUpdated: '2022-03-18T02:30:02.570+00:00', + source: '#56a6c66e48be94ca', + }, + text: { + status: 'generated', + }, + status: 'completed', + intent: 'order', + code: { + text: 'Hygiene Visit', + }, + description: 'Hygiene Visit', + focus: { + reference: 'MedicationRequest/6751', + }, + for: { + reference: 'Patient/1', + }, + executionPeriod: { + start: '2021-10-01T08:45:05+10:00', + end: '2021-10-02T09:45:05+10:00', + }, + authoredOn: '2016-03-10T22:39:32-04:00', + lastModified: '2016-03-10T22:39:32-04:00', + requester: { + reference: 'Patient/1', + }, + owner: { + reference: 'Practitioner/6744', + }, + restriction: { + repetitions: 1, + period: { + end: '2021-10-02T09:45:05+10:00', + }, + }, + }, + search: { + mode: 'match', + }, + }, + ], +}; + +export const patientEncounters = { + resourceType: 'Bundle', + id: 'a07d33ef-8b10-4730-9aff-6446589a71fa', + meta: { + lastUpdated: '2024-05-22T10:06:16.259+00:00', + }, + type: 'searchset', + total: 1, + link: [ + { + relation: 'self', + url: 'https://fhir.labs.smartregister.org/fhir/Encounter/_search?_count=5&_getpagesoffset=0&_total=accurate&subject%3APatient=1', + }, + ], + entry: [ + { + fullUrl: + 'https://fhir.labs.smartregister.org/fhir/Encounter/a1f3a048-8863-42b7-9d2e-2e9efbbca9a8', + resource: { + resourceType: 'Encounter', + id: 'a1f3a048-8863-42b7-9d2e-2e9efbbca9a8', + meta: { + versionId: '1', + lastUpdated: '2021-12-14T14:42:59.368+00:00', + source: '#0d61522716e890ad', + }, + status: 'finished', + class: { + system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode', + code: 'AMB', + }, + serviceType: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/service-type', + code: '581', + }, + ], + }, + subject: { + reference: 'Patient/1', + }, + }, + search: { + mode: 'match', + }, + }, + ], +}; + +export const patientImmunization = { + resourceType: 'Bundle', + id: 'd315d516-567b-4a17-8991-f7f51ddacc52', + meta: { + lastUpdated: '2024-05-22T10:13:38.052+00:00', + }, + type: 'searchset', + total: 2, + link: [ + { + relation: 'self', + url: 'https://fhir.labs.smartregister.org/fhir/Immunization/_search?_count=5&_getpagesoffset=0&_total=accurate&patient=969', + }, + ], + entry: [ + { + fullUrl: 'https://fhir.labs.smartregister.org/fhir/Immunization/979', + resource: { + resourceType: 'Immunization', + id: '979', + meta: { + versionId: '39', + lastUpdated: '2021-08-10T13:42:24.928+00:00', + source: '#6da071bfda380f5f', + }, + status: 'completed', + vaccineCode: { + coding: [ + { + system: 'http://snomed.info/sct', + code: '1119349007', + display: 'SARSCoV2 mRNA vaccine', + }, + ], + text: 'Moderna', + }, + patient: { + reference: 'Patient/969', + }, + encounter: { + reference: 'Encounter/974', + }, + occurrenceDateTime: '2021-07-08', + recorded: '2021-07-29T12:37:03+03:00', + primarySource: true, + reportOrigin: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/immunization-origin', + code: 'record', + }, + ], + text: 'Written Record - Paper card', + }, + location: { + reference: 'Location/971', + }, + manufacturer: { + reference: 'Organization/973', + }, + lotNumber: 'PT123F.11', + expirationDate: '2018-12-15', + site: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/v3-ActSite', + code: 'LA', + display: 'left arm', + }, + ], + }, + route: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration', + code: 'IM', + display: 'Injection, intramuscular', + }, + ], + }, + doseQuantity: { + value: 5, + system: 'http://unitsofmeasure.org', + code: 'mg', + }, + performer: [ + { + function: { + coding: [ + { + system: 'http://terminology.hl7.org/CodeSystem/v2-0443', + code: 'OP', + }, + ], + }, + actor: { + reference: 'Practitioner/970', + }, + }, + ], + protocolApplied: [ + { + series: '2-dose', + targetDisease: [ + { + coding: [ + { + system: 'http://snomed.info/sct', + code: '840539006', + display: 'COVID 19', + }, + ], + }, + ], + doseNumberPositiveInt: 1, + }, + ], + }, + search: { + mode: 'match', + }, + }, + ], +}; diff --git a/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/index.test.tsx b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/index.test.tsx new file mode 100644 index 000000000..4b240eb36 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/PopulatedTableTabs/tests/index.test.tsx @@ -0,0 +1,392 @@ +import React from 'react'; +import { Provider } from 'react-redux'; +import { PopulatedTableTabs } from '..'; +import { Route, Router, Switch } from 'react-router'; +import * as reactQuery from 'react-query'; +import { store } from '@opensrp/store'; +import { createMemoryHistory } from 'history'; +import { + resourceEntriesCount, + patientCarePlans, + patientConditions, + patientTask, + patientEncounters, + patientImmunization, +} from './fixtures'; +import { LIST_PATIENTS_URL } from '../../../../constants'; +import { + cleanup, + screen, + fireEvent, + render, + waitFor, + waitForElementToBeRemoved, +} from '@testing-library/react'; +import nock from 'nock'; +import { authenticateUser } from '@onaio/session-reducer'; +import { patientResourceDetails } from '../../tests/fixtures'; +import { last } from 'lodash'; +import { RoleContext } from '@opensrp/rbac'; +import { superUserRole } from '@opensrp/react-utils'; + +const { QueryClient, QueryClientProvider } = reactQuery; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + cacheTime: 0, + }, + }, +}); + +jest.mock('@opensrp/notifications', () => ({ + __esModule: true, + ...Object.assign({}, jest.requireActual('@opensrp/notifications')), +})); + +jest.mock('fhirclient', () => { + return jest.requireActual('fhirclient/lib/entry/browser'); +}); + +const patientId = patientResourceDetails.id; +const props = { + fhirBaseURL: 'http://test.server.org', + patientId, +}; + +beforeAll(() => { + store.dispatch( + authenticateUser( + true, + { + email: 'bob@example.com', + name: 'Bobbie', + username: 'RobertBaratheon', + }, + { api_token: 'hunter2', oAuth2Data: { access_token: 'sometoken', state: 'abcde' } } + ) + ); + nock.disableNetConnect(); +}); + +afterAll(() => { + nock.enableNetConnect(); +}); + +afterEach(() => { + nock.cleanAll(); + cleanup(); + jest.resetAllMocks(); + jest.clearAllMocks(); + jest.restoreAllMocks(); +}); + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const AppWrapper = (props: any) => { + return ( + + + + + {(routeProps) => ( + + + + )} + + + + + ); +}; + +const tabsTitleCountQueries = () => { + nock(props.fhirBaseURL) + .get(`/CarePlan/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Condition/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Task/_search`) + .query({ _summary: 'count', patient: patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Immunization/_search`) + .query({ _summary: 'count', patient: patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Encounter/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); +}; + +it('renders correctly', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}`); + + nock(props.fhirBaseURL) + .get(`/CarePlan/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientCarePlans); + + nock(props.fhirBaseURL) + .get(`/Condition/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientConditions); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' + ); + }); + + // Care Plan tab + const carePlanTableHeaders = document.querySelector('.ant-table-thead'); + const carePlanTableData = document.querySelectorAll('.ant-table-tbody td'); + let sideViewElement = document.querySelector('.view-details-content'); + expect(carePlanTableHeaders?.textContent).toBe('TitleDescriptionPeriodActions'); + expect([...carePlanTableData].map((tr) => tr.textContent)).toEqual([ + 'Child Routine visit Plan', + 'This defines the schedule of care for patients under 5 years old', + '5/26/2022-5/14/2025', + 'View', + ]); + expect(sideViewElement).not.toBeInTheDocument(); + // opens side view + const viewBtn = last(carePlanTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.pathname).toEqual('/fhir/Patient/1'); + expect(history.location.search).toEqual('?sideView=131386'); + sideViewElement = document.querySelector('.view-details-content'); + expect(sideViewElement).toBeInTheDocument(); + + const bodyElementValues = [ + ...(sideViewElement?.querySelectorAll('.singleKeyValue-pair__default') || []), + ].map((keyValue) => keyValue.textContent); + expect(bodyElementValues).toEqual([ + 'Category', + 'Period5/26/2022-5/14/2025', + 'Statuscompleted', + 'Intentplan', + ]); + const headerLeftElementValues = [...document.querySelectorAll('.header-bottom')].map( + (keyValue) => keyValue.textContent + ); + expect(headerLeftElementValues).toEqual(['ID: 131386']); + + // condition tab + fireEvent.click(document.querySelector('[data-node-key=condition] .ant-tabs-tab-btn') as Element); + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + expect(history.location.search).toEqual('?tabView=tabView&activeTab=condition'); +}); + +it('Condition tab renders correctly', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}?tabView=tabView&activeTab=condition`); + + nock(props.fhirBaseURL) + .get(`/Condition/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientConditions); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' + ); + }); + + // Care Plan tab + const conditionTableHeaders = document.querySelector('.ant-table-thead'); + const conditionTableData = document.querySelectorAll('.ant-table-tbody td'); + expect(conditionTableHeaders?.textContent).toBe('ConditionSeverityVerification StatusActions'); + expect([...conditionTableData].map((tr) => tr.textContent)).toEqual([ + '77386006', + '', + 'confirmed', + 'View', + ]); + + // opens side view + const viewBtn = last(conditionTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.search).toEqual( + '?tabView=tabView&activeTab=condition&sideView=349d8947-3009-4fb3-b3d5-99ff30aa5614' + ); + expect(document.querySelector('.view-details-content')).toBeInTheDocument(); + expect(document.querySelector('.view-details-content')?.textContent).toMatchSnapshot(); +}); + +it('Task tab renders correctly', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}?tabView=tabView&activeTab=task`); + + nock(props.fhirBaseURL) + .get(`/Task/_search`) + .query({ patient: patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientTask); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' + ); + }); + + // Care Plan tab + const taskTableHeaders = document.querySelector('.ant-table-thead'); + const taskTableData = document.querySelectorAll('.ant-table-tbody td'); + expect(taskTableHeaders?.textContent).toBe('TaskPeriodDescriptionActions'); + expect([...taskTableData].map((tr) => tr.textContent)).toEqual([ + 'Hygiene Visit', + '9/30/2021-10/1/2021', + 'Hygiene Visit', + 'View', + ]); + + // opens side view + const viewBtn = last(taskTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.search).toEqual('?tabView=tabView&activeTab=task&sideView=14205'); + expect(document.querySelector('.view-details-content')).toBeInTheDocument(); + expect(document.querySelector('.view-details-content')?.textContent).toMatchSnapshot(); +}); + +it('immunization encounter tab renders correctly', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}?tabView=tabView&activeTab=immunization`); + + nock(props.fhirBaseURL) + .get(`/Immunization/_search`) + .query({ patient: patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientImmunization); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' + ); + }); + + const immunizationTableHeaders = document.querySelector('.ant-table-thead'); + const immunizationTableData = document.querySelectorAll('.ant-table-tbody td'); + expect(immunizationTableHeaders?.textContent).toBe( + 'Vaccine AdmnisteredStatusAdministration DateActions' + ); + expect([...immunizationTableData].map((tr) => tr.textContent)).toEqual([ + 'SARSCoV2 mRNA vaccine', + 'completed', + '7/8/2021', + 'View', + ]); + + // opens side view + const viewBtn = last(immunizationTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.search).toEqual('?tabView=tabView&activeTab=immunization&sideView=979'); + expect(document.querySelector('.view-details-content')).toBeInTheDocument(); + expect(document.querySelector('.view-details-content')?.textContent).toMatchSnapshot(); +}); + +it('Patient encounter tab renders correctly', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}?tabView=tabView&activeTab=patientEncounter`); + + nock(props.fhirBaseURL) + .get(`/Encounter/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientEncounters); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' + ); + }); + + const patientTableHeaders = document.querySelector('.ant-table-thead'); + const patientTableData = document.querySelectorAll('.ant-table-tbody td'); + expect(patientTableHeaders?.textContent).toBe('ClassPeriodService typeActions'); + expect([...patientTableData].map((tr) => tr.textContent)).toEqual(['AMB', '', '581', 'View']); + + // opens side view + const viewBtn = last(patientTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.search).toEqual( + '?tabView=tabView&activeTab=patientEncounter&sideView=a1f3a048-8863-42b7-9d2e-2e9efbbca9a8' + ); + expect(document.querySelector('.view-details-content')).toBeInTheDocument(); + expect(document.querySelector('.view-details-content')?.textContent).toMatchSnapshot(); +}); + +it('shows broken table page', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}`); + nock(props.fhirBaseURL) + .get(`/CarePlan/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .replyWithError({ + message: 'something awful happened', + code: 'AWFUL_ERROR', + }); + // title count nocks + tabsTitleCountQueries(); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + expect(screen.getByText(/failed, reason: something awful happened/)).toBeInTheDocument(); +}); diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/CarePlan.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/CarePlan.tsx index 50b8a0a62..17368b487 100644 --- a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/CarePlan.tsx +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/CarePlan.tsx @@ -1,26 +1,37 @@ import React from 'react'; import { ICarePlan } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICarePlan'; -import { get } from 'lodash'; +import { get, last } from 'lodash'; import { FhirCodesTooltips, FhirPeriod, getCodeableConcepts, sorterFn, } from '../../../helpers/utils'; -import { Coding } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/coding'; import { Period } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/period'; import type { TFunction } from '@opensrp/i18n'; +import { FHIRServiceClass, ResourceItemLoader, dateToLocaleString } from '@opensrp/react-utils'; +import { planDefinitionType } from '../../../constants'; +import { IPlanDefinition } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPlanDefinition'; +import { Canonical } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/canonical'; export const parseCareplan = (obj: ICarePlan) => { return { title: get(obj, 'title'), period: get(obj, 'period'), + description: get(obj, 'description'), + intent: get(obj, 'intent'), categories: getCodeableConcepts(get(obj, 'category')), + instantiatesCanonical: get(obj, 'instantiatesCanonical'), status: get(obj, 'status'), + created: get(obj, 'created'), id: get(obj, 'id'), }; }; +export const parseCareplanList = (carePlans: ICarePlan[]) => { + return carePlans.map(parseCareplan); +}; + export type CarePlanTableData = ReturnType; export const columns = (t: TFunction) => [ @@ -30,19 +41,96 @@ export const columns = (t: TFunction) => [ sorter: sorterFn('title'), }, { - title: t('Category'), - dataIndex: 'categories' as const, - render: (value: Coding[]) => { - return ; - }, + title: t('Description'), + dataIndex: 'description' as const, }, { title: t('Period'), dataIndex: 'period' as const, render: (value: Period) => , }, - { - title: t('Status'), - dataIndex: 'status' as const, - }, ]; + +export const carePlanSideViewData = (resource: ICarePlan, t: TFunction) => { + const { id, categories, period, title, intent, status } = parseCareplan(resource); + const headerLeftData = { + [t('ID')]: id, + }; + const bodyData = { + [t('Category')]: , + [t('Period')]: , + [t('Status')]: status, + [t('Intent')]: intent, + }; + return { + title, + headerLeftData, + bodyData, + status: { + title: status ?? '', + color: 'green', + }, + }; +}; + +const getPlandefinitionTitle = (instantiatesCanonical?: Canonical[], fhirBaseURL?: string) => { + const planDefinitionId = last(instantiatesCanonical?.[0]?.split('/')); + if (fhirBaseURL && planDefinitionId) { + const props = { + resourceQueryParams: { + queryKey: [planDefinitionType, planDefinitionId], + queryFn: async () => + new FHIRServiceClass(fhirBaseURL, planDefinitionType).read( + planDefinitionId + ), + }, + itemGetter: (obj: IPlanDefinition) => obj.title ?? obj.name, + }; + return {...props} />; + } + return null; +}; + +/** + * Get details displayed on care plan detailed view + * + * @param resource - care plan object + * @param t - translation function + * @param fhirBaseURL - fhir base URL + */ +export function carePlanDetailsProps(resource: ICarePlan, t: TFunction, fhirBaseURL?: string) { + const { + id, + categories, + description, + period, + title, + intent, + status, + created, + instantiatesCanonical, + } = parseCareplan(resource); + const headerRightData = { + [t('Date created')]: dateToLocaleString(created), + }; + + const bodyData = { + [t('Category')]: , + [t('Period')]: , + [t('Status')]: status, + [t('Intent')]: intent, + [t('Canonical (PlanDefinition)')]: getPlandefinitionTitle(instantiatesCanonical, fhirBaseURL), + [t('Address')]: get(resource, 'address.0.line.0') || 'N/A', + [t('Description')]: description, + }; + return { + title, + headerRightData, + headerLeftData: { [t('Id')]: id }, + bodyData, + status: { + title: status, + color: 'green', + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Condition.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Condition.tsx index c247535d2..078049724 100644 --- a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Condition.tsx +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Condition.tsx @@ -4,15 +4,28 @@ import { get } from 'lodash'; import { FhirCodesTooltips, getCodeableConcepts } from '../../../helpers/utils'; import { Coding } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/coding'; import type { TFunction } from '@opensrp/i18n'; +import { ConditionStage } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/conditionStage'; +import { dateToLocaleString } from '@opensrp/react-utils'; export const parseCondition = (obj: ICondition) => { return { condition: getCodeableConcepts(get(obj, 'code')), severity: getCodeableConcepts(get(obj, 'severity')), - verificationStatus: get(obj, 'verificationStatus'), + verificationStatus: getCodeableConcepts(get(obj, 'verificationStatus')), + category: getCodeableConcepts(get(obj, 'category')), + clinicalStatus: getCodeableConcepts(get(obj, 'clinicalStatus')), + recordedDate: get(obj, 'recordedDate'), + onsetDateTime: get(obj, 'onsetDateTime'), + abatementDateTime: get(obj, 'abatementDateTime'), + stage: get(obj, 'stage'), + id: get(obj, 'id'), }; }; +export const parseConditionList = (list: ICondition[]) => { + return list.map(parseCondition); +}; + export type ConditionTableData = ReturnType; export const columns = (t: TFunction) => [ @@ -32,6 +45,90 @@ export const columns = (t: TFunction) => [ }, { title: t('Verification Status'), - dataIndex: 'vstatus', + dataIndex: 'verificationStatus', + render: (value: Coding[]) => { + return ; + }, }, ]; + +const getStageValue = (stage?: ConditionStage[]) => { + if (!stage) return ''; + const summary = stage[0]?.summary; + const summaryCoadable = getCodeableConcepts(summary); + if (summaryCoadable.length > 0) { + return ; + } + return summary?.text; +}; + +const getStatusTitle = (verificationStatus: Coding[]) => { + return (verificationStatus[0]?.display ?? verificationStatus[0]?.code) as string; +}; + +export const conditionSideViewData = (resource: ICondition, t: TFunction) => { + const { id, condition, verificationStatus, category, stage, clinicalStatus, onsetDateTime } = + parseCondition(resource); + const headerLeftData = { + [t('ID')]: id, + }; + const bodyData = { + [t('Category')]: , + [t('stage')]: getStageValue(stage), + [t('Onset date')]: dateToLocaleString(onsetDateTime), + [t('Clinical status')]: , + }; + return { + title: , + headerLeftData, + bodyData, + status: { + title: getStatusTitle(verificationStatus), + color: 'green', + }, + }; +}; + +/** + * Get details displayed on conditions detailed view + * + * @param resource - conditions object + * @param t - translation function + */ +export function conditionDetailsProps(resource: ICondition, t: TFunction) { + const { + id, + condition, + severity, + recordedDate, + verificationStatus, + category, + stage, + clinicalStatus, + onsetDateTime, + abatementDateTime, + } = parseCondition(resource); + const headerRightData = { + [t('Date created')]: dateToLocaleString(recordedDate), + }; + const bodyData = { + [t('Condition')]: , + [t('Severity')]: , + [t('Category')]: , + [t('stage')]: getStageValue(stage), + [t('Onset date')]: dateToLocaleString(onsetDateTime), + [t('Abatement date')]: dateToLocaleString(abatementDateTime), + [t('Clinical status')]: , + [t('Verification status')]: getStatusTitle(verificationStatus), + }; + return { + title: , + headerRightData, + headerLeftData: { [t('Id')]: id }, + bodyData, + status: { + title: getStatusTitle(verificationStatus), + color: 'green', + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Encounter.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Encounter.tsx index 533e177e5..b978aa315 100644 --- a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Encounter.tsx +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Encounter.tsx @@ -10,44 +10,112 @@ export const parseEncounter = (encounter: IEncounter) => { return { type: getCodeableConcepts(get(encounter, 'type')), reason: getCodeableConcepts(get(encounter, 'reasonCode')), + serviceType: getCodeableConcepts(get(encounter, 'serviceType')), + priority: getCodeableConcepts(get(encounter, 'priority')), status: get(encounter, 'status'), - classCode: getCodeableConcepts(get(encounter, 'class')), + classCode: get(encounter, 'class'), period: get(encounter, 'period'), - duration: get(encounter, 'duration'), + duration: get(encounter, 'length'), + serviceProvider: get(encounter, 'serviceProvider'), + id: get(encounter, 'id'), + episodeOfCare: get(encounter, 'episodeOfCare'), }; }; +export const parseEncounterList = (list: IEncounter[]) => { + return list.map(parseEncounter); +}; + export type EncounterTableData = ReturnType; export const columns = (t: TFunction) => [ { - title: t('Period'), - dataIndex: 'period' as const, - render: (value: Period) => , - }, - { - title: t('Reason'), - dataIndex: 'reason' as const, - render: (value: Coding[]) => { - return ; + title: t('Class'), + dataIndex: 'classCode' as const, + render: (value: Coding) => { + return value.display ?? value.code; }, }, { - title: t('Status'), - dataIndex: 'status' as const, - }, - { - title: t('Class'), - dataIndex: 'classCode' as const, - render: (value: Coding[]) => { - return ; + title: t('Period'), + dataIndex: 'period' as const, + render: (value?: Period) => { + if (value) { + return ; + } + return ''; }, }, { - title: t('Type'), - dataIndex: 'type' as const, + title: t('Service type'), + dataIndex: 'serviceType' as const, render: (value: Coding[]) => { return ; }, }, ]; + +export const encounterPreviewExtractor = (resource: IEncounter, t: TFunction) => { + const { reason, period, classCode, id, status, serviceType, episodeOfCare } = + parseEncounter(resource); + const headerLeftData = { + [t('ID')]: id, + }; + const bodyData = { + [t('Reason')]: , + [t('Period')]: , + [t('Service Type')]: , + [t('Episode of care')]: episodeOfCare?.[0]?.display ?? episodeOfCare?.[0]?.reference, + }; + return { + title: classCode.display ?? classCode.code, + headerLeftData, + bodyData, + status: { + title: status ?? '', + color: 'green', + }, + }; +}; + +/** + * Get details displayed on encounter detailed view + * + * @param resource - encounter object + * @param t - translation function + */ +export function encounterDetailProps(resource: IEncounter, t: TFunction) { + const { + reason, + period, + classCode, + id, + status, + serviceType, + episodeOfCare, + type, + serviceProvider, + priority, + duration, + } = parseEncounter(resource); + const bodyData = { + [t('Class')]: classCode.display ?? classCode.code, + [t('Type')]: , + [t('Priority')]: , + [t('Reason')]: , + [t('Period')]: , + [t('Service provider')]: serviceProvider, + [t('Encounter Duration')]: duration && `${duration.value} ${duration.unit}`, + [t('Service Type')]: , + [t('Episode of care')]: episodeOfCare?.[0]?.display ?? episodeOfCare?.[0]?.reference, + }; + return { + title: classCode.display ?? classCode.code, + headerLeftData: { [t('Id')]: id }, + bodyData, + status: { + title: status, + color: 'green', + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Immunization.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Immunization.tsx index bf31d5ac1..d0ba1c646 100644 --- a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Immunization.tsx +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Immunization.tsx @@ -4,46 +4,120 @@ import { get } from 'lodash'; import { FhirCodesTooltips, getCodeableConcepts, sorterFn } from '../../../helpers/utils'; import { Coding } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/coding'; import type { TFunction } from '@opensrp/i18n'; +import { dateToLocaleString } from '@opensrp/react-utils'; export const parseImmunization = (obj: IImmunization) => { return { status: get(obj, 'status'), - vaccineCode: get(obj, 'vaccineCode'), - occurenceDateTime: get(obj, 'occurenceDateTime'), + vaccineCode: getCodeableConcepts(get(obj, 'vaccineCode')), + statusReason: getCodeableConcepts(get(obj, 'statusReason')), + occurrenceDateTime: get(obj, 'occurrenceDateTime'), + reportOrigin: getCodeableConcepts(get(obj, 'reportOrigin')), reasonCode: getCodeableConcepts(get(obj, 'reasonCode')), + dateRecorded: get(obj, 'recorded'), + protocolApplied: get(obj, 'protocolApplied'), + primarySource: get(obj, 'primarySource'), + doseQuantity: get(obj, 'doseQuantity'), + expirationDate: get(obj, 'expirationDate'), id: get(obj, 'id'), }; }; -const occuredDateTimeSortFn = sorterFn('occurenceDateTime', true); +export const parseImmunizationList = (list: IImmunization[]) => { + return list.map(parseImmunization); +}; + +const occuredDateTimeSortFn = sorterFn('occurrenceDateTime', true); export type ImmunizationTableData = ReturnType; export const columns = (t: TFunction) => [ { - title: t('Id'), - dataIndex: 'id', + title: t('Vaccine Admnistered'), + dataIndex: 'vaccineCode', + render: (value: Coding[]) => { + return ; + }, }, { title: t('Status'), dataIndex: 'status', - sorter: sorterFn, + sorter: sorterFn('status'), }, { title: t('Administration Date'), - dataIndex: 'occurenceDateTime', + dataIndex: 'occurrenceDateTime', sorter: occuredDateTimeSortFn, - render: (value: string) => t('{{val, datetime}}', { val: new Date(value) }), - }, - { - title: t('Vaccine Admnistered'), - dataIndex: 'vaccineCode', - }, - { - title: t('Reason'), - dataIndex: 'reasonCode', - render: (value: Coding[]) => { - return ; - }, + render: (value: string) => t('{{val, datetime}}', { val: dateToLocaleString(value, true) }), }, ]; + +export const immunizationSearchParams = (patientId: string) => { + return { patient: patientId }; +}; + +export const immunizationSideViewData = (resource: IImmunization, t: TFunction) => { + const { id, reasonCode, status, vaccineCode, protocolApplied, dateRecorded } = + parseImmunization(resource); + const headerLeftData = { + [t('ID')]: id, + }; + const bodyData = { + [t('Date recorded')]: dateToLocaleString(dateRecorded, true), + [t('protocol applied')]: protocolApplied?.[0]?.doseNumberPositiveInt, + [t('status')]: status, + [t('Reason')]: , + }; + return { + title: , + headerLeftData, + bodyData, + status: { + title: status ?? '', + color: 'green', + }, + }; +}; + +/** + * Get details displayed on immunization detailed view + * + * @param resource - immunization object + * @param t - translation function + */ +export function immunizationDetailProps(resource: IImmunization, t: TFunction) { + const { + id, + reasonCode, + status, + vaccineCode, + protocolApplied, + dateRecorded, + expirationDate, + occurrenceDateTime, + doseQuantity, + primarySource, + reportOrigin, + } = parseImmunization(resource); + const bodyData = { + [t('Vaccine Admnistered')]: , + [t('Administration Date')]: dateToLocaleString(occurrenceDateTime, true), + [t('Vaccine expiry date')]: dateToLocaleString(expirationDate, true), + [t('protocol applied')]: protocolApplied?.[0]?.doseNumberPositiveInt, + [t('Dose quantity')]: doseQuantity?.unit, + [t('status')]: status, + [t('Primary source')]: primarySource, + [t('Report origin')]: , + [t('Reason')]: , + }; + return { + title: , + headerRightData: { [t('Date created')]: dateToLocaleString(dateRecorded) }, + headerLeftData: { [t('Id')]: id }, + bodyData, + status: { + title: status, + color: 'green', + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Patient.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Patient.tsx index a97bb07c2..707688188 100644 --- a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Patient.tsx +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Patient.tsx @@ -1,12 +1,11 @@ import React from 'react'; import { IPatient } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPatient'; import { sorterFn } from '../../../helpers/utils'; -import { getPatientName } from '../../PatientsList/utils'; -import { LIST_PATIENTS_URL } from '../../../constants'; -import { Tag, Typography } from 'antd'; -import { Link } from 'react-router-dom'; -import { Column } from '@opensrp/react-utils'; +import { getPatientName, getPatientStatus, patientStatusColor } from '../../PatientsList/utils'; +import { Button, Tag, Typography } from 'antd'; +import { Column, ResourceDetailsProps, dateToLocaleString } from '@opensrp/react-utils'; import type { TFunction } from '@opensrp/i18n'; +import { get } from 'lodash'; const { Text } = Typography; @@ -30,10 +29,11 @@ export const parsePatient = (patient: IPatient) => { }; export type PatientTableData = ReturnType; +type ShowPatientOverview = (id: string) => void; const dobSorterFn = sorterFn(dob, true); -export const columns = (t: TFunction) => +export const columns = (t: TFunction, showPatientOverview: ShowPatientOverview) => [ { title: t('Name'), @@ -73,9 +73,14 @@ export const columns = (t: TFunction) => // eslint-disable-next-line react/display-name render: (record: PatientTableData) => ( - + ), }, @@ -95,9 +100,10 @@ export const sortMap = { * to locally on the ui. * * @param t - the translator function + * @param showPatientOverview - show the patient overview */ -export const serverSideSortedColumns = (t: TFunction) => { - return columns(t).map((column: ReturnType[0]) => { +export const serverSideSortedColumns = (t: TFunction, showPatientOverview: ShowPatientOverview) => { + return columns(t, showPatientOverview).map((column: ReturnType[0]) => { const newColumn = { ...column }; if (typeof column.sorter === 'function') { newColumn.sorter = true; @@ -105,3 +111,49 @@ export const serverSideSortedColumns = (t: TFunction) => { return newColumn; }); }; + +/** + * Extract resource details props from resource + * + * @param resource - Patient resource + * @param t - translation function + */ +export function patientDetailsProps( + resource: IPatient | undefined, + t: TFunction +): ResourceDetailsProps { + if (!resource) { + return {} as ResourceDetailsProps; + } + const { meta, gender, birthDate, id, active, deceasedBoolean } = resource; + const patientName = getPatientName(resource); + const splitName = patientName ? patientName.split(' ') : []; + const headerRightData = { + [t('Date created')]: dateToLocaleString(meta?.lastUpdated), + }; + const headerLeftData = { + [t('ID')]: id, + [t('Gender')]: gender, + }; + const bodyData = { + [t('First name')]: splitName[0], + [t('Last name')]: splitName[1], + [t('UUID')]: get(resource, 'identifier.0.value'), + [t('Date of birth')]: dateToLocaleString(birthDate, true), + [t('Phone')]: get(resource, 'telecom.0.value'), + [t('MRN')]: 'Unknown', + [t('Address')]: get(resource, 'address.0.line.0') || 'N/A', + [t('Country')]: get(resource, 'address.0.country'), + }; + const patientStatus = getPatientStatus(active as boolean, deceasedBoolean as boolean); + return { + title: patientName, + headerRightData, + headerLeftData, + bodyData, + status: { + title: patientStatus, + color: patientStatusColor[patientStatus], + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Task.tsx b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Task.tsx new file mode 100644 index 000000000..430b7fd23 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/ResourceSchema/Task.tsx @@ -0,0 +1,129 @@ +import React from 'react'; +import { get } from 'lodash'; +import { FhirCodesTooltips, FhirPeriod, getCodeableConcepts } from '../../../helpers/utils'; +import type { TFunction } from '@opensrp/i18n'; +import { ITask } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ITask'; +import { Period } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/period'; +import { Coding } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/coding'; +import { Dictionary } from '@onaio/utils'; +import { CodeableConcept } from '@smile-cdr/fhirts/dist/FHIR-R4/classes/codeableConcept'; +import { dateToLocaleString } from '@opensrp/react-utils'; + +export const parseTask = (obj: ITask) => { + return { + status: get(obj, 'status'), + description: get(obj, 'description'), + executionPeriod: get(obj, 'executionPeriod'), + authoredOn: get(obj, 'authoredOn'), + intent: get(obj, 'intent'), + code: get(obj, 'code'), + codeableCode: getCodeableConcepts(get(obj, 'code')), + reasonCode: getCodeableConcepts(get(obj, 'reasonCode')), + businessStatus: getCodeableConcepts(get(obj, 'businessStatus')), + basedOn: get(obj, 'basedOn'), + priority: get(obj, 'priority'), + id: get(obj, 'id'), + }; +}; + +export const parseTaskList = (list: ITask[]) => { + return list.map(parseTask); +}; + +export type TaskTableData = ReturnType; + +export const columns = (t: TFunction) => [ + { + title: t('Task'), + dataIndex: 'codeableCode' as const, + render: (value: Coding[], tableData: Dictionary) => { + if (value.length > 0) { + return ; + } + return tableData.code?.text; + }, + }, + { + title: t('Period'), + dataIndex: 'executionPeriod' as const, + render: (value: Period) => , + }, + { + title: t('Description'), + dataIndex: 'description', + }, +]; + +export const taskSearchParams = (patientId: string) => { + return { patient: patientId }; +}; + +const getTitle = (codeableCode: Coding[], code?: CodeableConcept) => { + if (codeableCode.length > 0) { + return ; + } + return code?.text; +}; + +export const taskSideViewData = (resource: ITask, t: TFunction) => { + const { id, status, intent, executionPeriod, priority, code, codeableCode } = parseTask(resource); + const headerLeftData = { + [t('ID')]: id, + }; + const bodyData = { + [t('Period')]: , + [t('Priority')]: priority, + [t('Status')]: status, + [t('Intent')]: intent, + }; + return { + title: getTitle(codeableCode, code), + headerLeftData, + bodyData, + status: { + title: status ?? '', + color: 'green', + }, + }; +}; + +/** + * Get details displayed on task detailed view + * + * @param resource - task object + * @param t - translation function + */ +export function taskDetailsProps(resource: ITask, t: TFunction) { + const { + id, + status, + description, + intent, + executionPeriod, + priority, + businessStatus, + authoredOn, + reasonCode, + code, + codeableCode, + } = parseTask(resource); + const bodyData = { + [t('Period')]: , + [t('Priority')]: priority, + [t('Status')]: status, + [t('Business status')]: , + [t('Intent')]: intent, + [t('reason')]: , + [t('Description')]: description, + }; + return { + title: getTitle(codeableCode, code), + headerRightData: { [t('Date created')]: dateToLocaleString(authoredOn) }, + headerLeftData: { [t('Id')]: id }, + bodyData, + status: { + title: status, + color: 'green', + }, + }; +} diff --git a/packages/fhir-client/src/components/PatientDetails/index.css b/packages/fhir-client/src/components/PatientDetails/index.css new file mode 100644 index 000000000..0175297a1 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/index.css @@ -0,0 +1,21 @@ +.details-content { + background: #FFFFFF; + top: 155px; + left: 286px; + padding: 16px; + gap: 14px; + border-radius: 12px; +} + +.details-content .main-content { + padding: 0px; +} + +.details-content .ant-tabs-tab-btn { + padding-left: 16px; +} + +.details-content .view-details-content { + padding: 0px; +} + diff --git a/packages/fhir-client/src/components/PatientDetails/index.tsx b/packages/fhir-client/src/components/PatientDetails/index.tsx index 6ec80916d..3dd8317ab 100644 --- a/packages/fhir-client/src/components/PatientDetails/index.tsx +++ b/packages/fhir-client/src/components/PatientDetails/index.tsx @@ -1,239 +1,85 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import React from 'react'; -import { Col, Row, Menu, Badge, Card, Avatar, Tag, Spin, Layout, Alert } from 'antd'; -import { IdcardOutlined } from '@ant-design/icons'; -import { Helmet } from 'react-helmet'; import { RouteComponentProps, useParams } from 'react-router-dom'; -import FHIR from 'fhirclient'; -import get from 'lodash/get'; -import { BrokenPage, handleSessionOrTokenExpiry } from '@opensrp/react-utils'; -import { fhirclient } from 'fhirclient/lib/types'; -import { getPatientName } from '../PatientsList/utils'; -import { IfhirR4 } from '@smile-cdr/fhirts'; -import { DocumentReferenceDetails } from '../DocumentReference'; +import { BodyLayout, PopulatedResourceDetails } from '@opensrp/react-utils'; import { IPatient } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPatient'; -import { patientResourceType } from '../../constants'; -import { useQuery } from 'react-query'; -import { resourcesSchema } from './ResourceSchema'; -import { PatientDetailsTable } from '../..//helpers/utils'; +import { LIST_PATIENTS_URL, patientResourceType } from '../../constants'; import { useTranslation } from '../../mls'; - -const { Header, Sider, Content } = Layout; +import { getResourceDetailsProps, queryParamsFactory } from './utils'; +import { MemoizePopulatedTableTabs } from './PopulatedTableTabs'; +import './index.css'; // Interface for route params interface RouteParams { id: string; -} - -// Interface for resourceTypeMap -interface ResourceTypeMap { - [key: string]: { count: number; data: fhirclient.FHIR.Resource[] }; + resourceType?: string; + resourceId?: string; } /** props for editing a user view */ export interface PatientDetailProps { fhirBaseURL: string; - patientBundleSize: number; } /** type intersection for all types that pertain to the props */ export type PatientDetailPropTypes = PatientDetailProps & RouteComponentProps; -/** default props for editing patient component */ -export const defaultEditPatientProps: PatientDetailProps = { - fhirBaseURL: '', - patientBundleSize: 1000, -}; - /** * Component which shows FHIR resource details of a single patient * * @param {Object} props - PatientDetails component props * @returns {React.FC} returns patient resources display */ -const PatientDetails: React.FC = (props: PatientDetailPropTypes) => { - const { fhirBaseURL, patientBundleSize } = props; - const { id: patientId } = useParams(); - const { t } = useTranslation(); +export const PatientDetails: React.FC = (props: PatientDetailPropTypes) => { + const { fhirBaseURL } = props; + const { id: patientId, resourceType, resourceId } = useParams(); - const [resourceType, setResourceType] = React.useState(patientResourceType); - const { error, data, isLoading } = useQuery([patientResourceType, patientId], async () => { - const token = await handleSessionOrTokenExpiry(); - return await FHIR.client(fhirBaseURL).request({ - url: `Patient/${patientId}/$everything?_count=${patientBundleSize}`, - headers: { - Authorization: `Bearer ${token}`, - }, - }); - }); - - if (isLoading) { - return ; - } - - if (error) { - return ; - } - - const resourceTypeMap: ResourceTypeMap = {}; - - if (data && data.entry?.length) { - for (const datum of data.entry) { - const resourceTypeStr = datum.resource.resourceType as string; - if (!resourceTypeMap[resourceTypeStr]) { - resourceTypeMap[resourceTypeStr] = { - count: 1, - data: [datum.resource], - }; - } else { - const resourceCount = resourceTypeMap[resourceTypeStr].count + 1; - resourceTypeMap[resourceTypeStr] = { - count: resourceCount, - data: [...(resourceTypeMap[resourceTypeStr]?.data ?? []), datum.resource], - }; - } - } + const { t } = useTranslation(); + const activeResourceId = resourceId ?? patientId; + const activeResourceType = resourceType ?? patientResourceType; + const isPatientDetailsPage = !(resourceType && resourceId); + const pageTitle = t('View details'); + const viewDetailsItem = { title: t('View details') }; + const breadCrumbItems = [ + { + title: t('Patients'), + path: LIST_PATIENTS_URL, + }, + viewDetailsItem, + ]; + + if (!isPatientDetailsPage) { + breadCrumbItems[1] = { + title: t('Patient profile'), + path: `${LIST_PATIENTS_URL}/${patientId}`, + }; + breadCrumbItems.push(viewDetailsItem); } - const resources = resourceTypeMap[resourceType]?.data; - const { columns: columnsFactory, resourceParser } = resourcesSchema[resourceType] ?? {}; - const columns = columnsFactory?.(t); + const headerProps = { + pageHeaderProps: { + title: pageTitle, + subTitle: activeResourceId, + }, + breadCrumbProps: { + items: breadCrumbItems, + }, + }; + const populatedResourceDetailsProps = { + resourceQueryParams: queryParamsFactory(fhirBaseURL, activeResourceType, activeResourceId), + resourceDetailsPropsGetter: getResourceDetailsProps(activeResourceType), + fhirBaseURL, + }; + const tableTabsProps = { + fhirBaseURL, + patientId, + }; - const patientName = getPatientName(resourceTypeMap['Patient'].data[0] as IPatient); - const currentPatient = resourceTypeMap['Patient'].data[0]; - const { gender, birthDate } = currentPatient; - const avatarLink = `https://www.gravatar.com/avatar/${patientId}?s=50&r=any&default=identicon&forcedefault=1`; return ( - - -
- - {t('Patient Details')} - -
- - - - - -
-

- {patientName}{' '} - {currentPatient.deceasedBoolean || currentPatient.deceasedDateTime ? ( - {t('Deceased')} - ) : null} -

-
- - {(() => { - const columnarData = [ - { - [t('UUID')]: get(currentPatient, 'identifier.0.value'), - [t('ID')]: patientId, - [t('Gender')]: gender, - }, - { - [t('Birth Date')]: birthDate, - [t('Phone')]: get(currentPatient, 'telecom.0.value'), - [t('MRN')]: 'Unknown', - }, - { - [t('Address')]: get(currentPatient, 'address.0.line.0') || 'N/A', - [t('Country')]: get(currentPatient, 'address.0.country'), - }, - ]; - return ( -
- {columnarData.map((columnData, idx) => { - return ( -
- {Object.entries(columnData).map(([key, value]) => { - return ( -
- {key}: - {value} -
- ); - })} -
- ); - })} -
- ); - })()} -
-
-
-
- - - - {Object.keys(resourceTypeMap).map((type: string) => ( - { - setResourceType(e.key as string); - }} - > - {type}{' '} - - - ))} - - - - - - {resourceType} - - - } - bordered={false} - > - {(() => { - if (resourceType === 'DocumentReference') { - return ( - - ); - } else { - if (!columns || !resourceParser) { - return ; - } - return ( - - ); - } - })()} - - - -
- -
+ +
+ {...populatedResourceDetailsProps} /> + {isPatientDetailsPage && } +
+
); }; - -PatientDetails.defaultProps = defaultEditPatientProps; - -export { PatientDetails }; diff --git a/packages/fhir-client/src/components/PatientDetails/tests/__snapshots__/index.test.tsx.snap b/packages/fhir-client/src/components/PatientDetails/tests/__snapshots__/index.test.tsx.snap index b18fa635a..06ad86e72 100644 --- a/packages/fhir-client/src/components/PatientDetails/tests/__snapshots__/index.test.tsx.snap +++ b/packages/fhir-client/src/components/PatientDetails/tests/__snapshots__/index.test.tsx.snap @@ -1,181 +1,57 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Patients list view renders correctly: Doc reference values 1`] = ` -
- -
- - 2021-08-04 - -
-
-`; - -exports[`Patients list view renders correctly: Observation table row 1`] = `""`; - -exports[`Patients list view renders correctly: Observation table row 2`] = `"e9a84d1d-9316-4a5f-830f-868807969723 | 95.25851987455393 kg | final | 4/16/2018"`; - -exports[`Patients list view renders correctly: Observation table row 3`] = `"47536fc4-90e6-43ca-9549-8e2e7b12dd7d | 101.76013218462178 kg | final | 4/11/2016"`; - -exports[`Patients list view renders correctly: Observation table row 4`] = `"a7a3dff7-a034-4add-a78a-a9ea685bcbf7 | 98.56912483160168 kg | final | 3/29/2010"`; - -exports[`Patients list view renders correctly: Observation table row 5`] = `"7ccd9eaf-c475-4ec0-98cf-6598cd1743e6 | 101.76013218462178 kg | final | 4/7/2014"`; - -exports[`Patients list view renders correctly: Observation table row 6`] = `"117b9082-f85f-4248-be78-1bd90645e358 | 101.76013218462178 kg | final | 4/2/2012"`; - -exports[`Patients list view renders correctly: Patient key value details 1`] = ` -
- - UUID - : - - - 512a3be0-5653-496b-bf4a-20c6a0e71d88 - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 2`] = ` -
- - ID - : - - - cd3ac6b4-fa04-416e-9f8b-69584fd5d1c2 - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 3`] = ` -
- - Gender - : - - - male - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 4`] = ` -
- - Birth Date - : - - - 1970-09-28 - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 5`] = ` -
- - Phone - : - - - 555-136-8815 - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 6`] = ` -
- - MRN - : - - - Unknown - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 7`] = ` -
- - Address - : - - - 836 Doyle Port - -
-`; - -exports[`Patients list view renders correctly: Patient key value details 8`] = ` -
- - Country - : - - - US - -
-`; - -exports[`Patients list view renders correctly: reference collapse item 1`] = ` - - 1015 -    - - - current - - -`; - -exports[`Patients list view renders correctly: table row 1 page 1 1`] = ` - - 7/8/2021 - -`; - -exports[`Patients list view renders correctly: table row 1 page 1 2`] = ` - - 2021-02-02 - -`; - -exports[`Patients list view renders correctly: table row 1 page 1 3`] = ` - -`; +exports[`renders care plan resources correctly: other resource breadCrum-0 1`] = `"Patients"`; + +exports[`renders care plan resources correctly: other resource breadCrum-1 1`] = `"/"`; + +exports[`renders care plan resources correctly: other resource breadCrum-2 1`] = `"Patient profile"`; + +exports[`renders care plan resources correctly: other resource breadCrum-3 1`] = `"/"`; + +exports[`renders care plan resources correctly: other resource breadCrum-4 1`] = `"View details"`; + +exports[`renders condition resources correctly: other resource breadCrum-0 1`] = `"Patients"`; + +exports[`renders condition resources correctly: other resource breadCrum-1 1`] = `"/"`; + +exports[`renders condition resources correctly: other resource breadCrum-2 1`] = `"Patient profile"`; + +exports[`renders condition resources correctly: other resource breadCrum-3 1`] = `"/"`; + +exports[`renders condition resources correctly: other resource breadCrum-4 1`] = `"View details"`; + +exports[`renders immunization resources correctly: other resource breadCrum-0 1`] = `"Patients"`; + +exports[`renders immunization resources correctly: other resource breadCrum-1 1`] = `"/"`; + +exports[`renders immunization resources correctly: other resource breadCrum-2 1`] = `"Patient profile"`; + +exports[`renders immunization resources correctly: other resource breadCrum-3 1`] = `"/"`; + +exports[`renders immunization resources correctly: other resource breadCrum-4 1`] = `"View details"`; + +exports[`renders patient details page correctly: patient breadCrum-0 1`] = `"Patients"`; + +exports[`renders patient details page correctly: patient breadCrum-1 1`] = `"/"`; + +exports[`renders patient details page correctly: patient breadCrum-2 1`] = `"View details"`; + +exports[`renders patientEncounter resources correctly: other resource breadCrum-0 1`] = `"Patients"`; + +exports[`renders patientEncounter resources correctly: other resource breadCrum-1 1`] = `"/"`; + +exports[`renders patientEncounter resources correctly: other resource breadCrum-2 1`] = `"Patient profile"`; + +exports[`renders patientEncounter resources correctly: other resource breadCrum-3 1`] = `"/"`; + +exports[`renders patientEncounter resources correctly: other resource breadCrum-4 1`] = `"View details"`; + +exports[`renders task resources correctly: other resource breadCrum-0 1`] = `"Patients"`; + +exports[`renders task resources correctly: other resource breadCrum-1 1`] = `"/"`; + +exports[`renders task resources correctly: other resource breadCrum-2 1`] = `"Patient profile"`; + +exports[`renders task resources correctly: other resource breadCrum-3 1`] = `"/"`; + +exports[`renders task resources correctly: other resource breadCrum-4 1`] = `"View details"`; diff --git a/packages/fhir-client/src/components/PatientDetails/tests/fixtures.ts b/packages/fhir-client/src/components/PatientDetails/tests/fixtures.ts index d87a03da9..d76f4eb50 100644 --- a/packages/fhir-client/src/components/PatientDetails/tests/fixtures.ts +++ b/packages/fhir-client/src/components/PatientDetails/tests/fixtures.ts @@ -1,15931 +1,150 @@ -export const patientDetails = { - resourceType: 'Bundle', - id: 'cd3ac6b4-fa04-416e-9f8b-69584fd5d1c2', +export const patientResourceDetails = { + resourceType: 'Patient', + id: '1', meta: { - lastUpdated: '2021-03-25T03:15:46.793-04:00', + versionId: '4', + lastUpdated: '2021-03-10T13:27:48.632+00:00', + source: '#14dfbe238f0933a5', }, - type: 'searchset', - total: 363, - link: [ - { - relation: 'self', - url: 'https://r4.smarthealthit.org/Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e/$everything?_count=5000&_format=json', - }, + text: { + status: 'generated', + div: '
John DOE
Address213,One Pademore
Nairobi Kenya
Date of birth04 August 1988
', + }, + name: [ { - relation: 'next', - url: 'https://r4.smarthealthit.org?_getpages=cd3ac6b4-fa04-416e-9f8b-69584fd5d1c2&_getpagesoffset=250&_count=250&_format=json&_pretty=true&_bundletype=searchset', + use: 'official', + family: 'Doe', + given: ['John'], }, ], - entry: [ - { - fullUrl: 'https://r4.smarthealthit.org/Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - resource: { - resourceType: 'Patient', - id: '494743a2-fea5-4827-8f02-c2b91e4a4c9e', - meta: { - versionId: '10', - lastUpdated: '2020-11-30T02:24:05.267-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - text: { - status: 'generated', - div: '
Generated by Synthea.Version identifier: v2.4.0-100-g26a4b936\n . Person seed: -2045239572687783439 Population seed: 1559319163074
', - }, - extension: [ - { - url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race', - extension: [ - { - url: 'ombCategory', - valueCoding: { - system: 'urn:oid:2.16.840.1.113883.6.238', - code: '2106-3', - display: 'White', - }, - }, - { - url: 'text', - valueString: 'White', - }, - ], - }, - { - url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity', - extension: [ - { - url: 'ombCategory', - valueCoding: { - system: 'urn:oid:2.16.840.1.113883.6.238', - code: '2186-5', - display: 'Not Hispanic or Latino', - }, - }, - { - url: 'text', - valueString: 'Not Hispanic or Latino', - }, - ], - }, - { - url: 'http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName', - valueString: 'Evia Kuhn', - }, - { - url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex', - valueCode: 'M', - }, - { - url: 'http://hl7.org/fhir/StructureDefinition/patient-birthPlace', - valueAddress: { - city: 'Franklin Town', - state: 'Massachusetts', - country: 'US', - }, - }, - { - url: 'http://synthetichealth.github.io/synthea/disability-adjusted-life-years', - valueDecimal: 2.0540623754548077, - }, - { - url: 'http://synthetichealth.github.io/synthea/quality-adjusted-life-years', - valueDecimal: 45.945937624545195, - }, - ], - identifier: [ - { - system: 'https://github.com/synthetichealth/synthea', - value: '512a3be0-5653-496b-bf4a-20c6a0e71d88', - }, - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0203', - code: 'MR', - display: 'Medical Record Number', - }, - ], - text: 'Medical Record Number', - }, - system: 'http://hospital.smarthealthit.org', - value: '512a3be0-5653-496b-bf4a-20c6a0e71d88', - }, - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0203', - code: 'SS', - display: 'Social Security Number', - }, - ], - text: 'Social Security Number', - }, - system: 'http://hl7.org/fhir/sid/us-ssn', - value: '999-95-5068', - }, - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0203', - code: 'DL', - display: "Driver's License", - }, - ], - text: "Driver's License", - }, - system: 'urn:oid:2.16.840.1.113883.4.3.25', - value: 'S99980710', - }, - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0203', - code: 'PPN', - display: 'Passport Number', - }, - ], - text: 'Passport Number', - }, - system: 'http://standardhealthrecord.org/fhir/StructureDefinition/passportNumber', - value: 'X36622256X', - }, - ], - name: [ - { - use: 'official', - family: 'Cummings', - given: ['Barrett'], - prefix: ['Mr.'], - }, - ], - telecom: [ - { - system: 'phone', - value: '555-136-8815', - use: 'home', - }, - ], - gender: 'male', - birthDate: '1970-09-28', - address: [ - { - extension: [ - { - url: 'http://hl7.org/fhir/StructureDefinition/geolocation', - extension: [ - { - url: 'latitude', - valueDecimal: 42.33196, - }, - { - url: 'longitude', - valueDecimal: -71.020173, - }, - ], - }, - ], - line: ['836 Doyle Port'], - city: 'Boston', - state: 'Massachusetts', - postalCode: '02108', - country: 'US', - }, - ], - maritalStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus', - code: 'M', - display: 'M', - }, - ], - text: 'M', - }, - multipleBirthBoolean: false, - communication: [ - { - language: { - coding: [ - { - system: 'urn:ietf:bcp:47', - code: 'en-US', - display: 'English', - }, - ], - text: 'English', - }, - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"10"', - }, - }, + telecom: [ { - fullUrl: 'https://r4.smarthealthit.org/Observation/e9a84d1d-9316-4a5f-830f-868807969723', - resource: { - resourceType: 'Observation', - id: 'e9a84d1d-9316-4a5f-830f-868807969723', - meta: { - versionId: '77', - lastUpdated: '2021-03-08T02:00:02.477-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '29463-7', - display: 'Body Weight', - }, - ], - text: 'Body Weight', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 95.25851987455393, - unit: 'kg', - system: 'http://unitsofmeasure.org', - code: 'kg', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"77"', - }, + system: 'phone', + value: '+254722123456', + use: 'mobile', }, { - fullUrl: 'https://r4.smarthealthit.org/Observation/47536fc4-90e6-43ca-9549-8e2e7b12dd7d', - resource: { - resourceType: 'Observation', - id: '47536fc4-90e6-43ca-9549-8e2e7b12dd7d', - meta: { - versionId: '6', - lastUpdated: '2021-03-08T01:57:03.661-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '29463-7', - display: 'Body Weight', - }, - ], - text: 'Body Weight', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 101.76013218462178, - unit: 'kg', - system: 'http://unitsofmeasure.org', - code: 'kg', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"6"', - }, + system: 'email', + value: 'jdoe@ona.io', }, + ], + gender: 'male', + birthDate: '1988-08-04', + address: [ { - fullUrl: 'https://r4.smarthealthit.org/Observation/a7a3dff7-a034-4add-a78a-a9ea685bcbf7', - resource: { - resourceType: 'Observation', - id: 'a7a3dff7-a034-4add-a78a-a9ea685bcbf7', - meta: { - versionId: '4', - lastUpdated: '2021-03-03T01:59:29.245-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '29463-7', - display: 'Body Weight', - }, - ], - text: 'Body Weight', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 98.56912483160168, - unit: 'kg', - system: 'http://unitsofmeasure.org', - code: 'kg', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, + line: ['213,One Pademore'], + city: 'Nairobi', + postalCode: '00100', + country: 'Kenya', }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/7ccd9eaf-c475-4ec0-98cf-6598cd1743e6', - resource: { - resourceType: 'Observation', - id: '7ccd9eaf-c475-4ec0-98cf-6598cd1743e6', - meta: { - versionId: '12', - lastUpdated: '2021-03-08T01:59:27.767-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '29463-7', - display: 'Body Weight', - }, - ], - text: 'Body Weight', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 101.76013218462178, - unit: 'kg', - system: 'http://unitsofmeasure.org', - code: 'kg', + ], +}; + +export const planDefinitionResource = { + resourceType: 'PlanDefinition', + id: '131372', + meta: { + versionId: '4', + lastUpdated: '2022-05-25T22:12:58.587+00:00', + source: '#1f80dc273b4a064e', + }, + contained: [ + { + resourceType: 'ActivityDefinition', + id: 'careplan-activity', + title: 'Child Monthly Routine Visit', + status: 'active', + description: + 'This action will performed every month for a patient < 5 years old. The start date with be next month after registration while the end date will be the 60th week after birth.', + kind: 'Task', + timingTiming: { + repeat: { + countMax: 59, + duration: 2, + durationMax: 4, + durationUnit: 'h', + frequency: 1, + frequencyMax: 1, + period: 1, + periodMax: 1, + periodUnit: 'mo', }, }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"12"', - }, }, + ], + name: 'Child Routine visit Plan', + title: 'Child Routine visit Plan', + status: 'active', + description: 'This defines the schedule of care for patients under 5 years old', + goal: [ { - fullUrl: 'https://r4.smarthealthit.org/Observation/117b9082-f85f-4248-be78-1bd90645e358', - resource: { - resourceType: 'Observation', - id: '117b9082-f85f-4248-be78-1bd90645e358', - meta: { - versionId: '4', - lastUpdated: '2021-03-03T01:57:20.187-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ + category: { + coding: [ { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], + system: 'https://www.hl7.org/fhir/codesystem-goal-category.html', + code: 'nursing', + display: 'Nursing', }, ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '29463-7', - display: 'Body Weight', - }, - ], - text: 'Body Weight', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 101.76013218462178, - unit: 'kg', - system: 'http://unitsofmeasure.org', - code: 'kg', - }, }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/ServiceRequest/1004306', - resource: { - resourceType: 'ServiceRequest', - id: '1004306', - meta: { - versionId: '1', - lastUpdated: '2021-03-01T01:30:00.409-05:00', - }, - modifierExtension: [ + priority: { + coding: [ { - url: 'http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest', - valueReference: { - reference: 'Questionnaire/1004305', - display: 'Cancer Quality Forum Questionnaire 2012', - }, + system: 'https://www.hl7.org/fhir/codesystem-goal-priority.html', + code: 'high-priority', + display: 'High Priority', }, ], - status: 'active', - intent: 'order', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - occurrenceDateTime: '2021-03-01T06:29:53.977Z', - requester: { - reference: 'Practitioner/efb5d4ce-dffc-47df-aa6d-05d372fdb407', - }, - }, - search: { - mode: 'match', }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/ServiceRequest/1003234', - resource: { - resourceType: 'ServiceRequest', - id: '1003234', - meta: { - versionId: '1', - lastUpdated: '2021-02-19T07:53:37.708-05:00', - }, - modifierExtension: [ + start: { + coding: [ { - url: 'http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest', - valueReference: { - reference: - 'https://mss.fsm.northwestern.edu/AC_API/2018-10/Questionnaire/3C31AA37-81FC-43D5-B870-6E8AFC7DFF04', - display: 'PROMIS Bank v1.0 - General Self-Efficacy', - }, + system: 'http://www.snomed.org/', + code: '32485007', + display: 'Admission to hospital', }, ], - status: 'active', - intent: 'order', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - occurrenceDateTime: '2021-02-19T12:53:28.860Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationAdministration/1001834', - resource: { - resourceType: 'MedicationAdministration', - id: '1001834', - meta: { - versionId: '1', - lastUpdated: '2021-01-28T05:30:24.342-05:00', - }, - status: 'completed', - medicationCodeableConcept: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/ndc', - code: '0069-2587-10', - display: 'Vancomycin Hydrochloride (VANCOMYCIN HYDROCHLORIDE)', - }, - ], - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectivePeriod: { - start: '2020-01-06T10:20:00.000+00:00', - end: '2020-01-06T11:20:00.000+00:00', - }, - dosage: { - route: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '255560000', - display: 'Intravenous', - }, - ], - }, - dose: { - value: 85, - unit: 'mg', - system: 'http://unitsofmeasure.org', - code: 'mg', - }, - rateRatio: { - numerator: { - value: 250, - unit: 'milliliter', - system: 'http://unitsofmeasure.org', - code: 'mL', - }, - denominator: { - value: 1, - unit: 'hour', - system: 'http://unitsofmeasure.org', - code: 'h', - }, - }, - }, - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationAdministration/1001833', - resource: { - resourceType: 'MedicationAdministration', - id: '1001833', - meta: { - versionId: '1', - lastUpdated: '2021-01-28T05:03:55.492-05:00', - }, - status: 'completed', - medicationCodeableConcept: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/ndc', - code: '0069-2587-10', - display: 'Vancomycin Hydrochloride (VANCOMYCIN HYDROCHLORIDE)', - }, - ], - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectivePeriod: { - start: '2020-01-06T10:20:00.000+00:00', - end: '2020-01-06T11:20:00.000+00:00', - }, - dosage: { - route: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '255560000', - display: 'Intravenous', - }, - ], - }, - dose: { - value: 85, - unit: 'mg', - system: 'http://unitsofmeasure.org', - code: 'mg', - }, - rateRatio: { - numerator: { - value: 250, - unit: 'milliliter', - system: 'http://unitsofmeasure.org', - code: 'mL', - }, - denominator: { - value: 1, - unit: 'hour', - system: 'http://unitsofmeasure.org', - code: 'h', - }, - }, - }, - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', }, }, + ], + action: [ { - fullUrl: 'https://r4.smarthealthit.org/MedicationAdministration/1001832', - resource: { - resourceType: 'MedicationAdministration', - id: '1001832', - meta: { - versionId: '1', - lastUpdated: '2021-01-28T04:34:26.136-05:00', - }, - status: 'completed', - medicationCodeableConcept: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/ndc', - code: '0069-2587-10', - display: 'Vancomycin Hydrochloride (VANCOMYCIN HYDROCHLORIDE)', - }, - ], - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectivePeriod: { - start: '2020-01-06T10:20:00.000+00:00', - end: '2020-01-06T11:20:00.000+00:00', - }, - dosage: { - route: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '255560000', - display: 'Intravenous', - }, - ], - }, - dose: { - value: 85, - unit: 'mg', - system: 'http://unitsofmeasure.org', - code: 'mg', - }, - rateRatio: { - numerator: { - value: 250, - unit: 'milliliter', - system: 'http://unitsofmeasure.org', - code: 'mL', - }, - denominator: { - value: 1, - unit: 'hour', - system: 'http://unitsofmeasure.org', - code: 'h', - }, + prefix: '1', + priority: 'routine', + condition: [ + { + kind: 'applicability', + expression: { + language: 'text/fhirpath', + expression: + "$this is Patient and %resource.entry.first().resource is Patient and (today() - 60 'months') <= $this.birthDate", }, }, - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationAdministration/1001831', - resource: { - resourceType: 'MedicationAdministration', - id: '1001831', - meta: { - versionId: '1', - lastUpdated: '2021-01-28T04:21:14.376-05:00', - }, - status: 'completed', - medicationCodeableConcept: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/ndc', - code: '0069-2587-10', - display: 'Vancomycin Hydrochloride (VANCOMYCIN HYDROCHLORIDE)', - }, - ], - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectivePeriod: { - start: '2020-01-06T10:20:00.000+00:00', - end: '2020-01-06T11:20:00.000+00:00', - }, - dosage: { - route: { + ], + participant: [ + { + type: 'practitioner', + role: { coding: [ { - system: 'http://snomed.info/sct', - code: '255560000', - display: 'Intravenous', + system: 'http://terminology.hl7.org/CodeSystem/practitioner-role', + code: 'nurse', + display: 'Nurse', }, ], }, - dose: { - value: 85, - unit: 'mg', - system: 'http://unitsofmeasure.org', - code: 'mg', - }, - rateRatio: { - numerator: { - value: 250, - unit: 'milliliter', - system: 'http://unitsofmeasure.org', - code: 'mL', - }, - denominator: { - value: 1, - unit: 'hour', - system: 'http://unitsofmeasure.org', - code: 'h', - }, - }, - }, - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532069', - resource: { - resourceType: 'MedicationStatement', - id: '532069', - meta: { - versionId: '1', - lastUpdated: '2020-10-04T12:56:46.039-04:00', - }, - basedOn: [ - { - reference: 'MedicationRequest/d24d8fab-a820-408b-9e17-68837772a812', - }, - ], - status: 'not-taken', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T16:56:46.342Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532068', - resource: { - resourceType: 'MedicationStatement', - id: '532068', - meta: { - versionId: '1', - lastUpdated: '2020-10-04T12:56:30.851-04:00', - }, - basedOn: [ - { - reference: 'MedicationRequest/78617adf-bd86-4e79-8843-56a4c49ec6a6', - }, - ], - status: 'not-taken', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T16:56:31.068Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532007', - resource: { - resourceType: 'MedicationStatement', - id: '532007', - meta: { - versionId: '1', - lastUpdated: '2020-10-03T21:58:44.537-04:00', - }, - basedOn: [ - { - reference: 'MedicationRequest/78617adf-bd86-4e79-8843-56a4c49ec6a6', - }, - ], - status: 'not-taken', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T01:58:45.596Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532006', - resource: { - resourceType: 'MedicationStatement', - id: '532006', - meta: { - versionId: '1', - lastUpdated: '2020-10-03T21:54:34.912-04:00', - }, - basedOn: [ - { - reference: 'MedicationRequest/78617adf-bd86-4e79-8843-56a4c49ec6a6', - }, - ], - status: 'not-taken', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T01:54:35.977Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532005', - resource: { - resourceType: 'MedicationStatement', - id: '532005', - meta: { - versionId: '1', - lastUpdated: '2020-10-03T21:51:46.959-04:00', }, - basedOn: [ + ], + type: { + coding: [ { - reference: 'MedicationRequest/d24d8fab-a820-408b-9e17-68837772a812', - }, - ], - status: 'completed', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T01:51:48.015Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/MedicationStatement/532004', - resource: { - resourceType: 'MedicationStatement', - id: '532004', - meta: { - versionId: '1', - lastUpdated: '2020-10-03T21:51:16.264-04:00', - }, - basedOn: [ - { - reference: 'MedicationRequest/78617adf-bd86-4e79-8843-56a4c49ec6a6', - }, - ], - status: 'completed', - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - effectiveDateTime: '2020-10-02', - dateAsserted: '2020-10-04T01:51:17.316Z', - }, - search: { - mode: 'match', - }, - response: { - status: '201 Created', - etag: 'W/"1"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/ad44b2f9-bab2-48b8-82ba-b2741eb352da', - resource: { - resourceType: 'DiagnosticReport', - id: 'ad44b2f9-bab2-48b8-82ba-b2741eb352da', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:18.047-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/0cde3d77-7a59-4009-a6b8-cb89f9492062', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/eded4c6d-b6b3-4a8e-bc2d-6f3b431b7285', - display: 'Triglycerides', - }, - { - reference: 'Observation/ec1fc581-8c2a-43f7-afb4-27a7d059d502', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/7ef1e28c-8cf2-4da6-959f-50ad66f93354', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/0cde3d77-7a59-4009-a6b8-cb89f9492062', - resource: { - resourceType: 'Observation', - id: '0cde3d77-7a59-4009-a6b8-cb89f9492062', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:17.976-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2093-3', - display: 'Total Cholesterol', - }, - ], - text: 'Total Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 245.88529282542925, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/fde7e697-8b59-42e4-b938-2b1806adf551', - resource: { - resourceType: 'DiagnosticReport', - id: 'fde7e697-8b59-42e4-b938-2b1806adf551', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:17.359-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/3583b2d8-f0ac-432c-8992-13b8046d4984', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/ae5f141e-cbbb-4ef0-9249-058ed755f97c', - display: 'Triglycerides', - }, - { - reference: 'Observation/1bc6ba6d-4956-4e01-8c46-f0e0be7982eb', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/a11a14a4-1e51-4d64-b258-a7f9f3d430f1', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Condition/e5bc1eb8-d650-46b1-998f-57a154d524c8', - resource: { - resourceType: 'Condition', - id: 'e5bc1eb8-d650-46b1-998f-57a154d524c8', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:13.312-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - clinicalStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-clinical', - code: 'resolved', - }, - ], - }, - verificationStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-ver-status', - code: 'confirmed', - }, - ], - }, - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '195662009', - display: 'Acute viral pharyngitis (disorder)', - }, - ], - text: 'Acute viral pharyngitis (disorder)', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b68047e8-bb41-4518-8043-1e15b87d87b6', - }, - onsetDateTime: '2017-09-03T15:22:39-04:00', - abatementDateTime: '2017-09-10T15:22:39-04:00', - recordedDate: '2017-09-03T15:22:39-04:00', - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ada5188e-dfae-4151-a466-c3c0df6d6bb9', - resource: { - resourceType: 'Observation', - id: 'ada5188e-dfae-4151-a466-c3c0df6d6bb9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:12.482-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Estimated Glomerular Filtration Rate', - }, - ], - text: 'Estimated Glomerular Filtration Rate', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 149.12281404025936, - unit: 'mL/min/{1.73_m2}', - system: 'http://unitsofmeasure.org', - code: 'mL/min/{1.73_m2}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/62d403b0-8599-496c-94cc-39e64effc19e', - resource: { - resourceType: 'Observation', - id: '62d403b0-8599-496c-94cc-39e64effc19e', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:08.671-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '55284-4', - display: 'Blood Pressure', - }, - ], - text: 'Blood Pressure', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - component: [ - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8462-4', - display: 'Diastolic Blood Pressure', - }, - ], - text: 'Diastolic Blood Pressure', - }, - valueQuantity: { - value: 104.9230038408257, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8480-6', - display: 'Systolic Blood Pressure', - }, - ], - text: 'Systolic Blood Pressure', - }, - valueQuantity: { - value: 188.0459341209521, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3e507955-fc9e-43cf-b1a0-3024a31c95fc', - resource: { - resourceType: 'Observation', - id: '3e507955-fc9e-43cf-b1a0-3024a31c95fc', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:08.624-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8302-2', - display: 'Body Height', - }, - ], - text: 'Body Height', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 183.1482561587424, - unit: 'cm', - system: 'http://unitsofmeasure.org', - code: 'cm', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Immunization/9ff07db0-09c3-4404-8f05-123464cb13ec', - resource: { - resourceType: 'Immunization', - id: '9ff07db0-09c3-4404-8f05-123464cb13ec', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:01.835-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'completed', - vaccineCode: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/cvx', - code: '140', - display: 'Influenza, seasonal, injectable, preservative free', - }, - ], - text: 'Influenza, seasonal, injectable, preservative free', - }, - patient: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - occurrenceDateTime: '2012-04-02T15:22:39-04:00', - primarySource: true, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Immunization/80b18d95-1438-4f3b-a4b6-3dcfedea58cd', - resource: { - resourceType: 'Immunization', - id: '80b18d95-1438-4f3b-a4b6-3dcfedea58cd', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T03:00:00.011-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'completed', - vaccineCode: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/cvx', - code: '140', - display: 'Influenza, seasonal, injectable, preservative free', - }, - ], - text: 'Influenza, seasonal, injectable, preservative free', - }, - patient: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - occurrenceDateTime: '2016-04-11T15:22:39-04:00', - primarySource: true, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6bf21078-2f41-45f4-89a0-9dd038737ca5', - resource: { - resourceType: 'Observation', - id: '6bf21078-2f41-45f4-89a0-9dd038737ca5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:53.484-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4548-4', - display: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - ], - text: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 6.12076833716011, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/78617adf-bd86-4e79-8843-56a4c49ec6a6', - resource: { - resourceType: 'MedicationRequest', - id: '78617adf-bd86-4e79-8843-56a4c49ec6a6', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:52.191-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'active', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - authoredOn: '2019-04-22T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/f66d45cf-ac3e-4685-b63e-ef3ee7ceaa2b', - resource: { - resourceType: 'DiagnosticReport', - id: 'f66d45cf-ac3e-4685-b63e-ef3ee7ceaa2b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:43.256-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '51990-0', - display: 'Basic Metabolic Panel', - }, - ], - text: 'Basic Metabolic Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/c6fa3d21-a45d-4f40-a765-ac0fc8939d2f', - display: 'Glucose', - }, - { - reference: 'Observation/8c774224-5169-4093-80b9-1d3f79d8771f', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/9bb77d5d-f50e-41e8-af18-47242b74fc28', - display: 'Creatinine', - }, - { - reference: 'Observation/2f523014-c587-4354-9418-dc5b0f407773', - display: 'Calcium', - }, - { - reference: 'Observation/d91149ab-9ab9-4284-9c6c-367a8f9fedad', - display: 'Sodium', - }, - { - reference: 'Observation/64fff44c-a59b-42cc-9c68-5be3c4bbb0f5', - display: 'Potassium', - }, - { - reference: 'Observation/09490d54-d7b2-47f8-8494-523d20573642', - display: 'Chloride', - }, - { - reference: 'Observation/f5a31d4b-eb75-486e-9f7e-2dca2f87e00f', - display: 'Carbon Dioxide', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/d24d8fab-a820-408b-9e17-68837772a812', - resource: { - resourceType: 'MedicationRequest', - id: 'd24d8fab-a820-408b-9e17-68837772a812', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:42.114-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'active', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316049', - display: 'Hydrochlorothiazide 25 MG', - }, - ], - text: 'Hydrochlorothiazide 25 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/7bf16bee-41c9-4f7d-8158-6f585c0c8fe4', - }, - authoredOn: '1988-11-21T14:22:39-05:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/f887712b-8e59-40bb-8ad4-7dad21dcaf94', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/70925566-b7df-478e-924e-39c2ad45e3c1', - resource: { - resourceType: 'Observation', - id: '70925566-b7df-478e-924e-39c2ad45e3c1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:39.970-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4548-4', - display: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - ], - text: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 5.953024256952019, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/d0c3b1f7-06da-4c60-a8bd-af2b30e86b42', - resource: { - resourceType: 'DiagnosticReport', - id: 'd0c3b1f7-06da-4c60-a8bd-af2b30e86b42', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:39.209-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/6523b5dc-78a4-435f-a9fa-ab219cecf089', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/dff9300a-f4b5-475c-96b6-fae02b30a990', - display: 'Triglycerides', - }, - { - reference: 'Observation/1c834601-b4e4-4789-89cb-366833abf50f', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/d4c08861-7d16-4e79-bf54-1a32496f8479', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/2f523014-c587-4354-9418-dc5b0f407773', - resource: { - resourceType: 'Observation', - id: '2f523014-c587-4354-9418-dc5b0f407773', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:35.395-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 8.95912914794503, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/cb626629-2baa-4527-9ad6-2df6d5a56f1d', - resource: { - resourceType: 'Observation', - id: 'cb626629-2baa-4527-9ad6-2df6d5a56f1d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:34.727-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72514-3', - display: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - ], - text: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 0.4569376900718085, - unit: '{score}', - system: 'http://unitsofmeasure.org', - code: '{score}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3c3b0238-18c3-4b16-ac64-650f48408069', - resource: { - resourceType: 'Observation', - id: '3c3b0238-18c3-4b16-ac64-650f48408069', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:34.489-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8302-2', - display: 'Body Height', - }, - ], - text: 'Body Height', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 183.1482561587424, - unit: 'cm', - system: 'http://unitsofmeasure.org', - code: 'cm', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Immunization/a5958193-a13e-404c-852c-9b0980d12edc', - resource: { - resourceType: 'Immunization', - id: 'a5958193-a13e-404c-852c-9b0980d12edc', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:32.082-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'completed', - vaccineCode: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/cvx', - code: '140', - display: 'Influenza, seasonal, injectable, preservative free', - }, - ], - text: 'Influenza, seasonal, injectable, preservative free', - }, - patient: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - occurrenceDateTime: '2010-03-29T15:22:39-04:00', - primarySource: true, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/939fe2fb-0a67-4ffd-a7c6-6c6f79f7cfcc', - resource: { - resourceType: 'Observation', - id: '939fe2fb-0a67-4ffd-a7c6-6c6f79f7cfcc', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:29.964-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '39156-5', - display: 'Body Mass Index', - }, - ], - text: 'Body Mass Index', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 30.33696193599302, - unit: 'kg/m2', - system: 'http://unitsofmeasure.org', - code: 'kg/m2', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6d3ecde4-e4de-48a1-8ba0-205d5de1d872', - resource: { - resourceType: 'Observation', - id: '6d3ecde4-e4de-48a1-8ba0-205d5de1d872', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:27.053-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '55284-4', - display: 'Blood Pressure', - }, - ], - text: 'Blood Pressure', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - component: [ - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8462-4', - display: 'Diastolic Blood Pressure', - }, - ], - text: 'Diastolic Blood Pressure', - }, - valueQuantity: { - value: 112.18662892424523, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8480-6', - display: 'Systolic Blood Pressure', - }, - ], - text: 'Systolic Blood Pressure', - }, - valueQuantity: { - value: 179.86394384340326, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/64fab1f1-8cf8-424d-99ad-7f067272490b', - resource: { - resourceType: 'Observation', - id: '64fab1f1-8cf8-424d-99ad-7f067272490b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:21.148-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Estimated Glomerular Filtration Rate', - }, - ], - text: 'Estimated Glomerular Filtration Rate', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 145.29719640901152, - unit: 'mL/min/{1.73_m2}', - system: 'http://unitsofmeasure.org', - code: 'mL/min/{1.73_m2}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Immunization/13e6e612-4be8-4e1e-b1c1-8718ffb38bc2', - resource: { - resourceType: 'Immunization', - id: '13e6e612-4be8-4e1e-b1c1-8718ffb38bc2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:16.333-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'completed', - vaccineCode: { - coding: [ - { - system: 'http://hl7.org/fhir/sid/cvx', - code: '52', - display: 'Hep A, adult', - }, - ], - text: 'Hep A, adult', - }, - patient: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - occurrenceDateTime: '2012-04-02T15:22:39-04:00', - primarySource: true, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/56fdca69-945a-46d4-8285-ea6c5ae6b273', - resource: { - resourceType: 'MedicationRequest', - id: '56fdca69-945a-46d4-8285-ea6c5ae6b273', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:14.238-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/0f3ce076-28b2-4145-bd58-b9c0fcb800fc', - }, - authoredOn: '2015-04-23T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/a92b6d91-aae0-4ebb-bd41-d2de7e5544a0', - resource: { - resourceType: 'DiagnosticReport', - id: 'a92b6d91-aae0-4ebb-bd41-d2de7e5544a0', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.464-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/f36fcbe8-b291-4c7f-895a-5006399bc030', - display: 'Glucose', - }, - { - reference: 'Observation/d747dcdc-f326-4fd2-b38d-d9a5098c733d', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/faf980c9-42c3-4707-a58d-5e9ddd69cd7d', - display: 'Creatinine', - }, - { - reference: 'Observation/75a4aeaa-3b02-4131-b111-e037daa7956a', - display: 'Calcium', - }, - { - reference: 'Observation/6a2e4281-897e-4200-b1bf-87c38b7d9fc4', - display: 'Sodium', - }, - { - reference: 'Observation/417a133e-58a5-4761-a871-1753898d5352', - display: 'Potassium', - }, - { - reference: 'Observation/39b6c8ba-5a4e-4ec7-bdc6-93c55ed204d9', - display: 'Chloride', - }, - { - reference: 'Observation/75e80d99-3528-4a59-8d03-91037c961f30', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/dc15f1dc-f045-441a-84ba-e12c8f35bd18', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/862c646b-ca72-458a-85bb-dac9d56d14e1', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/b5e4dea7-7863-4920-9436-dc047850f907', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/de7960a7-d007-4c5a-96ab-8f2a4183e7b4', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/4447c991-cd57-4228-802e-0b4155f3ec39', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/b099855e-775b-452e-b327-c7e49b39a584', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/c280525c-2862-4702-8d57-f4d1f6e14239', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/44f55fd5-047f-4749-8a2e-82ee9fbc7423', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/c280525c-2862-4702-8d57-f4d1f6e14239', - resource: { - resourceType: 'Observation', - id: 'c280525c-2862-4702-8d57-f4d1f6e14239', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.409-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1742-6', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 39.78038571856473, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/4447c991-cd57-4228-802e-0b4155f3ec39', - resource: { - resourceType: 'Observation', - id: '4447c991-cd57-4228-802e-0b4155f3ec39', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.367-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 0.47675641120434653, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/862c646b-ca72-458a-85bb-dac9d56d14e1', - resource: { - resourceType: 'Observation', - id: '862c646b-ca72-458a-85bb-dac9d56d14e1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.308-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 64.56939473747035, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dc15f1dc-f045-441a-84ba-e12c8f35bd18', - resource: { - resourceType: 'Observation', - id: 'dc15f1dc-f045-441a-84ba-e12c8f35bd18', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.263-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - ], - text: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 79.29715580575159, - unit: 'mL/min', - system: 'http://unitsofmeasure.org', - code: 'mL/min', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/39b6c8ba-5a4e-4ec7-bdc6-93c55ed204d9', - resource: { - resourceType: 'Observation', - id: '39b6c8ba-5a4e-4ec7-bdc6-93c55ed204d9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:13.214-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 109.10635938348886, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f714d42c-1325-4038-bb20-2af748999f45', - resource: { - resourceType: 'Observation', - id: 'f714d42c-1325-4038-bb20-2af748999f45', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:10.721-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72514-3', - display: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - ], - text: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 1.927684074194004, - unit: '{score}', - system: 'http://unitsofmeasure.org', - code: '{score}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/ac4322f9-32a2-4a54-bfb8-7a774957b2f7', - resource: { - resourceType: 'DiagnosticReport', - id: 'ac4322f9-32a2-4a54-bfb8-7a774957b2f7', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:06.040-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '58410-2', - display: 'Complete blood count (hemogram) panel - Blood by Automated count', - }, - ], - text: 'Complete blood count (hemogram) panel - Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/d8aa21ee-2660-49f0-adb8-2a8d9d98ab68', - display: 'Leukocytes [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/ab0b9b2a-cfbb-4913-a3ff-d44f92838ff1', - display: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/2adc2642-792c-47a4-9411-ca12e9a51b41', - display: 'Hemoglobin [Mass/volume] in Blood', - }, - { - reference: 'Observation/e888715d-fd24-4db7-9a25-16a538a050cb', - display: 'Hematocrit [Volume Fraction] of Blood by Automated count', - }, - { - reference: 'Observation/eaa3a593-9ff9-4f79-b38b-878d45fd92b7', - display: 'MCV [Entitic volume] by Automated count', - }, - { - reference: 'Observation/1386d3f4-3902-49c2-998e-b607541eea24', - display: 'MCH [Entitic mass] by Automated count', - }, - { - reference: 'Observation/d49404ac-7cfc-452a-b237-beae1ece0167', - display: 'MCHC [Mass/volume] by Automated count', - }, - { - reference: 'Observation/5497d5c8-3d6c-4f8c-9247-5565eda7a830', - display: 'Erythrocyte distribution width [Entitic volume] by Automated count', - }, - { - reference: 'Observation/f7c3586c-cebd-4a7e-91ec-d66d16ed1b03', - display: 'Platelets [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/3ee0ffe4-de6c-4736-811b-7eec113270f0', - display: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - { - reference: 'Observation/65433437-5961-4c4b-9568-d9ffb0777c78', - display: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f7c3586c-cebd-4a7e-91ec-d66d16ed1b03', - resource: { - resourceType: 'Observation', - id: 'f7c3586c-cebd-4a7e-91ec-d66d16ed1b03', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:05.979-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '777-3', - display: 'Platelets [#/volume] in Blood by Automated count', - }, - ], - text: 'Platelets [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 348.06141290055785, - unit: '10*3/uL', - system: 'http://unitsofmeasure.org', - code: '10*3/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d49404ac-7cfc-452a-b237-beae1ece0167', - resource: { - resourceType: 'Observation', - id: 'd49404ac-7cfc-452a-b237-beae1ece0167', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:05.909-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '786-4', - display: 'MCHC [Mass/volume] by Automated count', - }, - ], - text: 'MCHC [Mass/volume] by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 34.78324019470253, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/eaa3a593-9ff9-4f79-b38b-878d45fd92b7', - resource: { - resourceType: 'Observation', - id: 'eaa3a593-9ff9-4f79-b38b-878d45fd92b7', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:05.857-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '787-2', - display: 'MCV [Entitic volume] by Automated count', - }, - ], - text: 'MCV [Entitic volume] by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 82.78903648235892, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/44f55fd5-047f-4749-8a2e-82ee9fbc7423', - resource: { - resourceType: 'Observation', - id: '44f55fd5-047f-4749-8a2e-82ee9fbc7423', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:05.405-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 12.626246208666572, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9e8fcede-ede7-41de-9313-e3309fba4cad', - resource: { - resourceType: 'Observation', - id: '9e8fcede-ede7-41de-9313-e3309fba4cad', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:48.476-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4548-4', - display: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - ], - text: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 5.993259280931356, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ab0b9b2a-cfbb-4913-a3ff-d44f92838ff1', - resource: { - resourceType: 'Observation', - id: 'ab0b9b2a-cfbb-4913-a3ff-d44f92838ff1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:57.211-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '789-8', - display: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - ], - text: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 4.661198822051887, - unit: '10*6/uL', - system: 'http://unitsofmeasure.org', - code: '10*6/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/0d45dc0f-32c0-4b67-9c8a-22a4d40337f4', - resource: { - resourceType: 'DiagnosticReport', - id: '0d45dc0f-32c0-4b67-9c8a-22a4d40337f4', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:55.094-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/94aa750b-4971-454c-b333-00bd01caea12', - display: 'Glucose', - }, - { - reference: 'Observation/62332d51-1339-478e-908b-0240152878c6', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/dd205ca5-4ad6-499b-8c29-e5fa3198bf04', - display: 'Creatinine', - }, - { - reference: 'Observation/897a36dd-9d6f-4b0c-9445-da555c96ccfa', - display: 'Calcium', - }, - { - reference: 'Observation/dd1ff677-f66a-42ae-9a7b-85073df669ad', - display: 'Sodium', - }, - { - reference: 'Observation/733c9c6f-0a95-4706-bc12-a13c4d5d5675', - display: 'Potassium', - }, - { - reference: 'Observation/4bd88b95-29e7-432d-bd6c-a5494246e97d', - display: 'Chloride', - }, - { - reference: 'Observation/93a25c51-15a9-45b1-9beb-1b80dcf561a1', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/5771d98e-047e-4528-8bba-94ba35d330a9', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/d44b61d6-d249-40aa-b75b-c99a456656c7', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/9acedf0e-703e-4e8d-8e78-a2d1b6de31ec', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/daf6f078-2784-4d4d-940f-c58bce186db7', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/1d15ae37-7a02-4837-a342-a16edd7d3628', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/4ec735b2-74ad-4245-b15f-3019b50f3f7e', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/c3aaaa08-153c-4dc5-bb11-7aef8e8004c9', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/96492681-2309-494b-bdde-d726ab814f38', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/96492681-2309-494b-bdde-d726ab814f38', - resource: { - resourceType: 'Observation', - id: '96492681-2309-494b-bdde-d726ab814f38', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:55.053-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 37.31300170902762, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dd205ca5-4ad6-499b-8c29-e5fa3198bf04', - resource: { - resourceType: 'Observation', - id: 'dd205ca5-4ad6-499b-8c29-e5fa3198bf04', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:45.132-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 3.2838675266388093, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a11a14a4-1e51-4d64-b258-a7f9f3d430f1', - resource: { - resourceType: 'Observation', - id: 'a11a14a4-1e51-4d64-b258-a7f9f3d430f1', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:44.942-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 68.20918023794906, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/79430705-78f4-442d-9484-97baa1519b91', - resource: { - resourceType: 'Observation', - id: '79430705-78f4-442d-9484-97baa1519b91', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:53.927-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'survey', - display: 'survey', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72166-2', - display: 'Tobacco smoking status NHIS', - }, - ], - text: 'Tobacco smoking status NHIS', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueCodeableConcept: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '266919005', - display: 'Never smoker', - }, - ], - text: 'Never smoker', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d91149ab-9ab9-4284-9c6c-367a8f9fedad', - resource: { - resourceType: 'Observation', - id: 'd91149ab-9ab9-4284-9c6c-367a8f9fedad', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:47.234-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 141.47796350780695, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/7ef1e28c-8cf2-4da6-959f-50ad66f93354', - resource: { - resourceType: 'Observation', - id: '7ef1e28c-8cf2-4da6-959f-50ad66f93354', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:43.264-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 21.32890812855149, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/70301e88-0421-4192-8eb1-92dcab243067', - resource: { - resourceType: 'MedicationRequest', - id: '70301e88-0421-4192-8eb1-92dcab243067', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:42.856-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/48468d2d-eaa5-4bd0-9f25-9ab1a855a356', - }, - authoredOn: '2012-04-23T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3583b2d8-f0ac-432c-8992-13b8046d4984', - resource: { - resourceType: 'Observation', - id: '3583b2d8-f0ac-432c-8992-13b8046d4984', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:39.432-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2093-3', - display: 'Total Cholesterol', - }, - ], - text: 'Total Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 171.22085735783696, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/4e7b69a1-affb-4673-aad6-37371c863b3b', - resource: { - resourceType: 'DiagnosticReport', - id: '4e7b69a1-affb-4673-aad6-37371c863b3b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:40.626-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '51990-0', - display: 'Basic Metabolic Panel', - }, - ], - text: 'Basic Metabolic Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/f2bfaf56-5083-4ea3-8c2b-bbfaab531eaf', - display: 'Glucose', - }, - { - reference: 'Observation/a3383a55-f132-4f1d-9189-5bdb29b63374', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/c880113b-30d8-47cb-8660-bbe541b78f5b', - display: 'Creatinine', - }, - { - reference: 'Observation/7c4363f0-8b5d-4af7-88be-2e981cc70782', - display: 'Calcium', - }, - { - reference: 'Observation/7469a435-a7bb-45d5-9894-4f1b4f9b1272', - display: 'Sodium', - }, - { - reference: 'Observation/d518b54e-927c-45eb-8abd-8e74fb3c2a84', - display: 'Potassium', - }, - { - reference: 'Observation/e3bcb3fb-21ed-4602-aa49-602cfd8618f7', - display: 'Chloride', - }, - { - reference: 'Observation/1749af04-c036-49e4-b9c1-b5d84154df5c', - display: 'Carbon Dioxide', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1749af04-c036-49e4-b9c1-b5d84154df5c', - resource: { - resourceType: 'Observation', - id: '1749af04-c036-49e4-b9c1-b5d84154df5c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:40.576-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 21.181274201678814, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d518b54e-927c-45eb-8abd-8e74fb3c2a84', - resource: { - resourceType: 'Observation', - id: 'd518b54e-927c-45eb-8abd-8e74fb3c2a84', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:40.142-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 3.711835947173312, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a3383a55-f132-4f1d-9189-5bdb29b63374', - resource: { - resourceType: 'Observation', - id: 'a3383a55-f132-4f1d-9189-5bdb29b63374', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:40.091-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 13.953249709200275, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f2bfaf56-5083-4ea3-8c2b-bbfaab531eaf', - resource: { - resourceType: 'Observation', - id: 'f2bfaf56-5083-4ea3-8c2b-bbfaab531eaf', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:40.019-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 66.15560025257133, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/cbc43f92-6ce9-4c65-846a-d61fcd810dfd', - resource: { - resourceType: 'DiagnosticReport', - id: 'cbc43f92-6ce9-4c65-846a-d61fcd810dfd', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.999-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '51990-0', - display: 'Basic Metabolic Panel', - }, - ], - text: 'Basic Metabolic Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/e3866e8e-e426-4f1f-a3ea-b57fa7205150', - display: 'Glucose', - }, - { - reference: 'Observation/78a0ace0-5e41-4247-ae5e-c1635b615f43', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/a5d6d106-51a3-4aec-b4d8-9e428729e6f9', - display: 'Creatinine', - }, - { - reference: 'Observation/8c15ca15-0d70-462d-a9af-79d5074b9752', - display: 'Calcium', - }, - { - reference: 'Observation/06b5a44a-b641-4058-96c0-e79cb15ea592', - display: 'Sodium', - }, - { - reference: 'Observation/9610a7fe-179e-42b1-95a4-8e3c68d0a2fd', - display: 'Potassium', - }, - { - reference: 'Observation/95ad4829-b6dd-4a43-b561-00d60f79c233', - display: 'Chloride', - }, - { - reference: 'Observation/925b3d5d-46b1-45bb-a73e-1640dd0a8737', - display: 'Carbon Dioxide', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/95ad4829-b6dd-4a43-b561-00d60f79c233', - resource: { - resourceType: 'Observation', - id: '95ad4829-b6dd-4a43-b561-00d60f79c233', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.952-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 101.16098449499829, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9610a7fe-179e-42b1-95a4-8e3c68d0a2fd', - resource: { - resourceType: 'Observation', - id: '9610a7fe-179e-42b1-95a4-8e3c68d0a2fd', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.914-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 3.837840160593493, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a5d6d106-51a3-4aec-b4d8-9e428729e6f9', - resource: { - resourceType: 'Observation', - id: 'a5d6d106-51a3-4aec-b4d8-9e428729e6f9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.847-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 1.534360770414484, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/78a0ace0-5e41-4247-ae5e-c1635b615f43', - resource: { - resourceType: 'Observation', - id: '78a0ace0-5e41-4247-ae5e-c1635b615f43', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.780-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 18.58958724410082, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/e3866e8e-e426-4f1f-a3ea-b57fa7205150', - resource: { - resourceType: 'Observation', - id: 'e3866e8e-e426-4f1f-a3ea-b57fa7205150', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.714-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 74.8864000753905, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/daf6f078-2784-4d4d-940f-c58bce186db7', - resource: { - resourceType: 'Observation', - id: 'daf6f078-2784-4d4d-940f-c58bce186db7', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:38.285-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '10834-0', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - ], - text: 'Globulin [Mass/volume] in Serum by calculation', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 2.0888003506979382, - unit: 'g/L', - system: 'http://unitsofmeasure.org', - code: 'g/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d747dcdc-f326-4fd2-b38d-d9a5098c733d', - resource: { - resourceType: 'Observation', - id: 'd747dcdc-f326-4fd2-b38d-d9a5098c733d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:37.997-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 13.313970751285392, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d44b61d6-d249-40aa-b75b-c99a456656c7', - resource: { - resourceType: 'Observation', - id: 'd44b61d6-d249-40aa-b75b-c99a456656c7', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:34.580-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 68.72088764462899, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/538105eb-e8c7-4265-928c-b9e586bf9890', - resource: { - resourceType: 'DiagnosticReport', - id: '538105eb-e8c7-4265-928c-b9e586bf9890', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.431-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/61b23213-2c3d-4953-959e-da3e63400c5c', - display: 'Glucose', - }, - { - reference: 'Observation/940efc91-a75b-42b0-9f5c-b4babab848d5', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/9f09cd18-fddb-41b8-bb4b-e348ee893873', - display: 'Creatinine', - }, - { - reference: 'Observation/8b10f0fa-1546-42a4-b706-2c0d4f1c569c', - display: 'Calcium', - }, - { - reference: 'Observation/3832765e-c1cf-4b3a-ba15-c02eec3714ef', - display: 'Sodium', - }, - { - reference: 'Observation/4b3ae1c1-3ac4-44ce-8089-8f33705f20b9', - display: 'Potassium', - }, - { - reference: 'Observation/f4c2ad2e-fad0-4799-8cad-7c6880ac211b', - display: 'Chloride', - }, - { - reference: 'Observation/66add3e0-fac1-44bc-9ef3-8ff1289f62fe', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/cae3a503-f70b-4f84-b64f-8ef28226c3d5', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/1f2e46ec-91d8-4c33-9f97-a340181a4862', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/ad91a5ed-f511-407e-a7ec-0eeb3956af31', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/b8fd995b-985d-48c9-95c2-ab850eca0557', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/7582c568-cd34-48c2-8b88-aed72b0690fa', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/00483077-c46a-4987-8e8e-63b793a73db4', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/bee90ed8-8868-4646-8912-7fc1c3a287be', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/9dd7b28c-bb83-4146-bbe7-2a0192186845', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/7582c568-cd34-48c2-8b88-aed72b0690fa', - resource: { - resourceType: 'Observation', - id: '7582c568-cd34-48c2-8b88-aed72b0690fa', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.367-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 1.1769878853417828, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ad91a5ed-f511-407e-a7ec-0eeb3956af31', - resource: { - resourceType: 'Observation', - id: 'ad91a5ed-f511-407e-a7ec-0eeb3956af31', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.323-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 4.8605094183647655, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/cae3a503-f70b-4f84-b64f-8ef28226c3d5', - resource: { - resourceType: 'Observation', - id: 'cae3a503-f70b-4f84-b64f-8ef28226c3d5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.280-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - ], - text: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 80.48934873059105, - unit: 'mL/min', - system: 'http://unitsofmeasure.org', - code: 'mL/min', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/66add3e0-fac1-44bc-9ef3-8ff1289f62fe', - resource: { - resourceType: 'Observation', - id: '66add3e0-fac1-44bc-9ef3-8ff1289f62fe', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.227-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 22.96191335421999, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f4c2ad2e-fad0-4799-8cad-7c6880ac211b', - resource: { - resourceType: 'Observation', - id: 'f4c2ad2e-fad0-4799-8cad-7c6880ac211b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.184-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 106.70048745496676, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3832765e-c1cf-4b3a-ba15-c02eec3714ef', - resource: { - resourceType: 'Observation', - id: '3832765e-c1cf-4b3a-ba15-c02eec3714ef', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.116-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 138.06445009919386, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/8b10f0fa-1546-42a4-b706-2c0d4f1c569c', - resource: { - resourceType: 'Observation', - id: '8b10f0fa-1546-42a4-b706-2c0d4f1c569c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.058-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 9.910729792215022, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/940efc91-a75b-42b0-9f5c-b4babab848d5', - resource: { - resourceType: 'Observation', - id: '940efc91-a75b-42b0-9f5c-b4babab848d5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:33.006-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 17.03406650115662, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/61b23213-2c3d-4953-959e-da3e63400c5c', - resource: { - resourceType: 'Observation', - id: '61b23213-2c3d-4953-959e-da3e63400c5c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:32.949-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 95.63540614641622, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/8c774224-5169-4093-80b9-1d3f79d8771f', - resource: { - resourceType: 'Observation', - id: '8c774224-5169-4093-80b9-1d3f79d8771f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:32.525-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 9.352135865653587, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/06b5a44a-b641-4058-96c0-e79cb15ea592', - resource: { - resourceType: 'Observation', - id: '06b5a44a-b641-4058-96c0-e79cb15ea592', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:30.463-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 142.73139244944326, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/75e80d99-3528-4a59-8d03-91037c961f30', - resource: { - resourceType: 'Observation', - id: '75e80d99-3528-4a59-8d03-91037c961f30', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:29.940-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 20.435853158978393, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/93a25c51-15a9-45b1-9beb-1b80dcf561a1', - resource: { - resourceType: 'Observation', - id: '93a25c51-15a9-45b1-9beb-1b80dcf561a1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:27.964-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 28.848366408075638, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/e934d694-925d-4de1-88f3-7a3d27dd3590', - resource: { - resourceType: 'DiagnosticReport', - id: 'e934d694-925d-4de1-88f3-7a3d27dd3590', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:26.729-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/6fe394d5-4a69-43ef-8c58-92be66dfd233', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/771c7d5e-8d22-4c1b-b981-c74f910bb6b8', - display: 'Triglycerides', - }, - { - reference: 'Observation/989f901f-2b0f-4746-90fd-a500e0193975', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/ea7693ce-5e71-4182-9bc6-58fb0ad4969d', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ea7693ce-5e71-4182-9bc6-58fb0ad4969d', - resource: { - resourceType: 'Observation', - id: 'ea7693ce-5e71-4182-9bc6-58fb0ad4969d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:26.680-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 67.29739155681911, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/eded4c6d-b6b3-4a8e-bc2d-6f3b431b7285', - resource: { - resourceType: 'Observation', - id: 'eded4c6d-b6b3-4a8e-bc2d-6f3b431b7285', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:23.666-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 352.11013922647925, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dd1ff677-f66a-42ae-9a7b-85073df669ad', - resource: { - resourceType: 'Observation', - id: 'dd1ff677-f66a-42ae-9a7b-85073df669ad', - meta: { - versionId: '10', - lastUpdated: '2020-11-25T02:04:20.964-05:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 141.36439150277164, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"10"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/e4c554d4-a9e9-4cfc-aa47-a900fe4045cb', - resource: { - resourceType: 'MedicationRequest', - id: 'e4c554d4-a9e9-4cfc-aa47-a900fe4045cb', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:17.575-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - authoredOn: '2016-04-22T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/ebf6e880-1223-4958-9a35-53a92321e14a', - resource: { - resourceType: 'DiagnosticReport', - id: 'ebf6e880-1223-4958-9a35-53a92321e14a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:11.154-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/7fcc6d3d-8aa9-4d78-b2e0-edf39fe0519b', - display: 'Glucose', - }, - { - reference: 'Observation/6cb0e1af-6795-4ee6-9e02-f1ee4071e021', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/3378c91c-d5c5-4f3c-ad28-d4599dd5550d', - display: 'Creatinine', - }, - { - reference: 'Observation/e101b6fd-62e9-44cf-92eb-09db75b425fd', - display: 'Calcium', - }, - { - reference: 'Observation/392e42af-e5d7-426f-b686-67844082f713', - display: 'Sodium', - }, - { - reference: 'Observation/1d7b807c-53cd-4f90-8300-6540f7b5ab7c', - display: 'Potassium', - }, - { - reference: 'Observation/9e0f7018-79d2-4578-9528-c9f514ee3ae5', - display: 'Chloride', - }, - { - reference: 'Observation/dd532410-940f-43c9-81d2-e894d1b27b53', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/b109f598-b342-4b43-b3f8-0835906a4abc', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/fb2c7da0-b28c-4088-9652-a7f4dab64c31', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/5a56a89a-0ac3-4889-8dbd-d754add11a1f', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/156792a4-be04-4a4c-a1e4-5695238deaec', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/bec7f022-a8c0-40a5-ab47-0fcb650e8dda', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/9177086a-2c06-457d-b368-97273815dc31', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/eafd71c9-d25f-4d62-8907-475627bd7998', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/bac01edd-c379-40b9-bcbb-d504dfe4a21a', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/bac01edd-c379-40b9-bcbb-d504dfe4a21a', - resource: { - resourceType: 'Observation', - id: 'bac01edd-c379-40b9-bcbb-d504dfe4a21a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:11.079-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 25.081169272795197, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/eafd71c9-d25f-4d62-8907-475627bd7998', - resource: { - resourceType: 'Observation', - id: 'eafd71c9-d25f-4d62-8907-475627bd7998', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:11.035-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1742-6', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 35.981521189846276, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/bec7f022-a8c0-40a5-ab47-0fcb650e8dda', - resource: { - resourceType: 'Observation', - id: 'bec7f022-a8c0-40a5-ab47-0fcb650e8dda', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.975-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 0.1802261048851232, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/fb2c7da0-b28c-4088-9652-a7f4dab64c31', - resource: { - resourceType: 'Observation', - id: 'fb2c7da0-b28c-4088-9652-a7f4dab64c31', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.929-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 75.64631811784174, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1d7b807c-53cd-4f90-8300-6540f7b5ab7c', - resource: { - resourceType: 'Observation', - id: '1d7b807c-53cd-4f90-8300-6540f7b5ab7c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.862-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 4.054018071026519, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/392e42af-e5d7-426f-b686-67844082f713', - resource: { - resourceType: 'Observation', - id: '392e42af-e5d7-426f-b686-67844082f713', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.791-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 140.2710185386248, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3378c91c-d5c5-4f3c-ad28-d4599dd5550d', - resource: { - resourceType: 'Observation', - id: '3378c91c-d5c5-4f3c-ad28-d4599dd5550d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.727-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 2.5968572208180754, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6cb0e1af-6795-4ee6-9e02-f1ee4071e021', - resource: { - resourceType: 'Observation', - id: '6cb0e1af-6795-4ee6-9e02-f1ee4071e021', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:10.675-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 18.25517809430083, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1d15ae37-7a02-4837-a342-a16edd7d3628', - resource: { - resourceType: 'Observation', - id: '1d15ae37-7a02-4837-a342-a16edd7d3628', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:05.111-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 0.3350785123080765, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/384887e0-839f-4fc7-8c93-49adef9b93bb', - resource: { - resourceType: 'DiagnosticReport', - id: '384887e0-839f-4fc7-8c93-49adef9b93bb', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:02.683-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/10bacaa3-027c-4508-a9f9-4b78944b2670', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/42cef465-c741-4cdd-ac8d-dbb9da98488c', - display: 'Triglycerides', - }, - { - reference: 'Observation/c158d264-e9a6-4b66-80dc-ed4eb84b0988', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/71891d7d-6d4a-4674-af0f-1bd57ae0ff3a', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/42cef465-c741-4cdd-ac8d-dbb9da98488c', - resource: { - resourceType: 'Observation', - id: '42cef465-c741-4cdd-ac8d-dbb9da98488c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:02.632-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 117.29478253527694, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/fbd0b730-900d-4a09-8bcd-072309f33203', - resource: { - resourceType: 'Observation', - id: 'fbd0b730-900d-4a09-8bcd-072309f33203', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:00.647-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Estimated Glomerular Filtration Rate', - }, - ], - text: 'Estimated Glomerular Filtration Rate', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 155.22927643886857, - unit: 'mL/min/{1.73_m2}', - system: 'http://unitsofmeasure.org', - code: 'mL/min/{1.73_m2}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9bb77d5d-f50e-41e8-af18-47242b74fc28', - resource: { - resourceType: 'Observation', - id: '9bb77d5d-f50e-41e8-af18-47242b74fc28', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:58.043-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 1.229975170820267, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ae5f141e-cbbb-4ef0-9249-058ed755f97c', - resource: { - resourceType: 'Observation', - id: 'ae5f141e-cbbb-4ef0-9249-058ed755f97c', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:19.026-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 169.15957175062374, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/2da77a4c-5f1b-4839-bf17-f9234a3db2a5', - resource: { - resourceType: 'MedicationRequest', - id: '2da77a4c-5f1b-4839-bf17-f9234a3db2a5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:50.297-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - authoredOn: '2017-04-22T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/318d7dac-9625-431e-8063-13df750351a2', - resource: { - resourceType: 'MedicationRequest', - id: '318d7dac-9625-431e-8063-13df750351a2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:48.662-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - authoredOn: '2014-04-23T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/82d5ed4d-ffed-47d3-a49d-e809d60dfe4c', - resource: { - resourceType: 'Observation', - id: '82d5ed4d-ffed-47d3-a49d-e809d60dfe4c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:48.613-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '39156-5', - display: 'Body Mass Index', - }, - ], - text: 'Body Mass Index', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 29.385651569862482, - unit: 'kg/m2', - system: 'http://unitsofmeasure.org', - code: 'kg/m2', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9acedf0e-703e-4e8d-8e78-a2d1b6de31ec', - resource: { - resourceType: 'Observation', - id: '9acedf0e-703e-4e8d-8e78-a2d1b6de31ec', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:47.908-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 4.830538262763859, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/925b3d5d-46b1-45bb-a73e-1640dd0a8737', - resource: { - resourceType: 'Observation', - id: '925b3d5d-46b1-45bb-a73e-1640dd0a8737', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:45.873-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 24.512895473938126, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/71891d7d-6d4a-4674-af0f-1bd57ae0ff3a', - resource: { - resourceType: 'Observation', - id: '71891d7d-6d4a-4674-af0f-1bd57ae0ff3a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:44.260-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 62.56354389664743, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/3b82e4c7-a4b2-46e3-8377-567300575cb0', - resource: { - resourceType: 'DiagnosticReport', - id: '3b82e4c7-a4b2-46e3-8377-567300575cb0', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:42.497-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/49ddb694-b6ca-4dd0-acfc-a100f26f1430', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/53a2f00c-21f0-41b0-93ca-81140642e12a', - display: 'Triglycerides', - }, - { - reference: 'Observation/9065fd4f-da9b-421e-87c4-4abd409c4e6c', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/dd33a87e-1288-4b3d-8a7f-f55839ad3967', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9065fd4f-da9b-421e-87c4-4abd409c4e6c', - resource: { - resourceType: 'Observation', - id: '9065fd4f-da9b-421e-87c4-4abd409c4e6c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:42.453-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 90.78192987041939, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/49ddb694-b6ca-4dd0-acfc-a100f26f1430', - resource: { - resourceType: 'Observation', - id: '49ddb694-b6ca-4dd0-acfc-a100f26f1430', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:42.398-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2093-3', - display: 'Total Cholesterol', - }, - ], - text: 'Total Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 182.79329922420055, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/2adc2642-792c-47a4-9411-ca12e9a51b41', - resource: { - resourceType: 'Observation', - id: '2adc2642-792c-47a4-9411-ca12e9a51b41', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:41.348-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '718-7', - display: 'Hemoglobin [Mass/volume] in Blood', - }, - ], - text: 'Hemoglobin [Mass/volume] in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 15.470327063621387, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/64fff44c-a59b-42cc-9c68-5be3c4bbb0f5', - resource: { - resourceType: 'Observation', - id: '64fff44c-a59b-42cc-9c68-5be3c4bbb0f5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:41.051-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 3.9293941474299645, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/c880113b-30d8-47cb-8660-bbe541b78f5b', - resource: { - resourceType: 'Observation', - id: 'c880113b-30d8-47cb-8660-bbe541b78f5b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:38.421-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 1.3992018175385494, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9f09cd18-fddb-41b8-bb4b-e348ee893873', - resource: { - resourceType: 'Observation', - id: '9f09cd18-fddb-41b8-bb4b-e348ee893873', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:35.355-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 2.8700062004164115, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/411de01d-5846-41c4-85ee-dddef5b856f5', - resource: { - resourceType: 'Observation', - id: '411de01d-5846-41c4-85ee-dddef5b856f5', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:32.629-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4548-4', - display: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - ], - text: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 6.325092763004767, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/5497d5c8-3d6c-4f8c-9247-5565eda7a830', - resource: { - resourceType: 'Observation', - id: '5497d5c8-3d6c-4f8c-9247-5565eda7a830', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:30.476-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '21000-5', - display: 'Erythrocyte distribution width [Entitic volume] by Automated count', - }, - ], - text: 'Erythrocyte distribution width [Entitic volume] by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 40.012646602811856, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/CarePlan/644ec7fb-73f3-47e8-a6df-f5eb1de9e369', - resource: { - resourceType: 'CarePlan', - id: '644ec7fb-73f3-47e8-a6df-f5eb1de9e369', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:26.724-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - text: { - status: 'generated', - div: '
Care Plan for Diabetes self management plan.
Activities:
  • Diabetes self management plan
  • Diabetes self management plan

Care plan is meant to treat Prediabetes.
', - }, - status: 'active', - intent: 'order', - category: [ - { - coding: [ - { - system: 'http://snomed.info/sct', - code: '698360004', - display: 'Diabetes self management plan', - }, - ], - text: 'Diabetes self management plan', - }, - ], - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/7bf16bee-41c9-4f7d-8158-6f585c0c8fe4', - }, - period: { - start: '1988-11-21T14:22:39-05:00', - }, - addresses: [ - { - reference: 'Condition/20c8d947-86de-48b8-8a91-6646b587e802', - }, - ], - goal: [ - { - reference: 'Goal/a41116f7-8de4-4511-8e7c-f126d5e1c7da', - }, - { - reference: 'Goal/b9723b18-bb5a-471f-af38-bac1fafb8870', - }, - { - reference: 'Goal/ab057300-bb74-4aee-81ec-22d0eefadf2c', - }, - { - reference: 'Goal/4887ff93-ef2e-4243-88a6-6648c6b52fc1', - }, - { - reference: 'Goal/5a48ef53-a438-44e0-a6b5-fa1d5d8453f4', - }, - ], - activity: [ - { - detail: { - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '160670007', - display: 'Diabetic diet', - }, - ], - text: 'Diabetic diet', - }, - status: 'in-progress', - }, - }, - { - detail: { - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '229065009', - display: 'Exercise therapy', - }, - ], - text: 'Exercise therapy', - }, - status: 'in-progress', - }, - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Goal/4887ff93-ef2e-4243-88a6-6648c6b52fc1', - resource: { - resourceType: 'Goal', - id: '4887ff93-ef2e-4243-88a6-6648c6b52fc1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:26.674-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - lifecycleStatus: 'accepted', - achievementStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/goal-achievement', - code: 'in-progress', - }, - ], - }, - description: { - text: 'Improve and maintenance of optimal foot health: aim at early detection of peripheral vascular problems and neuropathy presumed due to diabetes; and prevention of diabetic foot ulcer, gangrene', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Goal/a41116f7-8de4-4511-8e7c-f126d5e1c7da', - resource: { - resourceType: 'Goal', - id: 'a41116f7-8de4-4511-8e7c-f126d5e1c7da', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:26.616-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - lifecycleStatus: 'accepted', - achievementStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/goal-achievement', - code: 'in-progress', - }, - ], - }, - description: { - text: 'Hemoglobin A1c total in Blood < 7.0', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Condition/20c8d947-86de-48b8-8a91-6646b587e802', - resource: { - resourceType: 'Condition', - id: '20c8d947-86de-48b8-8a91-6646b587e802', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:26.563-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - clinicalStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-clinical', - code: 'active', - }, - ], - }, - verificationStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-ver-status', - code: 'confirmed', - }, - ], - }, - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '15777000', - display: 'Prediabetes', - }, - ], - text: 'Prediabetes', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/7bf16bee-41c9-4f7d-8158-6f585c0c8fe4', - }, - onsetDateTime: '1988-11-21T14:22:39-05:00', - recordedDate: '1988-11-21T14:22:39-05:00', - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/c6fa3d21-a45d-4f40-a765-ac0fc8939d2f', - resource: { - resourceType: 'Observation', - id: 'c6fa3d21-a45d-4f40-a765-ac0fc8939d2f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:20.745-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 86.52404843881004, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/4fd3be57-cd2f-415d-a989-660d349d0447', - resource: { - resourceType: 'Observation', - id: '4fd3be57-cd2f-415d-a989-660d349d0447', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:20.313-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8302-2', - display: 'Body Height', - }, - ], - text: 'Body Height', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 183.1482561587424, - unit: 'cm', - system: 'http://unitsofmeasure.org', - code: 'cm', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/94aa750b-4971-454c-b333-00bd01caea12', - resource: { - resourceType: 'Observation', - id: '94aa750b-4971-454c-b333-00bd01caea12', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:20.202-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 96.2696708258594, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/0cf67e42-d299-41e8-8842-caa0a1f38342', - resource: { - resourceType: 'DiagnosticReport', - id: '0cf67e42-d299-41e8-8842-caa0a1f38342', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:17.039-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/d5820b41-de5b-447a-ac6d-4ed175e4844c', - display: 'Glucose', - }, - { - reference: 'Observation/6ff8a797-ca5d-40ed-b68b-c335c8b48728', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/48b13ae8-dfd8-498e-bc31-8ff7e6cae42e', - display: 'Creatinine', - }, - { - reference: 'Observation/50be73a5-9f1b-4116-a70c-3f728ac5827d', - display: 'Calcium', - }, - { - reference: 'Observation/fdd6eb90-2f50-4238-9fb4-fcaa07e465fc', - display: 'Sodium', - }, - { - reference: 'Observation/5d5a9198-dcb7-49b7-8bae-8aeb64dac83f', - display: 'Potassium', - }, - { - reference: 'Observation/6ee57fc7-7f83-46f8-a704-5eca859bc216', - display: 'Chloride', - }, - { - reference: 'Observation/5bf3258f-7979-4d19-b42f-b7271563e4ae', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/ddff77a1-b86c-4bc4-9ea4-71ba1a6a52d0', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/02974b2f-4ea6-4b1c-b1d0-434c55689d4b', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/bda63a44-44fe-4a3c-820a-4fc38ea511c9', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/32e46494-5730-4968-a8c0-11e9e27cffa3', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/a49cc030-7090-4f28-9632-074da5c6724c', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/00e22a1c-3911-4cdb-99fb-b76542dce1e9', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/32aa1a1d-7c2d-4537-ac3c-04a7f82ac255', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/6d856114-5e45-4d0e-bfc9-909c3a062a92', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6d856114-5e45-4d0e-bfc9-909c3a062a92', - resource: { - resourceType: 'Observation', - id: '6d856114-5e45-4d0e-bfc9-909c3a062a92', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.973-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 7.726356629858441, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/32aa1a1d-7c2d-4537-ac3c-04a7f82ac255', - resource: { - resourceType: 'Observation', - id: '32aa1a1d-7c2d-4537-ac3c-04a7f82ac255', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.921-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1742-6', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 59.320176482942976, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/00e22a1c-3911-4cdb-99fb-b76542dce1e9', - resource: { - resourceType: 'Observation', - id: '00e22a1c-3911-4cdb-99fb-b76542dce1e9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.860-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6768-6', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 61.96829706286766, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a49cc030-7090-4f28-9632-074da5c6724c', - resource: { - resourceType: 'Observation', - id: 'a49cc030-7090-4f28-9632-074da5c6724c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.810-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 0.7774467824801912, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/32e46494-5730-4968-a8c0-11e9e27cffa3', - resource: { - resourceType: 'Observation', - id: '32e46494-5730-4968-a8c0-11e9e27cffa3', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.760-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '10834-0', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - ], - text: 'Globulin [Mass/volume] in Serum by calculation', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 2.915331284882886, - unit: 'g/L', - system: 'http://unitsofmeasure.org', - code: 'g/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/02974b2f-4ea6-4b1c-b1d0-434c55689d4b', - resource: { - resourceType: 'Observation', - id: '02974b2f-4ea6-4b1c-b1d0-434c55689d4b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.712-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 62.089812447699764, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ddff77a1-b86c-4bc4-9ea4-71ba1a6a52d0', - resource: { - resourceType: 'Observation', - id: 'ddff77a1-b86c-4bc4-9ea4-71ba1a6a52d0', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.654-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - ], - text: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 76.60391753374763, - unit: 'mL/min', - system: 'http://unitsofmeasure.org', - code: 'mL/min', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/5bf3258f-7979-4d19-b42f-b7271563e4ae', - resource: { - resourceType: 'Observation', - id: '5bf3258f-7979-4d19-b42f-b7271563e4ae', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.610-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 27.631816200156614, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/50be73a5-9f1b-4116-a70c-3f728ac5827d', - resource: { - resourceType: 'Observation', - id: '50be73a5-9f1b-4116-a70c-3f728ac5827d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.563-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 10.100255988960779, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d5820b41-de5b-447a-ac6d-4ed175e4844c', - resource: { - resourceType: 'Observation', - id: 'd5820b41-de5b-447a-ac6d-4ed175e4844c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:16.505-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 89.84176941037339, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1bc6ba6d-4956-4e01-8c46-f0e0be7982eb', - resource: { - resourceType: 'Observation', - id: '1bc6ba6d-4956-4e01-8c46-f0e0be7982eb', - meta: { - versionId: '4', - lastUpdated: '2020-10-11T03:02:00.607-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 104.69394516875343, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"4"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/63645695-6022-43cf-8892-dcaed86772db', - resource: { - resourceType: 'DiagnosticReport', - id: '63645695-6022-43cf-8892-dcaed86772db', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:12.308-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/e72916aa-39a7-43d8-893e-eec8243b9443', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/027e5906-0344-4b17-a4f9-4db71e6a31e9', - display: 'Triglycerides', - }, - { - reference: 'Observation/cc17528d-2181-48a7-b4c0-c27f563abeb1', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/01e970f3-251b-4cda-9c84-ee5ea52fe900', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/e72916aa-39a7-43d8-893e-eec8243b9443', - resource: { - resourceType: 'Observation', - id: 'e72916aa-39a7-43d8-893e-eec8243b9443', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:12.246-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2093-3', - display: 'Total Cholesterol', - }, - ], - text: 'Total Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 174.63370983621778, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/48b13ae8-dfd8-498e-bc31-8ff7e6cae42e', - resource: { - resourceType: 'Observation', - id: '48b13ae8-dfd8-498e-bc31-8ff7e6cae42e', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:57:03.392-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 2.990926425077017, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/65433437-5961-4c4b-9568-d9ffb0777c78', - resource: { - resourceType: 'Observation', - id: '65433437-5961-4c4b-9568-d9ffb0777c78', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:54.278-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '32623-1', - display: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - ], - text: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 9.9820557093873, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/4d926d4b-d171-46ec-b41f-647b337eab2b', - resource: { - resourceType: 'Observation', - id: '4d926d4b-d171-46ec-b41f-647b337eab2b', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:51.042-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4548-4', - display: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - ], - text: 'Hemoglobin A1c/Hemoglobin.total in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 6.364049302065611, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9dd7b28c-bb83-4146-bbe7-2a0192186845', - resource: { - resourceType: 'Observation', - id: '9dd7b28c-bb83-4146-bbe7-2a0192186845', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:48.775-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 38.551608068177664, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/26263a55-45b1-4b2e-861e-87a8f8679b58', - resource: { - resourceType: 'DiagnosticReport', - id: '26263a55-45b1-4b2e-861e-87a8f8679b58', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.424-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '58410-2', - display: 'Complete blood count (hemogram) panel - Blood by Automated count', - }, - ], - text: 'Complete blood count (hemogram) panel - Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/10480e58-8e31-4ab6-8a0b-9c37ec3217b6', - display: 'Leukocytes [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/8976f327-2697-409c-9951-7e1db2ade5a3', - display: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/842055a9-a387-4249-a5e6-ac0f5864e52e', - display: 'Hemoglobin [Mass/volume] in Blood', - }, - { - reference: 'Observation/fbc02d3a-bf8a-41ef-9915-ab5aca28a768', - display: 'Hematocrit [Volume Fraction] of Blood by Automated count', - }, - { - reference: 'Observation/cb3613d5-b813-4d32-9b5d-203c8d4e1c41', - display: 'MCV [Entitic volume] by Automated count', - }, - { - reference: 'Observation/ae3b9a86-443f-4178-9f31-fdb1cca0cdd4', - display: 'MCH [Entitic mass] by Automated count', - }, - { - reference: 'Observation/7c9e06bd-4554-4996-a008-3b152d45cd5f', - display: 'MCHC [Mass/volume] by Automated count', - }, - { - reference: 'Observation/49f18b95-1cd3-4030-99b2-852b10c83533', - display: 'Erythrocyte distribution width [Entitic volume] by Automated count', - }, - { - reference: 'Observation/ea95f7f3-ed78-4d92-aaf1-956b1eb5ac8a', - display: 'Platelets [#/volume] in Blood by Automated count', - }, - { - reference: 'Observation/860fb8b4-e2aa-47ae-bea7-c96cc84fe5d2', - display: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - { - reference: 'Observation/90e9091e-ea70-490a-92b6-039a79e1f15c', - display: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/90e9091e-ea70-490a-92b6-039a79e1f15c', - resource: { - resourceType: 'Observation', - id: '90e9091e-ea70-490a-92b6-039a79e1f15c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.348-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '32623-1', - display: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - ], - text: 'Platelet mean volume [Entitic volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 11.093869042507038, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/860fb8b4-e2aa-47ae-bea7-c96cc84fe5d2', - resource: { - resourceType: 'Observation', - id: '860fb8b4-e2aa-47ae-bea7-c96cc84fe5d2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.288-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '32207-3', - display: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - ], - text: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 477.0546018752152, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ae3b9a86-443f-4178-9f31-fdb1cca0cdd4', - resource: { - resourceType: 'Observation', - id: 'ae3b9a86-443f-4178-9f31-fdb1cca0cdd4', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.238-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '785-6', - display: 'MCH [Entitic mass] by Automated count', - }, - ], - text: 'MCH [Entitic mass] by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 31.20635706407183, - unit: 'pg', - system: 'http://unitsofmeasure.org', - code: 'pg', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/842055a9-a387-4249-a5e6-ac0f5864e52e', - resource: { - resourceType: 'Observation', - id: '842055a9-a387-4249-a5e6-ac0f5864e52e', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.180-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '718-7', - display: 'Hemoglobin [Mass/volume] in Blood', - }, - ], - text: 'Hemoglobin [Mass/volume] in Blood', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 16.533057102792142, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/8976f327-2697-409c-9951-7e1db2ade5a3', - resource: { - resourceType: 'Observation', - id: '8976f327-2697-409c-9951-7e1db2ade5a3', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.102-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '789-8', - display: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - ], - text: 'Erythrocytes [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 4.7118607744417815, - unit: '10*6/uL', - system: 'http://unitsofmeasure.org', - code: '10*6/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/10480e58-8e31-4ab6-8a0b-9c37ec3217b6', - resource: { - resourceType: 'Observation', - id: '10480e58-8e31-4ab6-8a0b-9c37ec3217b6', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:45.047-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6690-2', - display: 'Leukocytes [#/volume] in Blood by Automated count', - }, - ], - text: 'Leukocytes [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 9.281766156731946, - unit: '10*3/uL', - system: 'http://unitsofmeasure.org', - code: '10*3/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/41cbc55f-6672-4766-be86-c58c1ccba095', - resource: { - resourceType: 'DiagnosticReport', - id: '41cbc55f-6672-4766-be86-c58c1ccba095', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:43.655-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '51990-0', - display: 'Basic Metabolic Panel', - }, - ], - text: 'Basic Metabolic Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/06224588-0453-4c69-afcb-35aadc075a4a', - display: 'Glucose', - }, - { - reference: 'Observation/a1d600b2-5a47-4ed2-92c5-be316b10db8f', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/aa3ca397-94e7-4d1c-a968-eeb588f79a91', - display: 'Creatinine', - }, - { - reference: 'Observation/dc066b4f-1176-47ac-87f5-30f8a7c55db3', - display: 'Calcium', - }, - { - reference: 'Observation/324a6c9e-9be6-43c3-951a-ca26a38b4d64', - display: 'Sodium', - }, - { - reference: 'Observation/0ff17049-b2a8-417d-b876-b13837f71b9e', - display: 'Potassium', - }, - { - reference: 'Observation/4c1e0192-3d55-440c-b80b-daeadb7d7799', - display: 'Chloride', - }, - { - reference: 'Observation/25ef1626-00ab-4548-a9d8-1975791ba615', - display: 'Carbon Dioxide', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/0ff17049-b2a8-417d-b876-b13837f71b9e', - resource: { - resourceType: 'Observation', - id: '0ff17049-b2a8-417d-b876-b13837f71b9e', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:43.601-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 4.248295930779895, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/324a6c9e-9be6-43c3-951a-ca26a38b4d64', - resource: { - resourceType: 'Observation', - id: '324a6c9e-9be6-43c3-951a-ca26a38b4d64', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:43.453-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 140.42281715894956, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/aa3ca397-94e7-4d1c-a968-eeb588f79a91', - resource: { - resourceType: 'Observation', - id: 'aa3ca397-94e7-4d1c-a968-eeb588f79a91', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:43.409-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 1.3426684107693152, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a1d600b2-5a47-4ed2-92c5-be316b10db8f', - resource: { - resourceType: 'Observation', - id: 'a1d600b2-5a47-4ed2-92c5-be316b10db8f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:43.346-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 7.022423550607336, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/62332d51-1339-478e-908b-0240152878c6', - resource: { - resourceType: 'Observation', - id: '62332d51-1339-478e-908b-0240152878c6', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:42.352-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/6a8b49f9-5076-4440-8c8a-2be82d10a2ee', - }, - effectiveDateTime: '2019-04-22T15:22:39-04:00', - issued: '2019-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 19.060355967258182, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/b637fc4d-2522-4ff6-92bb-4dee60e29c36', - resource: { - resourceType: 'DiagnosticReport', - id: 'b637fc4d-2522-4ff6-92bb-4dee60e29c36', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.829-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/6c871690-c112-4a5e-a0b2-8d0afbafe3e8', - display: 'Glucose', - }, - { - reference: 'Observation/03473d5b-7c6b-47ce-8024-859a4c72e555', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/90e68455-f95d-41b0-bf5c-3dd055bf59d9', - display: 'Creatinine', - }, - { - reference: 'Observation/27533fc8-e641-4cff-8347-d4c1d24bc1fe', - display: 'Calcium', - }, - { - reference: 'Observation/7a01e421-0d0c-4c87-b752-af5687c28374', - display: 'Sodium', - }, - { - reference: 'Observation/facbaeb0-c1a6-4410-a3a5-534c0538b4ec', - display: 'Potassium', - }, - { - reference: 'Observation/69ed14bb-2569-47f3-a8d9-3029b9a6f44e', - display: 'Chloride', - }, - { - reference: 'Observation/6ac374e0-ea9f-4906-b26f-a1456ff37525', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/d9e0e582-a749-4d09-b7fe-8412f7f124c2', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/2ac4bd94-15b1-4edd-8d13-195a39bc9ac1', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/1fda9af0-eb34-491e-99d6-d96b2f4355a1', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/d73a300d-d9d7-4df1-b6eb-5b39c96afb8e', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/43a121dd-787f-497c-898c-7ad845366a3f', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/7e554433-89fb-44db-94cb-c175fca5ad39', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/72754e37-6d17-44ff-9152-481baff83e9e', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/a6f40545-e79d-46c4-ac47-6b4e2ebf3806', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a6f40545-e79d-46c4-ac47-6b4e2ebf3806', - resource: { - resourceType: 'Observation', - id: 'a6f40545-e79d-46c4-ac47-6b4e2ebf3806', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.757-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1920-8', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 17.827706212614657, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d73a300d-d9d7-4df1-b6eb-5b39c96afb8e', - resource: { - resourceType: 'Observation', - id: 'd73a300d-d9d7-4df1-b6eb-5b39c96afb8e', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.711-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '10834-0', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - ], - text: 'Globulin [Mass/volume] in Serum by calculation', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 2.2822290077791787, - unit: 'g/L', - system: 'http://unitsofmeasure.org', - code: 'g/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1fda9af0-eb34-491e-99d6-d96b2f4355a1', - resource: { - resourceType: 'Observation', - id: '1fda9af0-eb34-491e-99d6-d96b2f4355a1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.645-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 4.6590009688156595, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/2ac4bd94-15b1-4edd-8d13-195a39bc9ac1', - resource: { - resourceType: 'Observation', - id: '2ac4bd94-15b1-4edd-8d13-195a39bc9ac1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.577-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 71.41217499096089, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d9e0e582-a749-4d09-b7fe-8412f7f124c2', - resource: { - resourceType: 'Observation', - id: 'd9e0e582-a749-4d09-b7fe-8412f7f124c2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.521-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - ], - text: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 73.05575102340013, - unit: 'mL/min', - system: 'http://unitsofmeasure.org', - code: 'mL/min', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/facbaeb0-c1a6-4410-a3a5-534c0538b4ec', - resource: { - resourceType: 'Observation', - id: 'facbaeb0-c1a6-4410-a3a5-534c0538b4ec', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.474-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 4.2528379586519955, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/7a01e421-0d0c-4c87-b752-af5687c28374', - resource: { - resourceType: 'Observation', - id: '7a01e421-0d0c-4c87-b752-af5687c28374', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.441-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 143.4558884067517, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/90e68455-f95d-41b0-bf5c-3dd055bf59d9', - resource: { - resourceType: 'Observation', - id: '90e68455-f95d-41b0-bf5c-3dd055bf59d9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.380-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 2.6279566609112144, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6c871690-c112-4a5e-a0b2-8d0afbafe3e8', - resource: { - resourceType: 'Observation', - id: '6c871690-c112-4a5e-a0b2-8d0afbafe3e8', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:40.321-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 87.40493723869676, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1d0df9f6-6876-4323-b144-235a94099dca', - resource: { - resourceType: 'Observation', - id: '1d0df9f6-6876-4323-b144-235a94099dca', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:39.892-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8331-1', - display: 'Oral temperature', - }, - ], - text: 'Oral temperature', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b68047e8-bb41-4518-8043-1e15b87d87b6', - }, - effectiveDateTime: '2017-09-03T15:22:39-04:00', - issued: '2017-09-03T15:22:39.163-04:00', - valueQuantity: { - value: 37.047101386175925, - unit: 'Cel', - system: 'http://unitsofmeasure.org', - code: 'Cel', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Encounter/b68047e8-bb41-4518-8043-1e15b87d87b6', - resource: { - resourceType: 'Encounter', - id: 'b68047e8-bb41-4518-8043-1e15b87d87b6', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:39.835-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'finished', - class: { - system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode', - code: 'AMB', - }, - type: [ - { - coding: [ - { - system: 'http://snomed.info/sct', - code: '185345009', - display: 'Encounter for symptom', - }, - ], - text: 'Encounter for symptom', - }, - ], - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - participant: [ - { - individual: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - }, - ], - period: { - start: '2017-09-03T15:22:39-04:00', - end: '2017-09-03T15:37:39-04:00', - }, - reasonCode: [ - { - coding: [ - { - system: 'http://snomed.info/sct', - code: '195662009', - display: 'Acute viral pharyngitis (disorder)', - }, - ], - }, - ], - serviceProvider: { - reference: 'Organization/d78e84ec-30aa-3bba-a33a-f29a3a454662', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/84f31045-1ae5-4fbf-90ba-610bcec3f08c', - resource: { - resourceType: 'MedicationRequest', - id: '84f31045-1ae5-4fbf-90ba-610bcec3f08c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:39.156-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - authoredOn: '2018-04-22T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1f1abb60-e297-4a84-8c0c-b7e94d992b9a', - resource: { - resourceType: 'Observation', - id: '1f1abb60-e297-4a84-8c0c-b7e94d992b9a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:38.958-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '39156-5', - display: 'Body Mass Index', - }, - ], - text: 'Body Mass Index', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 28.398686494140566, - unit: 'kg/m2', - system: 'http://unitsofmeasure.org', - code: 'kg/m2', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f5a31d4b-eb75-486e-9f7e-2dca2f87e00f', - resource: { - resourceType: 'Observation', - id: 'f5a31d4b-eb75-486e-9f7e-2dca2f87e00f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:38.849-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 26.360954069698295, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f36fcbe8-b291-4c7f-895a-5006399bc030', - resource: { - resourceType: 'Observation', - id: 'f36fcbe8-b291-4c7f-895a-5006399bc030', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:38.284-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2339-0', - display: 'Glucose', - }, - ], - text: 'Glucose', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 97.45233699290591, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/989f901f-2b0f-4746-90fd-a500e0193975', - resource: { - resourceType: 'Observation', - id: '989f901f-2b0f-4746-90fd-a500e0193975', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:36.075-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 72.91982439886736, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6523b5dc-78a4-435f-a9fa-ab219cecf089', - resource: { - resourceType: 'Observation', - id: '6523b5dc-78a4-435f-a9fa-ab219cecf089', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:32.727-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2093-3', - display: 'Total Cholesterol', - }, - ], - text: 'Total Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 165.0976191451998, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/00483077-c46a-4987-8e8e-63b793a73db4', - resource: { - resourceType: 'Observation', - id: '00483077-c46a-4987-8e8e-63b793a73db4', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:31.499-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6768-6', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 115.26829203692441, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d4c08861-7d16-4e79-bf54-1a32496f8479', - resource: { - resourceType: 'Observation', - id: 'd4c08861-7d16-4e79-bf54-1a32496f8479', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:28.648-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 42.54149002100734, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d3e4eb0d-4397-4fbb-a11f-8a6a65b72371', - resource: { - resourceType: 'Observation', - id: 'd3e4eb0d-4397-4fbb-a11f-8a6a65b72371', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:25.619-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'survey', - display: 'survey', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72166-2', - display: 'Tobacco smoking status NHIS', - }, - ], - text: 'Tobacco smoking status NHIS', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueCodeableConcept: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '266919005', - display: 'Never smoker', - }, - ], - text: 'Never smoker', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/156792a4-be04-4a4c-a1e4-5695238deaec', - resource: { - resourceType: 'Observation', - id: '156792a4-be04-4a4c-a1e4-5695238deaec', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:25.238-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '10834-0', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - ], - text: 'Globulin [Mass/volume] in Serum by calculation', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 3.1902386636292035, - unit: 'g/L', - system: 'http://unitsofmeasure.org', - code: 'g/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/75a4aeaa-3b02-4131-b111-e037daa7956a', - resource: { - resourceType: 'Observation', - id: '75a4aeaa-3b02-4131-b111-e037daa7956a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:24.887-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 8.824168431890039, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/8ee79e98-1591-4f62-876b-f842f875f178', - resource: { - resourceType: 'Observation', - id: '8ee79e98-1591-4f62-876b-f842f875f178', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:24.366-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '55284-4', - display: 'Blood Pressure', - }, - ], - text: 'Blood Pressure', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - component: [ - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8462-4', - display: 'Diastolic Blood Pressure', - }, - ], - text: 'Diastolic Blood Pressure', - }, - valueQuantity: { - value: 100.89548539464636, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - { - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8480-6', - display: 'Systolic Blood Pressure', - }, - ], - text: 'Systolic Blood Pressure', - }, - valueQuantity: { - value: 156.92963312390535, - unit: 'mm[Hg]', - system: 'http://unitsofmeasure.org', - code: 'mm[Hg]', - }, - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6a2e4281-897e-4200-b1bf-87c38b7d9fc4', - resource: { - resourceType: 'Observation', - id: '6a2e4281-897e-4200-b1bf-87c38b7d9fc4', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:23.719-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 137.66161506787157, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Goal/ab057300-bb74-4aee-81ec-22d0eefadf2c', - resource: { - resourceType: 'Goal', - id: 'ab057300-bb74-4aee-81ec-22d0eefadf2c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:22.826-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - lifecycleStatus: 'accepted', - achievementStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/goal-achievement', - code: 'in-progress', - }, - ], - }, - description: { - text: 'Maintain blood pressure below 140/90 mmHg', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/faf980c9-42c3-4707-a58d-5e9ddd69cd7d', - resource: { - resourceType: 'Observation', - id: 'faf980c9-42c3-4707-a58d-5e9ddd69cd7d', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:22.551-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 2.517786637926472, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/43a121dd-787f-497c-898c-7ad845366a3f', - resource: { - resourceType: 'Observation', - id: '43a121dd-787f-497c-898c-7ad845366a3f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:22.033-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 0.1113715762582016, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dd33a87e-1288-4b3d-8a7f-f55839ad3967', - resource: { - resourceType: 'Observation', - id: 'dd33a87e-1288-4b3d-8a7f-f55839ad3967', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:18.676-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 39.180355594388274, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/fdd6eb90-2f50-4238-9fb4-fcaa07e465fc', - resource: { - resourceType: 'Observation', - id: 'fdd6eb90-2f50-4238-9fb4-fcaa07e465fc', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:14.729-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2947-0', - display: 'Sodium', - }, - ], - text: 'Sodium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 140.46740210720765, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1c834601-b4e4-4789-89cb-366833abf50f', - resource: { - resourceType: 'Observation', - id: '1c834601-b4e4-4789-89cb-366833abf50f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:13.772-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 121.74128968185443, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6ac374e0-ea9f-4906-b26f-a1456ff37525', - resource: { - resourceType: 'Observation', - id: '6ac374e0-ea9f-4906-b26f-a1456ff37525', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:12.431-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 25.16086347005941, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/4a5fd009-3939-43cd-b9a3-f61af8773f2c', - resource: { - resourceType: 'Observation', - id: '4a5fd009-3939-43cd-b9a3-f61af8773f2c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:55.723-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72514-3', - display: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - ], - text: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 3.6240711576635185, - unit: '{score}', - system: 'http://unitsofmeasure.org', - code: '{score}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/61e06bfc-ad07-4cc2-af9a-646ec6cb49cc', - resource: { - resourceType: 'Observation', - id: '61e06bfc-ad07-4cc2-af9a-646ec6cb49cc', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:55.542-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72514-3', - display: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - ], - text: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 1.7932457550143477, - unit: '{score}', - system: 'http://unitsofmeasure.org', - code: '{score}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/5933ba17-e7a7-4f04-892f-57a8475fe938', - resource: { - resourceType: 'Observation', - id: '5933ba17-e7a7-4f04-892f-57a8475fe938', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:59:54.160-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'survey', - display: 'survey', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72166-2', - display: 'Tobacco smoking status NHIS', - }, - ], - text: 'Tobacco smoking status NHIS', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueCodeableConcept: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '266919005', - display: 'Never smoker', - }, - ], - text: 'Never smoker', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/e888715d-fd24-4db7-9a25-16a538a050cb', - resource: { - resourceType: 'Observation', - id: 'e888715d-fd24-4db7-9a25-16a538a050cb', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:58:01.010-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '4544-3', - display: 'Hematocrit [Volume Fraction] of Blood by Automated count', - }, - ], - text: 'Hematocrit [Volume Fraction] of Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 44.64960236400083, - unit: '%', - system: 'http://unitsofmeasure.org', - code: '%', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/01e970f3-251b-4cda-9c84-ee5ea52fe900', - resource: { - resourceType: 'Observation', - id: '01e970f3-251b-4cda-9c84-ee5ea52fe900', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:11.697-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 65.97784818017993, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6ff8a797-ca5d-40ed-b68b-c335c8b48728', - resource: { - resourceType: 'Observation', - id: '6ff8a797-ca5d-40ed-b68b-c335c8b48728', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:11.480-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 8.412913463488637, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d8aa21ee-2660-49f0-adb8-2a8d9d98ab68', - resource: { - resourceType: 'Observation', - id: 'd8aa21ee-2660-49f0-adb8-2a8d9d98ab68', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:11.108-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6690-2', - display: 'Leukocytes [#/volume] in Blood by Automated count', - }, - ], - text: 'Leukocytes [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 9.791402133145285, - unit: '10*3/uL', - system: 'http://unitsofmeasure.org', - code: '10*3/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/b82a5ce8-8e46-4d44-ad71-256de7d6f9f1', - resource: { - resourceType: 'DiagnosticReport', - id: 'b82a5ce8-8e46-4d44-ad71-256de7d6f9f1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:09.287-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '57698-3', - display: 'Lipid Panel', - }, - ], - text: 'Lipid Panel', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/069f3298-6ddb-493a-9908-10bdae73e008', - display: 'Total Cholesterol', - }, - { - reference: 'Observation/386c51bf-eed9-4f28-bf3f-9875975331ff', - display: 'Triglycerides', - }, - { - reference: 'Observation/0953e49a-836d-4f57-bf96-edb199f60cc2', - display: 'Low Density Lipoprotein Cholesterol', - }, - { - reference: 'Observation/a88f4b80-6dde-42d2-980b-0e48cd461e91', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a88f4b80-6dde-42d2-980b-0e48cd461e91', - resource: { - resourceType: 'Observation', - id: 'a88f4b80-6dde-42d2-980b-0e48cd461e91', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:09.213-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2085-9', - display: 'High Density Lipoprotein Cholesterol', - }, - ], - text: 'High Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 64.3016420552237, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/0953e49a-836d-4f57-bf96-edb199f60cc2', - resource: { - resourceType: 'Observation', - id: '0953e49a-836d-4f57-bf96-edb199f60cc2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:09.151-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 103.01329118005197, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/386c51bf-eed9-4f28-bf3f-9875975331ff', - resource: { - resourceType: 'Observation', - id: '386c51bf-eed9-4f28-bf3f-9875975331ff', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:09.097-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 149.40590964840337, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/5a56a89a-0ac3-4889-8dbd-d754add11a1f', - resource: { - resourceType: 'Observation', - id: '5a56a89a-0ac3-4889-8dbd-d754add11a1f', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:06.775-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 4.585929215143451, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/7e554433-89fb-44db-94cb-c175fca5ad39', - resource: { - resourceType: 'Observation', - id: '7e554433-89fb-44db-94cb-c175fca5ad39', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:03.906-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6768-6', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 96.23690789968073, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/bda63a44-44fe-4a3c-820a-4fc38ea511c9', - resource: { - resourceType: 'Observation', - id: 'bda63a44-44fe-4a3c-820a-4fc38ea511c9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:56:01.876-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 3.888793412180927, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9177086a-2c06-457d-b368-97273815dc31', - resource: { - resourceType: 'Observation', - id: '9177086a-2c06-457d-b368-97273815dc31', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:58.482-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6768-6', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - effectiveDateTime: '2013-04-23T15:22:39-04:00', - issued: '2013-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 28.90779980705429, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/417a133e-58a5-4761-a871-1753898d5352', - resource: { - resourceType: 'Observation', - id: '417a133e-58a5-4761-a871-1753898d5352', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:58.041-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 4.793395386168248, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1f2e46ec-91d8-4c33-9f97-a340181a4862', - resource: { - resourceType: 'Observation', - id: '1f2e46ec-91d8-4c33-9f97-a340181a4862', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:56.440-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 68.67743957646755, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dd6c402a-e416-4ecf-b7cf-58d3186fcca1', - resource: { - resourceType: 'Observation', - id: 'dd6c402a-e416-4ecf-b7cf-58d3186fcca1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:52.243-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '8302-2', - display: 'Body Height', - }, - ], - text: 'Body Height', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 183.1482561587424, - unit: 'cm', - system: 'http://unitsofmeasure.org', - code: 'cm', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: - 'https://r4.smarthealthit.org/MedicationRequest/f0b9a4e2-a28c-4b00-a81d-110266f18569', - resource: { - resourceType: 'MedicationRequest', - id: 'f0b9a4e2-a28c-4b00-a81d-110266f18569', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:51.147-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'stopped', - intent: 'order', - medicationCodeableConcept: { - coding: [ - { - system: 'http://www.nlm.nih.gov/research/umls/rxnorm', - code: '316672', - display: 'Simvistatin 10 MG', - }, - ], - text: 'Simvistatin 10 MG', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b2db9b73-51d5-4425-a3a9-c740759dace4', - }, - authoredOn: '2013-04-23T15:22:39-04:00', - requester: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - reasonReference: [ - { - reference: 'Condition/e6ac4801-7779-4406-8510-bfe55e4e4360', - }, - ], - dosageInstruction: [ - { - sequence: 1, - timing: { - repeat: { - frequency: 1, - period: 1, - periodUnit: 'd', - }, - }, - asNeededBoolean: false, - doseAndRate: [ - { - type: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/dose-rate-type', - code: 'ordered', - display: 'Ordered', - }, - ], - }, - doseQuantity: { - value: 1, - }, - }, - ], - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dff9300a-f4b5-475c-96b6-fae02b30a990', - resource: { - resourceType: 'Observation', - id: 'dff9300a-f4b5-475c-96b6-fae02b30a990', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:48.908-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 112.01457932531854, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/09490d54-d7b2-47f8-8494-523d20573642', - resource: { - resourceType: 'Observation', - id: '09490d54-d7b2-47f8-8494-523d20573642', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:44.684-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/74ead71a-2215-4175-968c-65b669e43960', - }, - effectiveDateTime: '2018-04-16T15:22:39-04:00', - issued: '2018-04-16T15:22:39.163-04:00', - valueQuantity: { - value: 107.59354931352352, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Condition/c01f26a3-14b0-4019-b88d-785114983652', - resource: { - resourceType: 'Condition', - id: 'c01f26a3-14b0-4019-b88d-785114983652', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:43.777-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - clinicalStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-clinical', - code: 'active', - }, - ], - }, - verificationStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-ver-status', - code: 'confirmed', - }, - ], - }, - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '271737000', - display: 'Anemia (disorder)', - }, - ], - text: 'Anemia (disorder)', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/50635f99-4662-47c8-b7f5-6fd99a00ae61', - }, - onsetDateTime: '1998-12-07T14:22:39-05:00', - recordedDate: '1998-12-07T14:22:39-05:00', - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/27533fc8-e641-4cff-8347-d4c1d24bc1fe', - resource: { - resourceType: 'Observation', - id: '27533fc8-e641-4cff-8347-d4c1d24bc1fe', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:42.794-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 9.495068660864506, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/03473d5b-7c6b-47ce-8024-859a4c72e555', - resource: { - resourceType: 'Observation', - id: '03473d5b-7c6b-47ce-8024-859a4c72e555', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:38.897-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e3e5c93d-e03c-4a4f-b796-237448ca17ab', - }, - effectiveDateTime: '2016-04-22T15:22:39-04:00', - issued: '2016-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 12.661932788396797, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Condition/f887712b-8e59-40bb-8ad4-7dad21dcaf94', - resource: { - resourceType: 'Condition', - id: 'f887712b-8e59-40bb-8ad4-7dad21dcaf94', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:38.328-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - clinicalStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-clinical', - code: 'active', - }, - ], - }, - verificationStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/condition-ver-status', - code: 'confirmed', - }, - ], - }, - code: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '38341003', - display: 'Hypertension', - }, - ], - text: 'Hypertension', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/7bf16bee-41c9-4f7d-8158-6f585c0c8fe4', - }, - onsetDateTime: '1988-11-21T14:22:39-05:00', - recordedDate: '1988-11-21T14:22:39-05:00', - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ea95f7f3-ed78-4d92-aaf1-956b1eb5ac8a', - resource: { - resourceType: 'Observation', - id: 'ea95f7f3-ed78-4d92-aaf1-956b1eb5ac8a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:38.272-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '777-3', - display: 'Platelets [#/volume] in Blood by Automated count', - }, - ], - text: 'Platelets [#/volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 449.2887514363398, - unit: '10*3/uL', - system: 'http://unitsofmeasure.org', - code: '10*3/uL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Goal/5a48ef53-a438-44e0-a6b5-fa1d5d8453f4', - resource: { - resourceType: 'Goal', - id: '5a48ef53-a438-44e0-a6b5-fa1d5d8453f4', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.868-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - lifecycleStatus: 'accepted', - achievementStatus: { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/goal-achievement', - code: 'in-progress', - }, - ], - }, - description: { - text: 'Address patient knowledge deficit on diabetic self-care', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/3ee0ffe4-de6c-4736-811b-7eec113270f0', - resource: { - resourceType: 'Observation', - id: '3ee0ffe4-de6c-4736-811b-7eec113270f0', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.763-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '32207-3', - display: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - ], - text: 'Platelet distribution width [Entitic volume] in Blood by Automated count', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e24a1813-b5b1-4676-88b8-5bb8609621eb', - }, - effectiveDateTime: '2010-03-29T15:22:39-04:00', - issued: '2010-03-29T15:22:39.163-04:00', - valueQuantity: { - value: 380.8406295691864, - unit: 'fL', - system: 'http://unitsofmeasure.org', - code: 'fL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/DiagnosticReport/26e853df-84e1-4bb5-9fea-cb72bbf0a70c', - resource: { - resourceType: 'DiagnosticReport', - id: '26e853df-84e1-4bb5-9fea-cb72bbf0a70c', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.854-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/v2-0074', - code: 'LAB', - display: 'Laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '24323-8', - display: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - ], - text: 'Comprehensive metabolic 2000 panel - Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - result: [ - { - reference: 'Observation/d6ffd8b0-e18a-4add-821e-e66ace8684e6', - display: 'Glucose', - }, - { - reference: 'Observation/5c29af5b-015e-4a10-9f23-c9b505f404ac', - display: 'Urea Nitrogen', - }, - { - reference: 'Observation/ea3edb4b-2d29-4017-8fa8-9c9b692ec0fa', - display: 'Creatinine', - }, - { - reference: 'Observation/e324d5e3-d6e6-4a4a-ac2c-97e7a14abef8', - display: 'Calcium', - }, - { - reference: 'Observation/27c5ff66-a5f5-4f71-9a72-a64b53ff167a', - display: 'Sodium', - }, - { - reference: 'Observation/9f750bd7-df0e-4230-8894-2723aefd100a', - display: 'Potassium', - }, - { - reference: 'Observation/f42b9b54-4eed-4320-a1a6-761b28ed9d87', - display: 'Chloride', - }, - { - reference: 'Observation/6e9ae6d8-5df0-4835-9d41-fb5f8f1959b2', - display: 'Carbon Dioxide', - }, - { - reference: 'Observation/25f45c69-b899-4f1c-8f13-ada8964fe7fe', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - { - reference: 'Observation/c7c0ad5d-e054-4290-bb30-70cd7981c4fd', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/ffbbdedd-eacc-428a-9112-150eaefc18c3', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/d767a574-cd2b-4313-88ae-04df8d180f06', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - { - reference: 'Observation/97635a1c-bb55-4138-a6bd-b5e8c4d44e04', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - { - reference: 'Observation/11e4ed63-aa58-48cc-b88b-9acf58239d81', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/a63afb6c-be3b-4c36-8ac0-008ebc071bd3', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - { - reference: 'Observation/193c5e30-ee26-457e-8ecb-bc8d3044d44e', - display: 'Aspartate aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/11e4ed63-aa58-48cc-b88b-9acf58239d81', - resource: { - resourceType: 'Observation', - id: '11e4ed63-aa58-48cc-b88b-9acf58239d81', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.820-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6768-6', - display: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alkaline phosphatase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 52.97236309335879, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/97635a1c-bb55-4138-a6bd-b5e8c4d44e04', - resource: { - resourceType: 'Observation', - id: '97635a1c-bb55-4138-a6bd-b5e8c4d44e04', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.756-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1975-2', - display: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Bilirubin.total [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 0.9159510220307451, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/d767a574-cd2b-4313-88ae-04df8d180f06', - resource: { - resourceType: 'Observation', - id: 'd767a574-cd2b-4313-88ae-04df8d180f06', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.720-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '10834-0', - display: 'Globulin [Mass/volume] in Serum by calculation', - }, - ], - text: 'Globulin [Mass/volume] in Serum by calculation', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 2.720247052727273, - unit: 'g/L', - system: 'http://unitsofmeasure.org', - code: 'g/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ffbbdedd-eacc-428a-9112-150eaefc18c3', - resource: { - resourceType: 'Observation', - id: 'ffbbdedd-eacc-428a-9112-150eaefc18c3', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.643-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 5.317437455946025, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/c7c0ad5d-e054-4290-bb30-70cd7981c4fd', - resource: { - resourceType: 'Observation', - id: 'c7c0ad5d-e054-4290-bb30-70cd7981c4fd', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.596-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2885-2', - display: 'Protein [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Protein [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 61.016854702949814, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/25f45c69-b899-4f1c-8f13-ada8964fe7fe', - resource: { - resourceType: 'Observation', - id: '25f45c69-b899-4f1c-8f13-ada8964fe7fe', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.546-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - ], - text: 'Glomerular filtration rate/1.73 sq M.predicted', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 81.7176593316957, - unit: 'mL/min', - system: 'http://unitsofmeasure.org', - code: 'mL/min', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/6e9ae6d8-5df0-4835-9d41-fb5f8f1959b2', - resource: { - resourceType: 'Observation', - id: '6e9ae6d8-5df0-4835-9d41-fb5f8f1959b2', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.490-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '20565-8', - display: 'Carbon Dioxide', - }, - ], - text: 'Carbon Dioxide', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 23.72086316815733, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/f42b9b54-4eed-4320-a1a6-761b28ed9d87', - resource: { - resourceType: 'Observation', - id: 'f42b9b54-4eed-4320-a1a6-761b28ed9d87', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.450-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 110.72383674790521, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/9f750bd7-df0e-4230-8894-2723aefd100a', - resource: { - resourceType: 'Observation', - id: '9f750bd7-df0e-4230-8894-2723aefd100a', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.391-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 3.929861974778903, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/e324d5e3-d6e6-4a4a-ac2c-97e7a14abef8', - resource: { - resourceType: 'Observation', - id: 'e324d5e3-d6e6-4a4a-ac2c-97e7a14abef8', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.341-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 9.466326858190168, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/ea3edb4b-2d29-4017-8fa8-9c9b692ec0fa', - resource: { - resourceType: 'Observation', - id: 'ea3edb4b-2d29-4017-8fa8-9c9b692ec0fa', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.295-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '38483-4', - display: 'Creatinine', - }, - ], - text: 'Creatinine', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 3.1432191232989446, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/5c29af5b-015e-4a10-9f23-c9b505f404ac', - resource: { - resourceType: 'Observation', - id: '5c29af5b-015e-4a10-9f23-c9b505f404ac', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:34.224-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6299-2', - display: 'Urea Nitrogen', - }, - ], - text: 'Urea Nitrogen', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 15.152377121465133, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Encounter/50635f99-4662-47c8-b7f5-6fd99a00ae61', - resource: { - resourceType: 'Encounter', - id: '50635f99-4662-47c8-b7f5-6fd99a00ae61', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:33.651-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'finished', - class: { - system: 'http://terminology.hl7.org/CodeSystem/v3-ActCode', - code: 'AMB', - }, - type: [ - { - coding: [ - { - system: 'http://snomed.info/sct', - code: '185349003', - display: 'Encounter for check up (procedure)', - }, - ], - text: 'Encounter for check up (procedure)', - }, - ], - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - participant: [ - { - individual: { - reference: 'Practitioner/fd7a737e-1ac5-4c4e-89cd-1c07da4ca1c2', - }, - }, - ], - period: { - start: '1998-12-07T14:22:39-05:00', - end: '1998-12-07T14:52:39-05:00', - }, - serviceProvider: { - reference: 'Organization/d78e84ec-30aa-3bba-a33a-f29a3a454662', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/e3bcb3fb-21ed-4602-aa49-602cfd8618f7', - resource: { - resourceType: 'Observation', - id: 'e3bcb3fb-21ed-4602-aa49-602cfd8618f7', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:33.526-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2069-3', - display: 'Chloride', - }, - ], - text: 'Chloride', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/3f68c8e1-d3cd-40fa-9a39-873c7aeb4fa6', - }, - effectiveDateTime: '2012-04-02T15:22:39-04:00', - issued: '2012-04-02T15:22:39.163-04:00', - valueQuantity: { - value: 101.8946342966027, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/65d61653-58a7-4bb7-8cf2-09e46bd40a42', - resource: { - resourceType: 'Observation', - id: '65d61653-58a7-4bb7-8cf2-09e46bd40a42', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:33.209-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'vital-signs', - display: 'vital-signs', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72514-3', - display: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - ], - text: 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 3.5463732168044593, - unit: '{score}', - system: 'http://unitsofmeasure.org', - code: '{score}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/027e5906-0344-4b17-a4f9-4db71e6a31e9', - resource: { - resourceType: 'Observation', - id: '027e5906-0344-4b17-a4f9-4db71e6a31e9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:32.892-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '2571-8', - display: 'Triglycerides', - }, - ], - text: 'Triglycerides', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 149.75937036153712, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/4b3ae1c1-3ac4-44ce-8089-8f33705f20b9', - resource: { - resourceType: 'Observation', - id: '4b3ae1c1-3ac4-44ce-8089-8f33705f20b9', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:29.366-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '6298-4', - display: 'Potassium', - }, - ], - text: 'Potassium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/e2d78aad-2db4-4781-8620-abe3a40d4657', - }, - effectiveDateTime: '2014-04-23T15:22:39-04:00', - issued: '2014-04-23T15:22:39.163-04:00', - valueQuantity: { - value: 4.077825032230193, - unit: 'mmol/L', - system: 'http://unitsofmeasure.org', - code: 'mmol/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/a63afb6c-be3b-4c36-8ac0-008ebc071bd3', - resource: { - resourceType: 'Observation', - id: 'a63afb6c-be3b-4c36-8ac0-008ebc071bd3', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:27.093-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1742-6', - display: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - ], - text: 'Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/80a0a227-23a2-43a9-8c28-7fbd3da11ebf', - }, - effectiveDateTime: '2017-04-22T15:22:39-04:00', - issued: '2017-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 52.205826720459584, - unit: 'U/L', - system: 'http://unitsofmeasure.org', - code: 'U/L', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/1b252299-b100-4d78-adb7-19480fa5e2fa', - resource: { - resourceType: 'Observation', - id: '1b252299-b100-4d78-adb7-19480fa5e2fa', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:26.923-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'survey', - display: 'survey', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '72166-2', - display: 'Tobacco smoking status NHIS', - }, - ], - text: 'Tobacco smoking status NHIS', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueCodeableConcept: { - coding: [ - { - system: 'http://snomed.info/sct', - code: '266919005', - display: 'Never smoker', - }, - ], - text: 'Never smoker', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/cc17528d-2181-48a7-b4c0-c27f563abeb1', - resource: { - resourceType: 'Observation', - id: 'cc17528d-2181-48a7-b4c0-c27f563abeb1', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:25.340-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '18262-6', - display: 'Low Density Lipoprotein Cholesterol', - }, - ], - text: 'Low Density Lipoprotein Cholesterol', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/fe5dc56a-5415-4d59-8028-398eceecd18c', - }, - effectiveDateTime: '2014-04-07T15:22:39-04:00', - issued: '2014-04-07T15:22:39.163-04:00', - valueQuantity: { - value: 78.70398758373042, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/afeefab4-3a36-4f92-aeaa-4e93f6ccec14', - resource: { - resourceType: 'Observation', - id: 'afeefab4-3a36-4f92-aeaa-4e93f6ccec14', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:23.192-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '33914-3', - display: 'Estimated Glomerular Filtration Rate', - }, - ], - text: 'Estimated Glomerular Filtration Rate', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 108.89613682987466, - unit: 'mL/min/{1.73_m2}', - system: 'http://unitsofmeasure.org', - code: 'mL/min/{1.73_m2}', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/b5e4dea7-7863-4920-9436-dc047850f907', - resource: { - resourceType: 'Observation', - id: 'b5e4dea7-7863-4920-9436-dc047850f907', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:19.870-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '1751-7', - display: 'Albumin [Mass/volume] in Serum or Plasma', - }, - ], - text: 'Albumin [Mass/volume] in Serum or Plasma', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/b6b49b78-f305-46e6-aa2e-bd0b70494b05', - }, - effectiveDateTime: '2018-04-22T15:22:39-04:00', - issued: '2018-04-22T15:22:39.163-04:00', - valueQuantity: { - value: 5.351636691975524, - unit: 'g/dL', - system: 'http://unitsofmeasure.org', - code: 'g/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'https://r4.smarthealthit.org/Observation/dc066b4f-1176-47ac-87f5-30f8a7c55db3', - resource: { - resourceType: 'Observation', - id: 'dc066b4f-1176-47ac-87f5-30f8a7c55db3', - meta: { - versionId: '2', - lastUpdated: '2019-06-05T02:55:18.588-04:00', - tag: [ - { - system: 'https://smarthealthit.org/tags', - code: 'synthea-5-2019', - }, - ], - }, - status: 'final', - category: [ - { - coding: [ - { - system: 'http://terminology.hl7.org/CodeSystem/observation-category', - code: 'laboratory', - display: 'laboratory', - }, - ], - }, - ], - code: { - coding: [ - { - system: 'http://loinc.org', - code: '49765-1', - display: 'Calcium', - }, - ], - text: 'Calcium', - }, - subject: { - reference: 'Patient/494743a2-fea5-4827-8f02-c2b91e4a4c9e', - }, - encounter: { - reference: 'Encounter/98003be9-20d8-4d31-bf40-4c614f7dea1b', - }, - effectiveDateTime: '2016-04-11T15:22:39-04:00', - issued: '2016-04-11T15:22:39.163-04:00', - valueQuantity: { - value: 9.82297923272594, - unit: 'mg/dL', - system: 'http://unitsofmeasure.org', - code: 'mg/dL', - }, - }, - search: { - mode: 'match', - }, - response: { - status: '200 OK', - etag: 'W/"2"', - }, - }, - { - fullUrl: 'http://fhir.labs.smartregister.org/fhir/DocumentReference/1015', - resource: { - resourceType: 'DocumentReference', - id: '1015', - meta: { - versionId: '1', - lastUpdated: '2021-08-06T20:52:15.494+00:00', - source: '#f88469aadd55a8cc', - }, - status: 'current', - category: [ - { - coding: [ - { - system: - 'https://WorldHealthOrganization.github.io/ddcc/CodeSystem/DDCC-QR-Category-Usage-CodeSystem', - code: 'who', - }, - ], - }, - ], - subject: { - reference: 'Patient/969', - }, - date: '2021-08-04T15:01:52.008Z', - content: [ - { - attachment: { - contentType: 'image/png', - data: 'iVBORw4/6moboOm4rzlABABAgoAIAIEBABQBAoLoOFQAAcIYKAIAEARUAAAECKgAAAgRUAAAECKgAAAgQUAEAECCgAgAgQEAFAECAgAoAgAABFQAAAQIqAAACBFQAAAQIqAAACBBQAQAQIKACACDwPwTIOK+IP3y7AAAAAElFTkSuQmCC', - }, - format: { - system: - 'https://WorldHealthOrganization.github.io/ddcc/CodeSystem/DDCC-QR-Format-CodeSystem', - code: 'image', - }, - }, - { - attachment: { - contentType: 'application/json', - data: 'eyJuYW1lIjoiRWRkaWUgTXVycGh5IiwiYmlydGhEYXRlIjoiMTk4Ni0wOS0xOSIsImlkZW50aWZpZXIiOiIxMjM0NTY3ODkwIiwic2V4Ijp7ImNvZGUiOiJtYWxlIiwic3lzdGVtIjoiaHR0cDovL2hsNy5vcmcvZmhpci9hZG1pbmlzdHJhdGl2ZS1nZW5kZXIifSwidmFjY2luZSI6eyJjb2RlIjoiMTExOTM0OTAwNyIsInN5c3RlbSI6Imh0dHA6Ly9zbm9tZWQuaW5mby9zY3QifSwiYnJhbmQiOnsiY29kZSI6IlRFU1QiLCJzeXN0ZW0iOiJodHRwOi8vd29ybGRoZWFsdGhvcmdhbml6YXRpb24uZ2l0aHViLmlvL2RkY2MvQ29kZVN5c3RlbS9ERENDLUV4YW1wbGUtVGVzdC1Db2RlU3lzdGVtIn0sIm1hbnVmYWN0dXJlciI6eyJjb2RlIjoiVEVTVCIsInN5c3RlbSI6Imh0dHA6Ly93b3JsZGhlYWx0aG9yZ2FuaXphdGlvbi5naXRodWIuaW8vZGRjYy9Db2RlU3lzdGVtL0REQ0MtRXhhbXBsZS1UZXN0LUNvZGVTeXN0ZW0ifSwibWFfaG9sZGVyIjp7ImNvZGUiOiJURVNUIiwic3lzdGVtIjoiaHR0cDovL3dvcmxkaGVhbHRob3JnYW5pemF0aW9uLmdpdGh1Yi5pby9kZGNjL0NvZGVTeXN0ZW0vRERDQy1FeGFtcGxlLVRlc3QtQ29kZVN5c3RlbSJ9LCJsb3QiOiJQVDEyM0YiLCJkYXRlIjoiMjAyMS0wNy0wOCIsInZhY2NpbmVfdmFsaWQiOiIyMDIxLTA3LTIyIiwiZG9zZSI6MSwidG90YWxfZG9zZXMiOjIsImNvdW50cnkiOnsiY29kZSI6IlVTQSIsInN5c3RlbSI6InVybjppc286c3RkOmlzbzozMTY2In0sImNlbnRyZSI6IlZhY2NpbmF0aW9uIFNpdGUiLCJodyI6Imh0dHA6Ly93d3cuYWNtZS5vcmcvcHJhY3RpdGlvbmVycy8yMyIsImRpc2Vhc2UiOnsiY29kZSI6Ijg0MDUzOTAwNiIsInN5c3RlbSI6Imh0dHA6Ly9zbm9tZWQuaW5mby9zY3QifSwiZHVlX2RhdGUiOiIyMDIxLTA3LTI5IiwicGhhIjoid0E2OWc4VkQ1MTJUZlRUZGtUTlNzRyIsImhjaWQiOiJVUzExMTIyMjMzMzQ0NDU1NTY2NiIsInZhbGlkX2Zyb20iOiIyMDIxLTA3LTA4IiwidmFsaWRfdW50aWwiOiIyMDIyLTA3LTA4In0=', - }, - format: { - system: - 'https://WorldHealthOrganization.github.io/ddcc/CodeSystem/DDCC-QR-Format-CodeSystem', - code: 'serialized', - }, - }, - ], - }, - search: { - mode: 'match', - }, - }, - { - fullUrl: 'http://fhir.labs.smartregister.org/fhir/ImmunizationRecommendation/1016', - resource: { - resourceType: 'ImmunizationRecommendation', - id: '1016', - meta: { - versionId: '1', - lastUpdated: '2021-08-06T20:54:53.779+00:00', - source: '#9dda5e6faa977c8a', - }, - patient: { reference: 'Patient/969' }, - date: '2021-07-08', - recommendation: [ - { - vaccineCode: [{ coding: [{ system: 'http://snomed.info/sct', code: '1119349007' }] }], - targetDisease: { coding: [{ system: 'http://snomed.info/sct', code: '840539006' }] }, - forecastStatus: { - coding: [ - { - system: - 'http://terminology.hl7.org/2.1.0/CodeSystem-immunization-recommendation-status.html', - code: 'due', - }, - ], - }, - dateCriterion: [ - { - code: { coding: [{ system: 'http://loinc.org', code: '30980-7' }] }, - value: '2021-02-02', - }, - ], - doseNumberPositiveInt: 2, - seriesDosesPositiveInt: 2, + code: 'clinical-protocol', + display: 'Clinical Protocol', }, ], }, - search: { mode: 'match' }, + definitionCanonical: '#careplan-activity', + transform: 'https://fhir.labs.smartregister.org/fhir/StructureMap/131373', }, ], }; diff --git a/packages/fhir-client/src/components/PatientDetails/tests/index.test.tsx b/packages/fhir-client/src/components/PatientDetails/tests/index.test.tsx index c75c28b84..0da50f539 100644 --- a/packages/fhir-client/src/components/PatientDetails/tests/index.test.tsx +++ b/packages/fhir-client/src/components/PatientDetails/tests/index.test.tsx @@ -5,17 +5,29 @@ import { Route, Router, Switch } from 'react-router'; import * as reactQuery from 'react-query'; import { store } from '@opensrp/store'; import { createMemoryHistory } from 'history'; -import { patientDetails } from './fixtures'; +import { patientResourceDetails, planDefinitionResource } from './fixtures'; import { LIST_PATIENTS_URL } from '../../../constants'; import { cleanup, screen, - fireEvent, render, + waitFor, waitForElementToBeRemoved, + fireEvent, } from '@testing-library/react'; import nock from 'nock'; import { authenticateUser } from '@onaio/session-reducer'; +import { + patientCarePlans, + patientConditions, + patientEncounters, + patientImmunization, + patientTask, + resourceEntriesCount, +} from '../PopulatedTableTabs/tests/fixtures'; +import { last } from 'lodash'; +import { RoleContext } from '@opensrp/rbac'; +import { superUserRole } from '@opensrp/react-utils'; const { QueryClient, QueryClientProvider } = reactQuery; @@ -39,143 +51,421 @@ jest.mock('fhirclient', () => { const props = { fhirBaseURL: 'http://test.server.org', + path: `${LIST_PATIENTS_URL}/:id`, +}; + +beforeAll(() => { + store.dispatch( + authenticateUser( + true, + { + email: 'bob@example.com', + name: 'Bobbie', + username: 'RobertBaratheon', + }, + { api_token: 'hunter2', oAuth2Data: { access_token: 'sometoken', state: 'abcde' } } + ) + ); + nock.disableNetConnect(); +}); + +afterAll(() => { + nock.enableNetConnect(); +}); + +afterEach(() => { + nock.cleanAll(); + cleanup(); + jest.resetAllMocks(); + jest.clearAllMocks(); + jest.restoreAllMocks(); +}); + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const AppWrapper = (props: any) => { + return ( + + + + + {(routeProps) => ( + + + + )} + + + + + ); }; -describe('Patients list view', () => { - beforeAll(() => { - store.dispatch( - authenticateUser( - true, - { - email: 'bob@example.com', - name: 'Bobbie', - username: 'RobertBaratheon', - }, - { api_token: 'hunter2', oAuth2Data: { access_token: 'sometoken', state: 'abcde' } } - ) +it('renders patient details page correctly', async () => { + const patientId = patientResourceDetails.id; + const carePlanResource = patientCarePlans.entry[0].resource; + const carePlanId = carePlanResource.id; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}`); + + nock(props.fhirBaseURL).get(`/Patient/${patientId}`).reply(200, patientResourceDetails); + + nock(props.fhirBaseURL) + .get(`/CarePlan/_search`) + .query({ 'subject:Patient': patientId, _total: 'accurate', _getpagesoffset: 0, _count: 20 }) + .reply(200, patientCarePlans); + + nock(props.fhirBaseURL) + .get(`/CarePlan/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Condition/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Task/_search`) + .query({ _summary: 'count', patient: patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Immunization/_search`) + .query({ _summary: 'count', patient: patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL) + .get(`/Encounter/_search`) + .query({ _summary: 'count', 'subject:Patient': patientId }) + .reply(200, resourceEntriesCount); + + nock(props.fhirBaseURL).get(`/CarePlan/${carePlanId}`).reply(200, carePlanResource); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + await waitFor(() => { + expect(screen.getByRole('tablist').textContent).toBe( + 'Care plan 1Condition 1Task 1Immunization 1Patient encounter 1' ); - nock.disableNetConnect(); }); - afterAll(() => { - nock.enableNetConnect(); + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`patient breadCrum-${i}`); }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual('View details1'); + + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'First nameJohn', + 'Last nameDoe', + 'UUID', + 'Date of birth8/4/1988', + 'Phone+254722123456', + 'MRNUnknown', + 'Address213,One Pademore', + 'CountryKenya', + ]); + + const headerRightData = [...document.querySelectorAll('.singleKeyValue-pair__light')].map( + (keyValue) => keyValue.textContent + ); + expect(headerRightData).toEqual(['Date created3/10/2021, 1:27:48 PM']); + + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual( + 'ID: 1Gender: maleDate created3/10/2021, 1:27:48 PM' + ); + + // partially check if tabs were loaded + const carePlanTableData = document.querySelectorAll('.ant-table-tbody td'); + // side view + const viewBtn = last(carePlanTableData)?.querySelector('button') as Element; + fireEvent.click(viewBtn); + expect(history.location.search).toEqual('?sideView=131386'); + const fullDetailBtn = document.querySelector('.details-section a'); + fireEvent.click(fullDetailBtn as Element); + expect(history.location.pathname).toEqual( + `${LIST_PATIENTS_URL}/${patientId}/${carePlanResource.resourceType}/${carePlanId}` + ); +}); + +it('renders care plan resources correctly', async () => { + const newProps = { + ...props, + path: `${LIST_PATIENTS_URL}/:id/:resourceType/:resourceId`, + }; + const patientId = patientResourceDetails.id; + const carePlanResource = patientCarePlans.entry[0].resource; + const carePlanId = carePlanResource.id; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}/${carePlanResource.resourceType}/${carePlanId}`); + + // nock(props.fhirBaseURL).get(`/Patient/${patientId}`).reply(200, patientResourceDetails); + + nock(props.fhirBaseURL).get(`/CarePlan/${carePlanId}`).reply(200, carePlanResource); + + nock(props.fhirBaseURL) + .get(`/PlanDefinition/${planDefinitionResource.id}`) + .reply(200, planDefinitionResource); + + render( + + + + ); - afterEach(() => { - nock.cleanAll(); - cleanup(); - jest.resetAllMocks(); - jest.clearAllMocks(); - jest.restoreAllMocks(); + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`other resource breadCrum-${i}`); }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual( + 'View details131386' + ); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const AppWrapper = (props: any) => { - return ( - - - - - {(routeProps) => } - - - - - ); + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'Category', + 'Period5/26/2022-5/14/2025', + 'Statuscompleted', + 'Intentplan', + 'Canonical (PlanDefinition)Child Routine visit Plan', + 'AddressN/A', + 'DescriptionThis defines the schedule of care for patients under 5 years old', + ]); + + const headerRightData = [...document.querySelectorAll('.singleKeyValue-pair__light')].map( + (keyValue) => keyValue.textContent + ); + expect(headerRightData).toEqual(['Date created5/25/2022, 10:24:04 PM']); + + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual( + 'Id: 131386Date created5/25/2022, 10:24:04 PM' + ); +}); + +it('renders task resources correctly', async () => { + const newProps = { + ...props, + path: `${LIST_PATIENTS_URL}/:id/:resourceType/:resourceId`, }; + const patientId = patientResourceDetails.id; + const resourceData = patientTask.entry[0].resource; + const { id, resourceType } = resourceData; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}/${resourceType}/${id}`); - it('renders correctly', async () => { - const history = createMemoryHistory(); - history.push(`${LIST_PATIENTS_URL}/${patientDetails.id}`); + nock(props.fhirBaseURL).get(`/Task/${id}`).reply(200, resourceData); - nock(props.fhirBaseURL) - .get(`/Patient/${patientDetails.id}/$everything`) - .query({ _count: 1000 }) - .reply(200, patientDetails); + render( + + + + ); - render( - - - - ); + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); - await waitForElementToBeRemoved(document.querySelector('.ant-spin')); - - document.querySelectorAll('.patient-detail__key-value').forEach((keyValue) => { - expect(keyValue).toMatchSnapshot('Patient key value details'); - }); - - // click on documentReference button - const docReferenceBtn = document.querySelector('li#DocumentReference'); - fireEvent.click(docReferenceBtn); - - const firstAndOnlyReference = screen.getByText(/^1015$/); - expect(firstAndOnlyReference).toMatchSnapshot('reference collapse item'); - fireEvent.click(firstAndOnlyReference); - - const docReferenceValues = document.querySelectorAll('.fhir-ui__Value'); - expect(docReferenceValues).toHaveLength(1); - docReferenceValues.forEach((reference) => { - expect(reference).toMatchSnapshot('Doc reference values'); - }); - - // click on immunizationRecommendation button - const immunizationRecommendationBtn = document.querySelector('li#ImmunizationRecommendation'); - fireEvent.click(immunizationRecommendationBtn); - - document.querySelectorAll('tr').forEach((tr, idx) => { - tr.querySelectorAll('td').forEach((td) => { - expect(td).toMatchSnapshot(`table row ${idx} page 1`); - }); - }); - - // see sort direction in Observations. - const observationMenuItem = document.querySelector('li#Observation'); - fireEvent.click(observationMenuItem); - - // generally see the table view - document.querySelectorAll('table tr').forEach((tr) => { - const tdsText = Array.from(tr.querySelectorAll('td')) - .map((td) => td.textContent) - .join(' | '); - expect(tdsText).toMatchSnapshot('Observation table row'); - }); - - // unsorted state. Observation Issue Date - const unsorted = Array.from(document.querySelectorAll('table tr td:nth-child(4)')).map( - (td) => td.textContent - ); - expect(unsorted).toEqual(['4/16/2018', '4/11/2016', '3/29/2010', '4/7/2014', '4/2/2012']); + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`other resource breadCrum-${i}`); + }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual( + 'View details14205' + ); - const sortCaret = document.querySelector('.anticon-caret-up'); - fireEvent.click(sortCaret); + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'Period9/30/2021-10/1/2021', + 'Priority', + 'Statuscompleted', + 'Business status', + 'Intentorder', + 'reason', + 'DescriptionHygiene Visit', + ]); - const sorted = Array.from(document.querySelectorAll('table tr td:last-of-type')).map( - (td) => td.textContent - ); - // there are 192 observations, table only shows the first 5. - expect(sorted).toEqual(['3/29/2010', '3/29/2010', '3/29/2010', '3/29/2010', '3/29/2010']); + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual( + 'Id: 14205Date created3/11/2016, 2:39:32 AM' + ); +}); + +it('renders condition resources correctly', async () => { + const newProps = { + ...props, + path: `${LIST_PATIENTS_URL}/:id/:resourceType/:resourceId`, + }; + const patientId = patientResourceDetails.id; + const resourceData = patientConditions.entry[0].resource; + const { id, resourceType } = resourceData; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}/${resourceType}/${id}`); - expect(nock.isDone()).toBeTruthy(); + nock(props.fhirBaseURL).get(`/Condition/${id}`).reply(200, resourceData); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`other resource breadCrum-${i}`); }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual( + 'View details349d8947-3009-4fb3-b3d5-99ff30aa5614' + ); - it('shows broken page if fhir api is down', async () => { - const history = createMemoryHistory(); - history.push(`${LIST_PATIENTS_URL}/${patientDetails.id}`); + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'Condition77386006', + 'Severity', + 'Category', + 'stage', + 'Onset date', + 'Abatement date', + 'Clinical statusactive', + 'Verification statusconfirmed', + ]); - nock(props.fhirBaseURL) - .get(`/Patient/${patientDetails.id}/$everything`) - .query({ _count: 1000 }) - .replyWithError('Something went wrong'); + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual( + 'Id: 349d8947-3009-4fb3-b3d5-99ff30aa5614Date created12/14/2021, 2:40:38 PM' + ); +}); - render( - - - - ); +it('renders immunization resources correctly', async () => { + const newProps = { + ...props, + path: `${LIST_PATIENTS_URL}/:id/:resourceType/:resourceId`, + }; + const patientId = patientResourceDetails.id; + const resourceData = patientImmunization.entry[0].resource; + const { id, resourceType } = resourceData; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}/${resourceType}/${id}`); + + nock(props.fhirBaseURL).get(`/Immunization/${id}`).reply(200, resourceData); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); - await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`other resource breadCrum-${i}`); + }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual( + 'View details979' + ); + + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'Vaccine AdmnisteredSARSCoV2 mRNA vaccine', + 'Administration Date7/8/2021', + 'Vaccine expiry date12/15/2018', + 'protocol applied1', + 'Dose quantity', + 'statuscompleted', + 'Primary source', + 'Report originrecord', + 'Reason', + ]); + + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual('Id: 979Date created7/29/2021, 9:37:03 AM'); +}); + +it('renders patientEncounter resources correctly', async () => { + const newProps = { + ...props, + path: `${LIST_PATIENTS_URL}/:id/:resourceType/:resourceId`, + }; + const patientId = patientResourceDetails.id; + const resourceData = patientEncounters.entry[0].resource; + const { id, resourceType } = resourceData; + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientId}/${resourceType}/${id}`); + + nock(props.fhirBaseURL).get(`/Encounter/${id}`).reply(200, resourceData); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); - expect(screen.getByText(/There was a problem fetching the patient/)).toBeInTheDocument(); + const breadcrumb = document.querySelectorAll('.ant-breadcrumb li'); + breadcrumb.forEach((list, i) => { + expect(list.innerHTML).toMatchSnapshot(`other resource breadCrum-${i}`); }); + expect(document.querySelector('.ant-page-header-heading')?.textContent).toEqual( + 'View detailsa1f3a048-8863-42b7-9d2e-2e9efbbca9a8' + ); + + const bodyElementValues = [...document.querySelectorAll('.singleKeyValue-pair__default')].map( + (keyValue) => keyValue.textContent + ); + expect(bodyElementValues).toEqual([ + 'ClassAMB', + 'Type', + 'Priority', + 'Reason', + 'PeriodInvalid Date-Invalid Date', + 'Service provider', + 'Encounter Duration', + 'Service Type581', + 'Episode of care', + ]); + + const headerLeftElementValues = document.querySelector('.header-bottom'); + expect(headerLeftElementValues?.textContent).toEqual('Id: a1f3a048-8863-42b7-9d2e-2e9efbbca9a8'); +}); + +it('shows broken page if fhir api is down', async () => { + const history = createMemoryHistory(); + history.push(`${LIST_PATIENTS_URL}/${patientResourceDetails.id}`); + + nock(props.fhirBaseURL).get(`/Patient/${patientResourceDetails.id}`).replyWithError({ + message: 'something awful happened', + code: 'AWFUL_ERROR', + }); + + render( + + + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + + expect(screen.getByText(/something awful happened/)).toBeInTheDocument(); }); diff --git a/packages/fhir-client/src/components/PatientDetails/utils.tsx b/packages/fhir-client/src/components/PatientDetails/utils.tsx new file mode 100644 index 000000000..a424662e1 --- /dev/null +++ b/packages/fhir-client/src/components/PatientDetails/utils.tsx @@ -0,0 +1,116 @@ +import React from 'react'; +import type { TFunction } from '@opensrp/i18n'; +import { FHIRServiceClass, ResourceDetailsProps } from '@opensrp/react-utils'; +import { IResource } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IResource'; +import { Button } from 'antd'; +import { CloseOutlined } from '@ant-design/icons'; +import { Link } from 'react-router-dom'; +import { IImmunization } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IImmunization'; +import { IEncounter } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IEncounter'; +import { ICondition } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICondition'; +import { ITask } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ITask'; +import { ICarePlan } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/ICarePlan'; +import { + LIST_PATIENTS_URL, + carePlanResourceType, + conditionResourceType, + encounterResourceType, + immunizationResourceType, + patientResourceType, + taskResourceType, +} from '../../constants'; +import { patientDetailsProps } from './ResourceSchema/Patient'; +import { Dictionary } from '@onaio/utils'; +import { conditionDetailsProps } from './ResourceSchema/Condition'; +import { carePlanDetailsProps } from './ResourceSchema/CarePlan'; +import { immunizationDetailProps } from './ResourceSchema/Immunization'; +import { encounterDetailProps } from './ResourceSchema/Encounter'; +import { taskDetailsProps } from './ResourceSchema/Task'; + +export type ResourceTypes = ICarePlan | ICondition | ITask | IImmunization | IEncounter; + +/** + * Gets default patient resource search param + * + * @param resourceId - Patient resource identifier + */ +export const defaultSearchParamsFactory = (resourceId: string) => { + return { 'subject:Patient': resourceId }; +}; + +/** + * Build resource query + * + * @param fhirBaseURL - base url + * @param resourceType - resource type + * @param resourceId - resource id + */ +export function queryParamsFactory( + fhirBaseURL: string, + resourceType: string, + resourceId: string +) { + const resourceQueryParams = { + queryKey: [resourceType, resourceId], + queryFn: async () => new FHIRServiceClass(fhirBaseURL, resourceType).read(resourceId), + }; + return resourceQueryParams; +} + +type PreviewDataExtractor = (resource: T, t: TFunction) => ResourceDetailsProps; + +/** + * get tab table side prevew data + * + * @param patientId - patient resource Id + * @param dataExtractor - Function to extract preview data + * @param cancelHanlder - on cancel click handler + */ +export function sidePreviewDetailsExtractor( + patientId: string, + dataExtractor: PreviewDataExtractor, + cancelHanlder: () => void +) { + // eslint-disable-next-line react/display-name + return (resource: T, t: TFunction) => { + const { resourceType, id } = resource; + const data = dataExtractor(resource, t); + const headerActions = ( +
`; @@ -110,12 +126,15 @@ exports[`renders correctly in list view: table row 2 page 1 5`] = ` - - View - + + View + + `; @@ -166,12 +185,15 @@ exports[`renders correctly in list view: table row 3 page 1 5`] = ` - - View - + + View + + `; @@ -227,12 +249,15 @@ exports[`renders correctly in list view: table row 4 page 1 5`] = ` - - View - + + View + + `; diff --git a/packages/fhir-client/src/components/PatientsList/tests/index.test.tsx b/packages/fhir-client/src/components/PatientsList/tests/index.test.tsx index 7de5629be..af7d57b39 100644 --- a/packages/fhir-client/src/components/PatientsList/tests/index.test.tsx +++ b/packages/fhir-client/src/components/PatientsList/tests/index.test.tsx @@ -12,6 +12,7 @@ import { cleanup, render, screen } from '@testing-library/react'; import { patients, sortedAscPatients, sortedDescPatients } from './fixtures'; import userEvents from '@testing-library/user-event'; import { LIST_PATIENTS_URL, patientResourceType } from '../../../constants'; +import { patientResourceDetails } from '../../PatientDetails/tests/fixtures'; jest.mock('fhirclient', () => { return jest.requireActual('fhirclient/lib/entry/browser'); @@ -117,7 +118,7 @@ test('renders correctly in list view', async () => { await waitForElementToBeRemoved(document.querySelector('.ant-spin')); - expect(document.querySelector('.page-header')).toMatchSnapshot('Header title'); + expect(document.querySelector('.site-page-header')).toMatchSnapshot('Header title'); document.querySelectorAll('tr').forEach((tr, idx) => { tr.querySelectorAll('td').forEach((td) => { @@ -125,6 +126,17 @@ test('renders correctly in list view', async () => { }); }); + // partial side View test + nock(props.fhirBaseURL).get(`/Patient/${1}`).reply(200, patientResourceDetails); + const patientOneView = screen.getByTestId('1'); + fireEvent.click(patientOneView as Element); + await waitForElementToBeRemoved(document.querySelector('.ant-alert-content')); + expect(history.location.search).toEqual('?viewDetails=1'); + const closeBtn = screen.findByTestId('cancel'); + fireEvent.click(await closeBtn); + expect(history.location.pathname).toEqual(LIST_PATIENTS_URL); + expect(history.location.search).toEqual(''); + // test search // works with search as well. const searchForm = document.querySelector('[data-testid="search-form"]'); diff --git a/packages/fhir-client/src/components/PatientsList/utils.tsx b/packages/fhir-client/src/components/PatientsList/utils.tsx index a54a9a11c..9503220ed 100644 --- a/packages/fhir-client/src/components/PatientsList/utils.tsx +++ b/packages/fhir-client/src/components/PatientsList/utils.tsx @@ -3,6 +3,18 @@ import get from 'lodash/get'; import { IPatient } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPatient'; import { parseFhirHumanName } from '@opensrp/react-utils'; +export enum PatientStatus { + ACTIVE = 'Active', + InACTIVE = 'Inactive', + DECEASED = 'Deceased', +} + +export const patientStatusColor = { + [PatientStatus.ACTIVE]: 'green', + [PatientStatus.InACTIVE]: 'gray', + [PatientStatus.DECEASED]: 'red', +}; + /** * util to extract patient name * @@ -66,3 +78,19 @@ export function buildObservationValueString(obj: Dictionary): string { } return quantValue; } + +/** + * Function to get patient status based on active and deceased status + * + * @param {boolean} isActive - Patient active status + * @param {boolean} isDeceased - Patient deceased status + */ +export const getPatientStatus = (isActive: boolean, isDeceased: boolean) => { + if (isDeceased) { + return PatientStatus.DECEASED; + } + if (isActive) { + return PatientStatus.ACTIVE; + } + return PatientStatus.InACTIVE; +}; diff --git a/packages/fhir-client/src/constants.ts b/packages/fhir-client/src/constants.ts index 6199edba9..f3ab18442 100644 --- a/packages/fhir-client/src/constants.ts +++ b/packages/fhir-client/src/constants.ts @@ -1,5 +1,11 @@ export const dateFormat = 'yyyy-MM-dd'; export const patientResourceType = 'Patient'; +export const carePlanResourceType = 'CarePlan'; +export const immunizationResourceType = 'Immunization'; +export const encounterResourceType = 'Encounter'; +export const conditionResourceType = 'Condition'; +export const taskResourceType = 'Task'; +export const planDefinitionType = 'PlanDefinition'; // urls export const LIST_PATIENTS_URL = '/fhir/Patient'; diff --git a/packages/fhir-client/src/helpers/utils.tsx b/packages/fhir-client/src/helpers/utils.tsx index 9ea702e2e..0cc18f4eb 100644 --- a/packages/fhir-client/src/helpers/utils.tsx +++ b/packages/fhir-client/src/helpers/utils.tsx @@ -58,7 +58,7 @@ export const FhirCodesTooltips = ({ codings }: { codings?: Coding[] }) => { {(codings ?? []).map((coding) => { return ( - {coding.display} + {coding.display || coding.code} ); })} diff --git a/packages/fhir-flag/README.md b/packages/fhir-flag/README.md new file mode 100644 index 000000000..eef584f91 --- /dev/null +++ b/packages/fhir-flag/README.md @@ -0,0 +1,11 @@ +# Fhir Flag + + + +Views that help update and manage fhir flag resources. + +## Installation + +```sh +yarn add @opensrp/fhir-flag +``` diff --git a/packages/fhir-flag/package.json b/packages/fhir-flag/package.json new file mode 100644 index 000000000..0a66382f7 --- /dev/null +++ b/packages/fhir-flag/package.json @@ -0,0 +1,51 @@ +{ + "name": "@opensrp/fhir-flag", + "version": "0.0.1", + "description": "", + "main": "dist/index.js", + "types": "dist/types", + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/opensrp/web", + "scripts": { + "test": "run -T test $INIT_CWD --verbose", + "tsc": "run -T tsc", + "lint": "run -T eslint ./**/*.{js,jsx,ts,tsx}", + "copy": "run -T copyfiles -u 1 \"./src/**/*.{css,html}\" \"./dist/\"", + "build": "run tsc && run transpile && run copy", + "transpile": "run -T babel src -d dist --root-mode upward --extensions .ts,.tsx --ignore '**/*.test.ts,**/*.test.tsx,**/tests,**/__tests__'" + }, + "jest": { + "automock": false, + "setupFiles": [ + "../../setupTests" + ] + }, + "bugs": { + "url": "https://github.com/opensrp/web/issues" + }, + "peerDependencies": { + "@opensrp/i18n": "^0.0.1", + "antd": "^5.5.1", + "react": "^17.0.0 ", + "react-dom": "17.0.0", + "react-query": "^3.34.8", + "react-redux": "^7.2.1", + "react-router": "^5.2.0", + "react-router-dom": "^5.2.0" + }, + "author": "OpenSRP Engineering", + "license": "Apache-2.0", + "dependencies": { + "@onaio/session-reducer": "^0.0.13", + "@opensrp/fhir-helpers": "workspace:^", + "@opensrp/notifications": "workspace:^", + "@opensrp/pkg-config": "workspace:^", + "@opensrp/react-utils": "workspace:^", + "uuid": "^10.0.0" + } +} diff --git a/packages/fhir-flag/src/components/BaseComponent/index.tsx b/packages/fhir-flag/src/components/BaseComponent/index.tsx new file mode 100644 index 000000000..468aeeb91 --- /dev/null +++ b/packages/fhir-flag/src/components/BaseComponent/index.tsx @@ -0,0 +1,93 @@ +import React from 'react'; +import { useParams } from 'react-router'; +import { FlagResourceType, PractitionerResourceType } from '@opensrp/fhir-helpers'; +import { Col, Row, Spin } from 'antd'; +import { useQuery } from 'react-query'; +import { FHIRServiceClass, BrokenPage, getResourcesFromBundle } from '@opensrp/react-utils'; +import type { IFlag } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IFlag'; +import ProductFlag from '../ProductFlag'; +import LocationFlag from '../LocationFlag'; +import { useSelector } from 'react-redux'; +import { getExtraData } from '@onaio/session-reducer'; +import { IBundle } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IBundle'; +import { IPractitioner } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IPractitioner'; +import { useTranslation } from '../../mls'; +import { thatiMinutes } from '../../constants'; + +export interface CloseFlagProps { + fhirBaseURL: string; +} + +export interface RouteParams { + id?: string; +} + +export const CloseFlag = (props: CloseFlagProps) => { + const { fhirBaseURL: fhirBaseUrl } = props; + const { t } = useTranslation(); + + const extraData = useSelector((state) => { + return getExtraData(state); + }); + // eslint-disable-next-line @typescript-eslint/naming-convention + const { user_id } = extraData; + + const { id: flagId } = useParams(); + + const flag = useQuery( + [FlagResourceType, flagId], + async () => + new FHIRServiceClass(fhirBaseUrl, FlagResourceType).read(`${flagId as string}`), + { + enabled: !!flagId, + staleTime: thatiMinutes, + } + ); + + const practitioner = useQuery( + [PractitionerResourceType, user_id], + () => + new FHIRServiceClass(fhirBaseUrl, PractitionerResourceType).list({ + identifier: user_id, + }), + { + enabled: !!user_id, + staleTime: thatiMinutes, + select: (response) => { + return getResourcesFromBundle(response)?.[0]; + }, + } + ); + + if (flag.isLoading || practitioner.isLoading) { + return ; + } + if (flag.error && !flag.data) { + return ; + } + if (practitioner.error && !practitioner.data) { + return ( + + ); + } + + const commonProps = { + practitionerId: practitioner.data?.id as string, + fhirBaseUrl: fhirBaseUrl, + flag: flag.data as IFlag, + }; + + return ( + + + {flag.data?.subject?.reference?.includes('Location') ? ( + + ) : ( + + )} + + + ); +}; + +export default CloseFlag; diff --git a/packages/fhir-flag/src/components/BaseComponent/tests/index.test.tsx b/packages/fhir-flag/src/components/BaseComponent/tests/index.test.tsx new file mode 100644 index 000000000..6dd3c8444 --- /dev/null +++ b/packages/fhir-flag/src/components/BaseComponent/tests/index.test.tsx @@ -0,0 +1,99 @@ +import React from 'react'; +import { store } from '@opensrp/store'; +import { createMemoryHistory } from 'history'; +import { Router, Route } from 'react-router'; +import { screen, render, waitForElementToBeRemoved, cleanup } from '@testing-library/react'; +import { QueryClientProvider, QueryClient } from 'react-query'; +import { Provider } from 'react-redux'; +import { CloseFlag } from '..'; +import { RoleContext } from '@opensrp/rbac'; +import { superUserRole } from '@opensrp/react-utils'; +import { flag, practitionerBundle } from '../../Utils/tests/fixtures'; +import nock from 'nock'; +import { authenticateUser } from '@onaio/session-reducer'; +import { FlagResourceType, PractitionerResourceType } from '@opensrp/fhir-helpers'; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + cacheTime: 0, + }, + }, +}); + +jest.mock('fhirclient', () => { + return jest.requireActual('fhirclient/lib/entry/browser'); +}); + +const fhirBaseURL = 'http://test.server.org'; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const AppWrapper = (props: any) => ( + + + + + + + + + +); + +afterEach(() => { + cleanup(); + jest.clearAllMocks(); + nock.cleanAll(); +}); + +beforeAll(() => { + nock.disableNetConnect(); + store.dispatch( + authenticateUser( + true, + { + email: 'bob@example.com', + name: 'Bobbie', + username: 'RobertBaratheon', + }, + { + api_token: 'hunter2', + oAuth2Data: { access_token: 'sometoken', state: 'abcde' }, + user_id: 'bobbie', + } + ) + ); +}); + +afterAll(() => { + nock.enableNetConnect(); +}); + +test('renders correctly and fetches data', async () => { + const history = createMemoryHistory(); + history.push('/close-flag/flagId'); + + const scope = nock(fhirBaseURL) + .get(`/${FlagResourceType}/flagId`) + .reply(200, flag) + .get(`/${PractitionerResourceType}/_search`) + .query({ + identifier: 'bobbie', + }) + .reply(200, practitionerBundle) + .persist(); + + render( + + + ); + + ); + + await waitForElementToBeRemoved(document.querySelector('.ant-spin')); + + expect(screen.getByText('An error occurred while fetching the inventory')).toBeInTheDocument(); + + expect(scope.isDone()).toBeTruthy(); +}); diff --git a/packages/fhir-flag/src/components/CloseFlagForm/index.tsx b/packages/fhir-flag/src/components/CloseFlagForm/index.tsx new file mode 100644 index 000000000..bca00e60e --- /dev/null +++ b/packages/fhir-flag/src/components/CloseFlagForm/index.tsx @@ -0,0 +1,106 @@ +import React, { useMemo } from 'react'; +import { Select, Button, Form, Input, Col, Row } from 'antd'; +import { BodyLayout } from '@opensrp/react-utils'; +import { formItemLayout, tailLayout } from '@opensrp/react-utils'; +import { CloseFlagFormFields } from '../Utils/utils'; +import { useMutation } from 'react-query'; +import { sendErrorNotification, sendSuccessNotification } from '@opensrp/notifications'; +import { useTranslation } from '../../mls'; +import { comments, locationName, productName, status } from '../../constants'; +import { IFlag } from '@smile-cdr/fhirts/dist/FHIR-R4/interfaces/IFlag'; + +const { Item: FormItem } = Form; +const { TextArea } = Input; + +export interface CloseFlagFormProps { + initialValues: CloseFlagFormFields; + flag: IFlag; + mutationEffect: ( + initialValues: CloseFlagFormFields, + values: CloseFlagFormFields, + activeFlag: IFlag + ) => Promise; +} + +const defaultProps = { + initialValues: {}, + disabled: [], +}; + +const headerProps = { + pageHeaderProps: { + title: 'Close Flag', + onBack: undefined, + }, +}; + +const CloseFlagForm = (props: CloseFlagFormProps) => { + const { initialValues, flag, mutationEffect } = props; + const { t } = useTranslation(); + + const stableInitialValues = useMemo(() => initialValues, [initialValues]); + + const { mutate, isLoading } = useMutation( + (values: CloseFlagFormFields) => { + return mutationEffect(stableInitialValues, values, flag); + }, + { + onError: () => { + sendErrorNotification(t('Error Occurred When Closing Flag')); + }, + onSuccess: async () => { + sendSuccessNotification(t('Flag Closed successfully')); + }, + } + ); + + const statusOptions = [ + { label: t('Active'), value: 'active' }, + { label: t('Inactive'), value: 'inactive' }, + ]; + + const handleFinish = (values: CloseFlagFormFields) => { + mutate(values); + }; + + return ( + + + +
+ + + + + + + + + +