canvas 0.45.0__py3-none-any.whl → 0.46.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.45.0.dist-info → canvas-0.46.0.dist-info}/METADATA +3 -2
- {canvas-0.45.0.dist-info → canvas-0.46.0.dist-info}/RECORD +62 -57
- 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 +18 -0
- canvas_sdk/commands/commands/exam.py +2 -1
- canvas_sdk/commands/commands/immunization_statement.py +32 -0
- canvas_sdk/commands/commands/questionnaire/__init__.py +18 -3
- canvas_sdk/commands/commands/questionnaire/question.py +3 -2
- canvas_sdk/commands/commands/questionnaire/toggle_questions.py +68 -0
- canvas_sdk/commands/commands/review_of_systems.py +2 -1
- canvas_sdk/v1/data/__init__.py +17 -3
- canvas_sdk/v1/data/allergy_intolerance.py +16 -19
- canvas_sdk/v1/data/appointment.py +10 -14
- canvas_sdk/v1/data/assessment.py +9 -10
- canvas_sdk/v1/data/banner_alert.py +12 -12
- canvas_sdk/v1/data/base.py +45 -1
- canvas_sdk/v1/data/billing.py +13 -18
- canvas_sdk/v1/data/business_line.py +7 -8
- canvas_sdk/v1/data/care_team.py +14 -17
- canvas_sdk/v1/data/charge_description_master.py +29 -0
- canvas_sdk/v1/data/claim.py +87 -95
- canvas_sdk/v1/data/claim_line_item.py +17 -18
- canvas_sdk/v1/data/command.py +8 -9
- canvas_sdk/v1/data/condition.py +9 -12
- canvas_sdk/v1/data/coverage.py +47 -53
- canvas_sdk/v1/data/detected_issue.py +16 -20
- canvas_sdk/v1/data/device.py +20 -21
- canvas_sdk/v1/data/discount.py +8 -8
- canvas_sdk/v1/data/imaging.py +24 -30
- canvas_sdk/v1/data/invoice.py +3 -3
- canvas_sdk/v1/data/lab.py +65 -84
- canvas_sdk/v1/data/line_item_transaction.py +7 -9
- canvas_sdk/v1/data/medication.py +14 -17
- canvas_sdk/v1/data/message.py +10 -17
- canvas_sdk/v1/data/note.py +27 -36
- canvas_sdk/v1/data/observation.py +24 -33
- canvas_sdk/v1/data/organization.py +14 -15
- canvas_sdk/v1/data/patient.py +57 -68
- canvas_sdk/v1/data/patient_consent.py +14 -19
- canvas_sdk/v1/data/payment_collection.py +7 -8
- canvas_sdk/v1/data/payor_specific_charge.py +10 -12
- canvas_sdk/v1/data/posting.py +10 -18
- canvas_sdk/v1/data/practicelocation.py +17 -21
- canvas_sdk/v1/data/protocol_override.py +8 -10
- canvas_sdk/v1/data/questionnaire.py +56 -73
- canvas_sdk/v1/data/reason_for_visit.py +7 -9
- canvas_sdk/v1/data/staff.py +61 -57
- canvas_sdk/v1/data/task.py +21 -31
- canvas_sdk/v1/data/team.py +15 -18
- canvas_sdk/v1/data/user.py +3 -3
- canvas_sdk/v1/data/utils.py +6 -0
- plugin_runner/allowed-module-imports.json +1340 -0
- plugin_runner/generate_allowed_imports.py +97 -0
- plugin_runner/plugin_runner.py +9 -0
- plugin_runner/sandbox.py +50 -60
- protobufs/canvas_generated/messages/effects.proto +6 -0
- protobufs/canvas_generated/messages/events.proto +12 -1
- settings.py +56 -22
- {canvas-0.45.0.dist-info → canvas-0.46.0.dist-info}/WHEEL +0 -0
- {canvas-0.45.0.dist-info → canvas-0.46.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
|
|
3
|
+
from canvas_sdk.v1.data.base import Model
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
class PayorSpecificCharge(Model):
|
|
5
7
|
"""Payor Specific Charge."""
|
|
6
8
|
|
|
7
9
|
class Meta:
|
|
8
|
-
managed = False
|
|
9
10
|
db_table = "canvas_sdk_data_quality_and_revenue_payorspecificcharge_001"
|
|
10
11
|
|
|
11
|
-
dbid = models.BigIntegerField(primary_key=True)
|
|
12
12
|
transactor = models.ForeignKey(
|
|
13
13
|
"v1.Transactor", related_name="specific_charges", on_delete=models.DO_NOTHING
|
|
14
14
|
)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
charge_amount = models.DecimalField()
|
|
15
|
+
charge = models.ForeignKey(
|
|
16
|
+
"v1.ChargeDescriptionMaster",
|
|
17
|
+
related_name="transactor_charges",
|
|
18
|
+
on_delete=models.DO_NOTHING,
|
|
19
|
+
)
|
|
20
|
+
charge_amount = models.DecimalField(max_digits=8, decimal_places=2)
|
|
23
21
|
effective_date = models.DateField()
|
|
24
|
-
end_date = models.DateField()
|
|
22
|
+
end_date = models.DateField(null=True)
|
|
25
23
|
part_of_capitated_set = models.BooleanField()
|
|
26
24
|
|
|
27
25
|
|
canvas_sdk/v1/data/posting.py
CHANGED
|
@@ -3,6 +3,7 @@ from typing import Self
|
|
|
3
3
|
|
|
4
4
|
from django.db import models
|
|
5
5
|
|
|
6
|
+
from canvas_sdk.v1.data.base import IdentifiableModel, Model
|
|
6
7
|
from canvas_sdk.v1.data.utils import quantize
|
|
7
8
|
|
|
8
9
|
|
|
@@ -14,18 +15,16 @@ class PostingQuerySet(models.QuerySet):
|
|
|
14
15
|
return self.filter(entered_in_error__isnull=True)
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
class BasePosting(
|
|
18
|
+
class BasePosting(Model):
|
|
18
19
|
"""
|
|
19
20
|
Base model to aggregate multiple line item transactions on a claim.
|
|
20
21
|
"""
|
|
21
22
|
|
|
22
23
|
class Meta:
|
|
23
|
-
managed = False
|
|
24
24
|
db_table = "canvas_sdk_data_quality_and_revenue_baseposting_001"
|
|
25
25
|
|
|
26
26
|
objects = PostingQuerySet.as_manager()
|
|
27
27
|
|
|
28
|
-
dbid = models.BigIntegerField(primary_key=True)
|
|
29
28
|
corrected_posting = models.ForeignKey(
|
|
30
29
|
"v1.BasePosting", related_name="correction_postings", on_delete=models.PROTECT, null=True
|
|
31
30
|
)
|
|
@@ -41,8 +40,8 @@ class BasePosting(models.Model):
|
|
|
41
40
|
"v1.CanvasUser", on_delete=models.PROTECT, null=True, blank=True
|
|
42
41
|
)
|
|
43
42
|
|
|
44
|
-
created = models.DateTimeField()
|
|
45
|
-
modified = models.DateTimeField()
|
|
43
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
44
|
+
modified = models.DateTimeField(auto_now=True)
|
|
46
45
|
|
|
47
46
|
@property
|
|
48
47
|
def paid_amount(self) -> Decimal:
|
|
@@ -93,7 +92,6 @@ class CoveragePosting(BasePosting):
|
|
|
93
92
|
"""Represents an insurance payment/adjustment on a claim level."""
|
|
94
93
|
|
|
95
94
|
class Meta:
|
|
96
|
-
managed = False
|
|
97
95
|
db_table = "canvas_sdk_data_quality_and_revenue_coverageposting_001"
|
|
98
96
|
|
|
99
97
|
remittance = models.ForeignKey(
|
|
@@ -103,9 +101,9 @@ class CoveragePosting(BasePosting):
|
|
|
103
101
|
"v1.ClaimCoverage", related_name="postings", on_delete=models.PROTECT
|
|
104
102
|
)
|
|
105
103
|
|
|
106
|
-
crossover_carrier = models.CharField()
|
|
107
|
-
crossover_id = models.CharField()
|
|
108
|
-
payer_icn = models.CharField()
|
|
104
|
+
crossover_carrier = models.CharField(max_length=255)
|
|
105
|
+
crossover_id = models.CharField(max_length=255)
|
|
106
|
+
payer_icn = models.CharField(max_length=255)
|
|
109
107
|
position_in_era = models.PositiveIntegerField()
|
|
110
108
|
|
|
111
109
|
|
|
@@ -113,7 +111,6 @@ class PatientPosting(BasePosting):
|
|
|
113
111
|
"""A model that represents a patient payment/adjustment on a claim level."""
|
|
114
112
|
|
|
115
113
|
class Meta:
|
|
116
|
-
managed = False
|
|
117
114
|
db_table = "canvas_sdk_data_quality_and_revenue_patientposting_001"
|
|
118
115
|
|
|
119
116
|
claim_patient = models.ForeignKey(
|
|
@@ -152,30 +149,26 @@ class PatientPosting(BasePosting):
|
|
|
152
149
|
return self.discounted_amount + self.paid_amount
|
|
153
150
|
|
|
154
151
|
|
|
155
|
-
class AbstractBulkPosting(
|
|
152
|
+
class AbstractBulkPosting(IdentifiableModel):
|
|
156
153
|
"""Patient and Insurance bulk posting shared columns."""
|
|
157
154
|
|
|
158
155
|
class Meta:
|
|
159
156
|
abstract = True
|
|
160
157
|
|
|
161
|
-
id = models.UUIDField()
|
|
162
|
-
dbid = models.BigIntegerField(primary_key=True)
|
|
163
|
-
|
|
164
158
|
payment_collection = models.OneToOneField(
|
|
165
159
|
"v1.PaymentCollection", related_name="%(class)s", on_delete=models.PROTECT
|
|
166
160
|
)
|
|
167
161
|
|
|
168
162
|
total_paid = models.DecimalField(max_digits=8, decimal_places=2)
|
|
169
163
|
|
|
170
|
-
created = models.DateTimeField()
|
|
171
|
-
modified = models.DateTimeField()
|
|
164
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
165
|
+
modified = models.DateTimeField(auto_now=True)
|
|
172
166
|
|
|
173
167
|
|
|
174
168
|
class BulkPatientPosting(AbstractBulkPosting):
|
|
175
169
|
"""Model to aggregate bulk patient payments on multiple claims."""
|
|
176
170
|
|
|
177
171
|
class Meta:
|
|
178
|
-
managed = False
|
|
179
172
|
db_table = "canvas_sdk_data_quality_and_revenue_bulkpatientposting_001"
|
|
180
173
|
|
|
181
174
|
discount = models.ForeignKey(
|
|
@@ -200,7 +193,6 @@ class BaseRemittanceAdvice(AbstractBulkPosting):
|
|
|
200
193
|
"""Manual and Electronic Shared columns."""
|
|
201
194
|
|
|
202
195
|
class Meta:
|
|
203
|
-
managed = False
|
|
204
196
|
db_table = "canvas_sdk_data_quality_and_revenue_baseremittanceadvice_001"
|
|
205
197
|
|
|
206
198
|
transactor = models.ForeignKey(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
|
|
3
|
+
from canvas_sdk.v1.data.base import IdentifiableModel, Model
|
|
3
4
|
from canvas_sdk.v1.data.common import TaxIDType
|
|
4
5
|
|
|
5
6
|
|
|
@@ -52,51 +53,46 @@ class PracticeLocationPOS(models.TextChoices):
|
|
|
52
53
|
OTHER = "99", "Other Place of Service"
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
class PracticeLocation(
|
|
56
|
+
class PracticeLocation(IdentifiableModel):
|
|
56
57
|
"""PracticeLocation."""
|
|
57
58
|
|
|
58
59
|
class Meta:
|
|
59
|
-
managed = False
|
|
60
60
|
db_table = "canvas_sdk_data_api_practicelocation_001"
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
created = models.DateTimeField()
|
|
65
|
-
modified = models.DateTimeField()
|
|
62
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
63
|
+
modified = models.DateTimeField(auto_now=True)
|
|
66
64
|
organization = models.ForeignKey(
|
|
67
65
|
"v1.Organization", on_delete=models.DO_NOTHING, related_name="practice_locations", null=True
|
|
68
66
|
)
|
|
69
|
-
place_of_service_code = models.CharField(choices=PracticeLocationPOS.choices)
|
|
70
|
-
full_name = models.CharField()
|
|
71
|
-
short_name = models.CharField()
|
|
72
|
-
background_image_url = models.CharField()
|
|
73
|
-
background_gradient = models.CharField()
|
|
67
|
+
place_of_service_code = models.CharField(choices=PracticeLocationPOS.choices, max_length=2)
|
|
68
|
+
full_name = models.CharField(max_length=255)
|
|
69
|
+
short_name = models.CharField(max_length=255)
|
|
70
|
+
background_image_url = models.CharField(max_length=255)
|
|
71
|
+
background_gradient = models.CharField(max_length=255)
|
|
74
72
|
active = models.BooleanField()
|
|
75
|
-
npi_number = models.CharField()
|
|
73
|
+
npi_number = models.CharField(max_length=10)
|
|
76
74
|
bill_through_organization = models.BooleanField()
|
|
77
|
-
tax_id = models.CharField()
|
|
78
|
-
tax_id_type = models.CharField(choices=TaxIDType.choices)
|
|
79
|
-
billing_location_name = models.CharField()
|
|
80
|
-
group_npi_number = models.CharField()
|
|
81
|
-
taxonomy_number = models.CharField()
|
|
75
|
+
tax_id = models.CharField(max_length=25)
|
|
76
|
+
tax_id_type = models.CharField(choices=TaxIDType.choices, max_length=1)
|
|
77
|
+
billing_location_name = models.CharField(max_length=255)
|
|
78
|
+
group_npi_number = models.CharField(max_length=10)
|
|
79
|
+
taxonomy_number = models.CharField(max_length=10)
|
|
82
80
|
include_zz_qualifier = models.BooleanField()
|
|
83
81
|
|
|
84
82
|
def __str__(self) -> str:
|
|
85
83
|
return self.full_name
|
|
86
84
|
|
|
87
85
|
|
|
88
|
-
class PracticeLocationSetting(
|
|
86
|
+
class PracticeLocationSetting(Model):
|
|
89
87
|
"""PracticeLocationSetting."""
|
|
90
88
|
|
|
91
89
|
class Meta:
|
|
92
|
-
managed = False
|
|
93
90
|
db_table = "canvas_sdk_data_api_practicelocationsetting_001"
|
|
94
91
|
|
|
95
|
-
dbid = models.BigIntegerField(primary_key=True)
|
|
96
92
|
practice_location = models.ForeignKey(
|
|
97
93
|
"v1.PracticeLocation", on_delete=models.DO_NOTHING, related_name="settings", null=True
|
|
98
94
|
)
|
|
99
|
-
name = models.CharField()
|
|
95
|
+
name = models.CharField(max_length=100)
|
|
100
96
|
value = models.JSONField()
|
|
101
97
|
|
|
102
98
|
def __str__(self) -> str:
|
|
@@ -7,6 +7,7 @@ from canvas_sdk.v1.data.base import (
|
|
|
7
7
|
BaseQuerySet,
|
|
8
8
|
CommittableQuerySetMixin,
|
|
9
9
|
ForPatientQuerySetMixin,
|
|
10
|
+
IdentifiableModel,
|
|
10
11
|
)
|
|
11
12
|
|
|
12
13
|
|
|
@@ -34,19 +35,16 @@ class ProtocolOverrideQuerySet(BaseQuerySet, ForPatientQuerySetMixin, Committabl
|
|
|
34
35
|
ProtocolOverrideManager = BaseModelManager.from_queryset(ProtocolOverrideQuerySet)
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
class ProtocolOverride(
|
|
38
|
+
class ProtocolOverride(IdentifiableModel):
|
|
38
39
|
"""ProtocolOverride."""
|
|
39
40
|
|
|
40
41
|
class Meta:
|
|
41
|
-
managed = False
|
|
42
42
|
db_table = "canvas_sdk_data_api_protocoloverride_001"
|
|
43
43
|
|
|
44
44
|
objects = cast(ProtocolOverrideQuerySet, ProtocolOverrideManager())
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
created = models.DateTimeField()
|
|
49
|
-
modified = models.DateTimeField()
|
|
46
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
47
|
+
modified = models.DateTimeField(auto_now=True)
|
|
50
48
|
deleted = models.BooleanField()
|
|
51
49
|
committer = models.ForeignKey(
|
|
52
50
|
"v1.CanvasUser", on_delete=models.DO_NOTHING, null=True, related_name="+"
|
|
@@ -57,7 +55,7 @@ class ProtocolOverride(models.Model):
|
|
|
57
55
|
patient = models.ForeignKey(
|
|
58
56
|
"v1.Patient", on_delete=models.DO_NOTHING, related_name="protocol_overrides", null=True
|
|
59
57
|
)
|
|
60
|
-
protocol_key = models.CharField()
|
|
58
|
+
protocol_key = models.CharField(max_length=250)
|
|
61
59
|
is_adjustment = models.BooleanField()
|
|
62
60
|
reference_date = models.DateTimeField()
|
|
63
61
|
cycle_in_days = models.IntegerField()
|
|
@@ -66,11 +64,11 @@ class ProtocolOverride(models.Model):
|
|
|
66
64
|
snoozed_days = models.IntegerField()
|
|
67
65
|
# reason_id = models.BigIntegerField()
|
|
68
66
|
snooze_comment = models.TextField()
|
|
69
|
-
narrative = models.CharField()
|
|
67
|
+
narrative = models.CharField(max_length=512)
|
|
70
68
|
# note_id = models.BigIntegerField()
|
|
71
69
|
cycle_quantity = models.IntegerField()
|
|
72
|
-
cycle_unit = models.CharField(choices=IntervalUnit.choices)
|
|
73
|
-
status = models.CharField(choices=Status.choices)
|
|
70
|
+
cycle_unit = models.CharField(choices=IntervalUnit.choices, max_length=20)
|
|
71
|
+
status = models.CharField(choices=Status.choices, max_length=20)
|
|
74
72
|
|
|
75
73
|
|
|
76
74
|
__exports__ = (
|
|
@@ -9,69 +9,64 @@ from canvas_sdk.v1.data.base import (
|
|
|
9
9
|
BaseQuerySet,
|
|
10
10
|
CommittableQuerySetMixin,
|
|
11
11
|
ForPatientQuerySetMixin,
|
|
12
|
+
IdentifiableModel,
|
|
13
|
+
Model,
|
|
12
14
|
ValueSetLookupByNameQuerySet,
|
|
13
15
|
)
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
class ResponseOptionSet(
|
|
18
|
+
class ResponseOptionSet(Model):
|
|
17
19
|
"""ResponseOptionSet."""
|
|
18
20
|
|
|
19
21
|
class Meta:
|
|
20
|
-
managed = False
|
|
21
22
|
db_table = "canvas_sdk_data_api_responseoptionset_001"
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type = models.CharField()
|
|
24
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
25
|
+
modified = models.DateTimeField(auto_now=True)
|
|
26
|
+
status = models.CharField(max_length=2)
|
|
27
|
+
name = models.CharField(max_length=255)
|
|
28
|
+
code_system = models.CharField(max_length=255)
|
|
29
|
+
code = models.CharField(max_length=100)
|
|
30
|
+
type = models.CharField(max_length=4)
|
|
31
31
|
use_in_shx = models.BooleanField()
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class ResponseOption(
|
|
34
|
+
class ResponseOption(Model):
|
|
35
35
|
"""ResponseOption."""
|
|
36
36
|
|
|
37
37
|
class Meta:
|
|
38
|
-
managed = False
|
|
39
38
|
db_table = "canvas_sdk_data_api_responseoption_001"
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
value = models.CharField()
|
|
40
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
41
|
+
modified = models.DateTimeField(auto_now=True)
|
|
42
|
+
status = models.CharField(max_length=2)
|
|
43
|
+
name = models.CharField(max_length=255)
|
|
44
|
+
code = models.CharField(max_length=100)
|
|
45
|
+
code_description = models.CharField(max_length=255)
|
|
46
|
+
value = models.CharField(max_length=1000)
|
|
49
47
|
response_option_set = models.ForeignKey(
|
|
50
48
|
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="options", null=True
|
|
51
49
|
)
|
|
52
50
|
ordering = models.IntegerField()
|
|
53
51
|
|
|
54
52
|
|
|
55
|
-
class Question(
|
|
53
|
+
class Question(IdentifiableModel):
|
|
56
54
|
"""Question."""
|
|
57
55
|
|
|
58
56
|
class Meta:
|
|
59
|
-
managed = False
|
|
60
57
|
db_table = "canvas_sdk_data_api_question_001"
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
status = models.CharField()
|
|
67
|
-
name = models.CharField()
|
|
59
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
60
|
+
modified = models.DateTimeField(auto_now=True)
|
|
61
|
+
status = models.CharField(max_length=2)
|
|
62
|
+
name = models.CharField(max_length=255)
|
|
68
63
|
response_option_set = models.ForeignKey(
|
|
69
64
|
ResponseOptionSet, on_delete=models.DO_NOTHING, related_name="questions", null=True
|
|
70
65
|
)
|
|
71
66
|
acknowledge_only = models.BooleanField()
|
|
72
67
|
show_prologue = models.BooleanField()
|
|
73
|
-
code_system = models.CharField()
|
|
74
|
-
code = models.CharField()
|
|
68
|
+
code_system = models.CharField(max_length=255)
|
|
69
|
+
code = models.CharField(max_length=100)
|
|
75
70
|
|
|
76
71
|
|
|
77
72
|
class QuestionnaireValueSetLookupQuerySet(ValueSetLookupByNameQuerySet):
|
|
@@ -83,46 +78,41 @@ class QuestionnaireValueSetLookupQuerySet(ValueSetLookupByNameQuerySet):
|
|
|
83
78
|
return Q(code_system=system, code__in=codes)
|
|
84
79
|
|
|
85
80
|
|
|
86
|
-
class Questionnaire(
|
|
81
|
+
class Questionnaire(IdentifiableModel):
|
|
87
82
|
"""Questionnaire."""
|
|
88
83
|
|
|
89
84
|
class Meta:
|
|
90
|
-
managed = False
|
|
91
85
|
db_table = "canvas_sdk_data_api_questionnaire_001"
|
|
92
86
|
|
|
93
87
|
objects = models.Manager.from_queryset(QuestionnaireValueSetLookupQuerySet)()
|
|
94
88
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
status = models.CharField()
|
|
100
|
-
name = models.CharField()
|
|
89
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
90
|
+
modified = models.DateTimeField(auto_now=True)
|
|
91
|
+
status = models.CharField(max_length=2)
|
|
92
|
+
name = models.CharField(max_length=255)
|
|
101
93
|
expected_completion_time = models.FloatField()
|
|
102
94
|
can_originate_in_charting = models.BooleanField()
|
|
103
|
-
use_case_in_charting = models.CharField()
|
|
95
|
+
use_case_in_charting = models.CharField(max_length=4)
|
|
104
96
|
scoring_function_name = models.TextField()
|
|
105
|
-
scoring_code_system = models.CharField()
|
|
106
|
-
scoring_code = models.CharField()
|
|
107
|
-
code_system = models.CharField()
|
|
108
|
-
code = models.CharField()
|
|
109
|
-
search_tags = models.CharField()
|
|
97
|
+
scoring_code_system = models.CharField(max_length=255)
|
|
98
|
+
scoring_code = models.CharField(max_length=100)
|
|
99
|
+
code_system = models.CharField(max_length=255)
|
|
100
|
+
code = models.CharField(max_length=100)
|
|
101
|
+
search_tags = models.CharField(max_length=500)
|
|
110
102
|
questions = models.ManyToManyField(Question, through="v1.QuestionnaireQuestionMap")
|
|
111
103
|
use_in_shx = models.BooleanField()
|
|
112
104
|
carry_forward = models.TextField()
|
|
113
105
|
|
|
114
106
|
|
|
115
|
-
class QuestionnaireQuestionMap(
|
|
107
|
+
class QuestionnaireQuestionMap(Model):
|
|
116
108
|
"""QuestionnaireQuestionMap."""
|
|
117
109
|
|
|
118
110
|
class Meta:
|
|
119
|
-
managed = False
|
|
120
111
|
db_table = "canvas_sdk_data_api_questionnairequestionmap_001"
|
|
121
112
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
status = models.CharField()
|
|
113
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
114
|
+
modified = models.DateTimeField(auto_now=True)
|
|
115
|
+
status = models.CharField(max_length=2)
|
|
126
116
|
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.DO_NOTHING, null=True)
|
|
127
117
|
question = models.ForeignKey(Question, on_delete=models.DO_NOTHING, null=True)
|
|
128
118
|
|
|
@@ -136,17 +126,14 @@ class InterviewQuerySet(BaseQuerySet, ForPatientQuerySetMixin, CommittableQueryS
|
|
|
136
126
|
InterviewManager = BaseModelManager.from_queryset(InterviewQuerySet)
|
|
137
127
|
|
|
138
128
|
|
|
139
|
-
class Interview(
|
|
129
|
+
class Interview(IdentifiableModel):
|
|
140
130
|
"""Interview."""
|
|
141
131
|
|
|
142
132
|
class Meta:
|
|
143
|
-
managed = False
|
|
144
133
|
db_table = "canvas_sdk_data_api_interview_001"
|
|
145
134
|
|
|
146
135
|
objects = cast(InterviewQuerySet, InterviewManager())
|
|
147
136
|
|
|
148
|
-
id = models.UUIDField()
|
|
149
|
-
dbid = models.BigIntegerField(primary_key=True)
|
|
150
137
|
deleted = models.BooleanField()
|
|
151
138
|
committer = models.ForeignKey(
|
|
152
139
|
"v1.CanvasUser", on_delete=models.DO_NOTHING, null=True, related_name="+"
|
|
@@ -154,10 +141,10 @@ class Interview(models.Model):
|
|
|
154
141
|
entered_in_error = models.ForeignKey(
|
|
155
142
|
"v1.CanvasUser", on_delete=models.DO_NOTHING, null=True, related_name="+"
|
|
156
143
|
)
|
|
157
|
-
status = models.CharField()
|
|
158
|
-
name = models.CharField()
|
|
144
|
+
status = models.CharField(max_length=2)
|
|
145
|
+
name = models.CharField(max_length=255)
|
|
159
146
|
language_id = models.BigIntegerField()
|
|
160
|
-
use_case_in_charting = models.CharField()
|
|
147
|
+
use_case_in_charting = models.CharField(max_length=4)
|
|
161
148
|
patient = models.ForeignKey(
|
|
162
149
|
"v1.Patient", on_delete=models.DO_NOTHING, related_name="interviews", null=True
|
|
163
150
|
)
|
|
@@ -167,37 +154,33 @@ class Interview(models.Model):
|
|
|
167
154
|
Questionnaire,
|
|
168
155
|
through="v1.InterviewQuestionnaireMap",
|
|
169
156
|
)
|
|
170
|
-
progress_status = models.CharField()
|
|
171
|
-
created = models.DateTimeField()
|
|
172
|
-
modified = models.DateTimeField()
|
|
157
|
+
progress_status = models.CharField(max_length=3)
|
|
158
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
159
|
+
modified = models.DateTimeField(auto_now=True)
|
|
173
160
|
|
|
174
161
|
|
|
175
|
-
class InterviewQuestionnaireMap(
|
|
162
|
+
class InterviewQuestionnaireMap(Model):
|
|
176
163
|
"""InterviewQuestionnaireMap."""
|
|
177
164
|
|
|
178
165
|
class Meta:
|
|
179
|
-
managed = False
|
|
180
166
|
db_table = "canvas_sdk_data_api_interviewquestionnairemap_001"
|
|
181
167
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
status = models.CharField()
|
|
168
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
169
|
+
modified = models.DateTimeField(auto_now=True)
|
|
170
|
+
status = models.CharField(max_length=2)
|
|
186
171
|
interview = models.ForeignKey(Interview, on_delete=models.DO_NOTHING, null=True)
|
|
187
172
|
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.DO_NOTHING, null=True)
|
|
188
173
|
|
|
189
174
|
|
|
190
|
-
class InterviewQuestionResponse(
|
|
175
|
+
class InterviewQuestionResponse(Model):
|
|
191
176
|
"""InterviewQuestionResponse."""
|
|
192
177
|
|
|
193
178
|
class Meta:
|
|
194
|
-
managed = False
|
|
195
179
|
db_table = "canvas_sdk_data_api_interviewquestionresponse_001"
|
|
196
180
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
status = models.CharField()
|
|
181
|
+
created = models.DateTimeField(auto_now_add=True)
|
|
182
|
+
modified = models.DateTimeField(auto_now=True)
|
|
183
|
+
status = models.CharField(max_length=2)
|
|
201
184
|
interview = models.ForeignKey(
|
|
202
185
|
Interview, on_delete=models.DO_NOTHING, related_name="interview_responses", null=True
|
|
203
186
|
)
|
|
@@ -213,7 +196,7 @@ class InterviewQuestionResponse(models.Model):
|
|
|
213
196
|
response_option_value = models.TextField()
|
|
214
197
|
questionnaire_state = models.TextField()
|
|
215
198
|
interview_state = models.TextField()
|
|
216
|
-
comment = models.CharField()
|
|
199
|
+
comment = models.CharField(max_length=1024)
|
|
217
200
|
|
|
218
201
|
|
|
219
202
|
__exports__ = (
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
from django.contrib.postgres.fields import ArrayField
|
|
2
2
|
from django.db import models
|
|
3
3
|
|
|
4
|
+
from canvas_sdk.v1.data.base import IdentifiableModel
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
class ReasonForVisitSettingCoding(IdentifiableModel):
|
|
6
8
|
"""ReasonForVisitSettingCoding."""
|
|
7
9
|
|
|
8
10
|
class Meta:
|
|
9
|
-
managed = False
|
|
10
11
|
db_table = "canvas_sdk_data_api_reasonforvisitsettingcoding_001"
|
|
11
12
|
|
|
12
13
|
objects: models.Manager["ReasonForVisitSettingCoding"]
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
display = models.CharField()
|
|
19
|
-
system = models.CharField()
|
|
20
|
-
version = models.CharField()
|
|
15
|
+
code = models.CharField(max_length=255)
|
|
16
|
+
display = models.CharField(max_length=1000)
|
|
17
|
+
system = models.CharField(max_length=255)
|
|
18
|
+
version = models.CharField(max_length=255)
|
|
21
19
|
|
|
22
20
|
duration = ArrayField(models.DurationField())
|
|
23
21
|
|