Skip to content

Commit

Permalink
adds country to patient info for ecr view (#3045)
Browse files Browse the repository at this point in the history
* adds country to patient info for ecr view

* update snapshot

* updates snapshots for test
  • Loading branch information
akintner authored Dec 18, 2024
1 parent 29a88f2 commit 7b7e8be
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions containers/ecr-viewer/src/app/api/fhirPath.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ patientNameList: "Bundle.entry.resource.where(resourceType = 'Patient').name"
patientAddressList: "Bundle.entry.resource.where(resourceType = 'Patient').address"
patientTelecom: "Bundle.entry.resource.where(resourceType = 'Patient').telecom"
patientCounty: "Bundle.entry.resource.where(resourceType = 'Patient').address.first().county"
patientCountry: "Bundle.entry.resource.where(resourceType = 'Patient').address.first().country"

patientIds: "Bundle.entry.resource.where(resourceType = 'Patient').identifier.where(system != 'urn:ietf:rfc:3986').value.join('\n')"
patientDOB: "Bundle.entry.resource.where(resourceType = 'Patient').birthDate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ export const evaluateDemographicsData = (
title: "County",
value: evaluate(fhirBundle, mappings.patientCounty)[0],
},
{
title: "Country",
value: evaluate(fhirBundle, mappings.patientCountry)[0],
},
{
title: "Contact",
value: formatContactPoint(evaluate(fhirBundle, mappings.patientTelecom)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ describe("Demographics", () => {
title: "County",
value: "test",
},
{
title: "Country",
value: "USA",
},
{ title: "Contact", value: "test contact" },
{
title: "Emergency Contact",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,25 @@ exports[`Snapshot test for Accordion Content Given no data, info message for emp
class="section__line_gray"
/>
</div>
<div>
<div
class="grid-row"
>
<div
class="data-title padding-right-1"
>
Country
</div>
<div
class="grid-col maxw7 text-pre-line p-list text-italic text-base"
>
No data
</div>
</div>
<div
class="section__line_gray"
/>
</div>
<div>
<div
class="grid-row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,25 @@ exports[`Demographics should match snapshot 1`] = `
class="section__line_gray"
/>
</div>
<div>
<div
class="grid-row"
>
<div
class="data-title padding-right-1"
>
Country
</div>
<div
class="grid-col maxw7 text-pre-line p-list"
>
USA
</div>
</div>
<div
class="section__line_gray"
/>
</div>
<div>
<div
class="grid-row"
Expand Down

0 comments on commit 7b7e8be

Please sign in to comment.