CDCgov / trusted-intermediary

Bringing together healthcare providers by reducing the connection burden.
Apache License 2.0
9 stars 2 forks source link

CA Result OBX Mapping Issues #1133

Open JohnNKing opened 1 month ago

JohnNKing commented 1 month ago

Bug

Describe the Bug

We've identified a few issues with OBX mapping for the CA sample ORU: https://github.com/CDCgov/trusted-intermediary/blob/main/examples/CA/002_CA_ORU_R01.hl7

Impact

This will prevent integration with CA.

To Reproduce

Submit the sample ORU (https://github.com/CDCgov/trusted-intermediary/blob/main/examples/CA/002_CA_ORU_R01.hl7) to ReportStream.

Expected Behavior

The content of the input and output HL7 matches

Screenshots

n/a

Logs

n/a

Version

Current main

Additional Context

Related backlog items:

JohnNKing commented 1 month ago

Attempting to confirm if TN data type support is a requirement: https://www.slack.com/archives/C044P2CBEKS/p1717695906835449?thread_ts=1717623207.357699&cid=C044P2CBEKS

basiliskus commented 1 month ago

I just found out that the CE OBX mapping issue is a known bug in RS. A ticket will be created and someone from RS will take a look next week: https://flexion.slack.com/archives/C048S3GPSQG/p1717795087843699?thread_ts=1717793348.863279&cid=C048S3GPSQG

basiliskus commented 4 weeks ago

A ticket to address the OBX CE issue was created in RS: https://github.com/CDCgov/prime-reportstream/issues/14685

basiliskus commented 3 weeks ago

Waiting for RS to look into this issue. Tagged as blocked

jorg3lopez commented 3 weeks ago

Findings:

CWE datatype:

image.png

CE datatype:

image.png
jorg3lopez commented 3 weeks ago

Worked together with Josh Fisk from Report Stream to fix this issue. Findings: RS turns all CE datatypes for OBX.2 into CWE. Reason being, some clients have a hybrid message with v251 and v27 configurations. To address this problem, RS uses the v27 model to parse the file.

CE to CWE:

image.png

Using CWE configs for OBX.2:

image.png

Same for OBX.5:

image.png image.png

Mapping FHIR -> HL7 using CWE for OBX.2

image.png

Josh is working on adding new unit tests, fixing the broken tests, and adding integration tests. This is his branch: ingest-ce-fields-as-cwe

JohnNKing commented 1 week ago

Final step: Need to test that merged PR has resolved this issue

jorg3lopez commented 1 week ago

Update: Ran tests against the main branch and we could observe that OBX.3 and OBX.5 are populated when OBX.2 has CE as datatype:

image.png

Also, the FHIR bundle has the entries mapped with CWE mappings. This was expected to happen.

image.png
jorg3lopez commented 1 week ago

We can close this ticket now.