canvas 0.61.0__py3-none-any.whl → 0.63.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.
- {canvas-0.61.0.dist-info → canvas-0.63.0.dist-info}/METADATA +1 -1
- {canvas-0.61.0.dist-info → canvas-0.63.0.dist-info}/RECORD +29 -19
- canvas_generated/messages/effects_pb2.py +2 -2
- canvas_generated/messages/effects_pb2.pyi +30 -0
- canvas_generated/messages/events_pb2.py +2 -2
- canvas_generated/messages/events_pb2.pyi +28 -0
- canvas_sdk/effects/appointments_metadata/__init__.py +13 -0
- canvas_sdk/effects/appointments_metadata/appointments_metadata_create_form.py +12 -0
- canvas_sdk/effects/appointments_metadata/base.py +30 -0
- canvas_sdk/effects/calendar/__init__.py +4 -0
- canvas_sdk/effects/calendar/create_calendar.py +40 -0
- canvas_sdk/effects/calendar/create_event.py +43 -0
- canvas_sdk/effects/form.py +69 -0
- canvas_sdk/effects/generate_full_chart_pdf.py +56 -0
- canvas_sdk/effects/metadata.py +26 -0
- canvas_sdk/effects/note/base.py +24 -8
- canvas_sdk/effects/note/note.py +17 -7
- canvas_sdk/effects/patient_metadata/base.py +2 -18
- canvas_sdk/effects/patient_metadata/patient_metadata_create_form.py +3 -61
- canvas_sdk/handlers/application.py +13 -1
- canvas_sdk/v1/data/__init__.py +12 -1
- canvas_sdk/v1/data/appointment.py +19 -0
- canvas_sdk/v1/data/immunization.py +159 -0
- canvas_sdk/v1/data/patient.py +3 -3
- plugin_runner/allowed-module-imports.json +45 -0
- protobufs/canvas_generated/messages/effects.proto +20 -0
- protobufs/canvas_generated/messages/events.proto +18 -0
- {canvas-0.61.0.dist-info → canvas-0.63.0.dist-info}/WHEEL +0 -0
- {canvas-0.61.0.dist-info → canvas-0.63.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
from typing import Self, cast
|
|
2
|
+
|
|
3
|
+
from django.db import models
|
|
4
|
+
|
|
5
|
+
from canvas_sdk.v1.data.base import (
|
|
6
|
+
BaseModelManager,
|
|
7
|
+
CommittableQuerySetMixin,
|
|
8
|
+
ForPatientQuerySetMixin,
|
|
9
|
+
IdentifiableModel,
|
|
10
|
+
Model,
|
|
11
|
+
ValueSetLookupQuerySet,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ImmunizationStatus(models.TextChoices):
|
|
16
|
+
"""ImmunizationStatus."""
|
|
17
|
+
|
|
18
|
+
STATUS_IN_PROGRESS = "in-progress", "In Progress"
|
|
19
|
+
STATUS_ONHOLD = "on-hold"
|
|
20
|
+
STATUS_COMPLETED = "completed"
|
|
21
|
+
STATUS_STOPPED = "stopped"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ImmunizationReasonsNotGiven(models.TextChoices):
|
|
25
|
+
"""ImmunizationReasonsNotGiven."""
|
|
26
|
+
|
|
27
|
+
NA = "NA", "not applicable"
|
|
28
|
+
IMMUNE = "IMMUNE", "immunity"
|
|
29
|
+
MEDPREC = "MEDPREC", "medical precaution"
|
|
30
|
+
OSTOCK = "OSTOCK", "product out of stock"
|
|
31
|
+
PATOBJ = "PATOBJ", "patient objection"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ImmunizationQuerySet(
|
|
35
|
+
ValueSetLookupQuerySet, CommittableQuerySetMixin, ForPatientQuerySetMixin
|
|
36
|
+
):
|
|
37
|
+
"""ImmunizationQuerySet."""
|
|
38
|
+
|
|
39
|
+
def active(self) -> Self:
|
|
40
|
+
"""Filter immunizations."""
|
|
41
|
+
return self.committed()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
ImmunizationManager = BaseModelManager.from_queryset(ImmunizationQuerySet)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Immunization(IdentifiableModel):
|
|
48
|
+
"""Immunization."""
|
|
49
|
+
|
|
50
|
+
class Meta:
|
|
51
|
+
db_table = "canvas_sdk_data_api_immunization_001"
|
|
52
|
+
|
|
53
|
+
objects = cast(ImmunizationQuerySet, ImmunizationManager())
|
|
54
|
+
|
|
55
|
+
patient = models.ForeignKey(
|
|
56
|
+
"v1.Patient", on_delete=models.DO_NOTHING, related_name="immunizations", null=True
|
|
57
|
+
)
|
|
58
|
+
note = models.ForeignKey("v1.Note", on_delete=models.DO_NOTHING, related_name="immunizations")
|
|
59
|
+
status = models.CharField(
|
|
60
|
+
choices=ImmunizationStatus.choices,
|
|
61
|
+
max_length=20,
|
|
62
|
+
default=ImmunizationStatus.STATUS_IN_PROGRESS,
|
|
63
|
+
)
|
|
64
|
+
lot_number = models.CharField(max_length=20, blank=True, default="")
|
|
65
|
+
manufacturer = models.CharField(max_length=100, blank=True, default="")
|
|
66
|
+
exp_date_original = models.CharField(max_length=50, blank=True, default="")
|
|
67
|
+
exp_date = models.DateField(null=True)
|
|
68
|
+
sig_original = models.CharField(max_length=75, blank=True, default="")
|
|
69
|
+
date_ordered = models.DateField(null=True)
|
|
70
|
+
given_by = models.ForeignKey(
|
|
71
|
+
"v1.Staff", on_delete=models.DO_NOTHING, related_name="immunizations_given", null=True
|
|
72
|
+
)
|
|
73
|
+
consent_given = models.BooleanField(default=False)
|
|
74
|
+
take_quantity = models.FloatField(null=True)
|
|
75
|
+
dose_form = models.CharField(max_length=255, blank=True, default="")
|
|
76
|
+
route = models.CharField(max_length=255, blank=True, default="")
|
|
77
|
+
frequency_normalized_per_day = models.FloatField(null=True)
|
|
78
|
+
deleted = models.BooleanField()
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class ImmunizationCoding(Model):
|
|
82
|
+
"""ImmunizationCoding."""
|
|
83
|
+
|
|
84
|
+
class Meta:
|
|
85
|
+
db_table = "canvas_sdk_data_api_immunizationcoding_001"
|
|
86
|
+
|
|
87
|
+
system = models.CharField(max_length=255)
|
|
88
|
+
version = models.CharField(max_length=255)
|
|
89
|
+
code = models.CharField(max_length=255)
|
|
90
|
+
display = models.CharField(max_length=1000)
|
|
91
|
+
user_selected = models.BooleanField()
|
|
92
|
+
immunization = models.ForeignKey(
|
|
93
|
+
Immunization, on_delete=models.DO_NOTHING, related_name="codings", null=True
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class ImmunizationStatementQuerySet(
|
|
98
|
+
ValueSetLookupQuerySet, CommittableQuerySetMixin, ForPatientQuerySetMixin
|
|
99
|
+
):
|
|
100
|
+
"""ImmunizationStatementQuerySet."""
|
|
101
|
+
|
|
102
|
+
def active(self) -> Self:
|
|
103
|
+
"""Filter immunizations statements."""
|
|
104
|
+
return self.committed()
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
ImmunizationStatementManager = BaseModelManager.from_queryset(ImmunizationStatementQuerySet)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class ImmunizationStatement(IdentifiableModel):
|
|
111
|
+
"""ImmunizationStatement."""
|
|
112
|
+
|
|
113
|
+
class Meta:
|
|
114
|
+
db_table = "canvas_sdk_data_api_immunizationstatement_001"
|
|
115
|
+
|
|
116
|
+
objects = cast(ImmunizationStatementQuerySet, ImmunizationStatementManager())
|
|
117
|
+
|
|
118
|
+
patient = models.ForeignKey(
|
|
119
|
+
"v1.Patient", on_delete=models.DO_NOTHING, related_name="immunization_statements", null=True
|
|
120
|
+
)
|
|
121
|
+
note = models.ForeignKey(
|
|
122
|
+
"v1.Note", on_delete=models.DO_NOTHING, related_name="immunization_statements"
|
|
123
|
+
)
|
|
124
|
+
date_original = models.CharField(max_length=50, blank=True, default="")
|
|
125
|
+
date = models.DateField(null=True)
|
|
126
|
+
evidence = models.CharField(max_length=255, blank=True, default="")
|
|
127
|
+
comment = models.CharField(max_length=255, blank=True, default="")
|
|
128
|
+
reason_not_given = models.CharField(
|
|
129
|
+
max_length=20,
|
|
130
|
+
choices=ImmunizationReasonsNotGiven.choices,
|
|
131
|
+
default=ImmunizationReasonsNotGiven.NA,
|
|
132
|
+
)
|
|
133
|
+
deleted = models.BooleanField()
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class ImmunizationStatementCoding(Model):
|
|
137
|
+
"""ImmunizationStatementCoding."""
|
|
138
|
+
|
|
139
|
+
class Meta:
|
|
140
|
+
db_table = "canvas_sdk_data_api_immunizationstatementcoding_001"
|
|
141
|
+
|
|
142
|
+
system = models.CharField(max_length=255)
|
|
143
|
+
version = models.CharField(max_length=255)
|
|
144
|
+
code = models.CharField(max_length=255)
|
|
145
|
+
display = models.CharField(max_length=1000)
|
|
146
|
+
user_selected = models.BooleanField()
|
|
147
|
+
immunization_statement = models.ForeignKey(
|
|
148
|
+
ImmunizationStatement, on_delete=models.CASCADE, related_name="coding"
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
__exports__ = (
|
|
153
|
+
"ImmunizationStatus",
|
|
154
|
+
"ImmunizationReasonsNotGiven",
|
|
155
|
+
"Immunization",
|
|
156
|
+
"ImmunizationCoding",
|
|
157
|
+
"ImmunizationStatement",
|
|
158
|
+
"ImmunizationStatementCoding",
|
|
159
|
+
)
|
canvas_sdk/v1/data/patient.py
CHANGED
|
@@ -287,10 +287,10 @@ class PatientMetadata(IdentifiableModel):
|
|
|
287
287
|
db_table = "canvas_sdk_data_api_patientmetadata_001"
|
|
288
288
|
|
|
289
289
|
patient = models.ForeignKey(
|
|
290
|
-
"v1.Patient", on_delete=models.
|
|
290
|
+
"v1.Patient", on_delete=models.CASCADE, related_name="metadata", null=True
|
|
291
291
|
)
|
|
292
|
-
key = models.CharField(max_length=
|
|
293
|
-
value = models.CharField(max_length=
|
|
292
|
+
key = models.CharField(max_length=32)
|
|
293
|
+
value = models.CharField(max_length=256)
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
class PatientFacilityAddress(PatientAddress):
|
|
@@ -178,6 +178,20 @@
|
|
|
178
178
|
"EffectType",
|
|
179
179
|
"_BaseEffect"
|
|
180
180
|
],
|
|
181
|
+
"canvas_sdk.effects.appointments_metadata": [
|
|
182
|
+
"AppointmentsMetadata",
|
|
183
|
+
"AppointmentsMetadataCreateFormEffect",
|
|
184
|
+
"FormField",
|
|
185
|
+
"InputType"
|
|
186
|
+
],
|
|
187
|
+
"canvas_sdk.effects.appointments_metadata.appointments_metadata_create_form": [
|
|
188
|
+
"AppointmentsMetadataCreateFormEffect",
|
|
189
|
+
"FormField",
|
|
190
|
+
"InputType"
|
|
191
|
+
],
|
|
192
|
+
"canvas_sdk.effects.appointments_metadata.base": [
|
|
193
|
+
"AppointmentsMetadata"
|
|
194
|
+
],
|
|
181
195
|
"canvas_sdk.effects.banner_alert": [
|
|
182
196
|
"AddBannerAlert",
|
|
183
197
|
"RemoveBannerAlert"
|
|
@@ -206,12 +220,29 @@
|
|
|
206
220
|
"canvas_sdk.effects.billing_line_item.update_billing_line_item": [
|
|
207
221
|
"UpdateBillingLineItem"
|
|
208
222
|
],
|
|
223
|
+
"canvas_sdk.effects.calendar": [
|
|
224
|
+
"CalendarType",
|
|
225
|
+
"CreateCalendar",
|
|
226
|
+
"CreateEvent",
|
|
227
|
+
"EventRecurrence"
|
|
228
|
+
],
|
|
229
|
+
"canvas_sdk.effects.calendar.create_calendar": [
|
|
230
|
+
"CalendarType",
|
|
231
|
+
"CreateCalendar"
|
|
232
|
+
],
|
|
233
|
+
"canvas_sdk.effects.calendar.create_event": [
|
|
234
|
+
"CreateEvent",
|
|
235
|
+
"EventRecurrence"
|
|
236
|
+
],
|
|
209
237
|
"canvas_sdk.effects.compound_medications": [
|
|
210
238
|
"CompoundMedication"
|
|
211
239
|
],
|
|
212
240
|
"canvas_sdk.effects.compound_medications.compound_medication": [
|
|
213
241
|
"CompoundMedication"
|
|
214
242
|
],
|
|
243
|
+
"canvas_sdk.effects.generate_full_chart_pdf": [
|
|
244
|
+
"GenerateFullChartPDFEffect"
|
|
245
|
+
],
|
|
215
246
|
"canvas_sdk.effects.group": [
|
|
216
247
|
"Group"
|
|
217
248
|
],
|
|
@@ -512,6 +543,7 @@
|
|
|
512
543
|
"AllergyIntoleranceCoding",
|
|
513
544
|
"Appointment",
|
|
514
545
|
"AppointmentExternalIdentifier",
|
|
546
|
+
"AppointmentMetadata",
|
|
515
547
|
"Assessment",
|
|
516
548
|
"BannerAlert",
|
|
517
549
|
"BasePosting",
|
|
@@ -545,6 +577,10 @@
|
|
|
545
577
|
"ImagingOrder",
|
|
546
578
|
"ImagingReport",
|
|
547
579
|
"ImagingReview",
|
|
580
|
+
"Immunization",
|
|
581
|
+
"ImmunizationCoding",
|
|
582
|
+
"ImmunizationStatement",
|
|
583
|
+
"ImmunizationStatementCoding",
|
|
548
584
|
"InstallmentPlan",
|
|
549
585
|
"Interview",
|
|
550
586
|
"InterviewQuestionResponse",
|
|
@@ -626,6 +662,7 @@
|
|
|
626
662
|
"canvas_sdk.v1.data.appointment": [
|
|
627
663
|
"Appointment",
|
|
628
664
|
"AppointmentExternalIdentifier",
|
|
665
|
+
"AppointmentMetadata",
|
|
629
666
|
"AppointmentProgressStatus"
|
|
630
667
|
],
|
|
631
668
|
"canvas_sdk.v1.data.assessment": [
|
|
@@ -733,6 +770,14 @@
|
|
|
733
770
|
"ImagingReport",
|
|
734
771
|
"ImagingReview"
|
|
735
772
|
],
|
|
773
|
+
"canvas_sdk.v1.data.immunization": [
|
|
774
|
+
"Immunization",
|
|
775
|
+
"ImmunizationCoding",
|
|
776
|
+
"ImmunizationReasonsNotGiven",
|
|
777
|
+
"ImmunizationStatement",
|
|
778
|
+
"ImmunizationStatementCoding",
|
|
779
|
+
"ImmunizationStatus"
|
|
780
|
+
],
|
|
736
781
|
"canvas_sdk.v1.data.invoice": [
|
|
737
782
|
"Invoice",
|
|
738
783
|
"InvoiceRecipients",
|
|
@@ -307,6 +307,22 @@ enum EffectType {
|
|
|
307
307
|
|
|
308
308
|
PATIENT_CHART__GROUP_ITEMS = 6030;
|
|
309
309
|
|
|
310
|
+
APPOINTMENT__FORM__PROVIDERS__PRE_SEARCH_RESULTS = 6040;
|
|
311
|
+
APPOINTMENT__FORM__LOCATIONS__PRE_SEARCH_RESULTS = 6041;
|
|
312
|
+
APPOINTMENT__FORM__VISIT_TYPES__PRE_SEARCH_RESULTS = 6042;
|
|
313
|
+
APPOINTMENT__FORM__DURATIONS__PRE_SEARCH_RESULTS = 6043;
|
|
314
|
+
APPOINTMENT__FORM__REASON_FOR_VISIT__PRE_SEARCH_RESULTS = 6044;
|
|
315
|
+
|
|
316
|
+
APPOINTMENT__FORM__PROVIDERS__POST_SEARCH_RESULTS = 6046;
|
|
317
|
+
APPOINTMENT__FORM__LOCATIONS__POST_SEARCH_RESULTS = 6047;
|
|
318
|
+
APPOINTMENT__FORM__VISIT_TYPES__POST_SEARCH_RESULTS = 6048;
|
|
319
|
+
APPOINTMENT__FORM__DURATIONS__POST_SEARCH_RESULTS = 6049;
|
|
320
|
+
APPOINTMENT__FORM__REASON_FOR_VISIT__POST_SEARCH_RESULTS = 6050;
|
|
321
|
+
|
|
322
|
+
APPOINTMENT__FORM__CREATE_ADDITIONAL_FIELDS = 6051;
|
|
323
|
+
|
|
324
|
+
UPSERT_APPOINTMENT_METADATA = 6052;
|
|
325
|
+
|
|
310
326
|
SHOW_PANEL_SECTIONS = 6100;
|
|
311
327
|
|
|
312
328
|
REDIRECT_CONTEXT = 6200;
|
|
@@ -318,6 +334,10 @@ enum EffectType {
|
|
|
318
334
|
REVENUE__PAYMENT_PROCESSOR__PAYMENT_METHOD__ADD_RESPONSE = 7005;
|
|
319
335
|
REVENUE__PAYMENT_PROCESSOR__PAYMENT_METHOD__REMOVE_RESPONSE = 7006;
|
|
320
336
|
|
|
337
|
+
GENERATE_FULL_CHART_PDF = 6101;
|
|
338
|
+
|
|
339
|
+
CALENDAR__CREATE = 8001;
|
|
340
|
+
CALENDAR__EVENT__CREATE = 8002;
|
|
321
341
|
}
|
|
322
342
|
|
|
323
343
|
message Effect {
|
|
@@ -1122,6 +1122,7 @@ enum EventType {
|
|
|
1122
1122
|
PLUGIN_UPDATED = 102001;
|
|
1123
1123
|
|
|
1124
1124
|
APPLICATION__ON_OPEN = 103000;
|
|
1125
|
+
APPLICATION__ON_CONTEXT_CHANGE = 103001;
|
|
1125
1126
|
|
|
1126
1127
|
PATIENT_PORTAL__GET_FORMS = 110000;
|
|
1127
1128
|
PATIENT_PORTAL__APPOINTMENT_CANCELED = 110001;
|
|
@@ -1165,6 +1166,23 @@ enum EventType {
|
|
|
1165
1166
|
PATIENT_METADATA_CREATED = 140004;
|
|
1166
1167
|
PATIENT_METADATA_UPDATED = 140005;
|
|
1167
1168
|
|
|
1169
|
+
APPOINTMENT__FORM__PROVIDERS__PRE_SEARCH = 141000;
|
|
1170
|
+
APPOINTMENT__FORM__LOCATIONS__PRE_SEARCH = 141001;
|
|
1171
|
+
APPOINTMENT__FORM__VISIT_TYPES__PRE_SEARCH = 141002;
|
|
1172
|
+
APPOINTMENT__FORM__DURATIONS__PRE_SEARCH = 141003;
|
|
1173
|
+
APPOINTMENT__FORM__REASON_FOR_VISIT__PRE_SEARCH = 141004;
|
|
1174
|
+
|
|
1175
|
+
APPOINTMENT__FORM__PROVIDERS__POST_SEARCH = 141006;
|
|
1176
|
+
APPOINTMENT__FORM__LOCATIONS__POST_SEARCH = 141007;
|
|
1177
|
+
APPOINTMENT__FORM__VISIT_TYPES__POST_SEARCH = 141008;
|
|
1178
|
+
APPOINTMENT__FORM__DURATIONS__POST_SEARCH = 141009;
|
|
1179
|
+
APPOINTMENT__FORM__REASON_FOR_VISIT__POST_SEARCH = 141010;
|
|
1180
|
+
|
|
1181
|
+
APPOINTMENT__FORM__GET_ADDITIONAL_FIELDS = 141011;
|
|
1182
|
+
|
|
1183
|
+
APPOINTMENT_METADATA_CREATED = 141100;
|
|
1184
|
+
APPOINTMENT_METADATA_UPDATED = 141111;
|
|
1185
|
+
|
|
1168
1186
|
DOCUMENT_REFERENCE_CREATED = 150000;
|
|
1169
1187
|
DOCUMENT_REFERENCE_UPDATED = 150001;
|
|
1170
1188
|
DOCUMENT_REFERENCE_DELETED = 150002;
|
|
File without changes
|
|
File without changes
|