canvas 0.62.0__py3-none-any.whl → 0.64.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.

Files changed (36) hide show
  1. {canvas-0.62.0.dist-info → canvas-0.64.0.dist-info}/METADATA +1 -1
  2. {canvas-0.62.0.dist-info → canvas-0.64.0.dist-info}/RECORD +36 -21
  3. canvas_generated/messages/effects_pb2.py +2 -2
  4. canvas_generated/messages/effects_pb2.pyi +30 -0
  5. canvas_generated/messages/events_pb2.py +2 -2
  6. canvas_generated/messages/events_pb2.pyi +28 -0
  7. canvas_sdk/effects/appointments_metadata/__init__.py +13 -0
  8. canvas_sdk/effects/appointments_metadata/appointments_metadata_create_form.py +12 -0
  9. canvas_sdk/effects/appointments_metadata/base.py +30 -0
  10. canvas_sdk/effects/calendar/__init__.py +4 -0
  11. canvas_sdk/effects/calendar/create_calendar.py +40 -0
  12. canvas_sdk/effects/calendar/create_event.py +43 -0
  13. canvas_sdk/effects/form.py +69 -0
  14. canvas_sdk/effects/generate_full_chart_pdf.py +56 -0
  15. canvas_sdk/effects/metadata.py +26 -0
  16. canvas_sdk/effects/note/base.py +24 -0
  17. canvas_sdk/effects/patient_metadata/base.py +2 -18
  18. canvas_sdk/effects/patient_metadata/patient_metadata_create_form.py +3 -61
  19. canvas_sdk/handlers/application.py +13 -1
  20. canvas_sdk/questionnaires/utils.py +1 -0
  21. canvas_sdk/test_utils/factories/__init__.py +2 -0
  22. canvas_sdk/test_utils/factories/claim_diagnosis_code.py +15 -0
  23. canvas_sdk/v1/data/__init__.py +20 -1
  24. canvas_sdk/v1/data/appointment.py +19 -0
  25. canvas_sdk/v1/data/claim_diagnosis_code.py +22 -0
  26. canvas_sdk/v1/data/encounter.py +46 -0
  27. canvas_sdk/v1/data/immunization.py +159 -0
  28. canvas_sdk/v1/data/medication_statement.py +50 -0
  29. canvas_sdk/v1/data/patient.py +6 -3
  30. canvas_sdk/v1/data/stop_medication_event.py +36 -0
  31. plugin_runner/allowed-module-imports.json +64 -0
  32. protobufs/canvas_generated/messages/effects.proto +20 -0
  33. protobufs/canvas_generated/messages/events.proto +18 -0
  34. settings.py +15 -1
  35. {canvas-0.62.0.dist-info → canvas-0.64.0.dist-info}/WHEEL +0 -0
  36. {canvas-0.62.0.dist-info → canvas-0.64.0.dist-info}/entry_points.txt +0 -0
@@ -29,6 +29,11 @@ class Appointment(IdentifiableModel):
29
29
  related_name="appointments",
30
30
  null=True,
31
31
  )
32
+
33
+ parent_appointment = models.ForeignKey(
34
+ "self", on_delete=models.CASCADE, null=True, blank=True, related_name="children"
35
+ )
36
+
32
37
  appointment_rescheduled_from = models.ForeignKey(
33
38
  "self",
34
39
  on_delete=models.DO_NOTHING,
@@ -74,8 +79,22 @@ class AppointmentExternalIdentifier(IdentifiableModel):
74
79
  )
75
80
 
76
81
 
82
+ class AppointmentMetadata(IdentifiableModel):
83
+ """A class representing Appointment Metadata."""
84
+
85
+ class Meta:
86
+ db_table = "canvas_sdk_data_api_appointmentmetadata_001"
87
+
88
+ appointment = models.ForeignKey(
89
+ "v1.Appointment", on_delete=models.CASCADE, related_name="metadata", null=True
90
+ )
91
+ key = models.CharField(max_length=32)
92
+ value = models.CharField(max_length=256)
93
+
94
+
77
95
  __exports__ = (
78
96
  "AppointmentProgressStatus",
79
97
  "Appointment",
98
+ "AppointmentMetadata",
80
99
  "AppointmentExternalIdentifier",
81
100
  )
