Skip to content

onconova.interoperability.fhir.models.CancerPatient

NoneType module-attribute

CancerPatient

Bases: USCorePatientProfile

Information about an individual or animal receiving health care services

deceased property

extension class-attribute instance-attribute

FHIR_dom_2_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_2_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.contained.empty()",
        human="If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        key="dom-2",
        severity="error",
    )

FHIR_dom_3_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_3_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()",
        human="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
        key="dom-3",
        severity="error",
    )

FHIR_dom_4_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_4_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
        human="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        key="dom-4",
        severity="error",
    )

FHIR_dom_5_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_5_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.meta.security.empty()",
        human="If a resource is contained in another resource, it SHALL NOT have a security label",
        key="dom-5",
        severity="error",
    )

FHIR_dom_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_6_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="text.`div`.exists()",
        human="A resource should have narrative for robust management",
        key="dom-6",
        severity="warning",
    )

deceased_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def deceased_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Boolean", "DateTime"],
        field_name_base="deceased",
        required=False,
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

CancerPatientAge

Bases: Extension

The approximate age of the patient.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueInteger class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-age",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Integer"],
        field_name_base="value",
        required=False,
    )

CancerPatientAgeAtDiagnosis

Bases: Extension

The approximate age of the patient at the time of diagnosis of the disease.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueInteger class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-age-at-diagnosis",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Integer"],
        field_name_base="value",
        required=False,
    )

CancerPatientBirthsex

Bases: Extension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

CancerPatientCauseOfDeath

Bases: Extension

The cause of death for the patient.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-cause-of-death",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["CodeableConcept"],
        field_name_base="value",
        required=False,
    )

CancerPatientClinicalCenter

Bases: Extension

The center or hospital where the patient case original records were recorded.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueString class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-clinical-center",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["String"],
        field_name_base="value",
        required=False,
    )

CancerPatientConsentStatus

Bases: Extension

The status of whether the patient has given or revoked consent for research use.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueCode class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-consent-status",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Code"],
        field_name_base="value",
        required=False,
    )

CancerPatientDataCompletionRate

Bases: Extension

The percentage of data elements categories that have been completed for a patient.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueDecimal class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-data-completion-rate",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Decimal"],
        field_name_base="value",
        required=False,
    )

CancerPatientDataContributors

Bases: Extension

The individuals or organizations that contributed to the patient's case data collection.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueReference class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-data-contributors",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Reference"],
        field_name_base="value",
        required=False,
    )

CancerPatientEndOfRecords

Bases: Extension

Indicates the last known record date of a patient.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueDate class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-end-of-records",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Date"],
        field_name_base="value",
        required=False,
    )

CancerPatientOverallSurvival

Bases: Extension

The duration of time from either the date of diagnosis or the start of treatment for a disease, such as cancer, that patients diagnosed with the disease are still alive. In a clinical trial, measuring the overall survival is one way to see how well a new treatment works.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueDuration class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-overall-survival",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Duration"],
        field_name_base="value",
        required=False,
    )

CancerPatientVitalStatus

Bases: Extension

The status of whether the patient is alive or deceased or unknown.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-vital-status",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["CodeableConcept"],
        field_name_base="value",
        required=False,
    )

DataAbsentReason

Bases: Extension

Provides a reason why the expected value or elements in the element that is extended are missing.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueCode class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/StructureDefinition/data-absent-reason",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Code"],
        field_name_base="value",
        required=True,
    )

OnconovaCancerPatient

Bases: CancerPatient

Information about an individual or animal receiving health care services

address class-attribute instance-attribute

birthDate class-attribute instance-attribute

communication class-attribute instance-attribute

contact class-attribute instance-attribute

deceased property

deceasedDateTime class-attribute instance-attribute

extension class-attribute instance-attribute

generalPractitioner class-attribute instance-attribute

identifier class-attribute instance-attribute

maritalStatus class-attribute instance-attribute

name class-attribute instance-attribute

photo class-attribute instance-attribute

telecom class-attribute instance-attribute

FHIR_o_pat_req_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="identifier.where(type.coding.code = 'ACSN' and system = 'Onconova').exists()",
        human="The identifier element must contain the identifier for the Onconova logical pseudoidentifier slice.",
        key="o-pat-req-1",
        severity="error",
    )

