openehr-am 0.0.78

openEHR AM Archetype Model, generated from BMM: generations v1_4 (AM 1.4.0, ADL 1.4) and v2_4 (AM 2.4.0, ADL 2; current)
Documentation
// @generated by openehr-codegen from BMM (`P_C_TERMINOLOGY_CODE`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Vernum Projecten B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use openehr_base::v1_3::foundation_types::terminology::terminology_code::TerminologyCode;

/// Constrainer type for instances of TERMINOLOGY_CODE.
///
/// The primary expression of the constraint is in the property \`tuple_constraint', and comes in 3 variations:
/// * a single at-code
/// * a single ac-code, representing a value-set that is defined in the archetype terminology
/// * a list of at- and/or ac-codes, representing the possibilities of a tuple constraint
/// The last possibility above is enabled by the merge_tuple routine, which enables the constraint of another single-valued C_TERMINOLOGY_CODE to be merged with the current one.
#[doc(alias = "P_C_TERMINOLOGY_CODE")]
#[derive(Debug, Clone, PartialEq)]
pub struct PCTerminologyCode {
    // inherited: P_C_OBJECT
    /// Reference model type that this node corresponds to.
    pub rm_type_name: String,
    /// Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1.
    pub occurrences: Option<String>,
    /// Semantic id of this node, used to differentiate sibling nodes of the same type. Each node_id must be defined in the archetype ontology as a term code.
    pub node_id: String,
    /// The `is_deprecated` attribute of openEHR `P_C_OBJECT` (the vendored BMM carries no documentation for it).
    pub is_deprecated: Option<bool>,

    // inherited: P_C_DEFINED_OBJECT
    /// The `is_frozen` attribute of openEHR `P_C_DEFINED_OBJECT` (the vendored BMM carries no documentation for it).
    pub is_frozen: Option<bool>,
    /// The `default_value` attribute of openEHR `P_C_TERMINOLOGY_CODE` (the vendored BMM carries no documentation for it).
    pub default_value: TerminologyCode,
    /// The `assumed_value` attribute of openEHR `P_C_TERMINOLOGY_CODE` (the vendored BMM carries no documentation for it).
    pub assumed_value: Option<TerminologyCode>,

    // inherited: P_C_PRIMITIVE_OBJECT
    /// True if this constraint is actually of an enumerated type that conforms to a primitive type, not a primitive.
    pub is_enumerated_type_constraint: Option<bool>,
    /// The `constraint` attribute of openEHR `P_C_TERMINOLOGY_CODE` (the vendored BMM carries no documentation for it).
    pub constraint: String,
}