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

CQL CQL Operation: Clarify return

    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
    • CQL CQL
    • 8.2.1
    • Hide

      Agreed, clarify the return parameter:

      Update the main description to:
      The $cql operation evaluates a CQL expression and returns the result. The operation has a single return parameter that can be of any type to accommodate the possible result types of a CQL expression.

      Update the return parameter to:
      return 1..* Any The result of evaluating the given expression, returned as a FHIR Type following the mapping from CQL to FHIR types (link to mapping). If the result is a list, the parameter will be repeated for each element in the list, with the special case that an empty list is represented with a parameter with no value but a cqlType extension indicating the type of the result (e.g. List<Integer>) and the cqf-isEmptyList extension (as defined in https://jira.hl7.org/browse/FHIR-43795)

      Because the cardinality of the return parameter is 1..*, this means the result of the $cql evaluate will always be a Parameters resource.

      Show
      Agreed, clarify the return parameter: Update the main description to: The $cql operation evaluates a CQL expression and returns the result. The operation has a single return parameter that can be of any type to accommodate the possible result types of a CQL expression. Update the return parameter to: return 1..* Any The result of evaluating the given expression, returned as a FHIR Type following the mapping from CQL to FHIR types (link to mapping). If the result is a list, the parameter will be repeated for each element in the list, with the special case that an empty list is represented with a parameter with no value but a cqlType extension indicating the type of the result (e.g. List<Integer>) and the cqf-isEmptyList extension (as defined in https://jira.hl7.org/browse/FHIR-43795 ) Because the cardinality of the return parameter is 1..*, this means the result of the $cql evaluate will always be a Parameters resource.
    • Howard Strasberg/Juliet Rubini: 12-0-0
    • Correction
    • Non-compatible

    Description

      The description of the return output parameter is difficult to understand and lacks the detail needed to fully implement.

      Part of it says:

      returned as a FHIR type, either a resource, or a FHIR-defined type corresponding to the CQL return type, as defined in the Using CQL section of this implementation guide

      But then later it says:

      If the result is a CQL system-defined or FHIR-defined type, the result is returned as a Parameters resource

      These seem contradictory, as one says it can be returned as a FHIR-defined type, but the other then says that if a result is a FHIR-defined type it should be returned as a Parameters resource.

      There is also no guidance regarding how a FHIR-defined type result should be represented using the Parameters resource (e.g., what is the parameter name).

      There is also no guidance regarding how a result of null should be returned (it is neither a FHIR resource nor a FHIR-defined type).

      Last, the cardinality of return is listed as 1..*, but the description says to return lists back as a bundle. So when would evaluating a single CQL expression ever result in more than 1 return? Should return be 1..1?

      Attachments

        Activity

          People

            jen_seeman Jennifer Seeman
            cmoesel Chris Moesel
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: