meta-edc 1.1.13__py3-none-any.whl → 1.1.15__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 meta-edc might be problematic. Click here for more details.
- meta_ae/action_items.py +15 -18
- meta_ae/templatetags/meta_ae_extras.py +2 -2
- meta_analytics/dataframes/get_last_imp_visits_df.py +2 -2
- meta_analytics/tables/enrolled/glucose.py +1 -2
- meta_consent/models/subject_consent_v1.py +0 -1
- meta_dashboard/view_utils/subject_screening_button.py +3 -3
- meta_edc/admin.py +1 -1
- meta_edc/celery.py +2 -1
- meta_edc/celery_live.py +2 -1
- meta_edc/celery_uat.py +2 -1
- meta_edc/meta_version.py +2 -2
- meta_edc/navbars.py +7 -5
- meta_edc/settings/defaults.py +3 -3
- meta_edc/urls.py +1 -1
- meta_edc/utils.py +3 -1
- {meta_edc-1.1.13.dist-info → meta_edc-1.1.15.dist-info}/METADATA +10 -11
- {meta_edc-1.1.13.dist-info → meta_edc-1.1.15.dist-info}/RECORD +72 -70
- meta_pharmacy/admin/substitutions_admin.py +1 -1
- meta_pharmacy/forms/rx_form.py +0 -1
- meta_pharmacy/management/commands/update_initial_pharmacy_data.py +4 -3
- meta_pharmacy/models/rx_label.py +0 -1
- meta_prn/action_items.py +23 -31
- meta_prn/admin/end_of_study_admin.py +2 -2
- meta_prn/admin/offschedule_dm_referral_admin.py +0 -1
- meta_prn/admin/offschedule_postnatal_admin.py +0 -1
- meta_prn/admin/offschedule_pregnancy_admin.py +0 -1
- meta_prn/choices.py +6 -6
- meta_prn/form_validators/end_of_study.py +9 -8
- meta_prn/forms/dm_referral_form.py +2 -8
- meta_prn/forms/end_of_study_form.py +1 -1
- meta_prn/forms/off_study_medication_form.py +2 -2
- meta_prn/forms/pregnancy_notification_form.py +14 -16
- meta_prn/list_data.py +2 -2
- meta_prn/migrations/0068_alter_dmreferral_referral_note_and_more.py +235 -0
- meta_prn/models/dm_referral.py +2 -2
- meta_prn/models/end_of_study.py +7 -7
- meta_prn/models/loss_to_followup.py +6 -6
- meta_prn/models/off_study_medication.py +3 -2
- meta_prn/models/pregnancy_notification.py +3 -3
- meta_prn/models/protocol_incident.py +4 -1
- meta_prn/models/signals.py +15 -13
- meta_prn/models/subject_transfer.py +0 -1
- meta_rando/randomizers.py +1 -1
- meta_reports/admin/dbviews/imp_substitutions_admin.py +1 -1
- meta_reports/admin/dbviews/on_study_missing_values_admin/unmanaged_model_admin.py +0 -1
- meta_reports/admin/endpoints_all_admin.py +0 -1
- meta_reports/admin/modeladmin_mixins.py +1 -1
- meta_reports/migrations/0060_auto_20250926_0242.py +366 -0
- meta_reports/models/dbviews/imp_substitutions/unmanaged_model.py +0 -1
- meta_reports/models/dbviews/on_study_missing_lab_values/unmanged_model.py +0 -1
- meta_reports/models/dbviews/on_study_missing_values/unmanged_model.py +0 -1
- meta_reports/models/dbviews/patient_history_missing_baseline_cd4/unmanaged_model.py +0 -1
- meta_reports/models/dbviews/unattended_three_in_row/unmanaged_model.py +0 -1
- meta_reports/models/dbviews/unattended_three_in_row2/unmanaged_model.py +0 -1
- meta_reports/models/dbviews/unattended_two_in_row/unmanaged_model.py +0 -1
- meta_screening/admin/fieldsets.py +0 -1
- meta_screening/admin/screening_part_one_admin.py +0 -1
- meta_screening/forms/field_lists.py +0 -1
- meta_subject/admin/birth_outcome_admin.py +4 -2
- meta_subject/admin/fields.py +5 -5
- meta_subject/admin/fieldsets.py +5 -5
- meta_subject/admin/glucose_admin.py +2 -4
- meta_subject/admin/glucose_fbg_admin.py +5 -7
- meta_subject/admin/list_filters.py +3 -3
- meta_subject/admin/next_appointment_admin.py +0 -1
- meta_subject/form_validators/glucose_form_validator.py +7 -5
- meta_subject/forms/blood_results/blood_results_hba1c_form.py +1 -1
- meta_subject/forms/subject_requisition_form.py +1 -1
- meta_subject/models/blood_results/__init__.py +0 -1
- meta_subject/models/next_appointment.py +0 -1
- {meta_edc-1.1.13.dist-info → meta_edc-1.1.15.dist-info}/WHEEL +0 -0
- {meta_edc-1.1.13.dist-info → meta_edc-1.1.15.dist-info}/licenses/LICENSE +0 -0
|
@@ -66,7 +66,7 @@ class BirthOutcomesAdmin(
|
|
|
66
66
|
return tuple(set(fields + custom_fields))
|
|
67
67
|
|
|
68
68
|
@admin.display
|
|
69
|
-
def delivery_report(self, obj=None, label=None):
|
|
69
|
+
def delivery_report(self, obj=None, label=None): # noqa: ARG002
|
|
70
70
|
url = reverse("meta_subject_admin:meta_subject_delivery_changelist")
|
|
71
71
|
url = f"{url}?q={obj.subject_identifier}"
|
|
72
72
|
context = dict(title="Delivery", url=url, label="Delivery")
|
|
@@ -90,5 +90,7 @@ class BirthOutcomesAdmin(
|
|
|
90
90
|
if callable(super().view_on_site):
|
|
91
91
|
url = super().view_on_site(obj)
|
|
92
92
|
else:
|
|
93
|
-
raise NoReverseMatch(
|
|
93
|
+
raise NoReverseMatch(
|
|
94
|
+
f"{e}. See subject_dashboard_url_name for {self!r}."
|
|
95
|
+
) from e
|
|
94
96
|
return url
|
meta_subject/admin/fields.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
def get_blood_pressure_fields():
|
|
2
|
-
return
|
|
1
|
+
def get_blood_pressure_fields() -> tuple[str, ...]:
|
|
2
|
+
return (
|
|
3
3
|
"sys_blood_pressure_one",
|
|
4
4
|
"dia_blood_pressure_one",
|
|
5
5
|
"sys_blood_pressure_two",
|
|
6
6
|
"dia_blood_pressure_two",
|
|
7
7
|
"severe_htn",
|
|
8
|
-
|
|
8
|
+
)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def get_respiratory_o2_fields():
|
|
12
|
-
return
|
|
11
|
+
def get_respiratory_o2_fields() -> tuple[str, ...]:
|
|
12
|
+
return ("respiratory_rate",)
|
meta_subject/admin/fieldsets.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
def get_htn_fieldset(part=None):
|
|
2
|
-
fields =
|
|
2
|
+
fields = (
|
|
3
3
|
"htn_diagnosis",
|
|
4
4
|
"on_htn_treatment",
|
|
5
5
|
"htn_treatment",
|
|
@@ -9,11 +9,11 @@ def get_htn_fieldset(part=None):
|
|
|
9
9
|
"dyslipidaemia_rx",
|
|
10
10
|
"concomitant_conditions",
|
|
11
11
|
"concomitant_medications",
|
|
12
|
-
|
|
12
|
+
)
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
f"Part {part}: Hypertension",
|
|
16
|
-
{"fields":
|
|
16
|
+
{"fields": fields},
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
|
|
@@ -22,7 +22,7 @@ def get_hiv_fieldset(part=None):
|
|
|
22
22
|
if part:
|
|
23
23
|
title = f"Part {part}: {title}"
|
|
24
24
|
# TODO: previous_arv_regimen_start_date is PHASE 3 only
|
|
25
|
-
fields =
|
|
25
|
+
fields = (
|
|
26
26
|
"hiv_diagnosis_date",
|
|
27
27
|
"arv_initiation_date",
|
|
28
28
|
"viral_load",
|
|
@@ -39,7 +39,7 @@ def get_hiv_fieldset(part=None):
|
|
|
39
39
|
"on_oi_prophylaxis",
|
|
40
40
|
"oi_prophylaxis",
|
|
41
41
|
"other_oi_prophylaxis",
|
|
42
|
-
|
|
42
|
+
)
|
|
43
43
|
return (
|
|
44
44
|
title,
|
|
45
45
|
{"fields": fields},
|
|
@@ -84,13 +84,11 @@ class GlucoseAdmin(CrfModelAdminMixin, SimpleHistoryAdmin):
|
|
|
84
84
|
list_display = list(list_display)
|
|
85
85
|
list_display.insert(3, "ogtt_value")
|
|
86
86
|
list_display.insert(3, "fbg_value")
|
|
87
|
-
|
|
88
|
-
return list_display
|
|
87
|
+
return tuple(list_display)
|
|
89
88
|
|
|
90
89
|
def get_list_filter(self, request) -> tuple[str | type[SimpleListFilter], ...]:
|
|
91
90
|
list_filter = super().get_list_filter(request)
|
|
92
91
|
list_filter = list(list_filter)
|
|
93
92
|
list_filter.insert(2, OgttListFilter)
|
|
94
93
|
list_filter.insert(2, FbgListFilter)
|
|
95
|
-
|
|
96
|
-
return list_filter
|
|
94
|
+
return tuple(list_filter)
|
|
@@ -17,7 +17,7 @@ from .modeladmin import CrfModelAdminMixin
|
|
|
17
17
|
class GlucoseFbgAdmin(CrfModelAdminMixin, SimpleHistoryAdmin):
|
|
18
18
|
form = GlucoseFbgForm
|
|
19
19
|
|
|
20
|
-
fieldsets =
|
|
20
|
+
fieldsets = (
|
|
21
21
|
(None, {"fields": ("subject_visit", "report_datetime")}),
|
|
22
22
|
(
|
|
23
23
|
"Fasting",
|
|
@@ -52,9 +52,9 @@ class GlucoseFbgAdmin(CrfModelAdminMixin, SimpleHistoryAdmin):
|
|
|
52
52
|
),
|
|
53
53
|
crf_status_fieldset,
|
|
54
54
|
audit_fieldset_tuple,
|
|
55
|
-
|
|
55
|
+
)
|
|
56
56
|
|
|
57
|
-
radio_fields = {
|
|
57
|
+
radio_fields = { # noqa: RUF012
|
|
58
58
|
"fasting": admin.VERTICAL,
|
|
59
59
|
"fbg_units": admin.VERTICAL,
|
|
60
60
|
"fbg_performed": admin.VERTICAL,
|
|
@@ -69,12 +69,10 @@ class GlucoseFbgAdmin(CrfModelAdminMixin, SimpleHistoryAdmin):
|
|
|
69
69
|
list_display = list(list_display)
|
|
70
70
|
# list_display.insert(3, "ogtt")
|
|
71
71
|
list_display.insert(3, "fbg")
|
|
72
|
-
|
|
73
|
-
return list_display
|
|
72
|
+
return tuple(list_display)
|
|
74
73
|
|
|
75
74
|
def get_list_filter(self, request) -> tuple[str | type[SimpleListFilter], ...]:
|
|
76
75
|
list_filter = super().get_list_filter(request)
|
|
77
76
|
list_filter = list(list_filter)
|
|
78
77
|
list_filter.insert(2, GlucoseListFilter)
|
|
79
|
-
|
|
80
|
-
return list_filter
|
|
78
|
+
return tuple(list_filter)
|
|
@@ -13,14 +13,14 @@ class GlucoseListFilter(SimpleListFilter):
|
|
|
13
13
|
parameter_name = "glucose_value"
|
|
14
14
|
model_cls = GlucoseFbg
|
|
15
15
|
|
|
16
|
-
def lookups(self, request, model_admin):
|
|
16
|
+
def lookups(self, request, model_admin): # noqa: ARG002
|
|
17
17
|
return (
|
|
18
18
|
(NORMAL, "Normal"),
|
|
19
19
|
(HIGH, "High"),
|
|
20
20
|
(VERY_HIGH, "Very high"),
|
|
21
21
|
)
|
|
22
22
|
|
|
23
|
-
def queryset(self, request, queryset):
|
|
23
|
+
def queryset(self, request, queryset): # noqa: ARG002
|
|
24
24
|
qs = None
|
|
25
25
|
if self.value():
|
|
26
26
|
if self.value() == NORMAL:
|
|
@@ -52,7 +52,7 @@ class OgttListFilter(SimpleListFilter):
|
|
|
52
52
|
(HIGH, "High"),
|
|
53
53
|
)
|
|
54
54
|
|
|
55
|
-
def queryset(self, request, queryset):
|
|
55
|
+
def queryset(self, request, queryset): # noqa: ARG002
|
|
56
56
|
qs = None
|
|
57
57
|
if self.value():
|
|
58
58
|
if self.value() == NORMAL:
|
|
@@ -70,11 +70,13 @@ class GlucoseFormValidator(FbgOgttFormValidatorMixin, CrfFormValidator):
|
|
|
70
70
|
|
|
71
71
|
def is_endpoint(self):
|
|
72
72
|
value = NO
|
|
73
|
-
if (
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
if (
|
|
74
|
+
self.cleaned_data.get("fbg_value") >= Decimal("7.0")
|
|
75
|
+
and self.cleaned_data.get("ogtt_value") >= Decimal("11.1")
|
|
76
|
+
) or (
|
|
77
|
+
self.cleaned_data.get("fbg_value") < Decimal("7.0")
|
|
78
|
+
and self.cleaned_data.get("ogtt_value") >= Decimal("11.1")
|
|
79
|
+
):
|
|
78
80
|
value = YES
|
|
79
81
|
elif self.cleaned_data.get("fbg_value") >= Decimal("7.0") and self.cleaned_data.get(
|
|
80
82
|
"ogtt_value"
|
|
@@ -9,7 +9,7 @@ from ...models import BloodResultsHba1c
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class BloodResultsHba1cFormValidator(BloodResultsFormValidatorMixin, CrfFormValidator):
|
|
12
|
-
panels =
|
|
12
|
+
panels = (hba1c_poc_panel, hba1c_panel)
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class BloodResultsHba1cForm(ActionItemCrfFormMixin, CrfModelFormMixin, forms.ModelForm):
|
|
@@ -20,7 +20,7 @@ class SubjectRequisitionForm(RequisitionModelFormMixin, forms.ModelForm):
|
|
|
20
20
|
cleaned_data = super().clean()
|
|
21
21
|
if cleaned_data.get("reason_not_drawn") == NOT_REQUIRED:
|
|
22
22
|
raise forms.ValidationError(
|
|
23
|
-
{"reason_not_drawn": "Invalid choice. Not expected
|
|
23
|
+
{"reason_not_drawn": "Invalid choice. Not expected for this panel"}
|
|
24
24
|
)
|
|
25
25
|
return cleaned_data
|
|
26
26
|
|
|
File without changes
|
|
File without changes
|