clinicedc 2.0.36__py3-none-any.whl → 2.0.38__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clinicedc
3
- Version: 2.0.36
3
+ Version: 2.0.38
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
@@ -244,8 +244,8 @@ edc_adverse_event/models/signals.py,sha256=K1N0Cn_rlrX2X3xSu-eqyDinyUtqjFeni6kTa
244
244
  edc_adverse_event/navbars.py,sha256=88JxlC6a7lb_ba2Y1fPUIrfQN820SlWhi026MOm1oko,758
245
245
  edc_adverse_event/notifications.py,sha256=6yAqd-pLTwwl43zZcDQWJEn0DCLjYBhlST4b9hPzPwM,1269
246
246
  edc_adverse_event/pdf_reports/__init__.py,sha256=8_T_bOqSRwSBUttzTB-3qMwwKubfjTeCcXsAltBTmXg,84
247
- edc_adverse_event/pdf_reports/ae_pdf_report.py,sha256=vjawwSZP9HwJ0sXXcRaQpMPlK7VIQ-5YCO2C6w-stwI,9677
248
- edc_adverse_event/pdf_reports/death_pdf_report.py,sha256=pO3qD-YtHG2RmaG27P73EeOY2sVgD1s6OmAaxvM8e9M,4993
247
+ edc_adverse_event/pdf_reports/ae_pdf_report.py,sha256=kJwgkA7XN96chLs8DDhNf0S8CKXKBjiAWTT3yJNlI18,9778
248
+ edc_adverse_event/pdf_reports/death_pdf_report.py,sha256=J1hD2cnh6rmeP6cTRJDsENWeOZgLgIC6qJlR0ngiwc0,5094
249
249
  edc_adverse_event/pdf_reports/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
250
  edc_adverse_event/templates/edc_adverse_event/action_item_column.html,sha256=my5LmIDkfpZp8EwEY55tv0sF1F-d_Gp7-sOfa4H_rYo,376
251
251
  edc_adverse_event/templates/edc_adverse_event/admin/app_index.html,sha256=gsIWpsWD0F4H0GMIWYGWbJ2v30ip7CvdJ4AoRY8iyqo,344
@@ -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=ePp5lHXKfF0fL9gkH6qWS4jcDTj4Cs07Mipgpm3FOW4,3044
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
@@ -2097,7 +2097,7 @@ edc_pdf_reports/admin/__init__.py,sha256=YtpHY3BAzIO1dBr7apC73E63YRbaKS1tAWy89OK
2097
2097
  edc_pdf_reports/admin/actions.py,sha256=m-n4i7RTqvOykKj3ldmcQ6B3Cna0hJXk9L8rf0zkGtw,533
2098
2098
  edc_pdf_reports/admin/modeladmin_mixins.py,sha256=OG3GVzN_Acb86eVeMbUdAEHbJyJO5NVCijEexVj3UwE,885
2099
2099
  edc_pdf_reports/apps.py,sha256=BHgFODyOf_RrElr2DnRQYsM1rDqtdYoQ9AQ18oD_YMM,118
2100
- edc_pdf_reports/crf_pdf_report.py,sha256=nkG3twM83eZVDHLA2iUM1YmoA0R_Rrl3NbqBQHrRVjo,10854
2100
+ edc_pdf_reports/crf_pdf_report.py,sha256=4ZoTSrdffKXdO6Y4aKLlS-xTNmdgxVpF2vhx2Tc8VMM,10884
2101
2101
  edc_pdf_reports/flowables/__init__.py,sha256=Tbn-fvpDb0N6nhA3wxGisf5BCuZAVN4eSf152a0AKY0,117
2102
2102
  edc_pdf_reports/flowables/checkbox.py,sha256=tFbq-qNbcvkPoCKRwXX4-nB5Ln31RmhSOsUmMo_xbCo,851
2103
2103
  edc_pdf_reports/flowables/textbox.py,sha256=u_AgwkWDCqNsOeZo-yNToVL27SDgMkzf7BJmTB-F4KI,1502
@@ -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.36.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
3401
- clinicedc-2.0.36.dist-info/WHEEL,sha256=n2u5OFBbdZvCiUKAmfnY1Po2j3FB_NWfuUlt5WiAjrk,79
3402
- clinicedc-2.0.36.dist-info/METADATA,sha256=KdM-V232Gmy6qWigAG5Fd3u2JQDlTObM41JAHI1X98k,15786
3403
- clinicedc-2.0.36.dist-info/RECORD,,
3400
+ clinicedc-2.0.38.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
3401
+ clinicedc-2.0.38.dist-info/WHEEL,sha256=n2u5OFBbdZvCiUKAmfnY1Po2j3FB_NWfuUlt5WiAjrk,79
3402
+ clinicedc-2.0.38.dist-info/METADATA,sha256=EBx5cUsa4zeby9k1-F14UMMermcXqLgj9dOcNBBu8A0,15786
3403
+ clinicedc-2.0.38.dist-info/RECORD,,
@@ -1,14 +1,14 @@
1
1
  from textwrap import fill
2
2
 
