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
[ ] hl7v2-fhir-converter templates can include condition values that have ANDs and ORs and are still evaluated correctly
[ ] At least one fhir mapping has at least one element that makes use of this new capability
User Story
As a RS developer, I would like to be able to use typical combinations of logical operators in the
condition
s 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
inprime-router/metadata/fhir_mapping/hl7/resource/Patient.yml
.Acceptance Criteria
condition
values that haveAND
s andOR
s and are still evaluated correctly