canvas 0.63.0__py3-none-any.whl → 0.89.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. {canvas-0.63.0.dist-info → canvas-0.89.0.dist-info}/METADATA +4 -1
  2. {canvas-0.63.0.dist-info → canvas-0.89.0.dist-info}/RECORD +184 -98
  3. {canvas-0.63.0.dist-info → canvas-0.89.0.dist-info}/WHEEL +1 -1
  4. canvas_cli/apps/emit/event_fixtures/UNKNOWN.ndjson +1 -0
  5. canvas_cli/apps/logs/logs.py +386 -22
  6. canvas_cli/main.py +3 -1
  7. canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/tests/test_models.py +46 -4
  8. canvas_cli/utils/context/context.py +13 -13
  9. canvas_cli/utils/validators/manifest_schema.py +26 -1
  10. canvas_generated/messages/effects_pb2.py +5 -5
  11. canvas_generated/messages/effects_pb2.pyi +108 -2
  12. canvas_generated/messages/events_pb2.py +6 -6
  13. canvas_generated/messages/events_pb2.pyi +282 -2
  14. canvas_sdk/clients/__init__.py +1 -0
  15. canvas_sdk/clients/llms/__init__.py +17 -0
  16. canvas_sdk/clients/llms/libraries/__init__.py +11 -0
  17. canvas_sdk/clients/llms/libraries/llm_anthropic.py +87 -0
  18. canvas_sdk/clients/llms/libraries/llm_api.py +143 -0
  19. canvas_sdk/clients/llms/libraries/llm_google.py +92 -0
  20. canvas_sdk/clients/llms/libraries/llm_openai.py +98 -0
  21. canvas_sdk/clients/llms/structures/__init__.py +9 -0
  22. canvas_sdk/clients/llms/structures/llm_response.py +33 -0
  23. canvas_sdk/clients/llms/structures/llm_tokens.py +53 -0
  24. canvas_sdk/clients/llms/structures/llm_turn.py +47 -0
  25. canvas_sdk/clients/llms/structures/settings/__init__.py +13 -0
  26. canvas_sdk/clients/llms/structures/settings/llm_settings.py +27 -0
  27. canvas_sdk/clients/llms/structures/settings/llm_settings_anthropic.py +43 -0
  28. canvas_sdk/clients/llms/structures/settings/llm_settings_gemini.py +40 -0
  29. canvas_sdk/clients/llms/structures/settings/llm_settings_gpt4.py +40 -0
  30. canvas_sdk/clients/llms/structures/settings/llm_settings_gpt5.py +48 -0
  31. canvas_sdk/clients/third_party.py +3 -0
  32. canvas_sdk/commands/__init__.py +12 -0
  33. canvas_sdk/commands/base.py +33 -2
  34. canvas_sdk/commands/commands/adjust_prescription.py +4 -0
  35. canvas_sdk/commands/commands/custom_command.py +86 -0
  36. canvas_sdk/commands/commands/family_history.py +17 -1
  37. canvas_sdk/commands/commands/immunization_statement.py +42 -2
  38. canvas_sdk/commands/commands/medication_statement.py +16 -1
  39. canvas_sdk/commands/commands/past_surgical_history.py +16 -1
  40. canvas_sdk/commands/commands/perform.py +18 -1
  41. canvas_sdk/commands/commands/prescribe.py +8 -9
  42. canvas_sdk/commands/commands/refill.py +5 -5
  43. canvas_sdk/commands/commands/resolve_condition.py +5 -5
  44. canvas_sdk/commands/commands/review/__init__.py +3 -0
  45. canvas_sdk/commands/commands/review/base.py +72 -0
  46. canvas_sdk/commands/commands/review/imaging.py +13 -0
  47. canvas_sdk/commands/commands/review/lab.py +13 -0
  48. canvas_sdk/commands/commands/review/referral.py +13 -0
  49. canvas_sdk/commands/commands/review/uncategorized_document.py +13 -0
  50. canvas_sdk/commands/validation.py +43 -0
  51. canvas_sdk/effects/batch_originate.py +22 -0
  52. canvas_sdk/effects/calendar/__init__.py +13 -3
  53. canvas_sdk/effects/calendar/{create_calendar.py → calendar.py} +19 -5
  54. canvas_sdk/effects/calendar/event.py +172 -0
  55. canvas_sdk/effects/claim_label.py +93 -0
  56. canvas_sdk/effects/claim_line_item.py +47 -0
  57. canvas_sdk/effects/claim_queue.py +49 -0
  58. canvas_sdk/effects/fax/__init__.py +3 -0
  59. canvas_sdk/effects/fax/base.py +77 -0
  60. canvas_sdk/effects/fax/note.py +42 -0
  61. canvas_sdk/effects/metadata.py +15 -1
  62. canvas_sdk/effects/note/__init__.py +8 -1
  63. canvas_sdk/effects/note/appointment.py +135 -7
  64. canvas_sdk/effects/note/base.py +17 -0
  65. canvas_sdk/effects/note/message.py +22 -14
  66. canvas_sdk/effects/note/note.py +150 -1
  67. canvas_sdk/effects/observation/__init__.py +11 -0
  68. canvas_sdk/effects/observation/base.py +206 -0
  69. canvas_sdk/effects/patient/__init__.py +2 -0
  70. canvas_sdk/effects/patient/base.py +8 -0
  71. canvas_sdk/effects/payment/__init__.py +11 -0
  72. canvas_sdk/effects/payment/base.py +355 -0
  73. canvas_sdk/effects/payment/post_claim_payment.py +49 -0
  74. canvas_sdk/effects/send_contact_verification.py +42 -0
  75. canvas_sdk/effects/task/__init__.py +2 -1
  76. canvas_sdk/effects/task/task.py +30 -0
  77. canvas_sdk/effects/validation/__init__.py +3 -0
  78. canvas_sdk/effects/validation/base.py +92 -0
  79. canvas_sdk/events/base.py +15 -0
  80. canvas_sdk/handlers/application.py +7 -7
  81. canvas_sdk/handlers/simple_api/api.py +1 -4
  82. canvas_sdk/handlers/simple_api/websocket.py +1 -4
  83. canvas_sdk/handlers/utils.py +14 -0
  84. canvas_sdk/questionnaires/utils.py +1 -0
  85. canvas_sdk/templates/utils.py +17 -4
  86. canvas_sdk/test_utils/factories/FACTORY_GUIDE.md +362 -0
  87. canvas_sdk/test_utils/factories/__init__.py +115 -0
  88. canvas_sdk/test_utils/factories/calendar.py +24 -0
  89. canvas_sdk/test_utils/factories/claim.py +81 -0
  90. canvas_sdk/test_utils/factories/claim_diagnosis_code.py +16 -0
  91. canvas_sdk/test_utils/factories/coverage.py +17 -0
  92. canvas_sdk/test_utils/factories/imaging.py +74 -0
  93. canvas_sdk/test_utils/factories/lab.py +192 -0
  94. canvas_sdk/test_utils/factories/medication_history.py +75 -0
  95. canvas_sdk/test_utils/factories/note.py +52 -0
  96. canvas_sdk/test_utils/factories/organization.py +50 -0
  97. canvas_sdk/test_utils/factories/practicelocation.py +88 -0
  98. canvas_sdk/test_utils/factories/referral.py +81 -0
  99. canvas_sdk/test_utils/factories/staff.py +111 -0
  100. canvas_sdk/test_utils/factories/task.py +66 -0
  101. canvas_sdk/test_utils/factories/uncategorized_clinical_document.py +48 -0
  102. canvas_sdk/utils/metrics.py +4 -1
  103. canvas_sdk/v1/data/__init__.py +66 -7
  104. canvas_sdk/v1/data/allergy_intolerance.py +5 -11
  105. canvas_sdk/v1/data/appointment.py +18 -4
  106. canvas_sdk/v1/data/assessment.py +2 -12
  107. canvas_sdk/v1/data/banner_alert.py +2 -4
  108. canvas_sdk/v1/data/base.py +53 -14
  109. canvas_sdk/v1/data/billing.py +8 -11
  110. canvas_sdk/v1/data/calendar.py +64 -0
  111. canvas_sdk/v1/data/care_team.py +4 -10
  112. canvas_sdk/v1/data/claim.py +172 -66
  113. canvas_sdk/v1/data/claim_diagnosis_code.py +19 -0
  114. canvas_sdk/v1/data/claim_line_item.py +2 -5
  115. canvas_sdk/v1/data/coding.py +19 -0
  116. canvas_sdk/v1/data/command.py +2 -4
  117. canvas_sdk/v1/data/common.py +10 -0
  118. canvas_sdk/v1/data/compound_medication.py +3 -4
  119. canvas_sdk/v1/data/condition.py +4 -9
  120. canvas_sdk/v1/data/coverage.py +66 -26
  121. canvas_sdk/v1/data/detected_issue.py +20 -20
  122. canvas_sdk/v1/data/device.py +2 -14
  123. canvas_sdk/v1/data/discount.py +2 -5
  124. canvas_sdk/v1/data/encounter.py +44 -0
  125. canvas_sdk/v1/data/facility.py +1 -0
  126. canvas_sdk/v1/data/goal.py +2 -14
  127. canvas_sdk/v1/data/imaging.py +4 -30
  128. canvas_sdk/v1/data/immunization.py +7 -15
  129. canvas_sdk/v1/data/lab.py +12 -65
  130. canvas_sdk/v1/data/line_item_transaction.py +2 -5
  131. canvas_sdk/v1/data/medication.py +3 -8
  132. canvas_sdk/v1/data/medication_history.py +142 -0
  133. canvas_sdk/v1/data/medication_statement.py +41 -0
  134. canvas_sdk/v1/data/message.py +4 -8
  135. canvas_sdk/v1/data/note.py +37 -38
  136. canvas_sdk/v1/data/observation.py +9 -36
  137. canvas_sdk/v1/data/organization.py +70 -9
  138. canvas_sdk/v1/data/patient.py +8 -12
  139. canvas_sdk/v1/data/patient_consent.py +4 -14
  140. canvas_sdk/v1/data/payment_collection.py +2 -5
  141. canvas_sdk/v1/data/posting.py +3 -9
  142. canvas_sdk/v1/data/practicelocation.py +66 -7
  143. canvas_sdk/v1/data/protocol_override.py +3 -4
  144. canvas_sdk/v1/data/protocol_result.py +3 -3
  145. canvas_sdk/v1/data/questionnaire.py +10 -26
  146. canvas_sdk/v1/data/reason_for_visit.py +2 -6
  147. canvas_sdk/v1/data/referral.py +41 -17
  148. canvas_sdk/v1/data/staff.py +34 -26
  149. canvas_sdk/v1/data/stop_medication_event.py +27 -0
  150. canvas_sdk/v1/data/task.py +30 -11
  151. canvas_sdk/v1/data/team.py +2 -4
  152. canvas_sdk/v1/data/uncategorized_clinical_document.py +84 -0
  153. canvas_sdk/v1/data/user.py +14 -0
  154. canvas_sdk/v1/data/utils.py +5 -0
  155. canvas_sdk/value_set/v2026/__init__.py +1 -0
  156. canvas_sdk/value_set/v2026/adverse_event.py +157 -0
  157. canvas_sdk/value_set/v2026/allergy.py +116 -0
  158. canvas_sdk/value_set/v2026/assessment.py +466 -0
  159. canvas_sdk/value_set/v2026/communication.py +496 -0
  160. canvas_sdk/value_set/v2026/condition.py +52934 -0
  161. canvas_sdk/value_set/v2026/device.py +315 -0
  162. canvas_sdk/value_set/v2026/diagnostic_study.py +5243 -0
  163. canvas_sdk/value_set/v2026/encounter.py +2714 -0
  164. canvas_sdk/value_set/v2026/immunization.py +297 -0
  165. canvas_sdk/value_set/v2026/individual_characteristic.py +339 -0
  166. canvas_sdk/value_set/v2026/intervention.py +1703 -0
  167. canvas_sdk/value_set/v2026/laboratory_test.py +1831 -0
  168. canvas_sdk/value_set/v2026/medication.py +8218 -0
  169. canvas_sdk/value_set/v2026/no_qdm_category_assigned.py +26493 -0
  170. canvas_sdk/value_set/v2026/physical_exam.py +342 -0
  171. canvas_sdk/value_set/v2026/procedure.py +27869 -0
  172. canvas_sdk/value_set/v2026/symptom.py +625 -0
  173. logger/logger.py +30 -31
  174. logger/logstash.py +282 -0
  175. logger/pubsub.py +26 -0
  176. plugin_runner/allowed-module-imports.json +940 -9
  177. plugin_runner/generate_allowed_imports.py +1 -0
  178. plugin_runner/installation.py +2 -2
  179. plugin_runner/plugin_runner.py +21 -24
  180. plugin_runner/sandbox.py +34 -0
  181. protobufs/canvas_generated/messages/effects.proto +65 -0
  182. protobufs/canvas_generated/messages/events.proto +150 -51
  183. settings.py +27 -11
  184. canvas_sdk/effects/calendar/create_event.py +0 -43
  185. {canvas-0.63.0.dist-info → canvas-0.89.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,466 @@
1
+ from ..value_set import ValueSet
2
+
3
+ class EstimatedGestationalAgeAtDelivery(ValueSet):
4
+ """
5
+ **Clinical Focus:** The purpose of this value set is to describe concepts of assessment for estimated gestational age at delivery.
6
+
7
+ **Data Element Scope:** This value set may use a model element related to assessment.
8
+
9
+ **Inclusion Criteria:** Includes concepts that define an assessment of the estimated gestational age at delivery.
10
+
11
+ **Exclusion Criteria:** No exclusions.
12
+ """
13
+
14
+ VALUE_SET_NAME = "Estimated Gestational Age at Delivery"
15
+ OID = "2.16.840.1.113762.1.4.1045.26"
16
+ DEFINITION_VERSION = "20210611"
17
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
18
+
19
+ LOINC = {
20
+ "11884-4", # Gestational age Estimated
21
+ "11885-1", # Gestational age Estimated from last menstrual period
22
+ "18185-9", # Gestational age
23
+ "49051-6", # Gestational age in weeks
24
+ }
25
+
26
+ class NonInvasiveOxygenTherapy(ValueSet):
27
+ """
28
+ **Clinical Focus:** The purpose of this value set is to represent concepts for oxygen therapies not associated with invasive mechanical ventilation
29
+
30
+ **Data Element Scope:** This value set may use a model element related to Assessment
31
+
32
+ **Inclusion Criteria:** Includes concepts that represent non invasive oxygen therapies including oxygen masks, nasal cannulas, CPAP, and BPAP which are not associated with invasive mechanical ventilation
33
+
34
+ **Exclusion Criteria:** Oxygen therapies and devices associated with invasive mechanical ventilation
35
+ """
36
+
37
+ VALUE_SET_NAME = "Non Invasive Oxygen Therapy"
38
+ OID = "2.16.840.1.113762.1.4.1248.213"
39
+ DEFINITION_VERSION = "20230512"
40
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
41
+
42
+ ICD10PCS = {
43
+ "5A09357", # Assistance with Respiratory Ventilation, Less than 24 Consecutive Hours, Continuous Positive Airway Pressure
44
+ "5A09358", # Assistance with Respiratory Ventilation, Less than 24 Consecutive Hours, Intermittent Positive Airway Pressure
45
+ "5A09457", # Assistance with Respiratory Ventilation, 24-96 Consecutive Hours, Continuous Positive Airway Pressure
46
+ "5A09458", # Assistance with Respiratory Ventilation, 24-96 Consecutive Hours, Intermittent Positive Airway Pressure
47
+ "5A09557", # Assistance with Respiratory Ventilation, Greater than 96 Consecutive Hours, Continuous Positive Airway Pressure
48
+ "5A09558", # Assistance with Respiratory Ventilation, Greater than 96 Consecutive Hours, Intermittent Positive Airway Pressure
49
+ }
50
+
51
+ SNOMEDCT = {
52
+ "1186618000", # Bilevel artificial ventilation (regime/therapy)
53
+ "1186678006", # Continuous positive airway pressure with an assured constant airway pressure adjunct (regime/therapy)
54
+ "243142003", # Dual pressure spontaneous ventilation support (regime/therapy)
55
+ "257420000", # Breathing circuit (physical object)
56
+ "26397000", # Breathing bag, device (physical object)
57
+ "297120004", # Anesthetic face mask (physical object)
58
+ "336602003", # Oxygen mask (physical object)
59
+ "336623009", # Oxygen nasal cannula (physical object)
60
+ "34281000175105", # Nocturnal continuous positive airway pressure (regime/therapy)
61
+ "34291000175108", # Nocturnal dual pressure spontaneous ventilation support (regime/therapy)
62
+ "405642002", # Anesthesia breathing circuit (physical object)
63
+ "424172009", # Dual pressure spontaneous ventilation support weaning protocol (regime/therapy)
64
+ "425478008", # Blow by oxygen mask (physical object)
65
+ "425826004", # Bilevel positive airway pressure oxygen nasal cannula (physical object)
66
+ "426294006", # Face tent oxygen delivery device (physical object)
67
+ "426851007", # Aerosol oxygen mask (physical object)
68
+ "426854004", # High flow oxygen nasal cannula (physical object)
69
+ "427591007", # Nonrebreather oxygen mask (physical object)
70
+ "427594004", # Oxyhood (physical object)
71
+ "428285009", # Venturi mask (physical object)
72
+ "442398003", # Nasal mask (physical object)
73
+ "446573003", # Continuous positive airway pressure titration (procedure)
74
+ "447243000", # Bilevel positive airway pressure titration (procedure)
75
+ "448134000", # Continuous positive airway pressure to nonventilated lung (regime/therapy)
76
+ "463587004", # Rebreathing oxygen face mask (physical object)
77
+ "464225001", # Oxygen administration nasal catheter (physical object)
78
+ "464233000", # Partial-rebreathing oxygen face mask (physical object)
79
+ "464428002", # Moisture chamber face mask (physical object)
80
+ "464578003", # Oxygen administration face tent (physical object)
81
+ "465256000", # Tracheostomy mask, aerosol (physical object)
82
+ "465433006", # Venturi oxygen face mask (physical object)
83
+ "465839001", # Tracheostomy mask, oxygen (physical object)
84
+ "466713001", # Basic nasal oxygen cannula (physical object)
85
+ "467645007", # Continuous positive airway pressure nasal oxygen cannula (physical object)
86
+ "468246003", # Aerosol face mask, rebreathing (physical object)
87
+ "468414000", # Aerosol face mask, non-rebreathing (physical object)
88
+ "469956003", # Anesthesia breathing circuit circulator (physical object)
89
+ "47545007", # Continuous positive airway pressure ventilation treatment (regime/therapy)
90
+ "701254008", # Bidirectional-anesthesia breathing circuit (physical object)
91
+ "701582002", # Vortex oxygen face mask (physical object)
92
+ "704718009", # CPAP/BPAP oral mask (physical object)
93
+ "706175007", # Ventilator breathing circuit (physical object)
94
+ "706226000", # Continuous positive airway pressure/Bilevel positive airway pressure mask (physical object)
95
+ "719705009", # Capnography oxygen mask (physical object)
96
+ "722742002", # Breathing room air (finding)
97
+ }
98
+
99
+ class EmergencyDepartmentEvaluation(ValueSet):
100
+ """
101
+ **Clinical Focus:** The purpose of this value set is to represent concepts of an assessment performed in the emergency department.
102
+
103
+ **Data Element Scope:** This value set may use a model element related to Assessment.
104
+
105
+ **Inclusion Criteria:** Includes concepts that represent an assessment that was performed in the emergency department.
106
+
107
+ **Exclusion Criteria:** No exclusions.
108
+ """
109
+
110
+ VALUE_SET_NAME = "Emergency Department Evaluation"
111
+ OID = "2.16.840.1.113762.1.4.1111.163"
112
+ DEFINITION_VERSION = "20200305"
113
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
114
+
115
+ LOINC = {
116
+ "28568-4", # Physician Emergency department Note
117
+ "34111-5", # Emergency department Note
118
+ "34878-9", # Emergency medicine Note
119
+ "51846-4", # Emergency department Consult note
120
+ "54094-8", # Emergency department Triage note
121
+ "68552-9", # Emergency medicine Emergency department Admission evaluation note
122
+ "74211-4", # Emergency department+Hospital Summary of episode note
123
+ "78249-0", # Emergency department Admission history and physical note
124
+ "78307-6", # Emergency department History and physical note
125
+ "78337-3", # Emergency department Initial evaluation note
126
+ "78341-5", # Emergency department Transfer summary note
127
+ "80741-2", # Emergency medicine Emergency department Plan of care note
128
+ "80746-1", # Emergency department Plan of care note
129
+ "83818-5", # Attending Emergency department Note
130
+ }
131
+
132
+ class TobaccoUseScreening(ValueSet):
133
+ """
134
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments to screen for tobacco use.
135
+
136
+ **Data Element Scope:** This value set may use a model element related to Assessment.
137
+
138
+ **Inclusion Criteria:** Includes concepts that represent an assessment for tobacco use, including smoking and smoke-less tobacco products.
139
+
140
+ **Exclusion Criteria:** No exclusions.
141
+ """
142
+
143
+ VALUE_SET_NAME = "Tobacco Use Screening"
144
+ OID = "2.16.840.1.113883.3.526.3.1278"
145
+ DEFINITION_VERSION = "20170504"
146
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
147
+
148
+ LOINC = {
149
+ "39240-7", # Tobacco use status CPHS
150
+ "68535-4", # Have you used tobacco in the last 30 days [SAMHSA]
151
+ "68536-2", # Have you used smokeless tobacco product in the last 30 days [SAMHSA]
152
+ "72166-2", # Tobacco smoking status
153
+ }
154
+
155
+ class FallsScreening(ValueSet):
156
+ """
157
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments using a falls screening tool.
158
+
159
+ **Data Element Scope:** This value set may use a model element related to Assessment.
160
+
161
+ **Inclusion Criteria:** Includes concepts that represent an assessment for fall risk.
162
+
163
+ **Exclusion Criteria:** Excludes concepts that represent an assessment for falls for children.
164
+ """
165
+
166
+ VALUE_SET_NAME = "Falls Screening"
167
+ OID = "2.16.840.1.113883.3.464.1003.118.12.1028"
168
+ DEFINITION_VERSION = "20190315"
169
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
170
+
171
+ LOINC = {
172
+ "52552-7", # Falls in the past year
173
+ "57254-5", # Standardized fall risk assessment was conducted during assessment period [CMS Assessment]
174
+ "59454-9", # History of falling; immediate or within 3 months [Morse Fall Scale]
175
+ "73830-2", # Fall risk assessment
176
+ }
177
+
178
+ class StandardizedToolsScoreForAssessmentOfCognition(ValueSet):
179
+ """
180
+ **Clinical Focus:** The purpose of this value set is to define concepts for assessments representing total score results for standardized tools used for the evaluation of cognition.
181
+
182
+ **Data Element Scope:** This value set may use a model element related to Assessment.
183
+
184
+ **Inclusion Criteria:** Includes concepts that describe assessments with total score results for the following standardized tools: -Blessed Orientation-Memory-Concentration Test (BOMC) -Montreal Cognitive Assessment (MoCA) -St. Louis University Mental Status Examination (SLUMS) -Mini-Mental State Examination (MMSE) [Note: The MMSE has not been well validated for non-Alzheimer's dementias] -Short Informant Questionnaire on Cognitive Decline in the Elderly (IQCODE) -Ascertain Dementia 8 (AD8) Questionnaire -Minimum Data Set (MDS) Brief Interview of Mental Status (BIMS) [Note: Validated for use with nursing home patients only] -Formal neuropsychological evaluation -Mini-Cog.
185
+
186
+ **Exclusion Criteria:** No exclusions.
187
+ """
188
+
189
+ VALUE_SET_NAME = "Standardized Tools Score for Assessment of Cognition"
190
+ OID = "2.16.840.1.113883.3.526.3.1006"
191
+ DEFINITION_VERSION = "20170504"
192
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
193
+
194
+ LOINC = {
195
+ "58151-2", # Prior assessment Brief Interview for Mental Status (BIMS) summary score [MDSv3]
196
+ "71492-3", # Total score [SLUMS]
197
+ "71493-1", # Total score [IQCODE]
198
+ "71722-3", # Total score [AD8]
199
+ "72106-8", # Total score [MMSE]
200
+ "72172-0", # Total score [MoCA]
201
+ "72173-8", # Total score [BOMC]
202
+ "72233-0", # Total score [Mini-Cog]
203
+ }
204
+
205
+ class StandardizedPainAssessmentTool(ValueSet):
206
+ """
207
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments using pain-focused tools or instruments to quantify pain intensity.
208
+
209
+ **Data Element Scope:** This value set may use a model element related to Assessment.
210
+
211
+ **Inclusion Criteria:** Includes concepts that represent an assessment of pain intensity.
212
+
213
+ **Exclusion Criteria:** No exclusions.
214
+ """
215
+
216
+ VALUE_SET_NAME = "Standardized Pain Assessment Tool"
217
+ OID = "2.16.840.1.113883.3.526.3.1028"
218
+ DEFINITION_VERSION = "20170504"
219
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
220
+
221
+ LOINC = {
222
+ "38208-5", # Pain severity - Reported
223
+ "38214-3", # Pain severity [Score] Visual analog score
224
+ "38221-8", # Pain severity Wong-Baker FACES pain rating scale
225
+ "72514-3", # Pain severity - 0-10 verbal numeric rating [Score] - Reported
226
+ "77565-0", # Pain interference score [BPI Short Form]
227
+ }
228
+
229
+ class Phq9AndPhq9mTools(ValueSet):
230
+ """
231
+ **Clinical Focus:** The purpose of this value set is to represent concepts for the assessments of PHQ 9 and PHQ 9M resulting in a completed depression assessment scores for adults and adolescents.
232
+
233
+ **Data Element Scope:** This value set may use a model element related to Assessment.
234
+
235
+ **Inclusion Criteria:** Includes concepts that represent a completed assessment using PHQ 9 and PHQ 9M depression assessment tools for adults and adolescents with a summary score.
236
+
237
+ **Exclusion Criteria:** No exclusions.
238
+ """
239
+
240
+ VALUE_SET_NAME = "PHQ 9 and PHQ 9M Tools"
241
+ OID = "2.16.840.1.113883.3.67.1.101.1.263"
242
+ DEFINITION_VERSION = "20220219"
243
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
244
+
245
+ LOINC = {
246
+ "44261-6", # Patient Health Questionnaire 9 item (PHQ-9) total score [Reported]
247
+ "89204-2", # Patient Health Questionnaire-9: Modified for Teens total score [Reported.PHQ.Teen]
248
+ }
249
+
250
+ class AbnormalPresentation(ValueSet):
251
+ """
252
+ **Clinical Focus:** The purpose of this value set is to group diagnoses of a fetus in an abnormal position in the uterus at the time of delivery.
253
+
254
+ **Data Element Scope:** This value set may use a model element related to diagnosis.
255
+
256
+ **Inclusion Criteria:** Includes concepts that identify a diagnosis of a fetus in an abnormal position.
257
+
258
+ **Exclusion Criteria:** Excludes concepts that represent a fetus in a vertex presentation.
259
+ """
260
+
261
+ VALUE_SET_NAME = "Abnormal Presentation"
262
+ OID = "2.16.840.1.113762.1.4.1045.105"
263
+ DEFINITION_VERSION = "20210611"
264
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
265
+
266
+ ICD10CM = {
267
+ "O321XX0", # Maternal care for breech presentation, not applicable or unspecified
268
+ "O321XX1", # Maternal care for breech presentation, fetus 1
269
+ "O321XX2", # Maternal care for breech presentation, fetus 2
270
+ "O321XX3", # Maternal care for breech presentation, fetus 3
271
+ "O321XX4", # Maternal care for breech presentation, fetus 4
272
+ "O321XX5", # Maternal care for breech presentation, fetus 5
273
+ "O321XX9", # Maternal care for breech presentation, other fetus
274
+ "O322XX0", # Maternal care for transverse and oblique lie, not applicable or unspecified
275
+ "O322XX1", # Maternal care for transverse and oblique lie, fetus 1
276
+ "O322XX2", # Maternal care for transverse and oblique lie, fetus 2
277
+ "O322XX3", # Maternal care for transverse and oblique lie, fetus 3
278
+ "O322XX4", # Maternal care for transverse and oblique lie, fetus 4
279
+ "O322XX5", # Maternal care for transverse and oblique lie, fetus 5
280
+ "O322XX9", # Maternal care for transverse and oblique lie, other fetus
281
+ "O323XX0", # Maternal care for face, brow and chin presentation, not applicable or unspecified
282
+ "O323XX1", # Maternal care for face, brow and chin presentation, fetus 1
283
+ "O323XX2", # Maternal care for face, brow and chin presentation, fetus 2
284
+ "O323XX3", # Maternal care for face, brow and chin presentation, fetus 3
285
+ "O323XX4", # Maternal care for face, brow and chin presentation, fetus 4
286
+ "O323XX5", # Maternal care for face, brow and chin presentation, fetus 5
287
+ "O323XX9", # Maternal care for face, brow and chin presentation, other fetus
288
+ "O328XX0", # Maternal care for other malpresentation of fetus, not applicable or unspecified
289
+ "O328XX1", # Maternal care for other malpresentation of fetus, fetus 1
290
+ "O328XX2", # Maternal care for other malpresentation of fetus, fetus 2
291
+ "O328XX3", # Maternal care for other malpresentation of fetus, fetus 3
292
+ "O328XX4", # Maternal care for other malpresentation of fetus, fetus 4
293
+ "O328XX5", # Maternal care for other malpresentation of fetus, fetus 5
294
+ "O328XX9", # Maternal care for other malpresentation of fetus, other fetus
295
+ "O329XX0", # Maternal care for malpresentation of fetus, unspecified, not applicable or unspecified
296
+ "O329XX1", # Maternal care for malpresentation of fetus, unspecified, fetus 1
297
+ "O329XX2", # Maternal care for malpresentation of fetus, unspecified, fetus 2
298
+ "O329XX3", # Maternal care for malpresentation of fetus, unspecified, fetus 3
299
+ "O329XX4", # Maternal care for malpresentation of fetus, unspecified, fetus 4
300
+ "O329XX5", # Maternal care for malpresentation of fetus, unspecified, fetus 5
301
+ "O329XX9", # Maternal care for malpresentation of fetus, unspecified, other fetus
302
+ "O632", # Delayed delivery of second twin, triplet, etc.
303
+ "O641XX0", # Obstructed labor due to breech presentation, not applicable or unspecified
304
+ "O641XX1", # Obstructed labor due to breech presentation, fetus 1
305
+ "O641XX2", # Obstructed labor due to breech presentation, fetus 2
306
+ "O641XX3", # Obstructed labor due to breech presentation, fetus 3
307
+ "O641XX4", # Obstructed labor due to breech presentation, fetus 4
308
+ "O641XX5", # Obstructed labor due to breech presentation, fetus 5
309
+ "O641XX9", # Obstructed labor due to breech presentation, other fetus
310
+ "O642XX0", # Obstructed labor due to face presentation, not applicable or unspecified
311
+ "O642XX1", # Obstructed labor due to face presentation, fetus 1
312
+ "O642XX2", # Obstructed labor due to face presentation, fetus 2
313
+ "O642XX3", # Obstructed labor due to face presentation, fetus 3
314
+ "O642XX4", # Obstructed labor due to face presentation, fetus 4
315
+ "O642XX5", # Obstructed labor due to face presentation, fetus 5
316
+ "O642XX9", # Obstructed labor due to face presentation, other fetus
317
+ "O643XX0", # Obstructed labor due to brow presentation, not applicable or unspecified
318
+ "O643XX1", # Obstructed labor due to brow presentation, fetus 1
319
+ "O643XX2", # Obstructed labor due to brow presentation, fetus 2
320
+ "O643XX3", # Obstructed labor due to brow presentation, fetus 3
321
+ "O643XX4", # Obstructed labor due to brow presentation, fetus 4
322
+ "O643XX5", # Obstructed labor due to brow presentation, fetus 5
323
+ "O643XX9", # Obstructed labor due to brow presentation, other fetus
324
+ "O644XX0", # Obstructed labor due to shoulder presentation, not applicable or unspecified
325
+ "O644XX1", # Obstructed labor due to shoulder presentation, fetus 1
326
+ "O644XX2", # Obstructed labor due to shoulder presentation, fetus 2
327
+ "O644XX3", # Obstructed labor due to shoulder presentation, fetus 3
328
+ "O644XX4", # Obstructed labor due to shoulder presentation, fetus 4
329
+ "O644XX5", # Obstructed labor due to shoulder presentation, fetus 5
330
+ "O644XX9", # Obstructed labor due to shoulder presentation, other fetus
331
+ "O648XX0", # Obstructed labor due to other malposition and malpresentation, not applicable or unspecified
332
+ "O648XX1", # Obstructed labor due to other malposition and malpresentation, fetus 1
333
+ "O648XX2", # Obstructed labor due to other malposition and malpresentation, fetus 2
334
+ "O648XX3", # Obstructed labor due to other malposition and malpresentation, fetus 3
335
+ "O648XX4", # Obstructed labor due to other malposition and malpresentation, fetus 4
336
+ "O648XX5", # Obstructed labor due to other malposition and malpresentation, fetus 5
337
+ "O648XX9", # Obstructed labor due to other malposition and malpresentation, other fetus
338
+ }
339
+
340
+ SNOMEDCT = {
341
+ "11914001", # Transverse OR oblique presentation of fetus (disorder)
342
+ "1231436008", # Breech position of fetus in pregnancy (disorder)
343
+ "18559007", # Frank breech presentation (finding)
344
+ "199355003", # Breech presentation with antenatal problem (finding)
345
+ "199359009", # Oblique lie with antenatal problem (disorder)
346
+ "199363002", # Transverse lie with antenatal problem (disorder)
347
+ "199751005", # Obstructed labor due to breech presentation (disorder)
348
+ "199752003", # Obstructed labor due to face presentation (disorder)
349
+ "199753008", # Obstructed labor due to brow presentation (disorder)
350
+ "199754002", # Obstructed labor due to shoulder presentation (disorder)
351
+ "200142000", # Breech extraction - delivered (finding)
352
+ "21882006", # Face presentation of fetus (disorder)
353
+ "23954006", # Acromion presentation (finding)
354
+ "249064003", # Oblique lie, head in iliac fossa (disorder)
355
+ "249065002", # Oblique lie, breech in iliac fossa (disorder)
356
+ "249089009", # Fetal mouth presenting (disorder)
357
+ "249090000", # Fetal ear presenting (disorder)
358
+ "249091001", # Fetal nose presenting (disorder)
359
+ "249093003", # Presentation of orbital ridges of fetus (disorder)
360
+ "249097002", # Footling breech presentation (finding)
361
+ "249098007", # Knee presentation (disorder)
362
+ "249099004", # Single knee presentation (disorder)
363
+ "249100007", # Double knee presentation (disorder)
364
+ "249104003", # Dorsoanterior shoulder presentation (disorder)
365
+ "249105002", # Dorsoposterior shoulder presentation (disorder)
366
+ "274128005", # Brow delivery (finding)
367
+ "274129002", # Face delivery (finding)
368
+ "289355004", # Oblique lie head in right iliac fossa (disorder)
369
+ "289356003", # Oblique lie head in left iliac fossa (disorder)
370
+ "289357007", # Oblique lie breech in right iliac fossa (disorder)
371
+ "289358002", # Oblique lie breech in left iliac fossa (disorder)
372
+ "289398000", # Fetal breech palpable vaginally (finding)
373
+ "38049006", # Incomplete breech presentation (finding)
374
+ "48906005", # Breech presentation, double footling (finding)
375
+ "49168004", # Complete breech presentation (finding)
376
+ "58903006", # Breech presentation, single footling (finding)
377
+ "6096002", # Breech presentation (finding)
378
+ "63750008", # Oblique lie (disorder)
379
+ "73161006", # Transverse lie (disorder)
380
+ "79255005", # Mentum presentation of fetus (disorder)
381
+ "8014007", # Brow presentation of fetus (disorder)
382
+ }
383
+
384
+ class HistoryOfAtrialAblation(ValueSet):
385
+ """
386
+ **Clinical Focus:** The purpose of this value set is to represent concepts for a situation of a personal history of an atrial ablation.
387
+
388
+ **Data Element Scope:** This value set may use a model element related to a diagnosis or assessment.
389
+
390
+ **Inclusion Criteria:** Includes concepts that identify a situation for a personal history of an atrial ablation.
391
+
392
+ **Exclusion Criteria:** No Exclusions.
393
+ """
394
+
395
+ VALUE_SET_NAME = "History of Atrial Ablation"
396
+ OID = "2.16.840.1.113762.1.4.1110.76"
397
+ DEFINITION_VERSION = "20221115"
398
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
399
+
400
+ SNOMEDCT = {
401
+ "427951003", # History of radiofrequency ablation operation for arrhythmia (situation)
402
+ "429508000", # History of ablation of atrioventricular node (situation)
403
+ "429756009", # History of radiofrequency ablation operation on left atrium for arrhythmia (situation)
404
+ }
405
+
406
+ class MalnutritionRiskScreening(ValueSet):
407
+ """
408
+ **Clinical Focus:** This set of values indicates that a malnutrition screening was done by the health care professional.
409
+
410
+ **Data Element Scope:** Data elements included in this set indicate an individual has been screened for malnutrition.
411
+
412
+ **Inclusion Criteria:** Malnutrition Risk Screening tools and codes to indicate that a malnutrition risk screening was done.
413
+
414
+ **Exclusion Criteria:** Nutrition assessment tools and codes to indicate that a nutrition assessment was done are excluded.
415
+ """
416
+
417
+ VALUE_SET_NAME = "Malnutrition Risk Screening"
418
+ OID = "2.16.840.1.113762.1.4.1095.92"
419
+ DEFINITION_VERSION = "20240117"
420
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
421
+
422
+ LOINC = {
423
+ "101807-6", # Malnutrition risk screen results indicator
424
+ "98967-3", # Nutritional Risk Screening 2002 panel
425
+ "98968-1", # Initial screening NRS_2002
426
+ "98972-3", # Final screening NRS_2002
427
+ }
428
+
429
+ class NutritionAssessment(ValueSet):
430
+ """
431
+ **Clinical Focus:** This set of values indicates that a nutrition assessment was completed by a health professional.
432
+
433
+ **Data Element Scope:** Completed nutrition assessment by a health professional.
434
+
435
+ **Inclusion Criteria:** Nutrition assessment tools and codes to indicate that a nutrition assessment was completed.
436
+
437
+ **Exclusion Criteria:** Nutrition screening tools and codes to indicate that a nutrition screening was completed are excluded.
438
+ """
439
+
440
+ VALUE_SET_NAME = "Nutrition Assessment"
441
+ OID = "2.16.840.1.113762.1.4.1095.21"
442
+ DEFINITION_VERSION = "20240117"
443
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
444
+
445
+ LOINC = {
446
+ "101819-1", # Nutritional assessment for malnutrition status
447
+ "75282-4", # Nutrition assessment panel
448
+ "75285-7", # Comparative nutrition assessment standards panel
449
+ "75303-8", # Nutrition assessment Narrative
450
+ "75304-6", # Nutrition status observation panel
451
+ }
452
+
453
+ __exports__ = (
454
+ "EstimatedGestationalAgeAtDelivery",
455
+ "NonInvasiveOxygenTherapy",
456
+ "EmergencyDepartmentEvaluation",
457
+ "TobaccoUseScreening",
458
+ "FallsScreening",
459
+ "StandardizedToolsScoreForAssessmentOfCognition",
460
+ "StandardizedPainAssessmentTool",
461
+ "Phq9AndPhq9mTools",
462
+ "AbnormalPresentation",
463
+ "HistoryOfAtrialAblation",
464
+ "MalnutritionRiskScreening",
465
+ "NutritionAssessment",
466
+ )