canvas 0.2.5__py3-none-any.whl → 0.2.11__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.

Potentially problematic release.


This version of canvas might be problematic. Click here for more details.

Files changed (86) hide show
  1. {canvas-0.2.5.dist-info → canvas-0.2.11.dist-info}/METADATA +4 -1
  2. canvas-0.2.11.dist-info/RECORD +144 -0
  3. canvas_cli/apps/plugin/plugin.py +51 -9
  4. canvas_cli/apps/plugin/tests.py +51 -0
  5. canvas_cli/tests.py +193 -4
  6. canvas_cli/utils/validators/manifest_schema.py +1 -0
  7. canvas_generated/messages/effects_pb2.py +2 -2
  8. canvas_generated/messages/effects_pb2.pyi +136 -0
  9. canvas_generated/messages/events_pb2.py +3 -3
  10. canvas_generated/messages/events_pb2.pyi +614 -0
  11. canvas_sdk/__init__.py +7 -0
  12. canvas_sdk/base.py +6 -2
  13. canvas_sdk/commands/__init__.py +26 -0
  14. canvas_sdk/commands/base.py +35 -32
  15. canvas_sdk/commands/commands/allergy.py +49 -0
  16. canvas_sdk/commands/commands/assess.py +1 -1
  17. canvas_sdk/commands/commands/close_goal.py +22 -0
  18. canvas_sdk/commands/commands/diagnose.py +3 -3
  19. canvas_sdk/commands/commands/family_history.py +18 -0
  20. canvas_sdk/commands/commands/goal.py +3 -3
  21. canvas_sdk/commands/commands/history_present_illness.py +1 -1
  22. canvas_sdk/commands/commands/instruct.py +17 -0
  23. canvas_sdk/commands/commands/lab_order.py +33 -0
  24. canvas_sdk/commands/commands/medical_history.py +34 -0
  25. canvas_sdk/commands/commands/medication_statement.py +1 -1
  26. canvas_sdk/commands/commands/past_surgical_history.py +28 -0
  27. canvas_sdk/commands/commands/perform.py +17 -0
  28. canvas_sdk/commands/commands/plan.py +2 -2
  29. canvas_sdk/commands/commands/prescribe.py +10 -7
  30. canvas_sdk/commands/commands/questionnaire.py +1 -1
  31. canvas_sdk/commands/commands/refill.py +16 -0
  32. canvas_sdk/commands/commands/remove_allergy.py +26 -0
  33. canvas_sdk/commands/commands/stop_medication.py +1 -1
  34. canvas_sdk/commands/commands/task.py +52 -0
  35. canvas_sdk/commands/commands/update_diagnosis.py +27 -0
  36. canvas_sdk/commands/commands/update_goal.py +1 -1
  37. canvas_sdk/commands/commands/vitals.py +78 -0
  38. canvas_sdk/commands/constants.py +7 -0
  39. canvas_sdk/commands/tests/protocol/__init__.py +0 -0
  40. canvas_sdk/commands/tests/protocol/tests.py +55 -0
  41. canvas_sdk/commands/tests/schema/__init__.py +0 -0
  42. canvas_sdk/commands/tests/schema/tests.py +104 -0
  43. canvas_sdk/commands/tests/test_utils.py +170 -6
  44. canvas_sdk/commands/tests/unit/__init__.py +0 -0
  45. canvas_sdk/commands/tests/{tests.py → unit/tests.py} +20 -194
  46. canvas_sdk/effects/banner_alert/add_banner_alert.py +8 -7
  47. canvas_sdk/effects/banner_alert/remove_banner_alert.py +3 -2
  48. canvas_sdk/effects/banner_alert/tests.py +224 -0
  49. canvas_sdk/effects/base.py +3 -5
  50. canvas_sdk/effects/patient_chart_summary_configuration.py +39 -0
  51. canvas_sdk/effects/protocol_card/__init__.py +1 -0
  52. canvas_sdk/effects/protocol_card/protocol_card.py +83 -0
  53. canvas_sdk/effects/protocol_card/tests.py +184 -0
  54. canvas_sdk/protocols/clinical_quality_measure.py +41 -0
  55. canvas_sdk/utils/db.py +17 -0
  56. canvas_sdk/v1/__init__.py +0 -0
  57. canvas_sdk/v1/data/__init__.py +3 -0
  58. canvas_sdk/v1/data/allergy_intolerance.py +63 -0
  59. canvas_sdk/v1/data/base.py +47 -0
  60. canvas_sdk/v1/data/condition.py +48 -0
  61. canvas_sdk/v1/data/lab.py +96 -0
  62. canvas_sdk/v1/data/medication.py +54 -0
  63. canvas_sdk/v1/data/patient.py +49 -0
  64. canvas_sdk/v1/data/user.py +10 -0
  65. canvas_sdk/value_set/tests/test_value_sets.py +65 -0
  66. canvas_sdk/value_set/v2022/adverse_event.py +33 -0
  67. canvas_sdk/value_set/v2022/allergy.py +232 -0
  68. canvas_sdk/value_set/v2022/assessment.py +215 -0
  69. canvas_sdk/value_set/v2022/communication.py +325 -0
  70. canvas_sdk/value_set/v2022/condition.py +40654 -0
  71. canvas_sdk/value_set/v2022/device.py +174 -0
  72. canvas_sdk/value_set/v2022/diagnostic_study.py +4967 -0
  73. canvas_sdk/value_set/v2022/encounter.py +2564 -0
  74. canvas_sdk/value_set/v2022/immunization.py +341 -0
  75. canvas_sdk/value_set/v2022/individual_characteristic.py +307 -0
  76. canvas_sdk/value_set/v2022/intervention.py +1356 -0
  77. canvas_sdk/value_set/v2022/laboratory_test.py +1250 -0
  78. canvas_sdk/value_set/v2022/medication.py +5130 -0
  79. canvas_sdk/value_set/v2022/physical_exam.py +201 -0
  80. canvas_sdk/value_set/v2022/procedure.py +4037 -0
  81. canvas_sdk/value_set/v2022/symptom.py +176 -0
  82. canvas_sdk/value_set/value_set.py +91 -0
  83. settings.py +43 -0
  84. canvas-0.2.5.dist-info/RECORD +0 -91
  85. {canvas-0.2.5.dist-info → canvas-0.2.11.dist-info}/WHEEL +0 -0
  86. {canvas-0.2.5.dist-info → canvas-0.2.11.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,49 @@
1
+ from typing import Self
2
+
3
+ from django.db import models
4
+
5
+
6
+ class Patient(models.Model):
7
+ class Meta:
8
+ managed = False
9
+ app_label = "canvas_sdk"
10
+ db_table = "canvas_sdk_data_api_patient_001"
11
+
12
+ id = models.CharField(max_length=32, db_column="key")
13
+ dbid = models.BigIntegerField(db_column="dbid", primary_key=True)
14
+ first_name = models.CharField()
15
+ last_name = models.CharField()
16
+ birth_date = models.DateField()
17
+ sex_at_birth = models.CharField()
18
+ created = models.DateTimeField()
19
+ modified = models.DateTimeField()
20
+ prefix = models.CharField()
21
+ suffix = models.CharField()
22
+ middle_name = models.CharField()
23
+ maiden_name = models.CharField()
24
+ nickname = models.CharField()
25
+ sexual_orientation_term = models.CharField()
26
+ sexual_orientation_code = models.CharField()
27
+ gender_identity_term = models.CharField()
28
+ gender_identity_code = models.CharField()
29
+ preferred_pronouns = models.CharField()
30
+ last_known_timezone = models.CharField()
31
+ mrn = models.CharField()
32
+ active = models.BooleanField()
33
+ deceased = models.BooleanField()
34
+ deceased_datetime = models.DateTimeField()
35
+ deceased_cause = models.TextField()
36
+ deceased_comment = models.TextField()
37
+ other_gender_description = models.CharField()
38
+ social_security_number = models.CharField()
39
+ administrative_note = models.TextField()
40
+ clinical_note = models.TextField()
41
+ mothers_maiden_name = models.CharField()
42
+ multiple_birth_indicator = models.BooleanField()
43
+ birth_order = models.BigIntegerField()
44
+ default_location_id = models.BigIntegerField()
45
+ default_provider_id = models.BigIntegerField()
46
+
47
+ @classmethod
48
+ def find(cls, id: str) -> Self:
49
+ return cls.objects.get(id=id)
@@ -0,0 +1,10 @@
1
+ from django.db import models
2
+
3
+
4
+ class CanvasUser(models.Model):
5
+ class Meta:
6
+ managed = False
7
+ app_label = "canvas_sdk"
8
+ db_table = "canvas_sdk_data_api_auth_user_001"
9
+
10
+ dbid = models.BigIntegerField(db_column="dbid", primary_key=True)
@@ -0,0 +1,65 @@
1
+ import pytest
2
+
3
+ from canvas_sdk.value_set.v2022.condition import (
4
+ DisordersOfTheImmuneSystem,
5
+ EncephalopathyDueToChildhoodVaccination,
6
+ Rhabdomyolysis,
7
+ StableAndUnstableAngina,
8
+ )
9
+
10
+
11
+ def test_value_set_class_values_property() -> None:
12
+ value_set = DisordersOfTheImmuneSystem
13
+ assert value_set.values["ICD10CM"] == DisordersOfTheImmuneSystem.ICD10CM
14
+ assert value_set.values["SNOMEDCT"] == DisordersOfTheImmuneSystem.SNOMEDCT
15
+
16
+
17
+ def test_value_set_class_pipe_operator_with_two_value_sets() -> None:
18
+ combined_value_set = DisordersOfTheImmuneSystem | EncephalopathyDueToChildhoodVaccination
19
+
20
+ both_classes_icd_10_codes = DisordersOfTheImmuneSystem.ICD10CM.union(
21
+ EncephalopathyDueToChildhoodVaccination.ICD10CM
22
+ )
23
+ both_classes_snomed_codes = DisordersOfTheImmuneSystem.SNOMEDCT.union(
24
+ EncephalopathyDueToChildhoodVaccination.SNOMEDCT
25
+ )
26
+
27
+ assert both_classes_icd_10_codes == combined_value_set.values["ICD10CM"]
28
+ assert both_classes_snomed_codes == combined_value_set.values["SNOMEDCT"]
29
+
30
+
31
+ def test_value_set_class_pipe_operator_with_three_value_sets() -> None:
32
+ combined_value_set = (
33
+ DisordersOfTheImmuneSystem | EncephalopathyDueToChildhoodVaccination | Rhabdomyolysis
34
+ )
35
+
36
+ all_classes_icd_10_codes = DisordersOfTheImmuneSystem.ICD10CM.union(
37
+ EncephalopathyDueToChildhoodVaccination.ICD10CM
38
+ ).union(Rhabdomyolysis.ICD10CM)
39
+ all_classes_snomed_codes = DisordersOfTheImmuneSystem.SNOMEDCT.union(
40
+ EncephalopathyDueToChildhoodVaccination.SNOMEDCT
41
+ ).union(Rhabdomyolysis.SNOMEDCT)
42
+
43
+ assert all_classes_icd_10_codes == combined_value_set.values["ICD10CM"]
44
+ assert all_classes_snomed_codes == combined_value_set.values["SNOMEDCT"]
45
+
46
+
47
+ def test_value_set_class_pipe_operator_with_two_combined_value_sets() -> None:
48
+ combined_value_set_1 = DisordersOfTheImmuneSystem | EncephalopathyDueToChildhoodVaccination
49
+ combined_value_set_2 = Rhabdomyolysis | StableAndUnstableAngina
50
+
51
+ combined_value_set = combined_value_set_1 | combined_value_set_2
52
+
53
+ all_classes_icd_10_codes = (
54
+ DisordersOfTheImmuneSystem.ICD10CM.union(EncephalopathyDueToChildhoodVaccination.ICD10CM)
55
+ .union(Rhabdomyolysis.ICD10CM)
56
+ .union(StableAndUnstableAngina.ICD10CM)
57
+ )
58
+ all_classes_snomed_codes = (
59
+ DisordersOfTheImmuneSystem.SNOMEDCT.union(EncephalopathyDueToChildhoodVaccination.SNOMEDCT)
60
+ .union(Rhabdomyolysis.SNOMEDCT)
61
+ .union(StableAndUnstableAngina.SNOMEDCT)
62
+ )
63
+
64
+ assert combined_value_set.values["ICD10CM"] == all_classes_icd_10_codes
65
+ assert combined_value_set.values["SNOMEDCT"] == all_classes_snomed_codes
@@ -0,0 +1,33 @@
1
+ from ..value_set import ValueSet
2
+
3
+
4
+ class StatinAllergen(ValueSet):
5
+ """
6
+ **Clinical Focus:** The purpose of this value set is to represent concepts of an allergy to statin medications.
7
+
8
+ **Data Element Scope:** This value set may use a model element related to Allergy/Intolerance.
9
+
10
+ **Inclusion Criteria:** Includes concepts that define an allergy to statin medications.
11
+
12
+ **Exclusion Criteria:** No exclusions.
13
+
14
+ ** Used in:** CMS347v5
15
+ """
16
+
17
+ VALUE_SET_NAME = "Statin Allergen"
18
+ OID = "2.16.840.1.113762.1.4.1110.42"
19
+ DEFINITION_VERSION = "20210220"
20
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
21
+
22
+ RXNORM = {
23
+ "6472", # lovastatin
24
+ "36567", # simvastatin
25
+ "41127", # fluvastatin
26
+ "42463", # pravastatin
27
+ "83367", # atorvastatin
28
+ "301542", # rosuvastatin
29
+ "861634", # pitavastatin
30
+ }
31
+ SNOMEDCT = {
32
+ "372912004", # Substance with 3-hydroxy-3-methylglutaryl-coenzyme A reductase inhibitor mechanism of action (substance)
33
+ }
@@ -0,0 +1,232 @@
1
+ from ..value_set import ValueSet
2
+
3
+
4
+ class AceInhibitorOrArbIngredient(ValueSet):
5
+ """
6
+ **Clinical Focus:** The purpose of this value set is to represent concepts for medications of angiotensin-converting enzyme (ACE) inhibitor and angiotensin-receptor blocker (ARB) ingredients.
7
+
8
+ **Data Element Scope:** This value set may use a model element related to Allergy/Intolerance.
9
+
10
+ **Inclusion Criteria:** Includes concepts that represent an allergy or intolerance for prescribable angiotensin-converting enzyme (ACE) inhibitor and angiotensin-receptor blocker (ARB) ingredients only.
11
+
12
+ **Exclusion Criteria:** No exclusions.
13
+
14
+ ** Used in:** CMS135v10
15
+ """
16
+
17
+ VALUE_SET_NAME = "ACE Inhibitor or ARB Ingredient"
18
+ OID = "2.16.840.1.113883.3.526.3.1489"
19
+ DEFINITION_VERSION = "20170504"
20
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
21
+
22
+ RXNORM = {
23
+ "1998", # captopril
24
+ "3827", # enalapril
25
+ "18867", # benazepril
26
+ "29046", # lisinopril
27
+ "30131", # moexipril
28
+ "35208", # quinapril
29
+ "35296", # ramipril
30
+ "38454", # trandolapril
31
+ "50166", # fosinopril
32
+ "52175", # losartan
33
+ "54552", # perindopril
34
+ "69749", # valsartan
35
+ "73494", # telmisartan
36
+ "83515", # eprosartan
37
+ "83818", # irbesartan
38
+ "214354", # candesartan
39
+ "321064", # olmesartan
40
+ }
41
+
42
+
43
+ class BetaBlockerTherapyIngredient(ValueSet):
44
+ """
45
+ **Clinical Focus:** The purpose of this value set is to represent concepts for medications containing ingredients for beta blocker therapy.
46
+
47
+ **Data Element Scope:** This value set may use a model element related to Allergy/Intolerance.
48
+
49
+ **Inclusion Criteria:** Includes concepts that represent an allergy or intolerance for prescribable beta blockers.
50
+
51
+ **Exclusion Criteria:** No exclusions.
52
+
53
+ ** Used in:** CMS144v10, CMS145v10
54
+ """
55
+
56
+ VALUE_SET_NAME = "Beta Blocker Therapy Ingredient"
57
+ OID = "2.16.840.1.113883.3.526.3.1493"
58
+ DEFINITION_VERSION = "20170504"
59
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
60
+
61
+ RXNORM = {
62
+ "149", # acebutolol
63
+ "1202", # atenolol
64
+ "1520", # betaxolol
65
+ "2116", # carteolol
66
+ "6185", # labetalol
67
+ "6918", # metoprolol
68
+ "7226", # nadolol
69
+ "8332", # pindolol
70
+ "8787", # propranolol
71
+ "10600", # timolol
72
+ "19484", # bisoprolol
73
+ "20352", # carvedilol
74
+ }
75
+
76
+
77
+ class EggSubstance(ValueSet):
78
+ """
79
+ **Clinical Focus:** The purpose of this value set is to represent concepts for an allergy or intolerance to an egg substance.
80
+
81
+ **Data Element Scope:** This value set may use a model element related to Substance.
82
+
83
+ **Inclusion Criteria:** Includes concepts that represent an allergy or intolerance to an egg substance.
84
+
85
+ **Exclusion Criteria:** No exclusions.
86
+
87
+ ** Used in:** CMS147v11
88
+ """
89
+
90
+ VALUE_SET_NAME = "Egg Substance"
91
+ OID = "2.16.840.1.113883.3.526.3.1537"
92
+ DEFINITION_VERSION = "20170504"
93
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
94
+
95
+ SNOMEDCT = {
96
+ "102263004", # Eggs (edible) (substance)
97
+ "226881001", # Dried egg (substance)
98
+ "226885005", # Raw egg (substance)
99
+ "229955000", # Dried egg white (substance)
100
+ "256442007", # Egg yolk (substance)
101
+ "256443002", # Egg white (substance)
102
+ "286550009", # Hen's egg (substance)
103
+ "303300008", # Egg protein (substance)
104
+ "414074006", # Egg product (substance)
105
+ }
106
+
107
+
108
+ class InfluenzaVaccination(ValueSet):
109
+ """
110
+ **Clinical Focus:** The purpose of this value set is to represent concepts for an influenza vaccination.
111
+
112
+ **Data Element Scope:** This value set may use a model element related to Procedure.
113
+
114
+ **Inclusion Criteria:** Includes concepts that represent an influenza vaccination.
115
+
116
+ **Exclusion Criteria:** No exclusions.
117
+
118
+ ** Used in:** CMS147v11
119
+ """
120
+
121
+ VALUE_SET_NAME = "Influenza Vaccination"
122
+ OID = "2.16.840.1.113883.3.526.3.402"
123
+ DEFINITION_VERSION = "20170908"
124
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
125
+
126
+ CPT = {
127
+ "90630", # Influenza virus vaccine, quadrivalent (IIV4), split virus, preservative free, for intradermal use
128
+ "90653", # Influenza vaccine, inactivated (IIV), subunit, adjuvanted, for intramuscular use
129
+ "90654", # Influenza virus vaccine, trivalent (IIV3), split virus, preservative-free, for intradermal use
130
+ "90655", # Influenza virus vaccine, trivalent (IIV3), split virus, preservative free, 0.25 mL dosage, for intramuscular use
131
+ "90656", # Influenza virus vaccine, trivalent (IIV3), split virus, preservative free, 0.5 mL dosage, for intramuscular use
132
+ "90657", # Influenza virus vaccine, trivalent (IIV3), split virus, 0.25 mL dosage, for intramuscular use
133
+ "90658", # Influenza virus vaccine, trivalent (IIV3), split virus, 0.5 mL dosage, for intramuscular use
134
+ "90661", # Influenza virus vaccine, trivalent (ccIIV3), derived from cell cultures, subunit, preservative and antibiotic free, 0.5 mL dosage, for intramuscular use
135
+ "90662", # Influenza virus vaccine (IIV), split virus, preservative free, enhanced immunogenicity via increased antigen content, for intramuscular use
136
+ "90666", # Influenza virus vaccine (IIV), pandemic formulation, split virus, preservative free, for intramuscular use
137
+ "90667", # Influenza virus vaccine (IIV), pandemic formulation, split virus, adjuvanted, for intramuscular use
138
+ "90668", # Influenza virus vaccine (IIV), pandemic formulation, split virus, for intramuscular use
139
+ "90673", # Influenza virus vaccine, trivalent (RIV3), derived from recombinant DNA, hemagglutinin (HA) protein only, preservative and antibiotic free, for intramuscular use
140
+ "90674", # Influenza virus vaccine, quadrivalent (ccIIV4), derived from cell cultures, subunit, preservative and antibiotic free, 0.5 mL dosage, for intramuscular use
141
+ "90682", # Influenza virus vaccine, quadrivalent (RIV4), derived from recombinant DNA, hemagglutinin (HA) protein only, preservative and antibiotic free, for intramuscular use
142
+ "90685", # Influenza virus vaccine, quadrivalent (IIV4), split virus, preservative free, 0.25 mL dosage, for intramuscular use
143
+ "90686", # Influenza virus vaccine, quadrivalent (IIV4), split virus, preservative free, 0.5 mL dosage, for intramuscular use
144
+ "90687", # Influenza virus vaccine, quadrivalent (IIV4), split virus, 0.25 mL dosage, for intramuscular use
145
+ "90688", # Influenza virus vaccine, quadrivalent (IIV4), split virus, 0.5 mL dosage, for intramuscular use
146
+ "90689", # Influenza virus vaccine, quadrivalent (IIV4), inactivated, adjuvanted, preservative free, 0.25 mL dosage, for intramuscular use
147
+ "90694", # Influenza virus vaccine, quadrivalent (aIIV4), inactivated, adjuvanted, preservative free, 0.5 mL dosage, for intramuscular use
148
+ "90756", # Influenza virus vaccine, quadrivalent (ccIIV4), derived from cell cultures, subunit, antibiotic free, 0.5 mL dosage, for intramuscular use
149
+ }
150
+ HCPCSLEVELII = {
151
+ "G0008", # Administration of influenza virus vaccine
152
+ "Q2034", # Influenza virus vaccine, split virus, for intramuscular use (agriflu)
153
+ "Q2035", # Influenza virus vaccine, split virus, when administered to individuals 3 years of age and older, for intramuscular use (afluria)
154
+ "Q2036", # Influenza virus vaccine, split virus, when administered to individuals 3 years of age and older, for intramuscular use (flulaval)
155
+ "Q2037", # Influenza virus vaccine, split virus, when administered to individuals 3 years of age and older, for intramuscular use (fluvirin)
156
+ "Q2038", # Influenza virus vaccine, split virus, when administered to individuals 3 years of age and older, for intramuscular use (fluzone)
157
+ "Q2039", # Influenza virus vaccine, not otherwise specified
158
+ }
159
+ SNOMEDCT = {
160
+ "86198006", # Administration of vaccine product containing only Influenza virus antigen (procedure)
161
+ }
162
+
163
+
164
+ class InfluenzaVaccine(ValueSet):
165
+ """
166
+ **Clinical Focus:** The purpose of this value set is to represent concepts for immunizations with influenza vaccines.
167
+
168
+ **Data Element Scope:** This value set may use a model element related to Immunization.
169
+
170
+ **Inclusion Criteria:** Includes concepts that represent an influenza vaccine.
171
+
172
+ **Exclusion Criteria:** No exclusions.
173
+
174
+ ** Used in:** CMS147v11
175
+ """
176
+
177
+ VALUE_SET_NAME = "Influenza Vaccine"
178
+ OID = "2.16.840.1.113883.3.526.3.1254"
179
+ DEFINITION_VERSION = "20170908"
180
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
181
+
182
+ CVX = {
183
+ "88", # influenza virus vaccine, unspecified formulation
184
+ "135", # influenza, high dose seasonal, preservative-free
185
+ "140", # Influenza, seasonal, injectable, preservative free
186
+ "141", # Influenza, seasonal, injectable
187
+ "144", # seasonal influenza, intradermal, preservative free
188
+ "149", # influenza, live, intranasal, quadrivalent
189
+ "150", # Influenza, injectable, quadrivalent, preservative free
190
+ "155", # Seasonal, trivalent, recombinant, injectable influenza vaccine, preservative free
191
+ "158", # influenza, injectable, quadrivalent, contains preservative
192
+ "161", # Influenza, injectable,quadrivalent, preservative free, pediatric
193
+ "166", # influenza, intradermal, quadrivalent, preservative free, injectable
194
+ "168", # Seasonal trivalent influenza vaccine, adjuvanted, preservative free
195
+ "171", # Influenza, injectable, Madin Darby Canine Kidney, preservative free, quadrivalent
196
+ "185", # Seasonal, quadrivalent, recombinant, injectable influenza vaccine, preservative free
197
+ "186", # Influenza, injectable, Madin Darby Canine Kidney, quadrivalent with preservative
198
+ "197", # influenza, high-dose seasonal, quadrivalent, .7mL dose, preservative free
199
+ "205", # influenza, seasonal vaccine, quadrivalent, adjuvanted, .5mL dose, preservative free
200
+ }
201
+
202
+
203
+ class StatinAllergen(ValueSet):
204
+ """
205
+ **Clinical Focus:** The purpose of this value set is to represent concepts of an allergy to statin medications.
206
+
207
+ **Data Element Scope:** This value set may use a model element related to Allergy/Intolerance.
208
+
209
+ **Inclusion Criteria:** Includes concepts that define an allergy to statin medications.
210
+
211
+ **Exclusion Criteria:** No exclusions.
212
+
213
+ ** Used in:** CMS347v5
214
+ """
215
+
216
+ VALUE_SET_NAME = "Statin Allergen"
217
+ OID = "2.16.840.1.113762.1.4.1110.42"
218
+ DEFINITION_VERSION = "20210220"
219
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
220
+
221
+ RXNORM = {
222
+ "6472", # lovastatin
223
+ "36567", # simvastatin
224
+ "41127", # fluvastatin
225
+ "42463", # pravastatin
226
+ "83367", # atorvastatin
227
+ "301542", # rosuvastatin
228
+ "861634", # pitavastatin
229
+ }
230
+ SNOMEDCT = {
231
+ "372912004", # Substance with 3-hydroxy-3-methylglutaryl-coenzyme A reductase inhibitor mechanism of action (substance)
232
+ }
@@ -0,0 +1,215 @@
1
+ from ..value_set import ValueSet
2
+
3
+
4
+ class TobaccoUseScreening(ValueSet):
5
+ """
6
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments to screen for tobacco use.
7
+
8
+ **Data Element Scope:** This value set may use a model element related to Assessment.
9
+
10
+ **Inclusion Criteria:** Includes concepts that represent an assessment for tobacco use, including smoking and smoke-less tobacco products.
11
+
12
+ **Exclusion Criteria:** No exclusions.
13
+
14
+ ** Used in:** CMS138v10, CMS249v4
15
+ """
16
+
17
+ VALUE_SET_NAME = "Tobacco Use Screening"
18
+ OID = "2.16.840.1.113883.3.526.3.1278"
19
+ DEFINITION_VERSION = "20170504"
20
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
21
+
22
+ LOINC = {
23
+ "39240-7", # Tobacco use status CPHS
24
+ "68535-4", # Have you used tobacco in the last 30 days [SAMHSA]
25
+ "68536-2", # Have you used smokeless tobacco product in the last 30 days [SAMHSA]
26
+ "72166-2", # Tobacco smoking status
27
+ }
28
+
29
+
30
+ class FallsScreening(ValueSet):
31
+ """
32
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments using a falls screening tool.
33
+
34
+ **Data Element Scope:** This value set may use a model element related to Assessment.
35
+
36
+ **Inclusion Criteria:** Includes concepts that represent an assessment for fall risk.
37
+
38
+ **Exclusion Criteria:** Excludes concepts that represent an assessment for falls for children.
39
+
40
+ ** Used in:** CMS139v10
41
+ """
42
+
43
+ VALUE_SET_NAME = "Falls Screening"
44
+ OID = "2.16.840.1.113883.3.464.1003.118.12.1028"
45
+ DEFINITION_VERSION = "20190315"
46
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
47
+
48
+ LOINC = {
49
+ "52552-7", # Falls in the past year [CMS Assessment]
50
+ "57254-5", # Standardized fall risk assessment was conducted [CMS Assessment]
51
+ "59454-9", # History of falling; immediate or within 3 months [Morse Fall Scale]
52
+ "73830-2", # Fall risk assessment
53
+ }
54
+
55
+
56
+ class StandardizedToolsForAssessmentOfCognition(ValueSet):
57
+ """
58
+ **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.
59
+
60
+ **Data Element Scope:** This value set may use a model element related to Assessment.
61
+
62
+ **Inclusion Criteria:** Includes concepts that describe assessments with total score results for the following standardized tools:
63
+ -Blessed Orientation-Memory-Concentration Test (BOMC)
64
+ -Montreal Cognitive Assessment (MoCA)
65
+ -St. Louis University Mental Status Examination (SLUMS)
66
+ -Mini-Mental State Examination (MMSE) [Note: The MMSE has not been well validated for non-Alzheimer's dementias]
67
+ -Short Informant Questionnaire on Cognitive Decline in the Elderly (IQCODE)
68
+ -Ascertain Dementia 8 (AD8) Questionnaire
69
+ -Minimum Data Set (MDS) Brief Interview of Mental Status (BIMS) [Note: Validated for use with nursing home patients only]
70
+ -Formal neuropsychological evaluation
71
+ -Mini-Cog.
72
+
73
+ **Exclusion Criteria:** No exclusions.
74
+
75
+ ** Used in:** CMS149v10
76
+ """
77
+
78
+ VALUE_SET_NAME = "Standardized Tools for Assessment of Cognition"
79
+ OID = "2.16.840.1.113883.3.526.3.1006"
80
+ DEFINITION_VERSION = "20170504"
81
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
82
+
83
+ LOINC = {
84
+ "58151-2", # Prior assessment Brief Interview for Mental Status (BIMS) summary score [MDSv3]
85
+ "71492-3", # Total score [SLUMS]
86
+ "71493-1", # Total score [IQCODE]
87
+ "71722-3", # Total score [AD8]
88
+ "72106-8", # Total score [MMSE]
89
+ "72172-0", # Total score [MoCA]
90
+ "72173-8", # Total score [BOMC]
91
+ "72233-0", # Total score [Mini-Cog]
92
+ }
93
+
94
+
95
+ class SexuallyActive(ValueSet):
96
+ """
97
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments to indicate vaginal intercourse.
98
+
99
+ **Data Element Scope:** This value set may use a model element related to Assessment.
100
+
101
+ **Inclusion Criteria:** Includes concepts that represent an assessment for intercourse.
102
+
103
+ **Exclusion Criteria:** No exclusions.
104
+
105
+ ** Used in:** CMS153v10
106
+ """
107
+
108
+ VALUE_SET_NAME = "Sexually Active"
109
+ OID = "2.16.840.1.113883.3.464.1003.121.12.1040"
110
+ DEFINITION_VERSION = "20170504"
111
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
112
+
113
+ LOINC = {
114
+ "64728-9", # Have you ever had vaginal intercourse [PhenX]
115
+ }
116
+
117
+
118
+ class StandardizedPainAssessmentTool(ValueSet):
119
+ """
120
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments using pain-focused tools or instruments to quantify pain intensity.
121
+
122
+ **Data Element Scope:** This value set may use a model element related to Assessment.
123
+
124
+ **Inclusion Criteria:** Includes concepts that represent an assessment of pain intensity.
125
+
126
+ **Exclusion Criteria:** No exclusions.
127
+
128
+ ** Used in:** CMS157v10
129
+ """
130
+
131
+ VALUE_SET_NAME = "Standardized Pain Assessment Tool"
132
+ OID = "2.16.840.1.113883.3.526.3.1028"
133
+ DEFINITION_VERSION = "20170504"
134
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
135
+
136
+ LOINC = {
137
+ "38208-5", # Pain severity - Reported
138
+ "38214-3", # Pain severity [Score] Visual analog score
139
+ "38221-8", # Pain severity Wong-Baker FACES pain rating scale
140
+ "72514-3", # Pain severity - 0-10 verbal numeric rating [Score] - Reported
141
+ "77565-0", # Pain interference score [BPI Short Form]
142
+ }
143
+
144
+
145
+ class Phq9AndPhq9MTools(ValueSet):
146
+ """
147
+ **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.
148
+
149
+ **Data Element Scope:** This value set may use a model element related to Assessment.
150
+
151
+ **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.
152
+
153
+ **Exclusion Criteria:** No exclusions.
154
+
155
+ ** Used in:** CMS159v10
156
+ """
157
+
158
+ VALUE_SET_NAME = "PHQ 9 and PHQ 9M Tools"
159
+ OID = "2.16.840.1.113883.3.67.1.101.1.263"
160
+ DEFINITION_VERSION = "20210219"
161
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
162
+
163
+ LOINC = {
164
+ "44261-6", # Patient Health Questionnaire 9 item (PHQ-9) total score [Reported]
165
+ "89204-2", # Patient Health Questionnaire-9: Modified for Teens total score [Reported.PHQ.Teen]
166
+ }
167
+
168
+
169
+ class AverageNumberOfDrinksPerDrinkingDay(ValueSet):
170
+ """
171
+ **Clinical Focus:** The purpose of this value set is to represent concepts for assessments measuring the number of alcoholic drinks per drinking day.
172
+
173
+ **Data Element Scope:** This value set may use a model element related to Assessment.
174
+
175
+ **Inclusion Criteria:** Includes concepts that represent an assessment of a quantitative observation of reported number of alcoholic drinks per drinking day.
176
+
177
+ **Exclusion Criteria:** No exclusions.
178
+
179
+ ** Used in:** CMS249v4
180
+ """
181
+
182
+ VALUE_SET_NAME = "Average Number of Drinks per Drinking Day"
183
+ OID = "2.16.840.1.113883.3.464.1003.106.12.1018"
184
+ DEFINITION_VERSION = "20180310"
185
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
186
+
187
+ LOINC = {
188
+ "11287-0", # Alcoholic drinks per drinking day - Reported
189
+ }
190
+
191
+
192
+ class HistoryOfHipFractureInParent(ValueSet):
193
+ """
194
+ **Clinical Focus:** The purpose of this value set is to represent concepts for H145 assessments of a family history of hip fracture in a parent.
195
+
196
+ **Data Element Scope:** This value set may use a model element related to Assessment.
197
+
198
+ **Inclusion Criteria:** Includes concepts that represent an assessment for family history of hip fracture in a parent.
199
+
200
+ **Exclusion Criteria:** No exclusions.
201
+
202
+ ** Used in:** CMS249v4
203
+ """
204
+
205
+ VALUE_SET_NAME = "History of hip fracture in parent"
206
+ OID = "2.16.840.1.113883.3.464.1003.113.12.1040"
207
+ DEFINITION_VERSION = "20180310"
208
+ EXPANSION_VERSION = "eCQM Update 2021-05-06"
209
+
210
+ SNOMEDCT = {
211
+ "391096007", # Family history: Maternal hip fracture (situation)
212
+ "416072008", # Family history: maternal hip fracture before age 75 (situation)
213
+ "445121000124105", # Family history of paternal hip fracture (situation)
214
+ "445501000124107", # Family history of hip fracture in parent (situation)
215
+ }