fhirpath-py icon indicating copy to clipboard operation
fhirpath-py copied to clipboard

Choice elements are not handled properly

Open jsdebruin1981 opened this issue 4 months ago • 0 comments

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....

jsdebruin1981 avatar Feb 21 '24 23:02 jsdebruin1981