nci-cidc-api-modules 1.2.16__py3-none-any.whl → 1.2.25__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.
Files changed (91) hide show
  1. cidc_api/config/db.py +1 -3
  2. cidc_api/models/__init__.py +2 -0
  3. cidc_api/models/data.py +15 -0
  4. cidc_api/models/db/base_orm.py +25 -0
  5. cidc_api/models/db/stage2/__init__.py +78 -0
  6. cidc_api/models/db/stage2/additional_treatment_orm.py +22 -0
  7. cidc_api/models/db/stage2/administrative_person_orm.py +25 -0
  8. cidc_api/models/db/stage2/administrative_role_assignment_orm.py +28 -0
  9. cidc_api/models/db/stage2/adverse_event_orm.py +47 -0
  10. cidc_api/models/db/stage2/arm_orm.py +23 -0
  11. cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +23 -0
  12. cidc_api/models/db/stage2/cohort_orm.py +23 -0
  13. cidc_api/models/db/stage2/comorbidity_orm.py +24 -0
  14. cidc_api/models/db/stage2/consent_group_orm.py +31 -0
  15. cidc_api/models/db/stage2/contact_orm.py +32 -0
  16. cidc_api/models/db/stage2/demographic_orm.py +44 -0
  17. cidc_api/models/db/stage2/disease_orm.py +53 -0
  18. cidc_api/models/db/stage2/exposure_orm.py +21 -0
  19. cidc_api/models/db/stage2/file_orm.py +38 -0
  20. cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +33 -0
  21. cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +37 -0
  22. cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +20 -0
  23. cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +20 -0
  24. cidc_api/models/db/stage2/institution_orm.py +33 -0
  25. cidc_api/models/db/stage2/medical_history_orm.py +29 -0
  26. cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +28 -0
  27. cidc_api/models/db/stage2/other_malignancy_orm.py +30 -0
  28. cidc_api/models/db/stage2/participant_orm.py +79 -0
  29. cidc_api/models/db/stage2/prior_treatment_orm.py +28 -0
  30. cidc_api/models/db/stage2/publication_orm.py +31 -0
  31. cidc_api/models/db/stage2/radiotherapy_dose_orm.py +39 -0
  32. cidc_api/models/db/stage2/response_by_system_orm.py +28 -0
  33. cidc_api/models/db/stage2/response_orm.py +27 -0
  34. cidc_api/models/db/stage2/shipment_orm.py +47 -0
  35. cidc_api/models/db/stage2/shipment_specimen_orm.py +24 -0
  36. cidc_api/models/db/stage2/specimen_orm.py +100 -0
  37. cidc_api/models/db/stage2/stem_cell_transplant_orm.py +25 -0
  38. cidc_api/models/db/stage2/surgery_orm.py +27 -0
  39. cidc_api/models/db/stage2/therapy_agent_dose_orm.py +31 -0
  40. cidc_api/models/db/stage2/treatment_orm.py +39 -0
  41. cidc_api/models/db/stage2/trial_orm.py +60 -0
  42. cidc_api/models/files/facets.py +5 -0
  43. cidc_api/models/migrations.py +12 -39
  44. cidc_api/models/models.py +65 -14
  45. cidc_api/models/pydantic/stage2/__init__.py +78 -0
  46. cidc_api/models/pydantic/stage2/additional_treatment.py +23 -0
  47. cidc_api/models/pydantic/stage2/administrative_person.py +30 -0
  48. cidc_api/models/pydantic/stage2/administrative_role_assignment.py +16 -0
  49. cidc_api/models/pydantic/stage2/adverse_event.py +100 -0
  50. cidc_api/models/pydantic/stage2/arm.py +16 -0
  51. cidc_api/models/pydantic/stage2/base.py +30 -0
  52. cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +23 -0
  53. cidc_api/models/pydantic/stage2/cohort.py +16 -0
  54. cidc_api/models/pydantic/stage2/comorbidity.py +36 -0
  55. cidc_api/models/pydantic/stage2/consent_group.py +30 -0
  56. cidc_api/models/pydantic/stage2/contact.py +35 -0
  57. cidc_api/models/pydantic/stage2/demographic.py +114 -0
  58. cidc_api/models/pydantic/stage2/disease.py +144 -0
  59. cidc_api/models/pydantic/stage2/exposure.py +32 -0
  60. cidc_api/models/pydantic/stage2/file.py +44 -0
  61. cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +33 -0
  62. cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +32 -0
  63. cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +22 -0
  64. cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +23 -0
  65. cidc_api/models/pydantic/stage2/institution.py +10 -0
  66. cidc_api/models/pydantic/stage2/medical_history.py +36 -0
  67. cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +32 -0
  68. cidc_api/models/pydantic/stage2/other_malignancy.py +45 -0
  69. cidc_api/models/pydantic/stage2/participant.py +47 -0
  70. cidc_api/models/pydantic/stage2/prior_treatment.py +52 -0
  71. cidc_api/models/pydantic/stage2/publication.py +37 -0
  72. cidc_api/models/pydantic/stage2/radiotherapy_dose.py +79 -0
  73. cidc_api/models/pydantic/stage2/response.py +71 -0
  74. cidc_api/models/pydantic/stage2/response_by_system.py +109 -0
  75. cidc_api/models/pydantic/stage2/shipment.py +48 -0
  76. cidc_api/models/pydantic/stage2/shipment_specimen.py +15 -0
  77. cidc_api/models/pydantic/stage2/specimen.py +211 -0
  78. cidc_api/models/pydantic/stage2/stem_cell_transplant.py +35 -0
  79. cidc_api/models/pydantic/stage2/surgery.py +49 -0
  80. cidc_api/models/pydantic/stage2/therapy_agent_dose.py +67 -0
  81. cidc_api/models/pydantic/stage2/treatment.py +50 -0
  82. cidc_api/models/pydantic/stage2/trial.py +85 -0
  83. cidc_api/models/types.py +1439 -0
  84. cidc_api/shared/file_handling.py +37 -2
  85. cidc_api/shared/utils.py +4 -1
  86. {nci_cidc_api_modules-1.2.16.dist-info → nci_cidc_api_modules-1.2.25.dist-info}/METADATA +6 -4
  87. nci_cidc_api_modules-1.2.25.dist-info/RECORD +104 -0
  88. nci_cidc_api_modules-1.2.16.dist-info/RECORD +0 -26
  89. {nci_cidc_api_modules-1.2.16.dist-info → nci_cidc_api_modules-1.2.25.dist-info}/WHEEL +0 -0
  90. {nci_cidc_api_modules-1.2.16.dist-info → nci_cidc_api_modules-1.2.25.dist-info}/licenses/LICENSE +0 -0
  91. {nci_cidc_api_modules-1.2.16.dist-info → nci_cidc_api_modules-1.2.25.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,211 @@
1
+ from datetime import datetime
2
+
3
+ from .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
+ )
26
+
27
+
28
+ class Specimen(Base):
29
+ __data_category__ = "specimen"
30
+ __cardinality__ = "many"
31
+
32
+ # The unique internal identifier for the specimen record
33
+ specimen_id: int | None = None
34
+
35
+ # The unique internal identifier for the associated participant
36
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
37
+ participant_id: int | None = None
38
+
39
+ # The unique specimen identifier assigned by the CIMAC-CIDC Network.
40
+ # Formatted as CTTTPPPSS.AA for trial code TTT, participant PPP, sample SS, and aliquot AA.
41
+ cimac_id: str
42
+
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
+ # Categorical description of timepoint at which the sample was taken.
67
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=5899851%20and%20ver_nr=1
68
+ # Note: CIDC doesn't conform to this CDE's PVs
69
+ collection_event_name: str | None = None
70
+
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
+ # Days from enrollment date to date specimen was collected.
211
+ days_to_specimen_collection: int | None = None
@@ -0,0 +1,35 @@
1
+ from pydantic import NonNegativeInt
2
+ from .base import Base
3
+ from cidc_api.models.types import (
4
+ StemCellDonorType,
5
+ AllogeneicDonorType,
6
+ StemCellSource,
7
+ ConditioningRegimenType,
8
+ )
9
+
10
+
11
+ class StemCellTransplant(Base):
12
+ __data_category__ = "stem_cell_transplant"
13
+ __cardinality__ = "many"
14
+
15
+ # The unique internal identifier for the stem cell transplant record
16
+ stem_cell_transplant_id: int | None = None
17
+
18
+ # The unique internal identifier for the associated Treatment record
19
+ treatment_id: int | None = None
20
+
21
+ # Indicates the stem cell donor type.
22
+ stem_cell_donor_type: StemCellDonorType
23
+
24
+ # If "stem_cell_donor_type" is "Allogeneic", specifies the relationship and
25
+ # compatibility of the donor relative to the receipient
26
+ allogeneic_donor_type: AllogeneicDonorType | None = None
27
+
28
+ # Source of the stem cells used for transplant.
29
+ stem_cells_source: StemCellSource
30
+
31
+ # Days from the enrollment date to the date of the stem cell transplant.
32
+ days_to_transplant: NonNegativeInt
33
+
34
+ # Specifies what type of conditioning regimen was used for the stem cell transplant if applicable.
35
+ conditioning_regimen_type: ConditioningRegimenType | None = None
@@ -0,0 +1,49 @@
1
+ from typing import Self
2
+
3
+ from pydantic import NonNegativeInt, model_validator
4
+
5
+ from .base import Base
6
+ from cidc_api.models.types import SurgicalProcedure, UberonAnatomicalTerm, YNU
7
+
8
+
9
+ class Surgery(Base):
10
+ __data_category__ = "surgery"
11
+ __cardinality__ = "many"
12
+
13
+ # The unique internal identifier for the surgery record
14
+ surgery_id: int | None = None
15
+
16
+ # The unique internal identifier for the associated treatment record
17
+ treatment_id: int | None = None
18
+
19
+ # The term that describes the kind of surgical procedure administered.
20
+ procedure: SurgicalProcedure
21
+
22
+ # The name of surgical procedure if the value provided for procedure is "Other, specify".
23
+ procedure_other: str | None = None
24
+
25
+ # Number of days from enrollment date to surgical procedure date.
26
+ days_to_procedure: NonNegativeInt
27
+
28
+ # The Uberon identifier for the location within the body targeted by a procedure that
29
+ # is intended to alter or stop a pathologic process.
30
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14980609%20and%20ver_nr=1
31
+ anatomical_location: UberonAnatomicalTerm
32
+
33
+ # An indication as to whether the surgical procedure in question was performed with therapeutic intent.
34
+ therapeutic: YNU
35
+
36
+ # A narrative description of any significant findings observed during the surgical procedure in question.
37
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14918773%20and%20ver_nr=1
38
+ findings: str | None = None
39
+
40
+ # A textual description of evidence for remaining tumor following primary treatment that is only
41
+ # apparent using highly sensitive techniques.
42
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13362284%20and%20ver_nr=1
43
+ extent_of_residual_disease: str | None = None
44
+
45
+ @model_validator(mode="after")
46
+ def validate_procedure_other_cr(self) -> Self:
47
+ if self.procedure == "Other, specify" and not self.procedure_other:
48
+ raise ValueError('If procedure is "Other, specify", please provide procedure_other.')
49
+ return self
@@ -0,0 +1,67 @@
1
+ from typing import Self
2
+
3
+ from pydantic import NonNegativeInt, NonNegativeFloat, PositiveFloat, model_validator
4
+
5
+ from .base import Base
6
+ from cidc_api.models.types import YNU, TherapyAgentDoseUnits
7
+
8
+
9
+ class TherapyAgentDose(Base):
10
+ __data_category__ = "therapy_agent_dose"
11
+ __cardinality__ = "many"
12
+
13
+ # The unique internal identifier for the therapy agent dose record
14
+ therapy_agent_dose_id: int | None = None
15
+
16
+ # The unique internal identifier for the associated treatment record
17
+ treatment_id: int | None = None
18
+
19
+ # A numeric identifier used to indicate a specific course or cycle of treatment.
20
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16391085%20and%20ver_nr=1
21
+ course_number: str | None = None
22
+
23
+ # The full generic name of the therapeutic agent, if available, as captured in the Pharmacological
24
+ # Substance (C1909) branch of the National Cancer Institute Thesaurus (NCIt).
25
+ therapy_agent_name: str
26
+
27
+ # Number of days from the enrollment date to the start date of the therapy dose.
28
+ days_to_start: NonNegativeInt
29
+
30
+ # Number of days from enrollment date to the end date of the therapy dose.
31
+ days_to_end: NonNegativeInt
32
+
33
+ # Number of individual doses the patient received of the therapy agent.
34
+ number_of_doses: NonNegativeInt
35
+
36
+ # The amount that represents the dose of the therapy agent received by the participant.
37
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=2182728%20and%20ver_nr=3
38
+ received_dose: NonNegativeFloat
39
+
40
+ # Unit of measure for the dose of the agent received by the participant.
41
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=2321160%20and%20ver_nr=4
42
+ received_dose_units: TherapyAgentDoseUnits
43
+
44
+ # The amount that represents the planned dose of the therapy agent to be received by the participant.
45
+ planned_dose: PositiveFloat | None = None
46
+
47
+ # Unit of measure for the planned dose of the agent to be received by the participant.
48
+ # TODO: This CDE will probably be 2321160 but needs to be finalized with Janice
49
+ planned_dose_units: TherapyAgentDoseUnits | None = None
50
+
51
+ # Indicates if the therapy agent dose was changed, missed, or delayed.
52
+ dose_changes_delays: YNU
53
+
54
+ # Description of the dose changes, misses, or delays.
55
+ changes_delays_description: str | None = None
56
+
57
+ @model_validator(mode="after")
58
+ def validate_changes_delays_description_cr(self) -> Self:
59
+ if self.dose_changes_delays == "Yes" and not self.changes_delays_description:
60
+ raise ValueError('If dose_changes_delays is "Yes", please provide changes_delays_description.')
61
+ return self
62
+
63
+ @model_validator(mode="after")
64
+ def validate_planned_dose_units_cr(self) -> Self:
65
+ if self.planned_dose and not self.planned_dose_units:
66
+ raise ValueError("If planned_dose is provided, please provide planned_dose_units.")
67
+ return self
@@ -0,0 +1,50 @@
1
+ from typing import Self
2
+
3
+ from pydantic import model_validator
4
+
5
+ from .base import Base
6
+ from cidc_api.models.types import YNU, OffTreatmentReason
7
+
8
+
9
+ class Treatment(Base):
10
+ __data_category__ = "treatment"
11
+ __cardinality__ = "many"
12
+
13
+ # The unique internal identifier for the Treatment record
14
+ treatment_id: int | None = None
15
+
16
+ # The unique internal identifier for the associated Participant record
17
+ participant_id: int | None = None
18
+
19
+ # The unique internal identifier for the associated Arm record
20
+ arm_id: int | None = None
21
+
22
+ # The unique internal identifier for the associated Cohort record
23
+ cohort_id: int | None = None
24
+
25
+ # A unique identifier used to describe a distinct, specific intervention or
26
+ # treatment that a group or subgroup of participants in a clinical trial receives.
27
+ treatment_description: str
28
+
29
+ # Indicates if the participant has stopped receiving this particular treatment at
30
+ # the time of data submission.
31
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16391087%20and%20ver_nr=1
32
+ off_treatment: YNU
33
+
34
+ # An explanation describing why an individual is no longer receiving this particular treatment.
35
+ off_treatment_reason: OffTreatmentReason | None = None
36
+
37
+ # If "Other" is selected for "off_treatment_reason", provide a description of the reason.
38
+ off_treatment_reason_other: str | None = None
39
+
40
+ @model_validator(mode="after")
41
+ def validate_off_treatment_reason_cr(self) -> Self:
42
+ if self.off_treatment == "Yes" and not self.off_treatment_reason:
43
+ raise ValueError('If off_treatment is "Yes", please provide off_treatment_reason.')
44
+ return self
45
+
46
+ @model_validator(mode="after")
47
+ def validate_off_treatment_reason_other_cr(self) -> Self:
48
+ if self.off_treatment_reason == "Other" and not self.off_treatment_reason_other:
49
+ raise ValueError('If off_treatment_reason is "Other", please provide off_treatment_reason_other.')
50
+ return self
@@ -0,0 +1,85 @@
1
+ from datetime import datetime
2
+ from typing import List
3
+
4
+ from .base import Base
5
+ from cidc_api.models.types import TrialOrganization, TrialFundingAgency, TrialStatus, AssayType
6
+
7
+
8
+ class Trial(Base):
9
+ __data_category__ = "study"
10
+ __cardinality__ = None
11
+
12
+ # The unique identifier for the clinical trial. e.g. "GU16-287","BACCI"
13
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=5054234%20and%20ver_nr=1
14
+ trial_id: str
15
+
16
+ # The version number of the trial dataset. e.g. "1.0"
17
+ version: str | None = None
18
+
19
+ # ClinicalTrials.gov identifier. e.g. "NCT03731260"
20
+ # TODO need cde from janice, they will make one
21
+ nct_id: str | None = None
22
+
23
+ # NCI Trial Identifier. e.g. NCI22345
24
+ # TODO need cde from janice, they will make one
25
+ nci_id: str | None = None
26
+
27
+ # The short name for the trial
28
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=11459810%20and%20ver_nr=4
29
+ trial_name: str | None = None
30
+
31
+ # The type of clinical trial conducted
32
+ trial_type: str | None = None
33
+
34
+ # The long description of the trial name and purpose. e.g. "BACCI: A Phase II Randomized, Double-Blind,
35
+ # Placebo-Controlled Study of Capecitabine Bevacizumab plus Atezolizumab versus Capecitabine Bevacizumab
36
+ # plus Placebo in Patients with Refractory Metastatic Colorectal Cancer"
37
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16188024%20and%20ver_nr=1
38
+ trial_description: str | None = None
39
+
40
+ # Name of the primary organization that oversees the clinical trial. e.g. "ECOG-ACRIN", "SWOG"
41
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3938773%20and%20ver_nr=2
42
+ trial_organization: TrialOrganization | None = None
43
+
44
+ # The primary organization providing grant funding and supporting the trial.
45
+ # e.g. "Duke University - Duke Cancer Institute LAO"
46
+ grant_or_affiliated_network: TrialFundingAgency | None = None
47
+
48
+ # What stage the trial is at in its process.
49
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=15607838%20and%20ver_nr=1
50
+ trial_status: TrialStatus
51
+
52
+ # The id of the primary organization responsible for storing biospecimens from this study.
53
+ biobank_institution_id: int | None = None
54
+
55
+ # A description of the reasons why this study could provide insight into molecular biomarkers of immunotherapy.
56
+ justification: str | None = None
57
+
58
+ # The official day that study activity began
59
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16333702%20and%20ver_nr=1
60
+ dates_of_conduct_start: datetime
61
+
62
+ # The official day that study activity ended
63
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16333703%20and%20ver_nr=1
64
+ dates_of_conduct_end: datetime | None = None
65
+
66
+ # The image of the trial data schema
67
+ schema_file_id: int | None = None
68
+
69
+ # The description of the objectives and hypotheses for the proposed biomarkers.
70
+ biomarker_plan: str | None = None
71
+
72
+ # The description of the rules governing data sharing and publications.
73
+ data_sharing_plan: str | None = None
74
+
75
+ # The list of assays that CIDC expects to receive for this trial.
76
+ expected_assays: List[AssayType] = []
77
+
78
+ # Is the cancer studying a liquid tumor type?
79
+ is_liquid_tumor_trial: bool = False
80
+
81
+ # The dbgap study accession number associated with the trial.
82
+ dbgap_study_accession: str | None = None
83
+
84
+ # The internal version identifier for this specific trial dataset.
85
+ version: str