Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-25188

Using `as` over a collection

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIRPath (FHIR)
    • STU3
    • Implementable Technology Specifications
    • fluentpath
    • Hide

      Agreed, correct semantics of "as" on a collection as suggested

      Show
      Agreed, correct semantics of "as" on a collection as suggested
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            lmsurprenant Lee Surprenant
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: