clinicedc 2.0.0__py3-none-any.whl → 2.0.1__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.
- {clinicedc-2.0.0.dist-info → clinicedc-2.0.1.dist-info}/METADATA +1 -1
- {clinicedc-2.0.0.dist-info → clinicedc-2.0.1.dist-info}/RECORD +72 -36
- {clinicedc-2.0.0.dist-info → clinicedc-2.0.1.dist-info}/WHEEL +1 -1
- edc_action_item/action.py +3 -2
- edc_action_item/data_fixers.py +1 -0
- edc_action_item/migrations/0038_alter_actionitem_revision_alter_actiontype_revision_and_more.py +86 -0
- edc_action_item/site_action_items.py +3 -1
- edc_adverse_event/migrations/0015_alter_aeactionclassification_revision_and_more.py +74 -0
- edc_appconfig/apps.py +3 -2
- edc_appointment/creators/appointments_creator.py +3 -2
- edc_appointment/migrations/0049_alter_appointment_revision_and_more.py +38 -0
- edc_appointment/model_mixins/appointment_model_mixin.py +5 -4
- edc_auth/auth_updater/group_updater.py +9 -3
- edc_auth/migrations/0034_alter_edcpermissions_revision_alter_role_revision.py +38 -0
- edc_consent/consent_definition.py +3 -2
- edc_consent/form_validators/subject_consent_form_validator.py +2 -1
- edc_consent/migrations/0005_alter_edcpermissions_revision.py +26 -0
- edc_consent/model_mixins/consent_extension_model_mixin.py +1 -0
- edc_consent/modelform_mixins/consent_modelform_mixin/consent_modelform_validation_mixin.py +3 -2
- edc_consent/models/signals.py +1 -0
- edc_consent/site_consents.py +1 -0
- edc_crf/crf_form_validator.py +2 -1
- edc_crf/migrations/0008_alter_crfstatus_revision.py +26 -0
- edc_dashboard/migrations/0005_alter_edcpermissions_revision.py +26 -0
- edc_data_manager/migrations/0039_alter_datadictionary_revision_and_more.py +101 -0
- edc_export/migrations/0021_alter_datarequest_revision_and_more.py +173 -0
- edc_facility/migrations/0015_alter_healthfacility_revision_and_more.py +38 -0
- edc_form_runners/migrations/0004_alter_issue_revision.py +26 -0
- edc_identifier/migrations/0010_alter_identifiermodel_revision.py +26 -0
- edc_lab/migrations/0035_alter_aliquot_revision_alter_box_revision_and_more.py +266 -0
- edc_lab_dashboard/migrations/0004_alter_edcpermissions_revision.py +26 -0
- edc_lab_results/model_mixins/insulin_model_mixin.py +1 -0
- edc_label/migrations/0006_alter_zpllabeltemplates_revision.py +29 -0
- edc_listboard/migrations/0006_alter_listboard_revision.py +29 -0
- edc_locator/migrations/0039_alter_historicalsubjectlocator_revision_and_more.py +38 -0
- edc_metadata/migrations/0030_alter_crfmetadata_revision_and_more.py +38 -0
- edc_navbar/migrations/0008_alter_edcpermissions_revision.py +26 -0
- edc_notification/migrations/0010_alter_notification_revision.py +26 -0
- edc_offstudy/migrations/0022_alter_historicalsubjectoffstudy_revision_and_more.py +41 -0
- edc_pharmacy/admin/stock/stock_request_admin.py +5 -4
- edc_pharmacy/admin/stock/stock_request_item_admin.py +5 -4
- edc_pharmacy/analytics/dataframes/get_next_scheduled_visit_for_subjects_df.py +10 -4
- edc_pharmacy/forms/stock/stock_request_form.py +15 -5
- edc_pharmacy/migrations/0088_alter_allocation_revision_alter_assignment_revision_and_more.py +794 -0
- edc_pharmacy/pdf_reports/stock_pdf_report.py +3 -2
- edc_protocol_incident/migrations/0023_alter_historicalprotocoldeviationviolation_revision_and_more.py +65 -0
- edc_pylabels/migrations/0012_alter_labelconfiguration_revision.py +26 -0
- edc_qareports/migrations/0018_alter_edcpermissions_revision_alter_note_revision.py +38 -0
- edc_qareports/utils.py +2 -1
- edc_randomization/migrations/0013_alter_edcpermissions_revision_and_more.py +50 -0
- edc_randomization/randomizer.py +2 -1
- edc_refusal/migrations/0011_alter_historicalsubjectrefusal_revision_and_more.py +38 -0
- edc_registration/migrations/0032_alter_historicalregisteredsubject_revision_and_more.py +38 -0
- edc_reportable/forms/reportables_form_validator_mixin.py +5 -4
- edc_reportable/migrations/0006_alter_gradingdata_revision_and_more.py +381 -0
- edc_reportable/utils/convert_units.py +2 -1
- edc_reportable/utils/molecular_weight_model_cls.py +1 -1
- edc_review_dashboard/migrations/0005_alter_edcpermissions_revision.py +26 -0
- edc_screening/migrations/0004_alter_edcpermissions_revision.py +26 -0
- edc_screening/screening_eligibility.py +1 -0
- edc_sites/migrations/0009_alter_edcpermissions_revision.py +26 -0
- edc_sites/single_site/single_site.py +1 -1
- edc_sites/site.py +2 -1
- edc_sites/utils/add_or_update_django_sites.py +1 -1
- edc_subject_dashboard/migrations/0004_alter_edcpermissions_revision.py +26 -0
- edc_unblinding/migrations/0013_alter_historicalunblindingrequest_revision_and_more.py +62 -0
- edc_visit_schedule/migrations/0018_alter_historicalonschedule_revision_and_more.py +86 -0
- edc_visit_schedule/schedule/schedule.py +4 -3
- edc_visit_schedule/site_visit_schedules.py +1 -1
- edc_visit_schedule/subject_schedule.py +2 -1
- edc_visit_tracking/migrations/0008_alter_historicalsubjectvisit_revision_and_more.py +65 -0
- {clinicedc-2.0.0.dist-info → clinicedc-2.0.1.dist-info}/licenses/LICENSE +0 -0
edc_action_item/migrations/0038_alter_actionitem_revision_alter_actiontype_revision_and_more.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_action_item", "0037_remove_actionitem_reference_model_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="actionitem",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterField(
|
|
27
|
+
model_name="actiontype",
|
|
28
|
+
name="revision",
|
|
29
|
+
field=django_revision.revision_field.RevisionField(
|
|
30
|
+
blank=True,
|
|
31
|
+
editable=False,
|
|
32
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
33
|
+
max_length=75,
|
|
34
|
+
null=True,
|
|
35
|
+
verbose_name="Revision",
|
|
36
|
+
),
|
|
37
|
+
),
|
|
38
|
+
migrations.AlterField(
|
|
39
|
+
model_name="edcpermissions",
|
|
40
|
+
name="revision",
|
|
41
|
+
field=django_revision.revision_field.RevisionField(
|
|
42
|
+
blank=True,
|
|
43
|
+
editable=False,
|
|
44
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
45
|
+
max_length=75,
|
|
46
|
+
null=True,
|
|
47
|
+
verbose_name="Revision",
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
migrations.AlterField(
|
|
51
|
+
model_name="historicalactionitem",
|
|
52
|
+
name="revision",
|
|
53
|
+
field=django_revision.revision_field.RevisionField(
|
|
54
|
+
blank=True,
|
|
55
|
+
editable=False,
|
|
56
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
57
|
+
max_length=75,
|
|
58
|
+
null=True,
|
|
59
|
+
verbose_name="Revision",
|
|
60
|
+
),
|
|
61
|
+
),
|
|
62
|
+
migrations.AlterField(
|
|
63
|
+
model_name="historicalreference",
|
|
64
|
+
name="revision",
|
|
65
|
+
field=django_revision.revision_field.RevisionField(
|
|
66
|
+
blank=True,
|
|
67
|
+
editable=False,
|
|
68
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
69
|
+
max_length=75,
|
|
70
|
+
null=True,
|
|
71
|
+
verbose_name="Revision",
|
|
72
|
+
),
|
|
73
|
+
),
|
|
74
|
+
migrations.AlterField(
|
|
75
|
+
model_name="reference",
|
|
76
|
+
name="revision",
|
|
77
|
+
field=django_revision.revision_field.RevisionField(
|
|
78
|
+
blank=True,
|
|
79
|
+
editable=False,
|
|
80
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
81
|
+
max_length=75,
|
|
82
|
+
null=True,
|
|
83
|
+
verbose_name="Revision",
|
|
84
|
+
),
|
|
85
|
+
),
|
|
86
|
+
]
|
|
@@ -13,7 +13,9 @@ from django.utils.module_loading import module_has_submodule
|
|
|
13
13
|
from edc_notification.site_notifications import (
|
|
14
14
|
AlreadyRegistered as NotificationAlreadyRegistered,
|
|
15
15
|
)
|
|
16
|
-
from edc_notification.site_notifications import
|
|
16
|
+
from edc_notification.site_notifications import (
|
|
17
|
+
site_notifications,
|
|
18
|
+
)
|
|
17
19
|
from edc_prn.prn import Prn
|
|
18
20
|
from edc_prn.site_prn_forms import AlreadyRegistered as PrnAlreadyRegistered
|
|
19
21
|
from edc_prn.site_prn_forms import site_prn_forms
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_adverse_event", "0014_alter_aeactionclassification_options_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="aeactionclassification",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterField(
|
|
27
|
+
model_name="aeclassification",
|
|
28
|
+
name="revision",
|
|
29
|
+
field=django_revision.revision_field.RevisionField(
|
|
30
|
+
blank=True,
|
|
31
|
+
editable=False,
|
|
32
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
33
|
+
max_length=75,
|
|
34
|
+
null=True,
|
|
35
|
+
verbose_name="Revision",
|
|
36
|
+
),
|
|
37
|
+
),
|
|
38
|
+
migrations.AlterField(
|
|
39
|
+
model_name="causeofdeath",
|
|
40
|
+
name="revision",
|
|
41
|
+
field=django_revision.revision_field.RevisionField(
|
|
42
|
+
blank=True,
|
|
43
|
+
editable=False,
|
|
44
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
45
|
+
max_length=75,
|
|
46
|
+
null=True,
|
|
47
|
+
verbose_name="Revision",
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
migrations.AlterField(
|
|
51
|
+
model_name="edcpermissions",
|
|
52
|
+
name="revision",
|
|
53
|
+
field=django_revision.revision_field.RevisionField(
|
|
54
|
+
blank=True,
|
|
55
|
+
editable=False,
|
|
56
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
57
|
+
max_length=75,
|
|
58
|
+
null=True,
|
|
59
|
+
verbose_name="Revision",
|
|
60
|
+
),
|
|
61
|
+
),
|
|
62
|
+
migrations.AlterField(
|
|
63
|
+
model_name="saereason",
|
|
64
|
+
name="revision",
|
|
65
|
+
field=django_revision.revision_field.RevisionField(
|
|
66
|
+
blank=True,
|
|
67
|
+
editable=False,
|
|
68
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
69
|
+
max_length=75,
|
|
70
|
+
null=True,
|
|
71
|
+
verbose_name="Revision",
|
|
72
|
+
),
|
|
73
|
+
),
|
|
74
|
+
]
|
edc_appconfig/apps.py
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
|
-
from django.apps import AppConfig as DjangoAppConfig
|
|
3
|
+
from django.apps import AppConfig as DjangoAppConfig
|
|
4
|
+
from django.apps import apps as django_apps
|
|
4
5
|
from django.conf import settings
|
|
5
6
|
from django.contrib.sites.management import create_default_site
|
|
6
7
|
from django.core.checks import register
|
|
7
8
|
from django.core.management.color import color_style
|
|
8
9
|
from django.db.models.signals import post_migrate
|
|
10
|
+
from multisite.apps import post_migrate_sync_alias
|
|
9
11
|
|
|
10
12
|
from edc_action_item.post_migrate_signals import update_action_types
|
|
11
13
|
from edc_action_item.site_action_items import site_action_items
|
|
@@ -47,7 +49,6 @@ from edc_visit_schedule.system_checks import (
|
|
|
47
49
|
check_subject_schedule_history,
|
|
48
50
|
visit_schedule_check,
|
|
49
51
|
)
|
|
50
|
-
from multisite.apps import post_migrate_sync_alias
|
|
51
52
|
|
|
52
53
|
installed_apps = [x.split(".apps")[0] for x in settings.INSTALLED_APPS]
|
|
53
54
|
|
|
@@ -9,15 +9,16 @@ from django.db.models.deletion import ProtectedError
|
|
|
9
9
|
|
|
10
10
|
from edc_facility.exceptions import FacilityError
|
|
11
11
|
from edc_facility.utils import get_facility
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
from ..exceptions import CreateAppointmentError
|
|
14
|
+
from .appointment_creator import AppointmentCreator
|
|
14
15
|
|
|
15
16
|
if TYPE_CHECKING:
|
|
16
17
|
from django.db.models import QuerySet
|
|
17
18
|
|
|
19
|
+
from edc_consent.consent_definition import ConsentDefinition
|
|
18
20
|
from edc_visit_schedule.schedule import Schedule
|
|
19
21
|
from edc_visit_schedule.visit_schedule import VisitSchedule
|
|
20
|
-
from edc_consent.consent_definition import ConsentDefinition
|
|
21
22
|
|
|
22
23
|
from ..models import Appointment
|
|
23
24
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_appointment", "0048_alter_appointment_site_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="appointment",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterField(
|
|
27
|
+
model_name="historicalappointment",
|
|
28
|
+
name="revision",
|
|
29
|
+
field=django_revision.revision_field.RevisionField(
|
|
30
|
+
blank=True,
|
|
31
|
+
editable=False,
|
|
32
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
33
|
+
max_length=75,
|
|
34
|
+
null=True,
|
|
35
|
+
verbose_name="Revision",
|
|
36
|
+
),
|
|
37
|
+
),
|
|
38
|
+
]
|
|
@@ -22,14 +22,15 @@ from edc_visit_schedule.model_mixins import VisitScheduleModelMixin
|
|
|
22
22
|
from edc_visit_schedule.site_visit_schedules import site_visit_schedules
|
|
23
23
|
from edc_visit_schedule.subject_schedule import NotOnScheduleError
|
|
24
24
|
from edc_visit_schedule.utils import is_baseline
|
|
25
|
-
|
|
26
|
-
from .appointment_methods_model_mixin import AppointmentMethodsModelMixin
|
|
27
|
-
from .missed_appointment_model_mixin import MissedAppointmentModelMixin
|
|
28
|
-
from .window_period_model_mixin import WindowPeriodModelMixin
|
|
25
|
+
|
|
29
26
|
from ..constants import CANCELLED_APPT, IN_PROGRESS_APPT
|
|
30
27
|
from ..exceptions import AppointmentDatetimeError, UnknownVisitCode
|
|
31
28
|
from ..managers import AppointmentManager
|
|
32
29
|
from ..utils import raise_on_appt_may_not_be_missed, update_appt_status
|
|
30
|
+
from .appointment_fields_model_mixin import AppointmentFieldsModelMixin
|
|
31
|
+
from .appointment_methods_model_mixin import AppointmentMethodsModelMixin
|
|
32
|
+
from .missed_appointment_model_mixin import MissedAppointmentModelMixin
|
|
33
|
+
from .window_period_model_mixin import WindowPeriodModelMixin
|
|
33
34
|
|
|
34
35
|
if TYPE_CHECKING:
|
|
35
36
|
from edc_visit_schedule.schedule import Schedule
|
|
@@ -166,7 +166,9 @@ class GroupUpdater:
|
|
|
166
166
|
try:
|
|
167
167
|
app_label, _codename = codename.split(".")
|
|
168
168
|
except ValueError as e:
|
|
169
|
-
raise PermissionsCodenameError(
|
|
169
|
+
raise PermissionsCodenameError(
|
|
170
|
+
f"Invalid dotted codename. {e} Got {codename}."
|
|
171
|
+
)
|
|
170
172
|
else:
|
|
171
173
|
try:
|
|
172
174
|
self.apps.get_app_config(app_label)
|
|
@@ -219,7 +221,9 @@ class GroupUpdater:
|
|
|
219
221
|
except LookupError as e:
|
|
220
222
|
warn(f"{e}. Got {model}")
|
|
221
223
|
else:
|
|
222
|
-
content_type = self.content_type_model_cls.objects.get_for_model(
|
|
224
|
+
content_type = self.content_type_model_cls.objects.get_for_model(
|
|
225
|
+
model_cls
|
|
226
|
+
)
|
|
223
227
|
for codename_tpl in codename_tuples:
|
|
224
228
|
app_label, codename, name = self.get_from_codename_tuple(
|
|
225
229
|
codename_tpl, model_cls._meta.app_label
|
|
@@ -246,7 +250,9 @@ class GroupUpdater:
|
|
|
246
250
|
f"Unable to verify codename. {e} Got '{app_label}.{codename}'"
|
|
247
251
|
)
|
|
248
252
|
except MultipleObjectsReturned as e:
|
|
249
|
-
self.delete_and_raise_on_duplicate_codenames(
|
|
253
|
+
self.delete_and_raise_on_duplicate_codenames(
|
|
254
|
+
codename, app_label, exception=e
|
|
255
|
+
)
|
|
250
256
|
return permission
|
|
251
257
|
|
|
252
258
|
def delete_and_raise_on_duplicate_codenames(
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_auth", "0001_squashed_0033_alter_userprofile_is_multisite_viewer"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="edcpermissions",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterField(
|
|
27
|
+
model_name="role",
|
|
28
|
+
name="revision",
|
|
29
|
+
field=django_revision.revision_field.RevisionField(
|
|
30
|
+
blank=True,
|
|
31
|
+
editable=False,
|
|
32
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
33
|
+
max_length=75,
|
|
34
|
+
null=True,
|
|
35
|
+
verbose_name="Revision",
|
|
36
|
+
),
|
|
37
|
+
),
|
|
38
|
+
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from dataclasses import dataclass, field
|
|
3
|
+
from dataclasses import KW_ONLY, dataclass, field
|
|
4
4
|
from datetime import datetime
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import TYPE_CHECKING, Type
|
|
6
6
|
|
|
7
7
|
from django.apps import apps as django_apps
|
|
8
8
|
from django.core.exceptions import ObjectDoesNotExist
|
|
@@ -13,6 +13,7 @@ from edc_screening.utils import get_subject_screening_model
|
|
|
13
13
|
from edc_sites import site_sites
|
|
14
14
|
from edc_utils import ceil_secs, floor_secs, formatted_date, formatted_datetime
|
|
15
15
|
from edc_utils.date import to_local
|
|
16
|
+
|
|
16
17
|
from .exceptions import (
|
|
17
18
|
ConsentDefinitionError,
|
|
18
19
|
ConsentDefinitionValidityPeriodError,
|
|
@@ -8,9 +8,10 @@ from django.conf import settings
|
|
|
8
8
|
from edc_form_validators import INVALID_ERROR
|
|
9
9
|
from edc_screening.form_validator_mixins import SubjectScreeningFormValidatorMixin
|
|
10
10
|
from edc_sites.site import sites
|
|
11
|
-
from edc_utils import
|
|
11
|
+
from edc_utils import AgeValueError, age
|
|
12
12
|
from edc_utils.date import to_local, to_utc
|
|
13
13
|
from edc_utils.text import convert_php_dateformat
|
|
14
|
+
|
|
14
15
|
from ..site_consents import site_consents
|
|
15
16
|
|
|
16
17
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_consent", "0004_alter_edcpermissions_options_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="edcpermissions",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
]
|
|
@@ -5,6 +5,7 @@ from django_crypto_fields.fields import EncryptedTextField
|
|
|
5
5
|
from edc_constants.choices import YES_NO_NA
|
|
6
6
|
from edc_identifier.model_mixins import UniqueSubjectIdentifierModelMixin
|
|
7
7
|
from edc_utils import get_utcnow
|
|
8
|
+
|
|
8
9
|
from .. import site_consents
|
|
9
10
|
from ..consent_definition_extension import ConsentDefinitionExtension
|
|
10
11
|
from ..exceptions import ConsentExtensionDefinitionModelError
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
5
|
|
|
6
6
|
from dateutil.relativedelta import relativedelta
|
|
7
7
|
from django import forms
|
|
8
8
|
|
|
9
9
|
from edc_constants.constants import NO, YES
|
|
10
10
|
from edc_model_form.utils import get_field_or_raise
|
|
11
|
-
from edc_utils import
|
|
11
|
+
from edc_utils import AgeValueError, age, formatted_age
|
|
12
|
+
|
|
12
13
|
from ...exceptions import ConsentDefinitionValidityPeriodError
|
|
13
14
|
from ...site_consents import site_consents
|
|
14
15
|
from ...utils import InvalidInitials, verify_initials_against_full_name
|
edc_consent/models/signals.py
CHANGED
|
@@ -4,6 +4,7 @@ from django.dispatch import receiver
|
|
|
4
4
|
from edc_sites import site_sites
|
|
5
5
|
from edc_visit_schedule.site_visit_schedules import site_visit_schedules
|
|
6
6
|
from edc_visit_schedule.subject_schedule import SubjectSchedule
|
|
7
|
+
|
|
7
8
|
from ..model_mixins import ConsentExtensionModelMixin, RequiresConsentFieldsModelMixin
|
|
8
9
|
from ..site_consents import site_consents
|
|
9
10
|
|
edc_consent/site_consents.py
CHANGED
|
@@ -11,6 +11,7 @@ from django.utils.module_loading import import_module, module_has_submodule
|
|
|
11
11
|
|
|
12
12
|
from edc_sites.site import sites as site_sites
|
|
13
13
|
from edc_utils import ceil_secs, floor_secs, formatted_date, to_utc
|
|
14
|
+
|
|
14
15
|
from .exceptions import (
|
|
15
16
|
AlreadyRegistered,
|
|
16
17
|
ConsentDefinitionDoesNotExist,
|
edc_crf/crf_form_validator.py
CHANGED
|
@@ -7,12 +7,13 @@ from django.utils.text import format_lazy
|
|
|
7
7
|
from django.utils.translation import gettext_lazy as _
|
|
8
8
|
|
|
9
9
|
from edc_appointment.form_validator_mixins import WindowPeriodFormValidatorMixin
|
|
10
|
-
from edc_form_validators import
|
|
10
|
+
from edc_form_validators import INVALID_ERROR, FormValidator
|
|
11
11
|
from edc_registration import get_registered_subject_model_cls
|
|
12
12
|
from edc_sites.form_validator_mixin import SiteFormValidatorMixin
|
|
13
13
|
from edc_utils import floor_secs, formatted_datetime, to_utc
|
|
14
14
|
from edc_utils.date import to_local
|
|
15
15
|
from edc_visit_tracking.modelform_mixins import get_related_visit
|
|
16
|
+
|
|
16
17
|
from .crf_form_validator_mixins import CrfFormValidatorMixin
|
|
17
18
|
|
|
18
19
|
if TYPE_CHECKING:
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_crf", "0007_crfstatus_edc_crf_crf_subject_e09e96_idx_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="crfstatus",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("edc_dashboard", "0004_edcpermissions_locale_created_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="edcpermissions",
|
|
16
|
+
name="revision",
|
|
17
|
+
field=django_revision.revision_field.RevisionField(
|
|
18
|
+
blank=True,
|
|
19
|
+
editable=False,
|
|
20
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
21
|
+
max_length=75,
|
|
22
|
+
null=True,
|
|
23
|
+
verbose_name="Revision",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
]
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-09-10 03:24
|
|
2
|
+
|
|
3
|
+
import django_revision.revision_field
|
|
4
|
+
from django.db import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
(
|
|
11
|
+
"edc_data_manager",
|
|
12
|
+
"0038_rename_default_datadictionary_default_value_and_more",
|
|
13
|
+
),
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
operations = [
|
|
17
|
+
migrations.AlterField(
|
|
18
|
+
model_name="datadictionary",
|
|
19
|
+
name="revision",
|
|
20
|
+
field=django_revision.revision_field.RevisionField(
|
|
21
|
+
blank=True,
|
|
22
|
+
editable=False,
|
|
23
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
24
|
+
max_length=75,
|
|
25
|
+
null=True,
|
|
26
|
+
verbose_name="Revision",
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
migrations.AlterField(
|
|
30
|
+
model_name="dataquery",
|
|
31
|
+
name="revision",
|
|
32
|
+
field=django_revision.revision_field.RevisionField(
|
|
33
|
+
blank=True,
|
|
34
|
+
editable=False,
|
|
35
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
36
|
+
max_length=75,
|
|
37
|
+
null=True,
|
|
38
|
+
verbose_name="Revision",
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
migrations.AlterField(
|
|
42
|
+
model_name="edcpermissions",
|
|
43
|
+
name="revision",
|
|
44
|
+
field=django_revision.revision_field.RevisionField(
|
|
45
|
+
blank=True,
|
|
46
|
+
editable=False,
|
|
47
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
48
|
+
max_length=75,
|
|
49
|
+
null=True,
|
|
50
|
+
verbose_name="Revision",
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
migrations.AlterField(
|
|
54
|
+
model_name="historicaldatadictionary",
|
|
55
|
+
name="revision",
|
|
56
|
+
field=django_revision.revision_field.RevisionField(
|
|
57
|
+
blank=True,
|
|
58
|
+
editable=False,
|
|
59
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
60
|
+
max_length=75,
|
|
61
|
+
null=True,
|
|
62
|
+
verbose_name="Revision",
|
|
63
|
+
),
|
|
64
|
+
),
|
|
65
|
+
migrations.AlterField(
|
|
66
|
+
model_name="historicaldataquery",
|
|
67
|
+
name="revision",
|
|
68
|
+
field=django_revision.revision_field.RevisionField(
|
|
69
|
+
blank=True,
|
|
70
|
+
editable=False,
|
|
71
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
72
|
+
max_length=75,
|
|
73
|
+
null=True,
|
|
74
|
+
verbose_name="Revision",
|
|
75
|
+
),
|
|
76
|
+
),
|
|
77
|
+
migrations.AlterField(
|
|
78
|
+
model_name="historicalqueryrule",
|
|
79
|
+
name="revision",
|
|
80
|
+
field=django_revision.revision_field.RevisionField(
|
|
81
|
+
blank=True,
|
|
82
|
+
editable=False,
|
|
83
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
84
|
+
max_length=75,
|
|
85
|
+
null=True,
|
|
86
|
+
verbose_name="Revision",
|
|
87
|
+
),
|
|
88
|
+
),
|
|
89
|
+
migrations.AlterField(
|
|
90
|
+
model_name="queryrule",
|
|
91
|
+
name="revision",
|
|
92
|
+
field=django_revision.revision_field.RevisionField(
|
|
93
|
+
blank=True,
|
|
94
|
+
editable=False,
|
|
95
|
+
help_text="System field. From git repository (tag:branch:commit), project metadata, project toml, project VERSION, or settings.",
|
|
96
|
+
max_length=75,
|
|
97
|
+
null=True,
|
|
98
|
+
verbose_name="Revision",
|
|
99
|
+
),
|
|
100
|
+
),
|
|
101
|
+
]
|