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

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

use crate::v1_1::demographic::agent::Agent;
use crate::v1_1::demographic::group::Group;
use crate::v1_1::demographic::organisation::Organisation;
use crate::v1_1::demographic::person::Person;
use crate::v1_1::demographic::role::Role;

/// Closed subtype set of `PARTY`, dispatched on each payload's `_type`.
///
/// Ancestor of all Party types, including real world entities and their roles.
///
/// A Party is any entity which can participate in an activity. The `_name_` attribute inherited from `LOCATABLE` is used to indicate the actual type of party (note that the actual names, i.e. identities of parties are indicated in the `_identities_` attribute, not the `_name_` attribute).
///
/// NOTE: It is strongly recommended that the inherited attribute `_uid_` be populated in `PARTY` objects, 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 `PARTY` object.
#[doc(alias = "PARTY")]
#[derive(Debug, Clone, PartialEq)]
pub enum Party {
    /// The `AGENT` subtype of `PARTY`.
    Agent(Agent),
    /// The `GROUP` subtype of `PARTY`.
    Group(Group),
    /// The `ORGANISATION` subtype of `PARTY`.
    Organisation(Organisation),
    /// The `PERSON` subtype of `PARTY`.
    Person(Person),
    /// The `ROLE` subtype of `PARTY`.
    Role(Role),
}