From 035cf00c3faa448ac9605beda8637826ed9aec72 Mon Sep 17 00:00:00 2001 From: Mary McGrath Date: Mon, 25 Nov 2024 10:07:12 -0500 Subject: [PATCH] fix: abnormal flag display (#2941) --- containers/ecr-viewer/src/app/api/fhirPath.yml | 2 +- .../ecr-viewer/src/app/tests/assets/BundleLab.json | 13 ++++++++++++- .../components/__snapshots__/LabInfo.test.tsx.snap | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/containers/ecr-viewer/src/app/api/fhirPath.yml b/containers/ecr-viewer/src/app/api/fhirPath.yml index 94d22d267b..344fb9e4ef 100644 --- a/containers/ecr-viewer/src/app/api/fhirPath.yml +++ b/containers/ecr-viewer/src/app/api/fhirPath.yml @@ -125,7 +125,7 @@ specimenSource: "Observation.extension[0].extension.where(url = 'specimen source observationReferenceValue: "Observation.extension[0].extension.where(url = 'observation entry reference value').valueString" observationComponent: "code.coding.display.first()" # observationValue logic: () -observationValue: (valueQuantity.value.toString() | valueString | valueCodeableConcept.coding.display | iif(valueQuantity.unit.exists(), iif(valueQuantity.unit = '%', valueQuantity.unit, ' ' | valueQuantity.unit), '') | iif(interpretation.coding.display.exists(), ' (' | interpretation.coding.display | ')', '')).join('') +observationValue: (valueQuantity.value.toString() | valueString | valueCodeableConcept.coding.display | iif(valueQuantity.unit.exists(), iif(valueQuantity.unit = '%', valueQuantity.unit, ' ' + valueQuantity.unit), '') | iif(interpretation.coding.display.exists(), ' (' + interpretation.coding.display + ')', '')).join('') observationReferenceRange: "referenceRange.text" observationDeviceReference: "device.reference" observationNote: "note.text" diff --git a/containers/ecr-viewer/src/app/tests/assets/BundleLab.json b/containers/ecr-viewer/src/app/tests/assets/BundleLab.json index e77a11106d..5136dc422d 100644 --- a/containers/ecr-viewer/src/app/tests/assets/BundleLab.json +++ b/containers/ecr-viewer/src/app/tests/assets/BundleLab.json @@ -440,12 +440,23 @@ ] }, "effectiveDateTime": "2022-09-28T21:00:53Z", - "valueString": "Not Detected", + "valueString": "Abnormal", "referenceRange": [ { "text": "Not Detected" } ], + "interpretation": [ + { + "coding": [ + { + "code": "A", + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "display": "Abnormal" + } + ] + } + ], "extension": [ { "url": "http://hl7.org/fhir/R4/specimen.html", diff --git a/containers/ecr-viewer/src/app/tests/components/__snapshots__/LabInfo.test.tsx.snap b/containers/ecr-viewer/src/app/tests/components/__snapshots__/LabInfo.test.tsx.snap index 78645cf1e7..a303f815c6 100644 --- a/containers/ecr-viewer/src/app/tests/components/__snapshots__/LabInfo.test.tsx.snap +++ b/containers/ecr-viewer/src/app/tests/components/__snapshots__/LabInfo.test.tsx.snap @@ -293,7 +293,7 @@ Burbank, CA - Not Detected + Abnormal (Abnormal)