CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
72 stars 40 forks source link

HL7 messages unable to default and undesired expansion of fields #4793

Closed jbiskie closed 2 years ago

jbiskie commented 2 years ago

Problem statement

WA review of messages for Prescriptive and Medical Network Solutions uncovered some issues with our handling of messages from HL7 senders.

What you need to know

Missing MSH-3.2 and 3.3

Current

MSH|^~\&|PHX.ProviderReportingService|7uycso49^1.3.6.1.4.1.38630.2.1.1.519^ISO| ...

Desired

MSH|^~\&|CDC PRIME - Atlanta, Georgia (Dekalb)^2.16.840.1.114222.4.1.237821^ISO|7uycso49^1.3.6.1.4.1.38630.2.1.1.519^ISO| ...

The incoming message contains PHX.ProviderReportingService. Defaulting the value to CDC PRIME+OID in the schema is not working as expected with HL7.

OBR-25 unnecessary elements

Current

OBR|1|03016507^Meany Middle School^50D2252725^CLIA|03016507^Meany Middle School^50D2252725^CLIA|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.68|||202203042159+0000|202203042159+0000||||||||00000^530771003612^Meany Middle School^^^^^^^^^^NPI|2064132100^WPN^PH^^^206^4132100|||||202203042159+0000|||F^Final results^HL70123

Desired

OBR|1|03016507^Meany Middle School^50D2252725^CLIA|03016507^Meany Middle School^50D2252725^CLIA|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.68|||202203042159+0000|202203042159+0000||||||||00000^530771003612^Meany Middle School^^^^^^^^^^NPI|2064132100^WPN^PH^^^206^4132100|||||202203042159+0000|||F

The incoming message contains F in OBR-25. Note that it's getting expanded to F^Final results^HL70123. Changing the field to type ID in the schema does not resolve the issue.

OBX-2 and OBX-11 unnecessary elements

Current

OBX|1|CWE^Coded With Exceptions^HL70125|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.68|1|260415000^Not detected^SCT|||N^Normal (applies to non-numeric results)^HL70078^^^^2.7|||F^Final results; Can only be changed with a corrected result^HL70085|||202203042159+0000|50D2252725^Meany Middle School^CLIA||10811877011290_DIT^BinaxNOW COVID-19 Ag Card^99ELR^^^^2.68^^10811877011290_DIT||202203042159+0000||||Meany Middle School^^^^^50D2252725^XX^^^50D2252725|301 21st Avenue East^^Seattle^WA^98112

Desired

OBX|1|CWE|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.68|1|260415000^Not detected^SCT|||N^Normal (applies to non-numeric results)^HL70078^^^^2.7|||F|||202203042159+0000|50D2252725^Meany Middle School^CLIA||10811877011290_DIT^BinaxNOW COVID-19 Ag Card^99ELR^^^^2.68^^10811877011290_DIT||202203042159+0000||||Meany Middle School^^^^^50D2252725^XX^^^50D2252725|301 21st Avenue East^^Seattle^WA^98112

Same issue as above, CWE and F are expanded to CWE^Coded With Exceptions^HL70125 and F^Final results; Can only be changed with a corrected result^HL70085

Acceptance criteria

jbiskie commented 2 years ago

Example file (uploaded as .txt since GitHub does not support attaching .hl7):

prescryptive-sample1a.txt

Relevant curl command:

 curl -X POST -H "client:prescryptive" -H "content-type:application/hl7-v2" --data-binary "@./result_files/prescryptive-sample1a.hl7" http://localhost:7071/api/reports

Using ./prime cli (rename the prescryptive1a.txt to *.hl7)

./prime data --input junk/prescryptive-sample1a.hl7 --input-schema HL7/prescryptive-covid-19 --output-dir junk/output --route
oslynn commented 2 years ago

@jbiskie would you please take a look at the HL7 output file, is it acceptable to you?

The prescryptive1a.hl7 has sender: prescryptive, and reveivers: WA (wa-phd) 1.) For MSH-3 Add to organization.yml (name: -wa-dph) translation:
replaceValueAwithB: MSH-3: ["PHX.ProviderReportingService":"CDC PRIME - Atlanta, Georgia (Dekalb)^2.16.840.1.114222.4.1.237821^ISO"]

2.) For OBR-25 = 'F' only, Add to organazation.yml (name: wa-phd) translation: suppressHl7Fields: ... OBR-25-2, OBR-25-3, OBX-11-2, OBX-11-3

3.) For OBX-2 and OBX-11 unnecessary elements Add to organazation.yml (name: wa-phd) translation: suppressHl7Fields: ... OBX-2-2, OBX-2-3, OBX-11-2, OBX-11-3

Below is the organization.yml additional fields. image

HL7 output file: cdcprime_testing_20220317155046_084933___neg.txt

oslynn commented 2 years ago

Need to be reviewed and approved by @jbiskie