@@ -0,0 +1,22 @@
1
+ from django.db import models
2
+
3
+ from canvas_sdk.v1.data.base import IdentifiableModel
4
+
5
+
6
+ class ClaimDiagnosisCode(IdentifiableModel):
7
+ """ClaimDiagnosisCode model for claim diagnosis codes."""
8
+
9
+ class Meta:
10
+ db_table = "canvas_sdk_data_quality_and_revenue_claimdiagnosiscode_001"
11
+ ordering = ["rank"]
12
+
13
+ claim = models.ForeignKey("v1.Claim", on_delete=models.CASCADE, related_name="diagnosis_codes")
14
+ rank = models.IntegerField()
15
+ code = models.CharField(max_length=20, blank=True)
16
+ display = models.CharField(max_length=1000, blank=True)
17
+
18
+ created = models.DateTimeField(auto_now_add=True)
19
+ modified = models.DateTimeField(auto_now=True)
20
+
21
+
22
+ __exports__ = ("ClaimDiagnosisCode",)
@@ -0,0 +1,46 @@
1
+ from django.db import models
2
+ from django.utils import timezone
3
+
4
+ from canvas_sdk.v1.data.base import IdentifiableModel
5
+
6
+
7
+ class EncounterMedium(models.TextChoices):
8
+ """Encounter medium."""
9
+
10
+ VOICE = "voice", "Telephone visit"
11
+ VIDEO = "video", "Video visit"
12
+ OFFICE = "office", "Office visit"
13
+ HOME = "home", "Home visit"
14
+ OFFSITE = "offsite", "Other offsite visit"
15
+ LAB = "lab", "Lab visit"
16
+
17
+
18
+ class EncounterState(models.TextChoices):
19
+ """Encounter state."""
20
+
21
+ STARTED = "STA", "Started"
22
+ PLANNED = "PLA", "Planned"
23
+ CONCLUDED = "CON", "Concluded"
24
+ CANCELLED = "CAN", "Cancelled"
25
+
26
+
27
+ class Encounter(IdentifiableModel):
28
+ """Encounter."""
29
+
30
+ class Meta:
31
+ db_table = "canvas_sdk_data_api_encounter_001"
32
+
33
+ note = models.OneToOneField("v1.Note", on_delete=models.CASCADE, related_name="encounter")
34
+ created = models.DateTimeField(auto_now_add=True)
35
+ modified = models.DateTimeField(auto_now=True)
36
+ medium = models.CharField(choices=EncounterMedium.choices, max_length=20)
37
+ state = models.CharField(max_length=3, choices=EncounterState.choices)
38
+ start_time = models.DateTimeField(default=timezone.now, null=True)
39
+ end_time = models.DateTimeField(default=None, null=True)
40
+
41
+
42
+ __exports__ = (
43
+ "Encounter",
44
+ "EncounterMedium",
45
+ "EncounterState",
46
+ )
@@ -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
+ )
@@ -0,0 +1,50 @@
1
+ from django.db import models
2
+
3
+ from canvas_sdk.v1.data.base import IdentifiableModel
4
+
5
+
6
+ class MedicationStatement(IdentifiableModel):
7
+ """MedicationStatement."""
8
+
9
+ class Meta:
10
+ db_table = "canvas_sdk_data_api_medicationstatement_001"
11
+
12
+ patient = models.ForeignKey(
13
+ "v1.Patient", on_delete=models.DO_NOTHING, related_name="medication_statements"
14
+ )
15
+ note = models.ForeignKey(
16
+ "v1.Note", on_delete=models.DO_NOTHING, related_name="medication_statements"
17
+ )
18
+ medication = models.ForeignKey(
19
+ "v1.Medication",
20
+ on_delete=models.DO_NOTHING,
21
+ related_name="medication_statements",
22
+ null=True,
23
+ )
24
+ indications = models.ManyToManyField(
25
+ "v1.Assessment",
26
+ related_name="treatments_stated",
27
+ db_table="canvas_sdk_data_api_medicationstatement_indications_001",
28
+ )
29
+ entered_in_error = models.ForeignKey(
30
+ "v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+", null=True
31
+ )
32
+ committer = models.ForeignKey(
33
+ "v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+", null=True
34
+ )
35
+ originator = models.ForeignKey("v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+")
36
+ created = models.DateTimeField(auto_now_add=True)
37
+ modified = models.DateTimeField(auto_now=True)
38
+ start_date_original_input = models.CharField(max_length=255, default="")
39
+ start_date = models.DateField(default=None, null=True)
40
+ end_date_original_input = models.CharField(max_length=255, default="")
41
+ end_date = models.DateField(default=None, null=True)
42
+ dose_quantity = models.FloatField(null=True)
43
+ dose_form = models.CharField(max_length=255, default="")
44
+ dose_route = models.CharField(max_length=255, default="")
45
+ dose_frequency = models.FloatField(null=True)
46
+ dose_frequency_interval = models.CharField(max_length=255, default="")
47
+ sig_original_input = models.CharField(max_length=255, default="")
48
+
49
+
50
+ __exports__ = ("MedicationStatement",)
@@ -72,6 +72,9 @@ class Patient(Model):
72
72
  biological_race_codes = ArrayField(
73
73
  models.CharField(max_length=100, default="", blank=True), default=list, blank=True
74
74
  )
