nci-cidc-api-modules 1.2.30__tar.gz → 1.2.32__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. {nci_cidc_api_modules-1.2.30/nci_cidc_api_modules.egg-info → nci_cidc_api_modules-1.2.32}/PKG-INFO +1 -1
  2. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/additional_treatment_orm.py +3 -3
  3. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/demographic_orm.py +3 -3
  4. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/other_malignancy_orm.py +6 -6
  5. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/participant_orm.py +1 -1
  6. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/prior_treatment_orm.py +11 -10
  7. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/response_by_system_orm.py +1 -0
  8. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/response_orm.py +2 -2
  9. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/trial_orm.py +19 -16
  10. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/additional_treatment.py +3 -3
  11. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/base.py +3 -1
  12. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/demographic.py +11 -3
  13. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/other_malignancy.py +11 -7
  14. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/prior_treatment.py +11 -11
  15. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/response.py +3 -9
  16. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/response_by_system.py +4 -1
  17. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/trial.py +12 -2
  18. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/types.py +6 -0
  19. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32/nci_cidc_api_modules.egg-info}/PKG-INFO +1 -1
  20. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/pyproject.toml +3 -0
  21. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/LICENSE +0 -0
  22. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/MANIFEST.in +0 -0
  23. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/README.md +0 -0
  24. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/config/__init__.py +0 -0
  25. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/config/db.py +0 -0
  26. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/config/logging.py +0 -0
  27. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/config/secrets.py +0 -0
  28. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/config/settings.py +0 -0
  29. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/__init__.py +0 -0
  30. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/data.py +0 -0
  31. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/base_orm.py +0 -0
  32. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/__init__.py +0 -0
  33. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/administrative_person_orm.py +0 -0
  34. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/administrative_role_assignment_orm.py +0 -0
  35. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/adverse_event_orm.py +0 -0
  36. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/arm_orm.py +0 -0
  37. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +0 -0
  38. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/cohort_orm.py +0 -0
  39. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/comorbidity_orm.py +0 -0
  40. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/consent_group_orm.py +0 -0
  41. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/contact_orm.py +0 -0
  42. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/disease_orm.py +0 -0
  43. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/exposure_orm.py +0 -0
  44. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/file_orm.py +0 -0
  45. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +0 -0
  46. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +0 -0
  47. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +0 -0
  48. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +0 -0
  49. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/institution_orm.py +0 -0
  50. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/medical_history_orm.py +0 -0
  51. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +0 -0
  52. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/publication_orm.py +0 -0
  53. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/radiotherapy_dose_orm.py +0 -0
  54. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/shipment_orm.py +0 -0
  55. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/shipment_specimen_orm.py +0 -0
  56. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/specimen_orm.py +0 -0
  57. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/stem_cell_transplant_orm.py +0 -0
  58. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/surgery_orm.py +0 -0
  59. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/therapy_agent_dose_orm.py +0 -0
  60. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/db/stage2/treatment_orm.py +0 -0
  61. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/files/__init__.py +0 -0
  62. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/files/details.py +0 -0
  63. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/files/facets.py +0 -0
  64. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/migrations.py +0 -0
  65. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/models.py +0 -0
  66. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/__init__.py +0 -0
  67. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/administrative_person.py +0 -0
  68. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/administrative_role_assignment.py +0 -0
  69. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/adverse_event.py +0 -0
  70. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/arm.py +0 -0
  71. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +0 -0
  72. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/cohort.py +0 -0
  73. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/comorbidity.py +0 -0
  74. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/consent_group.py +0 -0
  75. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/contact.py +0 -0
  76. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/disease.py +0 -0
  77. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/exposure.py +0 -0
  78. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/file.py +0 -0
  79. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +0 -0
  80. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +0 -0
  81. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +0 -0
  82. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +0 -0
  83. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/institution.py +0 -0
  84. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/medical_history.py +0 -0
  85. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +0 -0
  86. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/participant.py +0 -0
  87. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/publication.py +0 -0
  88. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/radiotherapy_dose.py +0 -0
  89. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/shipment.py +0 -0
  90. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/shipment_specimen.py +0 -0
  91. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/specimen.py +0 -0
  92. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/stem_cell_transplant.py +0 -0
  93. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/surgery.py +0 -0
  94. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/therapy_agent_dose.py +0 -0
  95. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/pydantic/stage2/treatment.py +0 -0
  96. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/models/schemas.py +0 -0
  97. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/reference/ctcae.py +0 -0
  98. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/reference/gvhd.py +0 -0
  99. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/reference/icd10cm.py +0 -0
  100. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/reference/icdo3.py +0 -0
  101. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/reference/uberon.py +0 -0
  102. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/__init__.py +0 -0
  103. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/auth.py +0 -0
  104. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/email_layout.html +0 -0
  105. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/emails.py +0 -0
  106. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/file_handling.py +0 -0
  107. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/gcloud_client.py +0 -0
  108. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/jose.py +0 -0
  109. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/rest_utils.py +0 -0
  110. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/cidc_api/shared/utils.py +0 -0
  111. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/nci_cidc_api_modules.egg-info/SOURCES.txt +0 -0
  112. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/nci_cidc_api_modules.egg-info/dependency_links.txt +0 -0
  113. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/nci_cidc_api_modules.egg-info/not-zip-safe +0 -0
  114. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/nci_cidc_api_modules.egg-info/requires.txt +0 -0
  115. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/nci_cidc_api_modules.egg-info/top_level.txt +0 -0
  116. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/requirements.modules.txt +0 -0
  117. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/setup.cfg +0 -0
  118. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/setup.py +0 -0
  119. {nci_cidc_api_modules-1.2.30 → nci_cidc_api_modules-1.2.32}/tests/test_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.2.30
3
+ Version: 1.2.32
4
4
  Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-api-gae
6
6
  License: MIT license
@@ -16,8 +16,8 @@ class AdditionalTreatmentORM(BaseORM):
16
16
  additional_treatment_id: Mapped[int] = mapped_column(primary_key=True)
17
17
  participant_id: Mapped[int] = mapped_column(ForeignKey("stage2.participant.participant_id", ondelete="CASCADE"))
18
18
 
19
- days_to_start: Mapped[Optional[NonNegativeInt]]
20
- days_to_end: Mapped[Optional[NonNegativeInt]]
21
- description: Mapped[str]
19
+ additional_treatment_days_to_start: Mapped[Optional[NonNegativeInt]]
20
+ additional_treatment_days_to_end: Mapped[Optional[NonNegativeInt]]
21
+ additional_treatment_description: Mapped[str]
22
22
 
23
23
  participant: Mapped["ParticipantORM"] = relationship(back_populates="additional_treatments", cascade="all, delete")
@@ -35,9 +35,9 @@ class DemographicORM(BaseORM):
35
35
  height_units: Mapped[HeightUnits]
36
36
  weight: Mapped[PositiveFloat]
37
37
  weight_units: Mapped[WeightUnits]
38
- body_mass_index: Mapped[PositiveFloat]
39
- body_surface_area: Mapped[PositiveFloat]
40
- body_surface_area_units: Mapped[BodySurfaceAreaUnits]
38
+ body_mass_index: Mapped[PositiveFloat | None]
39
+ body_surface_area: Mapped[PositiveFloat | None]
40
+ body_surface_area_units: Mapped[BodySurfaceAreaUnits | None]
41
41
  occupation: Mapped[Occupation | None]
42
42
  income: Mapped[NonNegativeFloat | None]
43
43
  highest_level_of_education: Mapped[Education | None]
@@ -19,12 +19,12 @@ class OtherMalignancyORM(BaseORM):
19
19
  ForeignKey("stage2.medical_history.medical_history_id", ondelete="CASCADE")
20
20
  )
21
21
 
22
- primary_disease_site: Mapped[UberonAnatomicalTerm]
23
- morphological_code: Mapped[Optional[ICDO3MorphologicalCode]]
24
- morphological_term: Mapped[Optional[ICDO3MorphologicalTerm]]
25
- malignancy_description: Mapped[Optional[str]]
26
- days_since_diagnosis: Mapped[Optional[NonPositiveInt]]
27
- malignancy_status: Mapped[Optional[MalignancyStatus]]
22
+ other_malignancy_primary_disease_site: Mapped[UberonAnatomicalTerm]
23
+ other_malignancy_morphological_code: Mapped[Optional[ICDO3MorphologicalCode]]
24
+ other_malignancy_morphological_term: Mapped[Optional[ICDO3MorphologicalTerm]]
25
+ other_malignancy_description: Mapped[Optional[str]]
26
+ other_malignancy_days_since_diagnosis: Mapped[Optional[NonPositiveInt]]
27
+ other_malignancy_status: Mapped[Optional[MalignancyStatus]]
28
28
 
29
29
  medical_history: Mapped["MedicalHistoryORM"] = relationship(
30
30
  back_populates="other_malignancies", cascade="all, delete"
@@ -23,7 +23,7 @@ class ParticipantORM(BaseORM):
23
23
  version: Mapped[str]
24
24
 
25
25
  native_participant_id: Mapped[str | None]
26
- cimac_participant_id: Mapped[str] = mapped_column(unique=True)
26
+ cimac_participant_id: Mapped[str | None]
27
27
  consent_group_id: Mapped[Optional[int]] = mapped_column(
28
28
  ForeignKey("stage2.consent_group.consent_group_id", ondelete="CASCADE")
29
29
  )
@@ -1,8 +1,9 @@
1
- from typing import Optional
1
+ from typing import Optional, List
2
2
 
3
- from pydantic import NonPositiveInt, NonNegativeInt
3
+ from pydantic import NonPositiveInt, NegativeInt
4
4
  from sqlalchemy import ForeignKey
5
5
  from sqlalchemy.orm import Mapped, mapped_column, relationship
6
+ from sqlalchemy.types import JSON
6
7
 
7
8
  from cidc_api.models.db.base_orm import BaseORM
8
9
  from cidc_api.models.types import PriorTreatmentType, ConditioningRegimenType, StemCellDonorType
@@ -17,13 +18,13 @@ class PriorTreatmentORM(BaseORM):
17
18
  prior_treatment_id: Mapped[int] = mapped_column(primary_key=True)
18
19
  participant_id: Mapped[int] = mapped_column(ForeignKey("stage2.participant.participant_id", ondelete="CASCADE"))
19
20
 
20
- days_to_start: Mapped[Optional[NonPositiveInt]]
21
- days_to_end: Mapped[Optional[NonPositiveInt]]
22
- type: Mapped[PriorTreatmentType]
23
- description: Mapped[Optional[str]]
24
- best_response: Mapped[Optional[str]]
25
- conditioning_regimen_type: Mapped[Optional[ConditioningRegimenType]]
26
- stem_cell_donor_type: Mapped[Optional[StemCellDonorType]]
27
- days_from_transplant_to_treatment_initiation: Mapped[Optional[NonNegativeInt]]
21
+ prior_treatment_days_to_start: Mapped[Optional[NonPositiveInt]]
22
+ prior_treatment_days_to_end: Mapped[Optional[NonPositiveInt]]
23
+ prior_treatment_type: Mapped[List[PriorTreatmentType]] = mapped_column(JSON, nullable=False)
24
+ prior_treatment_description: Mapped[Optional[str]]
25
+ prior_treatment_best_response: Mapped[Optional[str]]
26
+ prior_treatment_conditioning_regimen_type: Mapped[Optional[ConditioningRegimenType]]
27
+ prior_treatment_stem_cell_donor_type: Mapped[Optional[StemCellDonorType]]
28
+ prior_treatment_days_to_prior_transplant: Mapped[Optional[NegativeInt]]
28
29
 
29
30
  participant: Mapped["ParticipantORM"] = relationship(back_populates="prior_treatments", cascade="all, delete")
@@ -18,6 +18,7 @@ class ResponseBySystemORM(BaseORM):
18
18
  response_system_version: Mapped[ResponseSystemVersion] = mapped_column(String)
19
19
  best_overall_response: Mapped[BestOverallResponse] = mapped_column(String)
20
20
  response_duration: Mapped[PositiveInt | None]
21
+ duration_of_stable_disease: Mapped[PositiveInt | None]
21
22
  durable_clinical_benefit: Mapped[bool | None]
22
23
  days_to_first_response: Mapped[PositiveInt | None]
23
24
  days_to_best_response: Mapped[PositiveInt | None]
@@ -16,13 +16,13 @@ class ResponseORM(BaseORM):
16
16
  response_id: Mapped[int] = mapped_column(primary_key=True)
17
17
  participant_id: Mapped[int] = mapped_column(ForeignKey("stage2.participant.participant_id", ondelete="CASCADE"))
18
18
  survival_status: Mapped[SurvivalStatus]
19
- overall_survival: Mapped[NonNegativeInt | None]
19
+ overall_survival: Mapped[NonNegativeInt]
20
20
  abscopal_response: Mapped[YNUNA | None]
21
21
  pathological_complete_response: Mapped[YNUNA | None]
22
22
  days_to_death: Mapped[NonNegativeInt | None]
23
23
  cause_of_death: Mapped[CauseOfDeath | None]
24
24
  evaluable_for_toxicity: Mapped[bool]
25
25
  evaluable_for_efficacy: Mapped[bool]
26
- days_to_last_follow_up: Mapped[NonNegativeInt | None]
26
+ days_to_last_vital_status: Mapped[NonNegativeInt | None]
27
27
 
28
28
  participant: Mapped["ParticipantORM"] = relationship(back_populates="response", cascade="all, delete")
@@ -6,7 +6,7 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship
6
6
  from sqlalchemy.types import JSON
7
7
 
8
8
  from cidc_api.models.db.base_orm import BaseORM
9
- from cidc_api.models.types import AssayType, TrialOrganization, TrialFundingAgency
9
+ from cidc_api.models.types import AssayType, TrialOrganization, TrialFundingAgency, AgeGroup
10
10
 
11
11
 
12
12
  class TrialORM(BaseORM):
@@ -18,23 +18,26 @@ class TrialORM(BaseORM):
18
18
  trial_id: Mapped[str] = mapped_column(primary_key=True)
19
19
  version: Mapped[str] = mapped_column(primary_key=True)
20
20
 
21
- nct_id: Mapped[Optional[str]]
22
- nci_id: Mapped[Optional[str]]
23
- trial_name: Mapped[Optional[str]]
24
- trial_type: Mapped[Optional[str]]
25
- trial_description: Mapped[Optional[str]]
26
- trial_organization: Mapped[Optional[TrialOrganization]]
27
- grant_or_affiliated_network: Mapped[Optional[TrialFundingAgency]]
28
- biobank_institution_id: Mapped[Optional[int]]
29
- justification: Mapped[Optional[str]]
21
+ primary_endpoint: Mapped[str | None]
22
+ age_group: Mapped[List[AgeGroup]] = mapped_column(JSON, nullable=True)
23
+ study_population: Mapped[str | None]
24
+ nct_id: Mapped[str | None]
25
+ nci_id: Mapped[str | None]
26
+ trial_name: Mapped[str | None]
27
+ trial_type: Mapped[str | None]
28
+ trial_description: Mapped[str | None]
29
+ trial_organization: Mapped[TrialOrganization | None]
30
+ grant_or_affiliated_network: Mapped[TrialFundingAgency | None]
31
+ biobank_institution_id: Mapped[int | None]
32
+ justification: Mapped[str | None]
30
33
  dates_of_conduct_start: Mapped[datetime]
31
- dates_of_conduct_end: Mapped[Optional[datetime]]
32
- schema_file_id: Mapped[Optional[int]]
33
- biomarker_plan: Mapped[Optional[str]]
34
- data_sharing_plan: Mapped[Optional[str]]
35
- expected_assays: Mapped[Optional[List[AssayType]]] = mapped_column(JSON, nullable=True)
34
+ dates_of_conduct_end: Mapped[datetime | None]
35
+ schema_file_id: Mapped[int | None]
36
+ biomarker_plan: Mapped[str | None]
37
+ data_sharing_plan: Mapped[str | None]
38
+ expected_assays: Mapped[List[AssayType]] = mapped_column(JSON, nullable=True)
36
39
  is_liquid_tumor_trial: Mapped[bool]
37
- dbgap_study_accession: Mapped[Optional[str]]
40
+ dbgap_study_accession: Mapped[str | None]
38
41
 
39
42
  biobank: Mapped["InstitutionORM"] = relationship(back_populates="trial")
40
43
  schema: Mapped[Optional["FileORM"]] = relationship(back_populates="trial", viewonly=True)
@@ -15,11 +15,11 @@ class AdditionalTreatment(Base):
15
15
  )
