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

Clarify Tuple and List type representation

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • Using CQL With FHIR (FHIR)
    • 1.0.0-ballot
    • Clinical Decision Support
    • STU
    • Using CQL
    • 2.14.3
    • Hide

      Agreed, the language is confusing, especially because it uses uppercase Parameters, implying that each type would be represented with a separate instance of a Parameters resource, but the intent is a lower case "parameter", because what's being described is how to represent the type of parameters and expression definitions in a Library, so the "name" of the parameter element is the name of the parameter or expression definition, respectively.

      We will change the language to:

      Tuple types are represented in FHIR as a `parameter` that has parts corresponding to the elements of the tuple types

      and

      List types are represented in FHIR as a `parameter` that has a cardinality of 0..*

      In addition, we will provide an example illustrating the mapping for tuple and list types, including nested tuple and list types. And we note that for nested list types, the question about the name still arises, so we will indicate that the name of a nested list type parameter SHALL be `element`

      In addition, we will provide as part of that example an illustration of providing an empty list as a parameter, specifically using a new "isEmptyList" extension:

      {
        "name": "Empty List-Valued Expression",
          "_valueString": {
          "extension": [{
            "url": "http://hl7.org/fhir/StructureDefinition/cqf-isEmptyList",
            "valueBoolean": "true"
          }]
        }
      }
      

      cqf-isEmptyList 0..1 boolean, fixed value to true (i.e. can never use this extension to say this is not an empty list)

      Show
      Agreed, the language is confusing, especially because it uses uppercase Parameters, implying that each type would be represented with a separate instance of a Parameters resource, but the intent is a lower case "parameter", because what's being described is how to represent the type of parameters and expression definitions in a Library, so the "name" of the parameter element is the name of the parameter or expression definition, respectively. We will change the language to: Tuple types are represented in FHIR as a `parameter` that has parts corresponding to the elements of the tuple types and List types are represented in FHIR as a `parameter` that has a cardinality of 0..* In addition, we will provide an example illustrating the mapping for tuple and list types, including nested tuple and list types. And we note that for nested list types, the question about the name still arises, so we will indicate that the name of a nested list type parameter SHALL be `element` In addition, we will provide as part of that example an illustration of providing an empty list as a parameter, specifically using a new "isEmptyList" extension: { "name" : "Empty List-Valued Expression" , "_valueString" : { "extension" : [{ "url" : "http: //hl7.org/fhir/StructureDefinition/cqf-isEmptyList" , "valueBoolean" : " true " }] } } cqf-isEmptyList 0..1 boolean, fixed value to true (i.e. can never use this extension to say this is not an empty list)
    • Chris Moesel/Greg White: 21-0-0
    • Correction
    • Non-substantive

    Description

      Conformance Requirement 2.20 states:

      Tuple types are represented with Parameters that have part elements corresponding to the elements of the tuple. List types are represented with Parameters that have a cardinality of 0..*.

      I think it would be a little clearer to say "Tuple types are represented in FHIR with..." and "List types are represented in FHIR with..."

      In addition, if tuple elements are represented using Parameters.parameter.part, what is the top-level parameter's name? E.g., given the tuple

       

      Tuple { xCoordinate: 12, yCoordinate: 5 }

      According to the specification, I think you end up with something like this:

       

       

      {
        "resourceType": "Parameters",
        "parameter": [{
          "name": "WHO-AM-I?"
          "part": [
            { "name": "xCoordinate", "valueInteger": 12 },
            { "name": "yCoordinate", "valueInteger": 5 },
          ]
        ]}
      }

      So what really goes where I have "WHO-AM-I?"?

       

      And concerning:

      List types are represented with Parameters that have a cardinality of 0..*.

      This means a list of integers would become a list of Parameter resources? E.g.

       

      [
        {
          "resourceType": "Parameters",
          "parameter": [{
            "name": "WHO-AM-I-ONE?",
            "valueInteger": 1
          }]
        },
        {
          "resourceType": "Parameters",
          "parameter": [{
            "name": "WHO-AM-I-TWO?",
            "valueInteger": 2
          }]
        }
      ]

      I feel like maybe I'm missing something, so further clarification and/or examples would be helpful.

       

      Attachments

        Activity

          People

            bryn.rhodes Bryn Rhodes
            cmoesel Chris Moesel
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: