nci-cidc-api-modules 1.2.38__py3-none-any.whl → 1.2.40__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cidc_api/__init__.py +1 -1
- cidc_api/config/db.py +21 -1
- cidc_api/models/__init__.py +0 -2
- cidc_api/models/db/stage1/__init__.py +56 -0
- cidc_api/models/db/stage1/additional_treatment_orm.py +23 -0
- cidc_api/models/db/stage1/adverse_event_orm.py +47 -0
- cidc_api/models/db/stage1/base_orm.py +7 -0
- cidc_api/models/db/stage1/baseline_clinical_assessment_orm.py +23 -0
- cidc_api/models/db/stage1/comorbidity_orm.py +24 -0
- cidc_api/models/db/stage1/consent_group_orm.py +33 -0
- cidc_api/models/db/stage1/demographic_orm.py +48 -0
- cidc_api/models/db/stage1/disease_orm.py +53 -0
- cidc_api/models/db/stage1/exposure_orm.py +23 -0
- cidc_api/models/db/stage1/gvhd_diagnosis_acute_orm.py +35 -0
- cidc_api/models/db/stage1/gvhd_diagnosis_chronic_orm.py +37 -0
- cidc_api/models/db/stage1/gvhd_organ_acute_orm.py +22 -0
- cidc_api/models/db/stage1/gvhd_organ_chronic_orm.py +22 -0
- cidc_api/models/db/stage1/medical_history_orm.py +31 -0
- cidc_api/models/db/stage1/other_malignancy_orm.py +30 -0
- cidc_api/models/db/stage1/participant_orm.py +78 -0
- cidc_api/models/db/stage1/prior_treatment_orm.py +31 -0
- cidc_api/models/db/stage1/radiotherapy_dose_orm.py +40 -0
- cidc_api/models/db/stage1/response_by_system_orm.py +31 -0
- cidc_api/models/db/stage1/response_orm.py +29 -0
- cidc_api/models/db/stage1/specimen_orm.py +46 -0
- cidc_api/models/db/stage1/stem_cell_transplant_orm.py +26 -0
- cidc_api/models/db/stage1/surgery_orm.py +28 -0
- cidc_api/models/db/stage1/therapy_agent_dose_orm.py +32 -0
- cidc_api/models/db/stage1/treatment_orm.py +39 -0
- cidc_api/models/db/stage1/trial_orm.py +36 -0
- cidc_api/models/db/stage2/additional_treatment_orm.py +5 -5
- cidc_api/models/db/stage2/administrative_person_orm.py +4 -3
- cidc_api/models/db/stage2/administrative_role_assignment_orm.py +4 -3
- cidc_api/models/db/stage2/adverse_event_orm.py +11 -12
- cidc_api/models/db/stage2/arm_orm.py +3 -2
- cidc_api/models/db/stage2/base_orm.py +7 -0
- cidc_api/models/db/stage2/baseline_clinical_assessment_orm.py +5 -6
- cidc_api/models/db/stage2/cohort_orm.py +3 -2
- cidc_api/models/db/stage2/comorbidity_orm.py +6 -7
- cidc_api/models/db/stage2/consent_group_orm.py +4 -3
- cidc_api/models/db/stage2/contact_orm.py +16 -19
- cidc_api/models/db/stage2/demographic_orm.py +3 -2
- cidc_api/models/db/stage2/disease_orm.py +4 -3
- cidc_api/models/db/stage2/exposure_orm.py +3 -2
- cidc_api/models/db/stage2/file_orm.py +6 -8
- cidc_api/models/db/stage2/gvhd_diagnosis_acute_orm.py +4 -3
- cidc_api/models/db/stage2/gvhd_diagnosis_chronic_orm.py +4 -5
- cidc_api/models/db/stage2/gvhd_organ_acute_orm.py +3 -2
- cidc_api/models/db/stage2/gvhd_organ_chronic_orm.py +3 -2
- cidc_api/models/db/stage2/institution_orm.py +7 -6
- cidc_api/models/db/stage2/medical_history_orm.py +9 -8
- cidc_api/models/db/stage2/other_clinical_endpoint_orm.py +8 -11
- cidc_api/models/db/stage2/other_malignancy_orm.py +8 -9
- cidc_api/models/db/stage2/participant_orm.py +23 -23
- cidc_api/models/db/stage2/prior_treatment_orm.py +11 -10
- cidc_api/models/db/stage2/publication_orm.py +8 -9
- cidc_api/models/db/stage2/radiotherapy_dose_orm.py +8 -8
- cidc_api/models/db/stage2/response_by_system_orm.py +3 -2
- cidc_api/models/db/stage2/response_orm.py +3 -2
- cidc_api/models/db/stage2/shipment_orm.py +17 -16
- cidc_api/models/db/stage2/shipment_specimen_orm.py +4 -3
- cidc_api/models/db/stage2/specimen_orm.py +7 -5
- cidc_api/models/db/stage2/stem_cell_transplant_orm.py +5 -5
- cidc_api/models/db/stage2/surgery_orm.py +6 -6
- cidc_api/models/db/stage2/therapy_agent_dose_orm.py +7 -7
- cidc_api/models/db/stage2/treatment_orm.py +15 -14
- cidc_api/models/db/stage2/trial_orm.py +15 -16
- cidc_api/models/models.py +4 -0
- cidc_api/models/pydantic/{stage2/base.py → base.py} +1 -1
- cidc_api/models/pydantic/stage1/__init__.py +56 -0
- cidc_api/models/pydantic/stage1/additional_treatment.py +23 -0
- cidc_api/models/pydantic/stage1/adverse_event.py +100 -0
- cidc_api/models/pydantic/stage1/baseline_clinical_assessment.py +23 -0
- cidc_api/models/pydantic/stage1/comorbidity.py +36 -0
- cidc_api/models/pydantic/stage1/consent_group.py +30 -0
- cidc_api/models/pydantic/stage1/demographic.py +123 -0
- cidc_api/models/pydantic/stage1/disease.py +158 -0
- cidc_api/models/pydantic/stage1/exposure.py +32 -0
- cidc_api/models/pydantic/stage1/gvhd_diagnosis_acute.py +33 -0
- cidc_api/models/pydantic/stage1/gvhd_diagnosis_chronic.py +32 -0
- cidc_api/models/pydantic/stage1/gvhd_organ_acute.py +22 -0
- cidc_api/models/pydantic/stage1/gvhd_organ_chronic.py +23 -0
- cidc_api/models/pydantic/stage1/medical_history.py +36 -0
- cidc_api/models/pydantic/stage1/other_malignancy.py +49 -0
- cidc_api/models/pydantic/stage1/participant.py +51 -0
- cidc_api/models/pydantic/stage1/prior_treatment.py +52 -0
- cidc_api/models/pydantic/stage1/radiotherapy_dose.py +79 -0
- cidc_api/models/pydantic/stage1/response.py +65 -0
- cidc_api/models/pydantic/stage1/response_by_system.py +112 -0
- cidc_api/models/pydantic/stage1/specimen.py +52 -0
- cidc_api/models/pydantic/stage1/stem_cell_transplant.py +35 -0
- cidc_api/models/pydantic/stage1/surgery.py +49 -0
- cidc_api/models/pydantic/stage1/therapy_agent_dose.py +67 -0
- cidc_api/models/pydantic/stage1/treatment.py +50 -0
- cidc_api/models/pydantic/stage1/trial.py +45 -0
- cidc_api/models/pydantic/stage2/additional_treatment.py +2 -4
- cidc_api/models/pydantic/stage2/administrative_person.py +1 -1
- cidc_api/models/pydantic/stage2/administrative_role_assignment.py +2 -2
- cidc_api/models/pydantic/stage2/adverse_event.py +1 -1
- cidc_api/models/pydantic/stage2/arm.py +2 -2
- cidc_api/models/pydantic/stage2/baseline_clinical_assessment.py +1 -1
- cidc_api/models/pydantic/stage2/cohort.py +1 -1
- cidc_api/models/pydantic/stage2/comorbidity.py +1 -1
- cidc_api/models/pydantic/stage2/consent_group.py +2 -2
- cidc_api/models/pydantic/stage2/contact.py +1 -1
- cidc_api/models/pydantic/stage2/demographic.py +1 -1
- cidc_api/models/pydantic/stage2/disease.py +1 -1
- cidc_api/models/pydantic/stage2/exposure.py +1 -1
- cidc_api/models/pydantic/stage2/file.py +2 -2
- cidc_api/models/pydantic/stage2/gvhd_diagnosis_acute.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_diagnosis_chronic.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_organ_acute.py +1 -1
- cidc_api/models/pydantic/stage2/gvhd_organ_chronic.py +1 -1
- cidc_api/models/pydantic/stage2/institution.py +1 -1
- cidc_api/models/pydantic/stage2/medical_history.py +1 -1
- cidc_api/models/pydantic/stage2/other_clinical_endpoint.py +1 -1
- cidc_api/models/pydantic/stage2/other_malignancy.py +1 -1
- cidc_api/models/pydantic/stage2/participant.py +6 -3
- cidc_api/models/pydantic/stage2/prior_treatment.py +4 -4
- cidc_api/models/pydantic/stage2/publication.py +2 -2
- cidc_api/models/pydantic/stage2/radiotherapy_dose.py +1 -1
- cidc_api/models/pydantic/stage2/response.py +2 -2
- cidc_api/models/pydantic/stage2/response_by_system.py +1 -1
- cidc_api/models/pydantic/stage2/shipment.py +2 -2
- cidc_api/models/pydantic/stage2/shipment_specimen.py +1 -1
- cidc_api/models/pydantic/stage2/specimen.py +6 -3
- cidc_api/models/pydantic/stage2/stem_cell_transplant.py +2 -2
- cidc_api/models/pydantic/stage2/surgery.py +1 -1
- cidc_api/models/pydantic/stage2/therapy_agent_dose.py +1 -1
- cidc_api/models/pydantic/stage2/treatment.py +1 -1
- cidc_api/models/pydantic/stage2/trial.py +8 -10
- cidc_api/models/types.py +29 -1
- cidc_api/shared/gcloud_client.py +2 -2
- cidc_api/shared/utils.py +1 -0
- {nci_cidc_api_modules-1.2.38.dist-info → nci_cidc_api_modules-1.2.40.dist-info}/METADATA +14 -14
- nci_cidc_api_modules-1.2.40.dist-info/RECORD +165 -0
- cidc_api/models/db/base_orm.py +0 -25
- nci_cidc_api_modules-1.2.38.dist-info/RECORD +0 -112
- {nci_cidc_api_modules-1.2.38.dist-info → nci_cidc_api_modules-1.2.40.dist-info}/WHEEL +0 -0
- {nci_cidc_api_modules-1.2.38.dist-info → nci_cidc_api_modules-1.2.40.dist-info}/licenses/LICENSE +0 -0
- {nci_cidc_api_modules-1.2.38.dist-info → nci_cidc_api_modules-1.2.40.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
3
2
|
from sqlalchemy import ForeignKey
|
|
4
3
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
4
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
5
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class ContactORM(BaseORM):
|
|
@@ -12,21 +11,19 @@ class ContactORM(BaseORM):
|
|
|
12
11
|
|
|
13
12
|
contact_id: Mapped[int] = mapped_column(primary_key=True)
|
|
14
13
|
institution_id: Mapped[int] = mapped_column(ForeignKey("stage2.institution.institution_id", ondelete="CASCADE"))
|
|
15
|
-
shipment_from_id: Mapped[
|
|
16
|
-
|
|
17
|
-
)
|
|
18
|
-
shipment_to_id: Mapped[Optional[int]] = mapped_column(ForeignKey("stage2.shipment.shipment_id", ondelete="CASCADE"))
|
|
14
|
+
shipment_from_id: Mapped[int | None] = mapped_column(ForeignKey("stage2.shipment.shipment_id", ondelete="CASCADE"))
|
|
15
|
+
shipment_to_id: Mapped[int | None] = mapped_column(ForeignKey("stage2.shipment.shipment_id", ondelete="CASCADE"))
|
|
19
16
|
|
|
20
|
-
name: Mapped[
|
|
21
|
-
email: Mapped[
|
|
22
|
-
phone: Mapped[
|
|
23
|
-
street1: Mapped[
|
|
24
|
-
street2: Mapped[
|
|
25
|
-
city: Mapped[
|
|
26
|
-
state: Mapped[
|
|
27
|
-
zip: Mapped[
|
|
28
|
-
country: Mapped[
|
|
17
|
+
name: Mapped[str | None]
|
|
18
|
+
email: Mapped[str | None]
|
|
19
|
+
phone: Mapped[str | None]
|
|
20
|
+
street1: Mapped[str | None]
|
|
21
|
+
street2: Mapped[str | None]
|
|
22
|
+
city: Mapped[str | None]
|
|
23
|
+
state: Mapped[str | None]
|
|
24
|
+
zip: Mapped[str | None]
|
|
25
|
+
country: Mapped[str | None]
|
|
29
26
|
|
|
30
|
-
institution: Mapped[
|
|
31
|
-
shipment_from: Mapped[
|
|
32
|
-
shipment_to: Mapped[
|
|
27
|
+
institution: Mapped[InstitutionORM | None] = relationship(back_populates="contacts", cascade="all, delete")
|
|
28
|
+
shipment_from: Mapped[ShipmentORM] = relationship(cascade="all, delete", foreign_keys=[shipment_from_id])
|
|
29
|
+
shipment_to: Mapped[ShipmentORM] = relationship(cascade="all, delete", foreign_keys=[shipment_to_id])
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from pydantic import NonNegativeFloat, PositiveFloat, PositiveInt
|
|
2
3
|
from typing import List
|
|
3
4
|
|
|
@@ -5,7 +6,7 @@ from sqlalchemy import ForeignKey
|
|
|
5
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
7
|
from sqlalchemy.types import JSON
|
|
7
8
|
|
|
8
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
9
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
9
10
|
from cidc_api.models.types import (
|
|
10
11
|
Sex,
|
|
11
12
|
Race,
|
|
@@ -44,4 +45,4 @@ class DemographicORM(BaseORM):
|
|
|
44
45
|
income: Mapped[NonNegativeFloat | None]
|
|
45
46
|
highest_level_of_education: Mapped[Education | None]
|
|
46
47
|
|
|
47
|
-
participant: Mapped[
|
|
48
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="demographic", cascade="all, delete")
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import List
|
|
2
3
|
|
|
3
4
|
from pydantic import NonPositiveInt
|
|
4
5
|
from sqlalchemy import ForeignKey
|
|
5
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
7
|
from sqlalchemy.types import JSON
|
|
7
8
|
|
|
8
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
9
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
9
10
|
from cidc_api.models.types import (
|
|
10
11
|
TumorGrade,
|
|
11
12
|
CancerStageSystem,
|
|
@@ -49,4 +50,4 @@ class DiseaseORM(BaseORM):
|
|
|
49
50
|
solely_extramedullary_disease: Mapped[YNU]
|
|
50
51
|
extramedullary_organ: Mapped[List[UberonAnatomicalTerm]] = mapped_column(JSON, nullable=True)
|
|
51
52
|
|
|
52
|
-
participant: Mapped[
|
|
53
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="diseases", cascade="all, delete")
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import ForeignKey
|
|
4
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
6
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
8
|
from cidc_api.models.types import YNU, ExposureType
|
|
8
9
|
|
|
9
10
|
|
|
@@ -19,4 +20,4 @@ class ExposureORM(BaseORM):
|
|
|
19
20
|
carcinogen_exposure: Mapped[YNU]
|
|
20
21
|
exposure_type: Mapped[ExposureType | None]
|
|
21
22
|
|
|
22
|
-
participant: Mapped[
|
|
23
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="exposures", cascade="all, delete")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from datetime import datetime
|
|
2
|
-
from typing import Optional
|
|
3
3
|
|
|
4
4
|
from sqlalchemy import ForeignKeyConstraint, ForeignKey
|
|
5
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
6
|
|
|
7
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
8
8
|
from cidc_api.models.types import ChecksumType, FileFormat
|
|
9
9
|
|
|
10
10
|
|
|
@@ -21,10 +21,8 @@ class FileORM(BaseORM):
|
|
|
21
21
|
trial_id: Mapped[str]
|
|
22
22
|
version: Mapped[str]
|
|
23
23
|
|
|
24
|
-
creator_id: Mapped[
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
description: Mapped[Optional[str]]
|
|
24
|
+
creator_id: Mapped[int | None] = mapped_column(ForeignKey("stage2.institution.institution_id", ondelete="CASCADE"))
|
|
25
|
+
description: Mapped[str | None]
|
|
28
26
|
uuid: Mapped[str]
|
|
29
27
|
file_name: Mapped[str]
|
|
30
28
|
object_url: Mapped[str]
|
|
@@ -34,5 +32,5 @@ class FileORM(BaseORM):
|
|
|
34
32
|
checksum_type: Mapped[ChecksumType]
|
|
35
33
|
file_format: Mapped[FileFormat]
|
|
36
34
|
|
|
37
|
-
trial: Mapped[
|
|
38
|
-
creator: Mapped[
|
|
35
|
+
trial: Mapped[TrialORM] = relationship(back_populates="files", cascade="all, delete")
|
|
36
|
+
creator: Mapped[InstitutionORM | None] = relationship(back_populates="files", cascade="all, delete")
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import ForeignKey, UniqueConstraint
|
|
4
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
6
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
8
|
from cidc_api.models.types import (
|
|
8
9
|
GVHDDiagnosisAcuteAssessmentSystem,
|
|
9
10
|
GVHDDiagnosisAcuteAssessmentSystemVersion,
|
|
@@ -28,7 +29,7 @@ class GVHDDiagnosisAcuteORM(BaseORM):
|
|
|
28
29
|
acute_grade: Mapped[GVHDDiagnosisAcuteGrade]
|
|
29
30
|
pre_or_post_enrollment: Mapped[PreOrPostEnrollment]
|
|
30
31
|
|
|
31
|
-
participant: Mapped[
|
|
32
|
-
organs: Mapped[List[
|
|
32
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="gvhd_diagnosis_acutes", cascade="all, delete")
|
|
33
|
+
organs: Mapped[List[GVHDOrganAcuteORM]] = relationship(
|
|
33
34
|
back_populates="diagnosis", cascade="all, delete", passive_deletes=True
|
|
34
35
|
)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import ForeignKey, UniqueConstraint
|
|
4
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
6
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
8
|
from cidc_api.models.types import (
|
|
8
9
|
GVHDDiagnosisChronicAssessmentSystem,
|
|
9
10
|
GVHDDiagnosisChronicAssessmentSystemVersion,
|
|
@@ -30,9 +31,7 @@ class GVHDDiagnosisChronicORM(BaseORM):
|
|
|
30
31
|
chronic_global_severity: Mapped[GVHDDiagnosisChronicGlobalSeverity]
|
|
31
32
|
pre_or_post_enrollment: Mapped[PreOrPostEnrollment]
|
|
32
33
|
|
|
33
|
-
participant: Mapped[
|
|
34
|
-
|
|
35
|
-
)
|
|
36
|
-
organs: Mapped[List["GVHDOrganChronicORM"]] = relationship(
|
|
34
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="gvhd_diagnosis_chronics", cascade="all, delete")
|
|
35
|
+
organs: Mapped[List[GVHDOrganChronicORM]] = relationship(
|
|
37
36
|
back_populates="diagnosis", cascade="all, delete", passive_deletes=True
|
|
38
37
|
)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from sqlalchemy import ForeignKey
|
|
2
3
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
3
4
|
|
|
4
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
5
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
5
6
|
from cidc_api.models.types import GVHDOrgan, GVHDOrganAcuteStage
|
|
6
7
|
|
|
7
8
|
|
|
@@ -18,4 +19,4 @@ class GVHDOrganAcuteORM(BaseORM):
|
|
|
18
19
|
organ: Mapped[GVHDOrgan]
|
|
19
20
|
acute_stage: Mapped[GVHDOrganAcuteStage]
|
|
20
21
|
|
|
21
|
-
diagnosis: Mapped[
|
|
22
|
+
diagnosis: Mapped[GVHDDiagnosisAcuteORM] = relationship(back_populates="organs", cascade="all, delete")
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from sqlalchemy import ForeignKey
|
|
2
3
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
3
4
|
|
|
4
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
5
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
5
6
|
from cidc_api.models.types import GVHDOrgan, GVHDOrganChronicScore
|
|
6
7
|
|
|
7
8
|
|
|
@@ -18,4 +19,4 @@ class GVHDOrganChronicORM(BaseORM):
|
|
|
18
19
|
organ: Mapped[GVHDOrgan]
|
|
19
20
|
chronic_score: Mapped[GVHDOrganChronicScore]
|
|
20
21
|
|
|
21
|
-
diagnosis: Mapped[
|
|
22
|
+
diagnosis: Mapped[GVHDDiagnosisChronicORM] = relationship(back_populates="organs", cascade="all, delete")
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import ForeignKeyConstraint
|
|
4
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
6
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class InstitutionORM(BaseORM):
|
|
@@ -22,12 +23,12 @@ class InstitutionORM(BaseORM):
|
|
|
22
23
|
|
|
23
24
|
name: Mapped[str]
|
|
24
25
|
|
|
25
|
-
trial: Mapped[
|
|
26
|
-
administrative_people: Mapped[List[
|
|
26
|
+
trial: Mapped[TrialORM] = relationship(back_populates="biobank", cascade="all, delete")
|
|
27
|
+
administrative_people: Mapped[List[AdministrativePersonORM]] = relationship(
|
|
27
28
|
back_populates="institution", cascade="all, delete", passive_deletes=True
|
|
28
29
|
)
|
|
29
|
-
shipments: Mapped[List[
|
|
30
|
+
shipments: Mapped[List[ShipmentORM]] = relationship(
|
|
30
31
|
back_populates="institution", cascade="all, delete", passive_deletes=True
|
|
31
32
|
)
|
|
32
|
-
files: Mapped[List[
|
|
33
|
-
contacts: Mapped[List[
|
|
33
|
+
files: Mapped[List[FileORM]] = relationship(back_populates="creator", cascade="all, delete", passive_deletes=True)
|
|
34
|
+
contacts: Mapped[List[ContactORM]] = relationship(back_populates="institution")
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import List
|
|
2
3
|
|
|
3
4
|
from pydantic import NonNegativeInt, PositiveFloat
|
|
4
5
|
from sqlalchemy import ForeignKey
|
|
5
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
7
|
|
|
7
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
8
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
8
9
|
from cidc_api.models.types import TobaccoSmokingStatus
|
|
9
10
|
|
|
10
11
|
|
|
@@ -17,14 +18,14 @@ class MedicalHistoryORM(BaseORM):
|
|
|
17
18
|
medical_history_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
|
-
tobacco_smoking_status: Mapped[
|
|
21
|
-
pack_years_smoked: Mapped[
|
|
22
|
-
num_prior_systemic_therapies: Mapped[
|
|
21
|
+
tobacco_smoking_status: Mapped[TobaccoSmokingStatus | None]
|
|
22
|
+
pack_years_smoked: Mapped[PositiveFloat | None]
|
|
23
|
+
num_prior_systemic_therapies: Mapped[NonNegativeInt | None]
|
|
23
24
|
|
|
24
|
-
participant: Mapped[
|
|
25
|
-
other_malignancies: Mapped[List[
|
|
25
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="medical_history", cascade="all, delete")
|
|
26
|
+
other_malignancies: Mapped[List[OtherMalignancyORM]] = relationship(
|
|
26
27
|
back_populates="medical_history", cascade="all, delete", passive_deletes=True
|
|
27
28
|
)
|
|
28
|
-
comorbidities: Mapped[List[
|
|
29
|
+
comorbidities: Mapped[List[ComorbidityORM]] = relationship(
|
|
29
30
|
back_populates="medical_history", cascade="all, delete", passive_deletes=True
|
|
30
31
|
)
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
3
2
|
from sqlalchemy import ForeignKey, String
|
|
4
3
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
4
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
5
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
6
|
from cidc_api.models.types import YNU, ResponseSystem, ResponseSystemVersion
|
|
8
7
|
|
|
9
8
|
|
|
@@ -17,12 +16,10 @@ class OtherClinicalEndpointORM(BaseORM):
|
|
|
17
16
|
|
|
18
17
|
name: Mapped[str]
|
|
19
18
|
event: Mapped[YNU]
|
|
20
|
-
days: Mapped[
|
|
21
|
-
description: Mapped[
|
|
22
|
-
calculation: Mapped[
|
|
23
|
-
response_system: Mapped[
|
|
24
|
-
response_system_version: Mapped[
|
|
19
|
+
days: Mapped[int | None]
|
|
20
|
+
description: Mapped[str | None]
|
|
21
|
+
calculation: Mapped[str | None]
|
|
22
|
+
response_system: Mapped[ResponseSystem | None] = mapped_column(String, nullable=True)
|
|
23
|
+
response_system_version: Mapped[ResponseSystemVersion | None] = mapped_column(String, nullable=True)
|
|
25
24
|
|
|
26
|
-
participant: Mapped[
|
|
27
|
-
back_populates="other_clinical_endpoints", cascade="all, delete"
|
|
28
|
-
)
|
|
25
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="other_clinical_endpoints", cascade="all, delete")
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
3
2
|
from pydantic import NonPositiveInt
|
|
4
3
|
from sqlalchemy import ForeignKey
|
|
5
4
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
5
|
|
|
7
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
6
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
8
7
|
from cidc_api.models.types import UberonAnatomicalTerm, ICDO3MorphologicalCode, ICDO3MorphologicalTerm, MalignancyStatus
|
|
9
8
|
|
|
10
9
|
|
|
@@ -20,12 +19,12 @@ class OtherMalignancyORM(BaseORM):
|
|
|
20
19
|
)
|
|
21
20
|
|
|
22
21
|
other_malignancy_primary_disease_site: Mapped[UberonAnatomicalTerm]
|
|
23
|
-
other_malignancy_morphological_code: Mapped[
|
|
24
|
-
other_malignancy_morphological_term: Mapped[
|
|
25
|
-
other_malignancy_description: Mapped[
|
|
26
|
-
other_malignancy_days_since_diagnosis: Mapped[
|
|
27
|
-
other_malignancy_status: Mapped[
|
|
22
|
+
other_malignancy_morphological_code: Mapped[ICDO3MorphologicalCode | None]
|
|
23
|
+
other_malignancy_morphological_term: Mapped[ICDO3MorphologicalTerm | None]
|
|
24
|
+
other_malignancy_description: Mapped[str | None]
|
|
25
|
+
other_malignancy_days_since_diagnosis: Mapped[NonPositiveInt | None]
|
|
26
|
+
other_malignancy_status: Mapped[MalignancyStatus | None]
|
|
28
27
|
|
|
29
|
-
medical_history: Mapped[
|
|
28
|
+
medical_history: Mapped[MedicalHistoryORM] = relationship(
|
|
30
29
|
back_populates="other_malignancies", cascade="all, delete"
|
|
31
30
|
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import List
|
|
3
3
|
from sqlalchemy import ForeignKey, ForeignKeyConstraint
|
|
4
4
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
5
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
6
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
7
|
from cidc_api.models.types import OffStudyReason, YNU
|
|
8
8
|
|
|
9
9
|
|
|
@@ -24,57 +24,57 @@ class ParticipantORM(BaseORM):
|
|
|
24
24
|
|
|
25
25
|
native_participant_id: Mapped[str | None]
|
|
26
26
|
cimac_participant_id: Mapped[str | None]
|
|
27
|
-
consent_group_id: Mapped[
|
|
27
|
+
consent_group_id: Mapped[int | None] = mapped_column(
|
|
28
28
|
ForeignKey("stage2.consent_group.consent_group_id", ondelete="CASCADE")
|
|
29
29
|
)
|
|
30
30
|
off_study: Mapped[YNU]
|
|
31
|
-
off_study_reason: Mapped[
|
|
32
|
-
off_study_reason_other: Mapped[
|
|
31
|
+
off_study_reason: Mapped[OffStudyReason | None]
|
|
32
|
+
off_study_reason_other: Mapped[str | None]
|
|
33
33
|
|
|
34
|
-
trial: Mapped[
|
|
35
|
-
demographic: Mapped[
|
|
34
|
+
trial: Mapped[TrialORM] = relationship(back_populates="participants", cascade="all, delete")
|
|
35
|
+
demographic: Mapped[DemographicORM] = relationship(
|
|
36
36
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
37
37
|
)
|
|
38
|
-
prior_treatments: Mapped[List[
|
|
38
|
+
prior_treatments: Mapped[List[PriorTreatmentORM]] = relationship(
|
|
39
39
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
40
40
|
)
|
|
41
|
-
treatments: Mapped[List[
|
|
41
|
+
treatments: Mapped[List[TreatmentORM]] = relationship(
|
|
42
42
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
43
43
|
)
|
|
44
|
-
diseases: Mapped[List[
|
|
44
|
+
diseases: Mapped[List[DiseaseORM]] = relationship(
|
|
45
45
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
46
46
|
)
|
|
47
|
-
response_by_systems: Mapped[List[
|
|
47
|
+
response_by_systems: Mapped[List[ResponseBySystemORM]] = relationship(
|
|
48
48
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
49
49
|
)
|
|
50
|
-
response: Mapped[
|
|
50
|
+
response: Mapped[ResponseORM | None] = relationship(
|
|
51
51
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
52
52
|
)
|
|
53
|
-
adverse_events: Mapped[List[
|
|
53
|
+
adverse_events: Mapped[List[AdverseEventORM]] = relationship(
|
|
54
54
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
55
55
|
)
|
|
56
|
-
baseline_clinical_assessment: Mapped[
|
|
56
|
+
baseline_clinical_assessment: Mapped[BaselineClinicalAssessmentORM | None] = relationship(
|
|
57
57
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
58
58
|
)
|
|
59
|
-
medical_history: Mapped[
|
|
59
|
+
medical_history: Mapped[MedicalHistoryORM | None] = relationship(
|
|
60
60
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
61
61
|
)
|
|
62
|
-
exposures: Mapped[List[
|
|
62
|
+
exposures: Mapped[List[ExposureORM]] = relationship(
|
|
63
63
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
64
64
|
)
|
|
65
|
-
gvhd_diagnosis_acutes: Mapped[List[
|
|
65
|
+
gvhd_diagnosis_acutes: Mapped[List[GVHDDiagnosisAcuteORM]] = relationship(
|
|
66
66
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
67
67
|
)
|
|
68
|
-
gvhd_diagnosis_chronics: Mapped[List[
|
|
68
|
+
gvhd_diagnosis_chronics: Mapped[List[GVHDDiagnosisChronicORM]] = relationship(
|
|
69
69
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
70
70
|
)
|
|
71
|
-
specimens: Mapped[List[
|
|
71
|
+
specimens: Mapped[List[SpecimenORM]] = relationship(
|
|
72
72
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
73
73
|
)
|
|
74
|
-
other_clinical_endpoints: Mapped[List[
|
|
74
|
+
other_clinical_endpoints: Mapped[List[OtherClinicalEndpointORM]] = relationship(
|
|
75
75
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
76
76
|
)
|
|
77
|
-
additional_treatments: Mapped[List[
|
|
77
|
+
additional_treatments: Mapped[List[AdditionalTreatmentORM]] = relationship(
|
|
78
78
|
back_populates="participant", cascade="all, delete", passive_deletes=True
|
|
79
79
|
)
|
|
80
|
-
consent_group: Mapped[
|
|
80
|
+
consent_group: Mapped[ConsentGroupORM] = relationship(back_populates="participants", cascade="all, delete")
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import List
|
|
2
3
|
|
|
3
4
|
from pydantic import NonPositiveInt, NegativeInt
|
|
4
5
|
from sqlalchemy import ForeignKey
|
|
5
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
7
|
from sqlalchemy.types import JSON
|
|
7
8
|
|
|
8
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
9
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
9
10
|
from cidc_api.models.types import PriorTreatmentType, ConditioningRegimenType, StemCellDonorType
|
|
10
11
|
|
|
11
12
|
|
|
@@ -18,13 +19,13 @@ class PriorTreatmentORM(BaseORM):
|
|
|
18
19
|
prior_treatment_id: Mapped[int] = mapped_column(primary_key=True)
|
|
19
20
|
participant_id: Mapped[int] = mapped_column(ForeignKey("stage2.participant.participant_id", ondelete="CASCADE"))
|
|
20
21
|
|
|
21
|
-
prior_treatment_days_to_start: Mapped[
|
|
22
|
-
prior_treatment_days_to_end: Mapped[
|
|
22
|
+
prior_treatment_days_to_start: Mapped[NonPositiveInt | None]
|
|
23
|
+
prior_treatment_days_to_end: Mapped[NonPositiveInt | None]
|
|
23
24
|
prior_treatment_type: Mapped[List[PriorTreatmentType]] = mapped_column(JSON, nullable=False)
|
|
24
|
-
prior_treatment_description: Mapped[
|
|
25
|
-
prior_treatment_best_response: Mapped[
|
|
26
|
-
prior_treatment_conditioning_regimen_type: Mapped[
|
|
27
|
-
prior_treatment_stem_cell_donor_type: Mapped[
|
|
28
|
-
prior_treatment_days_to_prior_transplant: Mapped[
|
|
25
|
+
prior_treatment_description: Mapped[str | None]
|
|
26
|
+
prior_treatment_best_response: Mapped[str | None]
|
|
27
|
+
prior_treatment_conditioning_regimen_type: Mapped[ConditioningRegimenType | None]
|
|
28
|
+
prior_treatment_stem_cell_donor_type: Mapped[StemCellDonorType | None]
|
|
29
|
+
prior_treatment_days_to_prior_transplant: Mapped[NegativeInt | None]
|
|
29
30
|
|
|
30
|
-
participant: Mapped[
|
|
31
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="prior_treatments", cascade="all, delete")
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
3
2
|
from sqlalchemy import ForeignKeyConstraint, ForeignKey
|
|
4
3
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
4
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
5
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
6
|
from cidc_api.models.types import PriorTreatmentType, ConditioningRegimenType, StemCellDonorType
|
|
8
7
|
|
|
9
8
|
|
|
@@ -22,10 +21,10 @@ class PublicationORM(BaseORM):
|
|
|
22
21
|
version: Mapped[str]
|
|
23
22
|
|
|
24
23
|
digital_object_id: Mapped[str]
|
|
25
|
-
pubmed_id: Mapped[
|
|
26
|
-
publication_title: Mapped[
|
|
27
|
-
authorship: Mapped[
|
|
28
|
-
year_of_publication: Mapped[
|
|
29
|
-
journal_citation: Mapped[
|
|
24
|
+
pubmed_id: Mapped[str | None]
|
|
25
|
+
publication_title: Mapped[str | None]
|
|
26
|
+
authorship: Mapped[str | None]
|
|
27
|
+
year_of_publication: Mapped[str | None]
|
|
28
|
+
journal_citation: Mapped[str | None]
|
|
30
29
|
|
|
31
|
-
trial: Mapped[
|
|
30
|
+
trial: Mapped[TrialORM] = relationship(back_populates="publications", cascade="all, delete")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from pydantic import NonNegativeInt, NonNegativeFloat, PositiveFloat
|
|
2
|
-
from typing import Optional
|
|
3
3
|
|
|
4
4
|
from sqlalchemy import ForeignKey
|
|
5
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
6
|
|
|
7
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
8
8
|
from cidc_api.models.types import (
|
|
9
9
|
RadiotherapyProcedure,
|
|
10
10
|
UberonAnatomicalTerm,
|
|
@@ -26,15 +26,15 @@ class RadiotherapyDoseORM(BaseORM):
|
|
|
26
26
|
days_to_start: Mapped[NonNegativeInt]
|
|
27
27
|
days_to_end: Mapped[NonNegativeInt]
|
|
28
28
|
procedure: Mapped[RadiotherapyProcedure]
|
|
29
|
-
anatomical_location: Mapped[
|
|
29
|
+
anatomical_location: Mapped[UberonAnatomicalTerm | None]
|
|
30
30
|
is_total_dose: Mapped[bool]
|
|
31
|
-
number_of_fractions: Mapped[
|
|
31
|
+
number_of_fractions: Mapped[NonNegativeInt | None]
|
|
32
32
|
received_dose: Mapped[NonNegativeFloat]
|
|
33
33
|
received_dose_units: Mapped[RadiotherapyDoseUnits]
|
|
34
|
-
planned_dose: Mapped[
|
|
35
|
-
planned_dose_units: Mapped[
|
|
34
|
+
planned_dose: Mapped[PositiveFloat | None]
|
|
35
|
+
planned_dose_units: Mapped[RadiotherapyDoseUnits | None]
|
|
36
36
|
dose_changes_delays: Mapped[YNU]
|
|
37
|
-
changes_delays_description: Mapped[
|
|
37
|
+
changes_delays_description: Mapped[str | None]
|
|
38
38
|
radiation_extent: Mapped[RadiationExtent]
|
|
39
39
|
|
|
40
|
-
treatment: Mapped[
|
|
40
|
+
treatment: Mapped[TreatmentORM] = relationship(back_populates="radiotherapy_doses", cascade="all, delete")
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from pydantic import PositiveInt
|
|
2
3
|
from sqlalchemy import ForeignKey, String
|
|
3
4
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
4
5
|
|
|
5
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
6
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
6
7
|
from cidc_api.models.types import ResponseSystem, ResponseSystemVersion, BestOverallResponse, YNUNA
|
|
7
8
|
|
|
8
9
|
|
|
@@ -27,4 +28,4 @@ class ResponseBySystemORM(BaseORM):
|
|
|
27
28
|
progression_free_survival_event: Mapped[YNUNA]
|
|
28
29
|
progression_free_survival: Mapped[PositiveInt | None]
|
|
29
30
|
|
|
30
|
-
participant: Mapped[
|
|
31
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="response_by_systems", cascade="all, delete")
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from pydantic import NonNegativeInt
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import ForeignKey
|
|
4
5
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
5
6
|
|
|
6
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
7
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
7
8
|
from cidc_api.models.types import SurvivalStatus, YNUNA, CauseOfDeath
|
|
8
9
|
|
|
9
10
|
|
|
@@ -25,4 +26,4 @@ class ResponseORM(BaseORM):
|
|
|
25
26
|
evaluable_for_efficacy: Mapped[bool]
|
|
26
27
|
days_to_last_vital_status: Mapped[NonNegativeInt | None]
|
|
27
28
|
|
|
28
|
-
participant: Mapped[
|
|
29
|
+
participant: Mapped[ParticipantORM] = relationship(back_populates="response", cascade="all, delete")
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
from datetime import datetime
|
|
2
|
-
from typing import
|
|
3
|
+
from typing import List
|
|
3
4
|
|
|
4
5
|
from sqlalchemy import ForeignKey, ForeignKeyConstraint
|
|
5
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
7
|
|
|
7
|
-
from cidc_api.models.db.base_orm import BaseORM
|
|
8
|
+
from cidc_api.models.db.stage2.base_orm import BaseORM
|
|
8
9
|
from cidc_api.models.types import AssayPriority, AssayType, Courier, ShipmentCondition, ShipmentQuality
|
|
9
10
|
|
|
10
11
|
|
|
@@ -24,24 +25,24 @@ class ShipmentORM(BaseORM):
|
|
|
24
25
|
version: Mapped[str]
|
|
25
26
|
|
|
26
27
|
manifest_id: Mapped[str]
|
|
27
|
-
assay_priority: Mapped[
|
|
28
|
-
assay_type: Mapped[
|
|
29
|
-
courier: Mapped[
|
|
30
|
-
tracking_number: Mapped[
|
|
31
|
-
condition: Mapped[
|
|
32
|
-
condition_other: Mapped[
|
|
33
|
-
date_shipped: Mapped[
|
|
34
|
-
date_received: Mapped[
|
|
35
|
-
quality: Mapped[
|
|
28
|
+
assay_priority: Mapped[AssayPriority | None]
|
|
29
|
+
assay_type: Mapped[AssayType | None]
|
|
30
|
+
courier: Mapped[Courier | None]
|
|
31
|
+
tracking_number: Mapped[str | None]
|
|
32
|
+
condition: Mapped[ShipmentCondition | None]
|
|
33
|
+
condition_other: Mapped[str | None]
|
|
34
|
+
date_shipped: Mapped[datetime | None]
|
|
35
|
+
date_received: Mapped[datetime | None]
|
|
36
|
+
quality: Mapped[ShipmentQuality | None]
|
|
36
37
|
|
|
37
|
-
trial: Mapped[
|
|
38
|
-
institution: Mapped[
|
|
39
|
-
shipped_from: Mapped[
|
|
38
|
+
trial: Mapped[TrialORM] = relationship(back_populates="shipments", cascade="all, delete")
|
|
39
|
+
institution: Mapped[InstitutionORM] = relationship(back_populates="shipments", cascade="all, delete")
|
|
40
|
+
shipped_from: Mapped[ContactORM] = relationship(
|
|
40
41
|
back_populates="shipment_from", cascade="all, delete", foreign_keys="[ContactORM.shipment_from_id]"
|
|
41
42
|
)
|
|
42
|
-
shipped_to: Mapped[
|
|
43
|
+
shipped_to: Mapped[ContactORM] = relationship(
|
|
43
44
|
back_populates="shipment_to", cascade="all, delete", foreign_keys="[ContactORM.shipment_to_id]"
|
|
44
45
|
)
|
|
45
|
-
shipment_specimens: Mapped[List[
|
|
46
|
+
shipment_specimens: Mapped[List[ShipmentSpecimenORM]] = relationship(
|
|
46
47
|
back_populates="shipment", cascade="all, delete", passive_deletes=True
|
|
47
48
|
)
|