Note: No seed data has been stamped yet with condition codes via the trigger-code-reference service. You can test this by:
[ ] Running the trigger-code-reference service on an eICR
eICR to try:61f13d32-b25c-4fb6-998b-73de2dbf87f2. This particular eCR should stamp 10 resources: 1 Condition and 9 Observations
Check /containers/trigger-code-reference/description.md for running the service from Python
[ ] Add the output FHIR bundle to your local db
[ ] Check the resulting eCR viewer of the bundle, and add &snomed-code=840539006 (COVID) as a URL search param. This should bubble up relevant COVID labs to the eCR summary.
For 61f13d32-b25c-4fb6-998b-73de2dbf87f2, it should bubble up 6 lab reports labeled SARS-CoV-2 PCR
PULL REQUEST
Summary
Adds relevant lab results to the eCR Summary section
evaluateEcrSummaryRelevantLabResults
: which filters for the relevant lab results given a SNOMED code and returns the relevant labs element(s).Related Issue
Fixes #1157
Screenshots
Given a valid SNOMED code![Screenshot 2024-06-21 at 14 37 57](https://github.com/CDCgov/phdi/assets/40042932/cec4afe3-a561-4296-8609-e8abdf56a974)
Loom of relevant labs https://github.com/CDCgov/phdi/assets/40042932/4d3fdaf4-8985-4ba2-8ad7-8abee4523ac8
Given an absent or invalid SNOMED code![Screenshot 2024-06-21 at 14 37 34](https://github.com/CDCgov/phdi/assets/40042932/26913fa8-1c18-4898-b2a4-e796688ed967)
Checklist
Note: No seed data has been stamped yet with condition codes via the trigger-code-reference service. You can test this by:
trigger-code-reference
service on an eICR61f13d32-b25c-4fb6-998b-73de2dbf87f2
. This particular eCR should stamp 10 resources: 1 Condition and 9 Observations/containers/trigger-code-reference/description.md
for running the service from Python&snomed-code=840539006
(COVID) as a URL search param. This should bubble up relevant COVID labs to the eCR summary.61f13d32-b25c-4fb6-998b-73de2dbf87f2
, it should bubble up 6 lab reports labeledSARS-CoV-2 PCR