nci-cidc-api-modules 1.2.53__py3-none-any.whl → 1.2.55__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.
- boot.py +8 -0
- cidc_api/__init__.py +1 -1
- cidc_api/config/db.py +0 -2
- cidc_api/models/code_systems.py +29 -0
- cidc_api/models/dataset.py +80 -0
- cidc_api/models/db/stage1/additional_treatment_orm.py +8 -1
- cidc_api/models/db/stage1/adverse_event_orm.py +10 -2
- cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py +8 -1
- cidc_api/models/db/stage1/comorbidity_orm.py +8 -1
- cidc_api/models/db/stage1/consent_group_orm.py +6 -6
- cidc_api/models/db/stage1/demographic_orm.py +10 -2
- cidc_api/models/db/stage1/disease_orm.py +8 -1
- cidc_api/models/db/stage1/exposure_orm.py +8 -1
- cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py +8 -3
- cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py +8 -3
- cidc_api/models/db/stage1/gvhd_organ_acute_orm.py +8 -1
- cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py +8 -1
- cidc_api/models/db/stage1/medical_history_orm.py +8 -1
- cidc_api/models/db/stage1/other_malignancy_orm.py +8 -1
- cidc_api/models/db/stage1/participant_orm.py +4 -5
- cidc_api/models/db/stage1/prior_treatment_orm.py +8 -2
- cidc_api/models/db/stage1/radiotherapy_dose_orm.py +11 -3
- cidc_api/models/db/stage1/response_by_system_orm.py +10 -3
- cidc_api/models/db/stage1/response_orm.py +11 -4
- cidc_api/models/db/stage1/specimen_orm.py +9 -25
- cidc_api/models/db/stage1/stem_cell_transplant_orm.py +8 -1
- cidc_api/models/db/stage1/surgery_orm.py +8 -1
- cidc_api/models/db/stage1/therapy_agent_dose_orm.py +8 -1
- cidc_api/models/db/stage1/treatment_orm.py +8 -1
- cidc_api/models/db/stage1/trial_orm.py +1 -2
- cidc_api/models/db/stage2/additional_treatment_orm.py +8 -1
- cidc_api/models/db/stage2/administrative_person_orm.py +8 -1
- cidc_api/models/db/stage2/administrative_role_assignment_orm.py +1 -0
- cidc_api/models/db/stage2/adverse_event_orm.py +10 -2
- cidc_api/models/db/stage2/arm_orm.py +5 -4
- cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +8 -1
- cidc_api/models/db/stage2/cohort_orm.py +5 -4
- cidc_api/models/db/stage2/comorbidity_orm.py +8 -1
- cidc_api/models/db/stage2/consent_group_orm.py +5 -5
- cidc_api/models/db/stage2/contact_orm.py +10 -1
- cidc_api/models/db/stage2/demographic_orm.py +10 -2
- cidc_api/models/db/stage2/disease_orm.py +8 -1
- cidc_api/models/db/stage2/exposure_orm.py +8 -1
- cidc_api/models/db/stage2/file_orm.py +4 -4
- cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +8 -3
- cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +8 -3
- cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +8 -1
- cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +8 -1
- cidc_api/models/db/stage2/institution_orm.py +4 -4
- cidc_api/models/db/stage2/medical_history_orm.py +8 -1
- cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +9 -1
- cidc_api/models/db/stage2/other_malignancy_orm.py +8 -1
- cidc_api/models/db/stage2/participant_orm.py +6 -6
- cidc_api/models/db/stage2/prior_treatment_orm.py +9 -3
- cidc_api/models/db/stage2/publication_orm.py +5 -4
- cidc_api/models/db/stage2/radiotherapy_dose_orm.py +11 -3
- cidc_api/models/db/stage2/response_by_system_orm.py +10 -3
- cidc_api/models/db/stage2/response_orm.py +11 -4
- cidc_api/models/db/stage2/shipment_orm.py +5 -5
- cidc_api/models/db/stage2/shipment_specimen_orm.py +8 -2
- cidc_api/models/db/stage2/specimen_orm.py +9 -75
- cidc_api/models/db/stage2/stem_cell_transplant_orm.py +8 -1
- cidc_api/models/db/stage2/surgery_orm.py +8 -1
- cidc_api/models/db/stage2/therapy_agent_dose_orm.py +8 -1
- cidc_api/models/db/stage2/treatment_orm.py +8 -1
- cidc_api/models/db/stage2/trial_orm.py +1 -2
- cidc_api/models/pydantic/stage1/adverse_event.py +3 -2
- cidc_api/models/pydantic/stage1/demographic.py +5 -4
- cidc_api/models/pydantic/stage1/radiotherapy_dose.py +2 -1
- cidc_api/models/pydantic/stage1/response.py +3 -3
- cidc_api/models/pydantic/stage1/response_by_system.py +2 -2
- cidc_api/models/pydantic/stage1/trial.py +1 -1
- cidc_api/models/pydantic/stage2/adverse_event.py +54 -26
- cidc_api/models/pydantic/stage2/comorbidity.py +15 -8
- cidc_api/models/pydantic/stage2/demographic.py +47 -29
- cidc_api/models/pydantic/stage2/disease.py +100 -58
- cidc_api/models/pydantic/stage2/exposure.py +14 -8
- cidc_api/models/pydantic/stage2/medical_history.py +15 -8
- cidc_api/models/pydantic/stage2/other_malignancy.py +17 -11
- cidc_api/models/pydantic/stage2/participant.py +27 -15
- cidc_api/models/pydantic/stage2/prior_treatment.py +2 -0
- cidc_api/models/pydantic/stage2/radiotherapy_dose.py +29 -15
- cidc_api/models/pydantic/stage2/response.py +44 -25
- cidc_api/models/pydantic/stage2/response_by_system.py +140 -32
- cidc_api/models/pydantic/stage2/specimen.py +2 -185
- cidc_api/models/pydantic/stage2/surgery.py +15 -7
- cidc_api/models/pydantic/stage2/therapy_agent_dose.py +27 -14
- cidc_api/models/pydantic/stage2/treatment.py +30 -16
- cidc_api/models/types.py +11 -5
- cidc_api/telemetry.py +13 -13
- {nci_cidc_api_modules-1.2.53.dist-info → nci_cidc_api_modules-1.2.55.dist-info}/METADATA +1 -1
- nci_cidc_api_modules-1.2.55.dist-info/RECORD +163 -0
- cidc_api/models/data.py +0 -28
- cidc_api/reference/ctcae.py +0 -34
- cidc_api/reference/gvhd.py +0 -6
- cidc_api/reference/icd10cm.py +0 -12
- cidc_api/reference/icdo3.py +0 -12
- cidc_api/reference/uberon.py +0 -5
- nci_cidc_api_modules-1.2.53.dist-info/RECORD +0 -167
- {nci_cidc_api_modules-1.2.53.dist-info → nci_cidc_api_modules-1.2.55.dist-info}/WHEEL +0 -0
- {nci_cidc_api_modules-1.2.53.dist-info → nci_cidc_api_modules-1.2.55.dist-info}/licenses/LICENSE +0 -0
- {nci_cidc_api_modules-1.2.53.dist-info → nci_cidc_api_modules-1.2.55.dist-info}/top_level.txt +0 -0
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
|
|
3
3
|
from cidc_api.models.pydantic.base import Base
|
|
4
|
-
from cidc_api.models.types import
|
|
5
|
-
UberonAnatomicalTerm,
|
|
6
|
-
ICDO3MorphologicalCode,
|
|
7
|
-
SpecimenType,
|
|
8
|
-
SpecimenDescription,
|
|
9
|
-
TumorType,
|
|
10
|
-
CollectionProcedure,
|
|
11
|
-
FixationStabilizationType,
|
|
12
|
-
PrimaryContainerType,
|
|
13
|
-
VolumeUnits,
|
|
14
|
-
ProcessedType,
|
|
15
|
-
ConcentrationUnits,
|
|
16
|
-
DerivativeType,
|
|
17
|
-
PBMCRestingPeriodUsed,
|
|
18
|
-
MaterialUnits,
|
|
19
|
-
MaterialStorageCondition,
|
|
20
|
-
QCCondition,
|
|
21
|
-
ReplacementRequested,
|
|
22
|
-
ResidualUse,
|
|
23
|
-
DiagnosisVerification,
|
|
24
|
-
AssayType,
|
|
25
|
-
)
|
|
4
|
+
from cidc_api.models.types import UberonAnatomicalTerm
|
|
26
5
|
|
|
27
6
|
|
|
28
7
|
class Specimen(Base):
|
|
29
|
-
|
|
8
|
+
__data_category__ = "specimen"
|
|
30
9
|
__cardinality__ = "many"
|
|
31
10
|
|
|
32
11
|
# The unique internal identifier for the specimen record
|
|
@@ -40,173 +19,11 @@ class Specimen(Base):
|
|
|
40
19
|
# Formatted as CTTTPPPSS.AA for trial code TTT, participant PPP, sample SS, and aliquot AA.
|
|
41
20
|
cimac_id: str
|
|
42
21
|
|
|
43
|
-
# The external identifier for the pathology report
|
|
44
|
-
surgical_pathology_report_id: str | None = None
|
|
45
|
-
|
|
46
|
-
# The external identifier for the clinical report
|
|
47
|
-
clinical_report_id: str | None = None
|
|
48
|
-
|
|
49
|
-
# The unique identifier for the specimen from which this specimen was derived
|
|
50
|
-
parent_specimen_id: str | None = None
|
|
51
|
-
|
|
52
|
-
# The unique identifier for the specimen after undergoing processing
|
|
53
|
-
processed_specimen_id: str | None = None
|
|
54
|
-
|
|
55
|
-
# The location within the body from which a specimen was originally obtained as captured in the Uberon anatomical term.
|
|
56
|
-
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12083894%20and%20ver_nr=1
|
|
57
|
-
organ_site_of_collection: UberonAnatomicalTerm | None = None
|
|
58
|
-
|
|
59
|
-
# ICD-O-3 code for histology and behavior. e.g. 9665/3"
|
|
60
|
-
# CDE: TBD
|
|
61
|
-
histology_behavior: ICDO3MorphologicalCode | None = None
|
|
62
|
-
|
|
63
|
-
# Histology description. e.g. Hodgkin lymphoma, nod. scler., grade 1",
|
|
64
|
-
histology_behavior_description: str | None = None
|
|
65
|
-
|
|
66
22
|
# Categorical description of timepoint at which the sample was taken.
|
|
67
23
|
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=5899851%20and%20ver_nr=1
|
|
68
24
|
# Note: CIDC doesn't conform to this CDE's PVs
|
|
69
25
|
collection_event_name: str
|
|
70
26
|
|
|
71
|
-
# The type of the specimen
|
|
72
|
-
specimen_type: SpecimenType | None = None
|
|
73
|
-
|
|
74
|
-
# The type of the specimen, if not captured by specimen_type
|
|
75
|
-
specimen_type_other: str | None = None
|
|
76
|
-
|
|
77
|
-
# A general description of the specimen
|
|
78
|
-
specimen_description: SpecimenDescription | None = None
|
|
79
|
-
|
|
80
|
-
# The type of the tumor present in the specimen
|
|
81
|
-
tumor_type: TumorType | None = None
|
|
82
|
-
|
|
83
|
-
# Description of the procedure used to collect the specimen from the participant
|
|
84
|
-
collection_procedure: CollectionProcedure | None = None
|
|
85
|
-
|
|
86
|
-
# Description of the procedure used to collect the specimen from the participant, if not captured by collection_procedure
|
|
87
|
-
collection_procedure_other: str | None = None
|
|
88
|
-
|
|
89
|
-
# The biopsy core number from which the sample was taken.
|
|
90
|
-
core_number: str | None = None
|
|
91
|
-
|
|
92
|
-
# Type of specimen fixation or stabilization that was employed by the site directly after collection.
|
|
93
|
-
fixation_stabilization_type: FixationStabilizationType | None = None
|
|
94
|
-
|
|
95
|
-
# The type of container in which the specimen was shipped
|
|
96
|
-
primary_container_type: PrimaryContainerType | None = None
|
|
97
|
-
|
|
98
|
-
# The type of container in which the specimen was shipped, if not captured by primary_container_type
|
|
99
|
-
primary_container_type_other: str | None = None
|
|
100
|
-
|
|
101
|
-
# Volume of the specimen
|
|
102
|
-
volume: float | None = None
|
|
103
|
-
|
|
104
|
-
# The unit of measure of the volume of the specimen
|
|
105
|
-
volume_units: VolumeUnits | None = None
|
|
106
|
-
|
|
107
|
-
# The type of processing that was performed on the collected specimen by the biobank
|
|
108
|
-
processed_type: ProcessedType | None = None
|
|
109
|
-
|
|
110
|
-
# The volume of the specimen after being processed by the biobank
|
|
111
|
-
processed_volume: float | None = None
|
|
112
|
-
|
|
113
|
-
# The unit of measure of the volume of the specimen after being processed by the biobank
|
|
114
|
-
processed_volume_units: VolumeUnits | None = None
|
|
115
|
-
|
|
116
|
-
# The concentration of the sample after being processed by the biobank
|
|
117
|
-
processed_concentration: float | None = None
|
|
118
|
-
|
|
119
|
-
# The unit of measure of the concentration of the sample after being processed by the biobank
|
|
120
|
-
processed_concentration_units: ConcentrationUnits | None = None
|
|
121
|
-
|
|
122
|
-
# The quantity of the sample after being processed by the biobank
|
|
123
|
-
processed_quantity: float | None = None
|
|
124
|
-
|
|
125
|
-
# The type of the sample derivative
|
|
126
|
-
derivative_type: DerivativeType | None = None
|
|
127
|
-
|
|
128
|
-
# The volume of the sample derivative
|
|
129
|
-
derivative_volume: float | None = None
|
|
130
|
-
|
|
131
|
-
# The unit of measure of the volume of the sample derivative
|
|
132
|
-
derivative_volume_units: VolumeUnits | None = None
|
|
133
|
-
|
|
134
|
-
# The concentration of the sample derivative
|
|
135
|
-
derivative_concentration: float | None = None
|
|
136
|
-
|
|
137
|
-
# The unit of measure of the concentration of the sample derivative
|
|
138
|
-
derivative_concentration_units: ConcentrationUnits | None = None
|
|
139
|
-
|
|
140
|
-
# Score the percentage of tumor (including tumor bed) tissue area of the slide (e.g. vs non-malignant or normal tissue) (0-100)
|
|
141
|
-
tumor_tissue_total_area_percentage: float | None = None
|
|
142
|
-
|
|
143
|
-
# Score the percentage of viable tumor cells comprising the tumor bed area
|
|
144
|
-
viable_tumor_area_percentage: float | None = None
|
|
145
|
-
|
|
146
|
-
# Score the evaluation of stromal elements (this indicates the % area of tumor bed occupied by non-tumor cells,
|
|
147
|
-
# including inflammatory cells [lymphocytes, histiocytes, etc], endothelial cells, fibroblasts, etc)
|
|
148
|
-
viable_stroma_area_percentage: float | None = None
|
|
149
|
-
|
|
150
|
-
# Score the percentage area of necrosis
|
|
151
|
-
necrosis_area_percentage: float | None = None
|
|
152
|
-
|
|
153
|
-
# Score the percentage area of Fibrosis
|
|
154
|
-
fibrosis_area_percentage: float | None = None
|
|
155
|
-
|
|
156
|
-
# Provides a DNA Integrity Number as an indication of extraction quality (values of 1-10)
|
|
157
|
-
din: float | None = None
|
|
158
|
-
|
|
159
|
-
# Provides an absorbance percentage ratio indicating purity of DNA (values of 0 to 2)
|
|
160
|
-
a260_a280: float | None = None
|
|
161
|
-
|
|
162
|
-
# Provides an absorbance percentage ratio indicating presence of contaminants (values of 0 to 3)
|
|
163
|
-
a260_a230: float | None = None
|
|
164
|
-
|
|
165
|
-
# Receiving site determines the percent recovered cells that are viable after thawing.
|
|
166
|
-
pbmc_viability: float | None = None
|
|
167
|
-
|
|
168
|
-
# Receiving site determines number for PBMCs per vial recovered upon receipt.
|
|
169
|
-
pbmc_recovery: float | None = None
|
|
170
|
-
|
|
171
|
-
# Receiving site indicates if a resting period was used after PBMC recovery.
|
|
172
|
-
pbmc_resting_period_used: PBMCRestingPeriodUsed | None = None
|
|
173
|
-
|
|
174
|
-
# Receiving site indicates how much material was used for assay purposes.
|
|
175
|
-
material_used: float | None = None
|
|
176
|
-
|
|
177
|
-
# Unit of measure for the amount of material used
|
|
178
|
-
material_used_units: MaterialUnits | None = None
|
|
179
|
-
|
|
180
|
-
# Receiving site indicates how much material remains after assay use.
|
|
181
|
-
material_remaining: float | None = None
|
|
182
|
-
|
|
183
|
-
# Unit of measure for the amount of material remaining.
|
|
184
|
-
material_remaining_units: MaterialUnits | None = None
|
|
185
|
-
|
|
186
|
-
# Storage condition of the material once it was received.
|
|
187
|
-
material_storage_condition: MaterialStorageCondition | None = None
|
|
188
|
-
|
|
189
|
-
# Final status of sample after QC and pathology review.
|
|
190
|
-
qc_condition: QCCondition | None = None
|
|
191
|
-
|
|
192
|
-
# Indication if sample replacement is/was requested.
|
|
193
|
-
replacement_requested: ReplacementRequested | None = None
|
|
194
|
-
|
|
195
|
-
# Indication if sample was sent to another location or returned back to biorepository.
|
|
196
|
-
residual_use: ResidualUse | None = None
|
|
197
|
-
|
|
198
|
-
# Additional comments on sample testing
|
|
199
|
-
comments: str | None = None
|
|
200
|
-
|
|
201
|
-
# Indicates whether the local pathology review was consistent with the diagnostic pathology report.
|
|
202
|
-
diagnosis_verification: DiagnosisVerification | None = None
|
|
203
|
-
|
|
204
|
-
# The assay that this sample is expected to be used as input for.
|
|
205
|
-
intended_assay: AssayType | None = None
|
|
206
|
-
|
|
207
|
-
# The datetime that CIDC ingested the sample/manifest
|
|
208
|
-
date_ingested: datetime | None = None
|
|
209
|
-
|
|
210
27
|
# Days from enrollment date to date specimen was collected.
|
|
211
28
|
days_to_specimen_collection: int
|
|
212
29
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
from
|
|
1
|
+
from pydantic import NonNegativeInt
|
|
2
|
+
from cidc_api.models.pydantic.base import forced_validator, forced_validators
|
|
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
|
|
|
8
9
|
|
|
10
|
+
@forced_validators
|
|
9
11
|
class Surgery(Base):
|
|
10
12
|
__data_category__ = "surgery"
|
|
11
13
|
__cardinality__ = "many"
|
|
@@ -42,8 +44,14 @@ class Surgery(Base):
|
|
|
42
44
|
# CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13362284%20and%20ver_nr=1
|
|
43
45
|
extent_of_residual_disease: str | None = None
|
|
44
46
|
|
|
45
|
-
@
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
@forced_validator
|
|
48
|
+
@classmethod
|
|
49
|
+
def validate_procedure_other_cr(cls, data, info) -> None:
|
|
50
|
+
procedure = data.get("procedure", None)
|
|
51
|
+
procedure_other = data.get("procedure_other", None)
|
|
52
|
+
|
|
53
|
+
if procedure == "Other, specify" and not procedure_other:
|
|
54
|
+
raise ValueLocError(
|
|
55
|
+
'If procedure is "Other, specify", please provide procedure_other.',
|
|
56
|
+
loc="procedure_other",
|
|
57
|
+
)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from pydantic import NonNegativeInt, NonNegativeFloat, PositiveFloat, model_validator
|
|
1
|
+
from pydantic import NonNegativeInt, NonNegativeFloat, PositiveFloat
|
|
2
|
+
from cidc_api.models.pydantic.base import forced_validator, forced_validators
|
|
4
3
|
|
|
4
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
5
|
from cidc_api.models.pydantic.base import Base
|
|
6
6
|
from cidc_api.models.types import YNU, TherapyAgentDoseUnits
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
@forced_validators
|
|
9
10
|
class TherapyAgentDose(Base):
|
|
10
11
|
__data_category__ = "therapy_agent_dose"
|
|
11
12
|
__cardinality__ = "many"
|
|
@@ -54,14 +55,26 @@ class TherapyAgentDose(Base):
|
|
|
54
55
|
# Description of the dose changes, misses, or delays.
|
|
55
56
|
changes_delays_description: str | None = None
|
|
56
57
|
|
|
57
|
-
@
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
@forced_validator
|
|
59
|
+
@classmethod
|
|
60
|
+
def validate_changes_delays_description_cr(cls, data, info) -> None:
|
|
61
|
+
dose_changes_delays = data.get("dose_changes_delays", None)
|
|
62
|
+
changes_delays_description = data.get("changes_delays_description", None)
|
|
63
|
+
|
|
64
|
+
if dose_changes_delays == "Yes" and not changes_delays_description:
|
|
65
|
+
raise ValueLocError(
|
|
66
|
+
'If dose_changes_delays is "Yes", please provide changes_delays_description.',
|
|
67
|
+
loc="changes_delays_description",
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
@forced_validator
|
|
71
|
+
@classmethod
|
|
72
|
+
def validate_planned_dose_units_cr(cls, data, info) -> None:
|
|
73
|
+
planned_dose = data.get("planned_dose", None)
|
|
74
|
+
planned_dose_units = data.get("planned_dose_units", None)
|
|
75
|
+
|
|
76
|
+
if planned_dose and not planned_dose_units:
|
|
77
|
+
raise ValueLocError(
|
|
78
|
+
"If planned_dose is provided, please provide planned_dose_units.",
|
|
79
|
+
loc="planned_dose_units",
|
|
80
|
+
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from pydantic import model_validator
|
|
1
|
+
from cidc_api.models.pydantic.base import forced_validator, forced_validators
|
|
4
2
|
|
|
3
|
+
from cidc_api.models.errors import ValueLocError
|
|
5
4
|
from cidc_api.models.pydantic.base import Base
|
|
6
5
|
from cidc_api.models.types import YNU, OffTreatmentReason
|
|
7
6
|
|
|
8
7
|
|
|
8
|
+
@forced_validators
|
|
9
9
|
class Treatment(Base):
|
|
10
10
|
__data_category__ = "treatment"
|
|
11
11
|
__cardinality__ = "many"
|
|
@@ -17,10 +17,10 @@ class Treatment(Base):
|
|
|
17
17
|
participant_id: str | None = None
|
|
18
18
|
|
|
19
19
|
# The unique internal identifier for the associated Arm record
|
|
20
|
-
|
|
20
|
+
arm: str | None = None
|
|
21
21
|
|
|
22
22
|
# The unique internal identifier for the associated Cohort record
|
|
23
|
-
|
|
23
|
+
cohort: str | None = None
|
|
24
24
|
|
|
25
25
|
# A unique identifier used to describe a distinct, specific intervention or
|
|
26
26
|
# treatment that a group or subgroup of participants in a clinical trial receives.
|
|
@@ -37,14 +37,28 @@ class Treatment(Base):
|
|
|
37
37
|
# If "Other" is selected for "off_treatment_reason", provide a description of the reason.
|
|
38
38
|
off_treatment_reason_other: str | None = None
|
|
39
39
|
|
|
40
|
-
@
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
@forced_validator
|
|
41
|
+
@classmethod
|
|
42
|
+
def validate_off_treatment_reason_cr(cls, data, info) -> None:
|
|
43
|
+
off_treatment = data.get("off_treatment", None)
|
|
44
|
+
off_treatment_reason = data.get("off_treatment_reason", None)
|
|
45
|
+
|
|
46
|
+
if off_treatment == "Yes" and not off_treatment_reason:
|
|
47
|
+
raise ValueLocError(
|
|
48
|
+
'If off_treatment is "Yes", please provide off_treatment_reason.',
|
|
49
|
+
loc="off_treatment_reason",
|
|
50
|
+
)
|
|
51
|
+
return off_treatment_reason
|
|
52
|
+
|
|
53
|
+
@forced_validator
|
|
54
|
+
@classmethod
|
|
55
|
+
def validate_off_treatment_reason_other_cr(cls, data, info) -> None:
|
|
56
|
+
off_treatment_reason = data.get("off_treatment_reason", None)
|
|
57
|
+
off_treatment_reason_other = data.get("off_treatment_reason_other", None)
|
|
58
|
+
|
|
59
|
+
if off_treatment_reason == "Other" and not off_treatment_reason_other:
|
|
60
|
+
raise ValueLocError(
|
|
61
|
+
'If off_treatment_reason is "Other", please provide off_treatment_reason_other.',
|
|
62
|
+
loc="off_treatment_reason_other",
|
|
63
|
+
)
|
|
64
|
+
return off_treatment_reason_other
|
cidc_api/models/types.py
CHANGED
|
@@ -3,19 +3,19 @@ from typing import Annotated, Literal
|
|
|
3
3
|
from pydantic import AfterValidator
|
|
4
4
|
from sqlalchemy.types import TypeDecorator, Unicode
|
|
5
5
|
|
|
6
|
-
from cidc_api.
|
|
7
|
-
from cidc_api.
|
|
8
|
-
from cidc_api.
|
|
6
|
+
from cidc_api.code_systems.icdo3 import is_ICDO3_code, is_ICDO3_term
|
|
7
|
+
from cidc_api.code_systems.uberon import is_uberon_term
|
|
8
|
+
from cidc_api.code_systems.ctcae import (
|
|
9
9
|
is_ctcae_event_term,
|
|
10
10
|
is_ctcae_event_code,
|
|
11
11
|
is_ctcae_severity_grade,
|
|
12
12
|
is_ctcae_system_organ_class,
|
|
13
13
|
)
|
|
14
|
-
from cidc_api.
|
|
14
|
+
from cidc_api.code_systems.icd10cm import (
|
|
15
15
|
is_ICD10CM_code,
|
|
16
16
|
is_ICD10CM_term,
|
|
17
17
|
)
|
|
18
|
-
from cidc_api.
|
|
18
|
+
from cidc_api.code_systems.gvhd import is_gvhd_organ
|
|
19
19
|
|
|
20
20
|
# As python Enums are rather cumbersome when we only want a list of permissible values for a string, use Literal instead
|
|
21
21
|
|
|
@@ -468,6 +468,12 @@ MCategory = Literal[
|
|
|
468
468
|
]
|
|
469
469
|
|
|
470
470
|
|
|
471
|
+
YN = Literal[
|
|
472
|
+
"Yes",
|
|
473
|
+
"No",
|
|
474
|
+
]
|
|
475
|
+
|
|
476
|
+
|
|
471
477
|
YNU = Literal[
|
|
472
478
|
"Yes",
|
|
473
479
|
"No",
|
cidc_api/telemetry.py
CHANGED
|
@@ -43,19 +43,19 @@ resource = Resource(attributes={"service.name": f"CIDC-{ENV}"})
|
|
|
43
43
|
provider = TracerProvider(resource=resource)
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
if ENV == "dev" and not TESTING:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
# if ENV == "dev" and not TESTING:
|
|
47
|
+
# from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
|
|
48
|
+
|
|
49
|
+
# COLLECTOR_ENDPOINT = "127.0.0.1"
|
|
50
|
+
# COLLECTOR_GRPC_PORT = 6004
|
|
51
|
+
|
|
52
|
+
# # send spans to local exporter
|
|
53
|
+
# # 1. download latest version from https://github.com/open-telemetry/opentelemetry-collector-releases/releases (otelcol-contrib_0.140.1_darwin_arm64)
|
|
54
|
+
# # 2. start exporter from otel folder with `./otelcol-contrib --config=config.yaml`
|
|
55
|
+
# # 3. download and start Jeager (all-in-one image) - https://www.jaegertracing.io/download/
|
|
56
|
+
# exporter = OTLPSpanExporter(endpoint=f"http://{COLLECTOR_ENDPOINT}:{COLLECTOR_GRPC_PORT}", insecure=True)
|
|
57
|
+
# processor = BatchSpanProcessor(exporter)
|
|
58
|
+
# provider.add_span_processor(processor)
|
|
59
59
|
|
|
60
60
|
if ENV == "dev-int":
|
|
61
61
|
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
boot.py,sha256=a5zD_ORheoOy3CuEIwjM9jcR4_Phngz6nc-E6RYIEj8,585
|
|
2
|
+
cidc_api/__init__.py,sha256=w_Cy0hYe3h0VvVjywA1usJthx3ML2-hIuBZUa0GHWxg,23
|
|
3
|
+
cidc_api/telemetry.py,sha256=SRPXhN1O4P2jYaRN_K4hAhFURygrzzRrkQsGZmghUUQ,3355
|
|
4
|
+
cidc_api/config/__init__.py,sha256=5mX8GAPxUKV84iS-aGOoE-4m68LsOCGCDptXNdlgvj0,148
|
|
5
|
+
cidc_api/config/db.py,sha256=MHBQH2Ccf2J5cDpMwHJ704_ovl6i38DSF4Mktdfbr0g,2353
|
|
6
|
+
cidc_api/config/logging.py,sha256=abhVYtn8lfhIt0tyV2WHFgSmp_s2eeJh7kodB6LH4J0,1149
|
|
7
|
+
cidc_api/config/secrets.py,sha256=jRFj7W43pWuPf9DZQLCKF7WPXf5cUv-BAaS3ASqhV_Q,1481
|
|
8
|
+
cidc_api/config/settings.py,sha256=IlOSJhSyYYK4XQQ4uBdD58kXO-a2AHPWTSN1AT95b9Y,4545
|
|
9
|
+
cidc_api/models/__init__.py,sha256=bl445G8Zic9YbhZ8ZBni07wtBMhLJRMBA-JqjLxx2bw,66
|
|
10
|
+
cidc_api/models/code_systems.py,sha256=YR-SGg1UnCElHjibUauAFAs9ENLd7tT28V3sc-NQ4xk,918
|
|
11
|
+
cidc_api/models/dataset.py,sha256=pz5CAzKioKCuArcXqD5MaLm-MnSRlr4I2VgNapGGjPA,3021
|
|
12
|
+
cidc_api/models/errors.py,sha256=UncRrh-4v0CR5mpLO0erWD1y9ctus3Nk6XOSvrTjfco,338
|
|
13
|
+
cidc_api/models/migrations.py,sha256=UlS5How3J4ryaRuZT6F5VQtAKikkl0LTv9MgMO_ltiQ,11161
|
|
14
|
+
cidc_api/models/models.py,sha256=RycbGNQHIud9mqCyIH_yrnN7PVSFwbUCjP6pe6sX5VA,154106
|
|
15
|
+
cidc_api/models/schemas.py,sha256=6IE2dJoEMcMbi0Vr1V3cYKnPKU0hv9vRKBixOZHe88s,2766
|
|
16
|
+
cidc_api/models/types.py,sha256=V0N3RrrnP5bgj44bv3Aet1Mw424KgkcAOfv3QJRyRQI,30112
|
|
17
|
+
cidc_api/models/db/stage1/__init__.py,sha256=zsxOSoogzL_xZ8B5OwcwLXvAmm6g2GYx1Zf6LLw8dq8,1917
|
|
18
|
+
cidc_api/models/db/stage1/additional_treatment_orm.py,sha256=Oe1wfYEOlMKAvNrOTCCnyXeEqAZtHSLk6d4ChIL2J58,1200
|
|
19
|
+
cidc_api/models/db/stage1/adverse_event_orm.py,sha256=vhDDVMaksvXflH8unJJDlHL_8_SCFqWy0GWwxKSpge8,2194
|
|
20
|
+
cidc_api/models/db/stage1/base_orm.py,sha256=izKizTf2W1fCK2CRUeyuErJbOaxNp6d299n4gqKWHDQ,246
|
|
21
|
+
cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py,sha256=mkORk5bDijV6MBooKdJRwIY4yJ8VGe_KycMFDy3q4hg,1185
|
|
22
|
+
cidc_api/models/db/stage1/comorbidity_orm.py,sha256=BQ-YVE_aADogBOPh55ViDGncos1HUq-54SHEpvvJHEc,1155
|
|
23
|
+
cidc_api/models/db/stage1/consent_group_orm.py,sha256=1pZeIgE5vuNEnkRR3mJIXHYBtNjvhmFBbkdkZtwpnuQ,1147
|
|
24
|
+
cidc_api/models/db/stage1/demographic_orm.py,sha256=ETD2n20zlpXF17TSfKnHjBE5A_JK-JeBJvxu95RGU14,1973
|
|
25
|
+
cidc_api/models/db/stage1/disease_orm.py,sha256=NF15-JkzAp0N-ZbDokkKJvXJgaUmPsrzBl9e9rKhkFY,2239
|
|
26
|
+
cidc_api/models/db/stage1/exposure_orm.py,sha256=TaW6yARrFpceT5G-tmlVJZyYi6RrxrvaoQMhjae9LWQ,1085
|
|
27
|
+
cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py,sha256=fWSMgNl8Bqg5E22zukx1b0tvfE_r61uKNKOxvK4MW28,1715
|
|
28
|
+
cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py,sha256=u3xWBv0zSaGjQ_0dJkQjiE4etROgDzKEgyX5AoBVi_E,1797
|
|
29
|
+
cidc_api/models/db/stage1/gvhd_organ_acute_orm.py,sha256=mqLg8MKOqZmtl1_Pnai_3BnRepVE8IMfMv2515vIzUE,1112
|
|
30
|
+
cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py,sha256=qJWG9xW9QuqwqF1dRmlZ6IG-9OyOWkyfSoji8rNORK4,1136
|
|
31
|
+
cidc_api/models/db/stage1/medical_history_orm.py,sha256=qD1AenmV6FXrcmncw4f4Pd6UAoemxSUyOmrDJmAs1lY,1556
|
|
32
|
+
cidc_api/models/db/stage1/other_malignancy_orm.py,sha256=32KIqAd8eO-3Pur5fPT8eAfwdQNGnY_cF-EkgMMjk8k,1577
|
|
33
|
+
cidc_api/models/db/stage1/participant_orm.py,sha256=U4D819R3shshqaJA0ZXKmPyZDppQye0yUTRl9LVR6Ic,3564
|
|
34
|
+
cidc_api/models/db/stage1/prior_treatment_orm.py,sha256=C0d00d3_WKD9jvPUUbeP8LmFb1ipX0EuIZxpdvfAink,1565
|
|
35
|
+
cidc_api/models/db/stage1/radiotherapy_dose_orm.py,sha256=ggeMDCv2PnO58GCJqYMAWnlEUwn0DCW8g0QK-0TmNHw,1780
|
|
36
|
+
cidc_api/models/db/stage1/response_by_system_orm.py,sha256=uDS0MFt5Kt0waOYsaqD-JjwEnDYKuoJwNVJ89iP6wQk,1800
|
|
37
|
+
cidc_api/models/db/stage1/response_orm.py,sha256=WjiktcP0vM0vyIWC1IyFv2Xjgok1KI6N5H668xLPeRk,1437
|
|
38
|
+
cidc_api/models/db/stage1/specimen_orm.py,sha256=u1DCzDkxRqBbjupVLoo3fODIIeEBy_tVJTNSJSUk8Co,1139
|
|
39
|
+
cidc_api/models/db/stage1/stem_cell_transplant_orm.py,sha256=el2QydxpxFnWVUhYibSAtJmgVAeahdGsQOuyzjR578g,1371
|
|
40
|
+
cidc_api/models/db/stage1/surgery_orm.py,sha256=LaodgOnH4BJwt0Svvd37Q2RmdxNqa1spl1l8NKX8gjI,1292
|
|
41
|
+
cidc_api/models/db/stage1/therapy_agent_dose_orm.py,sha256=lwL1asNtJ70JRLTm5SXH7S8DZiQ0-oHGmc1sA5MbXR8,1580
|
|
42
|
+
cidc_api/models/db/stage1/treatment_orm.py,sha256=qEuGOJATfOBJyKVmBaDEg0nRK2j65_HlmOoelkAvzec,1899
|
|
43
|
+
cidc_api/models/db/stage1/trial_orm.py,sha256=orXC7srYEU_CY9m9VNE_1-iYP559Oqe6g8-NqdHXbto,1282
|
|
44
|
+
cidc_api/models/db/stage2/__init__.py,sha256=R33BM1VDKJya5uuyYnPoGFVfhSViclIOklSoHH-EtBQ,2691
|
|
45
|
+
cidc_api/models/db/stage2/additional_treatment_orm.py,sha256=bq_E9h-AeYjhaYHaKUHmQ1k_OSP1OtNeu6bupA-ZKP4,1198
|
|
46
|
+
cidc_api/models/db/stage2/administrative_person_orm.py,sha256=49Mon6yLXjTRM-pypTL2R0qlIT1eJRqSaMGKNubjVak,1290
|
|
47
|
+
cidc_api/models/db/stage2/administrative_role_assignment_orm.py,sha256=vi8Xwe3Xz7QlRSTO4zVSd-42YMAfBnY3RNWFrh90f-Y,1292
|
|
48
|
+
cidc_api/models/db/stage2/adverse_event_orm.py,sha256=RkD5KkcJOIhbSvl2JCQfFhOM9J8UbiHQXZ7KzTfF6c8,2194
|
|
49
|
+
cidc_api/models/db/stage2/arm_orm.py,sha256=Mf-BpyvthpwjmaLWXcqaqt50jqC1rQ9NXPyy2wDXA1k,761
|
|
50
|
+
cidc_api/models/db/stage2/base_orm.py,sha256=nk9q0wlHxbuC7vzMtPCsnqeIRQufh3MCniMxu-h7__w,246
|
|
51
|
+
cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py,sha256=xD_I5nO_KBXsjk7ArPeLn-sPXgz0qMx97lxD1XehRYg,1185
|
|
52
|
+
cidc_api/models/db/stage2/cohort_orm.py,sha256=hoAA9O0_D3KB9wPmGKX01vh7Ux-MUiHd-HYZaEjkJzY,767
|
|
53
|
+
cidc_api/models/db/stage2/comorbidity_orm.py,sha256=UsywhrqhksKVpMzGfuoGFx8QQibnFUOFk-kVVlb1lW4,1155
|
|
54
|
+
cidc_api/models/db/stage2/consent_group_orm.py,sha256=Mus0WPzzavctDzvgaRNSJQbQfMxoLi1pjV4lfFaUOsE,1135
|
|
55
|
+
cidc_api/models/db/stage2/contact_orm.py,sha256=I8QrSpbegMhU3mBM39CROvSplEg-8p7HrH-UIXQiy1M,1623
|
|
56
|
+
cidc_api/models/db/stage2/demographic_orm.py,sha256=XZl41qhe7tjUQWBAQgJKK0DH0P4iQT5CO5DzZWckcC8,1973
|
|
57
|
+
cidc_api/models/db/stage2/disease_orm.py,sha256=LRQnLWZ5CZLXa6CelIZQSIlnk_1eWZknE5NLAkjd0QY,2239
|
|
58
|
+
cidc_api/models/db/stage2/exposure_orm.py,sha256=oy2CLsy-vCWNrvsVNX9Zg1XfCWfdycxPygAdr0RXnto,1085
|
|
59
|
+
cidc_api/models/db/stage2/file_orm.py,sha256=KsPsbzqnzCEhNUMxqfv__WUjT4EEd1CcO4RRQAc0pbo,1277
|
|
60
|
+
cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py,sha256=xWuPk7IYHzUugOWqKd9TlGJQZde1RvUv-JwlJCnTNUQ,1715
|
|
61
|
+
cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py,sha256=_FbdzIj5l2Z1Fn_IFPoXlO4X7VpdB2UUjlGBHtlrEfs,1797
|
|
62
|
+
cidc_api/models/db/stage2/gvhd_organ_acute_orm.py,sha256=vj8iIIFWLADBk6LcDQtUuvXL_ioTzD1kzJi_RCRa48k,1112
|
|
63
|
+
cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py,sha256=5omEAkkwssr7iyXqJcN8v0f_gN0jf2gE7fIR03okgx4,1136
|
|
64
|
+
cidc_api/models/db/stage2/institution_orm.py,sha256=agQlh7GU5o_g3vMZLQWxjt_1VK6gSA_FBhAalVLrjw4,1272
|
|
65
|
+
cidc_api/models/db/stage2/medical_history_orm.py,sha256=xfoNHXrBLGReK7NDW_aA_AAQVV-hbHt7OaUPUqbxT78,1556
|
|
66
|
+
cidc_api/models/db/stage2/other_clinical_endpoint_orm.py,sha256=Rh9IAfrLujiFHoKiibRgQqV14R3H7lLbycdog6MpPEk,1415
|
|
67
|
+
cidc_api/models/db/stage2/other_malignancy_orm.py,sha256=nAxoqOHiL3we57Wp1-0XWwlFwtJvOGlC97-qinsVNvc,1577
|
|
68
|
+
cidc_api/models/db/stage2/participant_orm.py,sha256=43lPE7dEa3k896a78XXVyrbHhguglBS97w6aW0PqUwk,3737
|
|
69
|
+
cidc_api/models/db/stage2/prior_treatment_orm.py,sha256=nmn8ieu-DuqPrRRggWCZJPvW-jMIz_Uqj28me3j-fzY,1565
|
|
70
|
+
cidc_api/models/db/stage2/publication_orm.py,sha256=rRgZo1peEL8lD3w7Z9K14XfdaYFRUg1kHzelShhT_QU,1102
|
|
71
|
+
cidc_api/models/db/stage2/radiotherapy_dose_orm.py,sha256=iifeysOVvCJ9IE7Vv5vQM2GLPP76OwUeHrsU6GEm8G8,1780
|
|
72
|
+
cidc_api/models/db/stage2/response_by_system_orm.py,sha256=mBcBLhmaQzVgCwa4PB6EaGMDJVMS3ymcfXm010Ltmx0,1800
|
|
73
|
+
cidc_api/models/db/stage2/response_orm.py,sha256=JqEzswK8Ye51mBJzudn2snF7mxohypIvaXqXfPQ8oUs,1437
|
|
74
|
+
cidc_api/models/db/stage2/shipment_orm.py,sha256=vBSPn444wjQJu5C17HaJWzNbUTmSkC9M086kyWSSQdw,2031
|
|
75
|
+
cidc_api/models/db/stage2/shipment_specimen_orm.py,sha256=jtCnO8om-8a_lSVheglrr-ek-vN3M4dQRkBvtLqVK24,1153
|
|
76
|
+
cidc_api/models/db/stage2/specimen_orm.py,sha256=D7GK-WcJMUUAy9Tl81ymaEn0zQbaaBxOdtMRkRzDvFU,1300
|
|
77
|
+
cidc_api/models/db/stage2/stem_cell_transplant_orm.py,sha256=4QzS_Y5Jz2cinDJ3qKAZqpYfGHwmNXXBfmT1rTxdRNA,1371
|
|
78
|
+
cidc_api/models/db/stage2/surgery_orm.py,sha256=4NISeVDr9s7128FEwU0u6RzozBLTZ5KKuuhfseJKYU8,1292
|
|
79
|
+
cidc_api/models/db/stage2/therapy_agent_dose_orm.py,sha256=obAA7uvTWvSc_1E80_9cPE8c_2BjBtPzMRkS9h0XXBc,1580
|
|
80
|
+
cidc_api/models/db/stage2/treatment_orm.py,sha256=WGLvAVR1SlGpT-j11eAtq2waNHhCN-ywE43mDZWdK_Y,2193
|
|
81
|
+
cidc_api/models/db/stage2/trial_orm.py,sha256=ijQLs1JjalXcS-s0HDv2_O2HoPL7Xvv_9AXtGeFc6BU,2821
|
|
82
|
+
cidc_api/models/files/__init__.py,sha256=8BMTnUSHzUbz0lBeEQY6NvApxDD3GMWMduoVMos2g4Y,213
|
|
83
|
+
cidc_api/models/files/details.py,sha256=sZkGM7iEV4-J6IDQCdiMV6KBDLbPxCOqUMaU3aY9rX8,65153
|
|
84
|
+
cidc_api/models/files/facets.py,sha256=vieZ3z_tYB29NqtvNzvKqajVwxM5ZLLZKeyQTq5lheU,33776
|
|
85
|
+
cidc_api/models/pydantic/base.py,sha256=sL_0PwEH2vS8BMT_w-zL7CPeaU-R7ih5afRigX6k2DM,4069
|
|
86
|
+
cidc_api/models/pydantic/stage1/__init__.py,sha256=H-NDjCd8isHTgZ7sqz-MIbzC-PpW1kEtR-x-Dyc8r6Q,1667
|
|
87
|
+
cidc_api/models/pydantic/stage1/additional_treatment.py,sha256=TFVzjd1NPLSfH9UnL2W3aZhpZSzDsg97j9IK8t882YA,1050
|
|
88
|
+
cidc_api/models/pydantic/stage1/adverse_event.py,sha256=PanE03MgP70M_i3glCeBCtScuG4zIpyKiJZfeNAOOBc,5176
|
|
89
|
+
cidc_api/models/pydantic/stage1/baseline_clinical_assessment.py,sha256=5FYvtOVf_nIK1h3xTs3vQgJe2ivQSVHt_wfrTSDgVxU,1119
|
|
90
|
+
cidc_api/models/pydantic/stage1/comorbidity.py,sha256=IfxFb0dZAdCY--Ze5kiZ3CrzVKJtuknpcpvrQ3ki-gI,1769
|
|
91
|
+
cidc_api/models/pydantic/stage1/consent_group.py,sha256=aP_nd0GKK6K7VH-6IZRSDDX2RxFM_j9B36FIRGwysOU,1216
|
|
92
|
+
cidc_api/models/pydantic/stage1/demographic.py,sha256=UY3I6nJXsTVPNubQOsF6lQuciLioZl7gKk_Oo6AyoSA,6794
|
|
93
|
+
cidc_api/models/pydantic/stage1/disease.py,sha256=G8d2iqsMhmDA3uxjOitxzmlFKIRxyUMp-o-H7eUfZFg,9250
|
|
94
|
+
cidc_api/models/pydantic/stage1/exposure.py,sha256=bd9gUmOQ7ge-xvoxD17pX95MKxfHKD2xNaFEJAMAkn4,1571
|
|
95
|
+
cidc_api/models/pydantic/stage1/gvhd_diagnosis_acute.py,sha256=jVMoWuLfspOZtOpC7rg1EzdvEAg8qEabcTaS6RRobZ8,1395
|
|
96
|
+
cidc_api/models/pydantic/stage1/gvhd_diagnosis_chronic.py,sha256=SRwkAL07YyIZM4bYCqm01aKqSvj3yRmpsqFKxAZEZoM,1382
|
|
97
|
+
cidc_api/models/pydantic/stage1/gvhd_organ_acute.py,sha256=VxlNGRJYjm9tW2lyLll8pD0t9JZs18gicnH-Ci_nR2I,771
|
|
98
|
+
cidc_api/models/pydantic/stage1/gvhd_organ_chronic.py,sha256=Fnp1Qm-ZDDtDLrgOAnEOUnQVNWI9WrTSomiFPStGmjc,810
|
|
99
|
+
cidc_api/models/pydantic/stage1/medical_history.py,sha256=z-cE_ChyWUKTvWjVhKMUAYvap9YfpZn6Z2BiHhBXx6g,2000
|
|
100
|
+
cidc_api/models/pydantic/stage1/other_malignancy.py,sha256=VIzhbkauaDfZdPxhTYpqNtwYBxE_4osE9wyZ67LQJx4,2622
|
|
101
|
+
cidc_api/models/pydantic/stage1/participant.py,sha256=QfRkK2okY7nM84y9QMK12kZLURBGk-HNWWHL4pQZjec,2655
|
|
102
|
+
cidc_api/models/pydantic/stage1/prior_treatment.py,sha256=axhyPHwYCoIvcIonjyPJ95HUyaAXqIuOd6hhoDM3LJU,2101
|
|
103
|
+
cidc_api/models/pydantic/stage1/radiotherapy_dose.py,sha256=8TbBqx_BYzwygQE-LxlSEK2ntIAFlTpAq_GS479TabI,3839
|
|
104
|
+
cidc_api/models/pydantic/stage1/response.py,sha256=hq5_eJ2BEaVH8pdU444p3AKHuZMdLsoDZcMA3XQa8Rw,3491
|
|
105
|
+
cidc_api/models/pydantic/stage1/response_by_system.py,sha256=vW0Xj_hYRa3W-JbqJgvty559_B9x5UIySaAOhIDVMOs,9853
|
|
106
|
+
cidc_api/models/pydantic/stage1/specimen.py,sha256=scDekZ-RtXOQTTLburhqT3RF4KM34iY9NAV1wYi_HSg,1281
|
|
107
|
+
cidc_api/models/pydantic/stage1/stem_cell_transplant.py,sha256=XsDVUksqbIprPxHwLlwHGyji4jsIFNMcIk-S0H4rDnQ,1228
|
|
108
|
+
cidc_api/models/pydantic/stage1/surgery.py,sha256=sHPzYMNusYIQrC6gjWopwxo0j9BNOq_Tcl6HKAMvuAQ,2421
|
|
109
|
+
cidc_api/models/pydantic/stage1/therapy_agent_dose.py,sha256=XX7JM4CdvTuAsbI5rI4wYDcbevP46BetTk_z7N_EL-M,3527
|
|
110
|
+
cidc_api/models/pydantic/stage1/treatment.py,sha256=eEjCcmkLdPmS2kg9dtUm3pt9apo1sRypBbte_xUVAYU,2607
|
|
111
|
+
cidc_api/models/pydantic/stage1/trial.py,sha256=EfY7HZEn7HT_N5-g4hkYtAM5BQ3yiMRCtj4rm12UQ7U,1909
|
|
112
|
+
cidc_api/models/pydantic/stage2/__init__.py,sha256=OQRG5wFkNsyAU_0KI1W5PDn8pBDe1EJDcgKZ19shh_g,2331
|
|
113
|
+
cidc_api/models/pydantic/stage2/additional_treatment.py,sha256=TFVzjd1NPLSfH9UnL2W3aZhpZSzDsg97j9IK8t882YA,1050
|
|
114
|
+
cidc_api/models/pydantic/stage2/administrative_person.py,sha256=3UYRgGLP7RukwZYTvQEnviDxBvWXj1uqditsoLJOw0s,1552
|
|
115
|
+
cidc_api/models/pydantic/stage2/administrative_role_assignment.py,sha256=kWUciVSnczjejdBSlynsVxSQ4dytDdgw9OxSvgzParg,536
|
|
116
|
+
cidc_api/models/pydantic/stage2/adverse_event.py,sha256=PanE03MgP70M_i3glCeBCtScuG4zIpyKiJZfeNAOOBc,5176
|
|
117
|
+
cidc_api/models/pydantic/stage2/arm.py,sha256=I_gyRUkjyA-Eds3BOu-PUlBGdeGeKiG92ERM8WqA2n8,481
|
|
118
|
+
cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py,sha256=5FYvtOVf_nIK1h3xTs3vQgJe2ivQSVHt_wfrTSDgVxU,1119
|
|
119
|
+
cidc_api/models/pydantic/stage2/cohort.py,sha256=NVlgp8D93nXGPDMSyrAJe-QbmrQfudyuTsc400WyOpg,493
|
|
120
|
+
cidc_api/models/pydantic/stage2/comorbidity.py,sha256=IfxFb0dZAdCY--Ze5kiZ3CrzVKJtuknpcpvrQ3ki-gI,1769
|
|
121
|
+
cidc_api/models/pydantic/stage2/consent_group.py,sha256=aP_nd0GKK6K7VH-6IZRSDDX2RxFM_j9B36FIRGwysOU,1216
|
|
122
|
+
cidc_api/models/pydantic/stage2/contact.py,sha256=Nfyy5Zn-n9_LiXG-CzC7OsQo7JrzdPcYjZIielpZiM0,883
|
|
123
|
+
cidc_api/models/pydantic/stage2/demographic.py,sha256=UY3I6nJXsTVPNubQOsF6lQuciLioZl7gKk_Oo6AyoSA,6794
|
|
124
|
+
cidc_api/models/pydantic/stage2/disease.py,sha256=G8d2iqsMhmDA3uxjOitxzmlFKIRxyUMp-o-H7eUfZFg,9250
|
|
125
|
+
cidc_api/models/pydantic/stage2/exposure.py,sha256=bd9gUmOQ7ge-xvoxD17pX95MKxfHKD2xNaFEJAMAkn4,1571
|
|
126
|
+
cidc_api/models/pydantic/stage2/file.py,sha256=MjZQAII_QqakLBhyfP1bq_Mn6au4yvVuwY0p0A5c664,1336
|
|
127
|
+
cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py,sha256=jVMoWuLfspOZtOpC7rg1EzdvEAg8qEabcTaS6RRobZ8,1395
|
|
128
|
+
cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py,sha256=SRwkAL07YyIZM4bYCqm01aKqSvj3yRmpsqFKxAZEZoM,1382
|
|
129
|
+
cidc_api/models/pydantic/stage2/gvhd_organ_acute.py,sha256=VxlNGRJYjm9tW2lyLll8pD0t9JZs18gicnH-Ci_nR2I,771
|
|
130
|
+
cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py,sha256=Fnp1Qm-ZDDtDLrgOAnEOUnQVNWI9WrTSomiFPStGmjc,810
|
|
131
|
+
cidc_api/models/pydantic/stage2/institution.py,sha256=41Lod9ryjB3x2jySHp_g3b7g1sj41Q4zwcNsGgXMGZ4,268
|
|
132
|
+
cidc_api/models/pydantic/stage2/medical_history.py,sha256=z-cE_ChyWUKTvWjVhKMUAYvap9YfpZn6Z2BiHhBXx6g,2000
|
|
133
|
+
cidc_api/models/pydantic/stage2/other_clinical_endpoint.py,sha256=bxZV3qIrrieX4xy3HbKyHdgfpwBcT-abQNlSodVCMns,1093
|
|
134
|
+
cidc_api/models/pydantic/stage2/other_malignancy.py,sha256=VIzhbkauaDfZdPxhTYpqNtwYBxE_4osE9wyZ67LQJx4,2622
|
|
135
|
+
cidc_api/models/pydantic/stage2/participant.py,sha256=QfRkK2okY7nM84y9QMK12kZLURBGk-HNWWHL4pQZjec,2655
|
|
136
|
+
cidc_api/models/pydantic/stage2/prior_treatment.py,sha256=axhyPHwYCoIvcIonjyPJ95HUyaAXqIuOd6hhoDM3LJU,2101
|
|
137
|
+
cidc_api/models/pydantic/stage2/publication.py,sha256=GBuvqBf0lyOoopN1S-3qX310xFxhixk7oDJLuGzLuiw,1817
|
|
138
|
+
cidc_api/models/pydantic/stage2/radiotherapy_dose.py,sha256=8TbBqx_BYzwygQE-LxlSEK2ntIAFlTpAq_GS479TabI,3839
|
|
139
|
+
cidc_api/models/pydantic/stage2/response.py,sha256=hq5_eJ2BEaVH8pdU444p3AKHuZMdLsoDZcMA3XQa8Rw,3491
|
|
140
|
+
cidc_api/models/pydantic/stage2/response_by_system.py,sha256=vW0Xj_hYRa3W-JbqJgvty559_B9x5UIySaAOhIDVMOs,9853
|
|
141
|
+
cidc_api/models/pydantic/stage2/shipment.py,sha256=dsZcDPikCRS3cjr58EGHHJ2gjir78J4cdHh_1SwFyrQ,1595
|
|
142
|
+
cidc_api/models/pydantic/stage2/shipment_specimen.py,sha256=exR7joXsH3Xd-o5vJV_Z-az33Edr8BBm5LCDv01iMI4,488
|
|
143
|
+
cidc_api/models/pydantic/stage2/specimen.py,sha256=scDekZ-RtXOQTTLburhqT3RF4KM34iY9NAV1wYi_HSg,1281
|
|
144
|
+
cidc_api/models/pydantic/stage2/stem_cell_transplant.py,sha256=XsDVUksqbIprPxHwLlwHGyji4jsIFNMcIk-S0H4rDnQ,1228
|
|
145
|
+
cidc_api/models/pydantic/stage2/surgery.py,sha256=sHPzYMNusYIQrC6gjWopwxo0j9BNOq_Tcl6HKAMvuAQ,2421
|
|
146
|
+
cidc_api/models/pydantic/stage2/therapy_agent_dose.py,sha256=XX7JM4CdvTuAsbI5rI4wYDcbevP46BetTk_z7N_EL-M,3527
|
|
147
|
+
cidc_api/models/pydantic/stage2/treatment.py,sha256=eEjCcmkLdPmS2kg9dtUm3pt9apo1sRypBbte_xUVAYU,2607
|
|
148
|
+
cidc_api/models/pydantic/stage2/trial.py,sha256=PftvFY27s3quVBg1Sau1JdskUSMM0huIeGP-018fi5o,4020
|
|
149
|
+
cidc_api/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
+
cidc_api/shared/assay_handling.py,sha256=zzWSqQ-ddLVzX5IuHvsaSib2H1lnjXpo9LbxaoqaHHs,2897
|
|
151
|
+
cidc_api/shared/auth.py,sha256=EIP9AKokLNrI79Fkpv3P7WdzaddJIsuGGICc1W494X0,9110
|
|
152
|
+
cidc_api/shared/email_layout.html,sha256=pBoTNw3ACHH-ncZFaNvcy5bXMqPwizR78usb0uCYtIc,7670
|
|
153
|
+
cidc_api/shared/emails.py,sha256=8kNFEaSnKpY-GX_iE59QUhSp3c4_uzy3SpHYt2QjuqI,6121
|
|
154
|
+
cidc_api/shared/file_handling.py,sha256=9MZXx5RfXO3A_pXf8Ulb7DQEuyp9j12eO9ad-PcTBXo,5908
|
|
155
|
+
cidc_api/shared/gcloud_client.py,sha256=EJ2ZzZ0gwDOZx18PEzXil4F-jpruacShkVIoecw8qzY,40751
|
|
156
|
+
cidc_api/shared/jose.py,sha256=-qzGzEDAlokEp9E7WtBtQkXyyfPWTYXlwYpCqVJWmqM,1830
|
|
157
|
+
cidc_api/shared/rest_utils.py,sha256=RwR30WOUAYCxL7V-i2totEyeriG30GbBDvBcpLXhM9w,6594
|
|
158
|
+
cidc_api/shared/utils.py,sha256=-gLnzxCR9E6h0plt2xrNisUG5_Y6GhhVwz3DgDIzpvs,367
|
|
159
|
+
nci_cidc_api_modules-1.2.55.dist-info/licenses/LICENSE,sha256=pNYWVTHaYonnmJyplmeAp7tQAjosmDpAWjb34jjv7Xs,1102
|
|
160
|
+
nci_cidc_api_modules-1.2.55.dist-info/METADATA,sha256=YILYITn86Z9qxxYBWpgS7WujFQ1fbIiQ4VrOUoevit0,40301
|
|
161
|
+
nci_cidc_api_modules-1.2.55.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
162
|
+
nci_cidc_api_modules-1.2.55.dist-info/top_level.txt,sha256=BSJqF6ura8-bWCKZvarvQEKvidMM05lH0bLQsNOrI0o,14
|
|
163
|
+
nci_cidc_api_modules-1.2.55.dist-info/RECORD,,
|
cidc_api/models/data.py
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from cidc_api.models.pydantic.stage1 import all_models as stage1_all_models
|
|
2
|
-
from cidc_api.models.pydantic.stage2 import all_models as stage2_all_models
|
|
3
|
-
from cidc_api.models.db.stage1 import all_models as stage1_all_db_models
|
|
4
|
-
from cidc_api.models.db.stage2 import all_models as stage2_all_db_models
|
|
5
|
-
|
|
6
|
-
standard_data_categories = [
|
|
7
|
-
model.__data_category__ for model in stage1_all_models if hasattr(model, "__data_category__")
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# A class to hold the representation of a trial's dataset all at once
|
|
12
|
-
class Dataset(dict):
|
|
13
|
-
def __init__(self, *args, **kwargs):
|
|
14
|
-
for data_category in standard_data_categories:
|
|
15
|
-
self[data_category] = []
|
|
16
|
-
super().__init__(*args, **kwargs)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Maps data categories like "treatment" to their associated pydantic model
|
|
20
|
-
data_category_to_model = {
|
|
21
|
-
"stage1": {model.__data_category__: model for model in stage1_all_models if hasattr(model, "__data_category__")},
|
|
22
|
-
"stage2": {model.__data_category__: model for model in stage2_all_models if hasattr(model, "__data_category__")},
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
data_category_to_db_model = {
|
|
26
|
-
"stage1": {model.__data_category__: model for model in stage1_all_db_models if hasattr(model, "__data_category__")},
|
|
27
|
-
"stage2": {model.__data_category__: model for model in stage2_all_db_models if hasattr(model, "__data_category__")},
|
|
28
|
-
}
|