Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PD1 Mappings for OML Messages #1620

Open
6 of 30 tasks
brick-green opened this issue Nov 26, 2024 · 14 comments
Open
6 of 30 tasks

Add PD1 Mappings for OML Messages #1620

brick-green opened this issue Nov 26, 2024 · 14 comments

Comments

@brick-green
Copy link

brick-green commented Nov 26, 2024

Story

As a sender of Orders, so that I can send primary care provider information, I need the PD1 segment to be read on incoming OML messages and output in the outgoing OML messages.

Pre-conditions

  • Example OMLs are available with PD1 segments present

Acceptance Criteria

  • All fields in the PD1 segment present in the OML are exactly the same on the output file are they are in the input sample file
  • All fields listed in our order profile (including PD1.4) for LA are mapped
  • Integration tests have been added for all fields that are mapped in ReportStream

Notes

  • PD1 is already being mapped by ReportStream for OML, however PD1.4 is not.
  • PD1.4 is a backwards compatible field in HL7 v2.5.1

Tasks

Research

  • Review mapping inventory and confluence pages to find mapping guidelines
  • Obtain an Ochsner-specific example order message that captures the PD1 segment as identified above.
    • Confirm that PD1.4 is all we need to map (as PD1 isn't included at all in the 10/28 hospital and lab profiles)

Engineering

  • Add HL7 => FHIR mapping to ReportStream
  • Add FHIR => HL7 mapping to ReportStream
  • Add integration tests for mappings

Definition of Done

  • Documentation tasks completed
    • Documentation and diagrams created or updated
      • ADRs (/adr folder)
      • Main README.md
      • Other READMEs in the repo
      • If applicable, update the ReportStream Setup section in README.md
    • Threat model updated
    • API documentation updated
  • Code quality tasks completed
    • Code refactored for clarity and no design/technical debt
    • Adhere to separation of concerns; code is not tightly coupled, especially to 3rd party dependencies
  • Testing tasks completed
    • Load tests passed
    • Additional e2e tests created
    • Additional RS e2e assertions created in the rs-e2e project for any new transformations. Includes improvements to the assertion code required to make the new assertions
  • Build & Deploy tasks completed
    • Build process updated
    • API(s) are versioned
    • Feature toggles created and/or deleted. Document the feature toggle
    • Source code is merged to the main branch

Note: Please remove any DoD items that are not applicable

Research Questions

  • Optional: Any initial questions for research

Decisions

  • Optional: Any decisions we've made while working on this story
@JohnNKing JohnNKing changed the title Add PD1 mapping to ReportStream for OML messages Add PD1-4 mapping to ReportStream for OML messages Dec 3, 2024
@JohnNKing
Copy link
Contributor

JohnNKing commented Dec 11, 2024

HL7 v2 order modeling instead includes this as an OBX; there are even LOINC codes for the the post-discharge provider info?

@JohnNKing
Copy link
Contributor

HL7 v2 order modeling instead includes this as an OBX; there are even LOINC codes for the the post-discharge provider info?

Based on discussion during planning, our understanding is that the PD1 segment will indeed include PCP information -- regardless of any OBXs.

If this is ONLY provided via PD1, will we need a story to transform the incoming PD1.4 info into an OBX?

@JohnNKing JohnNKing changed the title Add PD1-4 mapping to ReportStream for OML messages Add PD1 mapping to ReportStream for OML messages Dec 11, 2024
@JohnNKing JohnNKing changed the title Add PD1 mapping to ReportStream for OML messages Add PD1 Mappings for OML Messages Dec 11, 2024
@JohnNKing
Copy link
Contributor

HL7 v2 order modeling instead includes this as an OBX; there are even LOINC codes for the the post-discharge provider info?

Based on discussion during planning, our understanding is that the PD1 segment will indeed include PCP information -- regardless of any OBXs.

If this is ONLY provided via PD1, will we need a story to transform the incoming PD1.4 info into an OBX?

Clarified at the end of Planning today: the PHL is expecting PCP info in PD1.4

@jorg3lopez jorg3lopez self-assigned this Dec 12, 2024
@jbiskie
Copy link
Contributor

jbiskie commented Dec 18, 2024

Sample message 1:

MSH|^~\&|13^1.2.840.114350.1.13.286.2.7.2.695071^ISO|4169|Natus.LA.STAG^2.16.840.1.114222.4.3.26.3.2|Louisiana Office of Public Health Laboratory^2.16.840.1.114222.4.3.22.17.1.1|20241113131917|739|ORM^O01^ORM_O01|29|T|2.5.1|||AL|NE
PID|1|10453873^^^MRN^MRN|10453873^^^MRN^MRN||PKUSS^GIRL BEAKER||20241108103900|F||2054-5^Black or African-American^CDCREC|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^P^^LAFAYETTE|LAFAYETTE|(557)559-5559^P^PH||ENGLISH|Single|||000-00-0000||PKUSS^BEAKER^MOM^|HISPANIC||Y|1|||||N
PD1||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
NK1|1|PKUSS^BEAKER^MOM^|Mother|1202 Coolidge St.^^LAFAYETTE^LA^70503^US|(557)559-5559^^PH
PV1|1||^8288^24826^^^^^^^^||||||||||||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
IN1|1|114420|308114401|BLUE CROSS BLUE SHIELD|P. O. BOX 98029^^BATON ROUGE^LA^70898-9029^||(800)495-2583|||||||||PKUSS^GIRL^BEAKER^|Self|20241108|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|||1||||||||||||||||||||None|F
GT1|1|100251815|PKUSS^BEAKER^MOM^||1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|(557)559-5559^P^PH||19891224|F|P/F|MOT|999-99-9999||||||||Full
ORC|NW|243217771^EPC||71414746|||^^^20241113131800^^Routine^^||20241113131721|739^BEAKER^PHLEBOTOMIST^^||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|^^^^^^^^OLGH LABOR AND DELIVERY|(504)391-8896||||OCH155315^OCH155315|||OCHSNER LAFAYETTE GENERAL MEDICAL HOSPITAL^D^^^^OCHSNER HEALTH SYSTEM^XX^^^30100|1214 COOLIDGE BLVD^^LAFAYETTE^LA^70503-2621^US^B^^LAFAYETTE|(337)289-7991^^PH|120 OCHSNER BLVD^SUITE 360^GRETNA^LA^70056^^C|||||I|VERBAL WITH
OBR|1|243217771^EPC|1000319697^Beaker|54089-8^Newborn screening panel American Health Information Community (AHIC)^LN^^^^2.72||20241113131800|20241113131859|||739^BEAKER^PHLEBOTOMIST^^|Lab Collect|||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|(504)391-8896|||193989||||Lab|||^^^20241113131800^^Routine^^|||||||||20241113131800
OBX|1|ST|57714-8^Gestational Age (Weeks + Days)||384||||||F|||20241113131719|||||||||||||||QST
OBX|2|ST|82312-0^Infant Blood Transfusion?||No||||||F|||20241113131719|||||||||||||||QST
OBX|3|ST|67704-7^All Feeding Since Birth||Human Milk \T\ Formula||||||F|||20241113131719|||||||||||||||QST
OBX|4|ST|PLT3280^Name of Formula(s)||Enfomil, Similac, Katrina||||||F|||20241113131719|||||||||||||||QST
SPM|1|^24LADH-318X0008&Beaker||BLOOD^Blood||||BLOOD^Blood|||||||||20241113131859|20241113131900||Y|||||||||||||||S

@jbiskie
Copy link
Contributor

jbiskie commented Dec 18, 2024

Sample message 2:

MSH|^~\&|13^1.2.840.114350.1.13.286.2.7.2.695071^ISO|4169|Natus.LA.STAG^2.16.840.1.114222.4.3.26.3.2|Louisiana Office of Public Health Laboratory^2.16.840.1.114222.4.3.22.17.1.1|20241113131917|739|ORM^O01^ORM_O01|30|T|2.5.1|||AL|NE
PID|1|10453874^^^MRN^MRN|10453874^^^MRN^MRN||PKUSS^B BOY BEAKER||20241108110000|M||2054-5^Black or African-American^CDCREC|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^P^^LAFAYETTE|LAFAYETTE|(557)559-5559^P^PH||ENGLISH|Single|||000-00-0000||PKUSS^BEAKER^MOM^|HISPANIC||Y|2|||||N
PD1||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
NK1|1|PKUSS^BEAKER^MOM^|Mother|1202 Coolidge St.^^LAFAYETTE^LA^70503^US|(557)559-5559^^PH
PV1|1||^8288^24827^^^^^^^^||||||||||||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
IN1|1|114415|308114401|BLUE CROSS BLUE SHIELD|P O BOX 98029^^BATON ROUGE^LA^70898-9029^||(800)495-2583|||||||||PKUSS^B^BOY BEAKER^|Self|20241108|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|||1||||||||||||||||||||None|M
GT1|1|100251816|PKUSS^BEAKER^MOM^||1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|(557)559-5559^P^PH||19891224|F|P/F|MOT|999-99-9999||||||||Full
ORC|NW|243217750^EPC||71414751|||^^^20241113125400^^Routine^^||20241113125406|739^BEAKER^PHLEBOTOMIST^^||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|^^^^^^^^OLGH LABOR AND DELIVERY|(504)391-8896||||OCH155315^OCH155315|||OCHSNER LAFAYETTE GENERAL MEDICAL HOSPITAL^D^^^^OCHSNER HEALTH SYSTEM^XX^^^30100|1214 COOLIDGE BLVD^^LAFAYETTE^LA^70503-2621^US^B^^LAFAYETTE|(337)289-7991^^PH|120 OCHSNER BLVD^SUITE 360^GRETNA^LA^70056^^C|||||I|VERBAL WITH
OBR|1|243217750^EPC|1000319696^Beaker|54089-8^Newborn screening panel American Health Information Community (AHIC)^LN^^^^2.72||20241113125400|20241113131841|||739^BEAKER^PHLEBOTOMIST^^|Lab Collect|||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|(504)391-8896|||193988||||Lab|||^^^20241113125400^^Routine^^|||||||||20241113125400
OBX|1|ST|57714-8^Gestational Age (Weeks + Days)||382||||||F|||20241113125402|||||||||||||||QST
OBX|2|ST|82312-0^Infant Blood Transfusion?||Yes||||||F|||20241113125402|||||||||||||||QST
OBX|3|DT|62317-3^Date of Transfusion||20241108||||||F|||20241113125402|||||||||||||||QST
OBX|4|ST|67704-7^All Feeding Since Birth||Human Milk \T\ Formula||||||F|||20241113125402|||||||||||||||QST
OBX|5|ST|PLT3280^Name of Formula(s)||Enfomil||||||F|||20241113125402|||||||||||||||QST
SPM|1|^24LADH-318X0007&Beaker||BLOOD^Blood||||BLOOD^Blood|||||||||20241113131841|20241113131842||Y|||||||||||||||S

@jbiskie
Copy link
Contributor

jbiskie commented Dec 20, 2024

Changed ORM^O01 MSH-9 to OML^O21 in the copy saved to the examples folder. Need to confirm that this is correct.

@brick-green
Copy link
Author

Changed ORM^O01 MSH-9 to OML^O21 in the copy saved to the examples folder. Need to confirm that this is correct.

Did you change MSH-9.3 to OML_021 as well?

@jbiskie
Copy link
Contributor

jbiskie commented Dec 23, 2024

Changed ORM^O01 MSH-9 to OML^O21 in the copy saved to the examples folder. Need to confirm that this is correct.

Did you change MSH-9.3 to OML_021 as well?

Yep!

@jbiskie
Copy link
Contributor

jbiskie commented Dec 30, 2024

Findings:

  1. PD1-4 has XCN data type and is listed as Backward Compatibility as of 2.5.1
  2. PD1-4 maps to Patient.generalPractitioner (see: https://build.fhir.org/ig/HL7/v2-to-fhir/ConceptMap-segment-pd1-to-patient.html)
  3. There is a comment in ReportStream metadata/HL7/catchall/hl7/segments/PID/Patient.yml: "PD1.4 Deprecated in NIST, set to NullDT in HAPI. Field not mapped". *Is this comment accurate?

@GilmoreA6
Copy link
Contributor

@GilmoreA6
Copy link
Contributor

HL7-to-FHIR and FHIR-HL7 mappings for PD1-4 added. Need to add tests and update comments in metadata/HL7/catchall/hl7/segments/PID/Patient.yml

@sfradkin sfradkin added the transformation for CDC mapping label Jan 1, 2025
@jbiskie
Copy link
Contributor

jbiskie commented Jan 2, 2025

Have run messages manually through ReportStream and TI, PD1-4 is copying correctly.

There was no valid receiver for the FHIR to HL7 conversion in my local configuration. There may be some differences between the sample messages' expected configuration and the existing receivers we've been using. schemaName and destination OIDs were key differences. This is the yml that I applied to my local instance:
la-phl-for-samples.txt

@jbiskie
Copy link
Contributor

jbiskie commented Jan 3, 2025

updated the RS branch to include PD1-4 in the OML integration test. When running all integration tests, we're getting 5 errors now.

  1. gov.cdc.prime.router.datatests.mappinginventory.omlo21.OMLO21Full test OML_O21 all segments() FAILED (2m 22s)

org.opentest4j.AssertionFailedError: ERRORS:
PD1|C^Small Children Dependent^HL70223^M^Medical Supervision Required^HL70223^2.5.1^4^TEST^M^Medical Supervision... [omitting remainder of long segment from comment]
WARNINGS:
==> expected: but was:
at app//gov.cdc.prime.router.datatests.mappinginventory.omlo21.OMLO21Full.test OML_O21 all segments(OMLO21Full.kt:11)

  1. gov.cdc.prime.router.datatests.mappinginventory.ormo01.ORMO01Full test ORM_O01 all segments() FAILED (18.7s)

org.opentest4j.AssertionFailedError: ERRORS:
FAILED: Resource Patient in Patient/1732562153843122000.7e823011-2378-4ca6-bc19-0701168a7768 has no match.
Fewer properties found at Patient/1732562153843122000.7e823011-2378-4ca6-bc19-0701168a7768->Patient/1735942951796518600.94290c16-b945-4c89-8b20-84398f43df1e Patient.generalPractitioner. actual=1, expected=2
WARNINGS:
==> expected: but was:
at app//gov.cdc.prime.router.datatests.mappinginventory.ormo01.ORMO01Full.test ORM_O01 all segments(ORMO01Full.kt:13)

  1. gov.cdc.prime.router.datatests.mappinginventory.pd1.PD1ToPatient test PD1 populated with PD1-14-1 populated() FAILED (14.6s)

org.opentest4j.AssertionFailedError: ERRORS:
FAILED: Resource Patient in Patient/1710883409796711000.40f2dcee-518c-43ea-8de8-558b1a9c6516 has no match.
Fewer properties found at Patient/1710883409796711000.40f2dcee-518c-43ea-8de8-558b1a9c6516->Patient/1735943642443979700.7e65dbe2-6d2e-49d3-89cf-c3c795c950ec Patient.generalPractitioner. actual=1, expected=2
WARNINGS:
==> expected: but was:
at app//gov.cdc.prime.router.datatests.mappinginventory.pd1.PD1ToPatient.test PD1 populated with PD1-14-1 populated(PD1ToPatient.kt:9)

  1. gov.cdc.prime.router.datatests.mappinginventory.pd1.PD1ToPatient test PD1 populated with PD1-14-1 blank and PD1-14-10 populated() FAILED (15.3s)

org.opentest4j.AssertionFailedError: ERRORS:
FAILED: Resource Patient in Patient/1710883425543744000.af81ed8a-7609-4734-b6de-c0d34d9f2855 has no match.
Fewer properties found at Patient/1710883425543744000.af81ed8a-7609-4734-b6de-c0d34d9f2855->Patient/1735943657924141800.093d6422-a9f3-44af-80ce-0fd358788241 Patient.generalPractitioner. actual=1, expected=2
WARNINGS:
==> expected: but was:
at app//gov.cdc.prime.router.datatests.mappinginventory.pd1.PD1ToPatient.test PD1 populated with PD1-14-1 blank and PD1-14-10 populated(PD1ToPatient.kt:14)

  1. gov.cdc.prime.router.datatests.mappinginventory.orur01.ORUR01Full test ORU_R01 all segments() FAILED (13.3s)

org.opentest4j.AssertionFailedError: ERRORS:
FAILED: Resource Patient in Patient/1732561494966959000.196f1b0a-faaa-4371-838c-8ce5128f9850 has no match.
Fewer properties found at Patient/1732561494966959000.196f1b0a-faaa-4371-838c-8ce5128f9850->Patient/1735944032229646900.b3f4cec6-a839-4c8d-8317-889128ac2bdf Patient.generalPractitioner. actual=1, expected=2
WARNINGS:
==> expected: but was:
at app//gov.cdc.prime.router.datatests.mappinginventory.orur01.ORUR01Full.test ORU_R01 all segments(ORUR01Full.kt:9)

@jbiskie
Copy link
Contributor

jbiskie commented Jan 7, 2025

I updated the RS mapping to allow for repetitions in PD1-3 and PD1-4. The integration tests above are passing now. Need to run the full test suite again to ensure everything passes [DONE].

Next step: update FHIR to HL7 tests to validate PD1-4 is populating correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants