Details
-
Change Request
-
Resolution: Persuasive
-
Medium
-
FHIRPath (FHIR)
-
STU3
-
Implementable Technology Specifications
-
fluentpath
-
-
Bryn Rhodes/Brian Pech: 4-0-2
-
Correction
-
Compatible, substantive
Description
From the latest draft of the FHIRPath spec:
"If there is more than one item in the input collection, the evaluator will throw an error."
Published versions say something similar.
However, the published FHIR specification uses `as` in a number places which can result in its operation over a collection of size > 1 (e.g. see the Observation-component-value-x search parameters and/or the dom-3 constraint).
Furthermore, multiple existing FHIRPath implementations do not throw an error on these.
Given the amount of work to correct this usage in FHIR (and FHIRPath implementations), the much simpler change would be to treat this as a correction of the `as` function and operator in FHIRPath. The `is` operator can continue to throw for collections of size > 1.
Discussion at https://chat.fhir.org/#narrow/stream/179266-fhirpath/topic/Using.20.60as.60.20over.20a.20collection