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

Clarify expected runtime null behavior of interval/list operators

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • Clinical Quality Language (FHIR)
    • 1.5 [deprecated]
    • Clinical Decision Support
    • Appendix B - Reference
    • Hide

      Agreed, clarify union and query semantics as suggested

      Show
      Agreed, clarify union and query semantics as suggested
    • Chris Moesel/Rob McClure: 13-0-0
    • Clarification
    • Non-substantive

    Description

      The specification is unclear about the expected runtime semantics of interval and list-valued operators, including query.

      Propose that for any operation, if any runtime value is list-valued, the operation is the list overload and should return a list. If all runtime values are null, the result is null (which is compatible with list-valued and interval-valued operations).

      Specifically, clarify for query evaluation semantics that: if any source evaluates to a list, the result is list-valued, if all sources evaluate to null, the result is null

      Clarify for union: if any source evaluates to a list, the result is list-valued, if all sources evaluate to null, the result is null

      Here is an example library that illustrates expected behavior for query cardinality:

      library NullSourceQueries version '0.0.1'using FHIR version '4.0.1'include FHIRHelpers version '4.1.000' called FHIRHelperscontext Patient// The query below (over a null list) should probably return either
      // a) null, or
      // b) an empty list
      // Resolution: Return null when the source is null
      define NullListQuery:
        (null as List<FHIR.CodeableConcept>) X
          return Concept {
            codes: X.coding C return FHIRHelpers.ToCode(C)
          }// The query below (over a null object) should probably return either
      // a) null, or
      // b) a Concept w/ empty (or null) codes
      // Resolution: Return null when the source is null
      define NullObjectQuery:
        (null as FHIR.CodeableConcept) X
          return Concept {
            codes: X.coding C return FHIRHelpers.ToCode(C)
          }
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bryn.rhodes Bryn Rhodes
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: