nci-cidc-api-modules 1.2.55__tar.gz → 1.2.57__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.
- {nci_cidc_api_modules-1.2.55/nci_cidc_api_modules.egg-info → nci_cidc_api_modules-1.2.57}/PKG-INFO +34 -35
- nci_cidc_api_modules-1.2.57/cidc_api/__init__.py +1 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/app.py +126 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/ctcae.py +34 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/gvhd.py +6 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/icd10cm.py +12 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/icdo3.py +12 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/importer.py +108 -0
- nci_cidc_api_modules-1.2.57/cidc_api/code_systems/uberon.py +5 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/config/db.py +2 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/dataset.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/__init__.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/__init__.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/files/details.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/__init__.py +0 -1
- {nci_cidc_api_modules-1.2.55/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.57/cidc_api/models/pydantic/stage1}/response_by_system.py +62 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/__init__.py +0 -1
- {nci_cidc_api_modules-1.2.55/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.57/cidc_api/models/pydantic/stage2}/response_by_system.py +0 -1
- nci_cidc_api_modules-1.2.57/cidc_api/shared/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/gcloud_client.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/jose.py +0 -1
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57/nci_cidc_api_modules.egg-info}/PKG-INFO +34 -35
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/nci_cidc_api_modules.egg-info/SOURCES.txt +8 -0
- nci_cidc_api_modules-1.2.57/nci_cidc_api_modules.egg-info/requires.txt +36 -0
- nci_cidc_api_modules-1.2.57/requirements.modules.txt +44 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/setup.py +1 -0
- nci_cidc_api_modules-1.2.55/cidc_api/__init__.py +0 -1
- nci_cidc_api_modules-1.2.55/nci_cidc_api_modules.egg-info/requires.txt +0 -37
- nci_cidc_api_modules-1.2.55/requirements.modules.txt +0 -45
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/LICENSE +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/MANIFEST.in +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/README.md +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/boot.py +0 -0
- {nci_cidc_api_modules-1.2.55/cidc_api/shared → nci_cidc_api_modules-1.2.57/cidc_api/code_systems}/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/config/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/config/logging.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/config/secrets.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/config/settings.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/code_systems.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/additional_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/adverse_event_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/base_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/comorbidity_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/consent_group_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/demographic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/disease_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/exposure_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/gvhd_organ_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/medical_history_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/other_malignancy_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/participant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/prior_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/radiotherapy_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/response_by_system_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/response_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/stem_cell_transplant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/surgery_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/therapy_agent_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage1/trial_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/additional_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/administrative_person_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/administrative_role_assignment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/adverse_event_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/arm_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/base_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/cohort_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/comorbidity_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/consent_group_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/contact_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/demographic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/disease_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/exposure_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/file_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/institution_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/medical_history_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/other_malignancy_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/participant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/prior_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/publication_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/radiotherapy_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/response_by_system_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/response_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/shipment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/shipment_specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/stem_cell_transplant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/surgery_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/therapy_agent_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/db/stage2/trial_orm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/errors.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/files/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/files/facets.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/migrations.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/models.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/base.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/additional_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/adverse_event.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/baseline_clinical_assessment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/comorbidity.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/consent_group.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/demographic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/disease.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/exposure.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/gvhd_diagnosis_acute.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/gvhd_diagnosis_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/gvhd_organ_acute.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/gvhd_organ_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/medical_history.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/other_malignancy.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/participant.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/prior_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/radiotherapy_dose.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/response.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/specimen.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/stem_cell_transplant.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/surgery.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/therapy_agent_dose.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage1/trial.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/additional_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/administrative_person.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/administrative_role_assignment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/adverse_event.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/arm.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/cohort.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/comorbidity.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/consent_group.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/contact.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/demographic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/disease.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/exposure.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/file.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/institution.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/medical_history.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/other_malignancy.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/participant.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/prior_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/publication.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/radiotherapy_dose.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/response.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/shipment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/shipment_specimen.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/specimen.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/stem_cell_transplant.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/surgery.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/therapy_agent_dose.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/treatment.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/pydantic/stage2/trial.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/schemas.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/models/types.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/assay_handling.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/auth.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/email_layout.html +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/emails.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/file_handling.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/rest_utils.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/shared/utils.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/cidc_api/telemetry.py +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/nci_cidc_api_modules.egg-info/dependency_links.txt +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/nci_cidc_api_modules.egg-info/not-zip-safe +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/nci_cidc_api_modules.egg-info/top_level.txt +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/pyproject.toml +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/setup.cfg +0 -0
- {nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57}/tests/test_api.py +0 -0
{nci_cidc_api_modules-1.2.55/nci_cidc_api_modules.egg-info → nci_cidc_api_modules-1.2.57}/PKG-INFO
RENAMED
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nci_cidc_api_modules
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.57
|
|
4
4
|
Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
|
|
5
5
|
Home-page: https://github.com/NCI-CIDC/cidc-api-gae
|
|
6
6
|
License: MIT license
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: cachetools
|
|
11
|
-
Requires-Dist: certifi
|
|
12
|
-
Requires-Dist: cloud-sql-python-connector[pg8000]
|
|
13
|
-
Requires-Dist: flask
|
|
14
|
-
Requires-Dist: flask-migrate
|
|
15
|
-
Requires-Dist: flask-sqlalchemy
|
|
16
|
-
Requires-Dist: flask-talisman
|
|
10
|
+
Requires-Dist: cachetools~=7.0.0
|
|
11
|
+
Requires-Dist: certifi~=2026.1.4
|
|
12
|
+
Requires-Dist: cloud-sql-python-connector[pg8000]~=1.20.0
|
|
13
|
+
Requires-Dist: flask~=3.1.2
|
|
14
|
+
Requires-Dist: flask-migrate~=4.1.0
|
|
15
|
+
Requires-Dist: flask-sqlalchemy~=3.1.1
|
|
16
|
+
Requires-Dist: flask-talisman~=0.7.0
|
|
17
17
|
Requires-Dist: gcloud-aio-storage~=9.6.1
|
|
18
|
-
Requires-Dist: google-api-python-client
|
|
19
|
-
Requires-Dist: google-auth==2.
|
|
20
|
-
Requires-Dist: google-cloud-bigquery
|
|
21
|
-
Requires-Dist: google-cloud-pubsub
|
|
22
|
-
Requires-Dist: google-cloud-secret-manager
|
|
23
|
-
Requires-Dist: google-cloud-storage
|
|
24
|
-
Requires-Dist: jinja2
|
|
25
|
-
Requires-Dist: joserfc
|
|
26
|
-
Requires-Dist: marshmallow
|
|
27
|
-
Requires-Dist: marshmallow-sqlalchemy
|
|
28
|
-
Requires-Dist: numpy
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: pyarrow>=22.0.0
|
|
18
|
+
Requires-Dist: google-api-python-client~=2.188.0
|
|
19
|
+
Requires-Dist: google-auth==2.48.0
|
|
20
|
+
Requires-Dist: google-cloud-bigquery~=3.40.0
|
|
21
|
+
Requires-Dist: google-cloud-pubsub~=2.34.0
|
|
22
|
+
Requires-Dist: google-cloud-secret-manager~=2.26.0
|
|
23
|
+
Requires-Dist: google-cloud-storage~=3.9.0
|
|
24
|
+
Requires-Dist: jinja2~=3.1.6
|
|
25
|
+
Requires-Dist: joserfc~=1.6.1
|
|
26
|
+
Requires-Dist: marshmallow~=4.2.1
|
|
27
|
+
Requires-Dist: marshmallow-sqlalchemy~=1.4.2
|
|
28
|
+
Requires-Dist: numpy~=2.4.2
|
|
29
|
+
Requires-Dist: pandas~=3.0.0
|
|
30
|
+
Requires-Dist: pyarrow~=23.0.0
|
|
32
31
|
Requires-Dist: pydantic~=2.12.5
|
|
33
|
-
Requires-Dist: python-dotenv
|
|
34
|
-
Requires-Dist: requests
|
|
35
|
-
Requires-Dist: sqlalchemy
|
|
32
|
+
Requires-Dist: python-dotenv~=1.2.1
|
|
33
|
+
Requires-Dist: requests~=2.32.5
|
|
34
|
+
Requires-Dist: sqlalchemy~=2.0.45
|
|
36
35
|
Requires-Dist: sqlalchemy-mixins~=2.0.5
|
|
37
|
-
Requires-Dist: werkzeug
|
|
38
|
-
Requires-Dist: opentelemetry-api
|
|
39
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc
|
|
40
|
-
Requires-Dist: opentelemetry-sdk
|
|
41
|
-
Requires-Dist: opentelemetry-instrumentation-flask
|
|
42
|
-
Requires-Dist: opentelemetry-instrumentation-requests
|
|
43
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy
|
|
44
|
-
Requires-Dist: opentelemetry-exporter-gcp-trace
|
|
45
|
-
Requires-Dist: opentelemetry-propagator-gcp
|
|
46
|
-
Requires-Dist: nci-cidc-schemas==0.28.
|
|
36
|
+
Requires-Dist: werkzeug~=3.1.5
|
|
37
|
+
Requires-Dist: opentelemetry-api~=1.39.1
|
|
38
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.39.1
|
|
39
|
+
Requires-Dist: opentelemetry-sdk~=1.39.1
|
|
40
|
+
Requires-Dist: opentelemetry-instrumentation-flask~=0.59b0
|
|
41
|
+
Requires-Dist: opentelemetry-instrumentation-requests~=0.59b0
|
|
42
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy~=0.59b0
|
|
43
|
+
Requires-Dist: opentelemetry-exporter-gcp-trace~=1.11.0
|
|
44
|
+
Requires-Dist: opentelemetry-propagator-gcp~=1.11.0
|
|
45
|
+
Requires-Dist: nci-cidc-schemas==0.28.13
|
|
47
46
|
Dynamic: description
|
|
48
47
|
Dynamic: description-content-type
|
|
49
48
|
Dynamic: home-page
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.57"
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Iterable
|
|
3
|
+
from time import perf_counter
|
|
4
|
+
|
|
5
|
+
from textual import on
|
|
6
|
+
from textual.app import App, ComposeResult
|
|
7
|
+
from textual.containers import Container
|
|
8
|
+
from textual.widgets import Button, DirectoryTree, Footer, Header, Log, Select
|
|
9
|
+
|
|
10
|
+
from cidc_api.code_systems.importer import delete_data, import_data, load_app
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class FilteredDirectoryTree(DirectoryTree):
|
|
14
|
+
def filter_paths(self, paths: Iterable[Path]) -> Iterable[Path]:
|
|
15
|
+
return [path for path in paths if path.name.endswith(".csv")]
|
|
16
|
+
|
|
17
|
+
def on_directory_tree_file_selected(self, event: DirectoryTree.FileSelected) -> None:
|
|
18
|
+
"""Called when a file is selected in the directory tree."""
|
|
19
|
+
# log = self.app.query_one(Log)
|
|
20
|
+
# log.write_line(f"Selected file: {event.path.parent.name}/{event.path.name}")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CodeSystems(App):
|
|
24
|
+
"""A Textual app to manage code systems."""
|
|
25
|
+
|
|
26
|
+
CSS = """
|
|
27
|
+
Select { width: 40%; margin: 1;}
|
|
28
|
+
FilteredDirectoryTree { margin-left: 2; }
|
|
29
|
+
Button, Log { margin: 1 2; }
|
|
30
|
+
Container { height: 10; }
|
|
31
|
+
#results { margin: 1; text-style: bold; }
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
BINDINGS = [("d", "toggle_dark", "Toggle dark mode"), ("q", "quit", "Quit the app")]
|
|
35
|
+
SELECT_OPTIONS = [(code, code) for code in ["Ctcae60", "Icdo3"]]
|
|
36
|
+
|
|
37
|
+
def compose(self) -> ComposeResult:
|
|
38
|
+
"""Create child widgets for the app."""
|
|
39
|
+
yield Header()
|
|
40
|
+
yield Select(self.SELECT_OPTIONS, prompt="Select code system")
|
|
41
|
+
with Container(id="tree-container"):
|
|
42
|
+
yield FilteredDirectoryTree(Path(__file__).resolve().parent / "data")
|
|
43
|
+
yield Button("Import data", variant="primary", disabled=True)
|
|
44
|
+
yield Log()
|
|
45
|
+
yield Footer()
|
|
46
|
+
|
|
47
|
+
@on(Select.Changed)
|
|
48
|
+
async def check_select(self, event: Select.Changed):
|
|
49
|
+
|
|
50
|
+
old_tree = self.query_one(FilteredDirectoryTree)
|
|
51
|
+
await old_tree.remove()
|
|
52
|
+
|
|
53
|
+
folder_name = event.value
|
|
54
|
+
new_path = Path(__file__).resolve().parent / "data" / folder_name
|
|
55
|
+
new_tree = FilteredDirectoryTree(str(new_path))
|
|
56
|
+
await self.query_one("#tree-container").mount(new_tree)
|
|
57
|
+
new_tree.focus() # optional: set focus to the new tree
|
|
58
|
+
|
|
59
|
+
self.maybe_enable_button()
|
|
60
|
+
|
|
61
|
+
@on(DirectoryTree.FileSelected)
|
|
62
|
+
def check_tree(self, _event: DirectoryTree.FileSelected):
|
|
63
|
+
self.maybe_enable_button()
|
|
64
|
+
|
|
65
|
+
def maybe_enable_button(self):
|
|
66
|
+
button_widget = self.query_one(Button)
|
|
67
|
+
code_system_widget = self.query_one(Select)
|
|
68
|
+
file_path_widget = self.query_one(FilteredDirectoryTree)
|
|
69
|
+
button_widget.disabled = not (
|
|
70
|
+
code_system_widget.value != Select.BLANK and file_path_widget.cursor_node.data.path.is_file()
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# def on_ready(self) -> None:
|
|
74
|
+
# log = self.query_one(Log)
|
|
75
|
+
# log.write_line("Hello!")
|
|
76
|
+
|
|
77
|
+
def action_toggle_dark(self) -> None:
|
|
78
|
+
"""An action to toggle dark mode."""
|
|
79
|
+
self.theme = "textual-dark" if self.theme == "textual-light" else "textual-light"
|
|
80
|
+
|
|
81
|
+
async def on_button_pressed(self, event: Button.Pressed) -> None:
|
|
82
|
+
"""Event handler called when the button is pressed."""
|
|
83
|
+
code_system_widget = self.query_one(Select)
|
|
84
|
+
file_path_widget = self.query_one(FilteredDirectoryTree)
|
|
85
|
+
log_widget = self.query_one(Log)
|
|
86
|
+
|
|
87
|
+
log_widget.clear()
|
|
88
|
+
code_system = code_system_widget.value
|
|
89
|
+
file_path = file_path_widget.cursor_node.data.path
|
|
90
|
+
|
|
91
|
+
button = event.button
|
|
92
|
+
button.disabled = True
|
|
93
|
+
old_label = button.label
|
|
94
|
+
button.label = "Running task, please wait..."
|
|
95
|
+
await self.run_task(log_widget, code_system, file_path)
|
|
96
|
+
button.disabled = False
|
|
97
|
+
button.label = old_label
|
|
98
|
+
|
|
99
|
+
async def run_task(self, log_widget: Log, code_system: str, file_path: Path) -> None:
|
|
100
|
+
log_widget.write_line("Loading app ...")
|
|
101
|
+
start = perf_counter()
|
|
102
|
+
|
|
103
|
+
flask_app, db, model = await load_app(code_system)
|
|
104
|
+
table_name = model.__tablename__
|
|
105
|
+
schema = model.__table__.schema
|
|
106
|
+
log_widget.write_line(f"{perf_counter() - start:.3f} seconds to load app.\n\n")
|
|
107
|
+
|
|
108
|
+
with flask_app.app_context():
|
|
109
|
+
engine = db.engine
|
|
110
|
+
|
|
111
|
+
log_widget.write_line("Deleting data ...")
|
|
112
|
+
start = perf_counter()
|
|
113
|
+
msg = await delete_data(engine, f"{schema}.{table_name}")
|
|
114
|
+
log_widget.write_line(msg)
|
|
115
|
+
log_widget.write_line(f"{perf_counter() - start:.3f} seconds to delete data.\n\n")
|
|
116
|
+
|
|
117
|
+
log_widget.write_line("Importing data ...")
|
|
118
|
+
start = perf_counter()
|
|
119
|
+
msg = await import_data(engine, file_path, f"{schema}.{table_name}")
|
|
120
|
+
log_widget.write_line(msg)
|
|
121
|
+
log_widget.write_line(f"{perf_counter() - start:.3f} seconds to import data.")
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == "__main__":
|
|
125
|
+
app = CodeSystems()
|
|
126
|
+
app.run()
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Stubbed to accept any string
|
|
2
|
+
def is_ctcae_event_term(v):
|
|
3
|
+
if not isinstance(v, str):
|
|
4
|
+
raise TypeError("Value must be a string")
|
|
5
|
+
return v
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Stubbed to accept any string
|
|
9
|
+
def is_ctcae_event_code(v):
|
|
10
|
+
if not isinstance(v, str):
|
|
11
|
+
raise TypeError("Value must be a string")
|
|
12
|
+
return v
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Stubbed to accept any string
|
|
16
|
+
def is_ctcae_severity_grade(v):
|
|
17
|
+
if not isinstance(v, str):
|
|
18
|
+
raise TypeError("Value must be a string")
|
|
19
|
+
return v
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Stubbed to accept any string
|
|
23
|
+
def is_ctcae_system_organ_class(v):
|
|
24
|
+
if not isinstance(v, str):
|
|
25
|
+
raise TypeError("Value must be a string")
|
|
26
|
+
return v
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Determines if the CTCAE term is one of the "Other, specify" types of terms for which we include
|
|
30
|
+
# additional data about the AE.
|
|
31
|
+
def is_ctcae_other_term(v):
|
|
32
|
+
if isinstance(v, str):
|
|
33
|
+
return "Other, specify" in v
|
|
34
|
+
return False
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Stubbed to accept any string
|
|
2
|
+
def is_ICD10CM_code(v):
|
|
3
|
+
if not isinstance(v, str):
|
|
4
|
+
raise TypeError("Value must be a string")
|
|
5
|
+
return v
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Stubbed to accept any string
|
|
9
|
+
def is_ICD10CM_term(v):
|
|
10
|
+
if not isinstance(v, str):
|
|
11
|
+
raise TypeError("Value must be a string")
|
|
12
|
+
return v
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Stubbed to accept any string
|
|
2
|
+
def is_ICDO3_code(v):
|
|
3
|
+
if not isinstance(v, str):
|
|
4
|
+
raise TypeError("Value must be a string")
|
|
5
|
+
return v
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Stubbed to accept any string
|
|
9
|
+
def is_ICDO3_term(v):
|
|
10
|
+
if not isinstance(v, str):
|
|
11
|
+
raise TypeError("Value must be a string")
|
|
12
|
+
return v
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# pylint: disable=import-outside-toplevel,broad-except,invalid-name,redefined-outer-name
|
|
2
|
+
|
|
3
|
+
from os import environ
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import asyncio
|
|
6
|
+
import importlib
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
async def load_app(model):
|
|
10
|
+
print("Loading app ...")
|
|
11
|
+
|
|
12
|
+
# async load to allow reporting progress in UI
|
|
13
|
+
flask_app_mod = await asyncio.to_thread(importlib.import_module, "cidc_api.app")
|
|
14
|
+
db_mod = await asyncio.to_thread(importlib.import_module, "cidc_api.config.db")
|
|
15
|
+
code_systems = await asyncio.to_thread(importlib.import_module, "cidc_api.models.code_systems")
|
|
16
|
+
|
|
17
|
+
return flask_app_mod.app, db_mod.db, getattr(code_systems, model)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
async def import_data(engine, file_path, table_name):
|
|
21
|
+
print("Importing data ...")
|
|
22
|
+
|
|
23
|
+
conn = engine.raw_connection()
|
|
24
|
+
cursor = conn.cursor()
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
with open(file_path, "r", encoding="utf-8") as file:
|
|
28
|
+
# define the COPY command, specifying STDIN for the file-like object
|
|
29
|
+
sql = f"COPY {table_name} FROM STDIN WITH CSV HEADER"
|
|
30
|
+
|
|
31
|
+
# execute the copy operation
|
|
32
|
+
cursor.copy_expert(sql, file)
|
|
33
|
+
|
|
34
|
+
msg = f"Number of rows copied: {cursor.rowcount}"
|
|
35
|
+
conn.commit()
|
|
36
|
+
|
|
37
|
+
except Exception as exc:
|
|
38
|
+
conn.rollback()
|
|
39
|
+
msg = f"Error during COPY command: {exc}"
|
|
40
|
+
|
|
41
|
+
finally:
|
|
42
|
+
cursor.close()
|
|
43
|
+
conn.close()
|
|
44
|
+
|
|
45
|
+
return msg
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
async def delete_data(engine, table_name):
|
|
49
|
+
print("Deleting data ...")
|
|
50
|
+
|
|
51
|
+
conn = engine.raw_connection()
|
|
52
|
+
cursor = conn.cursor()
|
|
53
|
+
|
|
54
|
+
try:
|
|
55
|
+
cursor.execute(f"TRUNCATE TABLE {table_name} RESTART IDENTITY")
|
|
56
|
+
msg = "Table truncated successfully."
|
|
57
|
+
conn.commit()
|
|
58
|
+
|
|
59
|
+
except Exception as exc:
|
|
60
|
+
conn.rollback()
|
|
61
|
+
msg = f"Error during TRUNCATE command: {exc}"
|
|
62
|
+
|
|
63
|
+
finally:
|
|
64
|
+
cursor.close()
|
|
65
|
+
conn.close()
|
|
66
|
+
|
|
67
|
+
return msg
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
async def call_local(table_name, file_path):
|
|
71
|
+
from dotenv import load_dotenv
|
|
72
|
+
from sqlalchemy import create_engine
|
|
73
|
+
|
|
74
|
+
load_dotenv()
|
|
75
|
+
|
|
76
|
+
engine = create_engine(environ.get("POSTGRES_URI"))
|
|
77
|
+
msg = await import_data(engine, file_path, table_name)
|
|
78
|
+
|
|
79
|
+
return msg
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
if __name__ == "__main__":
|
|
83
|
+
model = "Ctcae60"
|
|
84
|
+
file_path = Path(__file__).resolve().parent / "data/ctcae_6.0.csv"
|
|
85
|
+
|
|
86
|
+
# model = "Icdo3"
|
|
87
|
+
# file_path = Path(__file__).resolve().parent / "data/icdo3.csv"
|
|
88
|
+
|
|
89
|
+
# direct connection with conn string from env
|
|
90
|
+
# from dotenv import load_dotenv
|
|
91
|
+
# from sqlalchemy import create_engine
|
|
92
|
+
# load_dotenv()
|
|
93
|
+
# engine = create_engine(environ.get("POSTGRES_URI"))
|
|
94
|
+
# msg = asyncio.run(import_data(engine, file_path, table_name))
|
|
95
|
+
|
|
96
|
+
app, db, model = asyncio.run(load_app(model))
|
|
97
|
+
table_name = model.__tablename__
|
|
98
|
+
schema = model.__table__.schema
|
|
99
|
+
table_name = f"{schema}.{table_name}"
|
|
100
|
+
|
|
101
|
+
with app.app_context():
|
|
102
|
+
engine = db.engine
|
|
103
|
+
|
|
104
|
+
msg = asyncio.run(delete_data(engine, table_name))
|
|
105
|
+
print(msg)
|
|
106
|
+
|
|
107
|
+
msg = asyncio.run(import_data(engine, file_path, table_name))
|
|
108
|
+
print(msg)
|
|
@@ -35,6 +35,8 @@ def init_db(app: Flask):
|
|
|
35
35
|
"""Connect `app` to the database and run migrations"""
|
|
36
36
|
db.init_app(app)
|
|
37
37
|
Migrate(app, db, app.config["MIGRATIONS_PATH"])
|
|
38
|
+
with app.app_context():
|
|
39
|
+
upgrade(app.config["MIGRATIONS_PATH"])
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
def get_sqlalchemy_database_uri(testing: bool = False) -> str:
|
|
@@ -11,7 +11,6 @@ from cidc_api.models.db.stage2 import all_models as stage2_all_db_models
|
|
|
11
11
|
from cidc_api.models.db.stage1 import TrialORM as s1TrialORM
|
|
12
12
|
from cidc_api.models.db.stage2 import TrialORM as s2TrialORM
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
standard_data_categories = [
|
|
16
15
|
model.__data_category__ for model in stage1_all_models if hasattr(model, "__data_category__")
|
|
17
16
|
]
|
|
@@ -8,7 +8,6 @@ from cidc_api.models.pydantic.base import Base
|
|
|
8
8
|
from cidc_api.models.pydantic.stage1.response import Response
|
|
9
9
|
from cidc_api.models.types import ResponseSystem, ResponseSystemVersion, BestOverallResponse, YNUNA, YN
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
negative_response_values = [
|
|
13
12
|
"Progressive Disease",
|
|
14
13
|
"Stable Disease",
|
|
@@ -176,6 +175,19 @@ class ResponseBySystem(Base):
|
|
|
176
175
|
loc="days_to_best_response",
|
|
177
176
|
)
|
|
178
177
|
|
|
178
|
+
@forced_validator
|
|
179
|
+
@classmethod
|
|
180
|
+
def validate_progression_free_survival_disease_progression_chronology(cls, data, info) -> None:
|
|
181
|
+
progression = data.get("progression", None)
|
|
182
|
+
days_to_disease_progression = data.get("days_to_disease_progression", None)
|
|
183
|
+
progression_free_survival = data.get("progression_free_survival", None)
|
|
184
|
+
|
|
185
|
+
if progression == "Yes" and progression_free_survival != days_to_disease_progression:
|
|
186
|
+
raise ValueLocError(
|
|
187
|
+
'Violate "progression_free_survival" = "days_to_disease_progression" when progression is PFS event',
|
|
188
|
+
loc="progression_free_survival",
|
|
189
|
+
)
|
|
190
|
+
|
|
179
191
|
@model_validator(mode="after")
|
|
180
192
|
def validate_days_to_last_vital_status_chronology(self) -> Self:
|
|
181
193
|
if not self.response:
|
|
@@ -218,3 +230,52 @@ class ResponseBySystem(Base):
|
|
|
218
230
|
loc="days_to_death,days_to_first_response,days_to_best_response,days_to_disease_progression",
|
|
219
231
|
)
|
|
220
232
|
return self
|
|
233
|
+
|
|
234
|
+
@model_validator(mode="after")
|
|
235
|
+
def validate_progression_free_survival_death_chronology(self) -> Self:
|
|
236
|
+
if not self.response:
|
|
237
|
+
return self
|
|
238
|
+
|
|
239
|
+
if (
|
|
240
|
+
self.progression_free_survival_event == "Yes"
|
|
241
|
+
and self.progression == "No"
|
|
242
|
+
and self.progression_free_survival != self.response.days_to_death
|
|
243
|
+
):
|
|
244
|
+
raise ValueLocError(
|
|
245
|
+
'Violate "progression_free_survival" = "days_to_death" when death is PFS event',
|
|
246
|
+
loc="progression_free_survival",
|
|
247
|
+
)
|
|
248
|
+
return self
|
|
249
|
+
|
|
250
|
+
@model_validator(mode="after")
|
|
251
|
+
def validate_progression_free_survival_event_no_or_unknown(self) -> Self:
|
|
252
|
+
if not self.response:
|
|
253
|
+
return self
|
|
254
|
+
|
|
255
|
+
pfs_event = self.progression_free_survival_event
|
|
256
|
+
if pfs_event in ["No", "Unknown"] and (self.days_to_disease_progression or self.response.days_to_death):
|
|
257
|
+
raise ValueLocError(
|
|
258
|
+
'Violate "days_to_death" and "days_to_disease_progression" should be blank when PFS event is "No" or "Unknown"',
|
|
259
|
+
loc="progression_free_survival_event",
|
|
260
|
+
)
|
|
261
|
+
return self
|
|
262
|
+
|
|
263
|
+
@model_validator(mode="after")
|
|
264
|
+
def validate_progression_free_survival_event_consistent(self) -> Self:
|
|
265
|
+
if not self.response:
|
|
266
|
+
return self
|
|
267
|
+
|
|
268
|
+
progressed_or_dead = self.progression == "Yes" or self.response.survival_status == "Dead"
|
|
269
|
+
no_progression_and_alive = self.progression == "No" and self.response.survival_status == "Alive"
|
|
270
|
+
pfs_event = self.progression_free_survival_event
|
|
271
|
+
if (
|
|
272
|
+
(pfs_event == "Yes" and not progressed_or_dead)
|
|
273
|
+
or (progressed_or_dead and pfs_event != "Yes")
|
|
274
|
+
or (pfs_event == "No" and not no_progression_and_alive)
|
|
275
|
+
or (no_progression_and_alive and pfs_event != "No")
|
|
276
|
+
):
|
|
277
|
+
raise ValueLocError(
|
|
278
|
+
'Inconsistent flags for "progression_free_survival_event","progression" and "survival_status"',
|
|
279
|
+
loc="progression_free_survival_event",
|
|
280
|
+
)
|
|
281
|
+
return self
|
|
@@ -8,7 +8,6 @@ from cidc_api.models.pydantic.base import Base
|
|
|
8
8
|
from cidc_api.models.pydantic.stage1.response import Response
|
|
9
9
|
from cidc_api.models.types import ResponseSystem, ResponseSystemVersion, BestOverallResponse, YNUNA, YN
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
negative_response_values = [
|
|
13
12
|
"Progressive Disease",
|
|
14
13
|
"Stable Disease",
|
|
File without changes
|
{nci_cidc_api_modules-1.2.55 → nci_cidc_api_modules-1.2.57/nci_cidc_api_modules.egg-info}/PKG-INFO
RENAMED
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nci_cidc_api_modules
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.57
|
|
4
4
|
Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
|
|
5
5
|
Home-page: https://github.com/NCI-CIDC/cidc-api-gae
|
|
6
6
|
License: MIT license
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: cachetools
|
|
11
|
-
Requires-Dist: certifi
|
|
12
|
-
Requires-Dist: cloud-sql-python-connector[pg8000]
|
|
13
|
-
Requires-Dist: flask
|
|
14
|
-
Requires-Dist: flask-migrate
|
|
15
|
-
Requires-Dist: flask-sqlalchemy
|
|
16
|
-
Requires-Dist: flask-talisman
|
|
10
|
+
Requires-Dist: cachetools~=7.0.0
|
|
11
|
+
Requires-Dist: certifi~=2026.1.4
|
|
12
|
+
Requires-Dist: cloud-sql-python-connector[pg8000]~=1.20.0
|
|
13
|
+
Requires-Dist: flask~=3.1.2
|
|
14
|
+
Requires-Dist: flask-migrate~=4.1.0
|
|
15
|
+
Requires-Dist: flask-sqlalchemy~=3.1.1
|
|
16
|
+
Requires-Dist: flask-talisman~=0.7.0
|
|
17
17
|
Requires-Dist: gcloud-aio-storage~=9.6.1
|
|
18
|
-
Requires-Dist: google-api-python-client
|
|
19
|
-
Requires-Dist: google-auth==2.
|
|
20
|
-
Requires-Dist: google-cloud-bigquery
|
|
21
|
-
Requires-Dist: google-cloud-pubsub
|
|
22
|
-
Requires-Dist: google-cloud-secret-manager
|
|
23
|
-
Requires-Dist: google-cloud-storage
|
|
24
|
-
Requires-Dist: jinja2
|
|
25
|
-
Requires-Dist: joserfc
|
|
26
|
-
Requires-Dist: marshmallow
|
|
27
|
-
Requires-Dist: marshmallow-sqlalchemy
|
|
28
|
-
Requires-Dist: numpy
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: pyarrow>=22.0.0
|
|
18
|
+
Requires-Dist: google-api-python-client~=2.188.0
|
|
19
|
+
Requires-Dist: google-auth==2.48.0
|
|
20
|
+
Requires-Dist: google-cloud-bigquery~=3.40.0
|
|
21
|
+
Requires-Dist: google-cloud-pubsub~=2.34.0
|
|
22
|
+
Requires-Dist: google-cloud-secret-manager~=2.26.0
|
|
23
|
+
Requires-Dist: google-cloud-storage~=3.9.0
|
|
24
|
+
Requires-Dist: jinja2~=3.1.6
|
|
25
|
+
Requires-Dist: joserfc~=1.6.1
|
|
26
|
+
Requires-Dist: marshmallow~=4.2.1
|
|
27
|
+
Requires-Dist: marshmallow-sqlalchemy~=1.4.2
|
|
28
|
+
Requires-Dist: numpy~=2.4.2
|
|
29
|
+
Requires-Dist: pandas~=3.0.0
|
|
30
|
+
Requires-Dist: pyarrow~=23.0.0
|
|
32
31
|
Requires-Dist: pydantic~=2.12.5
|
|
33
|
-
Requires-Dist: python-dotenv
|
|
34
|
-
Requires-Dist: requests
|
|
35
|
-
Requires-Dist: sqlalchemy
|
|
32
|
+
Requires-Dist: python-dotenv~=1.2.1
|
|
33
|
+
Requires-Dist: requests~=2.32.5
|
|
34
|
+
Requires-Dist: sqlalchemy~=2.0.45
|
|
36
35
|
Requires-Dist: sqlalchemy-mixins~=2.0.5
|
|
37
|
-
Requires-Dist: werkzeug
|
|
38
|
-
Requires-Dist: opentelemetry-api
|
|
39
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc
|
|
40
|
-
Requires-Dist: opentelemetry-sdk
|
|
41
|
-
Requires-Dist: opentelemetry-instrumentation-flask
|
|
42
|
-
Requires-Dist: opentelemetry-instrumentation-requests
|
|
43
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy
|
|
44
|
-
Requires-Dist: opentelemetry-exporter-gcp-trace
|
|
45
|
-
Requires-Dist: opentelemetry-propagator-gcp
|
|
46
|
-
Requires-Dist: nci-cidc-schemas==0.28.
|
|
36
|
+
Requires-Dist: werkzeug~=3.1.5
|
|
37
|
+
Requires-Dist: opentelemetry-api~=1.39.1
|
|
38
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.39.1
|
|
39
|
+
Requires-Dist: opentelemetry-sdk~=1.39.1
|
|
40
|
+
Requires-Dist: opentelemetry-instrumentation-flask~=0.59b0
|
|
41
|
+
Requires-Dist: opentelemetry-instrumentation-requests~=0.59b0
|
|
42
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy~=0.59b0
|
|
43
|
+
Requires-Dist: opentelemetry-exporter-gcp-trace~=1.11.0
|
|
44
|
+
Requires-Dist: opentelemetry-propagator-gcp~=1.11.0
|
|
45
|
+
Requires-Dist: nci-cidc-schemas==0.28.13
|
|
47
46
|
Dynamic: description
|
|
48
47
|
Dynamic: description-content-type
|
|
49
48
|
Dynamic: home-page
|