Skip to content

onconova.interoperability.fhir.models.Comorbidities

NoneType module-attribute

Comorbidities

Bases: USCoreSimpleObservationProfile

assessment observation

bodySite class-attribute instance-attribute

code class-attribute instance-attribute

component class-attribute instance-attribute

device class-attribute instance-attribute

extension class-attribute instance-attribute

focus class-attribute instance-attribute

hasMember class-attribute instance-attribute

method class-attribute instance-attribute

specimen class-attribute instance-attribute

subject class-attribute instance-attribute

value property

valueInteger class-attribute instance-attribute

valueQuantity class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@field_validator(*('code',), mode="after", check_fields=None)
@classmethod
def FHIR_code_pattern_constraint(cls, value):    
    return validate_FHIR_element_pattern(cls, value, 
        pattern=CodeableConcept(coding=[Coding(code='398192003', system='http://snomed.info/sct')]),
    )

FHIR_obs_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_obs_6_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='dataAbsentReason.empty() or value.empty()',
        human='dataAbsentReason SHALL only be present if Observation.value[x] is not present',
        key='obs-6',
        severity='error',
    )

FHIR_obs_7_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_obs_7_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()',
        human='If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present',
        key='obs-7',
        severity='error',
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['Quantity', 'Integer'],
        field_name_base="value",
        required=False,
    )

ComorbiditiesComorbidConditionAbsent

Bases: RelatedConditionAbsent, 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/Comorbidities.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/Comorbidities.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',
    )

ComorbiditiesComorbidConditionPresent

Bases: RelatedCondition, 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/Comorbidities.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/Comorbidities.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',
    )

OnconovaComorbidities

Bases: Comorbidities

assessment observation

basedOn class-attribute instance-attribute

derivedFrom class-attribute instance-attribute

effective property

encounter class-attribute instance-attribute

extension class-attribute instance-attribute

focus class-attribute instance-attribute

interpretation class-attribute instance-attribute

issued class-attribute instance-attribute

partOf class-attribute instance-attribute

performer class-attribute instance-attribute

referenceRange class-attribute instance-attribute

status class-attribute instance-attribute

value property

valueQuantity class-attribute instance-attribute

FHIR_com_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_com_1_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='valueQuantity.exists() implies method.exists()',
        human='If an index score is provided, then the comorbidity panel method must also be provided.',
        key='com-1',
        severity='error',
    )

FHIR_com_req_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_com_req_1_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='subject.exists()',
        human='The subject element is required and must be provided.',
        key='com-req-1',
        severity='error',
    )

FHIR_com_req_2_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_com_req_2_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='effectiveDateTime.exists() and effectiveDateTime.hasValue()',
        human='The effectiveDateTime element is required and must be provided.',
        key='com-req-2',
        severity='error',
    )

FHIR_com_req_3_constraint_validator()

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

FHIR_obs_3_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_obs_3_constraint_validator(self):
    return validate_element_constraint( 
        self,
        elements="referenceRange",
        expression='low.exists() or high.exists() or text.exists()',
        human='Must have at least a low or a high or text',
        key='obs-3',
        severity='error',
    )

effective_type_choice_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def effective_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['DateTime'],
        field_name_base="effective",
        required=True,
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['Quantity'],
        field_name_base="value",
        required=False,
    )

OnconovaComorbiditiesComorbidConditionAbsent

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

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_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.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',
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.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,
    )

OnconovaComorbiditiesComorbidConditionPresent

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

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_ele_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.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',
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.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,
    )

OnconovaComorbiditiesValueQuantity

Bases: Quantity

Comorbidity score or risk index

unit class-attribute instance-attribute

FHIR_unit_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@field_validator(*('unit',), mode="after", check_fields=None)
@classmethod
def FHIR_unit_pattern_constraint(cls, value):    
    return validate_FHIR_element_pattern(cls, value, 
        pattern='1',
    )

RelatedCondition

Bases: Extension

A condition that has a relationship with the resource.

extension class-attribute instance-attribute

url class-attribute instance-attribute

value property

valueCodeableConcept class-attribute instance-attribute

valueReference class-attribute instance-attribute

FHIR_ext_1_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.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/mcode/StructureDefinition/mcode-related-condition',
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['CodeableConcept', 'Reference'],
        field_name_base="value",
        required=True,
    )

RelatedConditionAbsent

Bases: Extension

A condition that is NOT present, related to the resource.

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/Comorbidities.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/Comorbidities.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/mcode/StructureDefinition/mcode-related-condition-absent',
    )

extension_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/Comorbidities.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/Comorbidities.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,
    )

USCoreSimpleObservationProfile

Bases: Observation

assessment observation

category class-attribute instance-attribute

code class-attribute instance-attribute

derivedFrom class-attribute instance-attribute

effective property

effectiveDateTime class-attribute instance-attribute

effectiveInstant class-attribute instance-attribute

effectivePeriod class-attribute instance-attribute

effectiveTiming class-attribute instance-attribute

performer class-attribute instance-attribute

status class-attribute instance-attribute

subject class-attribute instance-attribute

value property

valueBoolean class-attribute instance-attribute

valueCodeableConcept class-attribute instance-attribute

valueDateTime class-attribute instance-attribute

valueInteger class-attribute instance-attribute

valuePeriod class-attribute instance-attribute

valueQuantity class-attribute instance-attribute

valueRange class-attribute instance-attribute

valueRatio class-attribute instance-attribute

valueSampledData class-attribute instance-attribute

valueString class-attribute instance-attribute

valueTime class-attribute instance-attribute

FHIR_obs_6_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_obs_6_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='dataAbsentReason.empty() or value.empty()',
        human='dataAbsentReason SHALL only be present if Observation.value[x] is not present',
        key='obs-6',
        severity='error',
    )

FHIR_obs_7_constraint_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def FHIR_obs_7_constraint_validator(self):
    return validate_model_constraint( 
        self,
        expression='value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()',
        human='If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present',
        key='obs-7',
        severity='error',
    )

category_slicing_cardinality_validator(value) classmethod

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

effective_type_choice_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def effective_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['DateTime', 'Period', 'Timing', 'Instant'],
        field_name_base="effective",
        required=False,
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/Comorbidities.py
@model_validator(mode="after")
def value_type_choice_validator(self):
    return validate_type_choice_element( 
        self,
        field_types=['Quantity', 'CodeableConcept', 'String', 'Boolean', 'Integer', 'Range', 'Ratio', 'SampledData', 'Time', 'DateTime', 'Period'],
        field_name_base="value",
        required=False,
    )

USCoreSimpleObservationProfileUsCore

Bases: CodeableConcept, FHIRSliceModel

A code that classifies the general type of observation being made.

max_cardinality class-attribute

min_cardinality class-attribute

runner