nci-cidc-api-modules 1.2.47__tar.gz → 1.2.49__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.47/nci_cidc_api_modules.egg-info → nci_cidc_api_modules-1.2.49}/PKG-INFO +1 -1
- nci_cidc_api_modules-1.2.49/cidc_api/__init__.py +1 -0
- nci_cidc_api_modules-1.2.49/cidc_api/models/errors.py +7 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/models.py +1 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/adverse_event.py +24 -5
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/comorbidity.py +6 -4
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/demographic.py +14 -7
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/disease.py +29 -13
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/exposure.py +5 -1
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/medical_history.py +5 -1
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/other_malignancy.py +4 -2
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/participant.py +9 -2
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/radiotherapy_dose.py +9 -2
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/response.py +14 -4
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/response_by_system.py +85 -10
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/surgery.py +5 -1
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage2 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage1}/therapy_agent_dose.py +9 -2
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/treatment.py +9 -2
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/file_handling.py +2 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/gcloud_client.py +4 -1
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49/nci_cidc_api_modules.egg-info}/PKG-INFO +1 -1
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/nci_cidc_api_modules.egg-info/SOURCES.txt +1 -0
- nci_cidc_api_modules-1.2.47/cidc_api/__init__.py +0 -1
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/LICENSE +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/MANIFEST.in +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/README.md +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/boot.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/config/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/config/db.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/config/logging.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/config/secrets.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/config/settings.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/data.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/additional_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/adverse_event_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/base_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/comorbidity_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/consent_group_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/demographic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/disease_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/exposure_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/gvhd_organ_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/medical_history_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/other_malignancy_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/participant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/prior_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/radiotherapy_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/response_by_system_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/response_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/stem_cell_transplant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/surgery_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/therapy_agent_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage1/trial_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/additional_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/administrative_person_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/administrative_role_assignment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/adverse_event_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/arm_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/base_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/cohort_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/comorbidity_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/consent_group_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/contact_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/demographic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/disease_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/exposure_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/file_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/institution_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/medical_history_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/other_malignancy_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/participant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/prior_treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/publication_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/radiotherapy_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/response_by_system_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/response_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/shipment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/shipment_specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/specimen_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/stem_cell_transplant_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/surgery_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/therapy_agent_dose_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/treatment_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/db/stage2/trial_orm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/files/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/files/details.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/files/facets.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/migrations.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/base.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/additional_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/baseline_clinical_assessment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/consent_group.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/gvhd_diagnosis_acute.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/gvhd_diagnosis_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/gvhd_organ_acute.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/gvhd_organ_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/prior_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/specimen.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/stem_cell_transplant.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage1/trial.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/additional_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/administrative_person.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/administrative_role_assignment.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/adverse_event.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/arm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/cohort.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/comorbidity.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/consent_group.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/contact.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/demographic.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/disease.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/exposure.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/file.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/institution.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/medical_history.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/other_malignancy.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/participant.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/prior_treatment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/publication.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/radiotherapy_dose.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/response.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/response_by_system.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/shipment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/shipment_specimen.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/specimen.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/stem_cell_transplant.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/surgery.py +0 -0
- {nci_cidc_api_modules-1.2.47/cidc_api/models/pydantic/stage1 → nci_cidc_api_modules-1.2.49/cidc_api/models/pydantic/stage2}/therapy_agent_dose.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/treatment.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/pydantic/stage2/trial.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/schemas.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/models/types.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/reference/ctcae.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/reference/gvhd.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/reference/icd10cm.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/reference/icdo3.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/reference/uberon.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/__init__.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/assay_handling.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/auth.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/email_layout.html +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/emails.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/jose.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/rest_utils.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/shared/utils.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/cidc_api/telemetry.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/nci_cidc_api_modules.egg-info/dependency_links.txt +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/nci_cidc_api_modules.egg-info/not-zip-safe +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/nci_cidc_api_modules.egg-info/requires.txt +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/nci_cidc_api_modules.egg-info/top_level.txt +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/pyproject.toml +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/requirements.modules.txt +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/setup.cfg +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/setup.py +0 -0
- {nci_cidc_api_modules-1.2.47 → nci_cidc_api_modules-1.2.49}/tests/test_api.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.49"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
class ValueLocError(ValueError):
|
|
2
|
+
"""A special case of ValueError that allows us to carry along the 'loc' location where a pydantic
|
|
3
|
+
validation error occured."""
|
|
4
|
+
|
|
5
|
+
def __init__(self, *args, loc: str, **kwargs):
|
|
6
|
+
super().__init__(*args, **kwargs)
|
|
7
|
+
self.loc = (loc,) # Make a tuple to match pydantic's loc structure
|
|
@@ -3492,6 +3492,7 @@ class IngestionJobs(CommonColumns):
|
|
|
3492
3492
|
intake_path = Column(String, nullable=True)
|
|
3493
3493
|
uploader_email = Column(String, nullable=True)
|
|
3494
3494
|
is_template_downloaded = Column(Boolean, nullable=True)
|
|
3495
|
+
master_aa_version = Column(Integer, nullable=True)
|
|
3495
3496
|
|
|
3496
3497
|
@staticmethod
|
|
3497
3498
|
@with_default_session
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from typing import Self
|
|
2
2
|
|
|
3
|
-
from pydantic import NonNegativeInt, model_validator
|
|
3
|
+
from pydantic import Field, NonNegativeInt, model_validator
|
|
4
4
|
|
|
5
5
|
from cidc_api.models.pydantic.base import Base
|
|
6
6
|
from cidc_api.reference.ctcae import is_ctcae_other_term
|
|
7
|
+
from cidc_api.models.errors import ValueLocError
|
|
7
8
|
from cidc_api.models.types import (
|
|
8
9
|
CTCAEEventTerm,
|
|
9
10
|
CTCAEEventCode,
|
|
@@ -78,7 +79,10 @@ class AdverseEvent(Base):
|
|
|
78
79
|
@model_validator(mode="after")
|
|
79
80
|
def validate_term_and_code_cr(self) -> Self:
|
|
80
81
|
if not self.event_term and not self.event_code:
|
|
81
|
-
raise
|
|
82
|
+
raise ValueLocError(
|
|
83
|
+
"Please provide event_term or event_code or both",
|
|
84
|
+
loc="event_term",
|
|
85
|
+
)
|
|
82
86
|
return self
|
|
83
87
|
|
|
84
88
|
@model_validator(mode="after")
|
|
@@ -88,13 +92,28 @@ class AdverseEvent(Base):
|
|
|
88
92
|
and is_ctcae_other_term(self.event_term)
|
|
89
93
|
and not self.event_other_specify
|
|
90
94
|
):
|
|
91
|
-
raise
|
|
92
|
-
'If severity_grade_system is "CTCAE" and the event_code or event_term are of type
|
|
95
|
+
raise ValueLocError(
|
|
96
|
+
'If severity_grade_system is "CTCAE" and the event_code or event_term are of type '
|
|
97
|
+
'"Other, specify", please provide event_other_specify',
|
|
98
|
+
loc="event_other_specify",
|
|
93
99
|
)
|
|
94
100
|
return self
|
|
95
101
|
|
|
96
102
|
@model_validator(mode="after")
|
|
97
103
|
def validate_system_organ_class_cr(self) -> Self:
|
|
98
104
|
if self.event_other_specify and not self.system_organ_class:
|
|
99
|
-
raise
|
|
105
|
+
raise ValueLocError(
|
|
106
|
+
"If event_other_specify is provided, please provide system_organ_class.",
|
|
107
|
+
loc="system_organ_class",
|
|
108
|
+
)
|
|
109
|
+
return self
|
|
110
|
+
|
|
111
|
+
@model_validator(mode="after")
|
|
112
|
+
def validate_days_to_resolution_of_event_chronology(self) -> Self:
|
|
113
|
+
if self.days_to_resolution_of_event is not None and self.days_to_onset_of_event is not None:
|
|
114
|
+
if self.days_to_resolution_of_event < self.days_to_onset_of_event:
|
|
115
|
+
raise ValueLocError(
|
|
116
|
+
'Violate "days_to_onset_of_event" <= "days_to_resolution_of_event"',
|
|
117
|
+
loc="days_to_resolution_of_event",
|
|
118
|
+
)
|
|
100
119
|
return self
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from typing import Self
|
|
1
|
+
from typing import Self, Any
|
|
2
2
|
|
|
3
|
-
from pydantic import model_validator
|
|
3
|
+
from pydantic import model_validator, field_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import ICD10CMCode, ICD10CMTerm
|
|
7
8
|
|
|
@@ -30,7 +31,8 @@ class Comorbidity(Base):
|
|
|
30
31
|
@model_validator(mode="after")
|
|
31
32
|
def validate_code_or_term_or_other_cr(self) -> Self:
|
|
32
33
|
if not self.comorbidity_code and not self.comorbidity_term and not self.comorbidity_other:
|
|
33
|
-
raise
|
|
34
|
-
'Please provide at least one of "comorbidity_code", "comorbidity_term" or "comorbidity_other".'
|
|
34
|
+
raise ValueLocError(
|
|
35
|
+
'Please provide at least one of "comorbidity_code", "comorbidity_term" or "comorbidity_other".',
|
|
36
|
+
loc="comorbidity_code",
|
|
35
37
|
)
|
|
36
38
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self, Annotated, List
|
|
|
2
2
|
|
|
3
3
|
from pydantic import PositiveInt, NonNegativeFloat, PositiveFloat, model_validator, field_validator, BeforeValidator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import (
|
|
7
8
|
Sex,
|
|
@@ -94,13 +95,15 @@ class Demographic(Base):
|
|
|
94
95
|
def validate_age_at_enrollment_cr(self) -> Self:
|
|
95
96
|
if self.age_90_or_over:
|
|
96
97
|
if self.age_at_enrollment or self.age_at_enrollment_units:
|
|
97
|
-
raise
|
|
98
|
-
'If "age_90_or_over" is "Yes" then "age_at_enrollment" and "age_at_enrollment_units" must be blank.'
|
|
98
|
+
raise ValueLocError(
|
|
99
|
+
'If "age_90_or_over" is "Yes" then "age_at_enrollment" and "age_at_enrollment_units" must be blank.',
|
|
100
|
+
loc="age_at_enrollment",
|
|
99
101
|
)
|
|
100
102
|
else:
|
|
101
103
|
if not self.age_at_enrollment or not self.age_at_enrollment_units:
|
|
102
|
-
raise
|
|
103
|
-
'If "age_90_or_over" is "No" then "age_at_enrollment" and "age_at_enrollment_units" are required.'
|
|
104
|
+
raise ValueLocError(
|
|
105
|
+
'If "age_90_or_over" is "No" then "age_at_enrollment" and "age_at_enrollment_units" are required.',
|
|
106
|
+
loc="age_at_enrollment_units",
|
|
104
107
|
)
|
|
105
108
|
return self
|
|
106
109
|
|
|
@@ -111,13 +114,17 @@ class Demographic(Base):
|
|
|
111
114
|
self.age_at_enrollment if self.age_at_enrollment_units == "Years" else self.age_at_enrollment / 365.25
|
|
112
115
|
)
|
|
113
116
|
if age_in_years >= 90:
|
|
114
|
-
raise
|
|
117
|
+
raise ValueLocError(
|
|
118
|
+
'"age_at_enrollment" cannot represent a value greater than 90 years of age.',
|
|
119
|
+
loc="age_at_enrollment",
|
|
120
|
+
)
|
|
115
121
|
return self
|
|
116
122
|
|
|
117
123
|
@model_validator(mode="after")
|
|
118
124
|
def validate_body_surface_area_units_cr(self) -> Self:
|
|
119
125
|
if self.body_surface_area and not self.body_surface_area_units:
|
|
120
|
-
raise
|
|
121
|
-
'If "body_surface_area" is provided then "body_surface_area_units_other" must also be provided.'
|
|
126
|
+
raise ValueLocError(
|
|
127
|
+
'If "body_surface_area" is provided then "body_surface_area_units_other" must also be provided.',
|
|
128
|
+
loc="body_surface_area_units_other",
|
|
122
129
|
)
|
|
123
130
|
return self
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from pydantic import NonPositiveInt, model_validator, BeforeValidator
|
|
2
2
|
from typing import List, Self, Annotated, get_args
|
|
3
3
|
|
|
4
|
+
from cidc_api.models.errors import ValueLocError
|
|
4
5
|
from cidc_api.models.pydantic.base import Base
|
|
5
6
|
from cidc_api.models.types import (
|
|
6
7
|
TumorGrade,
|
|
@@ -95,8 +96,9 @@ class Disease(Base):
|
|
|
95
96
|
@model_validator(mode="after")
|
|
96
97
|
def validate_code_or_term_or_description_cr(self) -> Self:
|
|
97
98
|
if not self.morphological_code and not self.morphological_term and not self.cancer_type_description:
|
|
98
|
-
raise
|
|
99
|
-
'Please provide at least one of "morphological_code", "morphological_term" or "cancer_type_description".'
|
|
99
|
+
raise ValueLocError(
|
|
100
|
+
'Please provide at least one of "morphological_code", "morphological_term" or "cancer_type_description".',
|
|
101
|
+
loc="morphological_code",
|
|
100
102
|
)
|
|
101
103
|
return self
|
|
102
104
|
|
|
@@ -106,53 +108,67 @@ class Disease(Base):
|
|
|
106
108
|
if self.cancer_stage_system == "AJCC" and self.cancer_stage_system_version not in get_args(
|
|
107
109
|
CancerStageSystemVersionAJCC
|
|
108
110
|
):
|
|
109
|
-
raise
|
|
111
|
+
raise ValueLocError(msg, loc="cancer_stage_system")
|
|
110
112
|
elif self.cancer_stage_system == "RISS" and self.cancer_stage_system_version not in get_args(
|
|
111
113
|
CancerStageSystemVersionRISS
|
|
112
114
|
):
|
|
113
|
-
raise
|
|
115
|
+
raise ValueLocError(msg, loc="cancer_stage_system")
|
|
114
116
|
elif self.cancer_stage_system == "FIGO" and self.cancer_stage_system_version not in get_args(
|
|
115
117
|
CancerStageSystemVersionFIGO
|
|
116
118
|
):
|
|
117
|
-
raise
|
|
119
|
+
raise ValueLocError(msg, loc="cancer_stage_system")
|
|
118
120
|
return self
|
|
119
121
|
|
|
120
122
|
@model_validator(mode="after")
|
|
121
123
|
def validate_cancer_stage_system_version_cr(self) -> Self:
|
|
122
124
|
if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage_system_version:
|
|
123
|
-
raise
|
|
124
|
-
f'Please provide cancer_stage_system_version when cancer_stage_system is "{self.cancer_stage_system}"'
|
|
125
|
+
raise ValueLocError(
|
|
126
|
+
f'Please provide cancer_stage_system_version when cancer_stage_system is "{self.cancer_stage_system}"',
|
|
127
|
+
loc="cancer_stage_system_version",
|
|
125
128
|
)
|
|
126
129
|
return self
|
|
127
130
|
|
|
128
131
|
@model_validator(mode="after")
|
|
129
132
|
def validate_cancer_stage_cr(self) -> Self:
|
|
130
133
|
if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage:
|
|
131
|
-
raise
|
|
134
|
+
raise ValueLocError(
|
|
135
|
+
f'Please provide cancer_stage when cancer_stage_system is "{self.cancer_stage_system}"',
|
|
136
|
+
loc="cancer_stage",
|
|
137
|
+
)
|
|
132
138
|
return self
|
|
133
139
|
|
|
134
140
|
@model_validator(mode="after")
|
|
135
141
|
def validate_t_category_cr(self) -> Self:
|
|
136
142
|
if self.cancer_stage_system == "AJCC" and not self.t_category:
|
|
137
|
-
raise
|
|
143
|
+
raise ValueLocError(
|
|
144
|
+
f'Please provide t_category when cancer_stage_system is "{self.cancer_stage_system}"',
|
|
145
|
+
loc="t_category",
|
|
146
|
+
)
|
|
138
147
|
return self
|
|
139
148
|
|
|
140
149
|
@model_validator(mode="after")
|
|
141
150
|
def validate_n_category_cr(self) -> Self:
|
|
142
151
|
if self.cancer_stage_system == "AJCC" and not self.n_category:
|
|
143
|
-
raise
|
|
152
|
+
raise ValueLocError(
|
|
153
|
+
f'Please provide n_category when cancer_stage_system is "{self.cancer_stage_system}"',
|
|
154
|
+
loc="n_category",
|
|
155
|
+
)
|
|
144
156
|
return self
|
|
145
157
|
|
|
146
158
|
@model_validator(mode="after")
|
|
147
159
|
def validate_m_category_cr(self) -> Self:
|
|
148
160
|
if self.cancer_stage_system == "AJCC" and not self.m_category:
|
|
149
|
-
raise
|
|
161
|
+
raise ValueLocError(
|
|
162
|
+
f'Please provide m_category when cancer_stage_system is "{self.cancer_stage_system}"',
|
|
163
|
+
loc="m_category",
|
|
164
|
+
)
|
|
150
165
|
return self
|
|
151
166
|
|
|
152
167
|
@model_validator(mode="after")
|
|
153
168
|
def validate_extramedullary_organ_cr(self) -> Self:
|
|
154
169
|
if self.solely_extramedullary_disease in ["No", "Unknown"] and self.extramedullary_organ:
|
|
155
|
-
raise
|
|
156
|
-
"If solely_extramedullary_disease indicates no disease, please leave extramedullary_organ blank."
|
|
170
|
+
raise ValueLocError(
|
|
171
|
+
"If solely_extramedullary_disease indicates no disease, please leave extramedullary_organ blank.",
|
|
172
|
+
loc="extramedullary_organ",
|
|
157
173
|
)
|
|
158
174
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import YNU, ExposureType
|
|
7
8
|
|
|
@@ -28,5 +29,8 @@ class Exposure(Base):
|
|
|
28
29
|
@model_validator(mode="after")
|
|
29
30
|
def validate_exposure_type_cr(self) -> Self:
|
|
30
31
|
if self.carcinogen_exposure in ["No", "Unknown"] and self.exposure_type:
|
|
31
|
-
raise
|
|
32
|
+
raise ValueLocError(
|
|
33
|
+
"If carcinogen_exposure indicates non exposure, please leave exposure_type blank.",
|
|
34
|
+
loc="exposure_type",
|
|
35
|
+
)
|
|
32
36
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonNegativeInt, PositiveFloat, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import TobaccoSmokingStatus
|
|
7
8
|
|
|
@@ -32,5 +33,8 @@ class MedicalHistory(Base):
|
|
|
32
33
|
@model_validator(mode="after")
|
|
33
34
|
def validate_pack_years_smoked_cr(self) -> Self:
|
|
34
35
|
if self.tobacco_smoking_status in ["Never Smoker", "Unknown", "Not reported"] and self.pack_years_smoked:
|
|
35
|
-
raise
|
|
36
|
+
raise ValueLocError(
|
|
37
|
+
"If tobacco_smoking_status indicates non-smoker, please leave pack_years_smoked blank.",
|
|
38
|
+
loc="pack_years_smoked",
|
|
39
|
+
)
|
|
36
40
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonPositiveInt, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import UberonAnatomicalTerm, ICDO3MorphologicalCode, ICDO3MorphologicalTerm, MalignancyStatus
|
|
7
8
|
|
|
@@ -43,7 +44,8 @@ class OtherMalignancy(Base):
|
|
|
43
44
|
and not self.other_malignancy_morphological_term
|
|
44
45
|
and not self.other_malignancy_description
|
|
45
46
|
):
|
|
46
|
-
raise
|
|
47
|
-
'Please provide at least one of "morphological_code", "morphological_term" or "malignancy_description".'
|
|
47
|
+
raise ValueLocError(
|
|
48
|
+
'Please provide at least one of "morphological_code", "morphological_term" or "malignancy_description".',
|
|
49
|
+
loc="morphological_code",
|
|
48
50
|
)
|
|
49
51
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import YNU
|
|
7
8
|
from cidc_api.models.types import OffStudyReason
|
|
@@ -41,11 +42,17 @@ class Participant(Base):
|
|
|
41
42
|
@model_validator(mode="after")
|
|
42
43
|
def off_study_reason_cr(self) -> Self:
|
|
43
44
|
if self.off_study == "Yes" and not self.off_study_reason:
|
|
44
|
-
raise
|
|
45
|
+
raise ValueLocError(
|
|
46
|
+
'If "off_study" is "Yes" then "off_study_reason" is required.',
|
|
47
|
+
loc="off_study_reason",
|
|
48
|
+
)
|
|
45
49
|
return self
|
|
46
50
|
|
|
47
51
|
@model_validator(mode="after")
|
|
48
52
|
def off_study_reason_other_cr(self) -> Self:
|
|
49
53
|
if self.off_study_reason == "Other" and not self.off_study_reason_other:
|
|
50
|
-
raise
|
|
54
|
+
raise ValueLocError(
|
|
55
|
+
'If "off_study_reason" is "Other" then "off_study_reason_other" is required.',
|
|
56
|
+
loc="off_study_reason_other",
|
|
57
|
+
)
|
|
51
58
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonNegativeInt, NonNegativeFloat, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import (
|
|
7
8
|
YNU,
|
|
@@ -69,11 +70,17 @@ class RadiotherapyDose(Base):
|
|
|
69
70
|
@model_validator(mode="after")
|
|
70
71
|
def validate_changes_delays_description_cr(self) -> Self:
|
|
71
72
|
if self.dose_changes_delays == "Yes" and not self.changes_delays_description:
|
|
72
|
-
raise
|
|
73
|
+
raise ValueLocError(
|
|
74
|
+
'If dose_changes_delays is "Yes", please provide changes_delays_description.',
|
|
75
|
+
loc="changes_delays_description",
|
|
76
|
+
)
|
|
73
77
|
return self
|
|
74
78
|
|
|
75
79
|
@model_validator(mode="after")
|
|
76
80
|
def validate_planned_dose_units_cr(self) -> Self:
|
|
77
81
|
if self.planned_dose and not self.planned_dose_units:
|
|
78
|
-
raise
|
|
82
|
+
raise ValueLocError(
|
|
83
|
+
"If planned_dose is provided, please provide planned_dose_units.",
|
|
84
|
+
loc="planned_dose_units",
|
|
85
|
+
)
|
|
79
86
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonNegativeInt, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import SurvivalStatus, YNUNA, CauseOfDeath
|
|
7
8
|
|
|
@@ -44,22 +45,31 @@ class Response(Base):
|
|
|
44
45
|
evaluable_for_efficacy: bool
|
|
45
46
|
|
|
46
47
|
# Days from enrollment date to the last time the patient's vital status was verified.
|
|
47
|
-
days_to_last_vital_status: NonNegativeInt | None = None
|
|
48
|
+
days_to_last_vital_status: NonNegativeInt | None = None
|
|
48
49
|
|
|
49
50
|
@model_validator(mode="after")
|
|
50
51
|
def validate_cause_of_death_cr(self) -> Self:
|
|
51
52
|
if self.survival_status == "Dead" and not self.cause_of_death:
|
|
52
|
-
raise
|
|
53
|
+
raise ValueLocError(
|
|
54
|
+
'If survival_status is "Dead" then cause_of_death is required.',
|
|
55
|
+
loc="cause_of_death",
|
|
56
|
+
)
|
|
53
57
|
return self
|
|
54
58
|
|
|
55
59
|
@model_validator(mode="after")
|
|
56
60
|
def validate_cause_of_death_cr2(self) -> Self:
|
|
57
61
|
if self.survival_status == "Alive" and self.cause_of_death:
|
|
58
|
-
raise
|
|
62
|
+
raise ValueLocError(
|
|
63
|
+
'If survival_status is "Alive", please leave cause_of_death blank.',
|
|
64
|
+
loc="cause_of_death",
|
|
65
|
+
)
|
|
59
66
|
return self
|
|
60
67
|
|
|
61
68
|
@model_validator(mode="after")
|
|
62
69
|
def validate_days_to_death_cr(self) -> Self:
|
|
63
70
|
if self.survival_status in ["Alive", "Unknown"] and self.days_to_death:
|
|
64
|
-
raise
|
|
71
|
+
raise ValueLocError(
|
|
72
|
+
"If survival_status does not indicate death, please leave days_to_death blank.",
|
|
73
|
+
loc="days_to_death",
|
|
74
|
+
)
|
|
65
75
|
return self
|
|
@@ -2,7 +2,9 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import PositiveInt, model_validator, NonNegativeInt
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
7
|
+
from cidc_api.models.pydantic.stage1.response import Response
|
|
6
8
|
from cidc_api.models.types import ResponseSystem, ResponseSystemVersion, BestOverallResponse, YNUNA
|
|
7
9
|
|
|
8
10
|
|
|
@@ -28,6 +30,9 @@ class ResponseBySystem(Base):
|
|
|
28
30
|
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
|
|
29
31
|
participant_id: str | None = None
|
|
30
32
|
|
|
33
|
+
# The linked parent response for the participant. Used for cross-model validation.
|
|
34
|
+
response: Response | None = None
|
|
35
|
+
|
|
31
36
|
# A standardized method used to evaluate and categorize the participant’s clinical response to treatment based on predefined criteria.
|
|
32
37
|
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13381490%20and%20ver_nr=1
|
|
33
38
|
response_system: ResponseSystem
|
|
@@ -69,44 +74,114 @@ class ResponseBySystem(Base):
|
|
|
69
74
|
@model_validator(mode="after")
|
|
70
75
|
def validate_response_duration_cr(self) -> Self:
|
|
71
76
|
if self.best_overall_response in negative_response_values and self.response_duration:
|
|
72
|
-
raise
|
|
77
|
+
raise ValueLocError(
|
|
73
78
|
"If best_overall_response does not indicate a positive response, "
|
|
74
|
-
"please leave response_duration blank."
|
|
79
|
+
"please leave response_duration blank.",
|
|
80
|
+
loc="response_duration",
|
|
75
81
|
)
|
|
76
82
|
return self
|
|
77
83
|
|
|
78
84
|
@model_validator(mode="after")
|
|
79
85
|
def validate_days_to_first_response_cr(self) -> Self:
|
|
80
86
|
if self.best_overall_response in negative_response_values and self.days_to_first_response:
|
|
81
|
-
raise
|
|
87
|
+
raise ValueLocError(
|
|
82
88
|
"If best_overall_response does not indicate a positive response, "
|
|
83
|
-
"please leave days_to_first_response blank."
|
|
89
|
+
"please leave days_to_first_response blank.",
|
|
90
|
+
loc="days_to_first_response",
|
|
84
91
|
)
|
|
85
92
|
return self
|
|
86
93
|
|
|
87
94
|
@model_validator(mode="after")
|
|
88
95
|
def validate_days_to_best_response_cr(self) -> Self:
|
|
89
96
|
if self.best_overall_response in negative_response_values and self.days_to_best_response:
|
|
90
|
-
raise
|
|
97
|
+
raise ValueLocError(
|
|
91
98
|
"If best_overall_response does not indicate a positive response, \
|
|
92
|
-
please leave days_to_best_response blank."
|
|
99
|
+
please leave days_to_best_response blank.",
|
|
100
|
+
loc="days_to_best_response",
|
|
93
101
|
)
|
|
94
102
|
return self
|
|
95
103
|
|
|
96
104
|
@model_validator(mode="after")
|
|
97
105
|
def validate_days_to_disease_progression_cr(self) -> Self:
|
|
98
106
|
if self.progression in ["No", "Unknown", "Not Applicable"] and self.days_to_disease_progression:
|
|
99
|
-
raise
|
|
107
|
+
raise ValueLocError(
|
|
100
108
|
"If progression does not indicate confirmed progression of the disease, \
|
|
101
|
-
please leave days_to_disease_progress blank."
|
|
109
|
+
please leave days_to_disease_progress blank.",
|
|
110
|
+
loc="days_to_disease_progress",
|
|
102
111
|
)
|
|
103
112
|
return self
|
|
104
113
|
|
|
105
114
|
@model_validator(mode="after")
|
|
106
115
|
def validate_progression_free_survival_cr(self) -> Self:
|
|
107
116
|
if self.progression_free_survival_event in ["Unknown", "Not Applicable"] and self.progression_free_survival:
|
|
108
|
-
raise
|
|
117
|
+
raise ValueLocError(
|
|
109
118
|
"If progression_free_survival_event is not known, \
|
|
110
|
-
please leave progression_free_survival blank."
|
|
119
|
+
please leave progression_free_survival blank.",
|
|
120
|
+
loc="progression_free_survival",
|
|
111
121
|
)
|
|
112
122
|
return self
|
|
123
|
+
|
|
124
|
+
@model_validator(mode="after")
|
|
125
|
+
def validate_days_to_best_response_chronology(self) -> Self:
|
|
126
|
+
if self.days_to_best_response is not None and self.days_to_first_response is not None:
|
|
127
|
+
if self.days_to_best_response < self.days_to_first_response:
|
|
128
|
+
raise ValueLocError(
|
|
129
|
+
'Violate "days_to_best_response" >= days_to_first_response"',
|
|
130
|
+
loc="days_to_best_response",
|
|
131
|
+
)
|
|
132
|
+
return self
|
|
133
|
+
|
|
134
|
+
@model_validator(mode="after")
|
|
135
|
+
def validate_days_to_disease_progression_chronology(self) -> Self:
|
|
136
|
+
if self.days_to_first_response is not None and self.days_to_disease_progression is not None:
|
|
137
|
+
if self.days_to_first_response >= self.days_to_disease_progression:
|
|
138
|
+
raise ValueLocError(
|
|
139
|
+
'Violate "days_to_first_response" < "days_to_disease_progression"',
|
|
140
|
+
loc="days_to_first_response",
|
|
141
|
+
)
|
|
142
|
+
return self
|
|
143
|
+
|
|
144
|
+
@model_validator(mode="after")
|
|
145
|
+
def validate_days_to_best_response_progression_chronology(self) -> Self:
|
|
146
|
+
if self.days_to_best_response is not None and self.days_to_disease_progression is not None:
|
|
147
|
+
if self.days_to_best_response >= self.days_to_disease_progression:
|
|
148
|
+
raise ValueLocError(
|
|
149
|
+
'Violate "days_to_best_response" < "days_to_disease_progression"',
|
|
150
|
+
loc="days_to_best_response",
|
|
151
|
+
)
|
|
152
|
+
return self
|
|
153
|
+
|
|
154
|
+
@model_validator(mode="after")
|
|
155
|
+
def validate_days_to_last_vital_status_chronology(self) -> Self:
|
|
156
|
+
if not self.response or not self.response.days_to_last_vital_status:
|
|
157
|
+
return self
|
|
158
|
+
max_value = max(
|
|
159
|
+
self.response.days_to_last_vital_status or 0,
|
|
160
|
+
self.days_to_first_response or 0,
|
|
161
|
+
self.days_to_best_response or 0,
|
|
162
|
+
self.days_to_disease_progression or 0,
|
|
163
|
+
)
|
|
164
|
+
if (self.response.days_to_last_vital_status or 0) != max_value:
|
|
165
|
+
raise ValueLocError(
|
|
166
|
+
'"days_to_last_vital_status" is not the max of all events. Rule: days_to_last_vital_status '
|
|
167
|
+
">= max(days_to_first_response,days_to_best_response,days_to_disease_progression)",
|
|
168
|
+
loc="days_to_last_vital_status,days_to_first_response,days_to_best_response,days_to_disease_progression",
|
|
169
|
+
)
|
|
170
|
+
return self
|
|
171
|
+
|
|
172
|
+
@model_validator(mode="after")
|
|
173
|
+
def validate_days_to_death_chronology(self) -> Self:
|
|
174
|
+
if not self.response or not self.response.days_to_death:
|
|
175
|
+
return self
|
|
176
|
+
max_value = max(
|
|
177
|
+
self.response.days_to_death or 0,
|
|
178
|
+
self.days_to_first_response or 0,
|
|
179
|
+
self.days_to_best_response or 0,
|
|
180
|
+
self.days_to_disease_progression or 0,
|
|
181
|
+
)
|
|
182
|
+
if (self.response.days_to_death or 0) != max_value:
|
|
183
|
+
raise ValueLocError(
|
|
184
|
+
'"days_to_death" is not the max of all events. Rule: days_to_death'
|
|
185
|
+
">= max(days_to_first_response,days_to_best_response,days_to_disease_progression)",
|
|
186
|
+
loc="days_to_death,days_to_first_response,days_to_best_response,days_to_disease_progression",
|
|
187
|
+
)
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonNegativeInt, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import SurgicalProcedure, UberonAnatomicalTerm, YNU
|
|
7
8
|
|
|
@@ -45,5 +46,8 @@ class Surgery(Base):
|
|
|
45
46
|
@model_validator(mode="after")
|
|
46
47
|
def validate_procedure_other_cr(self) -> Self:
|
|
47
48
|
if self.procedure == "Other, specify" and not self.procedure_other:
|
|
48
|
-
raise
|
|
49
|
+
raise ValueLocError(
|
|
50
|
+
'If procedure is "Other, specify", please provide procedure_other.',
|
|
51
|
+
loc="procedure_other",
|
|
52
|
+
)
|
|
49
53
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import NonNegativeInt, NonNegativeFloat, PositiveFloat, model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import YNU, TherapyAgentDoseUnits
|
|
7
8
|
|
|
@@ -57,11 +58,17 @@ class TherapyAgentDose(Base):
|
|
|
57
58
|
@model_validator(mode="after")
|
|
58
59
|
def validate_changes_delays_description_cr(self) -> Self:
|
|
59
60
|
if self.dose_changes_delays == "Yes" and not self.changes_delays_description:
|
|
60
|
-
raise
|
|
61
|
+
raise ValueLocError(
|
|
62
|
+
'If dose_changes_delays is "Yes", please provide changes_delays_description.',
|
|
63
|
+
loc="changes_delays_description",
|
|
64
|
+
)
|
|
61
65
|
return self
|
|
62
66
|
|
|
63
67
|
@model_validator(mode="after")
|
|
64
68
|
def validate_planned_dose_units_cr(self) -> Self:
|
|
65
69
|
if self.planned_dose and not self.planned_dose_units:
|
|
66
|
-
raise
|
|
70
|
+
raise ValueLocError(
|
|
71
|
+
"If planned_dose is provided, please provide planned_dose_units.",
|
|
72
|
+
loc="planned_dose_units",
|
|
73
|
+
)
|
|
67
74
|
return self
|
|
@@ -2,6 +2,7 @@ from typing import Self
|
|
|
2
2
|
|
|
3
3
|
from pydantic import model_validator
|
|
4
4
|
|
|
5
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
6
|
from cidc_api.models.pydantic.base import Base
|
|
6
7
|
from cidc_api.models.types import YNU, OffTreatmentReason
|
|
7
8
|
|
|
@@ -40,11 +41,17 @@ class Treatment(Base):
|
|
|
40
41
|
@model_validator(mode="after")
|
|
41
42
|
def validate_off_treatment_reason_cr(self) -> Self:
|
|
42
43
|
if self.off_treatment == "Yes" and not self.off_treatment_reason:
|
|
43
|
-
raise
|
|
44
|
+
raise ValueLocError(
|
|
45
|
+
'If off_treatment is "Yes", please provide off_treatment_reason.',
|
|
46
|
+
loc="off_treatment_reason",
|
|
47
|
+
)
|
|
44
48
|
return self
|
|
45
49
|
|
|
46
50
|
@model_validator(mode="after")
|
|
47
51
|
def validate_off_treatment_reason_other_cr(self) -> Self:
|
|
48
52
|
if self.off_treatment_reason == "Other" and not self.off_treatment_reason_other:
|
|
49
|
-
raise
|
|
53
|
+
raise ValueLocError(
|
|
54
|
+
'If off_treatment_reason is "Other", please provide off_treatment_reason_other.',
|
|
55
|
+
loc="off_treatment_reason_other",
|
|
56
|
+
)
|
|
50
57
|
return self
|