16
16
 
17
17
  # Number of days from the enrollment date to the first recorded administration or occurrence of the treatment modality.
18
- days_to_start: NonNegativeInt | None = None
18
+ additional_treatment_days_to_start: NonNegativeInt | None = None
19
19
 
20
20
  # Number of days from the enrollment date to the last recorded administration or occurrence of the treatment modality.
21
- days_to_end: NonNegativeInt | None = None
21
+ additional_treatment_days_to_end: NonNegativeInt | None = None
22
22
 
23
23
  # Description of the prior treatment such as its full generic name if it is a type of therapy agent, radiotherapy procedure
24
24
  # name and location, or surgical procedure name and location.
25
- description: str
25
+ additional_treatment_description: str
@@ -6,7 +6,7 @@ import copy
6
6
 
7
7
  class Base(BaseModel):
8
8
 
9
- model_config = ConfigDict(validate_assignment=True, from_attributes=True)
9
+ model_config = ConfigDict(validate_assignment=True, from_attributes=True, extra="forbid")
10
10
 
11
11
  # Validates the new state and updates the object if valid
12
12
  def update(self, **kwargs):
@@ -38,5 +38,7 @@ class Base(BaseModel):
38
38
  if not val:
39
39
  return []
40
40
  return val.split("|")
41
+ elif val == None:
42
+ return []
41
43
  else:
