canvas 0.38.0__py3-none-any.whl → 0.40.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.
Potentially problematic release.
This version of canvas might be problematic. Click here for more details.
- {canvas-0.38.0.dist-info → canvas-0.40.0.dist-info}/METADATA +1 -1
- {canvas-0.38.0.dist-info → canvas-0.40.0.dist-info}/RECORD +34 -32
- canvas_generated/messages/effects_pb2.py +2 -2
- canvas_generated/messages/effects_pb2.pyi +10 -0
- canvas_generated/messages/events_pb2.py +2 -2
- canvas_generated/messages/events_pb2.pyi +8 -0
- canvas_sdk/caching/__init__.py +1 -1
- canvas_sdk/effects/launch_modal.py +7 -1
- canvas_sdk/effects/note/message.py +123 -0
- canvas_sdk/effects/patient_metadata_create_form.py +70 -0
- canvas_sdk/utils/db.py +14 -0
- canvas_sdk/v1/data/__init__.py +2 -0
- canvas_sdk/v1/data/patient.py +16 -0
- canvas_sdk/value_set/custom.py +14 -2
- canvas_sdk/value_set/v2022/allergy.py +8 -3
- canvas_sdk/value_set/v2022/assessment.py +10 -3
- canvas_sdk/value_set/v2022/communication.py +5 -3
- canvas_sdk/value_set/v2022/condition.py +175 -3
- canvas_sdk/value_set/v2022/device.py +4 -3
- canvas_sdk/value_set/v2022/diagnostic_study.py +13 -3
- canvas_sdk/value_set/v2022/encounter.py +58 -3
- canvas_sdk/value_set/v2022/immunization.py +15 -3
- canvas_sdk/value_set/v2022/individual_characteristic.py +8 -3
- canvas_sdk/value_set/v2022/intervention.py +28 -3
- canvas_sdk/value_set/v2022/laboratory_test.py +27 -3
- canvas_sdk/value_set/v2022/medication.py +93 -3
- canvas_sdk/value_set/v2022/physical_exam.py +9 -3
- canvas_sdk/value_set/v2022/procedure.py +43 -3
- plugin_runner/sandbox.py +1 -0
- protobufs/canvas_generated/messages/effects.proto +6 -0
- protobufs/canvas_generated/messages/events.proto +5 -0
- settings.py +12 -0
- canvas_sdk/value_set/_utilities.py +0 -16
- {canvas-0.38.0.dist-info → canvas-0.40.0.dist-info}/WHEEL +0 -0
- {canvas-0.38.0.dist-info → canvas-0.40.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from canvas_sdk.value_set._utilities import get_overrides
|
|
2
|
-
|
|
3
1
|
from ..value_set import ValueSet
|
|
4
2
|
|
|
5
3
|
|
|
@@ -1334,4 +1332,31 @@ class ReferralsWhereWeightAssessmentMayOccur(ValueSet):
|
|
|
1334
1332
|
}
|
|
1335
1333
|
|
|
1336
1334
|
|
|
1337
|
-
__exports__ =
|
|
1335
|
+
__exports__ = (
|
|
1336
|
+
"AlcoholAndDrugDependenceTreatment",
|
|
1337
|
+
"CognitiveAssessment",
|
|
1338
|
+
"CounselingForNutrition",
|
|
1339
|
+
"CounselingForPhysicalActivity",
|
|
1340
|
+
"DialysisEducation",
|
|
1341
|
+
"DietaryRecommendations",
|
|
1342
|
+
"FollowUpForAboveNormalBmi",
|
|
1343
|
+
"FollowUpForAdolescentDepression",
|
|
1344
|
+
"FollowUpForAdultDepression",
|
|
1345
|
+
"FollowUpForBelowNormalBmi",
|
|
1346
|
+
"FollowUpWithin4Weeks",
|
|
1347
|
+
"HospiceCareAmbulatory",
|
|
1348
|
+
"LifestyleRecommendation",
|
|
1349
|
+
"OtherServicesRelatedToDialysis",
|
|
1350
|
+
"PalliativeCareIntervention",
|
|
1351
|
+
"PalliativeOrHospiceCare",
|
|
1352
|
+
"PsychVisitPsychotherapy",
|
|
1353
|
+
"RecommendationToIncreasePhysicalActivity",
|
|
1354
|
+
"Referral",
|
|
1355
|
+
"ReferralForAdolescentDepression",
|
|
1356
|
+
"ReferralForAdultDepression",
|
|
1357
|
+
"ReferralOrCounselingForAlcoholConsumption",
|
|
1358
|
+
"ReferralsWhereWeightAssessmentMayOccur",
|
|
1359
|
+
"ReferralToPrimaryCareOrAlternateProvider",
|
|
1360
|
+
"TobaccoUseCessationCounseling",
|
|
1361
|
+
"WeightReductionRecommended",
|
|
1362
|
+
)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from canvas_sdk.value_set._utilities import get_overrides
|
|
2
|
-
|
|
3
1
|
from ..value_set import ValueSet
|
|
4
2
|
|
|
5
3
|
|
|
@@ -1252,4 +1250,30 @@ class HumanImmunodeficiencyVirusHivLaboratoryTestCodesAbAndAg(ValueSet):
|
|
|
1252
1250
|
}
|
|
1253
1251
|
|
|
1254
1252
|
|
|
1255
|
-
__exports__ =
|
|
1253
|
+
__exports__ = (
|
|
1254
|
+
"AntiHepatitisAIggAntigenTest",
|
|
1255
|
+
"AntiHepatitisBVirusSurfaceAb",
|
|
1256
|
+
"ChlamydiaScreening",
|
|
1257
|
+
"FecalOccultBloodTestFobt",
|
|
1258
|
+
"FitDna",
|
|
1259
|
+
"GroupAStreptococcusTest",
|
|
1260
|
+
"Hba1CLaboratoryTest",
|
|
1261
|
+
"HpvTest",
|
|
1262
|
+
"HumanImmunodeficiencyVirusHivLaboratoryTestCodesAbAndAg",
|
|
1263
|
+
"LaboratoryTestsForHypertension",
|
|
1264
|
+
"LabTestsDuringPregnancy",
|
|
1265
|
+
"LabTestsForSexuallyTransmittedInfections",
|
|
1266
|
+
"LdlCholesterol",
|
|
1267
|
+
"MeaslesAntibodyTestIggAntibodyPresence",
|
|
1268
|
+
"MeaslesAntibodyTestIggAntibodyTiter",
|
|
1269
|
+
"MumpsAntibodyTestIggAntibodyPresence",
|
|
1270
|
+
"MumpsAntibodyTestIggAntibodyTiter",
|
|
1271
|
+
"PapTest",
|
|
1272
|
+
"PregnancyTest",
|
|
1273
|
+
"ProstateSpecificAntigenTest",
|
|
1274
|
+
"RubellaAntibodyTestIggAntibodyPresence",
|
|
1275
|
+
"RubellaAntibodyTestIggAntibodyTiter",
|
|
1276
|
+
"UrineProteinTests",
|
|
1277
|
+
"VaricellaZosterAntibodyTestIggAntibodyPresence",
|
|
1278
|
+
"VaricellaZosterAntibodyTestIggAntibodyTiter",
|
|
1279
|
+
)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from canvas_sdk.value_set._utilities import get_overrides
|
|
2
|
-
|
|
3
1
|
from ..value_set import ValueSet
|
|
4
2
|
|
|
5
3
|
|
|
@@ -5132,4 +5130,96 @@ class MedicationsForBelowNormalBmi(ValueSet):
|
|
|
5132
5130
|
}
|
|
5133
5131
|
|
|
5134
5132
|
|
|
5135
|
-
__exports__ =
|
|
5133
|
+
__exports__ = (
|
|
5134
|
+
"AceInhibitorOrArbOrArni",
|
|
5135
|
+
"AdhdMedications",
|
|
5136
|
+
"AdolescentDepressionMedications",
|
|
5137
|
+
"AdultDepressionMedications",
|
|
5138
|
+
"AmitriptylineHydrochloride",
|
|
5139
|
+
"Amoxapine",
|
|
5140
|
+
"AndrogenDeprivationTherapyForUrologyCare",
|
|
5141
|
+
"AntibioticMedicationsForPharyngitis",
|
|
5142
|
+
"AntidepressantMedication",
|
|
5143
|
+
"AntiInfectives_Other",
|
|
5144
|
+
"Antipsychotic",
|
|
5145
|
+
"AromataseInhibitors",
|
|
5146
|
+
"Atropine",
|
|
5147
|
+
"BcgBacillusCalmetteGuerinForUrologyCare",
|
|
5148
|
+
"Benzodiazepine",
|
|
5149
|
+
"Benztropine",
|
|
5150
|
+
"BetaBlockerTherapy",
|
|
5151
|
+
"BetaBlockerTherapyForLvsd",
|
|
5152
|
+
"Brompheniramine",
|
|
5153
|
+
"Butabarbital",
|
|
5154
|
+
"Butalbital",
|
|
5155
|
+
"Carbinoxamine",
|
|
5156
|
+
"Carisoprodol",
|
|
5157
|
+
"ChemotherapyForAdvancedCancer",
|
|
5158
|
+
"Chlorpheniramine",
|
|
5159
|
+
"Chlorpropamide",
|
|
5160
|
+
"Chlorzoxazone",
|
|
5161
|
+
"Clemastine",
|
|
5162
|
+
"Clomipramine",
|
|
5163
|
+
"ConjugatedEstrogens",
|
|
5164
|
+
"ContraceptiveMedications",
|
|
5165
|
+
"CyclobenzaprineHydrochloride",
|
|
5166
|
+
"Cyproheptadine",
|
|
5167
|
+
"DementiaMedications",
|
|
5168
|
+
"DesiccatedThyroid",
|
|
5169
|
+
"Desipramine",
|
|
5170
|
+
"Dexbrompheniramine",
|
|
5171
|
+
"Dexchlorpheniramine",
|
|
5172
|
+
"Dicyclomine",
|
|
5173
|
+
"Dimenhydrinate",
|
|
5174
|
+
"Diphenhydramine",
|
|
5175
|
+
"Dipyridamole",
|
|
5176
|
+
"Disopyramide",
|
|
5177
|
+
"Doxylamine",
|
|
5178
|
+
"EsterifiedEstrogens",
|
|
5179
|
+
"Estradiol",
|
|
5180
|
+
"Estropipate",
|
|
5181
|
+
"GlucocorticoidsOralOnly",
|
|
5182
|
+
"Glyburide",
|
|
5183
|
+
"Guanfacine",
|
|
5184
|
+
"HighIntensityStatinTherapy",
|
|
5185
|
+
"Hydroxyzine",
|
|
5186
|
+
"Hyoscyamine",
|
|
5187
|
+
"Imipramine",
|
|
5188
|
+
"ImmunosuppressiveDrugsForUrologyCare",
|
|
5189
|
+
"Indomethacin",
|
|
5190
|
+
"Isotretinoin",
|
|
5191
|
+
"Isoxsuprine",
|
|
5192
|
+
"KetorolacTromethamine",
|
|
5193
|
+
"ListOfSingleRxnormCodeConceptsForHighRiskDrugsForTheElderly",
|
|
5194
|
+
"LowIntensityStatinTherapy",
|
|
5195
|
+
"Meclizine",
|
|
5196
|
+
"MedicationsForAboveNormalBmi",
|
|
5197
|
+
"MedicationsForBelowNormalBmi",
|
|
5198
|
+
"Megestrol",
|
|
5199
|
+
"Meperidine",
|
|
5200
|
+
"Meprobamate",
|
|
5201
|
+
"Metaxalone",
|
|
5202
|
+
"Methocarbamol",
|
|
5203
|
+
"Methscopolamine",
|
|
5204
|
+
"Methyldopa",
|
|
5205
|
+
"ModerateIntensityStatinTherapy",
|
|
5206
|
+
"Nifedipine",
|
|
5207
|
+
"NonbenzodiazepineHypnotics",
|
|
5208
|
+
"Nortriptyline",
|
|
5209
|
+
"OpiateAntagonists",
|
|
5210
|
+
"Orphenadrine",
|
|
5211
|
+
"Paroxetine",
|
|
5212
|
+
"Pentobarbital",
|
|
5213
|
+
"PharmacologicTherapyForHypertension",
|
|
5214
|
+
"Phenobarbital",
|
|
5215
|
+
"PromethazineHydrochloride",
|
|
5216
|
+
"Propantheline",
|
|
5217
|
+
"Protriptyline",
|
|
5218
|
+
"Pyrilamine",
|
|
5219
|
+
"Scopolamine",
|
|
5220
|
+
"Secobarbital",
|
|
5221
|
+
"TobaccoUseCessationPharmacotherapy",
|
|
5222
|
+
"Trihexyphenidyl",
|
|
5223
|
+
"Trimipramine",
|
|
5224
|
+
"Triprolidine",
|
|
5225
|
+
)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from canvas_sdk.value_set._utilities import get_overrides
|
|
2
|
-
|
|
3
1
|
from ..value_set import ValueSet
|
|
4
2
|
|
|
5
3
|
|
|
@@ -203,4 +201,12 @@ class BmiRatio(ValueSet):
|
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
|
|
206
|
-
__exports__ =
|
|
204
|
+
__exports__ = (
|
|
205
|
+
"BestCorrectedVisualAcuityExamUsingSnellenChart",
|
|
206
|
+
"BmiPercentile",
|
|
207
|
+
"BmiRatio",
|
|
208
|
+
"HeartRate",
|
|
209
|
+
"Height",
|
|
210
|
+
"RetinalOrDilatedEyeExam",
|
|
211
|
+
"Weight",
|
|
212
|
+
)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from canvas_sdk.value_set._utilities import get_overrides
|
|
2
|
-
|
|
3
1
|
from ..value_set import ValueSet
|
|
4
2
|
|
|
5
3
|
|
|
@@ -4041,4 +4039,46 @@ class FluorideVarnishApplicationForChildren(ValueSet):
|
|
|
4041
4039
|
}
|
|
4042
4040
|
|
|
4043
4041
|
|
|
4044
|
-
__exports__ =
|
|
4042
|
+
__exports__ = (
|
|
4043
|
+
"BilateralMastectomy",
|
|
4044
|
+
"Cabg_PciProcedure",
|
|
4045
|
+
"CabgSurgeries",
|
|
4046
|
+
"CardiacSurgery",
|
|
4047
|
+
"CarotidIntervention",
|
|
4048
|
+
"CataractSurgery",
|
|
4049
|
+
"ChemotherapyAdministration",
|
|
4050
|
+
"Colonoscopy",
|
|
4051
|
+
"CystectomyForUrologyCare",
|
|
4052
|
+
"DialysisServices",
|
|
4053
|
+
"DtapVaccineAdministered",
|
|
4054
|
+
"FlexibleSigmoidoscopy",
|
|
4055
|
+
"FluorideVarnishApplicationForChildren",
|
|
4056
|
+
"GastricBypassSurgery",
|
|
4057
|
+
"Hemodialysis",
|
|
4058
|
+
"HepatitisAVaccineAdministered",
|
|
4059
|
+
"HepatitisBVaccineAdministered",
|
|
4060
|
+
"HibVaccine3DoseScheduleAdministered",
|
|
4061
|
+
"HibVaccine4DoseScheduleAdministered",
|
|
4062
|
+
"HysterectomyWithNoResidualCervix",
|
|
4063
|
+
"InactivatedPolioVaccineIpvAdministered",
|
|
4064
|
+
"InfluenzaVaccination",
|
|
4065
|
+
"InfluenzaVaccineAdministered",
|
|
4066
|
+
"InfluenzaVirusLaivProcedure",
|
|
4067
|
+
"KidneyTransplant",
|
|
4068
|
+
"Measles_MumpsAndRubellaMmrVaccineAdministered",
|
|
4069
|
+
"Pci",
|
|
4070
|
+
"PeritonealDialysis",
|
|
4071
|
+
"PneumococcalConjugateVaccineAdministered",
|
|
4072
|
+
"PrimaryThaProcedure",
|
|
4073
|
+
"PrimaryTkaProcedure",
|
|
4074
|
+
"ProceduresUsedToIndicateSexualActivity",
|
|
4075
|
+
"ProstateCancerTreatment",
|
|
4076
|
+
"RadiationTreatmentManagement",
|
|
4077
|
+
"RotavirusVaccine2DoseScheduleAdministered",
|
|
4078
|
+
"RotavirusVaccine3DoseScheduleAdministered",
|
|
4079
|
+
"SalvageTherapy",
|
|
4080
|
+
"TotalColectomy",
|
|
4081
|
+
"UnilateralMastectomyLeft",
|
|
4082
|
+
"UnilateralMastectomyRight",
|
|
4083
|
+
"VaricellaZosterVaccineVzvAdministered",
|
|
4084
|
+
)
|
plugin_runner/sandbox.py
CHANGED
|
@@ -274,6 +274,12 @@ enum EffectType {
|
|
|
274
274
|
|
|
275
275
|
CREATE_PATIENT = 6003;
|
|
276
276
|
|
|
277
|
+
CREATE_MESSAGE = 6004;
|
|
278
|
+
SEND_MESSAGE = 6005;
|
|
279
|
+
CREATE_AND_SEND_MESSAGE = 6006;
|
|
280
|
+
EDIT_MESSAGE = 6007;
|
|
281
|
+
|
|
282
|
+
PATIENT_METADATA__CREATE_ADDITIONAL_FIELDS = 6010;
|
|
277
283
|
}
|
|
278
284
|
|
|
279
285
|
message Effect {
|
|
@@ -1095,6 +1095,11 @@ enum EventType {
|
|
|
1095
1095
|
SIMPLE_API_REQUEST = 130001;
|
|
1096
1096
|
SIMPLE_API_WEBSOCKET_AUTHENTICATE = 130002;
|
|
1097
1097
|
|
|
1098
|
+
PATIENT_METADATA__GET_ADDITIONAL_FIELDS = 140000;
|
|
1099
|
+
|
|
1100
|
+
PATIENT_EXTERNAL_IDENTIFIER_CREATED = 140001;
|
|
1101
|
+
PATIENT_EXTERNAL_IDENTIFIER_UPDATED = 140002;
|
|
1102
|
+
PATIENT_EXTERNAL_IDENTIFIER_DELETED = 140003;
|
|
1098
1103
|
}
|
|
1099
1104
|
|
|
1100
1105
|
message Event {
|
settings.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import os
|
|
2
3
|
import sys
|
|
3
4
|
from pathlib import Path
|
|
@@ -16,9 +17,20 @@ IS_PRODUCTION = ENV == "production"
|
|
|
16
17
|
IS_PRODUCTION_CUSTOMER = env_to_bool("IS_PRODUCTION_CUSTOMER", IS_PRODUCTION)
|
|
17
18
|
IS_TESTING = env_to_bool("IS_TESTING", "pytest" in sys.argv[0] or sys.argv[0] == "-c")
|
|
18
19
|
IS_SCRIPT = env_to_bool("IS_SCRIPT", "plugin_runner.py" not in sys.argv[0])
|
|
20
|
+
PLUGIN_POOL_DEBUG = env_to_bool("PLUGIN_POOL_DEBUG")
|
|
19
21
|
CUSTOMER_IDENTIFIER = os.getenv("CUSTOMER_IDENTIFIER", "local")
|
|
20
22
|
APP_NAME = os.getenv("APP_NAME")
|
|
21
23
|
|
|
24
|
+
if PLUGIN_POOL_DEBUG:
|
|
25
|
+
handler = logging.StreamHandler()
|
|
26
|
+
handler.setLevel(logging.DEBUG)
|
|
27
|
+
formatter = logging.Formatter("[%(process)d:%(thread)d] %(name)s - %(levelname)s - %(message)s")
|
|
28
|
+
handler.setFormatter(formatter)
|
|
29
|
+
|
|
30
|
+
pool_logger = logging.getLogger("psycopg.pool")
|
|
31
|
+
pool_logger.setLevel(logging.DEBUG)
|
|
32
|
+
pool_logger.addHandler(handler)
|
|
33
|
+
|
|
22
34
|
INTEGRATION_TEST_URL = os.getenv("INTEGRATION_TEST_URL")
|
|
23
35
|
INTEGRATION_TEST_CLIENT_ID = os.getenv("INTEGRATION_TEST_CLIENT_ID")
|
|
24
36
|
INTEGRATION_TEST_CLIENT_SECRET = os.getenv("INTEGRATION_TEST_CLIENT_SECRET")
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from inspect import isclass
|
|
2
|
-
from typing import Any
|
|
3
|
-
|
|
4
|
-
from canvas_sdk.value_set.value_set import ValueSet
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def get_overrides(dictionary: dict[str, Any]) -> tuple:
|
|
8
|
-
"""
|
|
9
|
-
Return the keys that are ValueSets.
|
|
10
|
-
"""
|
|
11
|
-
return tuple(
|
|
12
|
-
key for key, value in dictionary.items() if isclass(value) and issubclass(value, ValueSet)
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
__exports__ = ()
|
|
File without changes
|
|
File without changes
|