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
meta_prn/models/end_of_study.py
CHANGED
|
@@ -6,6 +6,7 @@ from edc_constants.constants import (
|
|
|
6
6
|
DELIVERY,
|
|
7
7
|
DIABETES,
|
|
8
8
|
NOT_APPLICABLE,
|
|
9
|
+
NULL_STRING,
|
|
9
10
|
OTHER,
|
|
10
11
|
PREGNANCY,
|
|
11
12
|
TOXICITY,
|
|
@@ -73,7 +74,7 @@ class EndOfStudy(ActionModelMixin, SiteModelMixin, OffstudyModelMixin, BaseUuidM
|
|
|
73
74
|
verbose_name="If OTHER, please specify",
|
|
74
75
|
max_length=500,
|
|
75
76
|
blank=True,
|
|
76
|
-
|
|
77
|
+
default=NULL_STRING,
|
|
77
78
|
)
|
|
78
79
|
|
|
79
80
|
# TODO: 6m off drug and duration ?? See SOP
|
|
@@ -118,8 +119,7 @@ class EndOfStudy(ActionModelMixin, SiteModelMixin, OffstudyModelMixin, BaseUuidM
|
|
|
118
119
|
|
|
119
120
|
clinical_withdrawal_reason = models.CharField(
|
|
120
121
|
verbose_name=(
|
|
121
|
-
"If the patient was withdrawn on CLINICAL grounds, "
|
|
122
|
-
"please specify PRIMARY reason"
|
|
122
|
+
"If the patient was withdrawn on CLINICAL grounds, please specify PRIMARY reason"
|
|
123
123
|
),
|
|
124
124
|
max_length=25,
|
|
125
125
|
choices=CLINICAL_WITHDRAWAL_REASONS,
|
|
@@ -130,14 +130,14 @@ class EndOfStudy(ActionModelMixin, SiteModelMixin, OffstudyModelMixin, BaseUuidM
|
|
|
130
130
|
verbose_name="If withdrawn for 'other' condition, please explain",
|
|
131
131
|
max_length=500,
|
|
132
132
|
blank=True,
|
|
133
|
-
|
|
133
|
+
default=NULL_STRING,
|
|
134
134
|
)
|
|
135
135
|
|
|
136
136
|
clinical_withdrawal_investigator_decision = models.TextField(
|
|
137
137
|
verbose_name="If withdrawl was an 'investigator decision', please explain ...",
|
|
138
138
|
max_length=500,
|
|
139
139
|
blank=True,
|
|
140
|
-
|
|
140
|
+
default=NULL_STRING,
|
|
141
141
|
)
|
|
142
142
|
|
|
143
143
|
toxicity_withdrawal_reason = models.CharField(
|
|
@@ -151,7 +151,7 @@ class EndOfStudy(ActionModelMixin, SiteModelMixin, OffstudyModelMixin, BaseUuidM
|
|
|
151
151
|
verbose_name="If 'other toxicity', please specify ...",
|
|
152
152
|
max_length=500,
|
|
153
153
|
blank=True,
|
|
154
|
-
|
|
154
|
+
default=NULL_STRING,
|
|
155
155
|
)
|
|
156
156
|
|
|
157
157
|
transfer_date = models.DateField(
|
|
@@ -173,7 +173,7 @@ class EndOfStudy(ActionModelMixin, SiteModelMixin, OffstudyModelMixin, BaseUuidM
|
|
|
173
173
|
verbose_name="Please provide further details if possible",
|
|
174
174
|
max_length=500,
|
|
175
175
|
blank=True,
|
|
176
|
-
|
|
176
|
+
default=NULL_STRING,
|
|
177
177
|
)
|
|
178
178
|
|
|
179
179
|
class Meta(OffstudyModelMixin.Meta):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
from edc_action_item.models.action_model_mixin import ActionModelMixin
|
|
3
3
|
from edc_constants.choices import YES_NO
|
|
4
|
-
from edc_constants.constants import OTHER
|
|
4
|
+
from edc_constants.constants import NULL_STRING, OTHER
|
|
5
5
|
from edc_identifier.model_mixins import UniqueSubjectIdentifierFieldMixin
|
|
6
6
|
from edc_ltfu.constants import LTFU_ACTION
|
|
7
7
|
from edc_model.models import BaseUuidModel, OtherCharField
|
|
@@ -48,7 +48,7 @@ class LossToFollowup(
|
|
|
48
48
|
|
|
49
49
|
home_visit_detail = models.TextField(
|
|
50
50
|
verbose_name="If YES, provide any further details of the home visit",
|
|
51
|
-
|
|
51
|
+
default=NULL_STRING,
|
|
52
52
|
blank=False,
|
|
53
53
|
)
|
|
54
54
|
|
|
@@ -64,13 +64,13 @@ class LossToFollowup(
|
|
|
64
64
|
verbose_name=(
|
|
65
65
|
"Please give details of the circumstances that have led to this decision."
|
|
66
66
|
),
|
|
67
|
-
|
|
67
|
+
default=NULL_STRING,
|
|
68
68
|
blank=False,
|
|
69
69
|
)
|
|
70
70
|
|
|
71
71
|
class Meta(BaseUuidModel.Meta):
|
|
72
72
|
verbose_name = "Loss to Follow Up"
|
|
73
73
|
verbose_name_plural = "Loss to Follow Up"
|
|
74
|
-
indexes =
|
|
75
|
-
models.Index(fields=
|
|
76
|
-
|
|
74
|
+
indexes = (
|
|
75
|
+
models.Index(fields=("subject_identifier", "action_identifier", "site", "id")),
|
|
76
|
+
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
from edc_action_item.models import ActionModelMixin
|
|
3
|
+
from edc_constants.constants import NULL_STRING
|
|
3
4
|
from edc_identifier.model_mixins import UniqueSubjectIdentifierFieldMixin
|
|
4
5
|
from edc_model.models import BaseUuidModel
|
|
5
6
|
from edc_pharmacy.models import Medication
|
|
@@ -46,13 +47,13 @@ class OffStudyMedication(
|
|
|
46
47
|
|
|
47
48
|
reason_other = models.TextField(
|
|
48
49
|
verbose_name="If other, please specify ...",
|
|
49
|
-
|
|
50
|
+
default=NULL_STRING,
|
|
50
51
|
blank=True,
|
|
51
52
|
)
|
|
52
53
|
|
|
53
54
|
comment = models.TextField(
|
|
54
55
|
verbose_name="Any additional comments",
|
|
55
|
-
|
|
56
|
+
default=NULL_STRING,
|
|
56
57
|
blank=True,
|
|
57
58
|
)
|
|
58
59
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
from edc_action_item.models import ActionModelMixin
|
|
3
3
|
from edc_constants.choices import YES_NO, YES_NO_UNSURE
|
|
4
|
-
from edc_constants.constants import YES
|
|
4
|
+
from edc_constants.constants import NULL_STRING, YES
|
|
5
5
|
from edc_identifier.model_mixins import NonUniqueSubjectIdentifierFieldMixin
|
|
6
6
|
from edc_model.models import BaseUuidModel
|
|
7
7
|
from edc_sites.model_mixins import SiteModelMixin
|
|
@@ -44,7 +44,7 @@ class PregnancyNotification(
|
|
|
44
44
|
|
|
45
45
|
unconfirmed_details = models.TextField(
|
|
46
46
|
verbose_name="If no, please provide details",
|
|
47
|
-
|
|
47
|
+
default=NULL_STRING,
|
|
48
48
|
blank=True,
|
|
49
49
|
)
|
|
50
50
|
|
|
@@ -97,4 +97,4 @@ class PregnancyNotification(
|
|
|
97
97
|
class Meta(BaseUuidModel.Meta):
|
|
98
98
|
verbose_name = "Pregnancy Notification"
|
|
99
99
|
verbose_name_plural = "Pregnancy Notifications"
|
|
100
|
-
unique_together =
|
|
100
|
+
unique_together = ("subject_identifier", "edd")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from django.db import models
|
|
2
2
|
from edc_action_item.models import ActionItem, ActionModelMixin
|
|
3
|
+
from edc_constants.constants import NULL_STRING
|
|
3
4
|
from edc_identifier.model_mixins import NonUniqueSubjectIdentifierFieldMixin
|
|
4
5
|
from edc_model.models import BaseUuidModel
|
|
5
6
|
from edc_protocol_incident.constants import PROTOCOL_INCIDENT_ACTION
|
|
@@ -26,7 +27,9 @@ class ProtocolIncident(
|
|
|
26
27
|
related_name="meta_prn_action_item",
|
|
27
28
|
)
|
|
28
29
|
|
|
29
|
-
action_required_old = models.CharField(
|
|
30
|
+
action_required_old = models.CharField(
|
|
31
|
+
max_length=45, choices=ACTION_REQUIRED, default=NULL_STRING
|
|
32
|
+
)
|
|
30
33
|
|
|
31
34
|
def natural_key(self):
|
|
32
35
|
return (self.action_identifier,)
|
meta_prn/models/signals.py
CHANGED
|
@@ -24,7 +24,7 @@ from .pregnancy_notification import PregnancyNotification
|
|
|
24
24
|
sender=PregnancyNotification,
|
|
25
25
|
dispatch_uid="update_schedule_on_pregnancy_notification_post_save",
|
|
26
26
|
)
|
|
27
|
-
def update_schedule_on_pregnancy_notification_post_save(sender, instance, raw, **kwargs):
|
|
27
|
+
def update_schedule_on_pregnancy_notification_post_save(sender, instance, raw, **kwargs): # noqa: ARG001
|
|
28
28
|
if not raw:
|
|
29
29
|
try:
|
|
30
30
|
OffSchedule.objects.get(subject_identifier=instance.subject_identifier)
|
|
@@ -58,18 +58,20 @@ def update_schedule_on_pregnancy_notification_post_save(sender, instance, raw, *
|
|
|
58
58
|
dispatch_uid="update_urine_pregnancy_on_pregnancy_notification_on_post_save",
|
|
59
59
|
)
|
|
60
60
|
def update_urine_pregnancy_on_pregnancy_notification_on_post_save(
|
|
61
|
-
sender,
|
|
61
|
+
sender, # noqa: ARG001
|
|
62
|
+
instance,
|
|
63
|
+
raw,
|
|
64
|
+
**kwargs, # noqa: ARG001
|
|
62
65
|
):
|
|
63
|
-
if not raw:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
66
|
+
if not raw and instance.bhcg_confirmed == YES:
|
|
67
|
+
UrinePregnancy.objects.filter(
|
|
68
|
+
subject_visit__subject_identifier=instance.subject_identifier,
|
|
69
|
+
notified=False,
|
|
70
|
+
assay_date__lte=instance.report_datetime.date(),
|
|
71
|
+
).update(
|
|
72
|
+
notified_datetime=instance.report_datetime,
|
|
73
|
+
notified=True,
|
|
74
|
+
)
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
@receiver(
|
|
@@ -78,7 +80,7 @@ def update_urine_pregnancy_on_pregnancy_notification_on_post_save(
|
|
|
78
80
|
sender=DmReferral,
|
|
79
81
|
dispatch_uid="update_schedule_on_dm_referral_post_save",
|
|
80
82
|
)
|
|
81
|
-
def update_schedule_on_dm_referral_post_save(sender, instance, raw, **kwargs):
|
|
83
|
+
def update_schedule_on_dm_referral_post_save(sender, instance, raw, **kwargs): # noqa: ARG001
|
|
82
84
|
if not raw:
|
|
83
85
|
try:
|
|
84
86
|
OffScheduleDmReferral.objects.get(subject_identifier=instance.subject_identifier)
|
meta_rando/randomizers.py
CHANGED
|
@@ -30,7 +30,7 @@ class RandomizerPhaseThree(Randomizer):
|
|
|
30
30
|
model = "meta_rando.randomizationlist"
|
|
31
31
|
filename = "randomization_list_phase_three.csv"
|
|
32
32
|
importer_cls = RandomizationListImporterPhaseThree
|
|
33
|
-
extra_csv_fieldnames =
|
|
33
|
+
extra_csv_fieldnames = ("gender",)
|
|
34
34
|
|
|
35
35
|
def __init__(self, gender=None, **kwargs):
|
|
36
36
|
self.gender = gender
|
|
@@ -49,7 +49,7 @@ class ImpSubstitutionsAdmin(
|
|
|
49
49
|
"allocated_datetime",
|
|
50
50
|
)
|
|
51
51
|
|
|
52
|
-
search_fields =
|
|
52
|
+
search_fields = ("subject_identifier", "sid", "dispensed_sid")
|
|
53
53
|
|
|
54
54
|
def dashboard(self, obj=None, label=None) -> str:
|
|
55
55
|
kwargs = self.get_subject_dashboard_url_kwargs(obj)
|
|
@@ -7,7 +7,6 @@ from ....models import OnStudyMissingValues
|
|
|
7
7
|
|
|
8
8
|
@admin.register(OnStudyMissingValues, site=meta_reports_admin)
|
|
9
9
|
class OnStudyMissingValuesAdmin(OnStudyMissingValuesModelAdminMixin, admin.ModelAdmin):
|
|
10
|
-
|
|
11
10
|
include_note_column: bool = True
|
|
12
11
|
project_reports_admin: str = "meta_reports_admin"
|
|
13
12
|
project_subject_admin: str = "meta_subject_admin"
|
|
@@ -8,6 +8,5 @@ from .modeladmin_mixins import EndpointsModelAdminMixin
|
|
|
8
8
|
|
|
9
9
|
@admin.register(EndpointsProxy, site=meta_reports_admin)
|
|
10
10
|
class EndpointsAllAdmin(EndpointsModelAdminMixin, admin.ModelAdmin):
|
|
11
|
-
|
|
12
11
|
def rendered_change_list_note(self):
|
|
13
12
|
return render_to_string("meta_reports/endpoints_all_change_list_note.html")
|
|
@@ -14,7 +14,7 @@ from edc_visit_schedule.admin import ScheduleStatusListFilter
|
|
|
14
14
|
from ..tasks import update_endpoints_table
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def update_endpoints_table_action(modeladmin, request, queryset):
|
|
17
|
+
def update_endpoints_table_action(modeladmin, request, queryset): # noqa: ARG001
|
|
18
18
|
subject_identifiers = []
|
|
19
19
|
if queryset.count() != modeladmin.model.objects.count():
|
|
20
20
|
subject_identifiers = [o.subject_identifier for o in queryset]
|