1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// @generated by openehr-codegen from BMM (`C_REAL`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
//! The openEHR `C_REAL` spec class, generated from the vendored BMM
//! meta-model.
use crate::v2_4::aom2::constraint_model::archetype_constraint::ArchetypeConstraint;
use crate::v2_4::aom2::constraint_model::c_second_order::CSecondOrder;
use crate::v2_4::aom2::constraint_model::sibling_order::SiblingOrder;
use openehr_base::v1_3::foundation_types::interval::interval::Interval;
use openehr_base::v1_3::foundation_types::interval::multiplicity_interval::MultiplicityInterval;
/// Constraint on instances of Real.
#[doc(alias = "C_REAL")]
#[derive(Debug, Clone, PartialEq)]
pub struct CReal {
// inherited: ARCHETYPE_CONSTRAINT
/// Parent node, except in the case of the top of a tree, i.e. root `C_COMPLEX_OBJECT` of an archetype definition.
pub parent: Option<Box<ArchetypeConstraint>>,
/// The `soc_parent` attribute of openEHR `ARCHETYPE_CONSTRAINT` (the vendored BMM carries no documentation for it).
pub soc_parent: Option<CSecondOrder>,
// inherited: 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.
/// Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute.
pub occurrences: Option<MultiplicityInterval>,
/// Semantic identifier of this node, used to distinguish sibling nodes.
///
/// All nodes must have a `_node_id_`; for nodes under a container `C_ATTRIBUTE`. For at-coded archetypes `_node_id_` must be an at-code defined in the archetype terminology and for valid structures all node ids are at-codes. For id-coded archetypes `_node_id_` must be an id-code defined in the archetype terminology and for valid structures all node ids are id-codes.
///
/// For `C_PRIMITIVE_OBJECTs` represented in ADL inline form, this attribute will have the special value `Primitive_node_id`; otherwise it will have the node id read during parsing.
///
pub node_id: String,
/// Additional identifiers of this node.
///
/// openEHR archetypes can carry original ALD2 id-codes in this attribute and it can also carry human readable codes for future use. Alternative ids must be unique within the archetype.
pub alternative_ids: Option<Vec<String>>,
/// True if this node and by implication all sub-nodes are deprecated for use.
pub is_deprecated: Option<bool>,
/// Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a `C_OBJECT` within a `C_ATTRIBUTE` with `_is_multiple_ = True`.
pub sibling_order: Option<SiblingOrder>,
/// Default value set in a template, and present in an operational template. Generally limited to leaf and near-leaf nodes.
pub default_value: Option<f64>,
/// Value to be assumed if none sent in data.
pub assumed_value: Option<f64>,
// inherited: C_PRIMITIVE_OBJECT
/// True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String.
pub is_enumerated_type_constraint: Option<bool>,
/// Formal constraint on `Real`, in the form of one or more `Interval<Real>`.
///
/// To represent no constraint, use an empty list.
pub constraint: Option<Vec<Interval<f64>>>,
}