-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path02_CMS149.xml
160 lines (158 loc) · 10.3 KB
/
02_CMS149.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:a="urn:hl7-org:cql-annotations:r1">
<identifier id="CMS149"/>
<schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
<usings>
<def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
<def localIdentifier="QDM" uri="urn:healthit-gov:qdm:v5_0_draft" version="5.0"/>
</usings>
<parameters>
<def name="Measurement Period" accessLevel="Public">
<parameterTypeSpecifier xsi:type="IntervalTypeSpecifier">
<pointType name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</parameterTypeSpecifier>
</def>
</parameters>
<valueSets>
<def name="Psych Visit - Diagnostic Evaluation" id="Psych Visit - Diagnostic Evaluation" accessLevel="Public"/>
<def name="Nursing Facility Visit" id="Nursing Facility Visit" accessLevel="Public"/>
<def name="Care Services in Long-Term Residential Facility" id="Care Services in Long-Term Residential Facility" accessLevel="Public"/>
<def name="Home Healthcare Services" id="Home Healthcare Services" accessLevel="Public"/>
<def name="Face-to-Face Interaction" id="Face-to-Face Interaction" accessLevel="Public"/>
<def name="Psych Visit - Psychotherapy" id="Psych Visit - Psychotherapy" accessLevel="Public"/>
<def name="Behavioral/Neuropsych Assessment" id="Behavioral/Neuropsych Assessment" accessLevel="Public"/>
<def name="Occupational Therapy Evaluation" id="Occupational Therapy Evaluation" accessLevel="Public"/>
<def name="Office Visit" id="Office Visit" accessLevel="Public"/>
<def name="Outpatient Consultation" id="Outpatient Consultation" accessLevel="Public"/>
<def name="Standardized Tools for Assessment of Cognition" id="Standardized Tools for Assessment of Cognition" accessLevel="Public"/>
<def name="Cognitive Assessment" id="Cognitive Assessment" accessLevel="Public"/>
</valueSets>
<statements>
<def name="Cognition Risk Assessment" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="Assessment">
<expression xmlns:ns0="urn:healthit-gov:qdm:v5_0_draft" dataType="ns0:AssessmentPerformed" templateId="PositiveAssessmentPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Standardized Tools for Assessment of Cognition" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="Not">
<operand xsi:type="IsNull">
<operand path="result" scope="Assessment" xsi:type="Property"/>
</operand>
</where>
</expression>
</def>
<def name="Cognitive Intervention" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="Intervention">
<expression xmlns:ns1="urn:healthit-gov:qdm:v5_0_draft" dataType="ns1:InterventionPerformed" templateId="PositiveInterventionPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Cognitive Assessment" xsi:type="ValueSetRef"/>
</expression>
</source>
</expression>
</def>
<def name="DEM Encounters 149" context="Patient" accessLevel="Public">
<expression xsi:type="Distinct">
<operand xsi:type="Query">
<source alias="Encounter">
<expression xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xsi:type="Union">
<operand xmlns:ns2="urn:healthit-gov:qdm:v5_0_draft" dataType="ns2:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Psych Visit - Diagnostic Evaluation" xsi:type="ValueSetRef"/>
</operand>
<operand xmlns:ns3="urn:healthit-gov:qdm:v5_0_draft" dataType="ns3:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Nursing Facility Visit" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns4="urn:healthit-gov:qdm:v5_0_draft" dataType="ns4:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Care Services in Long-Term Residential Facility" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns5="urn:healthit-gov:qdm:v5_0_draft" dataType="ns5:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Home Healthcare Services" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns6="urn:healthit-gov:qdm:v5_0_draft" dataType="ns6:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Face-to-Face Interaction" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns7="urn:healthit-gov:qdm:v5_0_draft" dataType="ns7:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Psych Visit - Psychotherapy" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns8="urn:healthit-gov:qdm:v5_0_draft" dataType="ns8:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Behavioral/Neuropsych Assessment" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns9="urn:healthit-gov:qdm:v5_0_draft" dataType="ns9:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Occupational Therapy Evaluation" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns10="urn:healthit-gov:qdm:v5_0_draft" dataType="ns10:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Office Visit" xsi:type="ValueSetRef"/>
</operand>
</operand>
<operand xmlns:ns11="urn:healthit-gov:qdm:v5_0_draft" dataType="ns11:EncounterPerformed" templateId="PositiveEncounterPerformed" codeProperty="code" xsi:type="Retrieve">
<codes name="Outpatient Consultation" xsi:type="ValueSetRef"/>
</operand>
</expression>
</source>
<where xsi:type="IncludedIn">
<operand path="relevantPeriod" scope="Encounter" xsi:type="Property"/>
<operand name="Measurement Period" xsi:type="ParameterRef"/>
</where>
</operand>
</expression>
</def>
<def name="Numerator" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="Encounter">
<expression name="DEM Encounters 149" xsi:type="ExpressionRef"/>
</source>
<where xsi:type="Or">
<operand xsi:type="Exists">
<operand xsi:type="Query">
<source alias="Assessment">
<expression name="Cognition Risk Assessment" xsi:type="ExpressionRef"/>
</source>
<where xsi:type="Equal">
<operand precision="Month" xsi:type="DurationBetween">
<operand path="authorDatetime" scope="Assessment" xsi:type="Property"/>
<operand xsi:type="End">
<operand path="relevantPeriod" scope="Encounter" xsi:type="Property"/>
</operand>
</operand>
<operand valueType="t:Integer" value="12" xsi:type="Literal"/>
</where>
</operand>
</operand>
<operand xsi:type="Exists">
<operand xsi:type="Query">
<source alias="Intervention">
<expression name="Cognitive Intervention" xsi:type="ExpressionRef"/>
</source>
<where xsi:type="Equal">
<operand precision="Month" xsi:type="DurationBetween">
<operand xsi:type="Start">
<operand path="relevantPeriod" scope="Intervention" xsi:type="Property"/>
</operand>
<operand xsi:type="End">
<operand path="relevantPeriod" scope="Encounter" xsi:type="Property"/>
</operand>
</operand>
<operand valueType="t:Integer" value="12" xsi:type="Literal"/>
</where>
</operand>
</operand>
</where>
</expression>
</def>
</statements>
</library>