endoreg-db 0.5.3__tar.gz → 0.6.0__tar.gz
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 endoreg-db might be problematic. Click here for more details.
- endoreg_db-0.6.0/PKG-INFO +151 -0
- endoreg_db-0.6.0/README.md +121 -0
- endoreg_db-0.6.0/endoreg_db/admin.py +92 -0
- endoreg_db-0.6.0/endoreg_db/urls.py +173 -0
- endoreg_db-0.6.0/endoreg_db.egg-info/PKG-INFO +151 -0
- endoreg_db-0.6.0/endoreg_db.egg-info/SOURCES.txt +15 -0
- endoreg_db-0.6.0/endoreg_db.egg-info/dependency_links.txt +1 -0
- endoreg_db-0.6.0/endoreg_db.egg-info/requires.txt +22 -0
- endoreg_db-0.6.0/endoreg_db.egg-info/top_level.txt +1 -0
- endoreg_db-0.6.0/pyproject.toml +33 -0
- endoreg_db-0.6.0/setup.cfg +4 -0
- endoreg_db-0.6.0/tests/test_settings.py +25 -0
- endoreg_db-0.5.3/.envrc +0 -1
- endoreg_db-0.5.3/.gitignore +0 -171
- endoreg_db-0.5.3/PKG-INFO +0 -28
- endoreg_db-0.5.3/README.md +0 -8
- endoreg_db-0.5.3/_flake.nix +0 -130
- endoreg_db-0.5.3/_pyproject.toml +0 -33
- endoreg_db-0.5.3/depreceated_pip-shell.nix +0 -12
- endoreg_db-0.5.3/endoreg_db/admin.py +0 -3
- endoreg_db-0.5.3/endoreg_db/data/__init__.py +0 -72
- endoreg_db-0.5.3/endoreg_db/data/active_model/data.yaml +0 -3
- endoreg_db-0.5.3/endoreg_db/data/agl_service/data.yaml +0 -19
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/00_patient_lab_sample_add_default_value.yaml +0 -167
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/01_patient-set-age.yaml +0 -8
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/01_patient-set-gender.yaml +0 -9
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/11_create_patient_lab_sample.yaml +0 -23
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/12_create-patient_medication-anticoagulation.yaml +0 -19
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/13_create-patient_medication_schedule-anticoagulation.yaml +0 -19
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule/19_create_patient.yaml +0 -17
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule_type/base_types.yaml +0 -35
- endoreg_db-0.5.3/endoreg_db/data/case_template/rule_value_type/base_types.yaml +0 -59
- endoreg_db-0.5.3/endoreg_db/data/case_template/template/base.yaml +0 -8
- endoreg_db-0.5.3/endoreg_db/data/case_template/template_type/pre_endoscopy.yaml +0 -3
- endoreg_db-0.5.3/endoreg_db/data/case_template/tmp/_rule_value +0 -13
- endoreg_db-0.5.3/endoreg_db/data/case_template/tmp/rule/01_atrial_fibrillation.yaml +0 -21
- endoreg_db-0.5.3/endoreg_db/data/case_template/tmp/rule/02_create_object.yaml +0 -10
- endoreg_db-0.5.3/endoreg_db/data/case_template/tmp/template/atrial_fibrillation_low_risk.yaml +0 -7
- endoreg_db-0.5.3/endoreg_db/data/center/data.yaml +0 -60
- endoreg_db-0.5.3/endoreg_db/data/center_resource/green_endoscopy_dashboard_CenterResource.yaml +0 -144
- endoreg_db-0.5.3/endoreg_db/data/center_waste/green_endoscopy_dashboard_CenterWaste.yaml +0 -48
- endoreg_db-0.5.3/endoreg_db/data/disease/cardiovascular.yaml +0 -37
- endoreg_db-0.5.3/endoreg_db/data/disease/hepatology.yaml +0 -5
- endoreg_db-0.5.3/endoreg_db/data/disease/misc.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/disease/renal.yaml +0 -5
- endoreg_db-0.5.3/endoreg_db/data/disease_classification/chronic_kidney_disease.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/disease_classification/coronary_vessel_disease.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/disease_classification_choice/chronic_kidney_disease.yaml +0 -41
- endoreg_db-0.5.3/endoreg_db/data/disease_classification_choice/coronary_vessel_disease.yaml +0 -20
- endoreg_db-0.5.3/endoreg_db/data/distribution/date/patient.yaml +0 -7
- endoreg_db-0.5.3/endoreg_db/data/distribution/multiple_categorical/.init +0 -0
- endoreg_db-0.5.3/endoreg_db/data/distribution/numeric/.init +0 -0
- endoreg_db-0.5.3/endoreg_db/data/distribution/single_categorical/patient.yaml +0 -7
- endoreg_db-0.5.3/endoreg_db/data/emission_factor/green_endoscopy_dashboard_EmissionFactor.yaml +0 -132
- endoreg_db-0.5.3/endoreg_db/data/endoscope_type/data.yaml +0 -11
- endoreg_db-0.5.3/endoreg_db/data/endoscopy_processor/data.yaml +0 -47
- endoreg_db-0.5.3/endoreg_db/data/event/cardiology.yaml +0 -28
- endoreg_db-0.5.3/endoreg_db/data/event/neurology.yaml +0 -14
- endoreg_db-0.5.3/endoreg_db/data/event/surgery.yaml +0 -13
- endoreg_db-0.5.3/endoreg_db/data/event/thrombembolism.yaml +0 -20
- endoreg_db-0.5.3/endoreg_db/data/examination/examinations/data.yaml +0 -66
- endoreg_db-0.5.3/endoreg_db/data/examination/time/data.yaml +0 -48
- endoreg_db-0.5.3/endoreg_db/data/examination/time-type/data.yaml +0 -8
- endoreg_db-0.5.3/endoreg_db/data/examination/type/data.yaml +0 -5
- endoreg_db-0.5.3/endoreg_db/data/gender/data.yaml +0 -18
- endoreg_db-0.5.3/endoreg_db/data/information_source/data.yaml +0 -30
- endoreg_db-0.5.3/endoreg_db/data/information_source/medication.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/lab_value/cardiac_enzymes.yaml +0 -31
- endoreg_db-0.5.3/endoreg_db/data/lab_value/coagulation.yaml +0 -49
- endoreg_db-0.5.3/endoreg_db/data/lab_value/electrolytes.yaml +0 -190
- endoreg_db-0.5.3/endoreg_db/data/lab_value/gastrointestinal_function.yaml +0 -121
- endoreg_db-0.5.3/endoreg_db/data/lab_value/hematology.yaml +0 -169
- endoreg_db-0.5.3/endoreg_db/data/lab_value/hormones.yaml +0 -53
- endoreg_db-0.5.3/endoreg_db/data/lab_value/lipids.yaml +0 -44
- endoreg_db-0.5.3/endoreg_db/data/lab_value/misc.yaml +0 -30
- endoreg_db-0.5.3/endoreg_db/data/lab_value/renal_function.yaml +0 -11
- endoreg_db-0.5.3/endoreg_db/data/label/label/data.yaml +0 -62
- endoreg_db-0.5.3/endoreg_db/data/label/label-set/data.yaml +0 -18
- endoreg_db-0.5.3/endoreg_db/data/label/label-type/data.yaml +0 -7
- endoreg_db-0.5.3/endoreg_db/data/log_type/data.yaml +0 -57
- endoreg_db-0.5.3/endoreg_db/data/material/material.yaml +0 -91
- endoreg_db-0.5.3/endoreg_db/data/medication/anticoagulation.yaml +0 -65
- endoreg_db-0.5.3/endoreg_db/data/medication/tah.yaml +0 -70
- endoreg_db-0.5.3/endoreg_db/data/medication_indication/anticoagulation.yaml +0 -120
- endoreg_db-0.5.3/endoreg_db/data/medication_indication_type/data.yaml +0 -11
- endoreg_db-0.5.3/endoreg_db/data/medication_indication_type/thrombembolism.yaml +0 -41
- endoreg_db-0.5.3/endoreg_db/data/medication_intake_time/base.yaml +0 -31
- endoreg_db-0.5.3/endoreg_db/data/medication_schedule/apixaban.yaml +0 -95
- endoreg_db-0.5.3/endoreg_db/data/medication_schedule/ass.yaml +0 -12
- endoreg_db-0.5.3/endoreg_db/data/medication_schedule/enoxaparin.yaml +0 -26
- endoreg_db-0.5.3/endoreg_db/data/model_type/data.yaml +0 -7
- endoreg_db-0.5.3/endoreg_db/data/network_device/data.yaml +0 -29
- endoreg_db-0.5.3/endoreg_db/data/network_device_type/data.yaml +0 -12
- endoreg_db-0.5.3/endoreg_db/data/patient_lab_sample_type/generic.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/pdf_type/data.yaml +0 -28
- endoreg_db-0.5.3/endoreg_db/data/product/green_endoscopy_dashboard_Product.yaml +0 -66
- endoreg_db-0.5.3/endoreg_db/data/product_group/green_endoscopy_dashboard_ProductGroup.yaml +0 -33
- endoreg_db-0.5.3/endoreg_db/data/product_material/green_endoscopy_dashboard_ProductMaterial.yaml +0 -308
- endoreg_db-0.5.3/endoreg_db/data/product_weight/green_endoscopy_dashboard_ProductWeight.yaml +0 -88
- endoreg_db-0.5.3/endoreg_db/data/profession/data.yaml +0 -70
- endoreg_db-0.5.3/endoreg_db/data/reference_product/green_endoscopy_dashboard_ReferenceProduct.yaml +0 -55
- endoreg_db-0.5.3/endoreg_db/data/report_reader_flag/ukw-examination-generic.yaml +0 -26
- endoreg_db-0.5.3/endoreg_db/data/report_reader_flag/ukw-histology-generic.yaml +0 -19
- endoreg_db-0.5.3/endoreg_db/data/resource/green_endoscopy_dashboard_Resource.yaml +0 -15
- endoreg_db-0.5.3/endoreg_db/data/tmp/chronic_kidney_disease.yaml +0 -0
- endoreg_db-0.5.3/endoreg_db/data/tmp/congestive_heart_failure.yaml +0 -0
- endoreg_db-0.5.3/endoreg_db/data/transport_route/green_endoscopy_dashboard_TransportRoute.yaml +0 -12
- endoreg_db-0.5.3/endoreg_db/data/unit/concentration.yaml +0 -92
- endoreg_db-0.5.3/endoreg_db/data/unit/data.yaml +0 -17
- endoreg_db-0.5.3/endoreg_db/data/unit/length.yaml +0 -31
- endoreg_db-0.5.3/endoreg_db/data/unit/misc.yaml +0 -20
- endoreg_db-0.5.3/endoreg_db/data/unit/rate.yaml +0 -6
- endoreg_db-0.5.3/endoreg_db/data/unit/time.yaml +0 -13
- endoreg_db-0.5.3/endoreg_db/data/unit/volume.yaml +0 -35
- endoreg_db-0.5.3/endoreg_db/data/unit/weight.yaml +0 -38
- endoreg_db-0.5.3/endoreg_db/data/waste/data.yaml +0 -12
- endoreg_db-0.5.3/endoreg_db/forms/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/forms/questionnaires/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/forms/questionnaires/tto_questionnaire.py +0 -23
- endoreg_db-0.5.3/endoreg_db/forms/settings/__init__.py +0 -8
- endoreg_db-0.5.3/endoreg_db/forms/unit.py +0 -6
- endoreg_db-0.5.3/endoreg_db/management/commands/_load_model_template.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/delete_all.py +0 -18
- endoreg_db-0.5.3/endoreg_db/management/commands/delete_legacy_images.py +0 -19
- endoreg_db-0.5.3/endoreg_db/management/commands/delete_legacy_videos.py +0 -17
- endoreg_db-0.5.3/endoreg_db/management/commands/extract_legacy_video_frames.py +0 -18
- endoreg_db-0.5.3/endoreg_db/management/commands/fetch_legacy_image_dataset.py +0 -32
- endoreg_db-0.5.3/endoreg_db/management/commands/fix_auth_permission.py +0 -20
- endoreg_db-0.5.3/endoreg_db/management/commands/import_legacy_images.py +0 -94
- endoreg_db-0.5.3/endoreg_db/management/commands/import_legacy_videos.py +0 -76
- endoreg_db-0.5.3/endoreg_db/management/commands/load_active_model_data.py +0 -45
- endoreg_db-0.5.3/endoreg_db/management/commands/load_ai_model_data.py +0 -45
- endoreg_db-0.5.3/endoreg_db/management/commands/load_base_db_data.py +0 -136
- endoreg_db-0.5.3/endoreg_db/management/commands/load_center_data.py +0 -43
- endoreg_db-0.5.3/endoreg_db/management/commands/load_disease_classification_choices_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_disease_classification_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_disease_data.py +0 -40
- endoreg_db-0.5.3/endoreg_db/management/commands/load_distribution_data.py +0 -66
- endoreg_db-0.5.3/endoreg_db/management/commands/load_endoscope_type_data.py +0 -45
- endoreg_db-0.5.3/endoreg_db/management/commands/load_endoscopy_processor_data.py +0 -45
- endoreg_db-0.5.3/endoreg_db/management/commands/load_event_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_examination_data.py +0 -75
- endoreg_db-0.5.3/endoreg_db/management/commands/load_g_play_data.py +0 -113
- endoreg_db-0.5.3/endoreg_db/management/commands/load_gender_data.py +0 -44
- endoreg_db-0.5.3/endoreg_db/management/commands/load_green_endoscopy_wuerzburg_data.py +0 -133
- endoreg_db-0.5.3/endoreg_db/management/commands/load_information_source.py +0 -45
- endoreg_db-0.5.3/endoreg_db/management/commands/load_lab_value_data.py +0 -50
- endoreg_db-0.5.3/endoreg_db/management/commands/load_label_data.py +0 -67
- endoreg_db-0.5.3/endoreg_db/management/commands/load_logging_data.py +0 -39
- endoreg_db-0.5.3/endoreg_db/management/commands/load_medication_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_medication_indication_data.py +0 -63
- endoreg_db-0.5.3/endoreg_db/management/commands/load_medication_indication_type_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_medication_intake_time_data.py +0 -41
- endoreg_db-0.5.3/endoreg_db/management/commands/load_medication_schedule_data.py +0 -55
- endoreg_db-0.5.3/endoreg_db/management/commands/load_network_data.py +0 -57
- endoreg_db-0.5.3/endoreg_db/management/commands/load_pdf_type_data.py +0 -61
- endoreg_db-0.5.3/endoreg_db/management/commands/load_profession_data.py +0 -44
- endoreg_db-0.5.3/endoreg_db/management/commands/load_report_reader_flag.py +0 -46
- endoreg_db-0.5.3/endoreg_db/management/commands/load_unit_data.py +0 -46
- endoreg_db-0.5.3/endoreg_db/management/commands/load_user_groups.py +0 -28
- endoreg_db-0.5.3/endoreg_db/management/commands/register_ai_model.py +0 -64
- endoreg_db-0.5.3/endoreg_db/management/commands/reset_celery_schedule.py +0 -9
- endoreg_db-0.5.3/endoreg_db/migrations/0001_initial.py +0 -1567
- endoreg_db-0.5.3/endoreg_db/migrations/0002_anonymizedimagelabel_anonymousimageannotation_and_more.py +0 -55
- endoreg_db-0.5.3/endoreg_db/migrations/0003_anonymousimageannotation_original_image_url_and_more.py +0 -39
- endoreg_db-0.5.3/endoreg_db/migrations/0004_alter_rawpdffile_file.py +0 -20
- endoreg_db-0.5.3/endoreg_db/migrations/0005_uploadedfile_alter_rawpdffile_file_anonymizedfile.py +0 -40
- endoreg_db-0.5.3/endoreg_db/migrations/0006_alter_rawpdffile_file.py +0 -20
- endoreg_db-0.5.3/endoreg_db/migrations/0007_networkdevicelogentry_datetime_and_more.py +0 -43
- endoreg_db-0.5.3/endoreg_db/migrations/0008_networkdevicelogentry_aglnet_ip_and_more.py +0 -28
- endoreg_db-0.5.3/endoreg_db/migrations/0009_alter_networkdevicelogentry_vpn_service_status.py +0 -18
- endoreg_db-0.5.3/endoreg_db/migrations/0010_remove_networkdevicelogentry_hostname.py +0 -17
- endoreg_db-0.5.3/endoreg_db/migrations/__init__.py +0 -0
- endoreg_db-0.5.3/endoreg_db/models/__init__.py +0 -73
- endoreg_db-0.5.3/endoreg_db/models/ai_model/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/models/ai_model/active_model.py +0 -9
- endoreg_db-0.5.3/endoreg_db/models/ai_model/model_meta.py +0 -24
- endoreg_db-0.5.3/endoreg_db/models/ai_model/model_type.py +0 -26
- endoreg_db-0.5.3/endoreg_db/models/ai_model/utils.py +0 -8
- endoreg_db-0.5.3/endoreg_db/models/annotation/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/models/annotation/anonymized_image_annotation.py +0 -60
- endoreg_db-0.5.3/endoreg_db/models/annotation/binary_classification_annotation_task.py +0 -80
- endoreg_db-0.5.3/endoreg_db/models/annotation/image_classification.py +0 -27
- endoreg_db-0.5.3/endoreg_db/models/case_template/__init__.py +0 -6
- endoreg_db-0.5.3/endoreg_db/models/case_template/case_template.py +0 -81
- endoreg_db-0.5.3/endoreg_db/models/case_template/case_template_rule.py +0 -276
- endoreg_db-0.5.3/endoreg_db/models/case_template/case_template_rule_value.py +0 -73
- endoreg_db-0.5.3/endoreg_db/models/case_template/case_template_type.py +0 -28
- endoreg_db-0.5.3/endoreg_db/models/center/__init__.py +0 -4
- endoreg_db-0.5.3/endoreg_db/models/center/center.py +0 -25
- endoreg_db-0.5.3/endoreg_db/models/center/center_product.py +0 -34
- endoreg_db-0.5.3/endoreg_db/models/center/center_resource.py +0 -19
- endoreg_db-0.5.3/endoreg_db/models/center/center_waste.py +0 -11
- endoreg_db-0.5.3/endoreg_db/models/data_file/__init__.py +0 -6
- endoreg_db-0.5.3/endoreg_db/models/data_file/base_classes/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/data_file/base_classes/abstract_frame.py +0 -51
- endoreg_db-0.5.3/endoreg_db/models/data_file/base_classes/abstract_video.py +0 -201
- endoreg_db-0.5.3/endoreg_db/models/data_file/frame.py +0 -45
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/__init__.py +0 -32
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/processing_functions/__init__.py +0 -35
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/processing_functions/pdf.py +0 -28
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/processing_functions/video.py +0 -260
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/raw_pdf.py +0 -188
- endoreg_db-0.5.3/endoreg_db/models/data_file/import_classes/raw_video.py +0 -343
- endoreg_db-0.5.3/endoreg_db/models/data_file/metadata/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/models/data_file/metadata/pdf_meta.py +0 -70
- endoreg_db-0.5.3/endoreg_db/models/data_file/metadata/sensitive_meta.py +0 -31
- endoreg_db-0.5.3/endoreg_db/models/data_file/metadata/video_meta.py +0 -133
- endoreg_db-0.5.3/endoreg_db/models/data_file/report_file.py +0 -89
- endoreg_db-0.5.3/endoreg_db/models/data_file/video/__init__.py +0 -7
- endoreg_db-0.5.3/endoreg_db/models/data_file/video/import_meta.py +0 -25
- endoreg_db-0.5.3/endoreg_db/models/data_file/video/video.py +0 -25
- endoreg_db-0.5.3/endoreg_db/models/data_file/video_segment.py +0 -107
- endoreg_db-0.5.3/endoreg_db/models/disease.py +0 -56
- endoreg_db-0.5.3/endoreg_db/models/emission/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/models/emission/emission_factor.py +0 -20
- endoreg_db-0.5.3/endoreg_db/models/event.py +0 -22
- endoreg_db-0.5.3/endoreg_db/models/examination/__init__.py +0 -4
- endoreg_db-0.5.3/endoreg_db/models/examination/examination.py +0 -26
- endoreg_db-0.5.3/endoreg_db/models/examination/examination_time.py +0 -27
- endoreg_db-0.5.3/endoreg_db/models/examination/examination_time_type.py +0 -24
- endoreg_db-0.5.3/endoreg_db/models/examination/examination_type.py +0 -18
- endoreg_db-0.5.3/endoreg_db/models/hardware/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/hardware/endoscope.py +0 -44
- endoreg_db-0.5.3/endoreg_db/models/hardware/endoscopy_processor.py +0 -143
- endoreg_db-0.5.3/endoreg_db/models/information_source.py +0 -29
- endoreg_db-0.5.3/endoreg_db/models/label/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/models/label/label.py +0 -84
- endoreg_db-0.5.3/endoreg_db/models/laboratory/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/models/laboratory/lab_value.py +0 -102
- endoreg_db-0.5.3/endoreg_db/models/legacy_data/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/models/legacy_data/image.py +0 -34
- endoreg_db-0.5.3/endoreg_db/models/logging/__init__.py +0 -4
- endoreg_db-0.5.3/endoreg_db/models/logging/agl_service.py +0 -19
- endoreg_db-0.5.3/endoreg_db/models/logging/base.py +0 -22
- endoreg_db-0.5.3/endoreg_db/models/logging/log_type.py +0 -23
- endoreg_db-0.5.3/endoreg_db/models/logging/network_device.py +0 -27
- endoreg_db-0.5.3/endoreg_db/models/medication/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/models/medication/medication.py +0 -148
- endoreg_db-0.5.3/endoreg_db/models/network/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/models/network/agl_service.py +0 -38
- endoreg_db-0.5.3/endoreg_db/models/network/network_device.py +0 -53
- endoreg_db-0.5.3/endoreg_db/models/network/network_device_type.py +0 -23
- endoreg_db-0.5.3/endoreg_db/models/other/__init__.py +0 -5
- endoreg_db-0.5.3/endoreg_db/models/other/distribution.py +0 -215
- endoreg_db-0.5.3/endoreg_db/models/other/material.py +0 -16
- endoreg_db-0.5.3/endoreg_db/models/other/resource.py +0 -18
- endoreg_db-0.5.3/endoreg_db/models/other/transport_route.py +0 -21
- endoreg_db-0.5.3/endoreg_db/models/other/waste.py +0 -20
- endoreg_db-0.5.3/endoreg_db/models/patient_examination/__init__.py +0 -35
- endoreg_db-0.5.3/endoreg_db/models/permissions/__init__.py +0 -44
- endoreg_db-0.5.3/endoreg_db/models/persons/__init__.py +0 -7
- endoreg_db-0.5.3/endoreg_db/models/persons/examiner/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/persons/examiner/examiner.py +0 -16
- endoreg_db-0.5.3/endoreg_db/models/persons/examiner/examiner_type.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/persons/first_name.py +0 -18
- endoreg_db-0.5.3/endoreg_db/models/persons/gender.py +0 -22
- endoreg_db-0.5.3/endoreg_db/models/persons/last_name.py +0 -20
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/__init__.py +0 -8
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/case/__init__.py +0 -0
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/case/case.py +0 -30
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient.py +0 -216
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_disease.py +0 -16
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_event.py +0 -22
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_lab_sample.py +0 -106
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_lab_value.py +0 -176
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_medication.py +0 -44
- endoreg_db-0.5.3/endoreg_db/models/persons/patient/patient_medication_schedule.py +0 -28
- endoreg_db-0.5.3/endoreg_db/models/persons/person.py +0 -31
- endoreg_db-0.5.3/endoreg_db/models/persons/portal_user_information.py +0 -27
- endoreg_db-0.5.3/endoreg_db/models/prediction/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/prediction/image_classification.py +0 -37
- endoreg_db-0.5.3/endoreg_db/models/prediction/video_prediction_meta.py +0 -244
- endoreg_db-0.5.3/endoreg_db/models/product/__init__.py +0 -5
- endoreg_db-0.5.3/endoreg_db/models/product/product.py +0 -97
- endoreg_db-0.5.3/endoreg_db/models/product/product_group.py +0 -19
- endoreg_db-0.5.3/endoreg_db/models/product/product_material.py +0 -24
- endoreg_db-0.5.3/endoreg_db/models/product/product_weight.py +0 -26
- endoreg_db-0.5.3/endoreg_db/models/product/reference_product.py +0 -99
- endoreg_db-0.5.3/endoreg_db/models/questionnaires/__init__.py +0 -114
- endoreg_db-0.5.3/endoreg_db/models/quiz/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/quiz/quiz_answer.py +0 -41
- endoreg_db-0.5.3/endoreg_db/models/quiz/quiz_question.py +0 -54
- endoreg_db-0.5.3/endoreg_db/models/report_reader/__init__.py +0 -2
- endoreg_db-0.5.3/endoreg_db/models/report_reader/report_reader_config.py +0 -53
- endoreg_db-0.5.3/endoreg_db/models/report_reader/report_reader_flag.py +0 -20
- endoreg_db-0.5.3/endoreg_db/models/rules/__init__.py +0 -5
- endoreg_db-0.5.3/endoreg_db/models/rules/rule.py +0 -24
- endoreg_db-0.5.3/endoreg_db/models/rules/rule_applicator.py +0 -224
- endoreg_db-0.5.3/endoreg_db/models/rules/rule_attribute_dtype.py +0 -19
- endoreg_db-0.5.3/endoreg_db/models/rules/rule_type.py +0 -22
- endoreg_db-0.5.3/endoreg_db/models/rules/ruleset.py +0 -19
- endoreg_db-0.5.3/endoreg_db/models/unit.py +0 -22
- endoreg_db-0.5.3/endoreg_db/queries/__init__.py +0 -5
- endoreg_db-0.5.3/endoreg_db/queries/annotations/__init__.py +0 -3
- endoreg_db-0.5.3/endoreg_db/queries/annotations/legacy.py +0 -158
- endoreg_db-0.5.3/endoreg_db/queries/get/__init__.py +0 -6
- endoreg_db-0.5.3/endoreg_db/queries/get/annotation.py +0 -0
- endoreg_db-0.5.3/endoreg_db/queries/get/center.py +0 -42
- endoreg_db-0.5.3/endoreg_db/queries/get/model.py +0 -13
- endoreg_db-0.5.3/endoreg_db/queries/get/patient.py +0 -14
- endoreg_db-0.5.3/endoreg_db/queries/get/patient_examination.py +0 -20
- endoreg_db-0.5.3/endoreg_db/queries/get/prediction.py +0 -0
- endoreg_db-0.5.3/endoreg_db/queries/get/report_file.py +0 -33
- endoreg_db-0.5.3/endoreg_db/queries/get/video.py +0 -31
- endoreg_db-0.5.3/endoreg_db/queries/get/video_import_meta.py +0 -0
- endoreg_db-0.5.3/endoreg_db/queries/get/video_prediction_meta.py +0 -0
- endoreg_db-0.5.3/endoreg_db/queries/sanity/__init_.py +0 -0
- endoreg_db-0.5.3/endoreg_db/serializers/__init__.py +0 -10
- endoreg_db-0.5.3/endoreg_db/serializers/ai_model.py +0 -19
- endoreg_db-0.5.3/endoreg_db/serializers/annotation.py +0 -17
- endoreg_db-0.5.3/endoreg_db/serializers/center.py +0 -11
- endoreg_db-0.5.3/endoreg_db/serializers/examination.py +0 -33
- endoreg_db-0.5.3/endoreg_db/serializers/frame.py +0 -13
- endoreg_db-0.5.3/endoreg_db/serializers/hardware.py +0 -21
- endoreg_db-0.5.3/endoreg_db/serializers/label.py +0 -22
- endoreg_db-0.5.3/endoreg_db/serializers/patient.py +0 -10
- endoreg_db-0.5.3/endoreg_db/serializers/prediction.py +0 -15
- endoreg_db-0.5.3/endoreg_db/serializers/report_file.py +0 -7
- endoreg_db-0.5.3/endoreg_db/serializers/video.py +0 -27
- endoreg_db-0.5.3/endoreg_db/utils/__init__.py +0 -1
- endoreg_db-0.5.3/endoreg_db/utils/cropping.py +0 -29
- endoreg_db-0.5.3/endoreg_db/utils/dataloader.py +0 -92
- endoreg_db-0.5.3/endoreg_db/utils/file_operations.py +0 -30
- endoreg_db-0.5.3/endoreg_db/utils/hashs.py +0 -34
- endoreg_db-0.5.3/endoreg_db/utils/legacy_ocr.py +0 -201
- endoreg_db-0.5.3/endoreg_db/utils/ocr.py +0 -190
- endoreg_db-0.5.3/endoreg_db/utils/uuid.py +0 -4
- endoreg_db-0.5.3/endoreg_db/utils/video_metadata.py +0 -87
- endoreg_db-0.5.3/endoreg_db/views.py +0 -3
- endoreg_db-0.5.3/flake.lock +0 -72
- endoreg_db-0.5.3/flake.nix +0 -197
- endoreg_db-0.5.3/poetry.lock +0 -976
- endoreg_db-0.5.3/pyproject.toml +0 -47
- endoreg_db-0.5.3/secrets/poetry.yaml +0 -21
- endoreg_db-0.5.3/uv.lock +0 -928
- {endoreg_db-0.5.3 → endoreg_db-0.6.0}/LICENSE +0 -0
- {endoreg_db-0.5.3 → endoreg_db-0.6.0}/endoreg_db/__init__.py +0 -0
- {endoreg_db-0.5.3 → endoreg_db-0.6.0}/endoreg_db/apps.py +0 -0
- {endoreg_db-0.5.3 → endoreg_db-0.6.0}/endoreg_db/tests.py +0 -0
- /endoreg_db-0.5.3/endoreg_db/data/case_template/rule_value/.init → /endoreg_db-0.6.0/endoreg_db/views.py +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: endoreg-db
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: EndoReg Db Django App
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: agl-report-reader>=0.4.0
|
|
9
|
+
Requires-Dist: django-bootstrap5>=24.3
|
|
10
|
+
Requires-Dist: django-cors-headers>=4.7.0
|
|
11
|
+
Requires-Dist: django-extensions>=3.2.3
|
|
12
|
+
Requires-Dist: django>=5.1.3
|
|
13
|
+
Requires-Dist: djangorestframework>=3.15.2
|
|
14
|
+
Requires-Dist: faker>=32.1.0
|
|
15
|
+
Requires-Dist: icecream>=2.1.4
|
|
16
|
+
Requires-Dist: numpy>=2.1.3
|
|
17
|
+
Requires-Dist: opencv-python>=4.10.0.84
|
|
18
|
+
Requires-Dist: pandas>=2.2.3
|
|
19
|
+
Requires-Dist: pillow>=11.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.10.6
|
|
21
|
+
Requires-Dist: pytesseract>=0.3.13
|
|
22
|
+
Requires-Dist: python-ffmpeg>=2.0.12
|
|
23
|
+
Requires-Dist: pytorch-lightning>=2.4.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
25
|
+
Requires-Dist: scikit-learn>=1.5.2
|
|
26
|
+
Requires-Dist: scipy>=1.14.1
|
|
27
|
+
Requires-Dist: tesseract>=0.1.3
|
|
28
|
+
Requires-Dist: tqdm>=4.67.0
|
|
29
|
+
Requires-Dist: urllib3>=2.2.3
|
|
30
|
+
|
|
31
|
+
# EndoregDB - Professional Data Infrastructure for Clinical Research
|
|
32
|
+
|
|
33
|
+
EndoregDB is a comprehensive database framework designed to manage medical and research-related data for clinical trials. This repository focuses on efficient data processing, automated deployment, security, and reproducibility, offering a flexible setup for local development environments as well as distributed systems. It supports the integration of AI/ML tools and advanced image and report processing.
|
|
34
|
+
|
|
35
|
+
This infrastructure was originally designed for clinical research studies and is optimized for handling large data volumes, including:
|
|
36
|
+
|
|
37
|
+
- Medical reports,
|
|
38
|
+
- Patient imaging and video data,
|
|
39
|
+
- Clinical product and treatment data,
|
|
40
|
+
and more.
|
|
41
|
+
|
|
42
|
+
## 🚀 Key Features
|
|
43
|
+
|
|
44
|
+
### System Architecture
|
|
45
|
+
|
|
46
|
+
- **Modular Design**: Built on scalable and reusable components to simplify integration into various environments.
|
|
47
|
+
- **Multi-System Support**: Manages configurations for local workstations and production servers.
|
|
48
|
+
- **Role-Specific Configuration**: Predefined roles for common use cases:
|
|
49
|
+
- Medical data processing systems
|
|
50
|
+
- AI/ML model deployment
|
|
51
|
+
- Research workstation configuration
|
|
52
|
+
|
|
53
|
+
### Security & Data Management
|
|
54
|
+
|
|
55
|
+
- **Data Encryption**: All sensitive data is encrypted, and privacy policies are enforced.
|
|
56
|
+
- **Impermanence**: Stateless system configuration with persistence for critical data.
|
|
57
|
+
- **Access Control**: Role-based access and identity management integration.
|
|
58
|
+
|
|
59
|
+
### Data and Processing Environment
|
|
60
|
+
|
|
61
|
+
- **Data Processing**: Optimized for processing medical datasets with preprocessing tools.
|
|
62
|
+
- **AI/ML Support**:
|
|
63
|
+
- Integration of machine learning tools for predictive analysis.
|
|
64
|
+
- TensorFlow, PyTorch, and other frameworks supported for model training.
|
|
65
|
+
- **Image/Video Processing**: Support for analyzing patient images and clinical videos.
|
|
66
|
+
|
|
67
|
+
### Development Tools & Infrastructure
|
|
68
|
+
|
|
69
|
+
- **Data Science Toolchains**: Pre-configured environments for data processing, analysis, and visualization.
|
|
70
|
+
- **Monitoring & Logging**: Setup for continuous monitoring and logging to ensure system stability and performance.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 🛠 Getting Started
|
|
75
|
+
|
|
76
|
+
### Prerequisites
|
|
77
|
+
|
|
78
|
+
- A Linux-based system (Ubuntu/Debian recommended) or NixOS
|
|
79
|
+
- Hardware with sufficient storage for data processing (at least 1 TB recommended)
|
|
80
|
+
|
|
81
|
+
### Quick Start
|
|
82
|
+
|
|
83
|
+
1. Clone the repository:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git clone https://github.com/wg-lux/endoreg-db.git
|
|
87
|
+
cd endoreg-db
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. Set up your Python environment:
|
|
91
|
+
_TODO_: Explain Devenv / point to other docs
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
direnv allow
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. Run tests:
|
|
98
|
+
Call Devenv Script to run tests
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
runtests
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 📁 Repository Structure
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
endoreg-db/
|
|
110
|
+
├── endoreg_db/ # Main Django app for medical data
|
|
111
|
+
│ ├── case_generator/ # Sample case generator
|
|
112
|
+
│ ├── data/ # Medical knowledge base
|
|
113
|
+
│ ├── management/ # Data wrangling operations
|
|
114
|
+
│ ├── models/ # Data models
|
|
115
|
+
│ ├── migrations/ # Database migrations
|
|
116
|
+
│ └── serializers/ # Serializers for data
|
|
117
|
+
├── .gitignore # Git ignore file for unnecessary files
|
|
118
|
+
└── README.md # Project description and setup instructions
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 🔒 Security Features
|
|
124
|
+
|
|
125
|
+
- **Data Encryption**: All sensitive patient data is encrypted.
|
|
126
|
+
- **Role-Based Access Control**: Configurable roles for managing access to various parts of the system.
|
|
127
|
+
- **Logging & Auditing**: Comprehensive logging system that tracks user activities and data changes.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🖥️ Supported Systems
|
|
132
|
+
|
|
133
|
+
- **Workstations**: Local development or research workstations with low data processing demands.
|
|
134
|
+
- **Servers**: Scalable server infrastructure for processing large data volumes, integrated with cloud services for scalability.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 🛟 Support
|
|
139
|
+
|
|
140
|
+
For issues and questions:
|
|
141
|
+
|
|
142
|
+
- Create an issue in the repository
|
|
143
|
+
- Review the Deployment Guide for common issues
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 📜 License
|
|
148
|
+
|
|
149
|
+
MIT - see LICENSE
|
|
150
|
+
|
|
151
|
+
---
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# EndoregDB - Professional Data Infrastructure for Clinical Research
|
|
2
|
+
|
|
3
|
+
EndoregDB is a comprehensive database framework designed to manage medical and research-related data for clinical trials. This repository focuses on efficient data processing, automated deployment, security, and reproducibility, offering a flexible setup for local development environments as well as distributed systems. It supports the integration of AI/ML tools and advanced image and report processing.
|
|
4
|
+
|
|
5
|
+
This infrastructure was originally designed for clinical research studies and is optimized for handling large data volumes, including:
|
|
6
|
+
|
|
7
|
+
- Medical reports,
|
|
8
|
+
- Patient imaging and video data,
|
|
9
|
+
- Clinical product and treatment data,
|
|
10
|
+
and more.
|
|
11
|
+
|
|
12
|
+
## 🚀 Key Features
|
|
13
|
+
|
|
14
|
+
### System Architecture
|
|
15
|
+
|
|
16
|
+
- **Modular Design**: Built on scalable and reusable components to simplify integration into various environments.
|
|
17
|
+
- **Multi-System Support**: Manages configurations for local workstations and production servers.
|
|
18
|
+
- **Role-Specific Configuration**: Predefined roles for common use cases:
|
|
19
|
+
- Medical data processing systems
|
|
20
|
+
- AI/ML model deployment
|
|
21
|
+
- Research workstation configuration
|
|
22
|
+
|
|
23
|
+
### Security & Data Management
|
|
24
|
+
|
|
25
|
+
- **Data Encryption**: All sensitive data is encrypted, and privacy policies are enforced.
|
|
26
|
+
- **Impermanence**: Stateless system configuration with persistence for critical data.
|
|
27
|
+
- **Access Control**: Role-based access and identity management integration.
|
|
28
|
+
|
|
29
|
+
### Data and Processing Environment
|
|
30
|
+
|
|
31
|
+
- **Data Processing**: Optimized for processing medical datasets with preprocessing tools.
|
|
32
|
+
- **AI/ML Support**:
|
|
33
|
+
- Integration of machine learning tools for predictive analysis.
|
|
34
|
+
- TensorFlow, PyTorch, and other frameworks supported for model training.
|
|
35
|
+
- **Image/Video Processing**: Support for analyzing patient images and clinical videos.
|
|
36
|
+
|
|
37
|
+
### Development Tools & Infrastructure
|
|
38
|
+
|
|
39
|
+
- **Data Science Toolchains**: Pre-configured environments for data processing, analysis, and visualization.
|
|
40
|
+
- **Monitoring & Logging**: Setup for continuous monitoring and logging to ensure system stability and performance.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🛠 Getting Started
|
|
45
|
+
|
|
46
|
+
### Prerequisites
|
|
47
|
+
|
|
48
|
+
- A Linux-based system (Ubuntu/Debian recommended) or NixOS
|
|
49
|
+
- Hardware with sufficient storage for data processing (at least 1 TB recommended)
|
|
50
|
+
|
|
51
|
+
### Quick Start
|
|
52
|
+
|
|
53
|
+
1. Clone the repository:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/wg-lux/endoreg-db.git
|
|
57
|
+
cd endoreg-db
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
2. Set up your Python environment:
|
|
61
|
+
_TODO_: Explain Devenv / point to other docs
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
direnv allow
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
3. Run tests:
|
|
68
|
+
Call Devenv Script to run tests
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
runtests
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 📁 Repository Structure
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
endoreg-db/
|
|
80
|
+
├── endoreg_db/ # Main Django app for medical data
|
|
81
|
+
│ ├── case_generator/ # Sample case generator
|
|
82
|
+
│ ├── data/ # Medical knowledge base
|
|
83
|
+
│ ├── management/ # Data wrangling operations
|
|
84
|
+
│ ├── models/ # Data models
|
|
85
|
+
│ ├── migrations/ # Database migrations
|
|
86
|
+
│ └── serializers/ # Serializers for data
|
|
87
|
+
├── .gitignore # Git ignore file for unnecessary files
|
|
88
|
+
└── README.md # Project description and setup instructions
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 🔒 Security Features
|
|
94
|
+
|
|
95
|
+
- **Data Encryption**: All sensitive patient data is encrypted.
|
|
96
|
+
- **Role-Based Access Control**: Configurable roles for managing access to various parts of the system.
|
|
97
|
+
- **Logging & Auditing**: Comprehensive logging system that tracks user activities and data changes.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 🖥️ Supported Systems
|
|
102
|
+
|
|
103
|
+
- **Workstations**: Local development or research workstations with low data processing demands.
|
|
104
|
+
- **Servers**: Scalable server infrastructure for processing large data volumes, integrated with cloud services for scalability.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 🛟 Support
|
|
109
|
+
|
|
110
|
+
For issues and questions:
|
|
111
|
+
|
|
112
|
+
- Create an issue in the repository
|
|
113
|
+
- Review the Deployment Guide for common issues
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 📜 License
|
|
118
|
+
|
|
119
|
+
MIT - see LICENSE
|
|
120
|
+
|
|
121
|
+
---
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from django.urls import path
|
|
2
|
+
from django.contrib import admin
|
|
3
|
+
from django.http import JsonResponse
|
|
4
|
+
from endoreg_db.models import (
|
|
5
|
+
Patient,
|
|
6
|
+
Examination,
|
|
7
|
+
PatientExamination,
|
|
8
|
+
Finding,
|
|
9
|
+
FindingLocationClassification,
|
|
10
|
+
FindingMorphologyClassification,
|
|
11
|
+
FindingIntervention, # Import Finding Interventions
|
|
12
|
+
PatientFindingIntervention,
|
|
13
|
+
FindingLocationClassificationChoice,
|
|
14
|
+
FindingMorphologyClassificationChoice,
|
|
15
|
+
)
|
|
16
|
+
from endoreg_db.forms.patient_finding_intervention_form import (
|
|
17
|
+
PatientFindingInterventionForm,
|
|
18
|
+
)
|
|
19
|
+
from endoreg_db.forms.patient_form import PatientForm
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@admin.register(Patient)
|
|
23
|
+
class PatientAdmin(admin.ModelAdmin):
|
|
24
|
+
form = PatientForm
|
|
25
|
+
list_display = ("id", "first_name", "last_name", "dob", "center")
|
|
26
|
+
search_fields = ("first_name", "last_name", "email", "phone")
|
|
27
|
+
list_filter = ("dob", "center")
|
|
28
|
+
ordering = ("last_name",)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@admin.register(Examination)
|
|
32
|
+
class ExaminationAdmin(admin.ModelAdmin):
|
|
33
|
+
list_display = ("id", "name")
|
|
34
|
+
search_fields = ("name", "name_de", "name_en")
|
|
35
|
+
list_filter = ("name",)
|
|
36
|
+
ordering = ("name",)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class PatientFindingInterventionAdmin(admin.ModelAdmin):
|
|
40
|
+
change_list_template = "admin/patient_finding_intervention.html"
|
|
41
|
+
|
|
42
|
+
def changelist_view(self, request, extra_context=None):
|
|
43
|
+
"""Pass Patients, Examinations, Findings, Locations, Location Choices, Morphologies, Morphology Choices, and Finding Interventions to the template"""
|
|
44
|
+
extra_context = {
|
|
45
|
+
"patients": Patient.objects.all(),
|
|
46
|
+
"examinations": Examination.objects.all(),
|
|
47
|
+
"findings": Finding.objects.all(),
|
|
48
|
+
"locations": FindingLocationClassification.objects.all(),
|
|
49
|
+
"location_choices": FindingLocationClassificationChoice.objects.none(),
|
|
50
|
+
"morphologies": FindingMorphologyClassification.objects.all(),
|
|
51
|
+
"morphology_choices": FindingMorphologyClassificationChoice.objects.all(),
|
|
52
|
+
"finding_interventions": FindingIntervention.objects.all(), # Pass Finding Interventions
|
|
53
|
+
}
|
|
54
|
+
return super().changelist_view(request, extra_context=extra_context)
|
|
55
|
+
|
|
56
|
+
def get_location_choices_json(self, request):
|
|
57
|
+
"""Ensure Django Admin returns JSON response for Location Choices"""
|
|
58
|
+
location_id = request.GET.get("location")
|
|
59
|
+
if not location_id:
|
|
60
|
+
return JsonResponse({"error": "Location ID is required"}, status=400)
|
|
61
|
+
|
|
62
|
+
try:
|
|
63
|
+
choices = list(
|
|
64
|
+
FindingLocationClassificationChoice.objects.filter(
|
|
65
|
+
location_classifications__id=location_id
|
|
66
|
+
).values("id", "name")
|
|
67
|
+
) # Convert QuerySet to List
|
|
68
|
+
|
|
69
|
+
if not choices:
|
|
70
|
+
return JsonResponse(
|
|
71
|
+
[], safe=False
|
|
72
|
+
) # Return an empty list if no data found
|
|
73
|
+
|
|
74
|
+
return JsonResponse(choices, safe=False) # Return valid JSON
|
|
75
|
+
|
|
76
|
+
except Exception as e:
|
|
77
|
+
return JsonResponse({"error": str(e)}, status=500)
|
|
78
|
+
|
|
79
|
+
def get_urls(self):
|
|
80
|
+
"""Register JSON endpoint inside Django Admin"""
|
|
81
|
+
urls = super().get_urls()
|
|
82
|
+
custom_urls = [
|
|
83
|
+
path(
|
|
84
|
+
"ajax/get-location-choices/",
|
|
85
|
+
self.admin_site.admin_view(self.get_location_choices_json),
|
|
86
|
+
name="ajax_get_location_choices",
|
|
87
|
+
),
|
|
88
|
+
]
|
|
89
|
+
return custom_urls + urls
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
admin.site.register(PatientFindingIntervention, PatientFindingInterventionAdmin)
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
from django.urls import path, include
|
|
2
|
+
from rest_framework.routers import DefaultRouter
|
|
3
|
+
from .views.patient_views import (
|
|
4
|
+
PatientViewSet,
|
|
5
|
+
start_examination,
|
|
6
|
+
get_location_choices,
|
|
7
|
+
get_morphology_choices,
|
|
8
|
+
)
|
|
9
|
+
from .views.csrf import csrf_token_view
|
|
10
|
+
#from .views.feature_selection_view import FetchSingleFramePredictionView // its implemented in ando-ai other project need to add here
|
|
11
|
+
from .views.video_segmentation_views import VideoView, VideoLabelView,UpdateLabelSegmentsView
|
|
12
|
+
from .views.views_for_timeline import video_timeline_view
|
|
13
|
+
from .views.raw_video_meta_validation_views import VideoFileForMetaView
|
|
14
|
+
router = DefaultRouter()
|
|
15
|
+
router.register(r'patients', PatientViewSet)
|
|
16
|
+
|
|
17
|
+
urlpatterns = [
|
|
18
|
+
path('start-examination/', start_examination, name="start_examination"),
|
|
19
|
+
path('get-location-choices/<int:location_id>/', get_location_choices, name="get_location_choices"),
|
|
20
|
+
path('get-morphology-choices/<int:morphology_id>/', get_morphology_choices, name="get_morphology_choices"),
|
|
21
|
+
path('api/', include(router.urls)),
|
|
22
|
+
path('api/conf/', csrf_token_view, name='csrf_token'),
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#--------------------------------------VIDEO SEGMENTATION END POINTS--------------------------------------
|
|
27
|
+
|
|
28
|
+
# The dropdown contains video names and their corresponding IDs, which are retrieved from the database(RawVideoFile). Additionally, this route(api/videos) also fetches labels along with their names and IDs from the label table.
|
|
29
|
+
# We will modify this implementation later as per our requirements.
|
|
30
|
+
#Based on the selected video ID, relevant data will be fetched from the database, and the video, along with its associated details,
|
|
31
|
+
# will be displayed on the frontend using route(api/video/<int:video_id>/).
|
|
32
|
+
# once label is selected from the dropdown,using its name, details can be fetched from rawvideofile using route("api/video/<int:video_id>/label/<str:label_name>/)
|
|
33
|
+
#If editing is required, a form will be available for each label. This form dynamically updates when the selected label changes. It will display all segments associated with the selected label, each with a delete option. Below these segments, there may be a button for adding more segments.
|
|
34
|
+
#If any values in the form are modified, the updated data will be saved in the database table.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Fetch all videos for the dropdown
|
|
40
|
+
# Fetch all available videos (for the video selection dropdown in frontend)
|
|
41
|
+
# Usage in frontend: Call this API to get a list of available videos.
|
|
42
|
+
# Example request: GET /api/videos/
|
|
43
|
+
# Response: Returns a JSON list of videos (id, file path, video_url, sequences, label_names).
|
|
44
|
+
# it also fetch the label from teh label table
|
|
45
|
+
path("api/videos/", VideoView.as_view(), name="video_list"),
|
|
46
|
+
|
|
47
|
+
#need to change this route
|
|
48
|
+
#path('api/prediction/', FetchSingleFramePredictionView.as_view(), name='fetch-single-frame-prediction'),#.as_view() converts the class-based view into a function that Django can use for routing.
|
|
49
|
+
|
|
50
|
+
# Fetch video details + labels based on selected video
|
|
51
|
+
# Usage in frontend: Call this when a user selects a video from the dropdown.
|
|
52
|
+
# Example request: GET /api/video/1/
|
|
53
|
+
# Response: Returns metadata, file path, video URL, sequences, and available label names.
|
|
54
|
+
# Frontend should use this api for `label_names`, to display label selection (dropdown or tabs).
|
|
55
|
+
path("api/video/<int:video_id>/", VideoView.as_view(), name="video_handler"),
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Fetch time segments along with frame predictions and filenames for a selected label
|
|
59
|
+
#
|
|
60
|
+
# **Usage in frontend:**
|
|
61
|
+
# - Call this API when a user selects a label from the dropdown in the timeline.
|
|
62
|
+
# - The API returns time segments (start & end times in seconds) where the label appears in the video.
|
|
63
|
+
# - Each segment includes frame-wise predictions and the corresponding frame filenames.
|
|
64
|
+
#
|
|
65
|
+
# **Example request:**
|
|
66
|
+
# GET /api/video/1/label/outside/
|
|
67
|
+
#
|
|
68
|
+
# **Example response:**
|
|
69
|
+
# {
|
|
70
|
+
# "label": "outside",
|
|
71
|
+
# "time_segments": [
|
|
72
|
+
# { "segment_start": 0,
|
|
73
|
+
# "segment_end": 463,
|
|
74
|
+
# "start_time": 0.0,
|
|
75
|
+
# "end_time": 9.26,
|
|
76
|
+
# "frames": {
|
|
77
|
+
# "0": {
|
|
78
|
+
# "frame_filename": "frame_0000000.jpg",
|
|
79
|
+
# "frame_file_path": "/home/admin/test-data/video_frames/abc123/frame_0000000.jpg",
|
|
80
|
+
# "predictions": {
|
|
81
|
+
# "appendix": 0.0150,
|
|
82
|
+
# and others
|
|
83
|
+
# }
|
|
84
|
+
# },
|
|
85
|
+
# "1": {
|
|
86
|
+
# "frame_filename": "frame_0000001.jpg",
|
|
87
|
+
# "frame_file_path": "/home/admin/test-data/video_frames/abc123/frame_0000001.jpg",
|
|
88
|
+
# "predictions": {
|
|
89
|
+
# "appendix": 0.0124,
|
|
90
|
+
# and otehrs
|
|
91
|
+
# }}}}]}
|
|
92
|
+
#
|
|
93
|
+
# start_time and end_time are in seconds, converted from frame indices.
|
|
94
|
+
# frames contains all frames in the segment with:
|
|
95
|
+
# frame_filename (e.g., frame_0000001.jpg)
|
|
96
|
+
# frame_file_path (full path for easy access)
|
|
97
|
+
# predictions (frame-wise probability scores for each category)
|
|
98
|
+
#we need label name for this not id as we donot have id in rawvideofile table
|
|
99
|
+
path("api/video/<int:video_id>/label/<str:label_name>/", VideoLabelView.as_view(), name="video_label_times"),
|
|
100
|
+
|
|
101
|
+
# Update or create label segments for a specific video and label
|
|
102
|
+
# - Call this API when a user updates the start and end frames of a label segment(adding new , deleting or changing the values).
|
|
103
|
+
# - The API will:
|
|
104
|
+
# - **Update** existing segments if they match the given `video_id` and `label_id`.
|
|
105
|
+
# - **Create** new segments if they do not already exist.
|
|
106
|
+
# - **Delete** segments from the database if they were removed from the frontend.
|
|
107
|
+
# - This ensures that the database reflects exactly what is sent from the frontend.
|
|
108
|
+
#
|
|
109
|
+
# **Example request (Updating segments for label ID 12 in video ID 1):**
|
|
110
|
+
# PUT /api/video/1/label/12/update_segments/
|
|
111
|
+
#
|
|
112
|
+
# **Request body (JSON):**
|
|
113
|
+
# {
|
|
114
|
+
# "video_id": 1,
|
|
115
|
+
# "label_id": 12,
|
|
116
|
+
# "segments": [
|
|
117
|
+
# {
|
|
118
|
+
# "start_frame_number": 0,
|
|
119
|
+
# "end_frame_number": 463
|
|
120
|
+
# },{
|
|
121
|
+
# "start_frame_number": 500,
|
|
122
|
+
# "end_frame_number": 700
|
|
123
|
+
# }]}
|
|
124
|
+
#
|
|
125
|
+
# **Expected response (If successful):**
|
|
126
|
+
# {
|
|
127
|
+
# "updated_segments": [
|
|
128
|
+
# {
|
|
129
|
+
# "id": 1,
|
|
130
|
+
# "video_id": 1,
|
|
131
|
+
# "label_id": 12,
|
|
132
|
+
# "start_frame_number": 0,
|
|
133
|
+
# "end_frame_number": 463
|
|
134
|
+
# }
|
|
135
|
+
# ],
|
|
136
|
+
# "new_segments": [
|
|
137
|
+
# {
|
|
138
|
+
# "id": 2,
|
|
139
|
+
# "video_id": 1,
|
|
140
|
+
# "label_id": 12,
|
|
141
|
+
# "start_frame_number": 500,
|
|
142
|
+
# "end_frame_number": 700
|
|
143
|
+
# }
|
|
144
|
+
# ],
|
|
145
|
+
# "deleted_segments": 1 # Number of deleted segments if any were removed
|
|
146
|
+
# }
|
|
147
|
+
|
|
148
|
+
# **Frontend Integration:**
|
|
149
|
+
# - Vue.js should send this request when the user **saves changes** to segments.
|
|
150
|
+
# - The **"Add Segment"** button should allow users to add new segments dynamically.
|
|
151
|
+
# - The **"Delete Segment"** button should remove segments from the list before submitting.
|
|
152
|
+
# - The request should be triggered via an `axios.put` call:
|
|
153
|
+
#
|
|
154
|
+
path("api/video/<int:video_id>/label/<int:label_id>/update_segments/", UpdateLabelSegmentsView.as_view(), name="update_label_segments"),
|
|
155
|
+
|
|
156
|
+
#----------------------------------END--VIDEO SEGMENTATION SECTION-------------------------------
|
|
157
|
+
#this is for to test the timeline
|
|
158
|
+
#need to delete this url and also endoreg_db_production/endoreg_db/views/views_for_timeline.py and endoreg_db_production/endoreg_db/templates/timeline.html
|
|
159
|
+
path('video/<int:video_id>/timeline/', video_timeline_view, name='video_timeline'),
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# const url = lastId ? `http://localhost:8000/api/video/meta/?last_id=${lastId}` : "http://localhost:8000/api/video/meta/";
|
|
165
|
+
path("api/video/sensitivemeta/", VideoFileForMetaView.as_view(), name="video_meta"), # Single endpoint for both first and next video
|
|
166
|
+
]
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
#https://biigle.de/manual/tutorials/videos/navigating-timeline#for time line example
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: endoreg-db
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: EndoReg Db Django App
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: agl-report-reader>=0.4.0
|
|
9
|
+
Requires-Dist: django-bootstrap5>=24.3
|
|
10
|
+
Requires-Dist: django-cors-headers>=4.7.0
|
|
11
|
+
Requires-Dist: django-extensions>=3.2.3
|
|
12
|
+
Requires-Dist: django>=5.1.3
|
|
13
|
+
Requires-Dist: djangorestframework>=3.15.2
|
|
14
|
+
Requires-Dist: faker>=32.1.0
|
|
15
|
+
Requires-Dist: icecream>=2.1.4
|
|
16
|
+
Requires-Dist: numpy>=2.1.3
|
|
17
|
+
Requires-Dist: opencv-python>=4.10.0.84
|
|
18
|
+
Requires-Dist: pandas>=2.2.3
|
|
19
|
+
Requires-Dist: pillow>=11.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.10.6
|
|
21
|
+
Requires-Dist: pytesseract>=0.3.13
|
|
22
|
+
Requires-Dist: python-ffmpeg>=2.0.12
|
|
23
|
+
Requires-Dist: pytorch-lightning>=2.4.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
25
|
+
Requires-Dist: scikit-learn>=1.5.2
|
|
26
|
+
Requires-Dist: scipy>=1.14.1
|
|
27
|
+
Requires-Dist: tesseract>=0.1.3
|
|
28
|
+
Requires-Dist: tqdm>=4.67.0
|
|
29
|
+
Requires-Dist: urllib3>=2.2.3
|
|
30
|
+
|
|
31
|
+
# EndoregDB - Professional Data Infrastructure for Clinical Research
|
|
32
|
+
|
|
33
|
+
EndoregDB is a comprehensive database framework designed to manage medical and research-related data for clinical trials. This repository focuses on efficient data processing, automated deployment, security, and reproducibility, offering a flexible setup for local development environments as well as distributed systems. It supports the integration of AI/ML tools and advanced image and report processing.
|
|
34
|
+
|
|
35
|
+
This infrastructure was originally designed for clinical research studies and is optimized for handling large data volumes, including:
|
|
36
|
+
|
|
37
|
+
- Medical reports,
|
|
38
|
+
- Patient imaging and video data,
|
|
39
|
+
- Clinical product and treatment data,
|
|
40
|
+
and more.
|
|
41
|
+
|
|
42
|
+
## 🚀 Key Features
|
|
43
|
+
|
|
44
|
+
### System Architecture
|
|
45
|
+
|
|
46
|
+
- **Modular Design**: Built on scalable and reusable components to simplify integration into various environments.
|
|
47
|
+
- **Multi-System Support**: Manages configurations for local workstations and production servers.
|
|
48
|
+
- **Role-Specific Configuration**: Predefined roles for common use cases:
|
|
49
|
+
- Medical data processing systems
|
|
50
|
+
- AI/ML model deployment
|
|
51
|
+
- Research workstation configuration
|
|
52
|
+
|
|
53
|
+
### Security & Data Management
|
|
54
|
+
|
|
55
|
+
- **Data Encryption**: All sensitive data is encrypted, and privacy policies are enforced.
|
|
56
|
+
- **Impermanence**: Stateless system configuration with persistence for critical data.
|
|
57
|
+
- **Access Control**: Role-based access and identity management integration.
|
|
58
|
+
|
|
59
|
+
### Data and Processing Environment
|
|
60
|
+
|
|
61
|
+
- **Data Processing**: Optimized for processing medical datasets with preprocessing tools.
|
|
62
|
+
- **AI/ML Support**:
|
|
63
|
+
- Integration of machine learning tools for predictive analysis.
|
|
64
|
+
- TensorFlow, PyTorch, and other frameworks supported for model training.
|
|
65
|
+
- **Image/Video Processing**: Support for analyzing patient images and clinical videos.
|
|
66
|
+
|
|
67
|
+
### Development Tools & Infrastructure
|
|
68
|
+
|
|
69
|
+
- **Data Science Toolchains**: Pre-configured environments for data processing, analysis, and visualization.
|
|
70
|
+
- **Monitoring & Logging**: Setup for continuous monitoring and logging to ensure system stability and performance.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 🛠 Getting Started
|
|
75
|
+
|
|
76
|
+
### Prerequisites
|
|
77
|
+
|
|
78
|
+
- A Linux-based system (Ubuntu/Debian recommended) or NixOS
|
|
79
|
+
- Hardware with sufficient storage for data processing (at least 1 TB recommended)
|
|
80
|
+
|
|
81
|
+
### Quick Start
|
|
82
|
+
|
|
83
|
+
1. Clone the repository:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git clone https://github.com/wg-lux/endoreg-db.git
|
|
87
|
+
cd endoreg-db
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. Set up your Python environment:
|
|
91
|
+
_TODO_: Explain Devenv / point to other docs
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
direnv allow
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. Run tests:
|
|
98
|
+
Call Devenv Script to run tests
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
runtests
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 📁 Repository Structure
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
endoreg-db/
|
|
110
|
+
├── endoreg_db/ # Main Django app for medical data
|
|
111
|
+
│ ├── case_generator/ # Sample case generator
|
|
112
|
+
│ ├── data/ # Medical knowledge base
|
|
113
|
+
│ ├── management/ # Data wrangling operations
|
|
114
|
+
│ ├── models/ # Data models
|
|
115
|
+
│ ├── migrations/ # Database migrations
|
|
116
|
+
│ └── serializers/ # Serializers for data
|
|
117
|
+
├── .gitignore # Git ignore file for unnecessary files
|
|
118
|
+
└── README.md # Project description and setup instructions
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 🔒 Security Features
|
|
124
|
+
|
|
125
|
+
- **Data Encryption**: All sensitive patient data is encrypted.
|
|
126
|
+
- **Role-Based Access Control**: Configurable roles for managing access to various parts of the system.
|
|
127
|
+
- **Logging & Auditing**: Comprehensive logging system that tracks user activities and data changes.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🖥️ Supported Systems
|
|
132
|
+
|
|
133
|
+
- **Workstations**: Local development or research workstations with low data processing demands.
|
|
134
|
+
- **Servers**: Scalable server infrastructure for processing large data volumes, integrated with cloud services for scalability.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 🛟 Support
|
|
139
|
+
|
|
140
|
+
For issues and questions:
|
|
141
|
+
|
|
142
|
+
- Create an issue in the repository
|
|
143
|
+
- Review the Deployment Guide for common issues
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 📜 License
|
|
148
|
+
|
|
149
|
+
MIT - see LICENSE
|
|
150
|
+
|
|
151
|
+
---
|