canvas 0.13.1__py3-none-any.whl → 0.13.3__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.13.1.dist-info → canvas-0.13.3.dist-info}/METADATA +1 -1
- {canvas-0.13.1.dist-info → canvas-0.13.3.dist-info}/RECORD +24 -24
- canvas_sdk/v1/data/allergy_intolerance.py +4 -2
- canvas_sdk/v1/data/billing.py +4 -2
- canvas_sdk/v1/data/command.py +4 -4
- canvas_sdk/v1/data/condition.py +8 -4
- canvas_sdk/v1/data/detected_issue.py +8 -5
- canvas_sdk/v1/data/device.py +6 -4
- canvas_sdk/v1/data/imaging.py +15 -13
- canvas_sdk/v1/data/lab.py +19 -13
- canvas_sdk/v1/data/medication.py +8 -4
- canvas_sdk/v1/data/note.py +8 -6
- canvas_sdk/v1/data/observation.py +11 -9
- canvas_sdk/v1/data/practicelocation.py +2 -2
- canvas_sdk/v1/data/protocol_override.py +3 -5
- canvas_sdk/v1/data/questionnaire.py +15 -13
- canvas_sdk/v1/data/staff.py +4 -4
- canvas_sdk/v1/data/task.py +12 -8
- plugin_runner/plugin_runner.py +0 -1
- plugin_runner/plugin_synchronizer.py +3 -1
- plugin_runner/tests/test_plugin_runner.py +0 -14
- settings.py +2 -5
- {canvas-0.13.1.dist-info → canvas-0.13.3.dist-info}/WHEEL +0 -0
- {canvas-0.13.1.dist-info → canvas-0.13.3.dist-info}/entry_points.txt +0 -0
|
@@ -185,26 +185,26 @@ canvas_sdk/utils/stats.py,sha256=sJhIW_IssUVefQN6rrUAt1P0KvVIUIYcnpZlMHLibNA,732
|
|
|
185
185
|
canvas_sdk/utils/tests.py,sha256=0Buh_7PvDU1D081_rSJoYSJwIHMOBbL0gtGS3bSKe7s,2285
|
|
186
186
|
canvas_sdk/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
187
187
|
canvas_sdk/v1/data/__init__.py,sha256=Ea0apSYEz2UEhlZT9bmLH0rqmh75-2C0AsxbqDIfYnU,567
|
|
188
|
-
canvas_sdk/v1/data/allergy_intolerance.py,sha256=
|
|
188
|
+
canvas_sdk/v1/data/allergy_intolerance.py,sha256=BJD8eDVpdwxPTM2ebdZeCLG8-lafS_kxFHhPJsnZY7g,2099
|
|
189
189
|
canvas_sdk/v1/data/base.py,sha256=ZMZEpwkeg3ewl3QsbPAF7-z1MqqWu5hCR-IibWQCiHI,6189
|
|
190
|
-
canvas_sdk/v1/data/billing.py,sha256=
|
|
191
|
-
canvas_sdk/v1/data/command.py,sha256=
|
|
190
|
+
canvas_sdk/v1/data/billing.py,sha256=sAC5IMV526pdEZ9FwEmN7dz30F0kOHqH7Rh_JBwReuQ,2076
|
|
191
|
+
canvas_sdk/v1/data/command.py,sha256=PGKmFXjTbTQW7WeJbrv4vLbZh7g7UDWfoqnjANg5sVk,989
|
|
192
192
|
canvas_sdk/v1/data/common.py,sha256=OvF4Oxo3BqE1Cv2lfyA1MXp_q_VHwoihyiJ0ETfa5lY,3459
|
|
193
|
-
canvas_sdk/v1/data/condition.py,sha256=
|
|
194
|
-
canvas_sdk/v1/data/detected_issue.py,sha256=
|
|
195
|
-
canvas_sdk/v1/data/device.py,sha256=
|
|
196
|
-
canvas_sdk/v1/data/imaging.py,sha256=
|
|
197
|
-
canvas_sdk/v1/data/lab.py,sha256=
|
|
198
|
-
canvas_sdk/v1/data/medication.py,sha256=
|
|
199
|
-
canvas_sdk/v1/data/note.py,sha256=
|
|
200
|
-
canvas_sdk/v1/data/observation.py,sha256=
|
|
193
|
+
canvas_sdk/v1/data/condition.py,sha256=g_kBv5zV3ynUg8fZbBqIrVTUBbl70r7pED-YxmnZ540,1930
|
|
194
|
+
canvas_sdk/v1/data/detected_issue.py,sha256=IvxHrBa2YK_ylHNi2HGSK0ji2yk92C_6EDDnsMh6CnY,1790
|
|
195
|
+
canvas_sdk/v1/data/device.py,sha256=PkRPKhMOA848O2gzgb1_LL0-YxUp-hPMQ_B0JKAQIvw,1713
|
|
196
|
+
canvas_sdk/v1/data/imaging.py,sha256=IOavBqdKDQAa6Tzcbl9GUVrkMOCMoCqIt5Tr9AV-qLc,4430
|
|
197
|
+
canvas_sdk/v1/data/lab.py,sha256=yYSCgqrMuAD-ebG-1oAiFaImyPnn3RE0ynqXJbrjTy8,11061
|
|
198
|
+
canvas_sdk/v1/data/medication.py,sha256=c33tsmUnVsehmdIDr1VNP_2Q56UNZoaoja3oV35Y898,2070
|
|
199
|
+
canvas_sdk/v1/data/note.py,sha256=tT0tHC2KtDP6QHFKtfJLYF45zb0P1GJAk90OAPPuoWE,6642
|
|
200
|
+
canvas_sdk/v1/data/observation.py,sha256=iY6FaQahN1sa0yIRGqLHJGDKhtJu_rLiv0C8yJr4-Ak,3812
|
|
201
201
|
canvas_sdk/v1/data/organization.py,sha256=SsRcBZfExmr87Wq2aU54AoTZzXJjfvHoV4XVF7oqvRA,995
|
|
202
202
|
canvas_sdk/v1/data/patient.py,sha256=iUSTAsEB_cVEUP12mkvJ7J5DkYhUZWmHTDw4JPdB6pc,3090
|
|
203
|
-
canvas_sdk/v1/data/practicelocation.py,sha256=
|
|
204
|
-
canvas_sdk/v1/data/protocol_override.py,sha256=
|
|
205
|
-
canvas_sdk/v1/data/questionnaire.py,sha256=
|
|
206
|
-
canvas_sdk/v1/data/staff.py,sha256=
|
|
207
|
-
canvas_sdk/v1/data/task.py,sha256=
|
|
203
|
+
canvas_sdk/v1/data/practicelocation.py,sha256=nM2T4rzkutIZWQCTULvMNGpvTuWOvOrvISNWjOPe2Io,4264
|
|
204
|
+
canvas_sdk/v1/data/protocol_override.py,sha256=FQBMaKTKCCnr4ZYgsorAYKSWh_YVuFAW_UqHmHifUTY,1851
|
|
205
|
+
canvas_sdk/v1/data/questionnaire.py,sha256=xTqZUfTjz5eyRdP2xh_bJ8YPc5pWxevsto_U0uf1v0I,7068
|
|
206
|
+
canvas_sdk/v1/data/staff.py,sha256=GFTdRB_FlpssB44kPDNJ8-S-cK14mm9banDZcv-wyuk,2819
|
|
207
|
+
canvas_sdk/v1/data/task.py,sha256=hQHJstXntQjCK3Fgg0C7ktqvaqmTmvUCy2PeyfkStGU,3668
|
|
208
208
|
canvas_sdk/v1/data/user.py,sha256=DmA8fNNGwiNOmuR-RYxQw1NpxN5yYhgwtRtRBRJ_22g,309
|
|
209
209
|
canvas_sdk/value_set/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
210
210
|
canvas_sdk/value_set/custom.py,sha256=0xzGP86ioCGcsx8wwf46SXfe9IefLSGVq7Z4yrHbEUU,19709
|
|
@@ -234,8 +234,8 @@ plugin_runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
234
234
|
plugin_runner/authentication.py,sha256=SDPso2AogtLAV_H0LuMDp99IMZuF3oTq-Q_AXAvJ8uc,1116
|
|
235
235
|
plugin_runner/exceptions.py,sha256=YnRZiQVzbU3HrVlmEXLje_np99009YnhTRVHHyBCtqc,433
|
|
236
236
|
plugin_runner/plugin_installer.py,sha256=Ah3A1j6vO8wi4HPRYVlxF1w-GqbuTvLmDCQvLQK3Oy8,7020
|
|
237
|
-
plugin_runner/plugin_runner.py,sha256=
|
|
238
|
-
plugin_runner/plugin_synchronizer.py,sha256=
|
|
237
|
+
plugin_runner/plugin_runner.py,sha256=EZ3snfYZ5kirlELY0LH6stcz6NuaJQ_WJE8aKi59EVU,15269
|
|
238
|
+
plugin_runner/plugin_synchronizer.py,sha256=GcY2oKwJc8beDoAJwo-0MkY4rxNzoF-Bk1bF9MOtO6U,2851
|
|
239
239
|
plugin_runner/sandbox.py,sha256=JUbphdu1iY0rPU6DdMEjFA32BBsZXHUz1KguCYpmrug,9384
|
|
240
240
|
plugin_runner/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
241
241
|
plugin_runner/tests/data/plugins/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -270,12 +270,12 @@ plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/protocols/__init
|
|
|
270
270
|
plugin_runner/tests/fixtures/plugins/test_module_imports_plugin/protocols/my_protocol.py,sha256=V_6DPXsJaD12zGyKqGjYY2JFtKEk4E0eIAgBWax_MGc,629
|
|
271
271
|
plugin_runner/tests/test_application.py,sha256=ZirW14UGorfkQ_VSbnoKtmTvx6lHFS2EqndYNczIQfo,2391
|
|
272
272
|
plugin_runner/tests/test_plugin_installer.py,sha256=BETY7stpf_DZdSBLSSBc_NeAWcLU0m_cptG8C8_rk1Q,3937
|
|
273
|
-
plugin_runner/tests/test_plugin_runner.py,sha256=
|
|
273
|
+
plugin_runner/tests/test_plugin_runner.py,sha256=htO1Pu-73AusrBP1EPeaeVPXcDYyHSEb-aHpSZFTz04,7029
|
|
274
274
|
plugin_runner/tests/test_sandbox.py,sha256=6Jw2Akcl1KQpXb01FxDvI_ZToJzOcpABwFkXK3fl8BU,3434
|
|
275
275
|
pubsub/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
276
276
|
pubsub/pubsub.py,sha256=pyTW0JU8mtaqiAV6g6xjZwel1CVy2EonPMU-_vkmhUM,1044
|
|
277
|
-
settings.py,sha256=
|
|
278
|
-
canvas-0.13.
|
|
279
|
-
canvas-0.13.
|
|
280
|
-
canvas-0.13.
|
|
281
|
-
canvas-0.13.
|
|
277
|
+
settings.py,sha256=UG0jV2Sht7ftEJjqEyLKn9fld0jAtblqO7oJdfjNYvA,2144
|
|
278
|
+
canvas-0.13.3.dist-info/METADATA,sha256=vh349TC_eBl1Bi0NgHhlypsxT1gkx2598CJtbrBBtS4,4793
|
|
279
|
+
canvas-0.13.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
280
|
+
canvas-0.13.3.dist-info/entry_points.txt,sha256=VSmSo1IZ3aEfL7enmLmlWSraS_IIkoXNVeyXzgRxFiY,46
|
|
281
|
+
canvas-0.13.3.dist-info/RECORD,,
|
|
@@ -20,12 +20,13 @@ class AllergyIntolerance(models.Model):
|
|
|
20
20
|
created = models.DateTimeField()
|
|
21
21
|
modified = models.DateTimeField()
|
|
22
22
|
deleted = models.BooleanField()
|
|
23
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
24
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
23
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
24
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
25
25
|
patient = models.ForeignKey(
|
|
26
26
|
Patient,
|
|
27
27
|
on_delete=models.DO_NOTHING,
|
|
28
28
|
related_name="allergy_intolerances",
|
|
29
|
+
null=True,
|
|
29
30
|
)
|
|
30
31
|
note_id = models.BigIntegerField()
|
|
31
32
|
allergy_intolerance_type = models.CharField()
|
|
@@ -58,4 +59,5 @@ class AllergyIntoleranceCoding(models.Model):
|
|
|
58
59
|
AllergyIntolerance,
|
|
59
60
|
on_delete=models.DO_NOTHING,
|
|
60
61
|
related_name="codings",
|
|
62
|
+
null=True,
|
|
61
63
|
)
|
canvas_sdk/v1/data/billing.py
CHANGED
|
@@ -46,9 +46,11 @@ class BillingLineItem(models.Model):
|
|
|
46
46
|
dbid = models.BigIntegerField(primary_key=True)
|
|
47
47
|
created = models.DateTimeField()
|
|
48
48
|
modified = models.DateTimeField()
|
|
49
|
-
note = models.ForeignKey(
|
|
49
|
+
note = models.ForeignKey(
|
|
50
|
+
Note, on_delete=models.DO_NOTHING, related_name="billing_line_items", null=True
|
|
51
|
+
)
|
|
50
52
|
patient = models.ForeignKey(
|
|
51
|
-
Patient, on_delete=models.DO_NOTHING, related_name="billing_line_items"
|
|
53
|
+
Patient, on_delete=models.DO_NOTHING, related_name="billing_line_items", null=True
|
|
52
54
|
)
|
|
53
55
|
cpt = models.CharField()
|
|
54
56
|
charge = models.DecimalField()
|
canvas_sdk/v1/data/command.py
CHANGED
|
@@ -16,11 +16,11 @@ class Command(models.Model):
|
|
|
16
16
|
dbid = models.BigIntegerField(primary_key=True)
|
|
17
17
|
created = models.DateTimeField()
|
|
18
18
|
modified = models.DateTimeField()
|
|
19
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
20
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
21
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
19
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
20
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
21
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
22
22
|
state = models.CharField()
|
|
23
|
-
patient = models.ForeignKey(Patient, on_delete=models.DO_NOTHING)
|
|
23
|
+
patient = models.ForeignKey(Patient, on_delete=models.DO_NOTHING, null=True)
|
|
24
24
|
note_id = models.BigIntegerField()
|
|
25
25
|
schema_key = models.TextField()
|
|
26
26
|
data = models.JSONField()
|
canvas_sdk/v1/data/condition.py
CHANGED
|
@@ -35,9 +35,11 @@ class Condition(models.Model):
|
|
|
35
35
|
id = models.UUIDField()
|
|
36
36
|
dbid = models.BigIntegerField(primary_key=True)
|
|
37
37
|
deleted = models.BooleanField()
|
|
38
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
39
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
40
|
-
patient = models.ForeignKey(
|
|
38
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
39
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
40
|
+
patient = models.ForeignKey(
|
|
41
|
+
Patient, on_delete=models.DO_NOTHING, related_name="conditions", null=True
|
|
42
|
+
)
|
|
41
43
|
onset_date = models.DateField()
|
|
42
44
|
resolution_date = models.DateField()
|
|
43
45
|
clinical_status = models.CharField(choices=ClinicalStatus.choices)
|
|
@@ -57,4 +59,6 @@ class ConditionCoding(models.Model):
|
|
|
57
59
|
code = models.CharField()
|
|
58
60
|
display = models.CharField()
|
|
59
61
|
user_selected = models.BooleanField()
|
|
60
|
-
condition = models.ForeignKey(
|
|
62
|
+
condition = models.ForeignKey(
|
|
63
|
+
Condition, on_delete=models.DO_NOTHING, related_name="codings", null=True
|
|
64
|
+
)
|
|
@@ -18,11 +18,11 @@ class DetectedIssue(models.Model):
|
|
|
18
18
|
modified = models.DateTimeField()
|
|
19
19
|
identified = models.DateTimeField()
|
|
20
20
|
deleted = models.BooleanField()
|
|
21
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
22
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
23
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
21
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
22
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
23
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
24
24
|
patient = models.ForeignKey(
|
|
25
|
-
Patient, on_delete=models.DO_NOTHING, related_name="detected_issues"
|
|
25
|
+
Patient, on_delete=models.DO_NOTHING, related_name="detected_issues", null=True
|
|
26
26
|
)
|
|
27
27
|
code = models.CharField()
|
|
28
28
|
status = models.CharField()
|
|
@@ -48,5 +48,8 @@ class DetectedIssueEvidence(models.Model):
|
|
|
48
48
|
display = models.CharField()
|
|
49
49
|
user_selected = models.BooleanField()
|
|
50
50
|
detected_issue = models.ForeignKey(
|
|
51
|
-
DetectedIssue,
|
|
51
|
+
DetectedIssue,
|
|
52
|
+
on_delete=models.DO_NOTHING,
|
|
53
|
+
related_name="evidence",
|
|
54
|
+
null=True,
|
|
52
55
|
)
|
canvas_sdk/v1/data/device.py
CHANGED
|
@@ -16,10 +16,12 @@ class Device(models.Model):
|
|
|
16
16
|
dbid = models.BigIntegerField(primary_key=True)
|
|
17
17
|
created = models.DateTimeField()
|
|
18
18
|
modified = models.DateTimeField()
|
|
19
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
20
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
21
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
22
|
-
patient = models.ForeignKey(
|
|
19
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
20
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
21
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
22
|
+
patient = models.ForeignKey(
|
|
23
|
+
Patient, on_delete=models.DO_NOTHING, related_name="devices", null=True
|
|
24
|
+
)
|
|
23
25
|
note_id = models.BigIntegerField()
|
|
24
26
|
deleted = models.BooleanField()
|
|
25
27
|
labeled_contains_NRL = models.BooleanField()
|
canvas_sdk/v1/data/imaging.py
CHANGED
|
@@ -22,23 +22,25 @@ class ImagingOrder(models.Model):
|
|
|
22
22
|
dbid = models.BigIntegerField(primary_key=True)
|
|
23
23
|
created = models.DateTimeField()
|
|
24
24
|
modified = models.DateTimeField()
|
|
25
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
25
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
26
26
|
deleted = models.BooleanField()
|
|
27
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
27
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
28
28
|
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
29
|
-
patient = models.ForeignKey(
|
|
29
|
+
patient = models.ForeignKey(
|
|
30
|
+
Patient, on_delete=models.DO_NOTHING, related_name="imaging_orders", null=True
|
|
31
|
+
)
|
|
30
32
|
# TODO - uncomment when Note model is complete
|
|
31
|
-
# note = models.ForeigneKey(Note, on_delete=models.DO_NOTHING, related_name="imaging_orders")
|
|
33
|
+
# note = models.ForeigneKey(Note, on_delete=models.DO_NOTHING, related_name="imaging_orders", null=True)
|
|
32
34
|
imaging = models.CharField()
|
|
33
35
|
# TODO - uncomment when ServiceProvider model is complete
|
|
34
|
-
# imaging_center = models.ForeignKey(ServiceProvider, related_name="imaging_orders", null=True
|
|
36
|
+
# imaging_center = models.ForeignKey(ServiceProvider, on_delete=models.DO_NOTHING, related_name="imaging_orders", null=True)
|
|
35
37
|
note_to_radiologist = models.CharField()
|
|
36
38
|
internal_comment = models.CharField()
|
|
37
39
|
status = models.CharField(choices=OrderStatus)
|
|
38
40
|
date_time_ordered = models.DateTimeField()
|
|
39
41
|
priority = models.CharField()
|
|
40
42
|
# TODO - uncomment when Staff model is complete
|
|
41
|
-
# ordering_provider = models.ForeignKey(Staff, on_delete=models.
|
|
43
|
+
# ordering_provider = models.ForeignKey(Staff, on_delete=models.DO_NOTHING, related_name="imaging_orders", null=True)
|
|
42
44
|
delegated = models.BooleanField(default=False)
|
|
43
45
|
|
|
44
46
|
|
|
@@ -54,19 +56,19 @@ class ImagingReview(models.Model):
|
|
|
54
56
|
dbid = models.BigIntegerField(primary_key=True)
|
|
55
57
|
created = models.DateTimeField()
|
|
56
58
|
modified = models.DateTimeField()
|
|
57
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
59
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
58
60
|
deleted = models.BooleanField()
|
|
59
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
60
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
61
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
62
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
61
63
|
patient_communication_method = models.CharField(choices=ReviewPatientCommunicationMethod)
|
|
62
64
|
# TODO - uncomment when Note model is complete
|
|
63
|
-
# note = models.ForeignKey(Note, on_delete=models.DO_NOTHING, related_name="imaging_reviews")
|
|
65
|
+
# note = models.ForeignKey(Note, on_delete=models.DO_NOTHING, related_name="imaging_reviews", null=True)
|
|
64
66
|
internal_comment = models.CharField()
|
|
65
67
|
message_to_patient = models.CharField()
|
|
66
68
|
is_released_to_patient = models.BooleanField()
|
|
67
69
|
status = models.CharField(choices=ReviewStatus)
|
|
68
70
|
patient = models.ForeignKey(
|
|
69
|
-
Patient, on_delete=models.DO_NOTHING, related_name="imaging_reviews"
|
|
71
|
+
Patient, on_delete=models.DO_NOTHING, related_name="imaging_reviews", null=True
|
|
70
72
|
)
|
|
71
73
|
|
|
72
74
|
|
|
@@ -92,11 +94,11 @@ class ImagingReport(models.Model):
|
|
|
92
94
|
requires_signature = models.BooleanField()
|
|
93
95
|
assigned_date = models.DateTimeField()
|
|
94
96
|
patient = models.ForeignKey(
|
|
95
|
-
Patient, on_delete=models.DO_NOTHING, related_name="imaging_results"
|
|
97
|
+
Patient, on_delete=models.DO_NOTHING, related_name="imaging_results", null=True
|
|
96
98
|
)
|
|
97
99
|
order = models.ForeignKey(ImagingOrder, on_delete=models.DO_NOTHING, null=True)
|
|
98
100
|
source = models.CharField(choices=ImagingReportSource)
|
|
99
101
|
name = models.CharField()
|
|
100
102
|
result_date = models.DateField()
|
|
101
103
|
original_date = models.DateField()
|
|
102
|
-
review = models.ForeignKey(ImagingReview,
|
|
104
|
+
review = models.ForeignKey(ImagingReview, on_delete=models.DO_NOTHING, null=True)
|
canvas_sdk/v1/data/lab.py
CHANGED
|
@@ -47,12 +47,12 @@ class LabReport(models.Model):
|
|
|
47
47
|
version = models.IntegerField()
|
|
48
48
|
requisition_number = models.CharField()
|
|
49
49
|
review = models.ForeignKey(
|
|
50
|
-
"LabReview", related_name="reports",
|
|
50
|
+
"LabReview", on_delete=models.DO_NOTHING, related_name="reports", null=True
|
|
51
51
|
)
|
|
52
52
|
original_date = models.DateTimeField()
|
|
53
53
|
date_performed = models.DateTimeField()
|
|
54
54
|
custom_document_name = models.CharField()
|
|
55
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
55
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
56
56
|
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
57
57
|
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
58
58
|
deleted = models.BooleanField()
|
|
@@ -72,14 +72,16 @@ class LabReview(models.Model):
|
|
|
72
72
|
dbid = models.BigIntegerField(primary_key=True)
|
|
73
73
|
created = models.DateTimeField()
|
|
74
74
|
modified = models.DateTimeField()
|
|
75
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
75
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
76
76
|
deleted = models.BooleanField()
|
|
77
77
|
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
78
78
|
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
79
79
|
internal_comment = models.TextField()
|
|
80
80
|
message_to_patient = models.CharField()
|
|
81
81
|
status = models.CharField()
|
|
82
|
-
patient = models.ForeignKey(
|
|
82
|
+
patient = models.ForeignKey(
|
|
83
|
+
Patient, on_delete=models.DO_NOTHING, related_name="lab_reviews", null=True
|
|
84
|
+
)
|
|
83
85
|
patient_communication_method = models.CharField()
|
|
84
86
|
|
|
85
87
|
|
|
@@ -113,7 +115,7 @@ class LabValue(models.Model):
|
|
|
113
115
|
created = models.DateTimeField()
|
|
114
116
|
modified = models.DateTimeField()
|
|
115
117
|
report = models.ForeignKey(
|
|
116
|
-
"LabReport", related_name="values",
|
|
118
|
+
"LabReport", on_delete=models.DO_NOTHING, related_name="values", null=True
|
|
117
119
|
)
|
|
118
120
|
value = models.TextField()
|
|
119
121
|
units = models.CharField()
|
|
@@ -178,14 +180,16 @@ class LabOrder(models.Model):
|
|
|
178
180
|
dbid = models.BigIntegerField(primary_key=True)
|
|
179
181
|
created = models.DateTimeField()
|
|
180
182
|
modified = models.DateTimeField()
|
|
181
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
183
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
182
184
|
deleted = models.BooleanField()
|
|
183
185
|
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
184
186
|
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
185
|
-
patient = models.ForeignKey(
|
|
187
|
+
patient = models.ForeignKey(
|
|
188
|
+
Patient, on_delete=models.DO_NOTHING, related_name="lab_orders", null=True
|
|
189
|
+
)
|
|
186
190
|
ontology_lab_partner = models.CharField()
|
|
187
191
|
# TODO - uncomment when the Note model is finished
|
|
188
|
-
# note = models.ForeignKey("Note", on_delete=models.DO_NOTHING)
|
|
192
|
+
# note = models.ForeignKey("Note", on_delete=models.DO_NOTHING, null=True)
|
|
189
193
|
comment = models.CharField()
|
|
190
194
|
requisition_number = models.CharField()
|
|
191
195
|
is_patient_bill = models.BooleanField(null=True)
|
|
@@ -224,11 +228,13 @@ class LabOrderReason(models.Model):
|
|
|
224
228
|
dbid = models.BigIntegerField(primary_key=True)
|
|
225
229
|
created = models.DateTimeField()
|
|
226
230
|
modified = models.DateTimeField()
|
|
227
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
231
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
228
232
|
deleted = models.BooleanField()
|
|
229
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
230
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
231
|
-
order = models.ForeignKey(
|
|
233
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
234
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
235
|
+
order = models.ForeignKey(
|
|
236
|
+
LabOrder, on_delete=models.DO_NOTHING, related_name="reasons", null=True
|
|
237
|
+
)
|
|
232
238
|
mode = models.CharField(max_length=30, choices=LabReasonMode)
|
|
233
239
|
|
|
234
240
|
|
|
@@ -281,7 +287,7 @@ class LabTest(models.Model):
|
|
|
281
287
|
ontology_test_code = models.CharField(max_length=512, blank=True, default="")
|
|
282
288
|
status = models.CharField(max_length=30, choices=LabTestOrderStatus)
|
|
283
289
|
report = models.ForeignKey(
|
|
284
|
-
LabReport, on_delete=models.DO_NOTHING,
|
|
290
|
+
LabReport, on_delete=models.DO_NOTHING, related_name="tests", null=True
|
|
285
291
|
)
|
|
286
292
|
aoe_code = models.CharField(max_length=10, default="")
|
|
287
293
|
procedure_class = models.CharField(max_length=10, default="")
|
canvas_sdk/v1/data/medication.py
CHANGED
|
@@ -31,10 +31,12 @@ class Medication(models.Model):
|
|
|
31
31
|
|
|
32
32
|
id = models.UUIDField()
|
|
33
33
|
dbid = models.BigIntegerField(primary_key=True)
|
|
34
|
-
patient = models.ForeignKey(
|
|
34
|
+
patient = models.ForeignKey(
|
|
35
|
+
Patient, on_delete=models.DO_NOTHING, related_name="medications", null=True
|
|
36
|
+
)
|
|
35
37
|
deleted = models.BooleanField()
|
|
36
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
37
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
38
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
39
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
38
40
|
status = models.CharField(choices=Status.choices)
|
|
39
41
|
start_date = models.DateTimeField()
|
|
40
42
|
end_date = models.DateTimeField()
|
|
@@ -59,4 +61,6 @@ class MedicationCoding(models.Model):
|
|
|
59
61
|
code = models.CharField()
|
|
60
62
|
display = models.CharField()
|
|
61
63
|
user_selected = models.BooleanField()
|
|
62
|
-
medication = models.ForeignKey(
|
|
64
|
+
medication = models.ForeignKey(
|
|
65
|
+
Medication, on_delete=models.DO_NOTHING, related_name="codings", null=True
|
|
66
|
+
)
|
canvas_sdk/v1/data/note.py
CHANGED
|
@@ -140,21 +140,23 @@ class Note(models.Model):
|
|
|
140
140
|
dbid = models.BigIntegerField(db_column="dbid", primary_key=True)
|
|
141
141
|
created = models.DateTimeField()
|
|
142
142
|
modified = models.DateTimeField()
|
|
143
|
-
patient = models.ForeignKey(Patient, on_delete=models.DO_NOTHING)
|
|
144
|
-
provider = models.ForeignKey(
|
|
143
|
+
patient = models.ForeignKey(Patient, on_delete=models.DO_NOTHING, null=True)
|
|
144
|
+
provider = models.ForeignKey(
|
|
145
|
+
"Staff", on_delete=models.DO_NOTHING, related_name="notes", null=True
|
|
146
|
+
)
|
|
145
147
|
note_type = models.CharField(choices=NoteTypes.choices, null=True)
|
|
146
148
|
note_type_version = models.ForeignKey(
|
|
147
|
-
"NoteType", on_delete=models.DO_NOTHING, related_name="notes"
|
|
149
|
+
"NoteType", on_delete=models.DO_NOTHING, related_name="notes", null=True
|
|
148
150
|
)
|
|
149
151
|
title = models.TextField()
|
|
150
152
|
body = models.JSONField()
|
|
151
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
153
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
152
154
|
last_modified_by_staff = models.ForeignKey("Staff", on_delete=models.DO_NOTHING, null=True)
|
|
153
155
|
checksum = models.CharField()
|
|
154
156
|
billing_note = models.TextField()
|
|
155
157
|
# TODO -implement InpatientStay model
|
|
156
|
-
# inpatient_stay = models.ForeignKey("InpatientStay", on_delete=models.DO_NOTHING)
|
|
158
|
+
# inpatient_stay = models.ForeignKey("InpatientStay", on_delete=models.DO_NOTHING, null=True)
|
|
157
159
|
related_data = models.JSONField()
|
|
158
|
-
location = models.ForeignKey("PracticeLocation", on_delete=models.DO_NOTHING)
|
|
160
|
+
location = models.ForeignKey("PracticeLocation", on_delete=models.DO_NOTHING, null=True)
|
|
159
161
|
datetime_of_service = models.DateTimeField()
|
|
160
162
|
place_of_service = models.CharField()
|
|
@@ -25,13 +25,15 @@ class Observation(models.Model):
|
|
|
25
25
|
dbid = models.BigIntegerField(primary_key=True)
|
|
26
26
|
created = models.DateTimeField()
|
|
27
27
|
modified = models.DateTimeField()
|
|
28
|
-
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
29
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
30
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
28
|
+
originator = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
29
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
30
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
31
31
|
deleted = models.BooleanField()
|
|
32
|
-
patient = models.ForeignKey(
|
|
32
|
+
patient = models.ForeignKey(
|
|
33
|
+
Patient, on_delete=models.DO_NOTHING, related_name="observations", null=True
|
|
34
|
+
)
|
|
33
35
|
is_member_of = models.ForeignKey(
|
|
34
|
-
"self", on_delete=models.DO_NOTHING,
|
|
36
|
+
"self", on_delete=models.DO_NOTHING, related_name="members", null=True
|
|
35
37
|
)
|
|
36
38
|
category = models.CharField()
|
|
37
39
|
units = models.TextField()
|
|
@@ -56,7 +58,7 @@ class ObservationCoding(models.Model):
|
|
|
56
58
|
display = models.CharField()
|
|
57
59
|
user_selected = models.BooleanField()
|
|
58
60
|
observation = models.ForeignKey(
|
|
59
|
-
Observation, on_delete=models.DO_NOTHING, related_name="codings"
|
|
61
|
+
Observation, on_delete=models.DO_NOTHING, related_name="codings", null=True
|
|
60
62
|
)
|
|
61
63
|
|
|
62
64
|
|
|
@@ -72,7 +74,7 @@ class ObservationComponent(models.Model):
|
|
|
72
74
|
created = models.DateTimeField()
|
|
73
75
|
modified = models.DateTimeField()
|
|
74
76
|
observation = models.ForeignKey(
|
|
75
|
-
Observation, on_delete=models.DO_NOTHING, related_name="components"
|
|
77
|
+
Observation, on_delete=models.DO_NOTHING, related_name="components", null=True
|
|
76
78
|
)
|
|
77
79
|
value_quantity = models.TextField()
|
|
78
80
|
value_quantity_unit = models.TextField()
|
|
@@ -94,7 +96,7 @@ class ObservationComponentCoding(models.Model):
|
|
|
94
96
|
display = models.CharField()
|
|
95
97
|
user_selected = models.BooleanField()
|
|
96
98
|
observation_component = models.ForeignKey(
|
|
97
|
-
ObservationComponent, on_delete=models.DO_NOTHING, related_name="codings"
|
|
99
|
+
ObservationComponent, on_delete=models.DO_NOTHING, related_name="codings", null=True
|
|
98
100
|
)
|
|
99
101
|
|
|
100
102
|
|
|
@@ -113,5 +115,5 @@ class ObservationValueCoding(models.Model):
|
|
|
113
115
|
display = models.CharField()
|
|
114
116
|
user_selected = models.BooleanField()
|
|
115
117
|
observation = models.ForeignKey(
|
|
116
|
-
Observation, on_delete=models.DO_NOTHING, related_name="value_codings"
|
|
118
|
+
Observation, on_delete=models.DO_NOTHING, related_name="value_codings", null=True
|
|
117
119
|
)
|
|
@@ -65,7 +65,7 @@ class PracticeLocation(models.Model):
|
|
|
65
65
|
created = models.DateTimeField()
|
|
66
66
|
modified = models.DateTimeField()
|
|
67
67
|
organization = models.ForeignKey(
|
|
68
|
-
"Organization", on_delete=models.DO_NOTHING, related_name="practice_locations"
|
|
68
|
+
"Organization", on_delete=models.DO_NOTHING, related_name="practice_locations", null=True
|
|
69
69
|
)
|
|
70
70
|
place_of_service_code = models.CharField(choices=PracticeLocationPOS.choices)
|
|
71
71
|
full_name = models.CharField()
|
|
@@ -96,7 +96,7 @@ class PracticeLocationSetting(models.Model):
|
|
|
96
96
|
|
|
97
97
|
dbid = models.BigIntegerField(primary_key=True)
|
|
98
98
|
practice_location = models.ForeignKey(
|
|
99
|
-
PracticeLocation, on_delete=models.DO_NOTHING, related_name="settings"
|
|
99
|
+
PracticeLocation, on_delete=models.DO_NOTHING, related_name="settings", null=True
|
|
100
100
|
)
|
|
101
101
|
name = models.CharField()
|
|
102
102
|
value = models.JSONField()
|
|
@@ -35,12 +35,10 @@ class ProtocolOverride(models.Model):
|
|
|
35
35
|
created = models.DateTimeField()
|
|
36
36
|
modified = models.DateTimeField()
|
|
37
37
|
deleted = models.BooleanField()
|
|
38
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
39
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
38
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
39
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
40
40
|
patient = models.ForeignKey(
|
|
41
|
-
Patient,
|
|
42
|
-
on_delete=models.DO_NOTHING,
|
|
43
|
-
related_name="protocol_overrides",
|
|
41
|
+
Patient, on_delete=models.DO_NOTHING, related_name="protocol_overrides", null=True
|
|
44
42
|
)
|
|
45
43
|
protocol_key = models.CharField()
|
|
46
44
|
is_adjustment = models.BooleanField()
|
|
@@ -47,7 +47,7 @@ class ResponseOption(models.Model):
|
|
|
47
47
|
code_description = models.CharField()
|
|
48
48
|
value = models.CharField()
|
|
49
49
|
response_option_set = models.ForeignKey(
|
|
50
|
-
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="options"
|
|
50
|
+
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="options", null=True
|
|
51
51
|
)
|
|
52
52
|
ordering = models.IntegerField()
|
|
53
53
|
|
|
@@ -67,7 +67,7 @@ class Question(models.Model):
|
|
|
67
67
|
status = models.CharField()
|
|
68
68
|
name = models.CharField()
|
|
69
69
|
response_option_set = models.ForeignKey(
|
|
70
|
-
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="questions"
|
|
70
|
+
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="questions", null=True
|
|
71
71
|
)
|
|
72
72
|
acknowledge_only = models.BooleanField()
|
|
73
73
|
show_prologue = models.BooleanField()
|
|
@@ -126,8 +126,8 @@ class QuestionnaireQuestionMap(models.Model):
|
|
|
126
126
|
created = models.DateTimeField()
|
|
127
127
|
modified = models.DateTimeField()
|
|
128
128
|
status = models.CharField()
|
|
129
|
-
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.DO_NOTHING)
|
|
130
|
-
question = models.ForeignKey(Question, on_delete=models.DO_NOTHING)
|
|
129
|
+
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.DO_NOTHING, null=True)
|
|
130
|
+
question = models.ForeignKey(Question, on_delete=models.DO_NOTHING, null=True)
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
class Interview(models.Model):
|
|
@@ -143,13 +143,15 @@ class Interview(models.Model):
|
|
|
143
143
|
id = models.UUIDField()
|
|
144
144
|
dbid = models.BigIntegerField(primary_key=True)
|
|
145
145
|
deleted = models.BooleanField()
|
|
146
|
-
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
147
|
-
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
146
|
+
committer = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
147
|
+
entered_in_error = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
148
148
|
status = models.CharField()
|
|
149
149
|
name = models.CharField()
|
|
150
150
|
language_id = models.BigIntegerField()
|
|
151
151
|
use_case_in_charting = models.CharField()
|
|
152
|
-
patient = models.ForeignKey(
|
|
152
|
+
patient = models.ForeignKey(
|
|
153
|
+
Patient, on_delete=models.DO_NOTHING, related_name="interviews", null=True
|
|
154
|
+
)
|
|
153
155
|
note_id = models.BigIntegerField()
|
|
154
156
|
appointment_id = models.BigIntegerField()
|
|
155
157
|
questionnaires = models.ManyToManyField( # type: ignore[var-annotated]
|
|
@@ -173,8 +175,8 @@ class InterviewQuestionnaireMap(models.Model):
|
|
|
173
175
|
created = models.DateTimeField()
|
|
174
176
|
modified = models.DateTimeField()
|
|
175
177
|
status = models.CharField()
|
|
176
|
-
interview = models.ForeignKey(Interview, on_delete=models.DO_NOTHING)
|
|
177
|
-
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.
|
|
178
|
+
interview = models.ForeignKey(Interview, on_delete=models.DO_NOTHING, null=True)
|
|
179
|
+
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.DO_NOTHING, null=True)
|
|
178
180
|
|
|
179
181
|
|
|
180
182
|
class InterviewQuestionResponse(models.Model):
|
|
@@ -190,16 +192,16 @@ class InterviewQuestionResponse(models.Model):
|
|
|
190
192
|
modified = models.DateTimeField()
|
|
191
193
|
status = models.CharField()
|
|
192
194
|
interview = models.ForeignKey(
|
|
193
|
-
Interview, on_delete=models.DO_NOTHING, related_name="interview_responses"
|
|
195
|
+
Interview, on_delete=models.DO_NOTHING, related_name="interview_responses", null=True
|
|
194
196
|
)
|
|
195
197
|
questionnaire = models.ForeignKey(
|
|
196
|
-
Questionnaire, on_delete=models.DO_NOTHING, related_name="interview_responses"
|
|
198
|
+
Questionnaire, on_delete=models.DO_NOTHING, related_name="interview_responses", null=True
|
|
197
199
|
)
|
|
198
200
|
question = models.ForeignKey(
|
|
199
|
-
Question, on_delete=models.DO_NOTHING, related_name="interview_responses"
|
|
201
|
+
Question, on_delete=models.DO_NOTHING, related_name="interview_responses", null=True
|
|
200
202
|
)
|
|
201
203
|
response_option = models.ForeignKey(
|
|
202
|
-
ResponseOption, on_delete=models.DO_NOTHING, related_name="interview_responses"
|
|
204
|
+
ResponseOption, on_delete=models.DO_NOTHING, related_name="interview_responses", null=True
|
|
203
205
|
)
|
|
204
206
|
response_option_value = models.TextField()
|
|
205
207
|
questionnaire_state = models.TextField()
|
canvas_sdk/v1/data/staff.py
CHANGED
|
@@ -54,12 +54,12 @@ class Staff(models.Model):
|
|
|
54
54
|
tax_id_type = models.CharField(choices=TaxIDType.choices)
|
|
55
55
|
spi_number = models.CharField()
|
|
56
56
|
# TODO - uncomment when Language is developed
|
|
57
|
-
# language = models.ForeignKey(Language, on_delete=models.DO_NOTHING, related_name="staff_speakers")
|
|
58
|
-
# language_secondary = models.ForeignKey(Language, on_delete=models.DO_NOTHING, related_name="staff_secondary_speakers")
|
|
57
|
+
# language = models.ForeignKey(Language, on_delete=models.DO_NOTHING, related_name="staff_speakers", null=True)
|
|
58
|
+
# language_secondary = models.ForeignKey(Language, on_delete=models.DO_NOTHING, related_name="staff_secondary_speakers", null=True)
|
|
59
59
|
personal_meeting_room_link = models.URLField(null=True)
|
|
60
60
|
state = models.JSONField()
|
|
61
|
-
user = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING)
|
|
61
|
+
user = models.ForeignKey(CanvasUser, on_delete=models.DO_NOTHING, null=True)
|
|
62
62
|
schedule_column_ordering = models.IntegerField()
|
|
63
63
|
default_supervising_provider = models.ForeignKey(
|
|
64
|
-
"Staff", on_delete=models.DO_NOTHING,
|
|
64
|
+
"Staff", on_delete=models.DO_NOTHING, related_name="supervising_team", null=True
|
|
65
65
|
)
|
canvas_sdk/v1/data/task.py
CHANGED
|
@@ -46,14 +46,16 @@ class Task(models.Model):
|
|
|
46
46
|
dbid = models.BigIntegerField(primary_key=True)
|
|
47
47
|
created = models.DateTimeField()
|
|
48
48
|
modified = models.DateTimeField()
|
|
49
|
-
creator = models.ForeignKey(
|
|
49
|
+
creator = models.ForeignKey(
|
|
50
|
+
Staff, on_delete=models.DO_NOTHING, related_name="creator_tasks", null=True
|
|
51
|
+
)
|
|
50
52
|
assignee = models.ForeignKey(
|
|
51
|
-
Staff, related_name="assignee_tasks", null=True
|
|
53
|
+
Staff, on_delete=models.DO_NOTHING, related_name="assignee_tasks", null=True
|
|
52
54
|
)
|
|
53
55
|
# TODO - uncomment when Team model is created
|
|
54
|
-
# team = models.ForeignKey(Team, related_name="tasks", null=True
|
|
56
|
+
# team = models.ForeignKey(Team, on_delete=models.DO_NOTHING, related_name="tasks", null=True)
|
|
55
57
|
patient = models.ForeignKey(
|
|
56
|
-
Patient,
|
|
58
|
+
Patient, on_delete=models.DO_NOTHING, blank=True, related_name="tasks", null=True
|
|
57
59
|
)
|
|
58
60
|
task_type = models.CharField(choices=TaskType.choices)
|
|
59
61
|
tag = models.CharField()
|
|
@@ -75,8 +77,10 @@ class TaskComment(models.Model):
|
|
|
75
77
|
dbid = models.BigIntegerField(primary_key=True)
|
|
76
78
|
created = models.DateTimeField()
|
|
77
79
|
modified = models.DateTimeField()
|
|
78
|
-
creator = models.ForeignKey(
|
|
79
|
-
|
|
80
|
+
creator = models.ForeignKey(
|
|
81
|
+
Staff, on_delete=models.DO_NOTHING, related_name="comments", null=True
|
|
82
|
+
)
|
|
83
|
+
task = models.ForeignKey(Task, on_delete=models.DO_NOTHING, related_name="comments", null=True)
|
|
80
84
|
body = models.TextField()
|
|
81
85
|
|
|
82
86
|
|
|
@@ -108,5 +112,5 @@ class TaskTaskLabel(models.Model):
|
|
|
108
112
|
db_table = "canvas_sdk_data_api_tasktasklabel_001"
|
|
109
113
|
|
|
110
114
|
dbid = models.BigIntegerField(primary_key=True)
|
|
111
|
-
task_label = models.ForeignKey(TaskLabel, on_delete=models.DO_NOTHING)
|
|
112
|
-
task = models.ForeignKey(Task, on_delete=models.DO_NOTHING)
|
|
115
|
+
task_label = models.ForeignKey(TaskLabel, on_delete=models.DO_NOTHING, null=True)
|
|
116
|
+
task = models.ForeignKey(Task, on_delete=models.DO_NOTHING, null=True)
|
plugin_runner/plugin_runner.py
CHANGED
|
@@ -193,7 +193,6 @@ class PluginRunner(PluginRunnerServicer):
|
|
|
193
193
|
) -> AsyncGenerator[ReloadPluginsResponse, None]:
|
|
194
194
|
"""This is invoked when we need to reload plugins."""
|
|
195
195
|
try:
|
|
196
|
-
load_plugins()
|
|
197
196
|
publish_message({"action": "restart"})
|
|
198
197
|
except ImportError:
|
|
199
198
|
yield ReloadPluginsResponse(success=False)
|
|
@@ -48,6 +48,8 @@ def main() -> None:
|
|
|
48
48
|
try:
|
|
49
49
|
print("plugin-synchronizer: installing plugins after web container start")
|
|
50
50
|
install_plugins()
|
|
51
|
+
print("plugin-synchronizer: sending SIGHUP to plugin-runner")
|
|
52
|
+
check_output(["circusctl", "signal", "plugin-runner", "1"], cwd="/app", stderr=STDOUT)
|
|
51
53
|
except CalledProcessError as e:
|
|
52
54
|
print("plugin-synchronizer: `install_plugins` failed:", e)
|
|
53
55
|
|
|
@@ -67,7 +69,7 @@ def main() -> None:
|
|
|
67
69
|
data = pickle.loads(message.get("data", pickle.dumps({})))
|
|
68
70
|
|
|
69
71
|
if "action" not in data or "client_id" not in data:
|
|
70
|
-
|
|
72
|
+
continue
|
|
71
73
|
|
|
72
74
|
if data["action"] == "restart":
|
|
73
75
|
# Run the plugin installer process
|
|
@@ -191,17 +191,3 @@ async def test_reload_plugins_event_handler_successfully_loads_plugins(
|
|
|
191
191
|
assert len(result) == 1
|
|
192
192
|
assert result[0].success is True
|
|
193
193
|
assert "example_plugin:example_plugin.protocols.my_protocol:Protocol" in LOADED_PLUGINS
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
@pytest.mark.asyncio
|
|
197
|
-
async def test_reload_plugins_import_error(plugin_runner: PluginRunner) -> None:
|
|
198
|
-
"""Test ReloadPlugins response when an ImportError occurs."""
|
|
199
|
-
request = ReloadPluginsRequest()
|
|
200
|
-
|
|
201
|
-
with patch("plugin_runner.plugin_runner.load_plugins", side_effect=ImportError):
|
|
202
|
-
responses = []
|
|
203
|
-
async for response in plugin_runner.ReloadPlugins(request, None):
|
|
204
|
-
responses.append(response)
|
|
205
|
-
|
|
206
|
-
assert len(responses) == 1
|
|
207
|
-
assert responses[0].success is False
|
settings.py
CHANGED
|
@@ -2,18 +2,16 @@ import os
|
|
|
2
2
|
import sys
|
|
3
3
|
|
|
4
4
|
from dotenv import load_dotenv
|
|
5
|
-
from env_tools import env_to_bool
|
|
5
|
+
from env_tools import env_to_bool
|
|
6
6
|
|
|
7
7
|
from canvas_sdk.utils.db import get_database_dict_from_url
|
|
8
8
|
|
|
9
|
-
require_env, enforce_required_envs = get_enforcement_context()
|
|
10
|
-
|
|
11
9
|
load_dotenv()
|
|
12
10
|
|
|
13
11
|
ENV = os.getenv("ENV", "development")
|
|
14
12
|
IS_PRODUCTION = ENV == "production"
|
|
15
13
|
IS_TESTING = env_to_bool("IS_TESTING", "pytest" in sys.argv[0] or sys.argv[0] == "-c")
|
|
16
|
-
CUSTOMER_IDENTIFIER =
|
|
14
|
+
CUSTOMER_IDENTIFIER = os.getenv("CUSTOMER_IDENTIFIER", "local")
|
|
17
15
|
|
|
18
16
|
INTEGRATION_TEST_URL = os.getenv("INTEGRATION_TEST_URL")
|
|
19
17
|
INTEGRATION_TEST_CLIENT_ID = os.getenv("INTEGRATION_TEST_CLIENT_ID")
|
|
@@ -68,4 +66,3 @@ PLUGIN_DIRECTORY = os.getenv(
|
|
|
68
66
|
MANIFEST_FILE_NAME = "CANVAS_MANIFEST.json"
|
|
69
67
|
|
|
70
68
|
SECRETS_FILE_NAME = "SECRETS.json"
|
|
71
|
-
enforce_required_envs()
|
|
File without changes
|
|
File without changes
|