LinuxForHealth / hl7v2-fhir-converter

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

NTE segments after PID segment get wrongly converted onto Condition.note.text #428

Open claverols opened 2 years ago

claverols commented 2 years ago

Describe the bug When converting a adt-a03 HL7 message, NTE segments after a PID segment ie: PID|||PID-adt-a03-sample02-allergies^^^^MR||DOE^JANE^| NTE|1||Generated by whi-hl7-deidentifier service for patient_id: fc4bc87a-ca16-4bb1-a803-2cd203b69648|PatComments are getting wrongly converted onto Condition.note.text:

"note": [
                    {
                        "text": "Generated by whi-hl7-deidentifier service for patient_id: fc4bc87a-ca16-4bb1-a803-2cd203b69648"
                    }
                ],

To Reproduce Convert the attached mock adt-a03 hl7 message in the zip file onto a JSON file using the current L4HtoFHIR converter.

adt-a03-hl7.zip Check the contents of the converted JSON.

Expected behavior The Condition resources generated from the DG1 segments in the HL7 message shouldn't include Condition.note.text from the NTE segments.