openehr-rm 0.0.128

openEHR RM Reference Model, generated from BMM: generations v1_1 (RM 1.1.0) and v1_2 (RM 1.2.0, current)
Documentation
// @generated by openehr-codegen from BMM (`EVENT_CONTEXT`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

//! The openEHR `EVENT_CONTEXT` spec class, generated from the vendored BMM
//! meta-model.

use crate::v1_1::common::generic::participation::Participation;
use crate::v1_1::common::generic::party_identified::PartyIdentified;
use crate::v1_1::data_structures::item_structure::item_structure::ItemStructure;
use crate::v1_1::data_types::quantity::date_time::dv_date_time::DvDateTime;
use crate::v1_1::data_types::text::dv_coded_text::DvCodedText;

/// Documents the context information of a healthcare event involving the subject of care and the health system.
///
/// The context information recorded here are independent of the attributes recorded in the version audit, which document the  system interaction  context, i.e. the context of a user interacting with the health record system. Healthcare events include patient contacts, and any other business activity, such as pathology investigations which take place on behalf of the patient.
#[doc(alias = "EVENT_CONTEXT")]
#[derive(Debug, Clone, PartialEq)]
pub struct EventContext {
    /// Start time of the clinical session or other kind of event during which a provider performs a service of any kind for the patient.
    pub start_time: DvDateTime,
    /// Optional end time of the clinical session.
    pub end_time: Option<DvDateTime>,
    /// The actual location where the session occurred, e.g. 'microbiology lab 2', 'home', 'ward A3'  and so on.
    pub location: Option<String>,
    /// The setting in which the clinical session took place. Coded using the openEHR Terminology,  setting  group.
    pub setting: DvCodedText,
    /// Other optional context which will be archetyped.
    pub other_context: Option<ItemStructure>,
    /// The health care facility under whose care the event took place.
    ///
    /// This is the most specific workgroup or delivery unit within a care delivery enterprise that has an official identifier in the health system, and can be used to ensure medico-legal accountability.
    pub health_care_facility: Option<PartyIdentified>,
    /// Parties involved in the healthcare event. These would normally include the physician(s) and often the patient (but not the latter if the clinical session is a pathology test for example).
    pub participations: Option<openehr_base::containers::NonEmptyVec<Participation>>,
}