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

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

use crate::v1_1::common::archetyped::archetyped::Archetyped;
use crate::v1_1::common::archetyped::feeder_audit::FeederAudit;
use crate::v1_1::common::archetyped::link::Link;
use crate::v1_1::common::generic::party_proxy::PartyProxy;
use crate::v1_1::composition::content::content_item::ContentItem;
use crate::v1_1::composition::event_context::EventContext;
use crate::v1_1::data_types::text::code_phrase::CodePhrase;
use crate::v1_1::data_types::text::dv_coded_text::DvCodedText;
use crate::v1_1::data_types::text::dv_text::DvText;
use openehr_base::v1_2::base_types::identification::uid_based_id::UidBasedId;

/// Content of one version in a `VERSIONED_COMPOSITION`.
///
/// A Composition is considered the unit of modification of the record, the unit of transmission in record Extracts, and the unit of attestation by authorising clinicians. In this latter sense, it may be considered equivalent to a signed document.
///
/// NOTE: It is strongly recommended that the inherited attribute `_uid_` be populated in Compositions, 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 Composition.
#[doc(alias = "COMPOSITION")]
#[derive(Debug, Clone, PartialEq)]
pub struct Composition {
    // 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>,
    /// Mandatory indicator of the localised language in which this Composition is written.
    ///
    /// Coded from openEHR Code Set  `languages`. The language of an Entry if different from the Composition is indicated in `ENTRY._language_`.
    pub language: CodePhrase,
    /// Name of territory in which this Composition was written. Coded from openEHR  countries  code set, which is an expression of the ISO 3166 standard.
    pub territory: CodePhrase,
    /// Temporal category of this Composition, i.e.
    ///
    /// * `431|persistent|` - of potential life-time validity;
    /// * `451|episodic|` - valid over the life of a care episode;
    /// * `433|event|` - valid at the time of recording (long-term validity requires subsequent clinical assessment).
    ///
    /// or any other code defined in the openEHR terminology group 'category'.
    pub category: DvCodedText,
    /// The clinical session context of this Composition, i.e. the contextual attributes of the clinical session.
    pub context: Option<EventContext>,
    /// The person primarily responsible for the content of the Composition (but not necessarily its committal into the EHR system).
    ///
    /// This is the identifier which should appear on the screen. It may or may not be the person who entered the data. When it is the patient, the special self  instance of `PARTY_PROXY` will be used.
    pub composer: PartyProxy,
    /// The content of this Composition.
    pub content: Option<openehr_base::containers::NonEmptyVec<ContentItem>>,
}