Uploaded image for project: 'CQL Issue Tracker'
  1. CQL Issue Tracker
  2. CQLIT-355

Should the encounterDiagnosis() be used with exists()

XMLWordPrintable

    • Icon: Problem Problem
    • Resolution: Done
    • Icon: Blocker Blocker
    • None

      The function encounterDiagnosis() returns a list of QICore.Condition. However, the example in Authoring Pattern v4.1.1 is not using exists() in the evaluation of 'where' statement. Although both expressions are working in MADiE, we think exist() should be applied to a list. 

      Function - 
      define fluent function encounterDiagnosis(Encounter Encounter ):
        Encounter.diagnosis D
          return singleton from ([Condition] C where C.id = D.condition.reference.getId())
       
      In Authoring Pattern - 
      define "Encounters with a Diabetes Condition": "Completed Encounters During the Measurement Period" CompletedEncounter where CompletedEncounter.encounterDiagnosis().code in "Diabetes"

            jseeman02 Jennifer Seeman
            yanyanhu Yanyan Hu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: