LinuxForHealth / hl7v2-fhir-converter

Converts HL7 v2 Messages to FHIR Resources
Apache License 2.0
89 stars 36 forks source link

Not able to Persist (or convert ) phone number to fhir #497

Open eldhoquest opened 1 year ago

eldhoquest commented 1 year ago

MSH|^~\&|Company|Company Facility|UI Application|Company UI Application|20230209131733||ADT^A04|123420230209131733|P|2.3 EVN|A04|20230209131733 PID|||||Raj^Jetly|||M|||House Name^Chavara P.O^Palayam^Kerala^685836||^^^rahul@fakemail.com^^^919527795955

This is the sample hl7message when i converted to fhir, it doesn't contain the PID13.7 detail which is the phone number.

stueynz commented 1 year ago

Hmmm....looking at the template it is built on the expectation that email address and phone number are different entries in the repeating PID.13 field.

So pulling the PID.13 field apart into two repetitions one for email address and another for the phone number should give you what you're looking for.

MSH|^~&|Company|Company Facility|UI Application|Company UI Application|20230209131733||ADT^A04|123420230209131733|P|2.3
EVN|A04|20230209131733
PID|||||Raj^Jetly|||M|||House Name^Chavara P.O^Palayam^Kerala^685836||^^^rahul@fakemail.com^^^~^^^^^^919527795955

If you are unable to pre-process your HL7 input message to (correctly) put the email address and phone number into separate repetitions - then you are stuck with having to customize:

  1. resource/Patient.yml will need to be adjusted to make it generate two telecom fields from the single PID.13 entry

  2. You will probably have to heavily customize datatype/ContactPoint.yml to get your desired output.