meta-edc 0.3.15__py3-none-any.whl → 0.3.50__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- meta_ae/action_items.py +2 -2
- meta_ae/migrations/0017_auto_20221130_2257.py +12 -7
- meta_ae/tests/holidays.csv +1 -1
- meta_analytics/README.rst +17 -0
- meta_analytics/dataframes/__init__.py +19 -0
- meta_analytics/dataframes/constants.py +33 -0
- meta_analytics/dataframes/enrolled/__init__.py +1 -0
- meta_analytics/dataframes/enrolled/get_glucose_df.py +122 -0
- meta_analytics/dataframes/get_eos_df.py +26 -0
- meta_analytics/dataframes/get_last_imp_visits_df.py +101 -0
- meta_analytics/dataframes/glucose_endpoints/__init__.py +2 -0
- meta_analytics/dataframes/glucose_endpoints/endpoint_by_date.py +183 -0
- meta_analytics/dataframes/glucose_endpoints/glucose_endpoints_by_date.py +531 -0
- meta_analytics/dataframes/screening/__init__.py +2 -0
- meta_analytics/dataframes/screening/get_glucose_tested_only_df.py +20 -0
- meta_analytics/dataframes/screening/get_screening_df.py +163 -0
- meta_analytics/dataframes/utils.py +65 -0
- meta_analytics/get_tables.py +81 -0
- meta_analytics/tables/__init__.py +2 -0
- meta_analytics/tables/eligible.py +106 -0
- meta_analytics/tables/enrolled/__init__.py +0 -0
- meta_analytics/tables/enrolled/glucose.py +28 -0
- meta_analytics/tables/has_dm.py +61 -0
- meta_analytics/tests/__init__.py +0 -0
- meta_analytics/tests/test_endpoints_by_date.py +94 -0
- meta_auth/auth_objects.py +22 -0
- meta_auth/auths.py +18 -3
- meta_consent/action_items.py +18 -1
- meta_consent/admin/__init__.py +1 -0
- meta_consent/admin/subject_consent_v1_ext_admin.py +45 -0
- meta_consent/baker_recipes.py +1 -0
- meta_consent/consents.py +20 -1
- meta_consent/constants.py +1 -0
- meta_consent/forms/__init__.py +1 -0
- meta_consent/forms/subject_consent_v1_ext_form.py +16 -0
- meta_consent/locale/lg/LC_MESSAGES/django.po +69 -0
- meta_consent/locale/sw/LC_MESSAGES/django.po +12 -12
- meta_consent/migrations/0026_historicalsubjectconsentv1ext_subjectconsentv1ext.py +544 -0
- meta_consent/migrations/0027_auto_20250111_0344.py +30 -0
- meta_consent/models/__init__.py +1 -0
- meta_consent/models/signals.py +18 -0
- meta_consent/models/subject_consent_v1_ext.py +29 -0
- meta_consent/tests/holidays.csv +1 -1
- meta_dashboard/locale/lg/LC_MESSAGES/django.po +30 -0
- meta_dashboard/locale/sw/LC_MESSAGES/django.po +11 -2
- meta_dashboard/navbars.py +3 -1
- meta_dashboard/templates/meta_dashboard/bootstrap3/buttons/eligibility_button.html +1 -1
- meta_dashboard/templates/meta_dashboard/bootstrap3/buttons/screening_button.html +1 -1
- meta_dashboard/templates/meta_dashboard/bootstrap3/subject/dashboard/sidebar.html +24 -0
- meta_dashboard/templates/meta_dashboard/bootstrap3/subject/dashboard.html +3 -0
- meta_dashboard/templatetags/meta_dashboard_extras.py +1 -1
- meta_dashboard/tests/holidays.csv +1 -1
- meta_dashboard/tests/urls.py +0 -1
- meta_dashboard/view_utils/__init__.py +6 -0
- meta_dashboard/view_utils/subject_screening_button.py +2 -2
- meta_dashboard/views/subject/dashboard/dashboard_view.py +38 -0
- meta_edc/__init__.py +7 -0
- meta_edc/celery.py +4 -13
- meta_edc/celery_live.py +18 -0
- meta_edc/celery_uat.py +24 -0
- meta_edc/management/commands/update_forms_reference.py +6 -2
- meta_edc/migrations/__init__.py +0 -0
- meta_edc/navbars.py +2 -1
- meta_edc/settings/debug.py +10 -2
- meta_edc/settings/defaults.py +58 -43
- meta_edc/templates/meta_edc/bootstrap3/home.html +5 -2
- meta_edc/tests/tests/test_endpoints.py +2 -0
- meta_edc/urls.py +4 -1
- meta_edc/wsgi.py +1 -1
- meta_edc/wsgi_live.py +1 -1
- meta_edc/wsgi_uat.py +1 -1
- meta_edc-0.3.50.dist-info/AUTHORS +0 -0
- meta_edc-0.3.50.dist-info/METADATA +766 -0
- {meta_edc-0.3.15.dist-info → meta_edc-0.3.50.dist-info}/RECORD +316 -127
- {meta_edc-0.3.15.dist-info → meta_edc-0.3.50.dist-info}/WHEEL +1 -1
- {meta_edc-0.3.15.dist-info → meta_edc-0.3.50.dist-info}/top_level.txt +1 -0
- meta_pharmacy/admin/__init__.py +2 -0
- meta_pharmacy/admin/rx_admin.py +75 -0
- meta_pharmacy/admin/substitutions_admin.py +67 -0
- meta_pharmacy/admin_site.py +9 -0
- meta_pharmacy/apps.py +5 -0
- meta_pharmacy/constants.py +10 -0
- meta_pharmacy/forms/__init__.py +2 -0
- meta_pharmacy/forms/rx_form.py +16 -0
- meta_pharmacy/forms/substitutions_form.py +54 -0
- meta_pharmacy/label_configs.py +30 -0
- meta_pharmacy/labels/__init__.py +5 -0
- meta_pharmacy/labels/draw_label_for_subject_with_barcode.py +62 -0
- meta_pharmacy/labels/draw_label_for_subject_with_code128.py +14 -0
- meta_pharmacy/labels/draw_label_with_test_data.py +26 -0
- meta_pharmacy/labels/label_data.py +14 -0
- meta_pharmacy/labels/print_sheets.py +97 -0
- meta_pharmacy/list_data.py +8 -0
- meta_pharmacy/management/__init__.py +0 -0
- meta_pharmacy/management/commands/__init__.py +0 -0
- meta_pharmacy/management/commands/update_initial_pharmacy_data.py +10 -0
- meta_pharmacy/migrations/0002_initial.py +695 -0
- meta_pharmacy/migrations/0003_auto_20240909_2335.py +64 -0
- meta_pharmacy/migrations/0004_alter_historicalsubstitutions_report_datetime_and_more.py +23 -0
- meta_pharmacy/migrations/0005_auto_20240911_0352.py +17 -0
- meta_pharmacy/migrations/0006_lotnumber_label.py +289 -0
- meta_pharmacy/migrations/0007_lotnumber_medication.py +24 -0
- meta_pharmacy/migrations/0008_remove_lotnumber_medication_and_more.py +390 -0
- meta_pharmacy/migrations/0009_remove_historicalrx_slug.py +17 -0
- meta_pharmacy/models/__init__.py +3 -0
- meta_pharmacy/models/label_data.py +38 -0
- meta_pharmacy/models/rx.py +18 -0
- meta_pharmacy/models/rx_label.py +39 -0
- meta_pharmacy/models/substitutions.py +88 -0
- meta_pharmacy/urls.py +8 -0
- meta_pharmacy/utils/__init__.py +1 -0
- meta_pharmacy/utils/update_initial_pharmacy_data.py +146 -0
- meta_prn/action_items.py +9 -1
- meta_prn/admin/pregnancy_notification_admin.py +6 -2
- meta_prn/migrations/0034_auto_20220630_1110.py +3 -3
- meta_prn/migrations/0035_auto_20220630_1140.py +59 -56
- meta_prn/tests/tests/test_dm_referral.py +3 -6
- meta_reports/__init__.py +1 -0
- meta_reports/admin/__init__.py +15 -0
- meta_reports/admin/dbviews/__init__.py +14 -0
- meta_reports/admin/dbviews/glucose_summary_admin.py +116 -0
- meta_reports/admin/dbviews/imp_substitutions_admin.py +101 -0
- meta_reports/admin/dbviews/missing_screening_ogtt_admin/__init__.py +2 -0
- meta_reports/admin/dbviews/missing_screening_ogtt_admin/note_model_admin.py +53 -0
- meta_reports/admin/dbviews/missing_screening_ogtt_admin/unmanaged_model_admin.py +84 -0
- meta_reports/admin/dbviews/on_study_missing_lab_values_admin/__init__.py +1 -0
- meta_reports/admin/dbviews/on_study_missing_lab_values_admin/unmanaged_model_admin.py +13 -0
- meta_reports/admin/dbviews/on_study_missing_values_admin/__init__.py +1 -0
- meta_reports/admin/dbviews/on_study_missing_values_admin/unmanaged_model_admin.py +13 -0
- meta_reports/admin/dbviews/patient_history_missing_baseline_cd4_admin.py +58 -0
- meta_reports/admin/dbviews/unattended_three_in_row2_admin.py +47 -0
- meta_reports/admin/dbviews/unattended_three_in_row_admin.py +35 -0
- meta_reports/admin/dbviews/unattended_two_in_row_admin.py +34 -0
- meta_reports/admin/endpoints_admin.py +14 -0
- meta_reports/admin/endpoints_all_admin.py +13 -0
- meta_reports/admin/last_imp_refill_admin.py +181 -0
- meta_reports/admin/list_filters.py +30 -0
- meta_reports/admin/modeladmin_mixins.py +112 -0
- meta_reports/admin_site.py +5 -0
- meta_reports/apps.py +1 -16
- meta_reports/forms/__init__.py +1 -0
- meta_reports/forms/missing_ogtt_note_form.py +33 -0
- meta_reports/management/__init__.py +0 -0
- meta_reports/management/commands/__init__.py +0 -0
- meta_reports/management/commands/generate_endpoints.py +13 -0
- meta_reports/migrations/0001_initial.py +87 -0
- meta_reports/migrations/0002_patienthistorymissingbaselinecd4_and_more.py +64 -0
- meta_reports/migrations/0003_auto_20240618_0505.py +12 -0
- meta_reports/migrations/0004_alter_patienthistorymissingbaselinecd4_table.py +17 -0
- meta_reports/migrations/0005_endpoints.py +47 -0
- meta_reports/migrations/0006_endpoints_baseline_datetime.py +18 -0
- meta_reports/migrations/0007_alter_endpoints_endpoint_label_and_more.py +43 -0
- meta_reports/migrations/0008_alter_endpoints_endpoint_label.py +18 -0
- meta_reports/migrations/0009_alter_endpoints_options.py +21 -0
- meta_reports/migrations/0010_alter_patienthistorymissingbaselinecd4_options_and_more.py +49 -0
- meta_reports/migrations/0011_auto_20240813_0156.py +54 -0
- meta_reports/migrations/0012_auto_20240813_1516.py +48 -0
- meta_reports/migrations/0013_auto_20240813_1516.py +48 -0
- meta_reports/migrations/0014_auto_20240813_1517.py +48 -0
- meta_reports/migrations/0015_alter_endpoints_site.py +22 -0
- meta_reports/migrations/0016_missingscreeningogtt.py +47 -0
- meta_reports/migrations/0017_auto_20240819_1711.py +166 -0
- meta_reports/migrations/0018_auto_20240819_1713.py +54 -0
- meta_reports/migrations/0019_auto_20240819_1721.py +54 -0
- meta_reports/migrations/0020_auto_20240819_1811.py +54 -0
- meta_reports/migrations/0021_auto_20240819_1817.py +54 -0
- meta_reports/migrations/0022_auto_20240819_1832.py +54 -0
- meta_reports/migrations/0023_endpoints_meta_report_subject_a56b22_idx.py +20 -0
- meta_reports/migrations/0024_glucosesummary.py +38 -0
- meta_reports/migrations/0025_auto_20240822_0115.py +87 -0
- meta_reports/migrations/0026_auto_20240822_0120.py +54 -0
- meta_reports/migrations/0027_auto_20240822_0140.py +54 -0
- meta_reports/migrations/0028_alter_glucosesummary_options.py +22 -0
- meta_reports/migrations/0029_auto_20240822_0149.py +54 -0
- meta_reports/migrations/0030_auto_20240822_1637.py +54 -0
- meta_reports/migrations/0031_endpointsproxy.py +25 -0
- meta_reports/migrations/0032_alter_endpointsproxy_options.py +21 -0
- meta_reports/migrations/0033_auto_20240823_0012.py +54 -0
- meta_reports/migrations/0034_auto_20240823_1642.py +54 -0
- meta_reports/migrations/0035_historicalmissingogttnote_missingogttnote.py +457 -0
- meta_reports/migrations/0036_historicalmissingogttnote_fasting_and_more.py +86 -0
- meta_reports/migrations/0037_historicalmissingogttnote_result_status_and_more.py +51 -0
- meta_reports/migrations/0038_alter_historicalmissingogttnote_fasting_and_more.py +33 -0
- meta_reports/migrations/0039_onstudymissingvalues.py +44 -0
- meta_reports/migrations/0040_auto_20240824_0412.py +282 -0
- meta_reports/migrations/0041_auto_20240828_2229.py +14 -0
- meta_reports/migrations/0042_onstudymissinglabvalues.py +43 -0
- meta_reports/migrations/0043_auto_20240828_2309.py +88 -0
- meta_reports/migrations/0044_auto_20240828_2323.py +93 -0
- meta_reports/migrations/0045_auto_20240829_0248.py +54 -0
- meta_reports/migrations/0046_auto_20240829_0250.py +54 -0
- meta_reports/migrations/0047_impsubstitutions.py +56 -0
- meta_reports/migrations/0048_auto_20240909_2338.py +48 -0
- meta_reports/migrations/0049_auto_20240911_0327.py +54 -0
- meta_reports/migrations/0050_alter_endpoints_created.py +19 -0
- meta_reports/migrations/0051_remove_endpoints_baseline_datetime_and_more.py +40 -0
- meta_reports/migrations/0052_lastimpvisit.py +57 -0
- meta_reports/migrations/0053_rename_lastimpvisit_lastimprefill_and_more.py +31 -0
- meta_reports/models/__init__.py +16 -0
- meta_reports/models/dbviews/README +14 -0
- meta_reports/models/dbviews/__init__.py +9 -0
- meta_reports/models/dbviews/glucose_summary/__init__.py +2 -0
- meta_reports/models/dbviews/glucose_summary/unmanaged_model.py +35 -0
- meta_reports/models/dbviews/glucose_summary/view_definition.py +28 -0
- meta_reports/models/dbviews/imp_substitutions/__init__.py +1 -0
- meta_reports/models/dbviews/imp_substitutions/unmanaged_model.py +41 -0
- meta_reports/models/dbviews/imp_substitutions/view_definition.py +21 -0
- meta_reports/models/dbviews/missing_screening_ogtt/__init__.py +2 -0
- meta_reports/models/dbviews/missing_screening_ogtt/note_model.py +57 -0
- meta_reports/models/dbviews/missing_screening_ogtt/unmanaged_model.py +41 -0
- meta_reports/models/dbviews/missing_screening_ogtt/view_definition.py +20 -0
- meta_reports/models/dbviews/on_study_missing_lab_values/__init__.py +1 -0
- meta_reports/models/dbviews/on_study_missing_lab_values/qa_cases.py +53 -0
- meta_reports/models/dbviews/on_study_missing_lab_values/unmanged_model.py +20 -0
- meta_reports/models/dbviews/on_study_missing_lab_values/view_definition.py +17 -0
- meta_reports/models/dbviews/on_study_missing_values/__init__.py +1 -0
- meta_reports/models/dbviews/on_study_missing_values/qa_cases.py +54 -0
- meta_reports/models/dbviews/on_study_missing_values/unmanged_model.py +20 -0
- meta_reports/models/dbviews/on_study_missing_values/view_definition.py +17 -0
- meta_reports/models/dbviews/patient_history_missing_baseline_cd4/__init__.py +1 -0
- meta_reports/models/dbviews/patient_history_missing_baseline_cd4/unmanaged_model.py +31 -0
- meta_reports/models/dbviews/patient_history_missing_baseline_cd4/view_definition.py +21 -0
- meta_reports/models/dbviews/unattended_three_in_row/__init__.py +1 -0
- meta_reports/models/dbviews/unattended_three_in_row/unmanaged_model.py +29 -0
- meta_reports/models/dbviews/unattended_three_in_row/view_definition.py +31 -0
- meta_reports/models/dbviews/unattended_three_in_row2/__init__.py +1 -0
- meta_reports/models/dbviews/unattended_three_in_row2/unmanaged_model.py +29 -0
- meta_reports/models/dbviews/unattended_three_in_row2/view_definition.py +50 -0
- meta_reports/models/dbviews/unattended_two_in_row/__init__.py +1 -0
- meta_reports/models/dbviews/unattended_two_in_row/unmanaged_model.py +27 -0
- meta_reports/models/dbviews/unattended_two_in_row/view_definition.py +30 -0
- meta_reports/models/endpoints.py +31 -0
- meta_reports/models/endpoints_proxy.py +11 -0
- meta_reports/models/last_imp_refill.py +34 -0
- meta_reports/tasks.py +12 -0
- meta_reports/templates/meta_reports/columns/subject_identifier_column.html +1 -0
- meta_reports/templates/meta_reports/endpoints_all_change_list_note.html +12 -0
- meta_reports/templates/meta_reports/endpoints_change_list_note.html +12 -0
- meta_reports/tests/test_sql_gen.py +5 -0
- meta_reports/urls.py +8 -0
- meta_reports/utils.py +0 -0
- meta_screening/admin/subject_screening_admin.py +1 -0
- meta_screening/migrations/0067_alter_historicalscreeningpartone_report_datetime_and_more.py +84 -0
- meta_screening/tests/holidays.csv +1 -1
- meta_screening/tests/meta_test_case_mixin.py +15 -0
- meta_sites/tests/test_sites.py +1 -1
- meta_subject/action_items.py +2 -2
- meta_subject/admin/__init__.py +2 -1
- meta_subject/admin/birth_outcome_admin.py +2 -0
- meta_subject/admin/blood_results/__init__.py +1 -1
- meta_subject/admin/blood_results/{blood_results_lipid_admin.py → blood_results_lipids_admin.py} +7 -7
- meta_subject/admin/diabetes/__init__.py +1 -1
- meta_subject/admin/diabetes/dm_endpoint_admin.py +35 -0
- meta_subject/admin/glucose_fbg_admin.py +4 -0
- meta_subject/admin/other_arv_regimens_admin.py +2 -0
- meta_subject/admin/study_medication_admin.py +10 -0
- meta_subject/form_validators/__init__.py +1 -1
- meta_subject/form_validators/dm_endpoint_form_validator.py +35 -0
- meta_subject/forms/__init__.py +2 -2
- meta_subject/forms/blood_results/__init__.py +1 -1
- meta_subject/forms/blood_results/{blood_results_lipid_form.py → blood_results_lipids_form.py} +5 -5
- meta_subject/forms/diabetes/__init__.py +1 -2
- meta_subject/forms/diabetes/dm_endpoint_form.py +13 -0
- meta_subject/forms/study_medication_form.py +35 -0
- meta_subject/locale/lg/LC_MESSAGES/django.po +470 -0
- meta_subject/locale/sw/LC_MESSAGES/django.po +191 -89
- meta_subject/metadata_rules/metadata_rules.py +7 -0
- meta_subject/metadata_rules/predicates.py +45 -8
- meta_subject/migrations/0107_auto_20220415_0043.py +28 -22
- meta_subject/migrations/0126_auto_20220719_2142.py +4 -4
- meta_subject/migrations/0131_auto_20220722_0411.py +28 -23
- meta_subject/migrations/0132_auto_20220722_1825.py +10 -6
- meta_subject/migrations/0135_auto_20220722_2212.py +39 -35
- meta_subject/migrations/0150_auto_20220914_0039.py +15 -11
- meta_subject/migrations/0207_alter_historicalphysicalexam_waist_circumference_and_more.py +46 -0
- meta_subject/migrations/0208_birthoutcomes_crf_status_and_more.py +62 -0
- meta_subject/migrations/0209_remove_historicaldmdxresult_dm_diagnosis_and_more.py +37 -0
- meta_subject/migrations/0210_remove_dmdxresult_dm_diagnosis_and_more.py +123 -0
- meta_subject/migrations/0211_dmendpoint_endpoint_reached_and_more.py +45 -0
- meta_subject/migrations/0212_auto_20240827_2222.py +23 -0
- meta_subject/migrations/0213_rename_bloodresultslipid_bloodresultslipids_and_more.py +35 -0
- meta_subject/migrations/0214_historicalstudymedication_stock_codes_and_more.py +44 -0
- meta_subject/migrations/0215_alter_historicalstudymedication_stock_codes_and_more.py +46 -0
- meta_subject/model_mixins/arv_history_model_mixin.py +3 -3
- meta_subject/models/__init__.py +3 -2
- meta_subject/models/birth_outcomes.py +6 -1
- meta_subject/models/blood_results/__init__.py +1 -1
- meta_subject/models/blood_results/{blood_results_lipid.py → blood_results_lipids.py} +3 -3
- meta_subject/models/diabetes/__init__.py +1 -2
- meta_subject/models/diabetes/dm_endpoint.py +61 -0
- meta_subject/models/glucose.py +4 -1
- meta_subject/models/physical_exam.py +1 -0
- meta_subject/models/signals.py +19 -0
- meta_subject/models/todo.txt +1 -1
- meta_subject/static/meta_subject/slider.css +1 -1
- meta_subject/templates/meta_subject/endpoint_review_instructions.html +1 -1
- meta_subject/templates/meta_subject/widgets/slider.html +0 -1
- meta_subject/tests/holidays.csv +1 -1
- meta_subject/tests/tests/test_medication_adherence.py +5 -1
- meta_subject/tests/tests/test_metadata_rules.py +2 -2
- meta_subject/tests/tests/test_mnsi.py +212 -121
- meta_subject/tests/tests/test_sf12.py +0 -12
- meta_visit_schedule/constants.py +4 -0
- meta_visit_schedule/tests/tests/test_schedule.py +4 -0
- meta_visit_schedule/visit_schedules/phase_three/crfs.py +75 -13
- meta_visit_schedule/visit_schedules/phase_three/requisitions.py +12 -0
- meta_visit_schedule/visit_schedules/phase_three/schedule.py +65 -2
- meta_visit_schedule/visit_schedules/phase_three/schedule_dm_referral.py +1 -1
- tests/etc/randomization_list.csv +1 -1
- {meta_edc/tests → tests}/etc/randomization_list_phase_three.csv +4 -4
- tests/holidays.csv +1 -1
- {meta_edc/tests → tests}/test_settings.py +16 -6
- meta_edc/tests/etc/user-aes-local.key +0 -1
- meta_edc/tests/etc/user-aes-restricted.key +0 -0
- meta_edc/tests/etc/user-rsa-local-private.pem +0 -27
- meta_edc/tests/etc/user-rsa-local-public.pem +0 -9
- meta_edc/tests/etc/user-rsa-restricted-private.pem +0 -27
- meta_edc/tests/etc/user-rsa-restricted-public.pem +0 -9
- meta_edc/tests/etc/user-salt-local.key +0 -0
- meta_edc/tests/etc/user-salt-restricted.key +0 -0
- meta_edc-0.3.15.dist-info/METADATA +0 -88
- meta_reports/tests/holidays.csv +0 -15
- meta_subject/admin/diabetes/dm_diagnosis_admin.py +0 -89
- meta_subject/form_validators/dm_diagnosis_form_validator.py +0 -38
- meta_subject/form_validators/dm_dx_result_form_validator.py +0 -7
- meta_subject/forms/diabetes/dm_diagnosis_form.py +0 -13
- meta_subject/forms/diabetes/dm_dx_result_form.py +0 -11
- meta_subject/models/diabetes/dm_diagnosis.py +0 -50
- meta_subject/models/diabetes/dm_dx_result.py +0 -70
- /meta_edc-0.3.15.dist-info/AUTHORS → /meta_analytics/__init__.py +0 -0
- /meta_pharmacy/models.py → /meta_analytics/constants.py +0 -0
- /meta_reports/models.py → /meta_analytics/notebooks/cleaning/__init__.py +0 -0
- {meta_edc-0.3.15.dist-info → meta_edc-0.3.50.dist-info}/LICENSE +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
# Generated by Django 3.2.11 on 2022-04-14 21:43
|
2
|
-
|
2
|
+
from django.core.exceptions import ObjectDoesNotExist
|
3
3
|
from django.db import migrations
|
4
4
|
from django.db.migrations import RunPython
|
5
5
|
from edc_consent.utils import get_consent_model_name
|
@@ -10,28 +10,34 @@ from meta_pharmacy.constants import METFORMIN
|
|
10
10
|
|
11
11
|
|
12
12
|
def func(apps, schema_editor):
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
tpl[0]
|
17
|
-
for tpl in apps.get_model("edc_pharmacy.rx")._default_manager.values_list(
|
18
|
-
"subject_identifier"
|
19
|
-
)
|
20
|
-
]
|
21
|
-
for subject_consent in apps.get_model(get_consent_model_name())._default_manager.exclude(
|
22
|
-
subject_identifier__in=subject_identifiers
|
23
|
-
):
|
24
|
-
site = site_model_cls.objects.get(id=subject_consent.site.id)
|
25
|
-
create_prescription(
|
26
|
-
subject_identifier=subject_consent.subject_identifier,
|
27
|
-
report_datetime=subject_consent.consent_datetime,
|
28
|
-
randomizer_name=get_meta_version(),
|
29
|
-
medications=[METFORMIN],
|
30
|
-
site_id=site.id,
|
13
|
+
try:
|
14
|
+
medication = apps.get_model("edc_pharmacy.medication")._default_manager.get(
|
15
|
+
name=METFORMIN
|
31
16
|
)
|
32
|
-
|
33
|
-
|
34
|
-
|
17
|
+
except ObjectDoesNotExist:
|
18
|
+
pass
|
19
|
+
else:
|
20
|
+
site_model_cls = apps.get_model("sites.site")
|
21
|
+
subject_identifiers = [
|
22
|
+
tpl[0]
|
23
|
+
for tpl in apps.get_model("edc_pharmacy.rx")._default_manager.values_list(
|
24
|
+
"subject_identifier"
|
25
|
+
)
|
26
|
+
]
|
27
|
+
for subject_consent in apps.get_model(
|
28
|
+
get_consent_model_name()
|
29
|
+
)._default_manager.exclude(subject_identifier__in=subject_identifiers):
|
30
|
+
site = site_model_cls.objects.get(id=subject_consent.site.id)
|
31
|
+
create_prescription(
|
32
|
+
subject_identifier=subject_consent.subject_identifier,
|
33
|
+
report_datetime=subject_consent.consent_datetime,
|
34
|
+
randomizer_name=get_meta_version(),
|
35
|
+
medications=[METFORMIN],
|
36
|
+
site_id=site.id,
|
37
|
+
)
|
38
|
+
for obj in apps.get_model("edc_pharmacy.rx")._default_manager.all():
|
39
|
+
obj.medications.clear()
|
40
|
+
obj.medications.add(medication)
|
35
41
|
|
36
42
|
|
37
43
|
class Migration(migrations.Migration):
|
@@ -4,11 +4,11 @@ from django.db import migrations
|
|
4
4
|
|
5
5
|
|
6
6
|
def update_egfr_drop_action(apps, schema_editor):
|
7
|
-
action_item_model_cls = apps.get_model("edc_action_item.actionitem")
|
7
|
+
# action_item_model_cls = apps.get_model("edc_action_item.actionitem")
|
8
8
|
crf_metadata_model_cls = apps.get_model("edc_metadata.crfmetadata")
|
9
|
-
action_item_model_cls.objects.filter(
|
10
|
-
|
11
|
-
).update(reference_model="meta_subject.egfrdropnotification")
|
9
|
+
# action_item_model_cls.objects.filter(
|
10
|
+
# reference_model="meta_subject.egfrnotification"
|
11
|
+
# ).update(reference_model="meta_subject.egfrdropnotification")
|
12
12
|
crf_metadata_model_cls.objects.filter(model="meta_subject.egfrnotification").update(
|
13
13
|
model="meta_subject.egfrdropnotification"
|
14
14
|
)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Generated by Django 3.2.11 on 2022-07-22 01:11
|
2
|
-
|
2
|
+
from django.core.exceptions import ObjectDoesNotExist
|
3
3
|
from django.db import migrations
|
4
4
|
from edc_action_item.identifiers import ActionIdentifier
|
5
5
|
from edc_constants.constants import CLOSED, HIGH_PRIORITY
|
@@ -13,28 +13,33 @@ def update_missing_action_items_for_missed_visits(apps, schema_editor):
|
|
13
13
|
actionitem_model_cls = apps.get_model("edc_action_item.actionitem")
|
14
14
|
subjectvisitmissed_model_cls = apps.get_model("meta_subject.subjectvisitmissed")
|
15
15
|
subjectvisit_model_cls = apps.get_model("meta_subject.subjectvisit")
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
total=
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
16
|
+
try:
|
17
|
+
action_type = actiontype_model_cls.objects.get(name=MISSED_VISIT_ACTION)
|
18
|
+
except ObjectDoesNotExist:
|
19
|
+
pass
|
20
|
+
else:
|
21
|
+
total = subjectvisitmissed_model_cls.objects.filter(
|
22
|
+
action_identifier__isnull=True
|
23
|
+
).count()
|
24
|
+
for obj in tqdm(
|
25
|
+
subjectvisitmissed_model_cls.objects.filter(action_identifier__isnull=True),
|
26
|
+
total=total,
|
27
|
+
):
|
28
|
+
subject_visit = subjectvisit_model_cls.objects.get(id=obj.subject_visit_id)
|
29
|
+
action_item = actionitem_model_cls.objects.create(
|
30
|
+
subject_identifier=subject_visit.subject_identifier,
|
31
|
+
action_identifier=ActionIdentifier(site_id=subject_visit.site_id).identifier,
|
32
|
+
report_datetime=subject_visit.report_datetime,
|
33
|
+
action_type=action_type,
|
34
|
+
reference_model="meta_subject.subjectvisitmissed",
|
35
|
+
linked_to_reference=True,
|
36
|
+
priority=HIGH_PRIORITY,
|
37
|
+
status=CLOSED,
|
38
|
+
auto_created=True,
|
39
|
+
site_id=subject_visit.site_id,
|
40
|
+
)
|
41
|
+
obj.action_identifier = action_item.action_identifier
|
42
|
+
obj.save_base(update_fields=["action_identifier"])
|
38
43
|
|
39
44
|
|
40
45
|
class Migration(migrations.Migration):
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Generated by Django 3.2.11 on 2022-07-22 15:25
|
2
|
-
|
2
|
+
from django.core.exceptions import ObjectDoesNotExist
|
3
3
|
from django.db import migrations
|
4
4
|
from tqdm import tqdm
|
5
5
|
|
@@ -9,11 +9,15 @@ from meta_pharmacy.constants import METFORMIN
|
|
9
9
|
def update_rx_missing_medication(apps, schema_editor):
|
10
10
|
medication_model_cls = apps.get_model("edc_pharmacy.medication")
|
11
11
|
rx_model_cls = apps.get_model("edc_pharmacy.rx")
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
try:
|
13
|
+
medication = medication_model_cls.objects.get(name=METFORMIN)
|
14
|
+
except ObjectDoesNotExist:
|
15
|
+
pass
|
16
|
+
else:
|
17
|
+
total = rx_model_cls.objects.filter(medications__isnull=True).count()
|
18
|
+
for obj in tqdm(rx_model_cls.objects.filter(medications__isnull=True), total=total):
|
19
|
+
if not obj.medications.all().exists():
|
20
|
+
obj.medications.add(medication)
|
17
21
|
|
18
22
|
|
19
23
|
class Migration(migrations.Migration):
|
@@ -9,42 +9,46 @@ from tqdm import tqdm
|
|
9
9
|
def update_revised_egrf(apps, schema_editor):
|
10
10
|
bloodresultrft_model_cls = apps.get_model("meta_subject.bloodresultsrft")
|
11
11
|
subjectvisit_model_cls = apps.get_model("meta_subject.subjectvisit")
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
subject_visit__visit_code=DAY1,
|
23
|
-
subject_visit__visit_code_sequence=0,
|
24
|
-
)
|
25
|
-
except ObjectDoesNotExist:
|
26
|
-
pass
|
27
|
-
else:
|
28
|
-
obj.old_egfr_value = obj.egfr_value
|
29
|
-
obj.old_egfr_drop_value = obj.egfr_drop_value
|
30
|
-
obj.egfr_value = EgfrCkdEpi(
|
31
|
-
gender=subject_screening.gender,
|
32
|
-
ethnicity=subject_screening.ethnicity,
|
33
|
-
age_in_years=subject_screening.age_in_years,
|
34
|
-
creatinine_value=obj.creatinine_value,
|
35
|
-
creatinine_units=obj.creatinine_units,
|
36
|
-
).value
|
37
|
-
obj.egfr_drop_value = egfr_percent_change(
|
38
|
-
float(obj.egfr_value), float(baseline_obj.egfr_value)
|
39
|
-
)
|
40
|
-
obj.save_base(
|
41
|
-
update_fields=[
|
42
|
-
"egfr_value",
|
43
|
-
"egfr_drop_value",
|
44
|
-
"old_egfr_value",
|
45
|
-
"old_egfr_drop_value",
|
46
|
-
]
|
12
|
+
try:
|
13
|
+
subjectscreening_model_cls = apps.get_model("meta_screening.subjectscreening")
|
14
|
+
except LookupError:
|
15
|
+
pass
|
16
|
+
else:
|
17
|
+
total = bloodresultrft_model_cls.objects.all().count()
|
18
|
+
for obj in tqdm(bloodresultrft_model_cls.objects.all(), total=total):
|
19
|
+
subject_visit = subjectvisit_model_cls.objects.get(id=obj.subject_visit_id)
|
20
|
+
subject_screening = subjectscreening_model_cls.objects.get(
|
21
|
+
subject_identifier=subject_visit.subject_identifier
|
47
22
|
)
|
23
|
+
try:
|
24
|
+
baseline_obj = bloodresultrft_model_cls.objects.get(
|
25
|
+
subject_visit__subject_identifier=subject_visit.subject_identifier,
|
26
|
+
subject_visit__visit_code=DAY1,
|
27
|
+
subject_visit__visit_code_sequence=0,
|
28
|
+
)
|
29
|
+
except ObjectDoesNotExist:
|
30
|
+
pass
|
31
|
+
else:
|
32
|
+
obj.old_egfr_value = obj.egfr_value
|
33
|
+
obj.old_egfr_drop_value = obj.egfr_drop_value
|
34
|
+
obj.egfr_value = EgfrCkdEpi(
|
35
|
+
gender=subject_screening.gender,
|
36
|
+
ethnicity=subject_screening.ethnicity,
|
37
|
+
age_in_years=subject_screening.age_in_years,
|
38
|
+
creatinine_value=obj.creatinine_value,
|
39
|
+
creatinine_units=obj.creatinine_units,
|
40
|
+
).value
|
41
|
+
obj.egfr_drop_value = egfr_percent_change(
|
42
|
+
float(obj.egfr_value), float(baseline_obj.egfr_value)
|
43
|
+
)
|
44
|
+
obj.save_base(
|
45
|
+
update_fields=[
|
46
|
+
"egfr_value",
|
47
|
+
"egfr_drop_value",
|
48
|
+
"old_egfr_value",
|
49
|
+
"old_egfr_drop_value",
|
50
|
+
]
|
51
|
+
)
|
48
52
|
|
49
53
|
|
50
54
|
class Migration(migrations.Migration):
|
@@ -5,18 +5,22 @@ from tqdm import tqdm
|
|
5
5
|
|
6
6
|
def update_rs_missing_ethnicity(apps, schema_editor):
|
7
7
|
register_subject_model_cls = apps.get_model("edc_registration.registeredsubject")
|
8
|
-
subject_screening_model_cls = apps.get_model("meta_screening.subjectscreening")
|
9
8
|
subject_consent_model_cls = apps.get_model("meta_consent.subjectconsent")
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
try:
|
10
|
+
subject_screening_model_cls = apps.get_model("meta_screening.subjectscreening")
|
11
|
+
except LookupError:
|
12
|
+
pass
|
13
|
+
else:
|
14
|
+
total = subject_consent_model_cls.objects.all().count()
|
15
|
+
for subject_consent in tqdm(subject_consent_model_cls.objects.all(), total=total):
|
16
|
+
subject_screening = subject_screening_model_cls.objects.get(
|
17
|
+
subject_identifier=subject_consent.subject_identifier
|
18
|
+
)
|
19
|
+
register_subject = register_subject_model_cls.objects.get(
|
20
|
+
subject_identifier=subject_consent.subject_identifier
|
21
|
+
)
|
22
|
+
register_subject.ethnicity = subject_screening.ethnicity
|
23
|
+
register_subject.save(update_fields=["ethnicity"])
|
20
24
|
|
21
25
|
|
22
26
|
class Migration(migrations.Migration):
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Generated by Django 4.2.11 on 2024-06-10 19:09
|
2
|
+
|
3
|
+
import django.core.validators
|
4
|
+
from django.db import migrations, models
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
("meta_subject", "0206_bloodresultsfbc_crf_status_and_more"),
|
11
|
+
]
|
12
|
+
|
13
|
+
operations = [
|
14
|
+
migrations.AlterField(
|
15
|
+
model_name="historicalphysicalexam",
|
16
|
+
name="waist_circumference",
|
17
|
+
field=models.DecimalField(
|
18
|
+
blank=True,
|
19
|
+
decimal_places=1,
|
20
|
+
help_text="in centimeters",
|
21
|
+
max_digits=5,
|
22
|
+
null=True,
|
23
|
+
validators=[
|
24
|
+
django.core.validators.MinValueValidator(50.0),
|
25
|
+
django.core.validators.MaxValueValidator(175.0),
|
26
|
+
],
|
27
|
+
verbose_name="Waist circumference",
|
28
|
+
),
|
29
|
+
),
|
30
|
+
migrations.AlterField(
|
31
|
+
model_name="physicalexam",
|
32
|
+
name="waist_circumference",
|
33
|
+
field=models.DecimalField(
|
34
|
+
blank=True,
|
35
|
+
decimal_places=1,
|
36
|
+
help_text="in centimeters",
|
37
|
+
max_digits=5,
|
38
|
+
null=True,
|
39
|
+
validators=[
|
40
|
+
django.core.validators.MinValueValidator(50.0),
|
41
|
+
django.core.validators.MaxValueValidator(175.0),
|
42
|
+
],
|
43
|
+
verbose_name="Waist circumference",
|
44
|
+
),
|
45
|
+
),
|
46
|
+
]
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by Django 4.2.11 on 2024-08-01 16:48
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
import edc_crf.model_mixins.crf_status_model_mixin
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
("meta_subject", "0207_alter_historicalphysicalexam_waist_circumference_and_more"),
|
11
|
+
]
|
12
|
+
|
13
|
+
operations = [
|
14
|
+
migrations.AddField(
|
15
|
+
model_name="birthoutcomes",
|
16
|
+
name="crf_status",
|
17
|
+
field=models.CharField(
|
18
|
+
choices=[
|
19
|
+
("INCOMPLETE", "Incomplete (some data pending)"),
|
20
|
+
("COMPLETE", "Complete"),
|
21
|
+
],
|
22
|
+
default=edc_crf.model_mixins.crf_status_model_mixin.get_crf_status_default,
|
23
|
+
help_text="If some data is still pending, flag this CRF as incomplete",
|
24
|
+
max_length=25,
|
25
|
+
verbose_name="CRF status",
|
26
|
+
),
|
27
|
+
),
|
28
|
+
migrations.AddField(
|
29
|
+
model_name="birthoutcomes",
|
30
|
+
name="crf_status_comments",
|
31
|
+
field=models.TextField(
|
32
|
+
blank=True,
|
33
|
+
help_text="for example, why some data is still pending",
|
34
|
+
null=True,
|
35
|
+
verbose_name="Any comments related to status of this CRF",
|
36
|
+
),
|
37
|
+
),
|
38
|
+
migrations.AddField(
|
39
|
+
model_name="historicalbirthoutcomes",
|
40
|
+
name="crf_status",
|
41
|
+
field=models.CharField(
|
42
|
+
choices=[
|
43
|
+
("INCOMPLETE", "Incomplete (some data pending)"),
|
44
|
+
("COMPLETE", "Complete"),
|
45
|
+
],
|
46
|
+
default=edc_crf.model_mixins.crf_status_model_mixin.get_crf_status_default,
|
47
|
+
help_text="If some data is still pending, flag this CRF as incomplete",
|
48
|
+
max_length=25,
|
49
|
+
verbose_name="CRF status",
|
50
|
+
),
|
51
|
+
),
|
52
|
+
migrations.AddField(
|
53
|
+
model_name="historicalbirthoutcomes",
|
54
|
+
name="crf_status_comments",
|
55
|
+
field=models.TextField(
|
56
|
+
blank=True,
|
57
|
+
help_text="for example, why some data is still pending",
|
58
|
+
null=True,
|
59
|
+
verbose_name="Any comments related to status of this CRF",
|
60
|
+
),
|
61
|
+
),
|
62
|
+
]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by Django 5.0.8 on 2024-08-21 13:45
|
2
|
+
|
3
|
+
import uuid
|
4
|
+
|
5
|
+
import _socket
|
6
|
+
import django.db.models.deletion
|
7
|
+
import django_audit_fields.fields.hostname_modification_field
|
8
|
+
import django_audit_fields.fields.userfield
|
9
|
+
import django_audit_fields.fields.uuid_auto_field
|
10
|
+
import django_audit_fields.models.audit_model_mixin
|
11
|
+
import django_revision.revision_field
|
12
|
+
import edc_crf.model_mixins.crf_status_model_mixin
|
13
|
+
import edc_model.validators.date
|
14
|
+
import edc_model_fields.fields.other_charfield
|
15
|
+
import edc_protocol.validators
|
16
|
+
import edc_utils.date
|
17
|
+
import edc_visit_tracking.managers
|
18
|
+
import simple_history.models
|
19
|
+
from django.conf import settings
|
20
|
+
from django.db import migrations, models
|
21
|
+
|
22
|
+
|
23
|
+
class Migration(migrations.Migration):
|
24
|
+
|
25
|
+
dependencies = [
|
26
|
+
("meta_subject", "0208_birthoutcomes_crf_status_and_more"),
|
27
|
+
("sites", "0002_alter_domain_unique"),
|
28
|
+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
29
|
+
]
|
30
|
+
|
31
|
+
operations = [
|
32
|
+
migrations.RenameModel(
|
33
|
+
old_name="historicaldmdiagnosis",
|
34
|
+
new_name="historicaldmendpoint",
|
35
|
+
),
|
36
|
+
migrations.RenameModel(old_name="dmdiagnosis", new_name="dmendpoint"),
|
37
|
+
]
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# Generated by Django 5.0.8 on 2024-08-21 13:48
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
("meta_subject", "0209_remove_historicaldmdxresult_dm_diagnosis_and_more"),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.RemoveField(
|
14
|
+
model_name="dmdxresult",
|
15
|
+
name="dm_diagnosis",
|
16
|
+
),
|
17
|
+
migrations.RemoveField(
|
18
|
+
model_name="dmdxresult",
|
19
|
+
name="site",
|
20
|
+
),
|
21
|
+
migrations.RemoveField(
|
22
|
+
model_name="historicaldmdxresult",
|
23
|
+
name="dm_diagnosis",
|
24
|
+
),
|
25
|
+
migrations.RemoveField(
|
26
|
+
model_name="historicaldmdxresult",
|
27
|
+
name="history_user",
|
28
|
+
),
|
29
|
+
migrations.RemoveField(
|
30
|
+
model_name="historicaldmdxresult",
|
31
|
+
name="site",
|
32
|
+
),
|
33
|
+
migrations.AlterModelOptions(
|
34
|
+
name="dmendpoint",
|
35
|
+
options={
|
36
|
+
"default_manager_name": "objects",
|
37
|
+
"default_permissions": ("add", "change", "delete", "view", "export", "import"),
|
38
|
+
"verbose_name": "Diabetes endpoint",
|
39
|
+
"verbose_name_plural": "Diabetes endpoint",
|
40
|
+
},
|
41
|
+
),
|
42
|
+
migrations.AlterModelOptions(
|
43
|
+
name="historicaldmendpoint",
|
44
|
+
options={
|
45
|
+
"get_latest_by": ("history_date", "history_id"),
|
46
|
+
"ordering": ("-history_date", "-history_id"),
|
47
|
+
"verbose_name": "historical Diabetes endpoint",
|
48
|
+
"verbose_name_plural": "historical Diabetes endpoint",
|
49
|
+
},
|
50
|
+
),
|
51
|
+
migrations.RenameIndex(
|
52
|
+
model_name="dmendpoint",
|
53
|
+
new_name="meta_subjec_subject_03eaba_idx",
|
54
|
+
old_name="meta_subjec_subject_40b1c1_idx",
|
55
|
+
),
|
56
|
+
migrations.RenameIndex(
|
57
|
+
model_name="dmendpoint",
|
58
|
+
new_name="meta_subjec_subject_605359_idx",
|
59
|
+
old_name="meta_subjec_subject_2059c2_idx",
|
60
|
+
),
|
61
|
+
migrations.AlterField(
|
62
|
+
model_name="dmendpoint",
|
63
|
+
name="dx_date",
|
64
|
+
field=models.DateField(verbose_name="Date endpoint reached"),
|
65
|
+
),
|
66
|
+
migrations.AlterField(
|
67
|
+
model_name="dmendpoint",
|
68
|
+
name="dx_initiated_by",
|
69
|
+
field=models.CharField(
|
70
|
+
default="QUESTION_RETIRED",
|
71
|
+
max_length=25,
|
72
|
+
verbose_name="What initiated the diagnosis",
|
73
|
+
),
|
74
|
+
),
|
75
|
+
migrations.AlterField(
|
76
|
+
model_name="dmendpoint",
|
77
|
+
name="dx_tmg",
|
78
|
+
field=models.CharField(
|
79
|
+
choices=[
|
80
|
+
("Yes", "Yes"),
|
81
|
+
("No", "No"),
|
82
|
+
("QUESTION_RETIRED", "Question retired"),
|
83
|
+
],
|
84
|
+
default="QUESTION_RETIRED",
|
85
|
+
max_length=25,
|
86
|
+
verbose_name="Was this case discussed with the TMG?",
|
87
|
+
),
|
88
|
+
),
|
89
|
+
migrations.AlterField(
|
90
|
+
model_name="historicaldmendpoint",
|
91
|
+
name="dx_date",
|
92
|
+
field=models.DateField(verbose_name="Date endpoint reached"),
|
93
|
+
),
|
94
|
+
migrations.AlterField(
|
95
|
+
model_name="historicaldmendpoint",
|
96
|
+
name="dx_initiated_by",
|
97
|
+
field=models.CharField(
|
98
|
+
default="QUESTION_RETIRED",
|
99
|
+
max_length=25,
|
100
|
+
verbose_name="What initiated the diagnosis",
|
101
|
+
),
|
102
|
+
),
|
103
|
+
migrations.AlterField(
|
104
|
+
model_name="historicaldmendpoint",
|
105
|
+
name="dx_tmg",
|
106
|
+
field=models.CharField(
|
107
|
+
choices=[
|
108
|
+
("Yes", "Yes"),
|
109
|
+
("No", "No"),
|
110
|
+
("QUESTION_RETIRED", "Question retired"),
|
111
|
+
],
|
112
|
+
default="QUESTION_RETIRED",
|
113
|
+
max_length=25,
|
114
|
+
verbose_name="Was this case discussed with the TMG?",
|
115
|
+
),
|
116
|
+
),
|
117
|
+
migrations.DeleteModel(
|
118
|
+
name="DmDxResult",
|
119
|
+
),
|
120
|
+
migrations.DeleteModel(
|
121
|
+
name="HistoricalDmDxResult",
|
122
|
+
),
|
123
|
+
]
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by Django 5.0.8 on 2024-08-21 23:56
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
("meta_subject", "0210_remove_dmdxresult_dm_diagnosis_and_more"),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.AddField(
|
14
|
+
model_name="dmendpoint",
|
15
|
+
name="endpoint_reached",
|
16
|
+
field=models.CharField(
|
17
|
+
choices=[("Yes", "Yes"), ("No", "No")],
|
18
|
+
help_text="If YES, the EDC will check for the patient on the Endpoints report.",
|
19
|
+
max_length=15,
|
20
|
+
null=True,
|
21
|
+
verbose_name="Was the patient referred because the diabetes endpoint was reached?",
|
22
|
+
),
|
23
|
+
),
|
24
|
+
migrations.AddField(
|
25
|
+
model_name="historicaldmendpoint",
|
26
|
+
name="endpoint_reached",
|
27
|
+
field=models.CharField(
|
28
|
+
choices=[("Yes", "Yes"), ("No", "No")],
|
29
|
+
help_text="If YES, the EDC will check for the patient on the Endpoints report.",
|
30
|
+
max_length=15,
|
31
|
+
null=True,
|
32
|
+
verbose_name="Was the patient referred because the diabetes endpoint was reached?",
|
33
|
+
),
|
34
|
+
),
|
35
|
+
migrations.AlterField(
|
36
|
+
model_name="dmendpoint",
|
37
|
+
name="dx_date",
|
38
|
+
field=models.DateField(null=True, verbose_name="Date endpoint reached"),
|
39
|
+
),
|
40
|
+
migrations.AlterField(
|
41
|
+
model_name="historicaldmendpoint",
|
42
|
+
name="dx_date",
|
43
|
+
field=models.DateField(null=True, verbose_name="Date endpoint reached"),
|
44
|
+
),
|
45
|
+
]
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated by Django 5.0.8 on 2024-08-27 19:22
|
2
|
+
|
3
|
+
from django.db import migrations
|
4
|
+
from django.db.migrations import RunPython
|
5
|
+
from edc_constants.constants import NO, YES
|
6
|
+
|
7
|
+
|
8
|
+
def update_old_fasting_choices(apps, schema_editor):
|
9
|
+
result = {"fasting": 0, "non_fasting": 0}
|
10
|
+
model_cls = apps.get_model("meta_subject.glucosefbg")
|
11
|
+
result["fasting"] = model_cls.objects.filter(fasting="fasting").update(fasting=YES)
|
12
|
+
result["non_fasting"] = model_cls.objects.filter(fasting="non_fasting").update(fasting=NO)
|
13
|
+
print(f"Updated: results are {result}")
|
14
|
+
print("Done.")
|
15
|
+
|
16
|
+
|
17
|
+
class Migration(migrations.Migration):
|
18
|
+
|
19
|
+
dependencies = [
|
20
|
+
("meta_subject", "0211_dmendpoint_endpoint_reached_and_more"),
|
21
|
+
]
|
22
|
+
|
23
|
+
operations = [RunPython(update_old_fasting_choices)]
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Generated by Django 5.0.8 on 2024-08-28 19:54
|
2
|
+
|
3
|
+
from django.conf import settings
|
4
|
+
from django.db import migrations
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
("edc_action_item", "0037_remove_actionitem_reference_model_and_more"),
|
11
|
+
("meta_subject", "0212_auto_20240827_2222"),
|
12
|
+
("sites", "0002_alter_domain_unique"),
|
13
|
+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
14
|
+
]
|
15
|
+
|
16
|
+
operations = [
|
17
|
+
migrations.RenameModel(
|
18
|
+
old_name="BloodResultsLipid",
|
19
|
+
new_name="BloodResultsLipids",
|
20
|
+
),
|
21
|
+
migrations.RenameModel(
|
22
|
+
old_name="HistoricalBloodResultsLipid",
|
23
|
+
new_name="HistoricalBloodResultsLipids",
|
24
|
+
),
|
25
|
+
migrations.RenameIndex(
|
26
|
+
model_name="bloodresultslipids",
|
27
|
+
new_name="meta_subjec_subject_eff3e6_idx",
|
28
|
+
old_name="meta_subjec_subject_296de9_idx",
|
29
|
+
),
|
30
|
+
migrations.RenameIndex(
|
31
|
+
model_name="bloodresultslipids",
|
32
|
+
new_name="meta_subjec_subject_49b971_idx",
|
33
|
+
old_name="meta_subjec_subject_9692a2_idx",
|
34
|
+
),
|
35
|
+
]
|