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 (`EHR`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use crate::v1_1::data_types::quantity::date_time::dv_date_time::DvDateTime;
use openehr_base::v1_2::base_types::identification::hier_object_id::HierObjectId;
use openehr_base::v1_2::base_types::identification::object_ref::ObjectRef;

/// The EHR object is the root object and access point of an EHR for a subject of care.
#[doc(alias = "EHR")]
#[derive(Debug, Clone, PartialEq)]
pub struct Ehr {
    /// The identifier of the logical EHR management system in which this EHR was created.
    pub system_id: HierObjectId,
    /// The unique identifier of this EHR.
    ///
    /// NOTE: is is strongly recommended that a UUID always be used for this field.
    pub ehr_id: HierObjectId,
    /// List of contributions causing changes to this EHR.
    ///
    /// Each contribution contains a list of versions, which may include references to any number of `VERSION` instances, i.e. items of type `VERSIONED_COMPOSITION` and `VERSIONED_FOLDER`.
    pub contributions: Option<Vec<ObjectRef>>,
    /// Reference to `EHR_STATUS` object for this EHR.
    pub ehr_status: ObjectRef,
    /// Reference to `EHR_ACCESS` object for this EHR.
    pub ehr_access: ObjectRef,
    /// Master list of all Versioned Composition references in this EHR.
    pub compositions: Option<Vec<ObjectRef>>,
    /// Optional directory structure for this EHR. If present, this is a reference to the first member of `_folders_`.
    pub directory: Option<ObjectRef>,
    /// Time of creation of the EHR.
    pub time_created: DvDateTime,
    /// Optional additional Folder structures for this EHR. If set, the `_directory_` attribute refers to the first member.
    pub folders: Option<Vec<ObjectRef>>,
}