canvas 0.60.0__py3-none-any.whl → 0.62.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.60.0.dist-info → canvas-0.62.0.dist-info}/METADATA +1 -1
- {canvas-0.60.0.dist-info → canvas-0.62.0.dist-info}/RECORD +7 -7
- canvas_sdk/commands/base.py +9 -3
- canvas_sdk/effects/note/base.py +0 -8
- canvas_sdk/effects/note/note.py +17 -7
- {canvas-0.60.0.dist-info → canvas-0.62.0.dist-info}/WHEEL +0 -0
- {canvas-0.60.0.dist-info → canvas-0.62.0.dist-info}/entry_points.txt +0 -0
|
@@ -102,7 +102,7 @@ canvas_sdk/caching/exceptions.py,sha256=WIQIveMzmGm9WGhZqBhsGbbcydpS0AzMpkhzUmTa
|
|
|
102
102
|
canvas_sdk/caching/plugins.py,sha256=VWVj7iBQQDHJTMX8El4YHkUPRgSEWZef7aaS7Jls7RU,607
|
|
103
103
|
canvas_sdk/caching/utils.py,sha256=lg-2RVl7uujO0_KOvWKZ5c3q7RyrrmLG5JNaxCL2lOw,875
|
|
104
104
|
canvas_sdk/commands/__init__.py,sha256=qX7xkagyYk4W4JqczoTHv3W3Bk16BXQG4Ut7zQV8wX0,3337
|
|
105
|
-
canvas_sdk/commands/base.py,sha256=
|
|
105
|
+
canvas_sdk/commands/base.py,sha256=XHHS2mvTm0Do3y5xxUJJzj1JFMZ3Jp-E0Go7ZtnXkww,6763
|
|
106
106
|
canvas_sdk/commands/constants.py,sha256=0iuPRW1xC0O7i1KxxQbFhjbOA5VAnBkfyxELRJ3M86o,1652
|
|
107
107
|
canvas_sdk/commands/commands/__init__.py,sha256=YYXr5tEQlnwMgTXJbOG963tKSPiUOM4mUkX8wuiqp7U,17
|
|
108
108
|
canvas_sdk/commands/commands/adjust_prescription.py,sha256=LgA0x7YS6wK84kxI5r3ULSBSvxi4XFB6hdIMdfakPNQ,453
|
|
@@ -168,9 +168,9 @@ canvas_sdk/effects/compound_medications/__init__.py,sha256=3bNQZNTSzs4VUw-6jvvsh
|
|
|
168
168
|
canvas_sdk/effects/compound_medications/compound_medication.py,sha256=lBeKGPuYjeAXBb2x4GlfnV-J-Wje7ryUMWqRCPL3ogY,9547
|
|
169
169
|
canvas_sdk/effects/note/__init__.py,sha256=SwxCzB_2qzYhZAjObnD5cYRxC_kBCf68kNkKcQCANXY,294
|
|
170
170
|
canvas_sdk/effects/note/appointment.py,sha256=ca46df8onI-I6szPJWSz_N745PWchKMBcruKiXmxsqk,8034
|
|
171
|
-
canvas_sdk/effects/note/base.py,sha256=
|
|
171
|
+
canvas_sdk/effects/note/base.py,sha256=FzMR0Wbg66xjIaiyvcSLyvTi5_a6F7vR_GGdsLZk74Q,7279
|
|
172
172
|
canvas_sdk/effects/note/message.py,sha256=T6p6h4J_I0k2jQSirFtIusydak4tem9yBPOTexvOQ0s,3740
|
|
173
|
-
canvas_sdk/effects/note/note.py,sha256=
|
|
173
|
+
canvas_sdk/effects/note/note.py,sha256=mQtcC71vviFzwGP_uQKk9_Pksh8oUY8nyMKikUdaWPE,5005
|
|
174
174
|
canvas_sdk/effects/patient/__init__.py,sha256=QC5UszNibt-BTC3rfCq9y-j4-APuBMUZfAllB8WnIDY,636
|
|
175
175
|
canvas_sdk/effects/patient/base.py,sha256=E60n-RtD8q5Fo1UxCS1-RmZu14qBV5raiYtm2TcxrWU,8342
|
|
176
176
|
canvas_sdk/effects/patient/create_patient_external_identifier.py,sha256=d03jzJcz2n19_NVo_wAq88iKZRuuM60qsZhGGhL7pGE,1055
|
|
@@ -331,7 +331,7 @@ canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookie
|
|
|
331
331
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/README.md,sha256=3QKoJQq3YmdplGnDOBMsLCJ3Ya1_aKjoz-QiWc4QfjA,291
|
|
332
332
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
333
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/protocols/my_protocol.py,sha256=fKLLcOIwvSWenW8-7tr8VqnF4Iox_5wU9V-Qw9UySsA,2381
|
|
334
|
-
canvas-0.
|
|
335
|
-
canvas-0.
|
|
336
|
-
canvas-0.
|
|
337
|
-
canvas-0.
|
|
334
|
+
canvas-0.62.0.dist-info/METADATA,sha256=2ABZEbwBvdf27cqL6dBep_5iaBjzqHBe_sgzCkdRPZE,4758
|
|
335
|
+
canvas-0.62.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
336
|
+
canvas-0.62.0.dist-info/entry_points.txt,sha256=0Vs_9GmTVUNniH6eDBlRPgofmADMV4BES6Ao26M4AbM,47
|
|
337
|
+
canvas-0.62.0.dist-info/RECORD,,
|
canvas_sdk/commands/base.py
CHANGED
|
@@ -77,7 +77,8 @@ class _BaseCommand(TrackableFieldsModel):
|
|
|
77
77
|
annotation_args = get_args(annotation)
|
|
78
78
|
# Filter out NoneType and take the first valid type
|
|
79
79
|
annotation = next(
|
|
80
|
-
(arg for arg in annotation_args if arg is not NoneType),
|
|
80
|
+
(arg for arg in annotation_args if arg is not NoneType),
|
|
81
|
+
annotation_args[0],
|
|
81
82
|
)
|
|
82
83
|
|
|
83
84
|
if type(annotation) is EnumType:
|
|
@@ -158,8 +159,13 @@ class _BaseCommand(TrackableFieldsModel):
|
|
|
158
159
|
"""Returns a command recommendation to be inserted via Protocol Card."""
|
|
159
160
|
if button is None:
|
|
160
161
|
button = self.constantized_key().lower().replace("_", " ")
|
|
161
|
-
command = self.Meta.key
|
|
162
|
-
return Recommendation(
|
|
162
|
+
command = self.Meta.key
|
|
163
|
+
return Recommendation(
|
|
164
|
+
title=title,
|
|
165
|
+
button=button,
|
|
166
|
+
command=command,
|
|
167
|
+
context=self.values | {"effect_type": f"ORIGINATE_{self.constantized_key()}_COMMAND"},
|
|
168
|
+
)
|
|
163
169
|
|
|
164
170
|
|
|
165
171
|
class _SendableCommandMixin:
|
canvas_sdk/effects/note/base.py
CHANGED
|
@@ -57,14 +57,6 @@ class NoteOrAppointmentABC(TrackableFieldsModel, ABC):
|
|
|
57
57
|
errors = super()._get_error_details(method)
|
|
58
58
|
|
|
59
59
|
if method == "create":
|
|
60
|
-
if self.instance_id:
|
|
61
|
-
errors.append(
|
|
62
|
-
self._create_error_detail(
|
|
63
|
-
"value",
|
|
64
|
-
"Instance ID should not be provided for create effects.",
|
|
65
|
-
self.instance_id,
|
|
66
|
-
)
|
|
67
|
-
)
|
|
68
60
|
if not self.practice_location_id:
|
|
69
61
|
errors.append(
|
|
70
62
|
self._create_error_detail(
|
canvas_sdk/effects/note/note.py
CHANGED
|
@@ -67,6 +67,16 @@ class Note(NoteOrAppointmentABC):
|
|
|
67
67
|
None,
|
|
68
68
|
)
|
|
69
69
|
)
|
|
70
|
+
|
|
71
|
+
if self.instance_id and NoteModel.objects.filter(id=self.instance_id).exists():
|
|
72
|
+
errors.append(
|
|
73
|
+
self._create_error_detail(
|
|
74
|
+
"value",
|
|
75
|
+
f"Note with ID {self.instance_id} already exists.",
|
|
76
|
+
self.instance_id,
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
|
|
70
80
|
elif method == "update":
|
|
71
81
|
if self.note_type_id:
|
|
72
82
|
errors.append(
|
|
@@ -85,14 +95,14 @@ class Note(NoteOrAppointmentABC):
|
|
|
85
95
|
)
|
|
86
96
|
)
|
|
87
97
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
if self.instance_id and not NoteModel.objects.filter(id=self.instance_id).exists():
|
|
99
|
+
errors.append(
|
|
100
|
+
self._create_error_detail(
|
|
101
|
+
"value",
|
|
102
|
+
f"Note with ID {self.instance_id} does not exist.",
|
|
103
|
+
self.instance_id,
|
|
104
|
+
)
|
|
94
105
|
)
|
|
95
|
-
)
|
|
96
106
|
|
|
97
107
|
if self.note_type_id:
|
|
98
108
|
note_type_category = (
|
|
File without changes
|
|
File without changes
|