clinicedc 2.0.40__py3-none-any.whl → 2.0.42__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.40.dist-info → clinicedc-2.0.42.dist-info}/METADATA +3 -1
- {clinicedc-2.0.40.dist-info → clinicedc-2.0.42.dist-info}/RECORD +338 -344
- edc_action_item/action.py +1 -1
- edc_action_item/action_item_notification.py +1 -1
- edc_action_item/choices.py +1 -1
- edc_action_item/data_fixers.py +1 -2
- edc_action_item/delete_action_item.py +1 -2
- edc_action_item/forms/action_item_form.py +1 -1
- edc_action_item/models/action_item.py +1 -1
- edc_action_item/models/action_type.py +1 -1
- edc_action_item/models/signals.py +1 -1
- edc_action_item/templatetags/action_item_extras.py +1 -1
- edc_action_item/utils.py +1 -2
- edc_action_item/view_mixins/action_item_view_mixin.py +1 -1
- edc_adherence/choices.py +1 -1
- edc_adherence/form_validator_mixin.py +1 -2
- edc_adherence/list_data.py +1 -1
- edc_adherence/model_mixins.py +1 -1
- edc_adverse_event/action_items/ae_followup_action.py +9 -9
- edc_adverse_event/action_items/ae_initial_action.py +12 -16
- edc_adverse_event/action_items/ae_susar_action.py +2 -1
- edc_adverse_event/action_items/ae_tmg_action.py +6 -4
- edc_adverse_event/action_items/death_report_action.py +7 -7
- edc_adverse_event/action_items/death_report_tmg_action.py +2 -1
- edc_adverse_event/action_items/death_report_tmg_second_action.py +2 -1
- edc_adverse_event/action_items/hospitalization_action.py +2 -1
- edc_adverse_event/auths.py +3 -1
- edc_adverse_event/choices.py +13 -6
- edc_adverse_event/constants.py +1 -23
- edc_adverse_event/form_validator_mixins/death_report_form_validator.py +1 -1
- edc_adverse_event/form_validator_mixins/requires_death_report_form_validator_mixin.py +1 -2
- edc_adverse_event/form_validators/ae_followup.py +2 -3
- edc_adverse_event/form_validators/ae_initial.py +2 -1
- edc_adverse_event/form_validators/ae_tmg.py +2 -1
- edc_adverse_event/form_validators/death_report_tmg.py +1 -1
- edc_adverse_event/form_validators/hospitalization.py +2 -1
- edc_adverse_event/list_data.py +1 -1
- edc_adverse_event/model_mixins/ae_followup/ae_followup_fields_model_mixin.py +1 -1
- edc_adverse_event/model_mixins/ae_followup/ae_followup_methods_model_mixin.py +1 -2
- edc_adverse_event/model_mixins/ae_initial/ae_initial_fields_model_mixin.py +1 -1
- edc_adverse_event/model_mixins/ae_initial/ae_initial_susar_model_mixin.py +2 -2
- edc_adverse_event/model_mixins/ae_susar/ae_susar_methods_model_mixin.py +1 -2
- edc_adverse_event/model_mixins/ae_tmg/ae_tmg_fields_model_mixin.py +1 -1
- edc_adverse_event/model_mixins/hospitaization/hospitalization_model_mixin.py +1 -1
- edc_adverse_event/modeladmin_mixins/ae_initial_admin_mixin.py +1 -1
- edc_adverse_event/modeladmin_mixins/ae_tmg_admin_mixin.py +1 -1
- edc_adverse_event/modeladmin_mixins/death_report_admin_mixin.py +1 -1
- edc_adverse_event/modeladmin_mixins/death_report_tmg_admin_mixin.py +1 -1
- edc_adverse_event/modelform_mixins/ae_followup_modelform_mixin.py +1 -2
- edc_adverse_event/modelform_mixins/ae_initial_modelform_mixin.py +1 -2
- edc_adverse_event/models/signals.py +2 -2
- edc_adverse_event/pdf_reports/ae_pdf_report.py +3 -2
- edc_adverse_event/pdf_reports/death_pdf_report.py +3 -2
- edc_adverse_event/templatetags/edc_adverse_event_extras.py +2 -3
- edc_adverse_event/urls.py +1 -0
- edc_adverse_event/utils.py +11 -14
- edc_adverse_event/view_mixins/ae/ae_listboard_view_mixin.py +3 -3
- edc_adverse_event/view_mixins/ae/death_report_listboard_view_mixin.py +1 -1
- edc_adverse_event/view_mixins/tmg/tmg_ae_listboard_view_mixin.py +2 -1
- edc_adverse_event/views/home_view.py +1 -0
- edc_adverse_event/views/tmg/home_view.py +1 -1
- edc_adverse_event/views/tmg/status_listboards.py +1 -1
- edc_analytics/custom_tables/age.py +1 -2
- edc_analytics/custom_tables/art.py +1 -2
- edc_analytics/custom_tables/bmi.py +1 -3
- edc_analytics/custom_tables/bp.py +1 -3
- edc_analytics/custom_tables/fasting.py +1 -2
- edc_analytics/custom_tables/fbg.py +1 -2
- edc_analytics/custom_tables/fbg_ogtt.py +1 -2
- edc_analytics/custom_tables/hba1c.py +1 -2
- edc_analytics/custom_tables/ogtt.py +1 -2
- edc_analytics/custom_tables/waist.py +1 -2
- edc_analytics/row/row_statistics_with_gender.py +1 -2
- edc_analytics/table.py +1 -2
- edc_appointment/admin/actions.py +1 -1
- edc_appointment/admin/appointment_admin.py +1 -1
- edc_appointment/appointment_reason_updater.py +1 -1
- edc_appointment/choices.py +1 -2
- edc_appointment/form_validator_mixins/next_appointment_crf_form_validator_mixin.py +1 -1
- edc_appointment/list_data.py +2 -3
- edc_appointment/model_mixins/missed_appointment_model_mixin.py +1 -1
- edc_appointment/model_mixins/next_appointment_crf_model_mixin.py +1 -2
- edc_appointment/modeladmin_mixins/next_appointment_crf_modeladmin_mixin.py +1 -1
- edc_appointment/models/signals.py +1 -1
- edc_appointment/utils.py +4 -2
- edc_auth/constants.py +3 -0
- edc_consent/choices.py +1 -1
- edc_consent/consent_definition.py +1 -1
- edc_consent/consent_definition_extension.py +1 -1
- edc_consent/field_mixins/citizen_fields_mixin.py +3 -3
- edc_consent/model_mixins/consent_model_mixin.py +1 -1
- edc_consent/modelform_mixins/consent_modelform_mixin/consent_modelform_validation_mixin.py +1 -1
- edc_consent/modelform_mixins/consent_modelform_mixin/review_fields_modelform_mixin.py +1 -2
- edc_consent/validators.py +5 -10
- edc_constants/__init__.py +0 -3
- edc_constants/choices.py +2 -3
- edc_constants/context_processor.py +2 -3
- edc_constants/utils.py +2 -3
- edc_crf/model_mixins/crf_status_model_mixin.py +1 -1
- edc_crf/model_mixins/singleton_crf_model_mixin.py +0 -1
- edc_crf/update_crf_status_command.py +1 -2
- edc_crf/update_crf_status_for_instance.py +1 -2
- edc_dashboard/url_config.py +1 -2
- edc_dashboard/views/administration_view.py +1 -0
- edc_data_manager/action_items.py +7 -7
- edc_data_manager/admin/actions.py +1 -1
- edc_data_manager/admin/data_query_admin.py +10 -10
- edc_data_manager/choices.py +1 -1
- edc_data_manager/forms/data_query.py +1 -1
- edc_data_manager/handlers/handlers.py +1 -1
- edc_data_manager/migrations/0043_alter_historicalqueryrule_comment_and_more.py +51 -0
- edc_data_manager/models/data_query.py +1 -1
- edc_data_manager/models/model_mixins.py +1 -2
- edc_data_manager/models/query_rule.py +1 -1
- edc_data_manager/view_mixins/data_manager_view_mixin.py +1 -1
- edc_document_status/model_mixins.py +1 -1
- edc_document_status/models/signals.py +1 -2
- edc_dx/diagnoses.py +2 -3
- edc_dx/form_validators/diagnosis_form_validator_mixin.py +1 -2
- edc_dx_review/choices.py +1 -1
- edc_dx_review/form_validator_mixins/clinical_review_followup_form_validator_mixin.py +2 -1
- edc_dx_review/list_data.py +1 -1
- edc_dx_review/medical_date.py +1 -1
- edc_dx_review/model_mixins/clinical_review_baseline_model_mixin.py +1 -1
- edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_chol_model_mixin.py +1 -1
- edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_dm_model_mixin.py +1 -1
- edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_hiv_model_mixin.py +1 -1
- edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_htn_model_mixin.py +1 -1
- edc_dx_review/model_mixins/clinical_review_followup/clinical_review_followup_model_mixin.py +1 -1
- edc_dx_review/model_mixins/factory/baseline_review_model_mixin_factory.py +1 -1
- edc_dx_review/model_mixins/factory/calculate_date.py +1 -1
- edc_dx_review/model_mixins/factory/dx_initial_review_model_mixin_factory.py +1 -1
- edc_dx_review/model_mixins/factory/followup_review_model_mixin_factory.py +1 -1
- edc_dx_review/model_mixins/factory/rx_initial_review_model_mixin_factory.py +1 -1
- edc_dx_review/model_mixins/followup_review/followup_review_model_mixin.py +1 -1
- edc_dx_review/model_mixins/followup_review/hiv_followup_review_model_mixin.py +1 -1
- edc_dx_review/model_mixins/initial_review/chol_initial_review_model_mixin.py +1 -1
- edc_dx_review/model_mixins/initial_review/hiv_initial_model_mixins.py +2 -3
- edc_dx_review/model_mixins/initial_review/ncd_initial_review_model_mixin.py +1 -1
- edc_dx_review/utils.py +1 -1
- edc_egfr/__init__.py +0 -1
- edc_egfr/egfr.py +23 -15
- edc_egfr/form_validator_mixins/egfr_form_validator_mixins.py +30 -25
- edc_egfr/model_mixins/egfr_drop_notification_model_mixin.py +8 -2
- edc_egfr/model_mixins/egfr_model_mixin.py +2 -2
- edc_export/management/commands/import_receipts.py +1 -2
- edc_export/model_exporter/object_history_helpers.py +1 -2
- edc_export/models/object_history.py +1 -1
- edc_export/models/upload_export_receipt_file.py +1 -1
- edc_facility/list_data.py +1 -1
- edc_fieldsets/fieldsets_modeladmin_mixin.py +1 -2
- edc_form_validators/applicable_field_validator.py +1 -1
- edc_form_validators/date_validator.py +1 -1
- edc_form_validators/many_to_many_field_validator.py +1 -2
- edc_form_validators/other_specify_field_validator.py +1 -2
- edc_form_validators/required_field_validator.py +1 -2
- edc_glucose/form_validators/fasting_form_validator.py +1 -1
- edc_glucose/form_validators/glucose_form_validator.py +3 -3
- edc_glucose/form_validators/glucose_form_validator_mixin.py +1 -2
- edc_glucose/form_validators/ogtt_form_validator_mixin.py +1 -2
- edc_glucose/model_mixin_factories/fasting_model_mixin_factory.py +1 -1
- edc_glucose/model_mixin_factories/fbg_model_mixin_factory.py +1 -2
- edc_glucose/model_mixin_factories/glucose_model_mixin_factory.py +1 -1
- edc_glucose/model_mixin_factories/ogtt_model_mixin_factory.py +1 -2
- edc_glucose/model_mixins/hba1c_model_mixin.py +1 -3
- edc_glucose/utils.py +2 -2
- edc_identifier/model_mixins.py +1 -2
- edc_identifier/models.py +1 -1
- edc_identifier/simple_identifier.py +1 -2
- edc_lab/admin/modeladmin_mixins.py +1 -1
- edc_lab/choices.py +7 -10
- edc_lab/constants.py +0 -2
- edc_lab/form_validators/crf_requisition_form_validator_mixin.py +1 -0
- edc_lab/form_validators/requisition_form_validator_mixin.py +1 -1
- edc_lab/lab/specimen.py +1 -2
- edc_lab/model_mixins/requisition/requisition_identifier_mixin.py +1 -1
- edc_lab/model_mixins/requisition/requisition_model_mixin.py +1 -1
- edc_lab/model_mixins/shipping/manifest_model_mixin.py +1 -1
- edc_lab/model_mixins/shipping/verify_model_mixin.py +1 -2
- edc_lab/models/box.py +1 -1
- edc_lab_dashboard/middleware.py +1 -0
- edc_lab_dashboard/urls.py +1 -0
- edc_lab_dashboard/view_mixins/form_action_view_mixin.py +1 -0
- edc_lab_dashboard/view_mixins/process_requisition_view_mixin.py +1 -1
- edc_lab_dashboard/views/action_views/manage_box_item_view.py +1 -0
- edc_lab_dashboard/views/action_views/receive_view.py +1 -1
- edc_lab_dashboard/views/listboard_views/manage_box_listboard_view.py +1 -0
- edc_lab_dashboard/views/listboard_views/pack_listboard_view.py +1 -1
- edc_lab_dashboard/views/listboard_views/process_listboard_view.py +2 -1
- edc_lab_dashboard/views/listboard_views/receive_listboard_view.py +2 -1
- edc_lab_dashboard/views/listboard_views/requisition_listboard_view.py +1 -2
- edc_lab_dashboard/views/listboard_views/verify_box_listboard_view.py +1 -0
- edc_lab_results/action_items.py +1 -1
- edc_lab_results/form_validator_mixins/blood_results_fbg_form_validator_mixin.py +1 -1
- edc_lab_results/form_validator_mixins/blood_results_form_validator_mixin.py +2 -1
- edc_lab_results/model_mixin_factories/field_attrs.py +1 -1
- edc_lab_results/model_mixins/electrolytes_model_mixins.py +2 -2
- edc_lab_results/model_mixins/fbc_model_mixins.py +9 -8
- edc_lab_results/model_mixins/fbg_model_mixin.py +2 -7
- edc_lab_results/model_mixins/glucose_model_mixin.py +2 -7
- edc_lab_results/model_mixins/insulin_model_mixin.py +2 -1
- edc_lab_results/model_mixins/lft_model_mixins.py +7 -6
- edc_lab_results/model_mixins/lipid_model_mixins.py +1 -2
- edc_lab_results/model_mixins/proteinuria_model_mixin.py +1 -2
- edc_lab_results/model_mixins/rft_model_mixins.py +5 -3
- edc_listboard/views/screen/screening_listboard_view.py +1 -1
- edc_locator/action_items.py +2 -1
- edc_locator/forms/subject_locator_form_validator.py +1 -1
- edc_locator/modeladmin_mixins.py +1 -1
- edc_ltfu/action_items.py +2 -1
- edc_ltfu/choices.py +1 -1
- edc_ltfu/constants.py +0 -2
- edc_ltfu/forms/ltfu_form_validator.py +2 -1
- edc_ltfu/forms/ltfu_form_validator_mixin.py +1 -1
- edc_ltfu/modelform_mixins.py +2 -5
- edc_metadata/admin/modeladmin_mixins.py +4 -4
- edc_model/choices.py +1 -1
- edc_model/models/fields/date_estimated.py +1 -1
- edc_model_admin/context_processors.py +1 -1
- edc_model_admin/list_filters/future_date_list_filter.py +6 -7
- edc_model_admin/list_filters/list_field_with_other_list_filter.py +1 -1
- edc_model_admin/list_filters/past_date_list_filter.py +6 -7
- edc_model_admin/mixins/model_admin_redirect_on_delete_mixin.py +1 -0
- edc_model_admin/templatetags/edc_admin_modify.py +1 -1
- edc_model_fields/fields/date_estimated.py +1 -1
- edc_model_to_dataframe/model_to_dataframe.py +1 -1
- edc_navbar/navbar_item.py +1 -0
- edc_navbar/system_checks.py +3 -0
- edc_offstudy/action_items.py +2 -1
- edc_offstudy/choices.py +2 -1
- edc_pdf_reports/crf_pdf_report.py +9 -7
- edc_pdutils/dataframes/get_subject_consent.py +1 -2
- edc_pdutils/dataframes/get_subject_visit.py +1 -11
- edc_pdutils/helper.py +1 -2
- edc_pdutils/mappings.py +1 -1
- edc_pdutils/tables/crf.py +1 -2
- edc_pdutils/tables/requisition.py +1 -2
- edc_pdutils/utils/__init__.py +1 -0
- edc_pdutils/utils/convert_visit_code_to_float.py +8 -0
- edc_pdutils/utils/decrypt.py +5 -4
- edc_pdutils/utils/missing_subject_identifiers.py +5 -4
- edc_pharmacy/action_items.py +2 -1
- edc_pharmacy/admin/list_filters.py +1 -1
- edc_pharmacy/admin/stock/allocation_admin.py +1 -1
- edc_pharmacy/admin/stock/order_item_admin.py +1 -1
- edc_pharmacy/admin/stock/stock_request_admin.py +1 -1
- edc_pharmacy/admin/stock/stock_transfer_admin.py +1 -1
- edc_pharmacy/admin/stock/stock_transfer_item_admin.py +1 -1
- edc_pharmacy/choices.py +1 -2
- edc_pharmacy/form_validators/crf/study_medication_form_validator.py +1 -1
- edc_pharmacy/list_data.py +1 -1
- edc_pharmacy/model_mixins/study_medication_crf_model_mixin.py +1 -1
- edc_pharmacy/model_mixins/study_medication_refill_model_mixin.py +1 -1
- edc_pharmacy/models/model_mixins.py +1 -2
- edc_pharmacy/models/prescription/rx.py +1 -1
- edc_pharmacy/models/signals.py +1 -1
- edc_pharmacy/models/stock/order.py +1 -1
- edc_pharmacy/models/stock/order_item.py +1 -2
- edc_pharmacy/models/stock/stock_request.py +1 -1
- edc_pharmacy/views/confirm_stock_from_queryset_view.py +2 -1
- edc_pharmacy/views/confirmation_at_site_view.py +1 -1
- edc_prn/models.py +1 -2
- edc_protocol_incident/action_items.py +2 -1
- edc_protocol_incident/choices.py +1 -1
- edc_protocol_incident/form_validators/mixins.py +2 -1
- edc_protocol_incident/form_validators/protocol_deviation_violation_form_validator.py +2 -1
- edc_protocol_incident/form_validators/protocol_incident_form_validator.py +2 -1
- edc_protocol_incident/list_data.py +1 -1
- edc_protocol_incident/model_mixins/protocol_deviation_violation_model_mixin.py +1 -1
- edc_protocol_incident/modeladmin_mixins.py +1 -1
- edc_qareports/choices.py +1 -1
- edc_qareports/migrations/0017_auto_20240816_0256.py +1 -2
- edc_qareports/modeladmin_mixins/list_filters.py +1 -2
- edc_qareports/modeladmin_mixins/qa_report_modeladmin_mixin.py +1 -1
- edc_qareports/sql_generator/requisition_subquery.py +1 -1
- edc_refusal/forms.py +2 -1
- edc_refusal/list_data.py +1 -1
- edc_registration/model_mixins/updates_or_creates_registered_subject_model_mixin.py +1 -1
- edc_registration/models/registered_subject.py +1 -1
- edc_reportable/__init__.py +0 -35
- edc_reportable/choices.py +8 -3
- edc_reportable/constants.py +0 -7
- edc_reportable/data/__init__.py +0 -1
- edc_reportable/data/grading_data/ctcae_v5.py +1 -2
- edc_reportable/data/grading_data/daids_july_2017.py +7 -6
- edc_reportable/data/normal_data/africa.py +6 -5
- edc_reportable/exceptions.py +0 -4
- edc_reportable/forms/reportables_form_validator_mixin.py +2 -1
- edc_reportable/formula.py +1 -1
- edc_reportable/post_migrate_signals.py +1 -1
- edc_reportable/reference_range_evaluator.py +8 -2
- edc_reportable/units.py +2 -23
- edc_reportable/utils/__init__.py +1 -1
- edc_reportable/utils/get_mw.py +20 -0
- edc_reportable/utils/get_normal_data_or_raise.py +1 -1
- edc_review_dashboard/auths.py +1 -1
- edc_review_dashboard/middleware.py +1 -0
- edc_review_dashboard/urls.py +1 -0
- edc_review_dashboard/views/subject_review_listboard_view.py +1 -0
- edc_screening/choices.py +1 -1
- edc_screening/gender_evaluator.py +1 -1
- edc_screening/model_mixins/screening_fields_model_mixin.py +1 -1
- edc_screening/modelform_mixins.py +1 -1
- edc_screening/screening_eligibility.py +1 -2
- edc_sites/models/site_profile.py +1 -2
- edc_sites/site.py +1 -1
- edc_subject_dashboard/requisition_labels.py +1 -1
- edc_subject_dashboard/requisition_report.py +1 -1
- edc_subject_dashboard/requisition_verifier.py +1 -1
- edc_subject_dashboard/urls.py +1 -0
- edc_subject_dashboard/view_utils/go_to_forms_button.py +1 -1
- edc_subject_dashboard/views/requisition_print_actions_view.py +1 -1
- edc_subject_dashboard/views/subject_dashboard_view.py +1 -0
- edc_transfer/action_items.py +2 -1
- edc_transfer/choices.py +1 -1
- edc_transfer/form_validators.py +1 -1
- edc_transfer/list_data.py +1 -1
- edc_unblinding/action_items.py +2 -1
- edc_unblinding/models/unblinding_request.py +1 -1
- edc_unblinding/models/unblinding_review.py +1 -1
- edc_visit_schedule/action_items.py +2 -1
- edc_visit_schedule/admin/subject_schedule_history_admin.py +1 -0
- edc_visit_tracking/action_items.py +2 -1
- edc_visit_tracking/choices.py +1 -1
- edc_visit_tracking/form_validators/visit_form_validator.py +1 -1
- edc_visit_tracking/form_validators/visit_missed_form_validator.py +2 -1
- edc_visit_tracking/managers.py +1 -2
- edc_visit_tracking/model_mixins/subject_visit_missed_model_mixin.py +1 -1
- edc_visit_tracking/model_mixins/visit_model_mixin/caretaker_fields_mixin.py +1 -1
- edc_visit_tracking/model_mixins/visit_model_mixin/visit_model_fields_mixin.py +1 -1
- edc_visit_tracking/model_mixins/visit_model_mixin/visit_model_mixin.py +1 -1
- edc_visit_tracking/modeladmin_mixins/crf_model_admin_mixin.py +2 -1
- edc_visit_tracking/modeladmin_mixins/visit_model_admin_mixin.py +1 -1
- edc_visit_tracking/models/signals.py +1 -1
- edc_visit_tracking/view_utils/related_visit_button.py +1 -1
- edc_vitals/form_validators/blood_pressure_form_validator_mixin.py +1 -2
- edc_constants/constants.py +0 -250
- edc_constants/disease_constants.py +0 -22
- edc_egfr/calculators/__init__.py +0 -4
- edc_egfr/calculators/base_egrfr.py +0 -56
- edc_egfr/calculators/egfr_ckd_epi.py +0 -68
- edc_egfr/calculators/egfr_cockcroft_gault.py +0 -62
- edc_egfr/calculators/percent_change.py +0 -7
- edc_reportable/data/molecular_weights.py +0 -11
- edc_reportable/utils/convert_units.py +0 -163
- {clinicedc-2.0.40.dist-info → clinicedc-2.0.42.dist-info}/WHEEL +0 -0
- {clinicedc-2.0.40.dist-info → clinicedc-2.0.42.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import NOT_APPLICABLE, YES
|
|
3
4
|
from django.db import models
|
|
4
5
|
|
|
5
6
|
from edc_constants.choices import YES_NO, YES_NO_NA
|
|
6
|
-
from edc_constants.constants import NOT_APPLICABLE, YES
|
|
7
7
|
from edc_model.models import DurationYMDField
|
|
8
8
|
from edc_model.validators import date_not_future
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
1
2
|
from django.db import models
|
|
2
3
|
|
|
3
4
|
from edc_constants.choices import YES_NO
|
|
4
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
5
5
|
|
|
6
6
|
from ...choices import CHOL_MANAGEMENT
|
|
7
7
|
from ..dx_location_model_mixin import DxLocationModelMixin
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
from clinicedc_constants import COPIES_PER_MILLILITER, NOT_APPLICABLE, YES
|
|
1
2
|
from django.core.validators import MaxValueValidator, MinValueValidator
|
|
2
3
|
from django.db import models
|
|
3
|
-
|
|
4
4
|
from edc_constants.choices import YES_NO, YES_NO_NA, YES_NO_PENDING_NA
|
|
5
|
-
from edc_constants.constants import NOT_APPLICABLE, YES
|
|
6
5
|
from edc_lab.choices import VL_QUANTIFIER_NA
|
|
7
6
|
from edc_model import estimated_date_from_ago
|
|
8
7
|
from edc_model import models as edc_models
|
|
9
8
|
from edc_model.validators import date_not_future
|
|
10
|
-
from edc_reportable import CELLS_PER_MILLIMETER_CUBED_DISPLAY
|
|
9
|
+
from edc_reportable.units import CELLS_PER_MILLIMETER_CUBED_DISPLAY
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class HivArvInitiationModelMixin(models.Model):
|
edc_dx_review/utils.py
CHANGED
|
@@ -3,12 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
from datetime import date, datetime
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import HIV, YES
|
|
6
7
|
from django import forms
|
|
7
8
|
from django.apps import apps as django_apps
|
|
8
9
|
from django.conf import settings
|
|
9
10
|
from django.core.exceptions import ObjectDoesNotExist
|
|
10
11
|
|
|
11
|
-
from edc_constants.constants import HIV, YES
|
|
12
12
|
from edc_model.utils import model_exists_or_raise
|
|
13
13
|
from edc_visit_schedule.baseline import VisitScheduleBaselineError
|
|
14
14
|
from edc_visit_schedule.utils import is_baseline
|
edc_egfr/__init__.py
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .calculators import EgfrCkdEpi, EgfrCockcroftGault
|
edc_egfr/egfr.py
CHANGED
|
@@ -4,18 +4,19 @@ from datetime import date, datetime
|
|
|
4
4
|
from decimal import Decimal
|
|
5
5
|
from typing import TYPE_CHECKING, Any
|
|
6
6
|
|
|
7
|
+
from clinicedc_constants import NEW
|
|
8
|
+
from clinicedc_constants.units import EGFR_UNITS, PERCENT
|
|
9
|
+
from clinicedc_utils import EgfrCkdEpi2009, EgfrCockcroftGault, egfr_percent_change
|
|
10
|
+
from clinicedc_utils.constants import CKD_EPI, COCKCROFT_GAULT
|
|
7
11
|
from dateutil.relativedelta import relativedelta
|
|
8
12
|
from django.core.exceptions import ObjectDoesNotExist
|
|
9
13
|
from django.db import transaction
|
|
10
14
|
from django.utils import timezone
|
|
11
15
|
|
|
12
|
-
from edc_constants.constants import NEW
|
|
13
16
|
from edc_reportable.models import ReferenceRangeCollection
|
|
14
|
-
from edc_reportable.units import EGFR_UNITS, PERCENT
|
|
15
17
|
from edc_reportable.utils import get_grade_for_value
|
|
16
18
|
from edc_utils.age import age
|
|
17
19
|
|
|
18
|
-
from .calculators import EgfrCkdEpi, EgfrCockcroftGault, egfr_percent_change
|
|
19
20
|
from .get_drop_notification_model import get_egfr_drop_notification_model_cls
|
|
20
21
|
|
|
21
22
|
if TYPE_CHECKING:
|
|
@@ -27,7 +28,7 @@ class EgfrError(Exception):
|
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class Egfr:
|
|
30
|
-
calculators: dict = {
|
|
31
|
+
calculators: dict = {CKD_EPI: EgfrCkdEpi2009, COCKCROFT_GAULT: EgfrCockcroftGault} # noqa: RUF012
|
|
31
32
|
|
|
32
33
|
def __init__(
|
|
33
34
|
self,
|
|
@@ -54,16 +55,11 @@ class Egfr:
|
|
|
54
55
|
self._egfr_grade = None
|
|
55
56
|
self._egfr_drop_value: Decimal | None = None
|
|
56
57
|
self._egfr_drop_grade = None
|
|
58
|
+
self._formula_name = formula_name
|
|
57
59
|
self.assay_date: date | None = None
|
|
58
60
|
self.related_visit = None
|
|
59
|
-
|
|
60
61
|
self.baseline_egfr_value = baseline_egfr_value
|
|
61
|
-
|
|
62
|
-
raise EgfrError(
|
|
63
|
-
f"Invalid formula_name. Expected one of {list(self.calculators.keys())}. "
|
|
64
|
-
f"Got {formula_name}."
|
|
65
|
-
)
|
|
66
|
-
self.calculator_cls = self.calculators.get(formula_name)
|
|
62
|
+
self.calculator_cls = self.calculators.get(self.formula_name)
|
|
67
63
|
self.age_in_years = age_in_years
|
|
68
64
|
self.dob = dob
|
|
69
65
|
self.weight_in_kgs = weight_in_kgs
|
|
@@ -121,6 +117,15 @@ class Egfr:
|
|
|
121
117
|
|
|
122
118
|
self.on_percent_drop_threshold_reached()
|
|
123
119
|
|
|
120
|
+
@property
|
|
121
|
+
def formula_name(self) -> str:
|
|
122
|
+
if self._formula_name not in self.calculators:
|
|
123
|
+
raise EgfrError(
|
|
124
|
+
f"Invalid formula_name. Expected one of {list(self.calculators.keys())}. "
|
|
125
|
+
f"Got {self._formula_name}."
|
|
126
|
+
)
|
|
127
|
+
return self._formula_name
|
|
128
|
+
|
|
124
129
|
def on_value_threshold_reached(self) -> None:
|
|
125
130
|
"""A hook to respond if egfr value is at or beyond the value
|
|
126
131
|
threshold.
|
|
@@ -141,14 +146,17 @@ class Egfr:
|
|
|
141
146
|
@property
|
|
142
147
|
def egfr_value(self) -> float:
|
|
143
148
|
if self._egfr_value is None:
|
|
144
|
-
|
|
149
|
+
opts = dict(
|
|
145
150
|
gender=self.gender,
|
|
146
|
-
ethnicity=self.ethnicity,
|
|
147
151
|
age_in_years=self.age_in_years,
|
|
148
152
|
creatinine_value=self.creatinine_value,
|
|
149
153
|
creatinine_units=self.creatinine_units,
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
)
|
|
155
|
+
if self.formula_name == COCKCROFT_GAULT:
|
|
156
|
+
opts.update(weight=self.get_weight_in_kgs())
|
|
157
|
+
elif self.formula_name == CKD_EPI:
|
|
158
|
+
opts.update(ethnicity=self.ethnicity)
|
|
159
|
+
self._egfr_value = self.calculator_cls(**opts).value
|
|
152
160
|
return self._egfr_value
|
|
153
161
|
|
|
154
162
|
@property
|
|
@@ -1,56 +1,61 @@
|
|
|
1
|
+
from clinicedc_utils import (
|
|
2
|
+
ConversionNotHandled,
|
|
3
|
+
EgfrCalculatorError,
|
|
4
|
+
EgfrCkdEpi2009,
|
|
5
|
+
EgfrCkdEpi2021,
|
|
6
|
+
EgfrCockcroftGault,
|
|
7
|
+
)
|
|
1
8
|
from django import forms
|
|
2
9
|
|
|
3
10
|
from edc_form_validators import INVALID_ERROR
|
|
4
|
-
from edc_reportable import ConversionNotHandled
|
|
5
|
-
from edc_vitals.calculators import CalculatorError
|
|
6
|
-
|
|
7
|
-
from ..calculators import EgfrCalculatorError, EgfrCkdEpi, EgfrCockcroftGault
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class EgfrCkdEpiFormValidatorMixin:
|
|
14
|
+
calculator_version = 2009
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def egfr_calculator_cls(self) -> type[EgfrCkdEpi2009 | EgfrCkdEpi2021]:
|
|
18
|
+
if self.calculator_version == 2009: # noqa: PLR2004
|
|
19
|
+
cls = EgfrCkdEpi2009
|
|
20
|
+
elif self.calculator_version == 2021: # noqa: PLR2004
|
|
21
|
+
cls = EgfrCkdEpi2021
|
|
22
|
+
else:
|
|
23
|
+
raise EgfrCalculatorError(
|
|
24
|
+
f"Invalid calculator version. Got {self.calculator_version}."
|
|
25
|
+
)
|
|
26
|
+
return cls
|
|
27
|
+
|
|
11
28
|
def validate_egfr(
|
|
12
|
-
self,
|
|
13
|
-
|
|
14
|
-
age_in_years: int = None,
|
|
15
|
-
weight_in_kgs: float = None,
|
|
16
|
-
ethnicity: str = None,
|
|
17
|
-
baseline_egfr_value: float | None = None,
|
|
18
|
-
):
|
|
29
|
+
self, *, gender: str, age_in_years: int, ethnicity: str | None = None
|
|
30
|
+
) -> float | None:
|
|
19
31
|
opts = dict(
|
|
20
32
|
gender=gender,
|
|
21
33
|
age_in_years=age_in_years,
|
|
22
|
-
weight=weight_in_kgs,
|
|
23
|
-
ethnicity=ethnicity,
|
|
24
34
|
creatinine_value=self.cleaned_data.get("creatinine_value"),
|
|
25
35
|
creatinine_units=self.cleaned_data.get("creatinine_units"),
|
|
26
|
-
baseline_egfr_value=baseline_egfr_value,
|
|
27
36
|
)
|
|
37
|
+
if self.egfr_calculator_cls == EgfrCkdEpi2009:
|
|
38
|
+
opts.update(ethnicity=ethnicity)
|
|
28
39
|
try:
|
|
29
|
-
value =
|
|
30
|
-
except (EgfrCalculatorError,
|
|
40
|
+
value = self.egfr_calculator_cls(**opts).value
|
|
41
|
+
except (EgfrCalculatorError, ConversionNotHandled) as e:
|
|
31
42
|
raise forms.ValidationError(e) from e
|
|
32
43
|
return value
|
|
33
44
|
|
|
34
45
|
|
|
35
46
|
class EgfrCockcroftGaultFormValidatorMixin:
|
|
36
47
|
def validate_egfr(
|
|
37
|
-
self,
|
|
38
|
-
|
|
39
|
-
gender: str,
|
|
40
|
-
age_in_years: int,
|
|
41
|
-
weight_in_kgs: float,
|
|
42
|
-
ethnicity: str,
|
|
43
|
-
):
|
|
48
|
+
self, *, gender: str, age_in_years: int, weight_in_kgs: float
|
|
49
|
+
) -> float | None:
|
|
44
50
|
opts = dict(
|
|
45
51
|
gender=gender,
|
|
46
52
|
age_in_years=age_in_years,
|
|
47
53
|
weight=weight_in_kgs,
|
|
48
|
-
ethnicity=ethnicity,
|
|
49
54
|
creatinine_value=self.cleaned_data.get("creatinine_value"),
|
|
50
55
|
creatinine_units=self.cleaned_data.get("creatinine_units"),
|
|
51
56
|
)
|
|
52
57
|
try:
|
|
53
58
|
value = EgfrCockcroftGault(**opts).value
|
|
54
|
-
except (EgfrCalculatorError,
|
|
59
|
+
except (EgfrCalculatorError, ConversionNotHandled) as e:
|
|
55
60
|
self.raise_validation_error({"__all__": str(e)}, INVALID_ERROR, exc=e)
|
|
56
61
|
return value
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
from clinicedc_constants import (
|
|
2
|
+
COMPLETE,
|
|
3
|
+
EGFR_UNITS,
|
|
4
|
+
INCOMPLETE,
|
|
5
|
+
MICROMOLES_PER_LITER,
|
|
6
|
+
NEW,
|
|
7
|
+
OPEN,
|
|
8
|
+
)
|
|
1
9
|
from django.db import models
|
|
2
10
|
|
|
3
|
-
from edc_constants.constants import COMPLETE, INCOMPLETE, NEW, OPEN
|
|
4
11
|
from edc_lab.choices import SERUM_CREATININE_UNITS
|
|
5
12
|
from edc_lab_results.model_mixin_factories import reportable_result_model_mixin_factory
|
|
6
13
|
from edc_model import REPORT_STATUS
|
|
7
|
-
from edc_reportable.units import EGFR_UNITS, MICROMOLES_PER_LITER
|
|
8
14
|
from edc_vitals.models import WeightField
|
|
9
15
|
|
|
10
16
|
|
|
@@ -3,15 +3,15 @@ from __future__ import annotations
|
|
|
3
3
|
import contextlib
|
|
4
4
|
from decimal import Decimal
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import EGFR_UNITS, PERCENT
|
|
7
|
+
from clinicedc_utils import EgfrCalculatorError
|
|
6
8
|
from django.core.exceptions import ObjectDoesNotExist
|
|
7
9
|
from django.db import models, transaction
|
|
8
10
|
|
|
9
11
|
from edc_lab_results.model_mixin_factories import reportable_result_model_mixin_factory
|
|
10
12
|
from edc_registration.models import RegisteredSubject
|
|
11
|
-
from edc_reportable.units import EGFR_UNITS, PERCENT
|
|
12
13
|
from edc_reportable.utils import get_reference_range_collection
|
|
13
14
|
|
|
14
|
-
from ..calculators import EgfrCalculatorError
|
|
15
15
|
from ..egfr import Egfr
|
|
16
16
|
|
|
17
17
|
|
|
@@ -2,11 +2,10 @@ import csv
|
|
|
2
2
|
import os
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import CLOSED
|
|
5
6
|
from django.core.exceptions import MultipleObjectsReturned
|
|
6
7
|
from django.core.management.base import BaseCommand, CommandError
|
|
7
8
|
|
|
8
|
-
from edc_constants.constants import CLOSED
|
|
9
|
-
|
|
10
9
|
from ...models import ExportPlan, ExportReceipt, ExportTransaction
|
|
11
10
|
|
|
12
11
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
from clinicedc_constants import NEW
|
|
1
2
|
from django.apps import apps as django_apps
|
|
2
3
|
from django.core import serializers
|
|
3
4
|
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
|
|
4
5
|
from django.utils import timezone
|
|
5
6
|
|
|
6
|
-
from edc_constants.constants import NEW
|
|
7
|
-
|
|
8
7
|
from ..constants import EXPORTED, INSERT, UPDATE
|
|
9
8
|
|
|
10
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
from clinicedc_constants import CLOSED, NEW
|
|
1
2
|
from django.db import models
|
|
2
3
|
from django.urls import reverse
|
|
3
4
|
from django_crypto_fields.fields import EncryptedTextField
|
|
4
5
|
|
|
5
|
-
from edc_constants.constants import CLOSED, NEW
|
|
6
6
|
from edc_model.models import BaseUuidModel, HistoricalRecords
|
|
7
7
|
|
|
8
8
|
from ..constants import CANCELLED, EXPORTED
|
|
@@ -3,10 +3,10 @@ import os
|
|
|
3
3
|
import re
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import UUID_PATTERN
|
|
6
7
|
from django.db import models
|
|
7
8
|
from django.db.models import Index
|
|
8
9
|
|
|
9
|
-
from edc_constants.constants import UUID_PATTERN
|
|
10
10
|
from edc_model.models import BaseUuidModel
|
|
11
11
|
|
|
12
12
|
from .file_history import FileHistory
|
edc_facility/list_data.py
CHANGED
|
@@ -2,9 +2,9 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from datetime import date, datetime
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import EQ, GT, GTE, LT, LTE
|
|
5
6
|
from django.conf import settings
|
|
6
7
|
|
|
7
|
-
from edc_constants.constants import EQ, GT, GTE, LT, LTE
|
|
8
8
|
from edc_model import estimated_date_from_ago
|
|
9
9
|
from edc_utils.date import to_local
|
|
10
10
|
from edc_utils.text import convert_php_dateformat
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from copy import copy
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import DWTA, NOT_APPLICABLE, NULL_STRING
|
|
3
4
|
from django.db.models import QuerySet
|
|
4
5
|
from django.utils.translation import gettext_lazy as _
|
|
5
6
|
|
|
6
|
-
from edc_constants.constants import DWTA, NOT_APPLICABLE, NULL_STRING
|
|
7
|
-
|
|
8
7
|
from .base_form_validator import (
|
|
9
8
|
NOT_REQUIRED_ERROR,
|
|
10
9
|
REQUIRED_ERROR,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
from clinicedc_constants import DM
|
|
2
|
+
|
|
3
|
+
from edc_crf.crf_form_validator_mixins import CrfFormValidatorMixin
|
|
1
4
|
from edc_dx_review.utils import (
|
|
2
5
|
raise_if_clinical_review_does_not_exist,
|
|
3
6
|
raise_if_initial_review_does_not_exist,
|
|
4
7
|
)
|
|
5
|
-
|
|
6
|
-
from edc_constants.constants import DM
|
|
7
|
-
from edc_crf.crf_form_validator_mixins import CrfFormValidatorMixin
|
|
8
8
|
from edc_form_validators import FormValidator
|
|
9
9
|
from edc_visit_schedule.utils import raise_if_baseline
|
|
10
10
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import YES
|
|
3
4
|
from dateutil.relativedelta import relativedelta
|
|
4
5
|
|
|
5
|
-
from edc_constants.constants import YES
|
|
6
|
-
|
|
7
6
|
from ..utils import validate_glucose_as_millimoles_per_liter
|
|
8
7
|
|
|
9
8
|
INVALID_GLUCOSE_DATE = "INVALID_GLUCOSE_DATE"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
1
2
|
from django.db import models
|
|
2
3
|
|
|
3
4
|
from edc_constants.choices import YES_NO_NA
|
|
4
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
5
5
|
from edc_model.utils import duration_hm_to_timedelta
|
|
6
6
|
from edc_model.validators import hm_validator
|
|
7
7
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
from clinicedc_constants import EQ, NOT_APPLICABLE
|
|
1
2
|
from django.db import models
|
|
2
3
|
|
|
3
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
4
4
|
from edc_lab.choices import GLUCOSE_UNITS_NA, RESULT_QUANTIFIER
|
|
5
|
-
from edc_lab.constants import EQ
|
|
6
5
|
|
|
7
6
|
from ..constants import GLUCOSE_HIGH_READING
|
|
8
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
3
4
|
from django.db import models
|
|
4
5
|
|
|
5
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
6
6
|
from edc_lab.choices import GLUCOSE_UNITS_NA, RESULT_QUANTIFIER_NA
|
|
7
7
|
|
|
8
8
|
from ..constants import GLUCOSE_HIGH_READING
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
from clinicedc_constants import EQ, NOT_APPLICABLE
|
|
1
2
|
from django.db import models
|
|
2
3
|
from django.utils.html import format_html
|
|
3
4
|
from django.utils.safestring import mark_safe
|
|
4
5
|
|
|
5
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
6
6
|
from edc_lab.choices import GLUCOSE_UNITS_NA, RESULT_QUANTIFIER
|
|
7
|
-
from edc_lab.constants import EQ
|
|
8
7
|
from edc_model.validators import datetime_not_future
|
|
9
8
|
|
|
10
9
|
from ..constants import GLUCOSE_HIGH_READING
|
edc_glucose/utils.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from decimal import Decimal
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import MILLIMOLES_PER_LITER
|
|
4
|
+
from clinicedc_utils import ConversionNotHandled, convert_units
|
|
3
5
|
from django import forms
|
|
4
6
|
|
|
5
|
-
from edc_reportable import MILLIMOLES_PER_LITER, ConversionNotHandled
|
|
6
|
-
from edc_reportable.utils import convert_units
|
|
7
7
|
from edc_utils.round_up import round_half_away_from_zero
|
|
8
8
|
|
|
9
9
|
from .constants import GLUCOSE_HIGH_READING
|
edc_identifier/model_mixins.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import re
|
|
2
2
|
from uuid import uuid4
|
|
3
3
|
|
|
4
|
+
from clinicedc_constants import UUID_PATTERN
|
|
4
5
|
from django.apps import apps as django_apps
|
|
5
6
|
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
|
|
6
7
|
from django.db import models
|
|
7
8
|
|
|
8
|
-
from edc_constants.constants import UUID_PATTERN
|
|
9
|
-
|
|
10
9
|
from .exceptions import IdentifierError
|
|
11
10
|
from .subject_identifier import SubjectIdentifier
|
|
12
11
|
|
edc_identifier/models.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
from clinicedc_constants import NULL_STRING
|
|
1
2
|
from django.db import models
|
|
2
3
|
from django.db.models import UniqueConstraint
|
|
3
4
|
|
|
4
|
-
from edc_constants.constants import NULL_STRING
|
|
5
5
|
from edc_model.models import BaseUuidModel
|
|
6
6
|
from edc_sites.model_mixins import SiteModelMixin
|
|
7
7
|
|
|
@@ -3,13 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
from secrets import choice
|
|
4
4
|
from typing import TYPE_CHECKING, Any
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import NULL_STRING
|
|
6
7
|
from django.apps import apps as django_apps
|
|
7
8
|
from django.core.exceptions import ObjectDoesNotExist
|
|
8
9
|
from django.db import models
|
|
9
10
|
from django.utils import timezone
|
|
10
11
|
|
|
11
|
-
from edc_constants.constants import NULL_STRING
|
|
12
|
-
|
|
13
12
|
from .utils import convert_to_human_readable
|
|
14
13
|
|
|
15
14
|
if TYPE_CHECKING:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from uuid import UUID
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import UUID_PATTERN, YES
|
|
3
4
|
from django.contrib import admin
|
|
4
5
|
from django.core.exceptions import ObjectDoesNotExist
|
|
5
6
|
from django.utils.html import format_html
|
|
6
7
|
from django.utils.safestring import mark_safe
|
|
7
8
|
|
|
8
|
-
from edc_constants.constants import UUID_PATTERN, YES
|
|
9
9
|
from edc_lab.admin.fieldsets import (
|
|
10
10
|
requisition_identifier_fields,
|
|
11
11
|
requisition_verify_fields,
|
edc_lab/choices.py
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from edc_constants.constants import (
|
|
1
|
+
from clinicedc_constants import (
|
|
4
2
|
COMPLETE,
|
|
5
3
|
EQ,
|
|
6
4
|
GT,
|
|
7
5
|
GTE,
|
|
8
6
|
LT,
|
|
9
7
|
LTE,
|
|
8
|
+
MICROMOLES_PER_LITER,
|
|
9
|
+
MILLIGRAMS_PER_DECILITER,
|
|
10
|
+
MILLIMOLES_PER_LITER,
|
|
10
11
|
NOT_APPLICABLE,
|
|
11
12
|
OTHER,
|
|
12
13
|
PARTIAL,
|
|
13
14
|
PENDING,
|
|
14
15
|
)
|
|
16
|
+
from django.utils.translation import gettext_lazy as _
|
|
17
|
+
|
|
15
18
|
from edc_metadata.constants import NOT_REQUIRED
|
|
16
|
-
from edc_reportable import
|
|
17
|
-
MICROMOLES_PER_LITER,
|
|
18
|
-
MICROMOLES_PER_LITER_DISPLAY,
|
|
19
|
-
MILLIGRAMS_PER_DECILITER,
|
|
20
|
-
MILLIMOLES_PER_LITER,
|
|
21
|
-
MILLIMOLES_PER_LITER_DISPLAY,
|
|
22
|
-
)
|
|
19
|
+
from edc_reportable.units import MICROMOLES_PER_LITER_DISPLAY, MILLIMOLES_PER_LITER_DISPLAY
|
|
23
20
|
|
|
24
21
|
from .constants import FILL_ACROSS, FILL_DOWN, FINGER_PRICK, TUBE
|
|
25
22
|
|
edc_lab/constants.py
CHANGED
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import NO, YES
|
|
6
7
|
from django import forms
|
|
7
8
|
from django.apps import apps as django_apps
|
|
8
9
|
|
|
9
|
-
from edc_constants.constants import NO, YES
|
|
10
10
|
from edc_utils.date import to_local
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|