nci-cidc-api-modules 1.2.22__py3-none-any.whl → 1.2.24__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 (81) hide show
  1. cidc_api/models/db/stage2/__init__.py +78 -0
  2. cidc_api/models/db/stage2/additional_treatment_orm.py +22 -0
  3. cidc_api/models/db/stage2/administrative_person_orm.py +25 -0
  4. cidc_api/models/db/stage2/administrative_role_assignment_orm.py +28 -0
  5. cidc_api/models/db/stage2/adverse_event_orm.py +47 -0
  6. cidc_api/models/db/stage2/arm_orm.py +23 -0
  7. cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +23 -0
  8. cidc_api/models/db/stage2/cohort_orm.py +23 -0
  9. cidc_api/models/db/stage2/comorbidity_orm.py +24 -0
  10. cidc_api/models/db/stage2/consent_group_orm.py +31 -0
  11. cidc_api/models/db/stage2/contact_orm.py +32 -0
  12. cidc_api/models/db/stage2/demographic_orm.py +44 -0
  13. cidc_api/models/db/stage2/disease_orm.py +53 -0
  14. cidc_api/models/db/stage2/exposure_orm.py +21 -0
  15. cidc_api/models/db/stage2/file_orm.py +38 -0
  16. cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +33 -0
  17. cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +37 -0
  18. cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +20 -0
  19. cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +20 -0
  20. cidc_api/models/db/stage2/institution_orm.py +33 -0
  21. cidc_api/models/db/stage2/medical_history_orm.py +29 -0
  22. cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +28 -0
  23. cidc_api/models/db/stage2/other_malignancy_orm.py +30 -0
  24. cidc_api/models/db/stage2/participant_orm.py +79 -0
  25. cidc_api/models/db/stage2/prior_treatment_orm.py +28 -0
  26. cidc_api/models/db/stage2/publication_orm.py +31 -0
  27. cidc_api/models/db/stage2/radiotherapy_dose_orm.py +39 -0
  28. cidc_api/models/db/stage2/response_by_system_orm.py +28 -0
  29. cidc_api/models/db/stage2/response_orm.py +27 -0
  30. cidc_api/models/db/stage2/shipment_orm.py +47 -0
  31. cidc_api/models/db/stage2/shipment_specimen_orm.py +24 -0
  32. cidc_api/models/db/stage2/specimen_orm.py +100 -0
  33. cidc_api/models/db/stage2/stem_cell_transplant_orm.py +25 -0
  34. cidc_api/models/db/stage2/surgery_orm.py +27 -0
  35. cidc_api/models/db/stage2/therapy_agent_dose_orm.py +31 -0
  36. cidc_api/models/db/stage2/treatment_orm.py +39 -0
  37. cidc_api/models/db/stage2/trial_orm.py +60 -0
  38. cidc_api/models/pydantic/stage2/__init__.py +78 -0
  39. cidc_api/models/pydantic/stage2/additional_treatment.py +23 -0
  40. cidc_api/models/pydantic/stage2/administrative_person.py +30 -0
  41. cidc_api/models/pydantic/stage2/administrative_role_assignment.py +16 -0
  42. cidc_api/models/pydantic/stage2/adverse_event.py +100 -0
  43. cidc_api/models/pydantic/stage2/arm.py +16 -0
  44. cidc_api/models/pydantic/stage2/base.py +30 -0
  45. cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +23 -0
  46. cidc_api/models/pydantic/stage2/cohort.py +16 -0
  47. cidc_api/models/pydantic/stage2/comorbidity.py +36 -0
  48. cidc_api/models/pydantic/stage2/consent_group.py +30 -0
  49. cidc_api/models/pydantic/stage2/contact.py +35 -0
  50. cidc_api/models/pydantic/stage2/demographic.py +114 -0
  51. cidc_api/models/pydantic/stage2/disease.py +144 -0
  52. cidc_api/models/pydantic/stage2/exposure.py +32 -0
  53. cidc_api/models/pydantic/stage2/file.py +44 -0
  54. cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +33 -0
  55. cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +32 -0
  56. cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +22 -0
  57. cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +23 -0
  58. cidc_api/models/pydantic/stage2/institution.py +10 -0
  59. cidc_api/models/pydantic/stage2/medical_history.py +36 -0
  60. cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +32 -0
  61. cidc_api/models/pydantic/stage2/other_malignancy.py +45 -0
  62. cidc_api/models/pydantic/stage2/participant.py +47 -0
  63. cidc_api/models/pydantic/stage2/prior_treatment.py +52 -0
  64. cidc_api/models/pydantic/stage2/publication.py +37 -0
  65. cidc_api/models/pydantic/stage2/radiotherapy_dose.py +79 -0
  66. cidc_api/models/pydantic/stage2/response.py +71 -0
  67. cidc_api/models/pydantic/stage2/response_by_system.py +109 -0
  68. cidc_api/models/pydantic/stage2/shipment.py +48 -0
  69. cidc_api/models/pydantic/stage2/shipment_specimen.py +15 -0
  70. cidc_api/models/pydantic/stage2/specimen.py +211 -0
  71. cidc_api/models/pydantic/stage2/stem_cell_transplant.py +35 -0
  72. cidc_api/models/pydantic/stage2/surgery.py +49 -0
  73. cidc_api/models/pydantic/stage2/therapy_agent_dose.py +67 -0
  74. cidc_api/models/pydantic/stage2/treatment.py +50 -0
  75. cidc_api/models/pydantic/stage2/trial.py +85 -0
  76. {nci_cidc_api_modules-1.2.22.dist-info → nci_cidc_api_modules-1.2.24.dist-info}/METADATA +1 -1
  77. nci_cidc_api_modules-1.2.24.dist-info/RECORD +104 -0
  78. nci_cidc_api_modules-1.2.22.dist-info/RECORD +0 -29
  79. {nci_cidc_api_modules-1.2.22.dist-info → nci_cidc_api_modules-1.2.24.dist-info}/WHEEL +0 -0
  80. {nci_cidc_api_modules-1.2.22.dist-info → nci_cidc_api_modules-1.2.24.dist-info}/licenses/LICENSE +0 -0
  81. {nci_cidc_api_modules-1.2.22.dist-info → nci_cidc_api_modules-1.2.24.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,144 @@
1
+ from pydantic import NonPositiveInt, model_validator
2
+ from typing import List, Self
3
+
4
+ from .base import Base
5
+ from cidc_api.models.types import (
6
+ PrimaryDiagnosisDiseaseGroup,
7
+ TumorGrade,
8
+ CancerStageSystem,
9
+ CancerStageSystemVersion,
10
+ CancerStage,
11
+ TCategory,
12
+ NCategory,
13
+ MCategory,
14
+ UberonAnatomicalTerm,
15
+ ICDO3MorphologicalCode,
16
+ ICDO3MorphologicalTerm,
17
+ YNU,
18
+ )
19
+
20
+
21
+ class Disease(Base):
22
+ __data_category__ = "disease"
23
+ __cardinality__ = "many"
24
+
25
+ # The unique internal identifier for this disease record
26
+ disease_id: int | None = None
27
+
28
+ # The unique internal identifier for the associated participant
29
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
30
+ participant_id: int | None = None
31
+
32
+ # A term describing the main condition for evaluation and treatment as captured in the Disease or Diagnosis (C2991)
33
+ # branch of the National Cancer Institute Thesaurus (NCIt) hierarchy tree. e.g. "Melanoma"
34
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14905532%20and%20ver_nr=1
35
+ primary_diagnosis_disease_group: PrimaryDiagnosisDiseaseGroup
36
+
37
+ # The location within the body from where the disease of interest originated as captured in the Uberon identifier. e.g. "lung"
38
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14883047%20and%20ver_nr=1
39
+ primary_disease_site: UberonAnatomicalTerm
40
+
41
+ # The ICD-O-3 morphology code that describes the tumor's histology, behavior, and grade-differentiation. e.g. "8480/6"
42
+ # CDE: TBD
43
+ morphological_code: ICDO3MorphologicalCode
44
+
45
+ # The ICD-O-3 morphology term that describes the tumor's type. e.g. "Mucinous adenoma"
46
+ # CDE: TBD
47
+ morphological_term: ICDO3MorphologicalTerm
48
+
49
+ # Words that broadly describe the cancer's characteristics and type. e.g. "Inflitrating Ductal Carcinoma"
50
+ # CDE: TBD
51
+ cancer_type_description: str | None = None
52
+
53
+ # The number of days elapsed since the participant was first diagnosed with this condition.
54
+ days_since_original_diagnosis: NonPositiveInt
55
+
56
+ # Words that express the degree of abnormality of cancer cells as a measure of differentiation and aggressiveness. e.g. "G1 Low Grade"
57
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=11325685%20and%20ver_nr=2
58
+ tumor_grade: TumorGrade | None = None
59
+
60
+ # The name of the staging system used in the evaluation of the disease. e.g. "AJCC"
61
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=7429602%20and%20ver_nr=1
62
+ cancer_stage_system: CancerStageSystem
63
+
64
+ # Release version of the staging system used in the evaluation of the disease. e.g. "8" (for AJCC)
65
+ cancer_stage_system_version: CancerStageSystemVersion | None = None
66
+
67
+ # Stage of the cancer at enrollment date as determined by the specific staging system. e.g. "Stage 0" (for AJCC)
68
+ # CDE(AJCC): https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440332%20and%20ver_nr=1
69
+ # CDE(FIGO): TBD
70
+ # CDE(RISS): TBD
71
+ cancer_stage: CancerStage
72
+
73
+ # Extent of the primary cancer based on evidence obtained from clinical assessment parameters determined prior to treatment. e.g. "T0"
74
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440328%20and%20ver_nr=1
75
+ # TODO: Verify this CDE
76
+ t_category: TCategory
77
+
78
+ # Extent of the regional lymph node involvement for the cancer based on evidence obtained from clinical assessment parameters
79
+ # determined prior to treatment. e.g. "N0"
80
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=3440330%20and%20ver_nr=1
81
+ # TODO: Verify this CDE
82
+ n_category: NCategory
83
+
84
+ # Extent of the distant metastasis for the cancer based on evidence obtained from clinical assessment parameters determined
85
+ # prior to treatment. e.g. "M0"
86
+ # 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
87
+ # TODO: Verify this CDE
88
+ m_category: MCategory
89
+
90
+ # The organ site where a tumor develops outside of the bone marrow as specified in the Uberon antatomical term.
91
+ metastatic_organ: List[UberonAnatomicalTerm] = []
92
+
93
+ # Indicates if participant has a hematological malignancy that is only extramedullary. e.g. "Yes"
94
+ solely_extramedullary_disease: YNU
95
+
96
+ extramedullary_organ: List[UberonAnatomicalTerm] = []
97
+
98
+ @model_validator(mode="after")
99
+ def validate_code_or_term_or_description_cr(self) -> Self:
100
+ if not self.morphological_code and not self.morphological_term and not self.cancer_type_description:
101
+ raise ValueError(
102
+ 'Please provide at least one of "morphological_code", "morphological_term" or "cancer_type_description".'
103
+ )
104
+ return self
105
+
106
+ @model_validator(mode="after")
107
+ def validate_cancer_stage_system_version_cr(self) -> Self:
108
+ if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage_system_version:
109
+ raise ValueError(
110
+ f'Please provide cancer_stage_system_version when cancer_stage_system is "{self.cancer_stage_system}"'
111
+ )
112
+ return self
113
+
114
+ @model_validator(mode="after")
115
+ def validate_cancer_stage_cr(self) -> Self:
116
+ if self.cancer_stage_system != "Not Applicable" and not self.cancer_stage:
117
+ raise ValueError(f'Please provide cancer_stage when cancer_stage_system is "{self.cancer_stage_system}"')
118
+ return self
119
+
120
+ @model_validator(mode="after")
121
+ def validate_t_category_cr(self) -> Self:
122
+ if self.cancer_stage_system == "AJCC" and not self.t_category:
123
+ raise ValueError(f'Please provide t_category when cancer_stage_system is "{self.cancer_stage_system}"')
124
+ return self
125
+
126
+ @model_validator(mode="after")
127
+ def validate_n_category_cr(self) -> Self:
128
+ if self.cancer_stage_system == "AJCC" and not self.n_category:
129
+ raise ValueError(f'Please provide n_category when cancer_stage_system is "{self.cancer_stage_system}"')
130
+ return self
131
+
132
+ @model_validator(mode="after")
133
+ def validate_m_category_cr(self) -> Self:
134
+ if self.cancer_stage_system == "AJCC" and not self.m_category:
135
+ raise ValueError(f'Please provide m_category when cancer_stage_system is "{self.cancer_stage_system}"')
136
+ return self
137
+
138
+ @model_validator(mode="after")
139
+ def validate_extramedullary_organ_cr(self) -> Self:
140
+ if self.solely_extramedullary_disease in ["No", "Unknown"] and self.extramedullary_organ:
141
+ raise ValueError(
142
+ "If solely_extramedullary_disease indicates no disease, please leave extramedullary_organ blank."
143
+ )
144
+ return self
@@ -0,0 +1,32 @@
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, 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: int | 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
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,44 @@
1
+ from datetime import datetime
2
+ from .base import Base
3
+ from cidc_api.models.types import ChecksumType, FileFormat
4
+
5
+
6
+ class File(Base):
7
+ # The unique internal identifier for this File record
8
+ file_id: int | None = None
9
+
10
+ # The unique identifier for the associated trial
11
+ trial_id: int | None = None
12
+
13
+ # The version number of the trial dataset
14
+ version: str | None = None
15
+
16
+ # The unique internal identifier of the institution that created this file
17
+ creator_id: int | None = None
18
+
19
+ # A description of the file's purpose and contents
20
+ description: str | None = None
21
+
22
+ # A unique UUID to identify the file across systems
23
+ uuid: str
24
+
25
+ # The name of the file
26
+ file_name: str
27
+
28
+ # The url of the file object as found in cloud storage, a bucket, external system, etc.
29
+ object_url: str
30
+
31
+ # The timestamp of when CIDC received the file
32
+ uploaded_timestamp: datetime
33
+
34
+ # The size of the file's contents, in bytes
35
+ file_size_bytes: int
36
+
37
+ # The value of the checksum calculated for the file's contents
38
+ checksum_value: str
39
+
40
+ # The type of the checksum calculated for the file's contents
41
+ checksum_type: ChecksumType
42
+
43
+ # A description or abbreviation of the format of the file's contents, possibly different than the extension
44
+ file_format: FileFormat
@@ -0,0 +1,33 @@
1
+ from .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: int | 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 .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: int | 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 .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 .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,10 @@
1
+ from .base import Base
2
+
3
+
4
+ class Institution(Base):
5
+
6
+ # A unique internal identifier for the Institution
7
+ institution_id: int | None = None
8
+
9
+ # The name by which the institution is known, e.g. "MATCH Central Pathology Lab"
10
+ name: str
@@ -0,0 +1,36 @@
1
+ from typing import Self
2
+
3
+ from pydantic import NonNegativeInt, PositiveFloat, model_validator
4
+
5
+ from .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: int | 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,32 @@
1
+ from .base import Base
2
+ from cidc_api.models.types import YNU, ResponseSystem, ResponseSystemVersion
3
+
4
+
5
+ class OtherClinicalEndpoint(Base):
6
+
7
+ # The unique internal identifier for the other clinical endpoint
8
+ other_clinical_endpoint_id: int | None = None
9
+
10
+ # The unique internal identifier for the associated participant
11
+ participant_id: int | None = None
12
+
13
+ # The name of the clinical endpoint. e.g. "iPFS"
14
+ name: str
15
+
16
+ # Whether the event that defines the clinical endpoint occurred
17
+ event: YNU
18
+
19
+ # The number of days to the occurrence of the event
20
+ days: int | None = None
21
+
22
+ # A description of this clinical endpoint
23
+ description: str | None = None
24
+
25
+ # The formula used to calculate the clinical endpoint criteria
26
+ calculation: str | None = None
27
+
28
+ # The response system used to define the clinical endpoint criteria. e.g. "RECIST"
29
+ response_system: ResponseSystem | None = None
30
+
31
+ # The version of the system used to define the clinical endpoint criteria.
32
+ response_system_version: ResponseSystemVersion | None = None
@@ -0,0 +1,45 @@
1
+ from typing import Self
2
+
3
+ from pydantic import NonPositiveInt, model_validator
4
+
5
+ from .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
+ 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
+ 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
+ morphological_term: ICDO3MorphologicalTerm | None = None
29
+
30
+ # Description of the cancer type as recorded in the trial.
31
+ malignancy_description: str | None = None
32
+
33
+ # Number of days since original diagnosis from the enrollment date. This may be a negative number.
34
+ days_since_diagnosis: NonPositiveInt | None = None
35
+
36
+ # Indicates the participant’s current clinical state regarding the cancer diagnosis.
37
+ malignancy_status: MalignancyStatus | None = None
38
+
39
+ @model_validator(mode="after")
40
+ def validate_code_or_term_or_description_cr(self) -> Self:
41
+ if not self.morphological_code and not self.morphological_term and not self.malignancy_description:
42
+ raise ValueError(
43
+ 'Please provide at least one of "morphological_code", "morphological_term" or "malignancy_description".'
44
+ )
45
+ return self
@@ -0,0 +1,47 @@
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 OffStudyReason
7
+
8
+
9
+ class Participant(Base):
10
+ __data_category__ = "participant"
11
+ __cardinality__ = "one"
12
+
13
+ # The unique internal identifier for the participant
14
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=12220014%20and%20ver_nr=1
15
+ participant_id: int | None = None
16
+
17
+ # The participant identifier assigned by the clinical trial team overseeing the study
18
+ native_participant_id: str
19
+
20
+ # The globally unique participant identifier assigned by the CIMAC network. e.g. C8P29A7
21
+ cimac_participant_id: str
22
+
23
+ # The unique identifier for the associated trial that the participant is participating in
24
+ trial_id: int | None = None
25
+
26
+ # Indicates if the individual is no longer actively participating in the clinical trial.
27
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=14834973%20and%20ver_nr=1
28
+ off_study: bool
29
+
30
+ # An explanation describing why an individual is no longer participating in the clinical trial.
31
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=13362265%20and%20ver_nr=1
32
+ off_study_reason: OffStudyReason | None = None
33
+
34
+ # Additional information if "Other" is selected for off_study_reason. e.g. "Transfer to another study"
35
+ off_study_reason_other: str | None = None
36
+
37
+ @model_validator(mode="after")
38
+ def off_study_reason_cr(self) -> Self:
39
+ if self.off_study and not self.off_study_reason:
40
+ raise ValueError('If "off_study" is "Yes" then "off_study_reason" is required.')
41
+ return self
42
+
43
+ @model_validator(mode="after")
44
+ def off_study_reason_other_cr(self) -> Self:
45
+ if self.off_study_reason == "Other" and not self.off_study_reason_other:
46
+ raise ValueError('If "off_study_reason" is "Other" then "off_study_reason_other" is required.')
47
+ return self
@@ -0,0 +1,52 @@
1
+ from typing import Self
2
+
3
+ from pydantic import NonPositiveInt, NonNegativeInt, model_validator
4
+
5
+ from .base import Base
6
+ from cidc_api.models.types import PriorTreatmentType, 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: int | None = None
18
+
19
+ # Number of days from the enrollment date to the first recorded administration or occurrence of
20
+ # the treatment modality.
21
+ 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
+ days_to_end: NonPositiveInt | None = None
26
+
27
+ # Specifies the category or kind of prior treatment modality a participant received.
28
+ type: PriorTreatmentType
29
+
30
+ # Description of the prior treatment such as its full generic name if it is a type of therapy agent,
31
+ # radiotherapy procedure name and location, or surgical procedure name and location.
32
+ description: str | None = None
33
+
34
+ # Best response from any response assessment system to the prior treatment if available or applicable.
35
+ best_response: str | None = None
36
+
37
+ # If the prior treatment is "Conditioning therapy" received before a stem cell transplant, specifies what
38
+ # type of conditioning regimen used.
39
+ conditioning_regimen_type: ConditioningRegimenType | None = None
40
+
41
+ # If prior treatment is "Stem cell transplant", indicates what stem cell donor type used.
42
+ stem_cell_donor_type: StemCellDonorType | None = None
43
+
44
+ # If prior treatment is "Stem cell transplant", indicates the number of days from the transplant
45
+ # date to the start of the current treatment.
46
+ days_from_transplant_to_treatment_initiation: NonNegativeInt | None = None
47
+
48
+ @model_validator(mode="after")
49
+ def validate_description_cr(self) -> Self:
50
+ if self.type == "Other therapy" and not self.description:
51
+ raise ValueError('If type is "Other therapy", please provide description.')
52
+ return self
@@ -0,0 +1,37 @@
1
+ from .base import Base
2
+
3
+
4
+ class Publication(Base):
5
+ # The unique internal identifier for the Publication record
6
+ publication_id: int | None = None
7
+
8
+ # The unique internal identifier for the associated Trial record
9
+ trial_id: int | None = None
10
+
11
+ # The version number of the trial dataset
12
+ version: str | None = None
13
+
14
+ # The digital object identifier string. www.doi.org. e.g. 10.47366/sabia.v5n1a3
15
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=15915370%20and%20ver_nr=1
16
+ digital_object_id: str
17
+
18
+ # The pubmed identifier string. pubmed.ncbi.nlm.nih.gov. e.g. 41135560
19
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=15915377%20and%20ver_nr=1
20
+ pubmed_id: str | None = None
21
+
22
+ # The full title of the publication stated exactly as it appears on the published work.
23
+ # https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16078531%20and%20ver_nr=1
24
+ publication_title: str | None = None
25
+
26
+ # A list of authors for the cited work.
27
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16081468%20and%20ver_nr=1
28
+ authorship: str | None = None
29
+
30
+ # The year in which the cited work was published.
31
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16081475%20and%20ver_nr=1
32
+ year_of_publication: str | None = None
33
+
34
+ # The name of the journal in which the cited work was published, inclusive of the citation itself in terms of
35
+ # journal volume number, part number where applicable, and page numbers.
36
+ # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=16081476%20and%20ver_nr=1
37
+ journal_citation: str | None = None