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

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

use crate::v1_2::data_types::basic::dv_identifier::DvIdentifier;
use crate::v1_2::data_types::text::dv_coded_text::DvCodedText;
use openehr_base::v1_3::base_types::identification::party_ref::PartyRef;

/// Proxy type for identifying a party and its relationship to the subject of the record. Use where the relationship between the party and the subject of the record must be known.
#[doc(alias = "PARTY_RELATED")]
#[derive(Debug, Clone, PartialEq)]
pub struct PartyRelated {
    // inherited: PARTY_PROXY
    /// Optional reference to more detailed demographic or identification information for this party, in an external system.
    pub external_ref: Option<PartyRef>,

    // inherited: PARTY_IDENTIFIED
    /// Optional human-readable name (in String form).
    pub name: Option<String>,
    /// One or more formal identifiers (possibly computable).
    pub identifiers: Option<openehr_base::containers::NonEmptyVec<DvIdentifier>>,
    /// Relationship of subject of this ENTRY to the subject of the record. May be coded. If it is the patient, coded as  self.
    pub relationship: DvCodedText,
}