42
44
  raise ValueError("Field value must be string or list")
@@ -68,15 +68,15 @@ class Demographic(Base):
68
68
 
69
69
  # The body mass index of the participant at the enrollment date.
70
70
  # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=2006410%20and%20ver_nr=3
71
- body_mass_index: PositiveFloat
71
+ body_mass_index: PositiveFloat | None = None
72
72
 
73
73
  # A decimal number that represents the measure of the 2-dimensional extent of the body surface (i.e., the skin) of the participant at the enrollment date.
74
74
  # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=6606197%20and%20ver_nr=1
75
- body_surface_area: PositiveFloat
75
+ body_surface_area: PositiveFloat | None = None
76
76
 
77
77
  # Unit of measurement for body surface area of the participant at the enrollment date. e.g. "m2"
78
78
  # https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=15114329%20and%20ver_nr=1
79
- body_surface_area_units: BodySurfaceAreaUnits
79
+ body_surface_area_units: BodySurfaceAreaUnits | None = None
80
80
 
81
81
  # The occupation/job category of the participant. e.g. "Manager"
82
82
  # CDE: https://cadsr.cancer.gov/onedata/dmdirect/NIH/NCI/CO/CDEDD?filter=CDEDD.ITEM_ID=6617540%20and%20ver_nr=1
@@ -113,3 +113,11 @@ class Demographic(Base):
113
113
  if age_in_years >= 90:
114
114
  raise ValueError('"age_at_enrollment" cannot represent a value greater than 90 years of age.')
115
115
  return self
116
+
117
+ @model_validator(mode="after")
118
+ def validate_body_surface_area_units_cr(self) -> Self:
119
+ if self.body_surface_area and not self.body_surface_area_units:
120
+ raise ValueError(
121
+ 'If "body_surface_area" is provided then "body_surface_area_units_other" must also be provided.'
122
+ )
123
+ return self
@@ -17,28 +17,32 @@ class OtherMalignancy(Base):
17
17
  medical_history_id: int | None = None
18
18
 
19
19
  # The location within the body from where the prior malignancy originated as captured in the Uberon anatomical term.
20
- primary_disease_site: UberonAnatomicalTerm
20
+ other_malignancy_primary_disease_site: UberonAnatomicalTerm
21
21
 
22
22
  # The ICD-O-3 code which identifies the specific appearance of cells and tissues (normal and abnormal) used
23
23
  # to define the presence and nature of disease.
24
- morphological_code: ICDO3MorphologicalCode | None = None
24
+ other_malignancy_morphological_code: ICDO3MorphologicalCode | None = None
25
25
 
26
26
  # The ICD-O-3 textual label which identifies the specific appearance of cells and tissues (normal and abnormal) used
27
27
  # to define the presence and nature of disease.