FHIR_o_pat_req_2_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_2_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="identifier.where(type.coding.code = 'MR').exists(system.exists() and value.exists())",
        human="The identifier element must contain the identifier for the clinical center's patient identifier slice.",
        key="o-pat-req-2",
        severity="error",
    )

FHIR_o_pat_req_3_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_3_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="gender.exists()",
        human="The gender element is required and must be provided",
        key="o-pat-req-3",
        severity="error",
    )

FHIR_o_pat_req_4_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_4_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="birthDate.exists() and birthDate.hasValue()",
        human="The birthDate element is required and must be provided",
        key="o-pat-req-4",
        severity="error",
    )

FHIR_o_pat_req_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_6_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="deceasedDateTime.extension('http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-vital-status').valueCodeableConcept.coding.code = '419099009' implies (deceasedDateTime.hasValue() and deceasedDateTime.extension('http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-cause-of-death').valueCodeableConcept.exists())",
        human="If the patient is deceased, the date of death and cause of death must be provided.",
        key="o-pat-req-6",
        severity="error",
    )

FHIR_o_pat_req_7_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_o_pat_req_7_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="deceasedDateTime.extension('http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-vital-status').valueCodeableConcept.coding.code = '261665006' implies extension('http://onconova.github.io/fhir/StructureDefinition/onconova-ext-cancer-patient-end-of-records').valueDate.hasValue()",
        human="If the patient vital status is unknown, the end of records must be provided.",
        key="o-pat-req-7",
        severity="error",
    )

FHIR_pat_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_pat_1_constraint_validator(self):
    return validate_element_constraint(
        self,
        elements="contact",
        expression="name.exists() or telecom.exists() or address.exists() or organization.exists()",
        human="SHALL at least contain a contact's details or a reference to an organization",
        key="pat-1",
        severity="error",
    )

FHIR_us_core_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_us_core_6_constraint_validator(self):
    return validate_element_constraint(
        self,
        elements="name",
        expression="(family.exists() or given.exists()) xor extension.where(url='http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
        human="At least name.given and/or name.family are present or, if neither is available, the Data Absent Reason Extension is present.",
        key="us-core-6",
        severity="error",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

identifier_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("identifier",), mode="after", check_fields=None)
@classmethod
def identifier_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="identifier",
    )

OnconovaCancerPatientAge

Bases: CancerPatientAge, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientAgeAtDiagnosis

Bases: CancerPatientAgeAtDiagnosis, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientAnonymizedEntry

Bases: DataAbsentReason, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueString class-attribute instance-attribute

FHIR_valueMeta_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("valueMeta",), mode="after", check_fields=None)
@classmethod
def FHIR_valueMeta_pattern_constraint(cls, value):
    return validate_FHIR_element_pattern(
        cls,
        value,
        pattern="masked",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=[
            "Base64Binary",
            "Boolean",
            "Canonical",
            "Code",
            "Date",
            "DateTime",
            "Decimal",
            "Id",
            "Instant",
            "Integer",
            "Markdown",
            "Oid",
            "PositiveInt",
            "String",
            "Time",
            "UnsignedInt",
            "Uri",
            "Url",
            "Uuid",
            "Address",
            "Age",
            "Annotation",
            "Attachment",
            "CodeableConcept",
            "Coding",
            "ContactPoint",
            "Count",
            "Distance",
            "Duration",
            "HumanName",
            "Identifier",
            "Money",
            "Period",
            "Quantity",
            "Range",
            "Ratio",
            "Reference",
            "SampledData",
            "Signature",
            "Timing",
            "ContactDetail",
            "Contributor",
            "DataRequirement",
            "Expression",
            "ParameterDefinition",
            "RelatedArtifact",
            "TriggerDefinition",
            "UsageContext",
            "Dosage",
            "Meta",
        ],
        field_name_base="value",
        required=False,
    )

OnconovaCancerPatientBirthDate

Bases: Date

The date of birth for the individual.

extension class-attribute instance-attribute

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

OnconovaCancerPatientBirthsex

Bases: Extension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientCauseOfDeath

Bases: CancerPatientCauseOfDeath, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientClinicalCenter

Bases: CancerPatientClinicalCenter, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientClinicalIdentifier

