clinicedc 2.0.12__py3-none-any.whl → 2.0.14__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 clinicedc might be problematic. Click here for more details.

Files changed (101) hide show
  1. {clinicedc-2.0.12.dist-info → clinicedc-2.0.14.dist-info}/METADATA +2 -2
  2. {clinicedc-2.0.12.dist-info → clinicedc-2.0.14.dist-info}/RECORD +101 -24
  3. edc_action_item/migrations/0017_auto_20190305_0123.py +1 -1
  4. edc_action_item/migrations/0030_edcpermissions.py +1 -1
  5. edc_adverse_event/migrations/0001_initial.py +1 -1
  6. edc_adverse_event/migrations/0002_auto_20190802_0059.py +1 -1
  7. edc_adverse_event/migrations/0008_auto_20220825_0451.py +1 -1
  8. edc_adverse_event/migrations/0009_auto_20220907_0157.py +1 -1
  9. edc_adverse_event/model_mixins/hospitaization/hospitalization_model_mixin.py +1 -3
  10. edc_analytics/__init__.py +3 -0
  11. edc_analytics/apps.py +8 -0
  12. edc_analytics/constants.py +26 -0
  13. edc_analytics/custom_tables/__init__.py +11 -0
  14. edc_analytics/custom_tables/age.py +72 -0
  15. edc_analytics/custom_tables/art.py +88 -0
  16. edc_analytics/custom_tables/bmi.py +125 -0
  17. edc_analytics/custom_tables/bp.py +103 -0
  18. edc_analytics/custom_tables/fasting.py +126 -0
  19. edc_analytics/custom_tables/fbg.py +98 -0
  20. edc_analytics/custom_tables/fbg_ogtt.py +384 -0
  21. edc_analytics/custom_tables/gender.py +12 -0
  22. edc_analytics/custom_tables/hba1c.py +87 -0
  23. edc_analytics/custom_tables/ogtt.py +95 -0
  24. edc_analytics/custom_tables/waist.py +105 -0
  25. edc_analytics/data.py +36 -0
  26. edc_analytics/row/__init__.py +4 -0
  27. edc_analytics/row/row_definition.py +43 -0
  28. edc_analytics/row/row_definitions.py +32 -0
  29. edc_analytics/row/row_statistics.py +88 -0
  30. edc_analytics/row/row_statistics_with_gender.py +115 -0
  31. edc_analytics/stata/__init__.py +1 -0
  32. edc_analytics/stata/get_stata_labels_from_model.py +44 -0
  33. edc_analytics/styler.py +93 -0
  34. edc_analytics/table.py +108 -0
  35. edc_analytics/urls.py +6 -0
  36. edc_appointment/migrations/0018_auto_20190305_0123.py +1 -1
  37. edc_auth/migrations/0001_squashed_0033_alter_userprofile_is_multisite_viewer.py +1 -1
  38. edc_auth/migrations/0012_auto_20191026_0034.py +1 -1
  39. edc_auth/migrations/0013_auto_20191026_0055.py +1 -1
  40. edc_auth/migrations/0025_permissions.py +1 -1
  41. edc_consent/migrations/0001_initial.py +1 -1
  42. edc_dashboard/migrations/0001_initial.py +1 -1
  43. edc_data_manager/migrations/0001_initial.py +1 -1
  44. edc_data_manager/migrations/0025_edcpermissions.py +1 -1
  45. edc_dx/__init__.py +6 -0
  46. edc_dx/apps.py +5 -0
  47. edc_dx/diagnoses.py +250 -0
  48. edc_dx/form_validators/__init__.py +2 -0
  49. edc_dx/form_validators/diagnosis_form_validator_mixin.py +54 -0
  50. edc_dx/form_validators/result_form_validator_mixin.py +65 -0
  51. edc_dx/utils.py +42 -0
  52. edc_dx_review/__init__.py +0 -0
  53. edc_dx_review/apps.py +5 -0
  54. edc_dx_review/auth_objects.py +13 -0
  55. edc_dx_review/auths.py +12 -0
  56. edc_dx_review/choices.py +24 -0
  57. edc_dx_review/constants.py +7 -0
  58. edc_dx_review/fieldsets.py +47 -0
  59. edc_dx_review/form_mixins/__init__.py +3 -0
  60. edc_dx_review/form_mixins/clinical_review_baseline_required_form_mixin.py +25 -0
  61. edc_dx_review/form_validator_mixins/__init__.py +6 -0
  62. edc_dx_review/form_validator_mixins/clinical_review_baseline_form_validator_mixin.py +7 -0
  63. edc_dx_review/form_validator_mixins/clinical_review_followup_form_validator_mixin.py +25 -0
  64. edc_dx_review/list_data.py +19 -0
  65. edc_dx_review/medical_date.py +195 -0
  66. edc_dx_review/migrations/0001_initial.py +307 -0
  67. edc_dx_review/migrations/0002_diagnosislocations_extra_value_and_more.py +32 -0
  68. edc_dx_review/migrations/0003_alter_diagnosislocations_options_and_more.py +148 -0
  69. edc_dx_review/migrations/0004_remove_diagnosislocations_edc_dx_revi_name_a39b40_idx_and_more.py +20 -0
  70. edc_dx_review/migrations/__init__.py +0 -0
  71. edc_dx_review/model_mixins/__init__.py +20 -0
  72. edc_dx_review/model_mixins/clinical_review_baseline_model_mixin.py +25 -0
  73. edc_dx_review/model_mixins/clinical_review_followup/__init__.py +5 -0
  74. edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_chol_model_mixin.py +54 -0
  75. edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_dm_model_mixin.py +54 -0
  76. edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_hiv_model_mixin.py +54 -0
  77. edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_htn_model_mixin.py +56 -0
  78. edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_model_mixin.py +25 -0
  79. edc_dx_review/model_mixins/dx_location_model_mixin.py +17 -0
  80. edc_dx_review/model_mixins/factory/__init__.py +4 -0
  81. edc_dx_review/model_mixins/factory/baseline_review_model_mixin_factory.py +55 -0
  82. edc_dx_review/model_mixins/factory/calculate_date.py +43 -0
  83. edc_dx_review/model_mixins/factory/dx_initial_review_model_mixin_factory.py +97 -0
  84. edc_dx_review/model_mixins/factory/followup_review_model_mixin_factory.py +39 -0
  85. edc_dx_review/model_mixins/factory/rx_initial_review_model_mixin_factory.py +69 -0
  86. edc_dx_review/model_mixins/followup_review/__init__.py +2 -0
  87. edc_dx_review/model_mixins/followup_review/followup_review_model_mixin.py +22 -0
  88. edc_dx_review/model_mixins/followup_review/hiv_followup_review_model_mixin.py +32 -0
  89. edc_dx_review/model_mixins/initial_review/__init__.py +6 -0
  90. edc_dx_review/model_mixins/initial_review/chol_initial_review_model_mixin.py +34 -0
  91. edc_dx_review/model_mixins/initial_review/hiv_initial_model_mixins.py +119 -0
  92. edc_dx_review/model_mixins/initial_review/ncd_initial_review_model_mixin.py +42 -0
  93. edc_dx_review/models.py +20 -0
  94. edc_dx_review/radio_fields.py +30 -0
  95. edc_dx_review/utils.py +220 -0
  96. edc_export/migrations/0004_auto_20190305_0123.py +1 -1
  97. edc_export/migrations/0013_edcpermissions.py +1 -1
  98. edc_facility/migrations/0005_healthfacility_healthfacilitytypes_and_more.py +1 -1
  99. edc_vitals/model_mixins/blood_pressure_model_mixin.py +1 -0
  100. {clinicedc-2.0.12.dist-info → clinicedc-2.0.14.dist-info}/WHEEL +0 -0
  101. {clinicedc-2.0.12.dist-info → clinicedc-2.0.14.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,195 @@
1
+ from __future__ import annotations
2
+
3
+ from datetime import date, datetime
4
+
5
+ from django.conf import settings
6
+ from django.core.exceptions import ValidationError
7
+ from edc_constants.constants import GT, GTE, LT, LTE
8
+ from edc_model import estimated_date_from_ago
9
+ from edc_utils import convert_php_dateformat
10
+
11
+ FAILED_COMPARISON = "FAILED_COMPARISON"
12
+ BEFORE_AFTER_BOTH_TRUE = "BEFORE_AFTER_BOTH_TRUE"
13
+ BEFORE_AFTER_BOTH_FALSE = "BEFORE_AFTER_BOTH_FALSE"
14
+ MISSING_REPORT_DATETIME = "MISSING_REPORT_DATETIME"
15
+ MISSING_DATE_AND_AGO = "MISSING_DATE_AND_AGO"
16
+ DATE_AND_AGO_CONFLICT = "DATE_AND_AGO_CONFLICT"
17
+
18
+
19
+ class MedicalDateError(ValidationError):
20
+ def __init__(self, message: dict, code: str = None, params=None):
21
+ self.code = code
22
+ super().__init__(message, code, params)
23
+
24
+ @property
25
+ def message_dict(self):
26
+ getattr(self, "error_dict")
27
+ return {k: v[0] for k, v in dict(self).items()}
28
+
29
+
30
+ class MedicalDate(date):
31
+ _after_reference: bool = None
32
+ _before_reference: bool = None
33
+ _cleaned_data: dict = None
34
+ _date_field: str = None
35
+ _ago_field: str = None
36
+ _field: str = None
37
+ _inclusive: bool = None
38
+ _label: str = None
39
+ _op: str = None
40
+ _reference_date: date | datetime | MedicalDate = None
41
+ _value: date = None
42
+ _word: str = None
43
+
44
+ def __new__(
45
+ cls,
46
+ date_field: str,
47
+ ago_field: str,
48
+ cleaned_data: dict,
49
+ reference_date: date | datetime | MedicalDate,
50
+ reference_is_none_msg: str,
51
+ before_reference: bool | None = None,
52
+ after_reference: bool | None = None,
53
+ inclusive: bool | None = None,
54
+ label: str | None = None,
55
+ ):
56
+ cls._after_reference = after_reference
57
+ cls._before_reference = before_reference
58
+ cls._cleaned_data = cleaned_data
59
+ cls._date_field = date_field
60
+ cls._ago_field = ago_field
61
+ cls._inclusive = inclusive
62
+ cls._label = label
63
+
64
+ cls._report_date_or_raise()
65
+ cls._one_date_or_raise()
66
+ cls._date_or_raise()
67
+ try:
68
+ cls._value = cls._cleaned_data.get(cls._date_field).date()
69
+ except AttributeError:
70
+ cls._value = cls._cleaned_data.get(cls._date_field)
71
+ if cls._value:
72
+ cls._field = cls._date_field
73
+ else:
74
+ cls._field = cls._ago_field
75
+ cls._value = estimated_date_from_ago(
76
+ cleaned_data=cls._cleaned_data, ago_field=cls._ago_field
77
+ )
78
+ try:
79
+ cls._reference_date = reference_date.date()
80
+ except AttributeError:
81
+ cls._reference_date = reference_date
82
+ cls._op, cls._word = cls._get_operator()
83
+ if not cls._compare_date_and_reference():
84
+ cls._raise_on_failed_comparison()
85
+ if (
86
+ cls._cleaned_data.get("report_datetime").date() != cls._reference_date
87
+ and cls._value > cls._cleaned_data.get("report_datetime").date()
88
+ ):
89
+ raise MedicalDateError(
90
+ {cls._field: "Cannot be after report date"},
91
+ code=FAILED_COMPARISON,
92
+ )
93
+ return super().__new__(
94
+ cls, year=cls._value.year, month=cls._value.month, day=cls._value.day
95
+ )
96
+
97
+ @classmethod
98
+ def _report_date_or_raise(cls):
99
+ if not cls._cleaned_data.get("report_datetime"):
100
+ raise MedicalDateError(
101
+ {"__all__": "Complete the report date."}, code=MISSING_REPORT_DATETIME
102
+ )
103
+
104
+ @classmethod
105
+ def _one_date_or_raise(cls):
106
+ if cls._cleaned_data.get(cls._date_field) and cls._cleaned_data.get(cls._ago_field):
107
+ raise MedicalDateError(
108
+ {
109
+ cls._ago_field: (
110
+ "Date conflict. Do not provide a response "
111
+ f"here if {cls._label} date is available."
112
+ )
113
+ },
114
+ DATE_AND_AGO_CONFLICT,
115
+ )
116
+
117
+ @classmethod
118
+ def _date_or_raise(cls):
119
+ if not cls._cleaned_data.get(cls._date_field) and not cls._cleaned_data.get(
120
+ cls._ago_field
121
+ ):
122
+ raise MedicalDateError(
123
+ {"__all__": f"Complete the {cls._label or '????'} date."},
124
+ code=MISSING_DATE_AND_AGO,
125
+ )
126
+
127
+ @classmethod
128
+ def _get_operator(cls):
129
+ msg = f"Is `{cls._field}` supposed to be before or after `{cls._label}` date?"
130
+ if cls._before_reference and cls._after_reference:
131
+ raise MedicalDateError({"__all__": msg}, code=BEFORE_AFTER_BOTH_TRUE)
132
+ if cls._before_reference:
133
+ op = LTE if cls._inclusive else LT
134
+ word = "before"
135
+ elif cls._after_reference:
136
+ op = GTE if cls._inclusive else GT
137
+ word = "after"
138
+ else:
139
+ raise MedicalDateError({"__all__": msg}, code=BEFORE_AFTER_BOTH_FALSE)
140
+ return op, word
141
+
142
+ @classmethod
143
+ def _compare_date_and_reference(cls) -> bool:
144
+ value = None
145
+ if cls._op == LT:
146
+ value = cls._value < cls._reference_date
147
+ elif cls._op == LTE:
148
+ value = cls._value <= cls._reference_date
149
+ elif cls._op == GT:
150
+ value = cls._value > cls._reference_date
151
+ elif cls._op == GTE:
152
+ value = cls._value >= cls._reference_date
153
+ return value
154
+
155
+ @classmethod
156
+ def _raise_on_failed_comparison(cls):
157
+ formatted_ref = cls._reference_date.strftime(
158
+ convert_php_dateformat(settings.DATE_FORMAT)
159
+ )
160
+ formatted_dte = cls._value.strftime(convert_php_dateformat(settings.DATE_FORMAT))
161
+ inclusive_str = " on or " if cls._inclusive else " "
162
+ raise MedicalDateError(
163
+ {
164
+ cls._field: (
165
+ f"{cls._label.title()} date must be{inclusive_str}{cls._word} "
166
+ f"`{formatted_ref}` [{cls._op}]. Got {formatted_dte}"
167
+ )
168
+ },
169
+ code=FAILED_COMPARISON,
170
+ )
171
+
172
+
173
+ class DxDate(MedicalDate):
174
+ def __new__(cls, cleaned_data: dict, **kwargs) -> DxDate:
175
+ defaults = dict(
176
+ before_reference=True,
177
+ reference_date=cleaned_data.get("report_datetime"),
178
+ reference_is_none_msg="Complete the report date first.",
179
+ inclusive=True,
180
+ label="diagnosis",
181
+ )
182
+ defaults.update(**kwargs)
183
+ return super().__new__(cls, "dx_date", "dx_ago", cleaned_data, **defaults)
184
+
185
+
186
+ class RxDate(MedicalDate):
187
+ def __new__(cls, cleaned_data: dict, reference_date: date | DxDate, **kwargs) -> RxDate:
188
+ defaults = dict(
189
+ after_reference=True,
190
+ reference_is_none_msg="Complete the diagnosis date.",
191
+ inclusive=True,
192
+ label="treatment",
193
+ )
194
+ defaults.update(reference_date=reference_date, **kwargs)
195
+ return super().__new__(cls, "rx_init_date", "rx_init_ago", cleaned_data, **defaults)
@@ -0,0 +1,307 @@
1
+ # Generated by Django 4.1.2 on 2022-11-29 02:24
2
+
3
+ import uuid
4
+
5
+ import django.db.models.deletion
6
+ import simple_history.models
7
+ from django.conf import settings
8
+ from django.db import migrations, models
9
+
10
+
11
+ class Migration(migrations.Migration):
12
+ initial = True
13
+
14
+ dependencies = [
15
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
16
+ ]
17
+
18
+ operations = [
19
+ migrations.CreateModel(
20
+ name="DiagnosisLocations",
21
+ fields=[
22
+ (
23
+ "name",
24
+ models.CharField(
25
+ db_index=True,
26
+ help_text="This is the stored value, required",
27
+ max_length=250,
28
+ unique=True,
29
+ verbose_name="Stored value",
30
+ ),
31
+ ),
32
+ (
33
+ "plural_name",
34
+ models.CharField(max_length=250, null=True, verbose_name="Plural name"),
35
+ ),
36
+ (
37
+ "display_name",
38
+ models.CharField(
39
+ db_index=True,
40
+ help_text="(suggest 40 characters max.)",
41
+ max_length=250,
42
+ unique=True,
43
+ verbose_name="Name",
44
+ ),
45
+ ),
46
+ (
47
+ "display_index",
48
+ models.IntegerField(
49
+ db_index=True,
50
+ default=0,
51
+ help_text="Index to control display order if not alphabetical, not required",
52
+ verbose_name="display index",
53
+ ),
54
+ ),
55
+ (
56
+ "field_name",
57
+ models.CharField(
58
+ blank=True,
59
+ editable=False,
60
+ help_text="Not required",
61
+ max_length=25,
62
+ null=True,
63
+ ),
64
+ ),
65
+ ("version", models.CharField(default="1.0", editable=False, max_length=35)),
66
+ ("id", models.AutoField(primary_key=True, serialize=False)),
67
+ ],
68
+ options={
69
+ "verbose_name": "Diagnosis Locations",
70
+ "verbose_name_plural": "Diagnosis Locations",
71
+ "ordering": ["display_index", "display_name"],
72
+ "abstract": False,
73
+ "default_permissions": ("add", "change", "delete", "view", "export", "import"),
74
+ },
75
+ ),
76
+ migrations.CreateModel(
77
+ name="HistoricalDiagnosisLocations",
78
+ fields=[
79
+ (
80
+ "name",
81
+ models.CharField(
82
+ db_index=True,
83
+ help_text="This is the stored value, required",
84
+ max_length=250,
85
+ verbose_name="Stored value",
86
+ ),
87
+ ),
88
+ (
89
+ "plural_name",
90
+ models.CharField(max_length=250, null=True, verbose_name="Plural name"),
91
+ ),
92
+ (
93
+ "display_name",
94
+ models.CharField(
95
+ db_index=True,
96
+ help_text="(suggest 40 characters max.)",
97
+ max_length=250,
98
+ verbose_name="Name",
99
+ ),
100
+ ),
101
+ (
102
+ "display_index",
103
+ models.IntegerField(
104
+ db_index=True,
105
+ default=0,
106
+ help_text="Index to control display order if not alphabetical, not required",
107
+ verbose_name="display index",
108
+ ),
109
+ ),
110
+ (
111
+ "field_name",
112
+ models.CharField(
113
+ blank=True,
114
+ editable=False,
115
+ help_text="Not required",
116
+ max_length=25,
117
+ null=True,
118
+ ),
119
+ ),
120
+ ("version", models.CharField(default="1.0", editable=False, max_length=35)),
121
+ ("id", models.IntegerField(blank=True, db_index=True)),
122
+ (
123
+ "history_id",
124
+ models.UUIDField(
125
+ default=uuid.uuid4, editable=False, primary_key=True, serialize=False
126
+ ),
127
+ ),
128
+ ("history_date", models.DateTimeField(db_index=True)),
129
+ ("history_change_reason", models.CharField(max_length=100, null=True)),
130
+ (
131
+ "history_type",
132
+ models.CharField(
133
+ choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")],
134
+ max_length=1,
135
+ ),
136
+ ),
137
+ ],
138
+ options={
139
+ "verbose_name": "historical Diagnosis Locations",
140
+ "verbose_name_plural": "historical Diagnosis Locations",
141
+ "ordering": ("-history_date", "-history_id"),
142
+ "get_latest_by": ("history_date", "history_id"),
143
+ },
144
+ bases=(simple_history.models.HistoricalChanges, models.Model),
145
+ ),
146
+ migrations.CreateModel(
147
+ name="HistoricalReasonsForTesting",
148
+ fields=[
149
+ (
150
+ "name",
151
+ models.CharField(
152
+ db_index=True,
153
+ help_text="This is the stored value, required",
154
+ max_length=250,
155
+ verbose_name="Stored value",
156
+ ),
157
+ ),
158
+ (
159
+ "plural_name",
160
+ models.CharField(max_length=250, null=True, verbose_name="Plural name"),
161
+ ),
162
+ (
163
+ "display_name",
164
+ models.CharField(
165
+ db_index=True,
166
+ help_text="(suggest 40 characters max.)",
167
+ max_length=250,
168
+ verbose_name="Name",
169
+ ),
170
+ ),
171
+ (
172
+ "display_index",
173
+ models.IntegerField(
174
+ db_index=True,
175
+ default=0,
176
+ help_text="Index to control display order if not alphabetical, not required",
177
+ verbose_name="display index",
178
+ ),
179
+ ),
180
+ (
181
+ "field_name",
182
+ models.CharField(
183
+ blank=True,
184
+ editable=False,
185
+ help_text="Not required",
186
+ max_length=25,
187
+ null=True,
188
+ ),
189
+ ),
190
+ ("version", models.CharField(default="1.0", editable=False, max_length=35)),
191
+ ("id", models.IntegerField(blank=True, db_index=True)),
192
+ (
193
+ "history_id",
194
+ models.UUIDField(
195
+ default=uuid.uuid4, editable=False, primary_key=True, serialize=False
196
+ ),
197
+ ),
198
+ ("history_date", models.DateTimeField(db_index=True)),
199
+ ("history_change_reason", models.CharField(max_length=100, null=True)),
200
+ (
201
+ "history_type",
202
+ models.CharField(
203
+ choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")],
204
+ max_length=1,
205
+ ),
206
+ ),
207
+ ],
208
+ options={
209
+ "verbose_name": "historical Reasons for Testing",
210
+ "verbose_name_plural": "historical Reasons for Testing",
211
+ "ordering": ("-history_date", "-history_id"),
212
+ "get_latest_by": ("history_date", "history_id"),
213
+ },
214
+ bases=(simple_history.models.HistoricalChanges, models.Model),
215
+ ),
216
+ migrations.CreateModel(
217
+ name="ReasonsForTesting",
218
+ fields=[
219
+ (
220
+ "name",
221
+ models.CharField(
222
+ db_index=True,
223
+ help_text="This is the stored value, required",
224
+ max_length=250,
225
+ unique=True,
226
+ verbose_name="Stored value",
227
+ ),
228
+ ),
229
+ (
230
+ "plural_name",
231
+ models.CharField(max_length=250, null=True, verbose_name="Plural name"),
232
+ ),
233
+ (
234
+ "display_name",
235
+ models.CharField(
236
+ db_index=True,
237
+ help_text="(suggest 40 characters max.)",
238
+ max_length=250,
239
+ unique=True,
240
+ verbose_name="Name",
241
+ ),
242
+ ),
243
+ (
244
+ "display_index",
245
+ models.IntegerField(
246
+ db_index=True,
247
+ default=0,
248
+ help_text="Index to control display order if not alphabetical, not required",
249
+ verbose_name="display index",
250
+ ),
251
+ ),
252
+ (
253
+ "field_name",
254
+ models.CharField(
255
+ blank=True,
256
+ editable=False,
257
+ help_text="Not required",
258
+ max_length=25,
259
+ null=True,
260
+ ),
261
+ ),
262
+ ("version", models.CharField(default="1.0", editable=False, max_length=35)),
263
+ ("id", models.AutoField(primary_key=True, serialize=False)),
264
+ ],
265
+ options={
266
+ "verbose_name": "Reasons for Testing",
267
+ "verbose_name_plural": "Reasons for Testing",
268
+ "ordering": ["display_index", "display_name"],
269
+ "abstract": False,
270
+ "default_permissions": ("add", "change", "delete", "view", "export", "import"),
271
+ },
272
+ ),
273
+ migrations.AddIndex(
274
+ model_name="reasonsfortesting",
275
+ index=models.Index(
276
+ fields=["id", "display_name", "display_index"],
277
+ name="edc_dx_revi_id_9cf36d_idx",
278
+ ),
279
+ ),
280
+ migrations.AddField(
281
+ model_name="historicalreasonsfortesting",
282
+ name="history_user",
283
+ field=models.ForeignKey(
284
+ null=True,
285
+ on_delete=django.db.models.deletion.SET_NULL,
286
+ related_name="+",
287
+ to=settings.AUTH_USER_MODEL,
288
+ ),
289
+ ),
290
+ migrations.AddField(
291
+ model_name="historicaldiagnosislocations",
292
+ name="history_user",
293
+ field=models.ForeignKey(
294
+ null=True,
295
+ on_delete=django.db.models.deletion.SET_NULL,
296
+ related_name="+",
297
+ to=settings.AUTH_USER_MODEL,
298
+ ),
299
+ ),
300
+ migrations.AddIndex(
301
+ model_name="diagnosislocations",
302
+ index=models.Index(
303
+ fields=["id", "display_name", "display_index"],
304
+ name="edc_dx_revi_id_ab6550_idx",
305
+ ),
306
+ ),
307
+ ]
@@ -0,0 +1,32 @@
1
+ # Generated by Django 4.2.3 on 2023-08-02 23:56
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("edc_dx_review", "0001_initial"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AddField(
13
+ model_name="diagnosislocations",
14
+ name="extra_value",
15
+ field=models.CharField(max_length=250, null=True),
16
+ ),
17
+ migrations.AddField(
18
+ model_name="historicaldiagnosislocations",
19
+ name="extra_value",
20
+ field=models.CharField(max_length=250, null=True),
21
+ ),
22
+ migrations.AddField(
23
+ model_name="historicalreasonsfortesting",
24
+ name="extra_value",
25
+ field=models.CharField(max_length=250, null=True),
26
+ ),
27
+ migrations.AddField(
28
+ model_name="reasonsfortesting",
29
+ name="extra_value",
30
+ field=models.CharField(max_length=250, null=True),
31
+ ),
32
+ ]
@@ -0,0 +1,148 @@
1
+ # Generated by Django 4.2.7 on 2023-12-03 00:22
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("edc_dx_review", "0002_diagnosislocations_extra_value_and_more"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterModelOptions(
13
+ name="diagnosislocations",
14
+ options={
15
+ "default_permissions": (
16
+ "add",
17
+ "change",
18
+ "delete",
19
+ "view",
20
+ "export",
21
+ "import",
22
+ ),
23
+ "verbose_name": "Diagnosis Locations",
24
+ "verbose_name_plural": "Diagnosis Locations",
25
+ },
26
+ ),
27
+ migrations.AlterModelOptions(
28
+ name="reasonsfortesting",
29
+ options={
30
+ "default_permissions": (
31
+ "add",
32
+ "change",
33
+ "delete",
34
+ "view",
35
+ "export",
36
+ "import",
37
+ ),
38
+ "verbose_name": "Reasons for Testing",
39
+ "verbose_name_plural": "Reasons for Testing",
40
+ },
41
+ ),
42
+ migrations.RemoveIndex(
43
+ model_name="diagnosislocations",
44
+ name="edc_dx_revi_id_ab6550_idx",
45
+ ),
46
+ migrations.RemoveIndex(
47
+ model_name="reasonsfortesting",
48
+ name="edc_dx_revi_id_9cf36d_idx",
49
+ ),
50
+ migrations.AlterField(
51
+ model_name="diagnosislocations",
52
+ name="display_index",
53
+ field=models.IntegerField(
54
+ default=0,
55
+ help_text="Index to control display order if not alphabetical, not required",
56
+ verbose_name="display index",
57
+ ),
58
+ ),
59
+ migrations.AlterField(
60
+ model_name="diagnosislocations",
61
+ name="display_name",
62
+ field=models.CharField(
63
+ help_text="(suggest 40 characters max.)",
64
+ max_length=250,
65
+ unique=True,
66
+ verbose_name="Name",
67
+ ),
68
+ ),
69
+ migrations.AlterField(
70
+ model_name="diagnosislocations",
71
+ name="name",
72
+ field=models.CharField(
73
+ help_text="This is the stored value, required",
74
+ max_length=250,
75
+ unique=True,
76
+ verbose_name="Stored value",
77
+ ),
78
+ ),
79
+ migrations.AlterField(
80
+ model_name="historicaldiagnosislocations",
81
+ name="display_index",
82
+ field=models.IntegerField(
83
+ default=0,
84
+ help_text="Index to control display order if not alphabetical, not required",
85
+ verbose_name="display index",
86
+ ),
87
+ ),
88
+ migrations.AlterField(
89
+ model_name="historicalreasonsfortesting",
90
+ name="display_index",
91
+ field=models.IntegerField(
92
+ default=0,
93
+ help_text="Index to control display order if not alphabetical, not required",
94
+ verbose_name="display index",
95
+ ),
96
+ ),
97
+ migrations.AlterField(
98
+ model_name="reasonsfortesting",
99
+ name="display_index",
100
+ field=models.IntegerField(
101
+ default=0,
102
+ help_text="Index to control display order if not alphabetical, not required",
103
+ verbose_name="display index",
104
+ ),
105
+ ),
106
+ migrations.AlterField(
107
+ model_name="reasonsfortesting",
108
+ name="display_name",
109
+ field=models.CharField(
110
+ help_text="(suggest 40 characters max.)",
111
+ max_length=250,
112
+ unique=True,
113
+ verbose_name="Name",
114
+ ),
115
+ ),
116
+ migrations.AlterField(
117
+ model_name="reasonsfortesting",
118
+ name="name",
119
+ field=models.CharField(
120
+ help_text="This is the stored value, required",
121
+ max_length=250,
122
+ unique=True,
123
+ verbose_name="Stored value",
124
+ ),
125
+ ),
126
+ migrations.AddIndex(
127
+ model_name="diagnosislocations",
128
+ index=models.Index(fields=["name"], name="edc_dx_revi_name_a39b40_idx"),
129
+ ),
130
+ migrations.AddIndex(
131
+ model_name="diagnosislocations",
132
+ index=models.Index(
133
+ fields=["display_index", "display_name"],
134
+ name="edc_dx_revi_display_415beb_idx",
135
+ ),
136
+ ),
137
+ migrations.AddIndex(
138
+ model_name="reasonsfortesting",
139
+ index=models.Index(fields=["name"], name="edc_dx_revi_name_0b2844_idx"),
140
+ ),
141
+ migrations.AddIndex(
142
+ model_name="reasonsfortesting",
143
+ index=models.Index(
144
+ fields=["display_index", "display_name"],
145
+ name="edc_dx_revi_display_ee4387_idx",
146
+ ),
147
+ ),
148
+ ]