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

//! The openEHR `PERSON` 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::data_structures::item_structure::item_structure::ItemStructure;
use crate::v1_1::data_types::text::dv_text::DvText;
use crate::v1_1::demographic::contact::Contact;
use crate::v1_1::demographic::party_identity::PartyIdentity;
use crate::v1_1::demographic::party_relationship::PartyRelationship;
use openehr_base::v1_2::base_types::identification::locatable_ref::LocatableRef;
use openehr_base::v1_2::base_types::identification::party_ref::PartyRef;
use openehr_base::v1_2::base_types::identification::uid_based_id::UidBasedId;

/// Generic description of persons. Provides a dedicated type to which Person archetypes can be targeted.
#[doc(alias = "PERSON")]
#[derive(Debug, Clone, PartialEq)]
pub struct Person {
    // 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>,

    // inherited: PARTY
    /// Identities used by the party to identify itself, such as legal name, stage names, aliases, nicknames and so on.
    pub identities: openehr_base::containers::NonEmptyVec<PartyIdentity>,
    /// Contacts for this party.
    pub contacts: Option<openehr_base::containers::NonEmptyVec<Contact>>,
    /// All other details for this Party.
    pub details: Option<ItemStructure>,
    /// References to relationships in which this Party takes part as target.
    pub reverse_relationships: Option<openehr_base::containers::NonEmptyVec<LocatableRef>>,
    /// Relationships in which this Party takes part as source.
    pub relationships: Option<openehr_base::containers::NonEmptyVec<PartyRelationship>>,

    // inherited: ACTOR
    /// Languages which can be used to communicate with this actor, in preferred order of use (if known, else order irrelevant).
    pub languages: Option<Vec<DvText>>,
    /// Identifiers of the Version container for each Role played by this Party.
    pub roles: Option<openehr_base::containers::NonEmptyVec<PartyRef>>,
}