Bases: USCorePatientProfileIdentifier, FHIRSliceModel

An identifier for this patient.

max_cardinality class-attribute

min_cardinality class-attribute

type class-attribute instance-attribute

FHIR_type_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("type",), mode="after", check_fields=None)
@classmethod
def FHIR_type_pattern_constraint(cls, value):
    return validate_FHIR_element_pattern(
        cls,
        value,
        pattern=CodeableConcept(
            coding=[
                Coding(
                    code="MR",
                    display="Medical Record Number",
                    system="http://terminology.hl7.org/CodeSystem/v2-0203",
                )
            ]
        ),
    )

OnconovaCancerPatientConsentStatus

Bases: CancerPatientConsentStatus, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientContributors

Bases: CancerPatientDataContributors, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientDataCompletionRate

Bases: CancerPatientDataCompletionRate, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientDeceasedDateTime

Bases: DateTime

Indicates if the individual is deceased or not.

extension class-attribute instance-attribute

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

OnconovaCancerPatientEndOfRecords

Bases: CancerPatientEndOfRecords, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientGenderIdentity

Bases: Extension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientName

Bases: USCorePatientProfileName

Not used in this profile

extension class-attribute instance-attribute

FHIR_us_core_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_us_core_6_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="(family.exists() or given.exists()) xor extension.where(url='http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
        human="At least name.given and/or name.family are present or, if neither is available, the Data Absent Reason Extension is present.",
        key="us-core-6",
        severity="error",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

OnconovaCancerPatientOnconovaIdentifier

Bases: USCorePatientProfileIdentifier, FHIRSliceModel

An identifier for this patient.

max_cardinality class-attribute

min_cardinality class-attribute

system class-attribute instance-attribute

type class-attribute instance-attribute

FHIR_system_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("system",), mode="after", check_fields=None)
@classmethod
def FHIR_system_pattern_constraint(cls, value):
    return validate_FHIR_element_pattern(
        cls,
        value,
        pattern="Onconova",
    )

FHIR_type_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("type",), mode="after", check_fields=None)
@classmethod
def FHIR_type_pattern_constraint(cls, value):
    return validate_FHIR_element_pattern(
        cls,
        value,
        pattern=CodeableConcept(
            coding=[
                Coding(
                    code="ACSN",
                    display="Accession Identifier",
                    system="http://terminology.hl7.org/CodeSystem/v2-0203",
                )
            ]
        ),
    )

OnconovaCancerPatientOverallSurvival

Bases: CancerPatientOverallSurvival, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientRace

Bases: Extension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientSex

Bases: Extension, FHIRSliceModel

Not used in this profile

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientTribalAffiliation

Bases: Extension, FHIRSliceModel

Not used in this profile

max_cardinality class-attribute

min_cardinality class-attribute

OnconovaCancerPatientVitalStatus

Bases: CancerPatientVitalStatus, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

USCoreBirthSexExtension

Bases: Extension

A code classifying the person's sex assigned at birth as specified by the Office of the National Coordinator for Health IT (ONC).

url class-attribute instance-attribute

value property

valueCode class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Code"],
        field_name_base="value",
        required=True,
    )

USCoreEthnicityExtension

Bases: Extension

Concepts classifying the person into a named category of humans sharing common history, traits, geographical origin or nationality. The ethnicity codes used to represent these concepts are based upon the CDC ethnicity and Ethnicity Code Set Version 1.0 which includes over 900 concepts for representing race and ethnicity of which 43 reference ethnicity. The ethnicity concepts are grouped by and pre-mapped to the 2 OMB ethnicity categories: - Hispanic or Latino - Not Hispanic or Latino.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueAddress class-attribute instance-attribute

valueAge class-attribute instance-attribute

valueAnnotation class-attribute instance-attribute

valueAttachment class-attribute instance-attribute

valueBase64Binary class-attribute instance-attribute

valueBoolean class-attribute instance-attribute

valueCanonical class-attribute instance-attribute

valueCode class-attribute instance-attribute

valueCodeableConcept class-attribute instance-attribute

valueCoding class-attribute instance-attribute

valueContactDetail class-attribute instance-attribute

valueContactPoint class-attribute instance-attribute

valueContributor class-attribute instance-attribute

valueCount class-attribute instance-attribute