28
- morphological_term: ICDO3MorphologicalTerm | None = None
28
+ other_malignancy_morphological_term: ICDO3MorphologicalTerm | None = None
29
29
 
30
30
  # Description of the cancer type as recorded in the trial.
31
- malignancy_description: str | None = None
31
+ other_malignancy_description: str | None = None
32
32
 
33
33
  # Number of days since original diagnosis from the enrollment date. This may be a negative number.
34
- days_since_diagnosis: NonPositiveInt | None = None
34
+ other_malignancy_days_since_diagnosis: NonPositiveInt | None = None
35
35
 
36
36
  # Indicates the participant’s current clinical state regarding the cancer diagnosis.
37
- malignancy_status: MalignancyStatus | None = None
37
+ other_malignancy_status: MalignancyStatus | None = None
38
38
 
39
39
  @model_validator(mode="after")
40
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:
41
+ if (
42
+ not self.other_malignancy_morphological_code
43
+ and not self.other_malignancy_morphological_term
44
+ and not self.other_malignancy_description
45
+ ):
42
46
  raise ValueError(
43
47
  'Please provide at least one of "morphological_code", "morphological_term" or "malignancy_description".'
44
48
  )
@@ -1,6 +1,6 @@
1
- from typing import Self
1
+ from typing import Self, Annotated, List
2
2
 
3
- from pydantic import NonPositiveInt, NonNegativeInt, model_validator
3
+ from pydantic import NonPositiveInt, NegativeInt, model_validator, BeforeValidator
4
4
 
5
5
  from .base import Base
6
6
  from cidc_api.models.types import PriorTreatmentType, ConditioningRegimenType, StemCellDonorType
@@ -18,35 +18,35 @@ class PriorTreatment(Base):
18
18
 
19
19
  # Number of days from the enrollment date to the first recorded administration or occurrence of
20
20
  # the treatment modality.
21
- days_to_start: NonPositiveInt | None = None
21
+ prior_treatment_days_to_start: NonPositiveInt | None = None
22
22
 
23
23
  # Number of days from the enrollment date to the last recorded administration or occurrence of
24
24
  # the treatment modality.
25
- days_to_end: NonPositiveInt | None = None
25
+ prior_treatment_days_to_end: NonPositiveInt | None = None
26
26
 
27
27
  # Specifies the category or kind of prior treatment modality a participant received.
28
- type: PriorTreatmentType
28
+ prior_treatment_type: Annotated[List[PriorTreatmentType], BeforeValidator(Base.split_list)]
29
29
 
30
30
  # Description of the prior treatment such as its full generic name if it is a type of therapy agent,
31
31
  # radiotherapy procedure name and location, or surgical procedure name and location.
32
- description: str | None = None
32
+ prior_treatment_description: str | None = None
33
33
 
34
34
  # Best response from any response assessment system to the prior treatment if available or applicable.
35
- best_response: str | None = None
35
+ prior_treatment_best_response: str | None = None
36
36
 
37
37
  # If the prior treatment is "Conditioning therapy" received before a stem cell transplant, specifies what
38
38
  # type of conditioning regimen used.
39
- conditioning_regimen_type: ConditioningRegimenType | None = None
39
+ prior_treatment_conditioning_regimen_type: ConditioningRegimenType | None = None
40
40
 
41
41
  # If prior treatment is "Stem cell transplant", indicates what stem cell donor type used.
42
- stem_cell_donor_type: StemCellDonorType | None = None
42
+ prior_treatment_stem_cell_donor_type: StemCellDonorType | None = None
43
43
 
44
44
  # If prior treatment is "Stem cell transplant", indicates the number of days from the transplant
45
45
  # date to the start of the current treatment.
46
- days_from_transplant_to_treatment_initiation: NonNegativeInt | None = None
46
+ prior_treatment_days_to_prior_transplant: NegativeInt | None = None
47
47
 
48
48
  @model_validator(mode="after")
49
49
  def validate_description_cr(self) -> Self:
50
- if self.type == "Other therapy" and not self.description:
50
+ if "Other therapy" in self.prior_treatment_type and not self.prior_treatment_description:
51
51
  raise ValueError('If type is "Other therapy", please provide description.')
52
52
  return self
@@ -22,7 +22,7 @@ class Response(Base):
22
22
  survival_status: SurvivalStatus
