LinuxForHealth / hl7v2-fhir-converter

Converts HL7 v2 Messages to FHIR Resources
Apache License 2.0
86 stars 34 forks source link

Feature: Ignore Empty HL7 Segments #506

Open stueynz opened 1 year ago

stueynz commented 1 year ago

Sometimes some segments are empty, and due to common templates populating Resource.meta field we need a way to ignore these empty segments, and not generate a partially filled in Resource.

This example message:

MSH|^~\\&|TestSystem||TestTransformationAgent||20150502090000||ADT^A09|controlID|P|2.6
EVN|A01|20150502090000|
PID|||1234^^^^MR||DOE^JANE^|||F||||||||||||||||||||||
PV1||I||||||||SUR||||||||S|VisitNumber^^^ACME|A||||||||||||||||||||||||20150502090000|
AL1|

with resource template setting of:

resources:
    - resourceName: AllergyIntolerance
      segment: AL1
      resourcePath: resource/AllergyIntolerance
      repeats: true
      ignoreEmpty: true      ## We want to test our new ignoreEmpty flag
      additionalSegments:
        - MSH

Should not generate an AllergyIntolerance resource if the ignoreEmpty field is set to true

LisaWellman commented 9 months ago

@stueynz can you sign this one as well? I see there is a build failure as well.

LisaWellman commented 7 months ago

@stueynz I see no activity here; do you still want to pursue?