openehr-rm 0.0.4

openEHR RM 1.2.0 Reference Model, generated from BMM
Documentation
// @generated by openehr-codegen from BMM (`X_VERSIONED_PARTY`) — DO NOT EDIT.

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

use crate::common::change_control::original_version::OriginalVersion;
use crate::common::generic::revision_history::RevisionHistory;
use crate::data_types::quantity::date_time::dv_date_time::DvDateTime;
use crate::demographic::party::Party;
use openehr_base::prelude::HierObjectId;
use openehr_base::prelude::ObjectRef;

/// Form of `X_VERSIONED_OBJECT` for `PARTY` demographic object.
#[doc(alias = "X_VERSIONED_PARTY")]
#[derive(Debug, Clone, PartialEq)]
pub struct XVersionedParty {
    // inherited: X_VERSIONED_OBJECT
    /// Uid of original `VERSIONED_OBJECT`.
    pub uid: HierObjectId,
    /// Owner_id from original `VERSIONED_OBJECT`, which identifies source EHR.
    pub owner_id: ObjectRef,
    /// Creation time of original `VERSIONED_OBJECT`.
    pub time_created: DvDateTime,
    /// Total number of versions in original `VERSIONED_OBJECT` at time of creation of this `X_VERSIONED_OBJECT`.
    pub total_version_count: i32,
    /// The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested.
    pub extract_version_count: i32,
    /// Optional revision history of the original `VERSIONED_OBJECT`. If included, it is the complete revision history.
    pub revision_history: Option<RevisionHistory>,
    /// 0 or more Versions from the original `VERSIONED_OBJECT`, according to the Extract specification.
    pub versions: Option<Vec<OriginalVersion<Party>>>,
}