nci-cidc-api-modules 1.2.34__py3-none-any.whl → 1.2.45__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cidc_api/__init__.py +1 -0
- cidc_api/config/db.py +21 -1
- cidc_api/config/settings.py +1 -0
- cidc_api/models/__init__.py +0 -2
- cidc_api/models/data.py +15 -6
- cidc_api/models/db/stage1/__init__.py +56 -0
- cidc_api/models/db/stage1/additional_treatment_orm.py +22 -0
- cidc_api/models/db/stage1/adverse_event_orm.py +46 -0
- cidc_api/models/db/stage1/base_orm.py +7 -0
- cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py +22 -0
- cidc_api/models/db/stage1/comorbidity_orm.py +23 -0
- cidc_api/models/db/stage1/consent_group_orm.py +32 -0
- cidc_api/models/db/stage1/demographic_orm.py +47 -0
- cidc_api/models/db/stage1/disease_orm.py +52 -0
- cidc_api/models/db/stage1/exposure_orm.py +22 -0
- cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py +34 -0
- cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py +36 -0
- cidc_api/models/db/stage1/gvhd_organ_acute_orm.py +21 -0
- cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py +21 -0
- cidc_api/models/db/stage1/medical_history_orm.py +30 -0
- cidc_api/models/db/stage1/other_malignancy_orm.py +29 -0
- cidc_api/models/db/stage1/participant_orm.py +77 -0
- cidc_api/models/db/stage1/prior_treatment_orm.py +29 -0
- cidc_api/models/db/stage1/radiotherapy_dose_orm.py +39 -0
- cidc_api/models/db/stage1/response_by_system_orm.py +30 -0
- cidc_api/models/db/stage1/response_orm.py +28 -0
- cidc_api/models/db/stage1/specimen_orm.py +46 -0
- cidc_api/models/db/stage1/stem_cell_transplant_orm.py +25 -0
- cidc_api/models/db/stage1/surgery_orm.py +27 -0
- cidc_api/models/db/stage1/therapy_agent_dose_orm.py +31 -0
- cidc_api/models/db/stage1/treatment_orm.py +38 -0
- cidc_api/models/db/stage1/trial_orm.py +35 -0
- cidc_api/models/db/stage2/additional_treatment_orm.py +6 -7
- cidc_api/models/db/stage2/administrative_person_orm.py +4 -4
- cidc_api/models/db/stage2/administrative_role_assignment_orm.py +4 -4
- cidc_api/models/db/stage2/adverse_event_orm.py +11 -13
- cidc_api/models/db/stage2/arm_orm.py +3 -3
- cidc_api/models/db/stage2/base_orm.py +7 -0
- cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +5 -7
- cidc_api/models/db/stage2/cohort_orm.py +3 -3
- cidc_api/models/db/stage2/comorbidity_orm.py +6 -8
- cidc_api/models/db/stage2/consent_group_orm.py +4 -4
- cidc_api/models/db/stage2/contact_orm.py +16 -20
- cidc_api/models/db/stage2/demographic_orm.py +3 -3
- cidc_api/models/db/stage2/disease_orm.py +4 -4
- cidc_api/models/db/stage2/exposure_orm.py +3 -3
- cidc_api/models/db/stage2/file_orm.py +6 -9
- cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +4 -4
- cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +4 -6
- cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +3 -3
- cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +3 -3
- cidc_api/models/db/stage2/institution_orm.py +7 -7
- cidc_api/models/db/stage2/medical_history_orm.py +9 -9
- cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +8 -12
- cidc_api/models/db/stage2/other_malignancy_orm.py +8 -10
- cidc_api/models/db/stage2/participant_orm.py +23 -24
- cidc_api/models/db/stage2/prior_treatment_orm.py +12 -13
- cidc_api/models/db/stage2/publication_orm.py +9 -11
- cidc_api/models/db/stage2/radiotherapy_dose_orm.py +8 -9
- cidc_api/models/db/stage2/response_by_system_orm.py +3 -3
- cidc_api/models/db/stage2/response_orm.py +3 -3
- cidc_api/models/db/stage2/shipment_orm.py +17 -17
- cidc_api/models/db/stage2/shipment_specimen_orm.py +4 -4
- cidc_api/models/db/stage2/specimen_orm.py +7 -6
- cidc_api/models/db/stage2/stem_cell_transplant_orm.py +6 -7
- cidc_api/models/db/stage2/surgery_orm.py +6 -7
- cidc_api/models/db/stage2/therapy_agent_dose_orm.py +7 -8
- cidc_api/models/db/stage2/treatment_orm.py +15 -15
- cidc_api/models/db/stage2/trial_orm.py +15 -17
- cidc_api/models/files/facets.py +4 -0
- cidc_api/models/models.py +153 -9
- cidc_api/models/pydantic/{stage2/base.py → base.py} +1 -1
- cidc_api/models/pydantic/stage1/__init__.py +56 -0
- cidc_api/models/pydantic/stage1/additional_treatment.py +23 -0
- cidc_api/models/pydantic/stage1/adverse_event.py +100 -0
- cidc_api/models/pydantic/stage1/baseline_clinical_assessment.py +23 -0
- cidc_api/models/pydantic/stage1/comorbidity.py +36 -0
- cidc_api/models/pydantic/stage1/consent_group.py +30 -0
- cidc_api/models/pydantic/stage1/demographic.py +123 -0
- cidc_api/models/pydantic/stage1/disease.py +158 -0
- cidc_api/models/pydantic/stage1/exposure.py +32 -0
- cidc_api/models/pydantic/stage1/gvhd_diagnosis_acute.py +33 -0
- cidc_api/models/pydantic/stage1/gvhd_diagnosis_chronic.py +32 -0
- cidc_api/models/pydantic/stage1/gvhd_organ_acute.py +22 -0
- cidc_api/models/pydantic/stage1/gvhd_organ_chronic.py +23 -0
- cidc_api/models/pydantic/stage1/medical_history.py +36 -0
- cidc_api/models/pydantic/stage1/other_malignancy.py +49 -0
- cidc_api/models/pydantic/stage1/participant.py +51 -0
- cidc_api/models/pydantic/stage1/prior_treatment.py +45 -0
- cidc_api/models/pydantic/stage1/radiotherapy_dose.py +79 -0
- cidc_api/models/pydantic/stage1/response.py +65 -0
- cidc_api/models/pydantic/stage1/response_by_system.py +112 -0
- cidc_api/models/pydantic/stage1/specimen.py +31 -0
- cidc_api/models/pydantic/stage1/stem_cell_transplant.py +35 -0
- cidc_api/models/pydantic/stage1/surgery.py +49 -0
- cidc_api/models/pydantic/stage1/therapy_agent_dose.py +67 -0
- cidc_api/models/pydantic/stage1/treatment.py +50 -0
- cidc_api/models/pydantic/stage1/trial.py +45 -0
- cidc_api/models/pydantic/stage2/additional_treatment.py +2 -4
- cidc_api/models/pydantic/stage2/administrative_person.py +1 -1
- cidc_api/models/pydantic/stage2/administrative_role_assignment.py +2 -2
- cidc_api/models/pydantic/stage2/adverse_event.py +1 -1
- cidc_api/models/pydantic/stage2/arm.py +2 -2
- cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +1 -1
- cidc_api/models/pydantic/stage2/cohort.py +1 -1
- cidc_api/models/pydantic/stage2/comorbidity.py +1 -1
- cidc_api/models/pydantic/stage2/consent_group.py +2 -2
- cidc_api/models/pydantic/stage2/contact.py +1 -1
- cidc_api/models/pydantic/stage2/demographic.py +1 -1
- cidc_api/models/pydantic/stage2/disease.py +1 -1
- cidc_api/models/pydantic/stage2/exposure.py +1 -1
- cidc_api/models/pydantic/stage2/file.py +2 -2
- cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +1 -1
- cidc_api/models/pydantic/stage2/institution.py +1 -1
- cidc_api/models/pydantic/stage2/medical_history.py +1 -1
- cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +1 -1
- cidc_api/models/pydantic/stage2/other_malignancy.py +1 -1
- cidc_api/models/pydantic/stage2/participant.py +6 -3
- cidc_api/models/pydantic/stage2/prior_treatment.py +6 -15
- cidc_api/models/pydantic/stage2/publication.py +2 -2
- cidc_api/models/pydantic/stage2/radiotherapy_dose.py +1 -1
- cidc_api/models/pydantic/stage2/response.py +2 -2
- cidc_api/models/pydantic/stage2/response_by_system.py +1 -1
- cidc_api/models/pydantic/stage2/shipment.py +2 -2
- cidc_api/models/pydantic/stage2/shipment_specimen.py +1 -1
- cidc_api/models/pydantic/stage2/specimen.py +6 -3
- cidc_api/models/pydantic/stage2/stem_cell_transplant.py +2 -2
- cidc_api/models/pydantic/stage2/surgery.py +1 -1
- cidc_api/models/pydantic/stage2/therapy_agent_dose.py +1 -1
- cidc_api/models/pydantic/stage2/treatment.py +1 -1
- cidc_api/models/pydantic/stage2/trial.py +8 -10
- cidc_api/models/types.py +30 -16
- cidc_api/shared/assay_handling.py +68 -0
- cidc_api/shared/auth.py +5 -5
- cidc_api/shared/file_handling.py +16 -4
- cidc_api/shared/gcloud_client.py +78 -16
- cidc_api/shared/utils.py +18 -9
- cidc_api/telemetry.py +101 -0
- {nci_cidc_api_modules-1.2.34.dist-info → nci_cidc_api_modules-1.2.45.dist-info}/METADATA +21 -12
- nci_cidc_api_modules-1.2.45.dist-info/RECORD +165 -0
- cidc_api/models/db/base_orm.py +0 -25
- nci_cidc_api_modules-1.2.34.dist-info/RECORD +0 -109
- {nci_cidc_api_modules-1.2.34.dist-info → nci_cidc_api_modules-1.2.45.dist-info}/WHEEL +0 -0
- {nci_cidc_api_modules-1.2.34.dist-info → nci_cidc_api_modules-1.2.45.dist-info}/licenses/LICENSE +0 -0
- {nci_cidc_api_modules-1.2.34.dist-info → nci_cidc_api_modules-1.2.45.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
from pydantic import NonPositiveInt, model_validator, BeforeValidator
|
|
2
|
+
from typing import List, Self, Annotated, get_args
|
|
3
|
+
|
|
4
|
+
from cidc_api.models.pydantic.base import Base
|
|
5
|
+
from cidc_api.models.types import (
|
|
6
|
+
TumorGrade,
|
|
7
|
+
CancerStageSystem,
|
|
8
|
+
CancerStageSystemVersion,
|
|
9
|
+
CancerStageSystemVersionAJCC,
|
|
10
|
+
CancerStageSystemVersionRISS,
|
|
11
|
+
CancerStageSystemVersionFIGO,
|
|
12
|
+
CancerStage,
|
|
13
|
+
TCategory,
|
|
14
|
+
NCategory,
|
|
15
|
+
MCategory,
|
|
16
|
+
UberonAnatomicalTerm,
|
|
17
|
+
ICDO3MorphologicalCode,
|
|
18
|
+
ICDO3MorphologicalTerm,
|
|
19
|
+
YNU,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Disease(Base):
|
|
24
|
+
__data_category__ = "disease"
|
|
25
|
+
__cardinality__ = "many"
|
|
26
|
+
|
|
27
|
+
# The unique internal identifier for this disease record
|
|
28
|
+
disease_id: int | None = None
|
|
29
|
+
|
|
30
|
+
# The unique internal identifier for the associated participant
|
|
31
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
|
|
32
|
+
participant_id: str | None = None
|
|
33
|
+
|
|
34
|
+
# The location within the body from where the disease of interest originated as captured in the Uberon identifier. e.g. "lung"
|
|
35
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14883047%20and%20ver_nr=1
|
|
36
|
+
primary_disease_site: UberonAnatomicalTerm
|
|
37
|
+
|
|
38
|
+
# The ICD-O-3 morphology code that describes the tumor's histology, behavior, and grade-differentiation. e.g. "8480/6"
|
|
39
|
+
# CDE: TBD
|
|
40
|
+
morphological_code: ICDO3MorphologicalCode | None
|
|
41
|
+
|
|
42
|
+
# The ICD-O-3 morphology term that describes the tumor's type. e.g. "Mucinous adenoma"
|
|
43
|
+
# CDE: TBD
|
|
44
|
+
morphological_term: ICDO3MorphologicalTerm | None
|
|
45
|
+
|
|
46
|
+
# Words that broadly describe the cancer's characteristics and type. e.g. "Inflitrating Ductal Carcinoma"
|
|
47
|
+
# CDE: TBD
|
|
48
|
+
cancer_type_description: str | None = None
|
|
49
|
+
|
|
50
|
+
# The number of days elapsed since the participant was first diagnosed with this condition.
|
|
51
|
+
days_since_original_diagnosis: NonPositiveInt | None
|
|
52
|
+
|
|
53
|
+
# Words that express the degree of abnormality of cancer cells as a measure of differentiation and aggressiveness. e.g. "G1 Low Grade"
|
|
54
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=11325685%20and%20ver_nr=2
|
|
55
|
+
tumor_grade: TumorGrade | None = None
|
|
56
|
+
|
|
57
|
+
# The name of the staging system used in the evaluation of the disease. e.g. "AJCC"
|
|
58
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=7429602%20and%20ver_nr=1
|
|
59
|
+
cancer_stage_system: CancerStageSystem
|
|
60
|
+
|
|
61
|
+
# Release version of the staging system used in the evaluation of the disease. e.g. "8" (for AJCC)
|
|
62
|
+
cancer_stage_system_version: CancerStageSystemVersion | None = None
|
|
63
|
+
|
|
64
|
+
# Stage of the cancer at enrollment date as determined by the specific staging system. e.g. "Stage 0" (for AJCC)
|
|
65
|
+
# CDE(AJCC): https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440332%20and%20ver_nr=1
|
|
66
|
+
# CDE(FIGO): TBD
|
|
67
|
+
# CDE(RISS): TBD
|
|
68
|
+
cancer_stage: CancerStage | None = None
|
|
69
|
+
|
|
70
|
+
# Extent of the primary cancer based on evidence obtained from clinical assessment parameters determined prior to treatment. e.g. "T0"
|
|
71
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440328%20and%20ver_nr=1
|
|
72
|
+
# TODO: Verify this CDE
|
|
73
|
+
t_category: TCategory | None = None
|
|
74
|
+
|
|
75
|
+
# Extent of the regional lymph node involvement for the cancer based on evidence obtained from clinical assessment parameters
|
|
76
|
+
# determined prior to treatment. e.g. "N0"
|
|
77
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440330%20and%20ver_nr=1
|
|
78
|
+
# TODO: Verify this CDE
|
|
79
|
+
n_category: NCategory | None = None
|
|
80
|
+
|
|
81
|
+
# Extent of the distant metastasis for the cancer based on evidence obtained from clinical assessment parameters determined
|
|
82
|
+
# prior to treatment. e.g. "M0"
|
|
83
|
+
# CDE: https://teams.microsoft.com/l/message/19:1c292b63-5df1-4f29-b177-86aed53f393d_f224ae83-209b-4cd9-a7ef-83d9d2120a27@unq.gbl.spaces/1758827414202?context=%7B%22contextType%22%3A%22chat%22%7D
|
|
84
|
+
# TODO: Verify this CDE
|
|
85
|
+
m_category: MCategory | None = None
|
|
86
|
+
|
|
87
|
+
# The organ site where a tumor develops outside of the bone marrow as specified in the Uberon antatomical term.
|
|
88
|
+
metastatic_organ: Annotated[List[UberonAnatomicalTerm] | None, BeforeValidator(Base.split_list)] = []
|
|
89
|
+
|
|
90
|
+
# Indicates if participant has a hematological malignancy that is only extramedullary. e.g. "Yes"
|
|
91
|
+
solely_extramedullary_disease: YNU
|
|
92
|
+
|
|
93
|
+
extramedullary_organ: Annotated[List[UberonAnatomicalTerm] | None, BeforeValidator(Base.split_list)] = []
|
|
94
|
+
|
|
95
|
+
@model_validator(mode="after")
|
|
96
|
+
def validate_code_or_term_or_description_cr(self) -> Self:
|
|
97
|
+
if not self.morphological_code and not self.morphological_term and not self.cancer_type_description:
|
|
98
|
+
raise ValueError(
|
|
99
|
+
'Please provide at least one of "morphological_code", "morphological_term" or "cancer_type_description".'
|
|
100
|
+
)
|
|
101
|
+
return self
|
|
102
|
+
|
|
103
|
+
@model_validator(mode="after")
|
|
104
|
+
def validate_cancer_stage_system_version(self) -> Self:
|
|
105
|
+
msg = f"{self.cancer_stage_system_version} is not applicable to {self.cancer_stage_system}"
|
|
106
|
+
if self.cancer_stage_system == "AJCC" and self.cancer_stage_system_version not in get_args(
|
|
107
|
+
CancerStageSystemVersionAJCC
|
|
108
|
+
):
|
|
109
|
+
raise ValueError(msg)
|
|
110
|
+
elif self.cancer_stage_system == "RISS" and self.cancer_stage_system_version not in get_args(
|
|
111
|
+
CancerStageSystemVersionRISS
|
|
112
|
+
):
|
|
113
|
+
raise ValueError(msg)
|
|
114
|
+
elif self.cancer_stage_system == "FIGO" and self.cancer_stage_system_version not in get_args(
|
|
115
|
+
CancerStageSystemVersionFIGO
|
|
116
|
+
):
|
|
117
|
+
raise ValueError(msg)
|
|
118
|
+
return self
|
|
119
|
+
|
|
120
|
+
@model_validator(mode="after")
|
|
121
|
+
def validate_cancer_stage_system_version_cr(self) -> Self:
|
|
122
|
+
if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage_system_version:
|
|
123
|
+
raise ValueError(
|
|
124
|
+
f'Please provide cancer_stage_system_version when cancer_stage_system is "{self.cancer_stage_system}"'
|
|
125
|
+
)
|
|
126
|
+
return self
|
|
127
|
+
|
|
128
|
+
@model_validator(mode="after")
|
|
129
|
+
def validate_cancer_stage_cr(self) -> Self:
|
|
130
|
+
if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage:
|
|
131
|
+
raise ValueError(f'Please provide cancer_stage when cancer_stage_system is "{self.cancer_stage_system}"')
|
|
132
|
+
return self
|
|
133
|
+
|
|
134
|
+
@model_validator(mode="after")
|
|
135
|
+
def validate_t_category_cr(self) -> Self:
|
|
136
|
+
if self.cancer_stage_system == "AJCC" and not self.t_category:
|
|
137
|
+
raise ValueError(f'Please provide t_category when cancer_stage_system is "{self.cancer_stage_system}"')
|
|
138
|
+
return self
|
|
139
|
+
|
|
140
|
+
@model_validator(mode="after")
|
|
141
|
+
def validate_n_category_cr(self) -> Self:
|
|
142
|
+
if self.cancer_stage_system == "AJCC" and not self.n_category:
|
|
143
|
+
raise ValueError(f'Please provide n_category when cancer_stage_system is "{self.cancer_stage_system}"')
|
|
144
|
+
return self
|
|
145
|
+
|
|
146
|
+
@model_validator(mode="after")
|
|
147
|
+
def validate_m_category_cr(self) -> Self:
|
|
148
|
+
if self.cancer_stage_system == "AJCC" and not self.m_category:
|
|
149
|
+
raise ValueError(f'Please provide m_category when cancer_stage_system is "{self.cancer_stage_system}"')
|
|
150
|
+
return self
|
|
151
|
+
|
|
152
|
+
@model_validator(mode="after")
|
|
153
|
+
def validate_extramedullary_organ_cr(self) -> Self:
|
|
154
|
+
if self.solely_extramedullary_disease in ["No", "Unknown"] and self.extramedullary_organ:
|
|
155
|
+
raise ValueError(
|
|
156
|
+
"If solely_extramedullary_disease indicates no disease, please leave extramedullary_organ blank."
|
|
157
|
+
)
|
|
158
|
+
return self
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import YNU, ExposureType
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Exposure(Base):
|
|
10
|
+
__data_category__ = "exposure"
|
|
11
|
+
__cardinality__ = "many"
|
|
12
|
+
|
|
13
|
+
# A unique internal identifier for the exposure
|
|
14
|
+
exposure_id: int | None = None
|
|
15
|
+
|
|
16
|
+
# The unique identifier for the associated participant
|
|
17
|
+
participant_id: str | None = None
|
|
18
|
+
|
|
19
|
+
# An indication of whether the subject was exposed to any chemical, biological or physical agents
|
|
20
|
+
# that increase the risk of neoplasms in humans or animals.
|
|
21
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=5205578%20and%20ver_nr=3
|
|
22
|
+
carcinogen_exposure: YNU
|
|
23
|
+
|
|
24
|
+
# The type of potentially harmful environmental agents to which an individual was exposed.
|
|
25
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=15753203%20and%20ver_nr=1
|
|
26
|
+
exposure_type: ExposureType | None = None
|
|
27
|
+
|
|
28
|
+
@model_validator(mode="after")
|
|
29
|
+
def validate_exposure_type_cr(self) -> Self:
|
|
30
|
+
if self.carcinogen_exposure in ["No", "Unknown"] and self.exposure_type:
|
|
31
|
+
raise ValueError("If carcinogen_exposure indicates non exposure, please leave exposure_type blank.")
|
|
32
|
+
return self
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from cidc_api.models.pydantic.base import Base
|
|
2
|
+
from cidc_api.models.types import (
|
|
3
|
+
GVHDDiagnosisAcuteAssessmentSystem,
|
|
4
|
+
GVHDDiagnosisAcuteAssessmentSystemVersion,
|
|
5
|
+
GVHDDiagnosisAcuteGrade,
|
|
6
|
+
PreOrPostEnrollment,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GVHDDiagnosisAcute(Base):
|
|
11
|
+
__data_category__ = "gvhd_diagnosis_acute"
|
|
12
|
+
__cardinality__ = "many"
|
|
13
|
+
|
|
14
|
+
# The unique internal identifier for the GVHD Diagnosis Acute Record
|
|
15
|
+
gvhd_diagnosis_acute_id: int | None = None
|
|
16
|
+
|
|
17
|
+
# The unique internal identifier for the associated participant
|
|
18
|
+
participant_id: str | None = None
|
|
19
|
+
|
|
20
|
+
# The clinical grading system used to stage involvement of affected organs (skin, liver, GI tract)
|
|
21
|
+
# in acute GVHD and assign an overall severity grade (I–IV) based on predefined criteria.
|
|
22
|
+
acute_assessment_system: GVHDDiagnosisAcuteAssessmentSystem
|
|
23
|
+
|
|
24
|
+
# Release version of the clinical grading system used in the evaluation of acute GVHD.
|
|
25
|
+
system_version: GVHDDiagnosisAcuteAssessmentSystemVersion
|
|
26
|
+
|
|
27
|
+
# The overall severity grade (I–IV) assigned to a patient with acute GVHD based on the extent of
|
|
28
|
+
# involvement in affected organs (skin, liver, and GI tract), determined using a standardized
|
|
29
|
+
# assessment system.
|
|
30
|
+
acute_grade: GVHDDiagnosisAcuteGrade
|
|
31
|
+
|
|
32
|
+
# Indicator for whether the acute GVHD diagnosis was made before or after trial enrollment.
|
|
33
|
+
pre_or_post_enrollment: PreOrPostEnrollment
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from cidc_api.models.pydantic.base import Base
|
|
2
|
+
from cidc_api.models.types import (
|
|
3
|
+
GVHDDiagnosisChronicAssessmentSystem,
|
|
4
|
+
GVHDDiagnosisChronicAssessmentSystemVersion,
|
|
5
|
+
GVHDDiagnosisChronicGlobalSeverity,
|
|
6
|
+
PreOrPostEnrollment,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GVHDDiagnosisChronic(Base):
|
|
11
|
+
__data_category__ = "gvhd_diagnosis_chronic"
|
|
12
|
+
__cardinality__ = "many"
|
|
13
|
+
|
|
14
|
+
# The unique internal identifier for the GVHD chronic diagnosis
|
|
15
|
+
gvhd_diagnosis_chronic_id: int | None = None
|
|
16
|
+
|
|
17
|
+
# The unique internal identifier for the associated participant
|
|
18
|
+
participant_id: str | None = None
|
|
19
|
+
|
|
20
|
+
# The standardized clinical system used to evaluate and grade the extent and severity
|
|
21
|
+
# of organ involvement in chronic GVHD, resulting in an overall disease severity score.
|
|
22
|
+
chronic_assessment_system: GVHDDiagnosisChronicAssessmentSystem
|
|
23
|
+
|
|
24
|
+
# Release version of the clinical grading system used in the evaluation of chronic GVHD.
|
|
25
|
+
system_version: GVHDDiagnosisChronicAssessmentSystemVersion
|
|
26
|
+
|
|
27
|
+
# An overall score reflecting the combined severity of chronic graft-versus-host disease
|
|
28
|
+
# across all affected organs, summarizing the participant’s total disease burden.
|
|
29
|
+
chronic_global_severity: GVHDDiagnosisChronicGlobalSeverity
|
|
30
|
+
|
|
31
|
+
# Indicator for whether the chronic GVHD diagnosis was made before or after trial enrollment.
|
|
32
|
+
pre_or_post_enrollment: PreOrPostEnrollment
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from cidc_api.models.pydantic.base import Base
|
|
2
|
+
from cidc_api.models.types import (
|
|
3
|
+
GVHDOrgan,
|
|
4
|
+
GVHDOrganAcuteStage,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GVHDOrganAcute(Base):
|
|
9
|
+
__data_category__ = "gvhd_organ_acute"
|
|
10
|
+
__cardinality__ = "many"
|
|
11
|
+
|
|
12
|
+
# The unique internal identifier for the GVHD Organ Acute Record
|
|
13
|
+
gvhd_organ_acute_id: int | None = None
|
|
14
|
+
|
|
15
|
+
# The unique internal identifier for the associated GVHD Diagnosis Acute record
|
|
16
|
+
gvhd_diagnosis_acute_id: int | None = None
|
|
17
|
+
|
|
18
|
+
# An organ affected by acute GVHD for which the stage is assessed as part of the overall acute GVHD evaluation.
|
|
19
|
+
organ: GVHDOrgan
|
|
20
|
+
|
|
21
|
+
# The severity level of an individual organ’s involvement in acute GVHD, usually scored from 0 (none) to 4 (severe).
|
|
22
|
+
acute_stage: GVHDOrganAcuteStage
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from cidc_api.models.pydantic.base import Base
|
|
2
|
+
from cidc_api.models.types import (
|
|
3
|
+
GVHDOrgan,
|
|
4
|
+
GVHDOrganChronicScore,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GVHDOrganChronic(Base):
|
|
9
|
+
__data_category__ = "gvhd_organ_chronic"
|
|
10
|
+
__cardinality__ = "many"
|
|
11
|
+
|
|
12
|
+
# The unique internal identifier for the GVHD Organ Chronic Record
|
|
13
|
+
gvhd_organ_chronic_id: int | None = None
|
|
14
|
+
|
|
15
|
+
# The unique internal identifier for the associated GVHD Diagnosis Chronic record
|
|
16
|
+
gvhd_diagnosis_chronic_id: int | None = None
|
|
17
|
+
|
|
18
|
+
# An organ affected by chronic GVHD identified by its Uberon ontology ID
|
|
19
|
+
# and evaluated for severity as part of the overall chronic GVHD assessment.
|
|
20
|
+
organ: GVHDOrgan
|
|
21
|
+
|
|
22
|
+
# The severity score for an individual organ affected by chronic GVHD based on clinical criteria.
|
|
23
|
+
chronic_score: GVHDOrganChronicScore
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import NonNegativeInt, PositiveFloat, model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import TobaccoSmokingStatus
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MedicalHistory(Base):
|
|
10
|
+
__data_category__ = "medical_history"
|
|
11
|
+
__cardinality__ = "one"
|
|
12
|
+
|
|
13
|
+
# A unique internal identifier for the medical history
|
|
14
|
+
medical_history_id: int | None = None
|
|
15
|
+
|
|
16
|
+
# The unique identifier for the associated participant
|
|
17
|
+
participant_id: str | None = None
|
|
18
|
+
|
|
19
|
+
# Text representation of a person's status relative to smoking tobacco in the form of cigarettes,
|
|
20
|
+
# based on questions about current and former use of cigarettes.
|
|
21
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16333929%20and%20ver_nr=1
|
|
22
|
+
tobacco_smoking_status: TobaccoSmokingStatus | None = None
|
|
23
|
+
|
|
24
|
+
# Average number of packs of cigarettes smoked per day multiplied by number of years the participant has smoked.
|
|
25
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=6841869%20and%20ver_nr=1
|
|
26
|
+
pack_years_smoked: PositiveFloat | None = None
|
|
27
|
+
|
|
28
|
+
# Number of prior systemic therapies.
|
|
29
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16089302%20and%20ver_nr=1
|
|
30
|
+
num_prior_systemic_therapies: NonNegativeInt | None = None
|
|
31
|
+
|
|
32
|
+
@model_validator(mode="after")
|
|
33
|
+
def validate_pack_years_smoked_cr(self) -> Self:
|
|
34
|
+
if self.tobacco_smoking_status in ["Never Smoker", "Unknown", "Not reported"] and self.pack_years_smoked:
|
|
35
|
+
raise ValueError("If tobacco_smoking_status indicates non-smoker, please leave pack_years_smoked blank.")
|
|
36
|
+
return self
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import NonPositiveInt, model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import UberonAnatomicalTerm, ICDO3MorphologicalCode, ICDO3MorphologicalTerm, MalignancyStatus
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class OtherMalignancy(Base):
|
|
10
|
+
__data_category__ = "other_malignancy"
|
|
11
|
+
__cardinality__ = "many"
|
|
12
|
+
|
|
13
|
+
# The unique internal identifier for the OtherMalignancy record
|
|
14
|
+
other_malignancy_id: int | None = None
|
|
15
|
+
|
|
16
|
+
# The unique internal identifier for the associated MedicalHistory record
|
|
17
|
+
medical_history_id: int | None = None
|
|
18
|
+
|
|
19
|
+
# The location within the body from where the prior malignancy originated as captured in the Uberon anatomical term.
|
|
20
|
+
other_malignancy_primary_disease_site: UberonAnatomicalTerm
|
|
21
|
+
|
|
22
|
+
# The ICD-O-3 code which identifies the specific appearance of cells and tissues (normal and abnormal) used
|
|
23
|
+
# to define the presence and nature of disease.
|
|
24
|
+
other_malignancy_morphological_code: ICDO3MorphologicalCode | None = None
|
|
25
|
+
|
|
26
|
+
# The ICD-O-3 textual label which identifies the specific appearance of cells and tissues (normal and abnormal) used
|
|
27
|
+
# to define the presence and nature of disease.
|
|
28
|
+
other_malignancy_morphological_term: ICDO3MorphologicalTerm | None = None
|
|
29
|
+
|
|
30
|
+
# Description of the cancer type as recorded in the trial.
|
|
31
|
+
other_malignancy_description: str | None = None
|
|
32
|
+
|
|
33
|
+
# Number of days since original diagnosis from the enrollment date. This may be a negative number.
|
|
34
|
+
other_malignancy_days_since_diagnosis: NonPositiveInt | None = None
|
|
35
|
+
|
|
36
|
+
# Indicates the participant’s current clinical state regarding the cancer diagnosis.
|
|
37
|
+
other_malignancy_status: MalignancyStatus | None = None
|
|
38
|
+
|
|
39
|
+
@model_validator(mode="after")
|
|
40
|
+
def validate_code_or_term_or_description_cr(self) -> Self:
|
|
41
|
+
if (
|
|
42
|
+
not self.other_malignancy_morphological_code
|
|
43
|
+
and not self.other_malignancy_morphological_term
|
|
44
|
+
and not self.other_malignancy_description
|
|
45
|
+
):
|
|
46
|
+
raise ValueError(
|
|
47
|
+
'Please provide at least one of "morphological_code", "morphological_term" or "malignancy_description".'
|
|
48
|
+
)
|
|
49
|
+
return self
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import YNU
|
|
7
|
+
from cidc_api.models.types import OffStudyReason
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Participant(Base):
|
|
11
|
+
__data_category__ = "participant"
|
|
12
|
+
__cardinality__ = "one"
|
|
13
|
+
|
|
14
|
+
# The unique internal identifier for the participant
|
|
15
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
|
|
16
|
+
participant_id: str | None = None
|
|
17
|
+
|
|
18
|
+
# The participant identifier assigned by the clinical trial team overseeing the study
|
|
19
|
+
native_participant_id: str | None = None
|
|
20
|
+
|
|
21
|
+
# The globally unique participant identifier assigned by the CIMAC network. e.g. C8P29A7
|
|
22
|
+
cimac_participant_id: str | None = None
|
|
23
|
+
|
|
24
|
+
# The unique identifier for the associated trial that the participant is participating in
|
|
25
|
+
trial_id: str | None = None
|
|
26
|
+
|
|
27
|
+
# The version number of the trial dataset. e.g. "1.0"
|
|
28
|
+
version: str | None = None
|
|
29
|
+
|
|
30
|
+
# Indicates if the individual is no longer actively participating in the clinical trial.
|
|
31
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14834973%20and%20ver_nr=1
|
|
32
|
+
off_study: YNU
|
|
33
|
+
|
|
34
|
+
# An explanation describing why an individual is no longer participating in the clinical trial.
|
|
35
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13362265%20and%20ver_nr=1
|
|
36
|
+
off_study_reason: OffStudyReason | None = None
|
|
37
|
+
|
|
38
|
+
# Additional information if "Other" is selected for off_study_reason. e.g. "Transfer to another study"
|
|
39
|
+
off_study_reason_other: str | None = None
|
|
40
|
+
|
|
41
|
+
@model_validator(mode="after")
|
|
42
|
+
def off_study_reason_cr(self) -> Self:
|
|
43
|
+
if self.off_study == "Yes" and not self.off_study_reason:
|
|
44
|
+
raise ValueError('If "off_study" is "Yes" then "off_study_reason" is required.')
|
|
45
|
+
return self
|
|
46
|
+
|
|
47
|
+
@model_validator(mode="after")
|
|
48
|
+
def off_study_reason_other_cr(self) -> Self:
|
|
49
|
+
if self.off_study_reason == "Other" and not self.off_study_reason_other:
|
|
50
|
+
raise ValueError('If "off_study_reason" is "Other" then "off_study_reason_other" is required.')
|
|
51
|
+
return self
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Self, Annotated, List
|
|
2
|
+
|
|
3
|
+
from pydantic import NonPositiveInt, NegativeInt, model_validator, BeforeValidator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import ConditioningRegimenType, StemCellDonorType
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PriorTreatment(Base):
|
|
10
|
+
__data_category__ = "prior_treatment"
|
|
11
|
+
__cardinality__ = "many"
|
|
12
|
+
|
|
13
|
+
# A unique internal identifier for the prior treatment record
|
|
14
|
+
prior_treatment_id: int | None = None
|
|
15
|
+
|
|
16
|
+
# A unique internal identifier for the associated participant record
|
|
17
|
+
participant_id: str | None = None
|
|
18
|
+
|
|
19
|
+
# Number of days from the enrollment date to the first recorded administration or occurrence of
|
|
20
|
+
# the treatment modality.
|
|
21
|
+
prior_treatment_days_to_start: NonPositiveInt | None = None
|
|
22
|
+
|
|
23
|
+
# Number of days from the enrollment date to the last recorded administration or occurrence of
|
|
24
|
+
# the treatment modality.
|
|
25
|
+
prior_treatment_days_to_end: NonPositiveInt | None = None
|
|
26
|
+
|
|
27
|
+
# Specifies the category or kind of prior treatment modality a participant received.
|
|
28
|
+
|
|
29
|
+
# Description of the prior treatment such as its full generic name if it is a type of therapy agent,
|
|
30
|
+
# radiotherapy procedure name and location, or surgical procedure name and location.
|
|
31
|
+
prior_treatment_description: str
|
|
32
|
+
|
|
33
|
+
# Best response from any response assessment system to the prior treatment if available or applicable.
|
|
34
|
+
prior_treatment_best_response: str | None = None
|
|
35
|
+
|
|
36
|
+
# If the prior treatment is "Conditioning therapy" received before a stem cell transplant, specifies what
|
|
37
|
+
# type of conditioning regimen used.
|
|
38
|
+
prior_treatment_conditioning_regimen_type: ConditioningRegimenType | None = None
|
|
39
|
+
|
|
40
|
+
# If prior treatment is "Stem cell transplant", indicates what stem cell donor type used.
|
|
41
|
+
prior_treatment_stem_cell_donor_type: StemCellDonorType | None = None
|
|
42
|
+
|
|
43
|
+
# If prior treatment is "Stem cell transplant", indicates the number of days from enrollment
|
|
44
|
+
# to the prior transplant. This must be a negative number.
|
|
45
|
+
prior_treatment_days_from_transplant_to_treatment_initiation: NegativeInt | None = None
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import NonNegativeInt, NonNegativeFloat, model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import (
|
|
7
|
+
YNU,
|
|
8
|
+
RadiotherapyProcedure,
|
|
9
|
+
UberonAnatomicalTerm,
|
|
10
|
+
RadiotherapyDoseUnits,
|
|
11
|
+
RadiationExtent,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RadiotherapyDose(Base):
|
|
16
|
+
__data_category__ = "radiotherapy_dose"
|
|
17
|
+
__cardinality__ = "many"
|
|
18
|
+
|
|
19
|
+
# The unique internal identifier for the radiotherapy dose record
|
|
20
|
+
radiotherapy_dose_id: int | None = None
|
|
21
|
+
|
|
22
|
+
# The unique internal identifier for the associated treatment record
|
|
23
|
+
treatment_id: int | None = None
|
|
24
|
+
|
|
25
|
+
# Number of days from enrollment date to the start of the radiotherapy dose.
|
|
26
|
+
days_to_start: NonNegativeInt
|
|
27
|
+
|
|
28
|
+
# Number of days from enrollment date to the end of the radiotherapy dose.
|
|
29
|
+
days_to_end: NonNegativeInt
|
|
30
|
+
|
|
31
|
+
# The term that describes the kind of radiotherapy procedure administered.
|
|
32
|
+
procedure: RadiotherapyProcedure
|
|
33
|
+
|
|
34
|
+
# The Uberon anatomical term for the site of surgery.
|
|
35
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14461856%20and%20ver_nr=1
|
|
36
|
+
anatomical_location: UberonAnatomicalTerm | None = None
|
|
37
|
+
|
|
38
|
+
# Indicates whether the record represents the total dose for a radiotherapy treatment course (which may be either
|
|
39
|
+
# a multi-fractionated or a single-fraction dose).
|
|
40
|
+
is_total_dose: bool
|
|
41
|
+
|
|
42
|
+
# The number of fractions a participant received to deliver the radiation dose.
|
|
43
|
+
number_of_fractions: NonNegativeInt | None = None
|
|
44
|
+
|
|
45
|
+
# The dose amount received by the participant.
|
|
46
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13433490%20and%20ver_nr=1
|
|
47
|
+
received_dose: NonNegativeFloat
|
|
48
|
+
|
|
49
|
+
# Unit of measure for the dose of the radiotherapy to be received by the participant.
|
|
50
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13383458%20and%20ver_nr=1
|
|
51
|
+
received_dose_units: RadiotherapyDoseUnits
|
|
52
|
+
|
|
53
|
+
# The planned dose amount for the participant.
|
|
54
|
+
planned_dose: NonNegativeFloat | None = None
|
|
55
|
+
|
|
56
|
+
# Unit of measure for the planned total dose of the radiotherapy to be received by the participant.
|
|
57
|
+
planned_dose_units: RadiotherapyDoseUnits | None = None
|
|
58
|
+
|
|
59
|
+
# Indicates if the radiotherapy dose was changed, missed, or delayed.
|
|
60
|
+
dose_changes_delays: YNU
|
|
61
|
+
|
|
62
|
+
# Description of the radiotherapy dose changes, misses, or delays.
|
|
63
|
+
changes_delays_description: str | None = None
|
|
64
|
+
|
|
65
|
+
# The extent of radiation exposure administered to the patient's body during radiation therapy.
|
|
66
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=7063755%20and%20ver_nr=1
|
|
67
|
+
radiation_extent: RadiationExtent
|
|
68
|
+
|
|
69
|
+
@model_validator(mode="after")
|
|
70
|
+
def validate_changes_delays_description_cr(self) -> Self:
|
|
71
|
+
if self.dose_changes_delays == "Yes" and not self.changes_delays_description:
|
|
72
|
+
raise ValueError('If dose_changes_delays is "Yes", please provide changes_delays_description.')
|
|
73
|
+
return self
|
|
74
|
+
|
|
75
|
+
@model_validator(mode="after")
|
|
76
|
+
def validate_planned_dose_units_cr(self) -> Self:
|
|
77
|
+
if self.planned_dose and not self.planned_dose_units:
|
|
78
|
+
raise ValueError("If planned_dose is provided, please provide planned_dose_units.")
|
|
79
|
+
return self
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from typing import Self
|
|
2
|
+
|
|
3
|
+
from pydantic import NonNegativeInt, model_validator
|
|
4
|
+
|
|
5
|
+
from cidc_api.models.pydantic.base import Base
|
|
6
|
+
from cidc_api.models.types import SurvivalStatus, YNUNA, CauseOfDeath
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Response(Base):
|
|
10
|
+
__data_category__ = "response"
|
|
11
|
+
__cardinality__ = "one"
|
|
12
|
+
|
|
13
|
+
# The unique internal identifier for the response record
|
|
14
|
+
response_id: int | None = None
|
|
15
|
+
|
|
16
|
+
# The unique internal identifier for the associated participant
|
|
17
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
|
|
18
|
+
participant_id: str | None = None
|
|
19
|
+
|
|
20
|
+
# The response to a question that describes a participant's survival status.
|
|
21
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=2847330%20and%20ver_nr=1
|
|
22
|
+
survival_status: SurvivalStatus
|
|
23
|
+
|
|
24
|
+
# Number of days from enrollment date to death date.
|
|
25
|
+
overall_survival: NonNegativeInt
|
|
26
|
+
|
|
27
|
+
# Indicator for whether there was an abscopal effect on disease after local therapy.
|
|
28
|
+
abscopal_response: YNUNA | None = None
|
|
29
|
+
|
|
30
|
+
# Indicates if pathological complete response (pCR) occurred.
|
|
31
|
+
pathological_complete_response: YNUNA | None = None
|
|
32
|
+
|
|
33
|
+
# Number of days between enrollment date and date of death, if applicable.
|
|
34
|
+
days_to_death: NonNegativeInt | None = None
|
|
35
|
+
|
|
36
|
+
# The circumstance or condition of greatest rank or importance that results in the death of the participant
|
|
37
|
+
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=4783274%20and%20ver_nr=1
|
|
38
|
+
cause_of_death: CauseOfDeath | None = None
|
|
39
|
+
|
|
40
|
+
# Indicates whether participant was evaluable for toxicity (adverse events, DLT, etc.) overall.
|
|
41
|
+
evaluable_for_toxicity: bool
|
|
42
|
+
|
|
43
|
+
# Indicates whether participant was evaluable for efficacy (for example, response, PFS, OS, etc.) overall.
|
|
44
|
+
evaluable_for_efficacy: bool
|
|
45
|
+
|
|
46
|
+
# Days from enrollment date to the last time the patient's vital status was verified.
|
|
47
|
+
days_to_last_vital_status: NonNegativeInt | None = None # TODO: Needs CR check
|
|
48
|
+
|
|
49
|
+
@model_validator(mode="after")
|
|
50
|
+
def validate_cause_of_death_cr(self) -> Self:
|
|
51
|
+
if self.survival_status == "Dead" and not self.cause_of_death:
|
|
52
|
+
raise ValueError('If survival_status is "Dead" then cause_of_death is required.')
|
|
53
|
+
return self
|
|
54
|
+
|
|
55
|
+
@model_validator(mode="after")
|
|
56
|
+
def validate_cause_of_death_cr2(self) -> Self:
|
|
57
|
+
if self.survival_status == "Alive" and self.cause_of_death:
|
|
58
|
+
raise ValueError('If survival_status is "Alive", please leave cause_of_death blank.')
|
|
59
|
+
return self
|
|
60
|
+
|
|
61
|
+
@model_validator(mode="after")
|
|
62
|
+
def validate_days_to_death_cr(self) -> Self:
|
|
63
|
+
if self.survival_status in ["Alive", "Unknown"] and self.days_to_death:
|
|
64
|
+
raise ValueError("If survival_status does not indicate death, please leave days_to_death blank.")
|
|
65
|
+
return self
|