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

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

use crate::v1_2::common::archetyped::archetyped::Archetyped;
use crate::v1_2::common::archetyped::feeder_audit::FeederAudit;
use crate::v1_2::common::archetyped::link::Link;
use crate::v1_2::common::generic::party_self::PartySelf;
use crate::v1_2::data_structures::item_structure::item_structure::ItemStructure;
use crate::v1_2::data_types::text::dv_text::DvText;
use openehr_base::v1_3::base_types::identification::uid_based_id::UidBasedId;

/// The openEHR `EHR_STATUS` class.
///
/// Single object per EHR containing various EHR-wide status flags and settings, including whether this EHR can be queried, modified etc. This object is always modifiable, in order to change the status of the EHR as a whole.
///
/// NOTE: It is strongly recommended that the inherited attribute `_uid_` be populated in `EHR_STATUS` objects, using the UID copied from the `_object_id()_` of the `_uid_` field of the enclosing `VERSION` object. +
/// For example, the `ORIGINAL_VERSION.uid` `87284370-2D4B-4e3d-A3F3-F303D2F4F34B::uk.nhs.ehr1::2`  would be copied to the `_uid_` field of the `EHR_STATUS` object.
#[doc(alias = "EHR_STATUS")]
#[derive(Debug, Clone, PartialEq)]
pub struct EhrStatus {
    // inherited: LOCATABLE
    /// Runtime name of this fragment, used to build runtime paths.
    ///
    /// This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users.
    pub name: DvText,
    /// Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths.
    ///
    /// Always in the form of an at-code, e.g.  `at0005`. This value enables a 'standardised' name for this node to be generated, by referring to the generating archetype local terminology.
    ///
    /// At an archetype root point, the value of this attribute is always the stringified form of the `_archetype_id_` found in the `_archetype_details_` object.
    pub archetype_node_id: String,
    /// Optional globally unique object identifier for root points of archetyped structures.
    pub uid: Option<UidBasedId>,
    /// Links to other archetyped structures (data whose root object inherits from `ARCHETYPED`, such as `ENTRY`, `SECTION` and so on). Links may be to structures in other compositions.
    pub links: Option<openehr_base::containers::NonEmptyVec<Link>>,
    /// Details of archetyping used on this node.
    pub archetype_details: Option<Archetyped>,
    /// Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node.
    pub feeder_audit: Option<FeederAudit>,
    /// The subject of this EHR.
    ///
    /// The `_external_ref_` attribute can be used to contain a direct reference to the subject in a demographic or identity service. Alternatively, the association between patients and their records may be done elsewhere for security reasons.
    pub subject: PartySelf,
    /// True if this EHR should be included in population queries, i.e. if this EHR is considered active in the population.
    pub is_queryable: bool,
    /// True if the EHR, other than the `EHR_STATUS` object, is allowed to be written to. The `EHR_STATUS` object itself can always be written to.
    pub is_modifiable: bool,
    /// Any other details of the EHR summary object, in the form of an archetyped `ITEM_STRUCTURE`.
    pub other_details: Option<ItemStructure>,
}