3
3
  import inflect
4
+ from django.conf import settings
5
+ from edc_constants.constants import OTHER, YES
6
+ from edc_pdf_reports.crf_pdf_report import CrfPdfReport
4
7
  from reportlab.lib import colors
5
8
  from reportlab.lib.units import cm
6
9
  from reportlab.platypus import Paragraph, Table
7
10
  from reportlab.platypus.flowables import KeepTogether, Spacer
8
11
 
9
- from edc_constants.constants import OTHER, YES
10
- from edc_pdf_reports.crf_pdf_report import CrfPdfReport
11
-
12
12
  from ..utils import get_adverse_event_app_label, get_ae_model
13
13
 
14
14
  p = inflect.engine()
@@ -20,6 +20,7 @@ class AePdfReport(CrfPdfReport):
20
20
  f"{get_adverse_event_app_label()}_admin:{get_adverse_event_app_label()}_"
21
21
  "aeinitial_changelist"
22
22
  )
23
+ draw_logo = getattr(settings, "EDC_PDF_REPORTS_DRAW_LOGO", True)
23
24
 
24
25
  def get_report_story(self, **kwargs):
25
26
  story = []
@@ -1,16 +1,16 @@
1
1
  from textwrap import fill
2
2
 
3
3
  import inflect
4
+ from django.conf import settings
4
5
  from django.contrib.auth import get_user_model
6
+ from edc_constants.constants import OTHER
7
+ from edc_pdf_reports.crf_pdf_report import CrfPdfReport
5
8
  from reportlab.lib import colors
6
9
  from reportlab.lib.units import cm
7
10
  from reportlab.platypus.flowables import Spacer
8
11
  from reportlab.platypus.para import Paragraph
9
12
  from reportlab.platypus.tables import Table
10
13
 
11
- from edc_constants.constants import OTHER
12
- from edc_pdf_reports.crf_pdf_report import CrfPdfReport
13
-
14
14
  from ..utils import get_adverse_event_app_label, get_ae_model
15
15
 
16
16
  User = get_user_model()
@@ -25,6 +25,7 @@ class DeathPdfReport(CrfPdfReport):
25
25
  )
26
26
 
27
27
  not_reported_text = "not reported"
28
+ draw_logo = getattr(settings, "EDC_PDF_REPORTS_DRAW_LOGO", True)
28
29
 
29
30
  def get_report_story(self, **kwargs):
30
31
  story = []
@@ -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 assay_datetime > self.report_datetime:
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: (
@@ -9,14 +9,6 @@ from django.apps import apps as django_apps
9
9
  from django.contrib.auth import get_user_model
10
10
  from django.core.exceptions import ObjectDoesNotExist
11
11
  from django.utils.text import slugify
12
- from reportlab.lib import colors
13
- from reportlab.lib.pagesizes import A4
14
- from reportlab.lib.units import cm
15
- from reportlab.lib.utils import ImageReader
16
- from reportlab.platypus import Paragraph, TableStyle
17
- from reportlab.platypus.flowables import KeepTogether, Spacer
18
- from reportlab.platypus.tables import Table
19
-
20
12
  from edc_data_manager.get_longitudinal_value import (
21
13
  DataDictionaryError,
22
14
  get_longitudinal_value,
@@ -26,13 +18,19 @@ from edc_randomization.auth_objects import RANDO_UNBLINDED
26
18
  from edc_utils.age import formatted_age
27
19
  from edc_utils.date import to_local
28
20
  from edc_utils.get_static_file import get_static_file
21
+ from reportlab.lib import colors
22
+ from reportlab.lib.pagesizes import A4
23
+ from reportlab.lib.units import cm
24
+ from reportlab.lib.utils import ImageReader
25
+ from reportlab.platypus import Paragraph, TableStyle
26
+ from reportlab.platypus.flowables import KeepTogether, Spacer
27
+ from reportlab.platypus.tables import Table
29
28
 
30
29
  from .report import Report
31
30
 
32
31
  if TYPE_CHECKING:
33
32
  from django.contrib.auth.models import User
34
33
  from django.core.handlers.wsgi import WSGIRequest
35
-
36
34
  from edc_crf.model_mixins import CrfModelMixin
37
35
  from edc_identifier.model_mixins import UniqueSubjectIdentifierModelMixin
38
36
 
@@ -50,7 +48,7 @@ class CrfPdfReport(Report):
50
48
  report_url: str = None
51
49
  changelist_url: str = None
52
50
 
53
- default_page = dict(
51
+ default_page = dict( # noqa: RUF012
54
52
  rightMargin=1.5 * cm,
55
53
  leftMargin=1.5 * cm,
56
54
  topMargin=2.0 * cm,
@@ -66,7 +64,7 @@ class CrfPdfReport(Report):
66
64
 
67
65
  open_label = True
68
66
 
69
- logo_data = {
67
+ logo_data = { # noqa: RUF012
70
68
  "app_label": "edc_pdf_reports",
71
69
  "filename": "clinicedc_logo.jpg",
72
70
  "first_page": (0.83 * cm, 0.83 * cm),