clinicedc 2.0.41__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.41.dist-info → clinicedc-2.0.42.dist-info}/METADATA +3 -1
- {clinicedc-2.0.41.dist-info → clinicedc-2.0.42.dist-info}/RECORD +337 -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/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.41.dist-info → clinicedc-2.0.42.dist-info}/WHEEL +0 -0
- {clinicedc-2.0.41.dist-info → clinicedc-2.0.42.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
1
2
|
from django.db import models
|
|
2
3
|
from django.utils import timezone
|
|
3
4
|
|
|
4
5
|
from edc_constants.choices import YES_NO, YES_NO_UNKNOWN
|
|
5
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
6
6
|
from edc_identifier.model_mixins import NonUniqueSubjectIdentifierFieldMixin
|
|
7
7
|
from edc_model import models as edc_models
|
|
8
8
|
from edc_model.validators import date_not_future, datetime_not_future
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
1
2
|
from django.contrib import admin
|
|
2
3
|
from django.contrib.admin import display
|
|
3
4
|
from django.template.loader import render_to_string
|
|
@@ -7,7 +8,6 @@ from django_audit_fields.admin import audit_fieldset_tuple
|
|
|
7
8
|
|
|
8
9
|
from edc_action_item.fieldsets import action_fieldset_tuple
|
|
9
10
|
from edc_action_item.modeladmin_mixins import ActionItemModelAdminMixin
|
|
10
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
11
11
|
from edc_model_admin.dashboard import ModelAdminSubjectDashboardMixin
|
|
12
12
|
from edc_notification.utils import get_email_contacts
|
|
13
13
|
from edc_pdf_reports.admin import PdfButtonModelAdminMixin, print_selected_to_pdf_action
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import NOT_APPLICABLE, OTHER
|
|
3
4
|
from django.conf import settings
|
|
4
5
|
from django.contrib import admin
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
@@ -7,7 +8,6 @@ from django_audit_fields.admin import audit_fieldset_tuple
|
|
|
7
8
|
|
|
8
9
|
from edc_action_item.fieldsets import action_fieldset_tuple
|
|
9
10
|
from edc_action_item.modeladmin_mixins import ActionItemModelAdminMixin
|
|
10
|
-
from edc_constants.constants import NOT_APPLICABLE, OTHER
|
|
11
11
|
from edc_model_admin.dashboard import ModelAdminSubjectDashboardMixin
|
|
12
12
|
from edc_utils.text import convert_php_dateformat
|
|
13
13
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import CANCELLED, OTHER
|
|
3
4
|
from django.contrib import admin
|
|
4
5
|
from django.contrib.admin import display
|
|
5
6
|
from django.template.loader import render_to_string
|
|
@@ -9,7 +10,6 @@ from django_audit_fields.admin import audit_fieldset_tuple
|
|
|
9
10
|
|
|
10
11
|
from edc_action_item.fieldsets import action_fieldset_tuple
|
|
11
12
|
from edc_action_item.modeladmin_mixins import ActionItemModelAdminMixin
|
|
12
|
-
from edc_constants.constants import CANCELLED, OTHER
|
|
13
13
|
from edc_model_admin.dashboard import ModelAdminSubjectDashboardMixin
|
|
14
14
|
from edc_model_admin.list_filters import ReportDateListFilter
|
|
15
15
|
from edc_pdf_reports.admin import PdfButtonModelAdminMixin, print_selected_to_pdf_action
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import OTHER
|
|
3
4
|
from django.contrib import admin
|
|
4
5
|
from django_audit_fields.admin import audit_fieldset_tuple
|
|
5
6
|
|
|
6
7
|
from edc_action_item.fieldsets import action_fieldset_tuple
|
|
7
8
|
from edc_action_item.modeladmin_mixins import ActionItemModelAdminMixin
|
|
8
|
-
from edc_constants.constants import OTHER
|
|
9
9
|
from edc_model_admin.dashboard import ModelAdminSubjectDashboardMixin
|
|
10
10
|
|
|
11
11
|
from ..utils import get_ae_model
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
from clinicedc_constants import DEAD, GRADE5, YES
|
|
1
2
|
from django import forms
|
|
2
3
|
|
|
3
|
-
from edc_constants.constants import DEAD, GRADE5, YES
|
|
4
|
-
|
|
5
4
|
from ..form_validators import AeFollowupFormValidator
|
|
6
5
|
from ..utils import validate_ae_initial_outcome_date
|
|
7
6
|
from .ae_modelform_mixin import AeModelFormMixin
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
from clinicedc_constants import GRADE4, GRADE5, YES
|
|
1
2
|
from django import forms
|
|
2
3
|
from django.conf import settings
|
|
3
4
|
from django.urls.base import reverse
|
|
4
5
|
from django.utils.html import format_html
|
|
5
6
|
from django.utils.safestring import mark_safe
|
|
6
7
|
|
|
7
|
-
from edc_constants.constants import GRADE4, GRADE5, YES
|
|
8
|
-
|
|
9
8
|
from ..form_validators import AeInitialFormValidator
|
|
10
9
|
from ..utils import get_ae_model
|
|
11
10
|
from .ae_modelform_mixin import AeModelFormMixin
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
from clinicedc_constants import NO, TMG, YES
|
|
1
2
|
from django.core.exceptions import ObjectDoesNotExist
|
|
2
3
|
from django.db import transaction
|
|
3
4
|
from django.db.models.signals import m2m_changed, post_delete, post_save
|
|
4
5
|
from django.dispatch.dispatcher import receiver
|
|
5
6
|
from django.utils import timezone
|
|
6
7
|
|
|
7
|
-
from edc_constants.constants import NO, YES
|
|
8
8
|
from edc_notification.models import Notification
|
|
9
9
|
|
|
10
|
-
from ..constants import AE_TMG_ACTION, DEATH_REPORT_TMG_ACTION
|
|
10
|
+
from ..constants import AE_TMG_ACTION, DEATH_REPORT_TMG_ACTION
|
|
11
11
|
from ..utils import get_ae_model
|
|
12
12
|
|
|
13
13
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
from textwrap import fill
|
|
2
2
|
|
|
3
3
|
import inflect
|
|
4
|
+
from clinicedc_constants import OTHER, YES
|
|
4
5
|
from django.conf import settings
|
|
5
|
-
from edc_constants.constants import OTHER, YES
|
|
6
|
-
from edc_pdf_reports.crf_pdf_report import CrfPdfReport
|
|
7
6
|
from reportlab.lib import colors
|
|
8
7
|
from reportlab.lib.units import cm
|
|
9
8
|
from reportlab.platypus import Paragraph, Table
|
|
10
9
|
from reportlab.platypus.flowables import KeepTogether, Spacer
|
|
11
10
|
|
|
11
|
+
from edc_pdf_reports.crf_pdf_report import CrfPdfReport
|
|
12
|
+
|
|
12
13
|
from ..utils import get_adverse_event_app_label, get_ae_model
|
|
13
14
|
|
|
14
15
|
p = inflect.engine()
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
from textwrap import fill
|
|
2
2
|
|
|
3
3
|
import inflect
|
|
4
|
+
from clinicedc_constants import OTHER
|
|
4
5
|
from django.conf import settings
|
|
5
6
|
from django.contrib.auth import get_user_model
|
|
6
|
-
from edc_constants.constants import OTHER
|
|
7
|
-
from edc_pdf_reports.crf_pdf_report import CrfPdfReport
|
|
8
7
|
from reportlab.lib import colors
|
|
9
8
|
from reportlab.lib.units import cm
|
|
10
9
|
from reportlab.platypus.flowables import Spacer
|
|
11
10
|
from reportlab.platypus.para import Paragraph
|
|
12
11
|
from reportlab.platypus.tables import Table
|
|
13
12
|
|
|
13
|
+
from edc_pdf_reports.crf_pdf_report import CrfPdfReport
|
|
14
|
+
|
|
14
15
|
from ..utils import get_adverse_event_app_label, get_ae_model
|
|
15
16
|
|
|
16
17
|
User = get_user_model()
|
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
from textwrap import wrap
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
+
from clinicedc_constants import AE_WITHDRAWN, CLOSED, OPEN, OTHER, YES
|
|
7
8
|
from django import template
|
|
8
9
|
from django.apps import apps as django_apps
|
|
9
10
|
from django.conf import settings
|
|
@@ -16,16 +17,14 @@ from django.utils.safestring import mark_safe
|
|
|
16
17
|
from django.utils.translation import gettext as _
|
|
17
18
|
|
|
18
19
|
from edc_action_item.utils import get_reference_obj
|
|
19
|
-
from
|
|
20
|
+
from edc_auth.constants import TMG_ROLE
|
|
20
21
|
from edc_model_admin.utils import add_to_messages_once
|
|
21
22
|
from edc_utils import escape_braces
|
|
22
23
|
|
|
23
24
|
from ..constants import (
|
|
24
25
|
AE_TMG_ACTION,
|
|
25
|
-
AE_WITHDRAWN,
|
|
26
26
|
DEATH_REPORT_TMG_ACTION,
|
|
27
27
|
DEATH_REPORT_TMG_SECOND_ACTION,
|
|
28
|
-
TMG_ROLE,
|
|
29
28
|
)
|
|
30
29
|
from ..utils import get_adverse_event_app_label, get_ae_model, has_valid_tmg_perms
|
|
31
30
|
from ..view_utils import TmgButton
|
edc_adverse_event/urls.py
CHANGED
edc_adverse_event/utils.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import contextlib
|
|
3
4
|
from typing import TYPE_CHECKING
|
|
4
5
|
|
|
5
6
|
from django import forms
|
|
@@ -10,11 +11,10 @@ from django.contrib.messages import ERROR
|
|
|
10
11
|
from django.core.exceptions import ObjectDoesNotExist
|
|
11
12
|
from django.utils.translation import gettext as _
|
|
12
13
|
|
|
14
|
+
from edc_auth.constants import TMG_ROLE
|
|
13
15
|
from edc_model_admin.utils import add_to_messages_once
|
|
14
16
|
from edc_utils.text import convert_php_dateformat
|
|
15
17
|
|
|
16
|
-
from .constants import TMG_ROLE
|
|
17
|
-
|
|
18
18
|
if TYPE_CHECKING:
|
|
19
19
|
from django.core.handlers.wsgi import WSGIRequest
|
|
20
20
|
|
|
@@ -28,19 +28,16 @@ if TYPE_CHECKING:
|
|
|
28
28
|
def validate_ae_initial_outcome_date(form_obj):
|
|
29
29
|
ae_initial = form_obj.cleaned_data.get("ae_initial")
|
|
30
30
|
if not ae_initial and form_obj.instance:
|
|
31
|
-
|
|
31
|
+
with contextlib.suppress(ObjectDoesNotExist):
|
|
32
32
|
ae_initial = form_obj.instance.ae_initial
|
|
33
|
-
except ObjectDoesNotExist:
|
|
34
|
-
pass
|
|
35
33
|
outcome_date = form_obj.cleaned_data.get("outcome_date")
|
|
36
|
-
if ae_initial and outcome_date:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
)
|
|
34
|
+
if ae_initial and outcome_date and outcome_date < ae_initial.ae_start_date:
|
|
35
|
+
formatted_dte = ae_initial.ae_start_date.strftime(
|
|
36
|
+
convert_php_dateformat(settings.SHORT_DATE_FORMAT)
|
|
37
|
+
)
|
|
38
|
+
raise forms.ValidationError(
|
|
39
|
+
{"outcome_date": f"May not be before the AE start date {formatted_dte}."}
|
|
40
|
+
)
|
|
44
41
|
|
|
45
42
|
|
|
46
43
|
def get_adverse_event_admin_site() -> str:
|
|
@@ -79,7 +76,7 @@ def get_ae_model_name(model_name: str) -> str:
|
|
|
79
76
|
return f"{get_adverse_event_app_label()}.{model_name}"
|
|
80
77
|
|
|
81
78
|
|
|
82
|
-
def has_valid_tmg_perms(request: WSGIRequest, add_message: bool = None):
|
|
79
|
+
def has_valid_tmg_perms(request: WSGIRequest, add_message: bool | None = None):
|
|
83
80
|
"""Checks if user has TMG_ROLE but not granted add/change
|
|
84
81
|
perms to any non-TMG AE models.
|
|
85
82
|
|
|
@@ -2,13 +2,13 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING, Any
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import CLOSED, NEW, OPEN
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
6
7
|
from django.template.loader import render_to_string
|
|
7
8
|
from django.utils import timezone
|
|
8
9
|
from django.utils.html import format_html
|
|
9
10
|
from django.utils.safestring import mark_safe
|
|
10
11
|
|
|
11
|
-
from edc_constants.constants import CLOSED, NEW, OPEN
|
|
12
12
|
from edc_dashboard.url_names import url_names
|
|
13
13
|
from edc_dashboard.view_mixins import EdcViewMixin
|
|
14
14
|
from edc_listboard.view_mixins import ListboardFilterViewMixin, SearchFormViewMixin
|
|
@@ -50,7 +50,7 @@ class AeListboardViewMixin(
|
|
|
50
50
|
ordering = "-report_datetime"
|
|
51
51
|
paginate_by = 25
|
|
52
52
|
search_form_url = "ae_listboard_url"
|
|
53
|
-
action_type_names = (AE_INITIAL_ACTION,
|
|
53
|
+
action_type_names = (AE_INITIAL_ACTION,)
|
|
54
54
|
|
|
55
55
|
search_fields = (
|
|
56
56
|
"subject_identifier",
|
|
@@ -96,7 +96,7 @@ class AeListboardViewMixin(
|
|
|
96
96
|
pks = []
|
|
97
97
|
for obj in queryset:
|
|
98
98
|
try:
|
|
99
|
-
obj.reference_obj
|
|
99
|
+
obj.reference_obj # noqa: B018
|
|
100
100
|
except ObjectDoesNotExist:
|
|
101
101
|
pks.append(obj.pk)
|
|
102
102
|
return queryset.exclude(pk__in=pks)
|
|
@@ -2,12 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING, Any
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import CLOSED, NEW, OPEN
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
6
7
|
from django.utils import timezone
|
|
7
8
|
from django.utils.html import format_html
|
|
8
9
|
from django.utils.safestring import mark_safe
|
|
9
10
|
|
|
10
|
-
from edc_constants.constants import CLOSED, NEW, OPEN
|
|
11
11
|
from edc_dashboard.url_names import url_names
|
|
12
12
|
from edc_dashboard.view_mixins import EdcViewMixin
|
|
13
13
|
from edc_listboard.view_mixins import ListboardFilterViewMixin, SearchFormViewMixin
|
|
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING, Any
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import CLOSED, NEW, OPEN
|
|
5
6
|
from django.db.models import Min
|
|
6
7
|
from django.utils import timezone
|
|
7
|
-
|
|
8
|
+
|
|
8
9
|
from edc_dashboard.view_mixins import EdcViewMixin
|
|
9
10
|
from edc_export.constants import CANCELLED
|
|
10
11
|
from edc_listboard.view_mixins import ListboardFilterViewMixin, SearchFormViewMixin
|
|
@@ -2,6 +2,7 @@ from typing import Any
|
|
|
2
2
|
|
|
3
3
|
from django.urls import reverse
|
|
4
4
|
from django.views.generic import TemplateView
|
|
5
|
+
|
|
5
6
|
from edc_dashboard.url_names import url_names
|
|
6
7
|
from edc_dashboard.view_mixins import EdcViewMixin, UrlRequestContextMixin
|
|
7
8
|
from edc_navbar import NavbarViewMixin
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
+
from clinicedc_constants import CLOSED, NEW, OPEN
|
|
3
4
|
from django.contrib.sites.shortcuts import get_current_site
|
|
4
5
|
from django.db.models.aggregates import Count
|
|
5
6
|
from django.urls import reverse
|
|
6
7
|
from django.views.generic import TemplateView
|
|
7
8
|
|
|
8
9
|
from edc_action_item.models.action_item import ActionItem
|
|
9
|
-
from edc_constants.constants import CLOSED, NEW, OPEN
|
|
10
10
|
from edc_dashboard.view_mixins import EdcViewMixin
|
|
11
11
|
from edc_navbar import NavbarViewMixin
|
|
12
12
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
|
-
|
|
3
|
-
from edc_constants.constants import FEMALE, MALE
|
|
2
|
+
from clinicedc_constants import FEMALE, MALE
|
|
4
3
|
|
|
5
4
|
from ..constants import (
|
|
6
5
|
MEDIAN_IQR,
|
|
@@ -14,7 +13,6 @@ from ..table import Table
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
class BmiTable(Table):
|
|
17
|
-
|
|
18
16
|
colname = "calculated_bmi_value"
|
|
19
17
|
|
|
20
18
|
def __init__(self, main_df: pd.DataFrame = None):
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
|
-
|
|
3
|
-
from edc_constants.constants import FEMALE, MALE
|
|
2
|
+
from clinicedc_constants import FEMALE, MALE
|
|
4
3
|
|
|
5
4
|
from ..constants import N_ONLY, N_WITH_COL_PROP, N_WITH_ROW_PROP
|
|
6
5
|
from ..row import RowDefinition, RowDefinitions
|
|
@@ -8,7 +7,6 @@ from ..table import Table
|
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class BpTable(Table):
|
|
11
|
-
|
|
12
10
|
sys_col_name = "sys_blood_pressure_avg"
|
|
13
11
|
dia_col_name = "dia_blood_pressure_avg"
|
|
14
12
|
|
edc_analytics/table.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
|
-
|
|
3
|
-
from edc_constants.constants import FEMALE, MALE
|
|
2
|
+
from clinicedc_constants import FEMALE, MALE
|
|
4
3
|
|
|
5
4
|
from .constants import COUNT_COLUMN, N_ONLY, N_WITH_ROW_PROP, TITLE_COLUMN
|
|
6
5
|
from .row import RowDefinition, RowDefinitions, RowStatisticsWithGender
|
edc_appointment/admin/actions.py
CHANGED
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import calendar
|
|
4
4
|
from typing import TYPE_CHECKING, Any
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import NOT_APPLICABLE
|
|
6
7
|
from django.contrib import admin
|
|
7
8
|
from django.db.models import DurationField, ExpressionWrapper, F
|
|
8
9
|
from django.template.loader import render_to_string
|
|
@@ -13,7 +14,6 @@ from django.utils.translation import gettext as _
|
|
|
13
14
|
from django_audit_fields.admin import audit_fieldset_tuple
|
|
14
15
|
from rangefilter.filters import DateRangeFilterBuilder
|
|
15
16
|
|
|
16
|
-
from edc_constants.constants import NOT_APPLICABLE
|
|
17
17
|
from edc_data_manager.auth_objects import DATA_MANAGER_ROLE
|
|
18
18
|
from edc_document_status.fieldsets import document_status_fieldset_tuple
|
|
19
19
|
from edc_document_status.modeladmin_mixins import DocumentStatusModelAdminMixin
|
|
@@ -2,9 +2,9 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import INCOMPLETE, NOT_APPLICABLE
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
6
7
|
|
|
7
|
-
from edc_constants.constants import INCOMPLETE, NOT_APPLICABLE
|
|
8
8
|
from edc_metadata import KEYED
|
|
9
9
|
from edc_metadata.metadata_helper import MetadataHelperMixin
|
|
10
10
|
from edc_visit_tracking.constants import MISSED_VISIT, SCHEDULED, UNSCHEDULED
|
edc_appointment/choices.py
CHANGED
|
@@ -4,10 +4,10 @@ from datetime import datetime
|
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
from zoneinfo import ZoneInfo
|
|
6
6
|
|
|
7
|
+
from clinicedc_constants import NO
|
|
7
8
|
from django.core.exceptions import ObjectDoesNotExist, ValidationError
|
|
8
9
|
from django.utils.translation import gettext_lazy as _
|
|
9
10
|
|
|
10
|
-
from edc_constants.constants import NO
|
|
11
11
|
from edc_form_validators import INVALID_ERROR, FormValidator
|
|
12
12
|
|
|
13
13
|
from ..constants import NEW_APPT
|
edc_appointment/list_data.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from edc_constants.constants import (
|
|
1
|
+
from clinicedc_constants import (
|
|
4
2
|
CLINIC,
|
|
5
3
|
ESTIMATED,
|
|
6
4
|
HOME,
|
|
@@ -13,6 +11,7 @@ from edc_constants.constants import (
|
|
|
13
11
|
PATIENT_REPRESENTATIVE,
|
|
14
12
|
TELEPHONE,
|
|
15
13
|
)
|
|
14
|
+
from django.utils.translation import gettext_lazy as _
|
|
16
15
|
|
|
17
16
|
list_data = {
|
|
18
17
|
"edc_appointment.appointmenttype": [
|
|
@@ -2,10 +2,10 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import INCOMPLETE
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
6
7
|
from django.db import models
|
|
7
8
|
|
|
8
|
-
from edc_constants.constants import INCOMPLETE
|
|
9
9
|
from edc_visit_tracking.constants import MISSED_VISIT
|
|
10
10
|
|
|
11
11
|
from ..appointment_reason_updater import AppointmentReasonUpdater
|
|
@@ -3,20 +3,19 @@ from __future__ import annotations
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from zoneinfo import ZoneInfo
|
|
5
5
|
|
|
6
|
+
from clinicedc_constants import NO
|
|
6
7
|
from django.db import models
|
|
7
8
|
from django.db.models import PROTECT
|
|
8
9
|
from django.utils.translation import gettext_lazy as _
|
|
9
10
|
|
|
10
11
|
from edc_appointment.utils import validate_date_is_on_clinic_day
|
|
11
12
|
from edc_constants.choices import YES_NO
|
|
12
|
-
from edc_constants.constants import NO
|
|
13
13
|
from edc_facility.utils import get_health_facility_model
|
|
14
14
|
|
|
15
15
|
__all__ = ["NextAppointmentCrfModelMixin"]
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class NextAppointmentCrfModelMixin(models.Model):
|
|
19
|
-
|
|
20
19
|
offschedule_today = models.CharField(
|
|
21
20
|
verbose_name=_("Is the subject going off schedule today?"),
|
|
22
21
|
choices=YES_NO,
|
|
@@ -2,12 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
+
from clinicedc_constants import PATIENT
|
|
5
6
|
from django.apps import apps as django_apps
|
|
6
7
|
from django.contrib import admin
|
|
7
8
|
from django.core.exceptions import ObjectDoesNotExist
|
|
8
9
|
from django_audit_fields import audit_fieldset_tuple
|
|
9
10
|
|
|
10
|
-
from edc_constants.constants import PATIENT
|
|
11
11
|
from edc_crf.admin import crf_status_fieldset_tuple
|
|
12
12
|
from edc_utils.date import to_local
|
|
13
13
|
from edc_visit_schedule.models import VisitSchedule
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
from clinicedc_constants import NO
|
|
1
2
|
from django.core.exceptions import ObjectDoesNotExist
|
|
2
3
|
from django.db.models.signals import post_delete, post_save, pre_delete
|
|
3
4
|
from django.dispatch import receiver
|
|
4
5
|
from django.utils import timezone
|
|
5
6
|
|
|
6
|
-
from edc_constants.constants import NO
|
|
7
7
|
from edc_utils.text import formatted_datetime
|
|
8
8
|
from edc_visit_schedule.site_visit_schedules import site_visit_schedules
|
|
9
9
|
from edc_visit_tracking.utils import get_related_visit_model_cls
|
edc_appointment/utils.py
CHANGED
|
@@ -7,6 +7,8 @@ from collections.abc import Callable
|
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
from typing import TYPE_CHECKING, Any
|
|
9
9
|
|
|
10
|
+
from clinicedc_constants import CLINIC, NOT_APPLICABLE, OK
|
|
11
|
+
from clinicedc_constants import ERROR as ERROR_CODE
|
|
10
12
|
from dateutil.relativedelta import relativedelta
|
|
11
13
|
from django.apps import apps as django_apps
|
|
12
14
|
from django.conf import settings
|
|
@@ -23,8 +25,7 @@ from django.db import transaction
|
|
|
23
25
|
from django.db.models import Count, ProtectedError
|
|
24
26
|
from django.urls import reverse
|
|
25
27
|
from django.utils.translation import gettext as _
|
|
26
|
-
|
|
27
|
-
from edc_constants.constants import ERROR as ERROR_CODE
|
|
28
|
+
|
|
28
29
|
from edc_dashboard.url_names import url_names
|
|
29
30
|
from edc_form_validators import INVALID_ERROR
|
|
30
31
|
from edc_metadata.constants import CRF, REQUIRED, REQUISITION
|
|
@@ -66,6 +67,7 @@ if TYPE_CHECKING:
|
|
|
66
67
|
from decimal import Decimal
|
|
67
68
|
|
|
68
69
|
from django.db.models import QuerySet
|
|
70
|
+
|
|
69
71
|
from edc_crf.model_mixins import CrfModelMixin as Base
|
|
70
72
|
from edc_metadata.model_mixins.creates import CreatesMetadataModelMixin
|
|
71
73
|
|
edc_auth/constants.py
CHANGED
edc_consent/choices.py
CHANGED
|
@@ -4,10 +4,10 @@ from dataclasses import KW_ONLY, dataclass, field
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
+
from clinicedc_constants import FEMALE, MALE
|
|
7
8
|
from django.apps import apps as django_apps
|
|
8
9
|
from django.core.exceptions import ObjectDoesNotExist
|
|
9
10
|
|
|
10
|
-
from edc_constants.constants import FEMALE, MALE
|
|
11
11
|
from edc_protocol.research_protocol_config import ResearchProtocolConfig
|
|
12
12
|
from edc_screening.utils import get_subject_screening_model
|
|
13
13
|
from edc_sites import site_sites
|