CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
72 stars 40 forks source link

Support more complicated boolean expressions for conditions in the hl7v2-fhir-converter #12289

Closed jimmyfagan closed 11 months ago

jimmyfagan commented 1 year ago

User Story

As a RS developer, I would like to be able to use typical combinations of logical operators in the conditions in hl7v2-to-fhir templates.

Description/Use Case

The base hl7v2-fhir-converter library only supports &&s or ||s but not both in the same condition. This sometimes makes the mappings more complicated since we have to split expressions out into multiple near-duplicate elements. Having multiple entries to split out the logic into separate conditions is a fine workaround, but it can lead to mappings that are less readable/maintainable.

Risks/Impacts/Considerations

It's unknown how these expressions are evaluated in the library. It's hard to say whether this will be a simple task or not.

Dev Notes

It may not be super straightforward to find an example of a place where conditions can be combined into one after enhancing the library. So for reference, see identifier_2a-identifier_2d in prime-router/metadata/fhir_mapping/hl7/resource/Patient.yml.

Acceptance Criteria

arnejduranovic commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @brick-green @jack-h-wang @jalbinson @JessicaWNava @JFU-NAVA-PBC @jimmyfagan @mkalish @thetaurean

JessicaWNava commented 11 months ago

PR here: https://github.com/CDCgov/hl7v2-fhir-converter/pull/3