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

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

use crate::v1_2::common::generic::party_proxy::PartyProxy;
use crate::v1_2::data_types::encapsulated::dv_multimedia::DvMultimedia;
use crate::v1_2::data_types::quantity::date_time::dv_date_time::DvDateTime;
use crate::v1_2::data_types::text::dv_coded_text::DvCodedText;
use crate::v1_2::data_types::text::dv_text::DvText;
use crate::v1_2::data_types::uri::dv_ehr_uri::DvEhrUri;

/// Record an attestation of a party (the committer) to item(s) of record content.
///
/// An attestation is an explicit signing by one healthcare agent of particular content for various particular purposes, including:
///
/// * for authorisation of a controlled substance or procedure (e.g. sectioning of patient under mental health act);
/// * witnessing of content by senior clinical professional;
/// * indicating acknowledgement of content by intended recipient, e.g. GP who ordered a test result.
#[doc(alias = "ATTESTATION")]
#[derive(Debug, Clone, PartialEq)]
pub struct Attestation {
    // inherited: AUDIT_DETAILS
    /// Identifier of the logical EHR system where the change was committed.
    ///
    /// This is almost always owned by the organisation legally responsible for the EHR, and is distinct from any application, or any hosting infrastructure.
    pub system_id: String,
    /// Time of committal of the item.
    pub time_committed: DvDateTime,
    /// Type of change. Coded using the openEHR Terminology  audit change type  group.
    pub change_type: DvCodedText,
    /// Reason for committal.
    ///
    /// This may be used to qualify the value in the `_change_type_` field. For example, if the change affects only the EHR directory, this field might be used to indicate 'Folder "episode 2018-02-16" added' or similar.
    pub description: Option<DvText>,
    /// Identity and optional reference into identity management service, of user who committed the item.
    pub committer: PartyProxy,
    /// Optional visual representation of content attested e.g. screen image.
    pub attested_view: Option<DvMultimedia>,
    /// Proof of attestation.
    pub proof: Option<String>,
    /// Items attested, expressed as fully qualified runtime paths to the items in question.
    ///
    /// Although not recommended, these may include fine-grained items which have been attested in some other system. Otherwise it is assumed to be for the entire VERSION with which it is associated.
    pub items: Option<openehr_base::containers::NonEmptyVec<DvEhrUri>>,
    /// Reason of this attestation. Optionally coded by the openEHR Terminology group  attestation reason ; includes values like  authorisation ,  witness  etc.
    pub reason: DvText,
    /// True if this attestation is outstanding; False means it has been completed.
    pub is_pending: bool,
}