75
+ cultural_ethnicity_codes = ArrayField(
76
+ models.CharField(max_length=100, default="", blank=True), default=list, blank=True
77
+ )
75
78
  last_known_timezone = models.CharField(max_length=32, null=True, blank=True)
76
79
  mrn = models.CharField(max_length=9, unique=True, default=generate_mrn)
77
80
  active = models.BooleanField(default=True)
@@ -287,10 +290,10 @@ class PatientMetadata(IdentifiableModel):
287
290
  db_table = "canvas_sdk_data_api_patientmetadata_001"
288
291
 
289
292
  patient = models.ForeignKey(
290
- "v1.Patient", on_delete=models.DO_NOTHING, related_name="metadata", null=True
293
+ "v1.Patient", on_delete=models.CASCADE, related_name="metadata", null=True
291
294
  )
292
- key = models.CharField(max_length=255)
293
- value = models.CharField(max_length=255)
295
+ key = models.CharField(max_length=32)
296
+ value = models.CharField(max_length=256)
294
297
 
295
298
 
296
299
  class PatientFacilityAddress(PatientAddress):
@@ -0,0 +1,36 @@
1
+ from django.db import models
2
+
3
+ from canvas_sdk.v1.data.base import IdentifiableModel
4
+
5
+
6
+ class StopMedicationEvent(IdentifiableModel):
7
+ """StopMedicationEvent."""
8
+
9
+ class Meta:
10
+ db_table = "canvas_sdk_data_api_stopmedicationevent_001"
11
+
12
+ patient = models.ForeignKey(
13
+ "v1.Patient", on_delete=models.DO_NOTHING, related_name="stopped_medications"
14
+ )
15
+ note = models.ForeignKey(
16
+ "v1.Note", on_delete=models.DO_NOTHING, related_name="stopped_medications"
17
+ )
18
+ medication = models.ForeignKey(
19
+ "v1.Medication",
20
+ on_delete=models.DO_NOTHING,
21
+ related_name="stopmedicationevent_set",
22
+ null=True,
23
+ )
24
+ entered_in_error = models.ForeignKey(
25
+ "v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+", null=True
26
+ )
27
+ committer = models.ForeignKey(
28
+ "v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+", null=True
29
+ )
30
+ originator = models.ForeignKey("v1.CanvasUser", on_delete=models.DO_NOTHING, related_name="+")
31
+ created = models.DateTimeField(auto_now_add=True)
32
+ modified = models.DateTimeField(auto_now=True)
33
+ rationale = models.CharField(max_length=1024, default="")
34
+
35
+
36
+ __exports__ = ("StopMedicationEvent",)
@@ -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
  ],
@@ -478,6 +509,7 @@
478
509
  "canvas_sdk.questionnaires.utils": [
479
510
  "Draft7Validator",
480
511
  "ExtendedDraft7Validator",
512
+ "QuestionnaireConfig",
481
513
  "from_yaml"
482
514
  ],
