openehr-rm 0.0.2

openEHR RM 1.2.0 Reference Model, generated from BMM
Documentation
// @generated by openehr-codegen from BMM (`PARTY_RELATED`) — DO NOT EDIT.
// Hand-written spec functions/invariants live in the sibling `*_impl.rs`.

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

use crate::data_types::basic::dv_identifier::DvIdentifier;
use crate::data_types::text::dv_coded_text::DvCodedText;
use openehr_base::prelude::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,
}