Skip to content

onconova.interoperability.fhir.models.USCoreObservationClinicalResult

NoneType module-attribute

USCoreObservationClinicalResultProfile

Bases: Observation

The US Core Observation Clinical Result Profile is based upon the core FHIR Observation Resource and, along with the US Core DiagnosticReport Profile, meets the US Core Data for Interoperability (USCDI) requirements for *Diagnostic Imaging* and *Clinical Tests* Data Classes. This profile sets minimum expectations for the Observation resource to record and search non-laboratory clinical test results (e.g., radiology and other clinical observations generated from procedures). An example would be when a gastroenterologist reports the size of a polyp observed during a colonoscopy. This profile is the basis for the US Core Laboratory Result Observation Profile, which defines additional data elements to record and search laboratory test results.

The US Core Observation Clinical Result Profile sets minimum expectations to promote interoperability and adoption through common implementation. It identifies which core elements, extensions, vocabularies, and value sets SHALL be present in the resource and constrains the way the elements are used when using this profile. It provides the floor for standards development for specific use cases.

category class-attribute instance-attribute

code class-attribute instance-attribute

dataAbsentReason 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

meta 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_us_core_2_constraint_model_validator()

Source code in onconova/interoperability/fhir/models/USCoreObservationClinicalResult.py
@model_validator(mode="after")
def FHIR_us_core_2_constraint_model_validator(self):
    return validate_model_constraint(
        self,
        expression="(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())",
        human="If there is no component or hasMember element then either a value[x] or a data absent reason must be present",
        key="us-core-2",
        severity="error",
    )

category_slicing_cardinality_validator(value) classmethod

Source code in onconova/interoperability/fhir/models/USCoreObservationClinicalResult.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/USCoreObservationClinicalResult.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,
        non_allowed_types=[],
    )

value_type_choice_validator()

Source code in onconova/interoperability/fhir/models/USCoreObservationClinicalResult.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,
        non_allowed_types=[],
    )
runner