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,297 @@
1
+ from ..value_set import ValueSet
2
+
3
+ class ChildInfluenzaVaccine(ValueSet):
4
+ """
5
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with influenza vaccines for use in children 2 and younger.
6
+
7
+ **Data Element Scope:** This value set may use a model element related to Immunization.
8
+
9
+ **Inclusion Criteria:** Includes concepts that represent an influenza vaccine for use in children 2 and younger.
10
+
11
+ **Exclusion Criteria:** Excludes influenza vaccines not recommended for use in children 2 and younger.
12
+ """
13
+
14
+ VALUE_SET_NAME = "Child Influenza Vaccine"
15
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1218"
16
+ DEFINITION_VERSION = "20170504"
17
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
18
+
19
+ CVX = {
20
+ "140", # Influenza, split virus, trivalent, injectable, preservative free
21
+ "141", # Influenza, split virus, trivalent, injectable, contains preservative
22
+ "150", # Influenza, split virus, quadrivalent, injectable, preservative free
23
+ "153", # Influenza, Madin Darby Canine Kidney, subunit, trivalent, injectable, preservative free
24
+ "155", # Influenza, recombinant, trivalent, injectable, preservative free
25
+ "158", # Influenza, split virus, quadrivalent, injectable, contains preservative
26
+ "161", # Influenza, injectable,quadrivalent, preservative free, pediatric
27
+ "171", # Influenza, Madin Darby Canine Kidney, subunit, quadrivalent, injectable, preservative free
28
+ "186", # Influenza, Madin Darby Canine Kidney, subunit, quadrivalent, injectable, contains preservative
29
+ "88", # influenza virus vaccine, unspecified formulation
30
+ }
31
+
32
+ class DtapVaccine(ValueSet):
33
+ """
34
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with diphtheria, tetanus, and pertussis (DTaP) vaccines.
35
+
36
+ **Data Element Scope:** This value set may use a model element related to Immunization.
37
+
38
+ **Inclusion Criteria:** Includes concepts that represent a diphtheria, tetanus, and pertussis (DTaP) vaccine.
39
+
40
+ **Exclusion Criteria:** No exclusions.
41
+ """
42
+
43
+ VALUE_SET_NAME = "DTaP Vaccine"
44
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1214"
45
+ DEFINITION_VERSION = "20170504"
46
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
47
+
48
+ CVX = {
49
+ "106", # diphtheria, tetanus toxoids and acellular pertussis vaccine, 5 pertussis antigens
50
+ "107", # diphtheria, tetanus toxoids and acellular pertussis vaccine, unspecified formulation
51
+ "110", # DTaP-hepatitis B and poliovirus vaccine
52
+ "120", # diphtheria, tetanus toxoids and acellular pertussis vaccine, Haemophilus influenzae type b conjugate, and poliovirus vaccine, inactivated (DTaP-Hib-IPV)
53
+ "146", # Diphtheria and Tetanus Toxoids and Acellular Pertussis Adsorbed, Inactivated Poliovirus, Haemophilus b Conjugate (Meningococcal Protein Conjugate), and Hepatitis B (Recombinant) Vaccine.
54
+ "198", # Diphtheria, pertussis, tetanus, hepatitis B, Haemophilus Influenza Type b, (Pentavalent)
55
+ "20", # diphtheria, tetanus toxoids and acellular pertussis vaccine
56
+ "50", # DTaP-Haemophilus influenzae type b conjugate vaccine
57
+ }
58
+
59
+ class HepatitisAVaccine(ValueSet):
60
+ """
61
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with Hepatitis A vaccines.
62
+
63
+ **Data Element Scope:** This value set may use a model element related to Immunization.
64
+
65
+ **Inclusion Criteria:** Includes concepts that represent a Hepatitis A vaccine.
66
+
67
+ **Exclusion Criteria:** No exclusions.
68
+ """
69
+
70
+ VALUE_SET_NAME = "Hepatitis A Vaccine"
71
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1215"
72
+ DEFINITION_VERSION = "20170504"
73
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
74
+
75
+ CVX = {
76
+ "31", # hepatitis A vaccine, pediatric dosage, unspecified formulation
77
+ "83", # hepatitis A vaccine, pediatric/adolescent dosage, 2 dose schedule
78
+ "85", # hepatitis A vaccine, unspecified formulation
79
+ }
80
+
81
+ class HepatitisBVaccine(ValueSet):
82
+ """
83
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with Hepatitis B vaccines.
84
+
85
+ **Data Element Scope:** This value set may use a model element related to Immunization.
86
+
87
+ **Inclusion Criteria:** Includes concepts that represent a Hepatitis B vaccine.
88
+
89
+ **Exclusion Criteria:** No exclusions.
90
+ """
91
+
92
+ VALUE_SET_NAME = "Hepatitis B Vaccine"
93
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1216"
94
+ DEFINITION_VERSION = "20170504"
95
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
96
+
97
+ CVX = {
98
+ "08", # hepatitis B vaccine, pediatric or pediatric/adolescent dosage
99
+ "110", # DTaP-hepatitis B and poliovirus vaccine
100
+ "146", # Diphtheria and Tetanus Toxoids and Acellular Pertussis Adsorbed, Inactivated Poliovirus, Haemophilus b Conjugate (Meningococcal Protein Conjugate), and Hepatitis B (Recombinant) Vaccine.
101
+ "198", # Diphtheria, pertussis, tetanus, hepatitis B, Haemophilus Influenza Type b, (Pentavalent)
102
+ "44", # Hepatitis B vaccine (Hep B), high-dosage, dialysis or immunocompromised patient
103
+ "45", # hepatitis B vaccine, unspecified formulation
104
+ "51", # Haemophilus influenzae type b conjugate and Hepatitis B vaccine
105
+ }
106
+
107
+ class HibVaccine3DoseSchedule(ValueSet):
108
+ """
109
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with 3-dose haemophilus influenzae type b (Hib) vaccines.
110
+
111
+ **Data Element Scope:** This value set may use a model element related to Immunization.
112
+
113
+ **Inclusion Criteria:** Includes concepts that represent a 3-dose haemophilus influenzae type b (Hib) vaccine.
114
+
115
+ **Exclusion Criteria:** No exclusions.
116
+ """
117
+
118
+ VALUE_SET_NAME = "Hib Vaccine (3 dose schedule)"
119
+ OID = "2.16.840.1.113883.3.464.1003.110.12.1083"
120
+ DEFINITION_VERSION = "20190315"
121
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
122
+
123
+ CVX = {
124
+ "17", # Haemophilus influenzae type b vaccine, conjugate unspecified formulation
125
+ "49", # Haemophilus influenzae type b vaccine, PRP-OMP conjugate
126
+ "51", # Haemophilus influenzae type b conjugate and Hepatitis B vaccine
127
+ }
128
+
129
+ class HibVaccine4DoseSchedule(ValueSet):
130
+ """
131
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with 4-dose haemophilus influenzae type b (Hib) vaccines.
132
+
133
+ **Data Element Scope:** This value set may use a model element related to Immunization.
134
+
135
+ **Inclusion Criteria:** Includes concepts that represent a 4-dose haemophilus influenzae type b (Hib) vaccine.
136
+
137
+ **Exclusion Criteria:** No exclusions.
138
+ """
139
+
140
+ VALUE_SET_NAME = "Hib Vaccine (4 dose schedule)"
141
+ OID = "2.16.840.1.113883.3.464.1003.110.12.1085"
142
+ DEFINITION_VERSION = "20190315"
143
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
144
+
145
+ CVX = {
146
+ "120", # diphtheria, tetanus toxoids and acellular pertussis vaccine, Haemophilus influenzae type b conjugate, and poliovirus vaccine, inactivated (DTaP-Hib-IPV)
147
+ "146", # Diphtheria and Tetanus Toxoids and Acellular Pertussis Adsorbed, Inactivated Poliovirus, Haemophilus b Conjugate (Meningococcal Protein Conjugate), and Hepatitis B (Recombinant) Vaccine.
148
+ "148", # Meningococcal Groups C and Y and Haemophilus b Tetanus Toxoid Conjugate Vaccine
149
+ "48", # Haemophilus influenzae type b vaccine, PRP-T conjugate
150
+ }
151
+
152
+ class InactivatedPolioVaccineIpv(ValueSet):
153
+ """
154
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with inactivated polio vaccines (IPV).
155
+
156
+ **Data Element Scope:** This value set may use a model element related to Immunization.
157
+
158
+ **Inclusion Criteria:** Includes concepts that represent an inactivated polio vaccine (IPV).
159
+
160
+ **Exclusion Criteria:** No exclusions.
161
+ """
162
+
163
+ VALUE_SET_NAME = "Inactivated Polio Vaccine (IPV)"
164
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1219"
165
+ DEFINITION_VERSION = "20170504"
166
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
167
+
168
+ CVX = {
169
+ "10", # poliovirus vaccine, inactivated
170
+ "110", # DTaP-hepatitis B and poliovirus vaccine
171
+ "120", # diphtheria, tetanus toxoids and acellular pertussis vaccine, Haemophilus influenzae type b conjugate, and poliovirus vaccine, inactivated (DTaP-Hib-IPV)
172
+ "146", # Diphtheria and Tetanus Toxoids and Acellular Pertussis Adsorbed, Inactivated Poliovirus, Haemophilus b Conjugate (Meningococcal Protein Conjugate), and Hepatitis B (Recombinant) Vaccine.
173
+ "89", # poliovirus vaccine, unspecified formulation
174
+ }
175
+
176
+ class InfluenzaVirusLaivVaccine(ValueSet):
177
+ """
178
+ **Clinical Focus:** The purpose of this value set is to represent live attenuated influenza vaccine.
179
+
180
+ **Data Element Scope:** This value set may use a model element related to Immunization.
181
+
182
+ **Inclusion Criteria:** Includes concepts that represent a live attenuated influenza vaccine (quadrivalent and trivalent).
183
+
184
+ **Exclusion Criteria:** Excludes concepts that represent the recombinant or inactivated influenza vaccine.
185
+ """
186
+
187
+ VALUE_SET_NAME = "Influenza Virus LAIV Vaccine"
188
+ OID = "2.16.840.1.113883.3.464.1003.110.12.1087"
189
+ DEFINITION_VERSION = "20210224"
190
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
191
+
192
+ CVX = {
193
+ "111", # Influenza, live, trivalent, intranasal
194
+ "149", # Influenza, live, quadrivalent, intranasal
195
+ }
196
+
197
+ class MeaslesMumpsAndRubellaMmrVaccine(ValueSet):
198
+ """
199
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with measles, mumps and rubella (MMR) vaccines.
200
+
201
+ **Data Element Scope:** This value set may use a model element related to Immunization.
202
+
203
+ **Inclusion Criteria:** Includes concepts that represent a measles, mumps and rubella (MMR) vaccine.
204
+
205
+ **Exclusion Criteria:** No exclusions.
206
+ """
207
+
208
+ VALUE_SET_NAME = "Measles, Mumps and Rubella (MMR) Vaccine"
209
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1224"
210
+ DEFINITION_VERSION = "20170504"
211
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
212
+
213
+ CVX = {
214
+ "03", # measles, mumps and rubella virus vaccine
215
+ "94", # measles, mumps, rubella, and varicella virus vaccine
216
+ }
217
+
218
+ class PneumococcalConjugateVaccine(ValueSet):
219
+ """
220
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with pneumococcal conjugate vaccines.
221
+
222
+ **Data Element Scope:** This value set may use a model element related to Immunization.
223
+
224
+ **Inclusion Criteria:** Includes concepts that represent a pneumococcal conjugate vaccine.
225
+
226
+ **Exclusion Criteria:** No exclusions.
227
+ """
228
+
229
+ VALUE_SET_NAME = "Pneumococcal Conjugate Vaccine"
230
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1221"
231
+ DEFINITION_VERSION = "20170504"
232
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
233
+
234
+ CVX = {
235
+ "109", # pneumococcal vaccine, unspecified formulation
236
+ "133", # pneumococcal conjugate vaccine, 13 valent
237
+ "152", # Pneumococcal Conjugate, unspecified formulation
238
+ "215", # Pneumococcal conjugate vaccine 15-valent (PCV15), polysaccharide CRM197 conjugate, adjuvant, preservative free
239
+ "216", # Pneumococcal conjugate vaccine 20-valent (PCV20), polysaccharide CRM197 conjugate, adjuvant, preservative free
240
+ }
241
+
242
+ class RotavirusVaccine3DoseSchedule(ValueSet):
243
+ """
244
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with 3-dose rotavirus vaccines.
245
+
246
+ **Data Element Scope:** This value set may use a model element related to Immunization.
247
+
248
+ **Inclusion Criteria:** Includes concepts that represent a 3-dose rotavirus vaccine.
249
+
250
+ **Exclusion Criteria:** No exclusions.
251
+ """
252
+
253
+ VALUE_SET_NAME = "Rotavirus Vaccine (3 dose schedule)"
254
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1223"
255
+ DEFINITION_VERSION = "20170504"
256
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
257
+
258
+ CVX = {
259
+ "116", # rotavirus, live, pentavalent vaccine
260
+ "122", # rotavirus vaccine, unspecified formulation
261
+ }
262
+
263
+ class VaricellaZosterVaccineVzv(ValueSet):
264
+ """
265
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with varicella zoster vaccines.
266
+
267
+ **Data Element Scope:** This value set may use a model element related to Immunization.
268
+
269
+ **Inclusion Criteria:** Includes concepts that represent a varicella zoster vaccine.
270
+
271
+ **Exclusion Criteria:** No exclusions.
272
+ """
273
+
274
+ VALUE_SET_NAME = "Varicella Zoster Vaccine (VZV)"
275
+ OID = "2.16.840.1.113883.3.464.1003.196.12.1170"
276
+ DEFINITION_VERSION = "20170504"
277
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
278
+
279
+ CVX = {
280
+ "21", # varicella virus vaccine
281
+ "94", # measles, mumps, rubella, and varicella virus vaccine
282
+ }
283
+
284
+ __exports__ = (
285
+ "ChildInfluenzaVaccine",
286
+ "DtapVaccine",
287
+ "HepatitisAVaccine",
288
+ "HepatitisBVaccine",
289
+ "HibVaccine3DoseSchedule",
290
+ "HibVaccine4DoseSchedule",
291
+ "InactivatedPolioVaccineIpv",
292
+ "InfluenzaVirusLaivVaccine",
293
+ "MeaslesMumpsAndRubellaMmrVaccine",
294
+ "PneumococcalConjugateVaccine",
295
+ "RotavirusVaccine3DoseSchedule",
296
+ "VaricellaZosterVaccineVzv",
297
+ )
@@ -0,0 +1,339 @@
1
+ from ..value_set import ValueSet
2
+
3
+
4
+ class Ethnicity(ValueSet):
5
+ """
6
+
7
+ **Clinical Focus:**
8
+
9
+ **Data Element Scope:**
10
+
11
+ **Inclusion Criteria:**
12
+
13
+ **Exclusion Criteria:**
14
+
15
+ ** Used in:** CMS131v14
16
+ """
17
+
18
+ VALUE_SET_NAME = "Ethnicity"
19
+ OID = "2.16.840.1.114222.4.11.837"
20
+ DEFINITION_VERSION = "20121025"
21
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
22
+
23
+ CDCREC = {
24
+ "2135-2", # Hispanic or Latino
25
+ "2186-5", # Not Hispanic or Latino
26
+ }
27
+
28
+
29
+ class FederalAdministrativeSex(ValueSet):
30
+ """
31
+
32
+ **Clinical Focus:** SNOMED CT representations of sex values aligned with US federal administrative requirements across all systems, including quality measure use
33
+
34
+ **Data Element Scope:** Patient characteristics
35
+
36
+ **Inclusion Criteria:** Limited set of SNOMED CT representations of sex values.
37
+
38
+ **Exclusion Criteria:**
39
+
40
+ ** Used in:** CMS131v14
41
+ """
42
+
43
+ VALUE_SET_NAME = "Federal Administrative Sex"
44
+ OID = "2.16.840.1.113762.1.4.1021.121"
45
+ DEFINITION_VERSION = "20250228"
46
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
47
+
48
+ SNOMEDCT = {
49
+ "248152002", # Female (finding)
50
+ "248153007", # Male (finding)
51
+ }
52
+
53
+
54
+ class PayerType(ValueSet):
55
+ """
56
+ **Clinical Focus:** Categories of types of health care payer entities as defined by the US Public Health Data Consortium SOP code system
57
+
58
+ **Data Element Scope:** @code in CCDA r2.1 template Planned Coverage [act: identifier urn:oid:2.16.840.1.113883.10.20.22.4.129 (open)] DYNAMIC
59
+
60
+ **Inclusion Criteria:** All codes in the code system
61
+
62
+ **Exclusion Criteria:** None
63
+
64
+ ** Used in:** CMS131v14
65
+ """
66
+
67
+ VALUE_SET_NAME = "Payer Type"
68
+ OID = "2.16.840.1.114222.4.11.3591"
69
+ DEFINITION_VERSION = "20221118"
70
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
71
+
72
+ SOP = {
73
+ "1", # MEDICARE
74
+ "2", # MEDICAID
75
+ "3", # OTHER GOVERNMENT (Federal/State/Local) (excluding Department of Corrections)
76
+ "4", # DEPARTMENTS OF CORRECTIONS
77
+ "5", # PRIVATE HEALTH INSURANCE
78
+ "6", # BLUE CROSS/BLUE SHIELD
79
+ "7", # MANAGED CARE, UNSPECIFIED (cannot distinguish public from private)
80
+ "8", # NO PAYMENT from an Organization/Agency/Program/Private Payer Listed
81
+ "9", # MISCELLANEOUS/OTHER
82
+ "11", # Medicare Managed Care (Includes Medicare Advantage Plans)
83
+ "12", # Medicare (Non-managed Care)
84
+ "13", # Medicare Hospice
85
+ "14", # Dual Eligibility Medicare/Medicaid Organization
86
+ "19", # Medicare Other
87
+ "21", # Medicaid (Managed Care)
88
+ "22", # Medicaid (Non-managed Care Plan)
89
+ "23", # Medicaid/SCHIP
90
+ "25", # Medicaid - Out of State
91
+ "26", # Medicaid - Long Term Care
92
+ "29", # Medicaid Other
93
+ "31", # Department of Defense
94
+ "32", # Department of Veterans Affairs
95
+ "33", # Indian Health Service or Tribe
96
+ "34", # HRSA Program
97
+ "35", # Black Lung
98
+ "36", # State Government
99
+ "37", # Local Government
100
+ "38", # Other Government (Federal, State, Local not specified)
101
+ "39", # Other Federal
102
+ "41", # Corrections Federal
103
+ "42", # Corrections State
104
+ "43", # Corrections Local
105
+ "44", # Corrections Unknown Level
106
+ "51", # Managed Care (Private)
107
+ "52", # Private Health Insurance - Indemnity
108
+ "53", # Managed Care (private) or private health insurance (indemnity), not otherwise specified
109
+ "54", # Organized Delivery System
110
+ "55", # Small Employer Purchasing Group
111
+ "56", # Specialized Stand-Alone Plan
112
+ "59", # Other Private Insurance
113
+ "61", # BC Managed Care
114
+ "62", # BC Insurance Indemnity
115
+ "71", # HMO (Managed Care, Unspecified)
116
+ "72", # PPO (Managed Care, Unspecified)
117
+ "73", # POS (Managed Care, Unspecified)
118
+ "79", # Other Managed Care
119
+ "81", # Self-pay (includes applicants for insurance and Medicaid applicants)
120
+ "82", # No Charge
121
+ "83", # Refusal to Pay/Bad Debt
122
+ "84", # Hill Burton Free Care
123
+ "85", # Research/Donor
124
+ "89", # No Payment, Other
125
+ "91", # Foreign National
126
+ "92", # Other (Non-government)
127
+ "93", # Disability Insurance
128
+ "94", # Long-term Care Insurance
129
+ "95", # Worker's Compensation
130
+ "96", # Auto Insurance (includes no fault)
131
+ "97", # Legal Liability / Liability Insurance
132
+ "98", # Other specified but not otherwise classifiable (includes Hospice - Unspecified plan)
133
+ "99", # No Typology Code available for payment source
134
+ "111", # Medicare HMO
135
+ "112", # Medicare PPO
136
+ "113", # Medicare POS
137
+ "119", # Medicare Managed Care Other
138
+ "121", # Medicare FFS
139
+ "122", # Medicare Drug Benefit
140
+ "123", # Medicare Medical Savings Account (MSA)
141
+ "129", # Medicare Non-managed Care Other
142
+ "141", # Dual Eligible Special Needs Plan (D-SNP)
143
+ "142", # Fully Integrated Dual Eligible Special Needs Plan (FIDE-SNP)
144
+ "191", # Medicare Pharmacy Benefit Manager
145
+ "211", # Medicaid HMO
146
+ "212", # Medicaid PPO
147
+ "213", # Medicaid PCCM (Primary Care Case Management)
148
+ "219", # Medicaid Managed Care Other
149
+ "291", # Medicaid Pharmacy Benefit Manager
150
+ "299", # Medicaid - Dental
151
+ "311", # TRICARE (CHAMPUS)
152
+ "312", # Military Treatment Facility
153
+ "313", # Dental -- Stand Alone
154
+ "321", # Veteran care - Care provided to Veterans
155
+ "322", # Non-veteran care
156
+ "331", # Indian Health Service - Regular
157
+ "332", # Indian Health Service - Contract
158
+ "333", # Indian Health Service - Managed Care
159
+ "334", # Indian Tribe - Sponsored Coverage
160
+ "341", # Title V (MCH Block Grant)
161
+ "342", # Migrant Health Program
162
+ "343", # Ryan White Act
163
+ "344", # Disaster-related (includes Covid-19)
164
+ "349", # Other (HRSA Program subcategory)
165
+ "361", # State SCHIP program (codes for individual states)
166
+ "362", # Specific state programs (list/local code)
167
+ "369", # State, not otherwise specified (other state)
168
+ "371", # Local - Managed care
169
+ "372", # FFS/Indemnity (Local Government)
170
+ "379", # Local, not otherwise specified (other local, county)
171
+ "381", # Federal, State, Local not specified - managed care
172
+ "382", # Federal, State, Local not specified - FFS
173
+ "389", # Federal, State, Local not specified - Other
174
+ "391", # Federal Employee Health Plan - use when known
175
+ "511", # Commercial Managed Care - HMO
176
+ "512", # Commercial Managed Care - PPO
177
+ "513", # Commercial Managed Care - POS
178
+ "514", # Exclusive Provider Organization
179
+ "515", # Gatekeeper PPO (GPPO)
180
+ "516", # Commercial Managed Care - Pharmacy Benefit Manager
181
+ "517", # Commercial Managed Care - Dental
182
+ "519", # Managed Care, Other (non HMO)
183
+ "521", # Commercial Indemnity
184
+ "522", # Self-insured (ERISA) Administrative Services Only (ASO) plan
185
+ "523", # Medicare supplemental policy (as second payer)
186
+ "524", # Indemnity Insurance - Dental
187
+ "529", # Private health insurance -- other commercial indemnity
188
+ "561", # Dental (specialized stand-alone plan)
189
+ "562", # Vision (specialized stand-alone plan)
190
+ "611", # BC Managed Care - HMO
191
+ "612", # BC Managed Care - PPO
192
+ "613", # BC Managed Care - POS
193
+ "614", # BC Managed Care - Dental
194
+ "619", # BC Managed Care - Other
195
+ "621", # BC Indemnity
196
+ "622", # BC Self-insured (ERISA) Administrative Services Only (ASO) plan
197
+ "623", # BC Medicare Supplemental Plan
198
+ "821", # Charity
199
+ "822", # Professional Courtesy
200
+ "823", # Research/Clinical Trial
201
+ "951", # Worker's Comp HMO
202
+ "953", # Worker's Comp Fee-for-Service
203
+ "954", # Worker's Comp Other Managed Care
204
+ "959", # Worker's Comp, Other unspecified
205
+ "1111", # Medicare Chronic Condition Special Needs Plan (C-SNP)
206
+ "1112", # Medicare Institutional Special Needs Plan (I-SNP)
207
+ "3111", # TRICARE Prime -- HMO
208
+ "3112", # TRICARE Extra -- PPO
209
+ "3113", # TRICARE Standard - Fee For Service
210
+ "3114", # TRICARE For Life -- Medicare Supplement
211
+ "3115", # TRICARE Reserve Select
212
+ "3116", # Uniformed Services Family Health Plan (USFHP) -- HMO
213
+ "3119", # Department of Defense - (other)
214
+ "3121", # Enrolled Prime -- HMO
215
+ "3122", # Non-enrolled Space Available
216
+ "3123", # TRICARE For Life (TFL)
217
+ "3211", # Direct Care - Care provided in VA facilities
218
+ "3212", # Indirect Care - Care provided outside VA facilities
219
+ "3221", # Civilian Health and Medical Program for the VA (CHAMPVA)
220
+ "3222", # Spina Bifida Health Care Program (SB)
221
+ "3223", # Children of Women Vietnam Veterans (CWVV)
222
+ "3229", # Other non-veteran care
223
+ "3711", # HMO (Local - Managed care)
224
+ "3712", # PPO (Local - Managed care)
225
+ "3713", # POS (Local - Managed care)
226
+ "3811", # Federal/State/Local not specified - HMO
227
+ "3812", # Federal/State/Local not specified - PPO
228
+ "3813", # Federal/State/Local not specified - POS
229
+ "3819", # Federal/State/Local not specified - not specified managed care
230
+ "9999", # Unavailable / No Payer Specified / Blank
231
+ "32121", # Fee Basis (VA indirect care)
232
+ "32122", # Foreign Fee/Foreign Medical Program (FMP)
233
+ "32123", # Contract Nursing Home/Community Nursing Home
234
+ "32124", # State Veterans Home
235
+ "32125", # Sharing Agreements
236
+ "32126", # Other Federal Agency
237
+ "32127", # Dental Care (VA)
238
+ "32128", # Vision Care (VA)
239
+ }
240
+
241
+
242
+ class Race(ValueSet):
243
+ """
244
+ **Clinical Focus:**
245
+
246
+ **Data Element Scope:**
247
+
248
+ **Inclusion Criteria:**
249
+
250
+ **Exclusion Criteria:**
251
+
252
+ ** Used in:** CMS131v14
253
+ """
254
+
255
+ VALUE_SET_NAME = "Race"
256
+ OID = "2.16.840.1.114222.4.11.836"
257
+ DEFINITION_VERSION = "20121025"
258
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
259
+
260
+ CDCREC = {
261
+ "10025", # American Indian or Alaska Native
262
+ "20289", # Asian
263
+ "20545", # Black or African American
264
+ "20768", # Native Hawaiian or Other Pacific Islander
265
+ "21063", # White
266
+ "21311", # Other Race
267
+ }
268
+
269
+ class MedicareAdvantagePayer(ValueSet):
270
+ """
271
+ **Clinical Focus:** The purpose of this value set is to identify concepts for Medicare Advantage payer types.
272
+
273
+ **Data Element Scope:** This value set may use a model element related to Patient Characteristic.
274
+
275
+ **Inclusion Criteria:** Includes concepts that identify a patient with Medicare Advantage as a payer source.
276
+
277
+ **Exclusion Criteria:** Excludes concepts that represent Medicare Fee-For-Service as a payer source.
278
+ """
279
+
280
+ VALUE_SET_NAME = "Medicare Advantage Payer"
281
+ OID = "2.16.840.1.113762.1.4.1104.12"
282
+ DEFINITION_VERSION = "20230214"
283
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
284
+
285
+ SOP = {
286
+ "11", # Medicare Managed Care (Includes Medicare Advantage Plans)
287
+ "111", # Medicare HMO
288
+ "1111", # Medicare Chronic Condition Special Needs Plan (C-SNP)
289
+ "1112", # Medicare Institutional Special Needs Plan (I-SNP)
290
+ "112", # Medicare PPO
291
+ "113", # Medicare POS
292
+ "119", # Medicare Managed Care Other
293
+ "123", # Medicare Medical Savings Account (MSA)
294
+ "13", # Medicare Hospice
295
+ "14", # Dual Eligibility Medicare/Medicaid Organization
296
+ "141", # Dual Eligible Special Needs Plan (D-SNP)
297
+ "142", # Fully Integrated Dual Eligible Special Needs Plan (FIDE-SNP)
298
+ "19", # Medicare Other
299
+ "191", # Medicare Pharmacy Benefit Manager
300
+ }
301
+
302
+ class MedicareFfsPayer(ValueSet):
303
+ """
304
+ **Clinical Focus:** The purpose of this value set is to identify concepts for Medicare Fee-For-Service payer types.
305
+
306
+ **Data Element Scope:** This value set may use a model element related to Patient Characteristic.
307
+
308
+ **Inclusion Criteria:** Includes concepts that identify a patient with Medicare Fee-For-Service as a payer source.
309
+
310
+ **Exclusion Criteria:** Excludes concepts that represent non-Medicare Fee-For-Service as a payer source.
311
+ """
312
+
313
+ VALUE_SET_NAME = "Medicare FFS Payer"
314
+ OID = "2.16.840.1.113762.1.4.1104.10"
315
+ DEFINITION_VERSION = "20230214"
316
+ EXPANSION_VERSION = "eCQM Update 2025-05-08"
317
+
318
+ SOP = {
319
+ "1", # MEDICARE
320
+ "12", # Medicare (Non-managed Care)
321
+ "121", # Medicare FFS
322
+ "122", # Medicare Drug Benefit
323
+ "129", # Medicare Non-managed Care Other
324
+ "13", # Medicare Hospice
325
+ "14", # Dual Eligibility Medicare/Medicaid Organization
326
+ "141", # Dual Eligible Special Needs Plan (D-SNP)
327
+ "142", # Fully Integrated Dual Eligible Special Needs Plan (FIDE-SNP)
328
+ "19", # Medicare Other
329
+ "191", # Medicare Pharmacy Benefit Manager
330
+ }
331
+
332
+ __exports__ = (
333
+ "Ethnicity",
334
+ "FederalAdministrativeSex",
335
+ "PayerType",
336
+ "Race",
337
+ "MedicareAdvantagePayer",
338
+ "MedicareFfsPayer",
339
+ )