23
23
 
24
24
  # Number of days from enrollment date to death date.
25
- overall_survival: NonNegativeInt | None = None
25
+ overall_survival: NonNegativeInt
26
26
 
27
27
  # Indicator for whether there was an abscopal effect on disease after local therapy.
28
28
  abscopal_response: YNUNA | None = None
@@ -43,14 +43,8 @@ class Response(Base):
43
43
  # Indicates whether participant was evaluable for efficacy (for example, response, PFS, OS, etc.) overall.
44
44
  evaluable_for_efficacy: bool
45
45
 
46
- # Days from enrollment date to the last time patient had follow-up.
47
- days_to_last_follow_up: NonNegativeInt | None = None
48
-
49
- @model_validator(mode="after")
50
- def validate_overall_survival_cr(self) -> Self:
51
- if self.survival_status != "Unknown" and not self.overall_survival:
52
- raise ValueError('If survival_status is not "Unknown" then overall_survival is required.')
53
- return self
46
+ # Days from enrollment date to the last time the patient's vital status was verified.
47
+ days_to_last_vital_status: NonNegativeInt | None = None
54
48
 
55
49
  @model_validator(mode="after")
56
50
  def validate_cause_of_death_cr(self) -> Self:
@@ -1,6 +1,6 @@
1
1
  from typing import Self
2
2
 
3
- from pydantic import PositiveInt, model_validator
3
+ from pydantic import PositiveInt, model_validator, NonNegativeInt
4
4
 
5
5
  from .base import Base
6
6
  from cidc_api.models.types import ResponseSystem, ResponseSystemVersion, BestOverallResponse, YNUNA
@@ -41,6 +41,9 @@ class ResponseBySystem(Base):
41
41
  # Days from first response to progression.
42
42
  response_duration: PositiveInt | None = None
43
43
 
44
+ # The number of days from the start of the treatment to the first signs of disease progression.
45
+ duration_of_stable_disease: NonNegativeInt | None = None
46
+
44
47
  # Indicates whether a patient achieved a durable clinical benefit.
45
48
  durable_clinical_benefit: bool | None = None
46
49
 
@@ -1,8 +1,9 @@
1
1
  from datetime import datetime
2
- from typing import List
2
+ from pydantic import BeforeValidator
3
+ from typing import List, Annotated
3
4
 
4
5
  from .base import Base
5
- from cidc_api.models.types import TrialOrganization, TrialFundingAgency, AssayType
6
+ from cidc_api.models.types import TrialOrganization, TrialFundingAgency, AssayType, AgeGroup
6
7
 
7
8
 
8
9
  class Trial(Base):
@@ -16,6 +17,15 @@ class Trial(Base):
16
17
  # The version number of the trial dataset. e.g. "1.0"
17
18
  version: str | None = None
18
19
 
20
+ # A broad textual description of the primary endpoint(s) of the trial.
21
+ primary_endpoint: str | None = None
22
+
23
+ # The identifiable class of the study participant based upon their age.
24
+ age_group: Annotated[List[AgeGroup], BeforeValidator(Base.split_list)]
25
+
26
+ # Clinical and/or molecular characteristics of the cancer(s) in the study population.
27
+ study_population: str | None = None
28
+
19
29
  # ClinicalTrials.gov identifier. e.g. "NCT03731260"
20
30
  # TODO need cde from janice, they will make one
21
31
  nct_id: str | None = None
@@ -20,6 +20,12 @@ from cidc_api.reference.gvhd import is_gvhd_organ
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
 
22
22
 
23
+ AgeGroup = Literal[
24
+ "Adolescent and Young Adult",
25
+ "Adult",
26
+ "Pediatric",
27
+ ]
28
+
23
29
  TrialOrganization = Literal[
24
30
  "ECOG-ACRIN",
25
31
  "SWOG",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.2.30
3
+ Version: 1.2.32
4
4
  Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-api-gae
6
6
  License: MIT license
@@ -13,3 +13,6 @@ line-length = 120
13
13
  minversion = "6.0"
14
14
  # configure a webdriver for testing Dash dashboards
15
15
  # addopts = "--webdriver Chrome --headless"
16
+ filterwarnings = [
17
+ "ignore::DeprecationWarning:dash.*:"
18
+ ]