valueDataRequirement class-attribute instance-attribute

valueDate class-attribute instance-attribute

valueDateTime class-attribute instance-attribute

valueDecimal class-attribute instance-attribute

valueDistance class-attribute instance-attribute

valueDosage class-attribute instance-attribute

valueDuration class-attribute instance-attribute

valueExpression class-attribute instance-attribute

valueHumanName class-attribute instance-attribute

valueId class-attribute instance-attribute

valueIdentifier class-attribute instance-attribute

valueInstant class-attribute instance-attribute

valueInteger class-attribute instance-attribute

valueMarkdown class-attribute instance-attribute

valueMeta class-attribute instance-attribute

valueMoney class-attribute instance-attribute

valueOid class-attribute instance-attribute

valueParameterDefinition class-attribute instance-attribute

valuePeriod class-attribute instance-attribute

valuePositiveInt class-attribute instance-attribute

valueQuantity class-attribute instance-attribute

valueRange class-attribute instance-attribute

valueRatio class-attribute instance-attribute

valueReference class-attribute instance-attribute

valueRelatedArtifact class-attribute instance-attribute

valueSampledData class-attribute instance-attribute

valueSignature class-attribute instance-attribute

valueString class-attribute instance-attribute

valueTime class-attribute instance-attribute

valueTiming class-attribute instance-attribute

valueTriggerDefinition class-attribute instance-attribute

valueUnsignedInt class-attribute instance-attribute

valueUri class-attribute instance-attribute

valueUrl class-attribute instance-attribute

valueUsageContext class-attribute instance-attribute

valueUuid class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=[
            "Base64Binary",
            "Boolean",
            "Canonical",
            "Code",
            "Date",
            "DateTime",
            "Decimal",
            "Id",
            "Instant",
            "Integer",
            "Markdown",
            "Oid",
            "PositiveInt",
            "String",
            "Time",
            "UnsignedInt",
            "Uri",
            "Url",
            "Uuid",
            "Address",
            "Age",
            "Annotation",
            "Attachment",
            "CodeableConcept",
            "Coding",
            "ContactPoint",
            "Count",
            "Distance",
            "Duration",
            "HumanName",
            "Identifier",
            "Money",
            "Period",
            "Quantity",
            "Range",
            "Ratio",
            "Reference",
            "SampledData",
            "Signature",
            "Timing",
            "ContactDetail",
            "Contributor",
            "DataRequirement",
            "Expression",
            "ParameterDefinition",
            "RelatedArtifact",
            "TriggerDefinition",
            "UsageContext",
            "Dosage",
            "Meta",
        ],
        field_name_base="value",
        required=False,
    )

USCoreEthnicityExtensionDetailed

Bases: Extension, FHIRSliceModel

The 41 CDC ethnicity codes that are grouped under one of the 2 OMB ethnicity category codes.

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueCoding class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="detailed",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Coding"],
        field_name_base="value",
        required=True,
    )

USCoreEthnicityExtensionOmbCategory

Bases: Extension, FHIRSliceModel

The 2 ethnicity category codes according to the OMB Standards for Maintaining, Collecting, and Presenting Federal Data on Race and Ethnicity, Statistical Policy Directive No. 15, as revised, October 30, 1997.

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueCoding class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="ombCategory",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Coding"],
        field_name_base="value",
        required=True,
    )

USCoreEthnicityExtensionText

Bases: Extension, FHIRSliceModel

Plain text representation of the ethnicity concept(s).

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueString class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="text",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["String"],
        field_name_base="value",
        required=True,
    )

USCoreGenderIdentityExtension

Bases: Extension

An individual's personal sense of being a man, woman, boy, girl, nonbinary, or something else.

url class-attribute instance-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["CodeableConcept"],
        field_name_base="value",
        required=False,
    )

USCorePatientProfile

Bases: Patient

Information about an individual or animal receiving health care services

address class-attribute instance-attribute

birthDate class-attribute instance-attribute

communication class-attribute instance-attribute

deceased property

deceasedBoolean class-attribute instance-attribute

deceasedDateTime class-attribute instance-attribute

extension class-attribute instance-attribute

gender class-attribute instance-attribute

identifier class-attribute instance-attribute

name class-attribute instance-attribute

telecom class-attribute instance-attribute

FHIR_dom_2_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_2_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.contained.empty()",
        human="If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        key="dom-2",
        severity="error",
    )

FHIR_dom_3_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_3_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()",
        human="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
        key="dom-3",
        severity="error",
    )

FHIR_dom_4_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_4_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
        human="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        key="dom-4",
        severity="error",
    )

FHIR_dom_5_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_5_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="contained.meta.security.empty()",
        human="If a resource is contained in another resource, it SHALL NOT have a security label",
        key="dom-5",
        severity="error",
    )

FHIR_dom_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_dom_6_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="text.`div`.exists()",
        human="A resource should have narrative for robust management",
        key="dom-6",
        severity="warning",
    )

FHIR_us_core_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_us_core_6_constraint_validator(self):
    return validate_element_constraint(
        self,
        elements="name",
        expression="(family.exists() or given.exists()) xor extension.where(url='http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
        human="At least name.given and/or name.family are present or, if neither is available, the Data Absent Reason Extension is present.",
        key="us-core-6",
        severity="error",
    )

deceased_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def deceased_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Boolean", "DateTime"],
        field_name_base="deceased",
        required=False,
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

USCorePatientProfileAddress

Bases: Address

An address for the individual.

city class-attribute instance-attribute

line class-attribute instance-attribute

period class-attribute instance-attribute

postalCode class-attribute instance-attribute

state class-attribute instance-attribute

use class-attribute instance-attribute

USCorePatientProfileBirthsex

Bases: USCoreBirthSexExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCorePatientProfileCommunication

Bases: PatientCommunication

A language which may be used to communicate with the patient about his or her health.

language class-attribute instance-attribute

USCorePatientProfileEthnicity

Bases: USCoreEthnicityExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCorePatientProfileGenderIdentity

Bases: USCoreGenderIdentityExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCorePatientProfileIdentifier

Bases: Identifier

An identifier for this patient.

system class-attribute instance-attribute

value class-attribute instance-attribute

USCorePatientProfileName

Bases: HumanName

A name associated with the individual.

family class-attribute instance-attribute

given class-attribute instance-attribute

period class-attribute instance-attribute

suffix class-attribute instance-attribute

use class-attribute instance-attribute

FHIR_us_core_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_us_core_6_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="(family.exists() or given.exists()) xor extension.where(url='http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
        human="At least name.given and/or name.family are present or, if neither is available, the Data Absent Reason Extension is present.",
        key="us-core-6",
        severity="error",
    )

USCorePatientProfileRace

Bases: USCoreRaceExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCorePatientProfileSex

Bases: USCoreSexExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCorePatientProfileTelecom

Bases: ContactPoint

A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.

system class-attribute instance-attribute

use class-attribute instance-attribute

value class-attribute instance-attribute

USCorePatientProfileTribalAffiliation

Bases: USCoreTribalAffiliationExtension, FHIRSliceModel

May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

max_cardinality class-attribute

min_cardinality class-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

USCoreRaceExtension

Bases: Extension

Concepts classifying the person into a named category of humans sharing common history, traits, geographical origin or nationality. The race codes used to represent these concepts are based upon the CDC Race and Ethnicity Code Set Version 1.0 which includes over 900 concepts for representing race and ethnicity of which 921 reference race. The race concepts are grouped by and pre-mapped to the 5 OMB race categories:

  • American Indian or Alaska Native
  • Asian
  • Black or African American
  • Native Hawaiian or Other Pacific Islander
  • White.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueAddress class-attribute instance-attribute

valueAge class-attribute instance-attribute

valueAnnotation class-attribute instance-attribute

valueAttachment class-attribute instance-attribute

valueBase64Binary class-attribute instance-attribute

valueBoolean class-attribute instance-attribute

valueCanonical class-attribute instance-attribute

valueCode class-attribute instance-attribute

valueCodeableConcept class-attribute instance-attribute

valueCoding class-attribute instance-attribute

valueContactDetail class-attribute instance-attribute

valueContactPoint class-attribute instance-attribute

valueContributor class-attribute instance-attribute

valueCount class-attribute instance-attribute

valueDataRequirement class-attribute instance-attribute

valueDate class-attribute instance-attribute

valueDateTime class-attribute instance-attribute

valueDecimal class-attribute instance-attribute

valueDistance class-attribute instance-attribute

valueDosage class-attribute instance-attribute

valueDuration class-attribute instance-attribute

valueExpression class-attribute instance-attribute

valueHumanName class-attribute instance-attribute

valueId class-attribute instance-attribute

valueIdentifier class-attribute instance-attribute

valueInstant class-attribute instance-attribute

valueInteger class-attribute instance-attribute

valueMarkdown class-attribute instance-attribute

valueMeta class-attribute instance-attribute

valueMoney class-attribute instance-attribute

valueOid class-attribute instance-attribute

valueParameterDefinition class-attribute instance-attribute

valuePeriod class-attribute instance-attribute

valuePositiveInt class-attribute instance-attribute

valueQuantity class-attribute instance-attribute

valueRange class-attribute instance-attribute

valueRatio class-attribute instance-attribute

valueReference class-attribute instance-attribute

valueRelatedArtifact class-attribute instance-attribute

valueSampledData class-attribute instance-attribute

valueSignature class-attribute instance-attribute

valueString class-attribute instance-attribute

valueTime class-attribute instance-attribute

valueTiming class-attribute instance-attribute

valueTriggerDefinition class-attribute instance-attribute

valueUnsignedInt class-attribute instance-attribute

valueUri class-attribute instance-attribute

valueUrl class-attribute instance-attribute

valueUsageContext class-attribute instance-attribute

valueUuid class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=[
            "Base64Binary",
            "Boolean",
            "Canonical",
            "Code",
            "Date",
            "DateTime",
            "Decimal",
            "Id",
            "Instant",
            "Integer",
            "Markdown",
            "Oid",
            "PositiveInt",
            "String",
            "Time",
            "UnsignedInt",
            "Uri",
            "Url",
            "Uuid",
            "Address",
            "Age",
            "Annotation",
            "Attachment",
            "CodeableConcept",
            "Coding",
            "ContactPoint",
            "Count",
            "Distance",
            "Duration",
            "HumanName",
            "Identifier",
            "Money",
            "Period",
            "Quantity",
            "Range",
            "Ratio",
            "Reference",
            "SampledData",
            "Signature",
            "Timing",
            "ContactDetail",
            "Contributor",
            "DataRequirement",
            "Expression",
            "ParameterDefinition",
            "RelatedArtifact",
            "TriggerDefinition",
            "UsageContext",
            "Dosage",
            "Meta",
        ],
        field_name_base="value",
        required=False,
    )

USCoreRaceExtensionDetailed

Bases: Extension, FHIRSliceModel

The 900+ CDC race codes that are grouped under one of the 5 OMB race category codes:.

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueCoding class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="detailed",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Coding"],
        field_name_base="value",
        required=True,
    )

USCoreRaceExtensionOmbCategory

Bases: Extension, FHIRSliceModel

The 5 race category codes according to the OMB Standards for Maintaining, Collecting, and Presenting Federal Data on Race and Ethnicity, Statistical Policy Directive No. 15, as revised, October 30, 1997.

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueCoding class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="ombCategory",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Coding"],
        field_name_base="value",
        required=True,
    )

USCoreRaceExtensionText

Bases: Extension, FHIRSliceModel

Plain text representation of the race concept(s).

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueString class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="text",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["String"],
        field_name_base="value",
        required=True,
    )

USCoreSexExtension

Bases: Extension

The US Core Sex Extension is used to reflect the documentation of a person's sex. It aligns with the C-CDA Sex Observation (LOINC 46098-0).

url class-attribute instance-attribute

value property

valueCode class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Code"],
        field_name_base="value",
        required=True,
    )

USCoreTribalAffiliationExtension

Bases: Extension

A tribe or band with which a person associates whether or not they are an enrolled member.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueAddress class-attribute instance-attribute

valueAge class-attribute instance-attribute

valueAnnotation class-attribute instance-attribute

valueAttachment class-attribute instance-attribute

valueBase64Binary class-attribute instance-attribute

valueBoolean class-attribute instance-attribute

valueCanonical class-attribute instance-attribute

valueCode class-attribute instance-attribute

valueCodeableConcept class-attribute instance-attribute

valueCoding class-attribute instance-attribute

valueContactDetail class-attribute instance-attribute

