fhirpath-py
fhirpath-py copied to clipboard
Choice elements are not handled properly
According to the FHIR specification:
2.9.1.1 Polymorphism in FHIR For choice elements, where elements can be one of multiple types, e.g. Patient.deceased[x]. In actual instances these will be present as either Patient.deceasedBoolean or Patient.deceasedDateTime. In FHIRPath, choice elements are labeled according to the name without the '[x]' suffix, and children can be explicitly treated as a specific type using the as operation:
(Observation.value as Quantity).unit
The implementation does not handle those, the FHIRpath path only recognizes the actual fieldname, e.g. valueQuantity etc....