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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from django.db.models import QuerySet, Sum
|
|
2
2
|
from django.utils.translation import gettext as _
|
|
3
|
-
from edc_pdf_reports import Report
|
|
4
|
-
from edc_protocol.research_protocol_config import ResearchProtocolConfig
|
|
5
3
|
from reportlab.graphics.barcode import code128
|
|
6
4
|
from reportlab.lib import colors
|
|
7
5
|
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
|
|
@@ -10,6 +8,9 @@ from reportlab.lib.units import cm, mm
|
|
|
10
8
|
from reportlab.pdfbase.pdfmetrics import stringWidth
|
|
11
9
|
from reportlab.platypus import Paragraph, SimpleDocTemplate, Spacer, Table, TableStyle
|
|
12
10
|
|
|
11
|
+
from edc_pdf_reports import Report
|
|
12
|
+
from edc_protocol.research_protocol_config import ResearchProtocolConfig
|
|
13
|
+
|
|
13
14
|
from ..models import Stock
|
|
14
15
|
from ..utils import get_related_or_none
|
|
15
16
|
|
|
@@ -0,0 +1,65 @@
|
|
|
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_protocol_incident",
|
|
12
|
+
"0022_alter_historicalprotocoldeviationviolation_site_and_more",
|
|
13
|
+
),
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
operations = [
|
|
17
|
+
migrations.AlterField(
|
|
18
|
+
model_name="historicalprotocoldeviationviolation",
|
|
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="historicalprotocolincident",
|
|
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="protocoldeviationviolation",
|
|
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="protocolincident",
|
|
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
|
+
]
|
|
@@ -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_pylabels", "0011_alter_labelconfiguration_name"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="labelconfiguration",
|
|
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,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_qareports", "0017_auto_20240816_0256"),
|
|
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="note",
|
|
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
|
+
]
|
edc_qareports/utils.py
CHANGED
|
@@ -4,7 +4,8 @@ from warnings import warn
|
|
|
4
4
|
|
|
5
5
|
from django.apps import apps as django_apps
|
|
6
6
|
from django.conf import settings
|
|
7
|
-
from django.db import
|
|
7
|
+
from django.db import OperationalError, connection
|
|
8
|
+
|
|
8
9
|
from edc_auth.get_app_codenames import get_app_codenames
|
|
9
10
|
|
|
10
11
|
|
|
@@ -0,0 +1,50 @@
|
|
|
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_randomization", "0012_alter_randomizationlist_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
|
+
migrations.AlterField(
|
|
27
|
+
model_name="historicalrandomizationlist",
|
|
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="randomizationlist",
|
|
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
|
+
]
|
edc_randomization/randomizer.py
CHANGED
|
@@ -3,13 +3,14 @@ from __future__ import annotations
|
|
|
3
3
|
import warnings
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import Any, Type
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Type
|
|
7
7
|
|
|
8
8
|
from django.apps import apps as django_apps
|
|
9
9
|
from django.conf import settings
|
|
10
10
|
from django.core.exceptions import ObjectDoesNotExist, ValidationError
|
|
11
11
|
|
|
12
12
|
from edc_registration.utils import get_registered_subject_model_cls
|
|
13
|
+
|
|
13
14
|
from .constants import (
|
|
14
15
|
DEFAULT_ASSIGNMENT_DESCRIPTION_MAP,
|
|
15
16
|
DEFAULT_ASSIGNMENT_MAP,
|
|
@@ -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_refusal", "0010_alter_historicalsubjectrefusal_site_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="historicalsubjectrefusal",
|
|
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="subjectrefusal",
|
|
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
|
+
]
|
|
@@ -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_registration", "0031_alter_historicalregisteredsubject_site_and_more"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="historicalregisteredsubject",
|
|
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="registeredsubject",
|
|
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
|
+
]
|
|
@@ -40,15 +40,16 @@ class ReportablesFormValidatorMixin:
|
|
|
40
40
|
subject_identifier=self.subject_identifier
|
|
41
41
|
)
|
|
42
42
|
# check normal ranges and grade result values
|
|
43
|
-
|
|
44
|
-
reference_range_collection_name,
|
|
43
|
+
options = dict(
|
|
45
44
|
cleaned_data=deepcopy(cleaned_data),
|
|
46
45
|
gender=registered_subject.gender,
|
|
47
46
|
dob=registered_subject.dob,
|
|
48
47
|
report_datetime=self.report_datetime,
|
|
49
48
|
value_field_suffix=self.value_field_suffix,
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
)
|
|
50
|
+
options.update(**reportables_evaluator_options)
|
|
51
|
+
reference_range_evaluator = self.reference_range_evaluator_cls(
|
|
52
|
+
reference_range_collection_name, **options
|
|
52
53
|
)
|
|
53
54
|
try:
|
|
54
55
|
reference_range_evaluator.validate_reportable_fields()
|