Clinical Quality Language Specification, published by Clinical Decision Support WG. This guide is not an authorized publication; it is the continuous build for version 1.5.3 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cql/ and changes regularly. See the Directory of published versions
{
"library" : {
"identifier" : {
"id" : "CMS135_QDM"
},
"schemaIdentifier" : {
"id" : "urn:hl7-org:elm",
"version" : "r1"
},
"usings" : {
"def" : [ {
"localIdentifier" : "System",
"uri" : "urn:hl7-org:elm-types:r1"
}, {
"localIdentifier" : "QDM",
"uri" : "urn:healthit-gov:qdm:v5_0_1_draft",
"version" : "5.0.2"
} ]
},
"parameters" : {
"def" : [ {
"name" : "Measurement Period",
"accessLevel" : "Public",
"default" : {
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"type" : "DateTime",
"year" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "2014",
"type" : "Literal"
},
"month" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
},
"day" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
},
"hour" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"minute" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"second" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"millisecond" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
}
},
"high" : {
"type" : "DateTime",
"year" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "2015",
"type" : "Literal"
},
"month" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
},
"day" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "1",
"type" : "Literal"
},
"hour" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"minute" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"second" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
},
"millisecond" : {
"valueType" : "{urn:hl7-org:elm-types:r1}Integer",
"value" : "0",
"type" : "Literal"
}
}
}
} ]
},
"valueSets" : {
"def" : [ {
"name" : "Care Services in Long-Term Residential Facility",
"id" : "...",
"accessLevel" : "Public"
}, {
"name" : "Heart Failure",
"id" : "...",
"accessLevel" : "Public"
} ]
},
"statements" : {
"def" : [ {
"name" : "Long-Term Residential Facility Encounters",
"context" : "Patient",
"accessLevel" : "Public",
"expression" : {
"type" : "Query",
"source" : [ {
"alias" : "E",
"expression" : {
"dataType" : "{urn:healthit-gov:qdm:v5_0_1_draft}EncounterPerformed",
"templateId" : "PositiveEncounterPerformed",
"codeProperty" : "code",
"type" : "Retrieve",
"codes" : {
"name" : "Care Services in Long-Term Residential Facility",
"type" : "ValueSetRef"
}
}
} ],
"relationship" : [ {
"alias" : "D",
"type" : "With",
"expression" : {
"dataType" : "{urn:healthit-gov:qdm:v5_0_1_draft}Diagnosis",
"type" : "Retrieve",
"codes" : {
"name" : "Heart Failure",
"type" : "ValueSetRef"
}
},
"suchThat" : {
"type" : "OverlapsBefore",
"operand" : [ {
"path" : "prevalencePeriod",
"scope" : "D",
"type" : "Property"
}, {
"path" : "relevantPeriod",
"scope" : "E",
"type" : "Property"
} ]
}
} ],
"where" : {
"type" : "IncludedIn",
"operand" : [ {
"path" : "relevantPeriod",
"scope" : "E",
"type" : "Property"
}, {
"name" : "Measurement Period",
"type" : "ParameterRef"
} ]
}
}
}, {
"name" : "Relevant Encounters",
"context" : "Patient",
"accessLevel" : "Public",
"expression" : {
"name" : "Long-Term Residential Facility Encounters",
"type" : "ExpressionRef"
}
} ]
}
}
}