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

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

use crate::v1_1::common::generic::party_related::PartyRelated;
use crate::v1_1::data_types::basic::dv_identifier::DvIdentifier;
use openehr_base::v1_2::base_types::identification::party_ref::PartyRef;

/// The openEHR `PARTY_IDENTIFIED` class.
///
/// Proxy data for an identified party other than the subject of the record, minimally consisting of human-readable identifier(s), such as name, formal (and possibly computable) identifiers such as NHS number, and an optional link to external data. There must be at least one of name, identifier or external_ref present.
///
/// Used to describe parties where only identifiers may be known, and there is no entry at all in the demographic system (or even no demographic system). Typically for health care providers, e.g. name and provider number of an institution.
///
/// Should not be used to include patient identifying information.
#[doc(alias = "PARTY_IDENTIFIED")]
#[derive(Debug, Clone, PartialEq)]
pub struct PartyIdentifiedData {
    // inherited: PARTY_PROXY
    /// Optional reference to more detailed demographic or identification information for this party, in an external system.
    pub external_ref: Option<PartyRef>,
    /// 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>>,
}

/// Polymorphic slot of `PARTY_IDENTIFIED`, dispatched on each payload's `_type`.
///
/// Proxy data for an identified party other than the subject of the record, minimally consisting of human-readable identifier(s), such as name, formal (and possibly computable) identifiers such as NHS number, and an optional link to external data. There must be at least one of name, identifier or external_ref present.
///
/// Used to describe parties where only identifiers may be known, and there is no entry at all in the demographic system (or even no demographic system). Typically for health care providers, e.g. name and provider number of an institution.
///
/// Should not be used to include patient identifying information.
#[doc(alias = "PARTY_IDENTIFIED")]
#[derive(Debug, Clone, PartialEq)]
pub enum PartyIdentified {
    /// The `PARTY_RELATED` subtype of `PARTY_IDENTIFIED`.
    PartyRelated(PartyRelated),
    /// An instance of `PARTY_IDENTIFIED` itself (its own, least-rich form).
    PartyIdentified(PartyIdentifiedData),
}