483
515
  "canvas_sdk.templates": [
@@ -512,6 +544,7 @@
512
544
  "AllergyIntoleranceCoding",
513
545
  "Appointment",
514
546
  "AppointmentExternalIdentifier",
547
+ "AppointmentMetadata",
515
548
  "Assessment",
516
549
  "BannerAlert",
517
550
  "BasePosting",
@@ -526,6 +559,7 @@
526
559
  "ChargeDescriptionMaster",
527
560
  "Claim",
528
561
  "ClaimCoverage",
562
+ "ClaimDiagnosisCode",
529
563
  "ClaimLineItem",
530
564
  "ClaimPatient",
531
565
  "ClaimQueue",
@@ -540,11 +574,16 @@
540
574
  "DetectedIssueEvidence",
541
575
  "Device",
542
576
  "Discount",
577
+ "Encounter",
543
578
  "Facility",
544
579
  "Goal",
545
580
  "ImagingOrder",
546
581
  "ImagingReport",
547
582
  "ImagingReview",
583
+ "Immunization",
584
+ "ImmunizationCoding",
585
+ "ImmunizationStatement",
586
+ "ImmunizationStatementCoding",
548
587
  "InstallmentPlan",
549
588
  "Interview",
550
589
  "InterviewQuestionResponse",
@@ -563,6 +602,7 @@
563
602
  "LineItemTransfer",
564
603
  "Medication",
565
604
  "MedicationCoding",
605
+ "MedicationStatement",
566
606
  "Message",
567
607
  "MessageAttachment",
568
608
  "MessageTransmission",
@@ -609,6 +649,7 @@
609
649
  "StaffLicense",
610
650
  "StaffPhoto",
611
651
  "StaffRole",
652
+ "StopMedicationEvent",
612
653
  "Task",
613
654
  "TaskComment",
614
655
  "TaskLabel",
@@ -626,6 +667,7 @@
626
667
  "canvas_sdk.v1.data.appointment": [
627
668
  "Appointment",
628
669
  "AppointmentExternalIdentifier",
670
+ "AppointmentMetadata",
629
671
  "AppointmentProgressStatus"
630
672
  ],
631
673
  "canvas_sdk.v1.data.assessment": [
@@ -664,6 +706,9 @@
664
706
  "InstallmentPlan",
665
707
  "InstallmentPlanStatus"
666
708
  ],
709
+ "canvas_sdk.v1.data.claim_diagnosis_code": [
710
+ "ClaimDiagnosisCode"
711
+ ],
667
712
  "canvas_sdk.v1.data.claim_line_item": [
668
713
  "ClaimLineItem",
669
714
  "ClaimLineItemStatus",
@@ -719,6 +764,11 @@
719
764
  "canvas_sdk.v1.data.discount": [
720
765
  "Discount"
721
766
  ],
767
+ "canvas_sdk.v1.data.encounter": [
768
+ "Encounter",
769
+ "EncounterMedium",
770
+ "EncounterState"
771
+ ],
722
772
  "canvas_sdk.v1.data.facility": [
723
773
  "Facility"
724
774
  ],
@@ -733,6 +783,14 @@
733
783
  "ImagingReport",
734
784
  "ImagingReview"
735
785
  ],
786
+ "canvas_sdk.v1.data.immunization": [
787
+ "Immunization",
788
+ "ImmunizationCoding",
789
+ "ImmunizationReasonsNotGiven",
790
+ "ImmunizationStatement",
791
+ "ImmunizationStatementCoding",
792
+ "ImmunizationStatus"
793
+ ],
736
794
  "canvas_sdk.v1.data.invoice": [
737
795
  "Invoice",
738
796
  "InvoiceRecipients",
@@ -764,6 +822,9 @@
764
822
  "MedicationCoding",
765
823
  "Status"
766
824
  ],
825
+ "canvas_sdk.v1.data.medication_statement": [
826
+ "MedicationStatement"
827
+ ],
767
828
  "canvas_sdk.v1.data.message": [
768
829
  "Message",
769
830
  "MessageAttachment",
@@ -869,6 +930,9 @@
869
930
  "StaffPhoto",
870
931
  "StaffRole"
871
932
  ],
933
+ "canvas_sdk.v1.data.stop_medication_event": [
934
+ "StopMedicationEvent"
935
+ ],
872
936
  "canvas_sdk.v1.data.task": [
873
937
  "EventType",
874
938
  "Task",
@@ -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;
settings.py CHANGED
@@ -77,10 +77,24 @@ else:
77
77
 
78
78
  PLUGIN_RUNNER_MAX_WORKERS = int(os.getenv("PLUGIN_RUNNER_MAX_WORKERS", 5))
79
79
 
80
+ # By default, allow a pool size that gives each worker 2 active connections
81
+ # and allow overriding via environment variable if necessary
82
+ PLUGIN_RUNNER_DATABASE_POOL_MAX = int(
83
+ os.getenv(
84
+ "PLUGIN_RUNNER_DATABASE_POOL_MAX",
85
+ PLUGIN_RUNNER_MAX_WORKERS * 2,
86
+ )
87
+ )
88
+
80
89
  if CANVAS_SDK_DB_BACKEND == "postgres":
81
90
  db_config: dict[str, Any] = {
82
91
  "ENGINE": "django.db.backends.postgresql",
83
- "OPTIONS": {"pool": {"min_size": 2, "max_size": PLUGIN_RUNNER_MAX_WORKERS}},
92
+ "OPTIONS": {
93
+ "pool": {
94
+ "min_size": 2,
95
+ "max_size": PLUGIN_RUNNER_DATABASE_POOL_MAX,
96
+ }
97
+ },
84
98
  }
85
99
 
86
100
  if CANVAS_SDK_DB_URL: