Skip to content

onconova.interoperability.fhir.models.Lifestyle

NoneType module-attribute

OnconovaLifestyle

Bases: USCoreSimpleObservationProfile

assessment observation

bodySite class-attribute instance-attribute

code class-attribute instance-attribute

component class-attribute instance-attribute

device class-attribute instance-attribute

effective property

encounter class-attribute instance-attribute

focus class-attribute instance-attribute

hasMember class-attribute instance-attribute

interpretation class-attribute instance-attribute

issued class-attribute instance-attribute

performer class-attribute instance-attribute

referenceRange class-attribute instance-attribute

specimen class-attribute instance-attribute

status class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='LA32823-9', display='Lifestyle', system='http://loinc.org')]),
    )

FHIR_o_lif_req_1_constraint_validator()

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

FHIR_o_lif_req_2_constraint_validator()

Source code in onconova/interoperability/fhir/models/Lifestyle.py
@model_validator(mode="after")
def FHIR_o_lif_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='o-lif-req-2',
        severity='error',
    )

FHIR_obs_3_constraint_validator()

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

component_slicing_cardinality_validator(value) classmethod

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

effective_type_choice_validator()

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

OnconovaLifestyleAlcoholConsumption

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='1106630-7', display='Alcohol use pattern', system='http://loinc.org')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleExposures

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='C16552', display='Environmental Exposure', system='http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleNightSleep

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueQuantity class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='93832-4', display='Sleep duration', system='http://loinc.org')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleRecreationalDrug

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='C84368', display='Recreational Drug', system='http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleSmokingPackyears

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueQuantity class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='8664-5', display='Cigarettes smoked total (pack per year) - Reported', system='http://loinc.org')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleSmokingQuited

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueQuantity class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='107339-4', display='Temporary smoking cessation [Time]', system='http://loinc.org')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleSmokingStatus

Bases: ObservationComponent, FHIRSliceModel

Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.

code class-attribute instance-attribute

max_cardinality class-attribute

min_cardinality class-attribute

value property

valueCodeableConcept class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='72166-2', display='Tobacco smoking status', system='http://loinc.org')]),
    )

value_type_choice_validator()

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

OnconovaLifestyleValueQuantity

Bases: Quantity

The information determined as a result of making the observation, if the information has a simple value.

code class-attribute instance-attribute

system class-attribute instance-attribute

FHIR_code_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='{pack-year}',
    )

FHIR_system_pattern_constraint(value) classmethod

Source code in onconova/interoperability/fhir/models/Lifestyle.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='http://unitsofmeasure.org',
    )

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/Lifestyle.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/Lifestyle.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/Lifestyle.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/Lifestyle.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/Lifestyle.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