clinicedc 2.0.36__py3-none-any.whl → 2.0.37__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.36.dist-info → clinicedc-2.0.37.dist-info}/METADATA +1 -1
- {clinicedc-2.0.36.dist-info → clinicedc-2.0.37.dist-info}/RECORD +5 -5
- edc_lab/form_validators/crf_requisition_form_validator_mixin.py +11 -3
- {clinicedc-2.0.36.dist-info → clinicedc-2.0.37.dist-info}/WHEEL +0 -0
- {clinicedc-2.0.36.dist-info → clinicedc-2.0.37.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clinicedc
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.37
|
|
4
4
|
Summary: A clinical trials data management framework built on Django
|
|
5
5
|
Keywords: django,clinicedc,edc,clinical trials,research,data management,esource
|
|
6
6
|
Author: Erik van Widenfelt, Jonathan Willitts
|
|
@@ -1257,7 +1257,7 @@ edc_lab/auths.py,sha256=GW7AFsmAIwDG5vZ6QDf_sbw0RwfZYjA0NwdWD_ALpMs,1212
|
|
|
1257
1257
|
edc_lab/choices.py,sha256=LcewEDxGNwVZ3DzvzVxAgudZfbbDfIhp9kVlaFuLsOw,3922
|
|
1258
1258
|
edc_lab/constants.py,sha256=FlngFAY_nZRysRKX1JYqLnQZ9Ho_Aqn8eVg62BJBWSs,291
|
|
1259
1259
|
edc_lab/form_validators/__init__.py,sha256=Dotf8BIc-otg7RpNGAxQeNZmMcPxN_WB7_AgvVA1HDc,224
|
|
1260
|
-
edc_lab/form_validators/crf_requisition_form_validator_mixin.py,sha256=
|
|
1260
|
+
edc_lab/form_validators/crf_requisition_form_validator_mixin.py,sha256=mTDq1i7rDmsR6kE_YH9ZuKqvD382h21LcwPn2jXBWH8,3365
|
|
1261
1261
|
edc_lab/form_validators/requisition_form_validator.py,sha256=YNX7yb8Tt1PpreM_q5ZuJNgARzIxbC_PNqQ7naL-vlE,382
|
|
1262
1262
|
edc_lab/form_validators/requisition_form_validator_mixin.py,sha256=NK8YEVLVJI3YHhUCt8TP96J3Vuwh8JaTJAFRqEMmzYc,3453
|
|
1263
1263
|
edc_lab/forms/__init__.py,sha256=JlKa4cci8_yAQNPP3OPMQ6owBjeH2Z-m595sRO7xU6k,292
|
|
@@ -3397,7 +3397,7 @@ edc_vitals/models/fields/waist_circumference.py,sha256=fZcHFDdEwWLjIVLktKrFCD9UU
|
|
|
3397
3397
|
edc_vitals/models/fields/weight.py,sha256=zo9_9e3Cpu0UqoRbWS-iDkcDo6fK80b1dDQy4x4MyxE,921
|
|
3398
3398
|
edc_vitals/utils.py,sha256=vXid44KUXxeaSyund_y5MNXc5DFJs052_PwUAjszE2k,1384
|
|
3399
3399
|
edc_vitals/validators.py,sha256=vNiElWMs0rRnHRNuVoPLRf0rW_C_0xcfUyep1Y_Si5s,156
|
|
3400
|
-
clinicedc-2.0.
|
|
3401
|
-
clinicedc-2.0.
|
|
3402
|
-
clinicedc-2.0.
|
|
3403
|
-
clinicedc-2.0.
|
|
3400
|
+
clinicedc-2.0.37.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
3401
|
+
clinicedc-2.0.37.dist-info/WHEEL,sha256=n2u5OFBbdZvCiUKAmfnY1Po2j3FB_NWfuUlt5WiAjrk,79
|
|
3402
|
+
clinicedc-2.0.37.dist-info/METADATA,sha256=NQYdpqREY9cdtC9i2ZZyQbgCFq-jxheITxaRdkdCqMQ,15786
|
|
3403
|
+
clinicedc-2.0.37.dist-info/RECORD,,
|
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
5
|
from django import forms
|
|
6
|
-
|
|
7
6
|
from edc_utils.date import to_local
|
|
8
7
|
from edc_utils.text import formatted_datetime
|
|
9
8
|
|
|
@@ -32,6 +31,7 @@ class CrfRequisitionFormValidatorMixin:
|
|
|
32
31
|
|
|
33
32
|
assay_datetime_field: str = "assay_datetime"
|
|
34
33
|
requisition_field: str = "requisition"
|
|
34
|
+
allow_assay_datetime_after_report_datetime = True
|
|
35
35
|
|
|
36
36
|
def validate_requisition(
|
|
37
37
|
self,
|
|
@@ -68,15 +68,23 @@ class CrfRequisitionFormValidatorMixin:
|
|
|
68
68
|
) -> None:
|
|
69
69
|
"""Validate assay datetime is on or after requisition
|
|
70
70
|
datetime.
|
|
71
|
+
|
|
72
|
+
If `allow_assay_datetime_after_report_datetime` is False,
|
|
73
|
+
raise if assay datetime is after report_datetime.
|
|
74
|
+
|
|
71
75
|
"""
|
|
72
76
|
assay_datetime = self.cleaned_data.get(
|
|
73
77
|
assay_datetime_field or self.assay_datetime_field
|
|
74
78
|
)
|
|
75
|
-
if
|
|
79
|
+
if (
|
|
80
|
+
not self.allow_assay_datetime_after_report_datetime
|
|
81
|
+
and assay_datetime
|
|
82
|
+
and assay_datetime > self.report_datetime
|
|
83
|
+
):
|
|
76
84
|
raise forms.ValidationError(
|
|
77
85
|
{assay_datetime_field: "Invalid. Cannot be after report datetime."}
|
|
78
86
|
)
|
|
79
|
-
if assay_datetime < requisition.requisition_datetime:
|
|
87
|
+
if assay_datetime and assay_datetime < requisition.requisition_datetime:
|
|
80
88
|
raise forms.ValidationError(
|
|
81
89
|
{
|
|
82
90
|
assay_datetime_field: (
|
|
File without changes
|
|
File without changes
|