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
<Binary xmlns="http://hl7.org/fhir">
<id value="binary-example-cms179v2-qdm-cql"/>
<contentType value="text/cql"/>
<data
value="bGlicmFyeSBDTVMxNzlfUURNIHZlcnNpb24gJzInDQoNCi8vIFdhcmZhcmluIHRpbWUgaW4gdGhlcmFwZXV0aWMgcmFuZ2UNCg0KdXNpbmcgUURNIHZlcnNpb24gJzUuMC4yJw0KDQp2YWx1ZXNldCAiQXRyaWFsIEZpYnJpbGxhdGlvbi9GbHV0dGVyIjogJzIuMTYuODQwLjEuMTEzODgzLjMuMTE3LjEuNy4xLjIwMicNCnZhbHVlc2V0ICJXYXJmYXJpbiI6ICcyLjE2Ljg0MC4xLjExMzg4My4zLjExNy4xLjcuMS4yMzInDQp2YWx1ZXNldCAiRmFjZS10by1GYWNlIEludGVyYWN0aW9uIjogJzIuMTYuODQwLjEuMTEzODgzLjMuNDY0LjEwMDMuMTAxLjEyLjEwNDgnDQp2YWx1ZXNldCAiT2ZmaWNlIFZpc2l0IjogJzIuMTYuODQwLjEuMTEzODgzLjMuNDY0LjEwMDMuMTAxLjEyLjEwMDEnDQp2YWx1ZXNldCAiVmFsdnVsYXIgSGVhcnQgRGlzZWFzZSI6ICcyLjE2Ljg0MC4xLjExMzg4My4zLjQ2NC4xMDAzLjEwNC4xMi4xMDE3Jw0KdmFsdWVzZXQgIklOUiI6ICcyLjE2Ljg0MC4xLjExMzg4My4zLjExNy4xLjcuMS4yMTMnDQp2YWx1ZXNldCAiYmlydGggZGF0ZSI6ICcyLjE2Ljg0MC4xLjExMzg4My4zLjU2MC4xMDAuNCcNCnZhbHVlc2V0ICJDb21wdXRlZCBWYWx1ZSBJTlIgcGVyY2VudCBUVFIiOiAnMi4xNi44NDAuMS4xMTM4ODMuMy40NjQuMTAwMy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