valueContactPoint class-attribute instance-attribute

valueContributor class-attribute instance-attribute

valueCount class-attribute instance-attribute

valueDataRequirement class-attribute instance-attribute

valueDate class-attribute instance-attribute

valueDateTime class-attribute instance-attribute

valueDecimal class-attribute instance-attribute

valueDistance class-attribute instance-attribute

valueDosage class-attribute instance-attribute

valueDuration class-attribute instance-attribute

valueExpression class-attribute instance-attribute

valueHumanName class-attribute instance-attribute

valueId class-attribute instance-attribute

valueIdentifier class-attribute instance-attribute

valueInstant class-attribute instance-attribute

valueInteger class-attribute instance-attribute

valueMarkdown class-attribute instance-attribute

valueMeta class-attribute instance-attribute

valueMoney class-attribute instance-attribute

valueOid class-attribute instance-attribute

valueParameterDefinition class-attribute instance-attribute

valuePeriod class-attribute instance-attribute

valuePositiveInt class-attribute instance-attribute

valueQuantity class-attribute instance-attribute

valueRange class-attribute instance-attribute

valueRatio class-attribute instance-attribute

valueReference class-attribute instance-attribute

valueRelatedArtifact class-attribute instance-attribute

valueSampledData class-attribute instance-attribute

valueSignature class-attribute instance-attribute

valueString class-attribute instance-attribute

valueTime class-attribute instance-attribute

valueTiming class-attribute instance-attribute

valueTriggerDefinition class-attribute instance-attribute

valueUnsignedInt class-attribute instance-attribute

valueUri class-attribute instance-attribute

valueUrl class-attribute instance-attribute

valueUsageContext class-attribute instance-attribute

valueUuid class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation",
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("extension",), mode="after", check_fields=None)
@classmethod
def extension_slicing_cardinality_validator(cls, value):
    return validate_slicing_cardinalities(
        cls,
        value,
        field_name="extension",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=[
            "Base64Binary",
            "Boolean",
            "Canonical",
            "Code",
            "Date",
            "DateTime",
            "Decimal",
            "Id",
            "Instant",
            "Integer",
            "Markdown",
            "Oid",
            "PositiveInt",
            "String",
            "Time",
            "UnsignedInt",
            "Uri",
            "Url",
            "Uuid",
            "Address",
            "Age",
            "Annotation",
            "Attachment",
            "CodeableConcept",
            "Coding",
            "ContactPoint",
            "Count",
            "Distance",
            "Duration",
            "HumanName",
            "Identifier",
            "Money",
            "Period",
            "Quantity",
            "Range",
            "Ratio",
            "Reference",
            "SampledData",
            "Signature",
            "Timing",
            "ContactDetail",
            "Contributor",
            "DataRequirement",
            "Expression",
            "ParameterDefinition",
            "RelatedArtifact",
            "TriggerDefinition",
            "UsageContext",
            "Dosage",
            "Meta",
        ],
        field_name_base="value",
        required=False,
    )

USCoreTribalAffiliationExtensionIsEnrolled

Bases: Extension, FHIRSliceModel

Whether the individual is an enrolled tribe member

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueBoolean class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="isEnrolled",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["Boolean"],
        field_name_base="value",
        required=True,
    )

USCoreTribalAffiliationExtensionTribalAffiliation

Bases: Extension, FHIRSliceModel

Affiliated tribe or band name

max_cardinality class-attribute

min_cardinality class-attribute

url class-attribute instance-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ele_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="hasValue() or (children().count() > id.count())",
        human="All FHIR elements must have a @value or children",
        key="ele-1",
        severity="error",
    )

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def FHIR_ext_1_constraint_validator(self):
    return validate_model_constraint(
        self,
        expression="extension.exists() != value.exists()",
        human="Must have either extensions or value[x], not both",
        key="ext-1",
        severity="error",
    )

FHIR_url_fixed_value_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@field_validator(*("url",), mode="after", check_fields=None)
@classmethod
def FHIR_url_fixed_value_constraint(cls, value):
    return validate_FHIR_element_fixed_value(
        cls,
        value,
        constant="tribalAffiliation",
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/CancerPatient.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element(
        self,
        field_types=["CodeableConcept"],
        field_name_base="value",
        required=True,
    )
runner