openehr-lang 0.0.76

openEHR LANG BMM/P_BMM object model, generated from BMM: generations v1_0 (LANG 1.0.0) and v1_1 (LANG 1.1.0, current; the stable BMM v2.x unit beside the paused BMM3 unit), plus hand-written ODIN/BEL/EL readers
Documentation
// @generated by openehr-codegen from BMM (`EL_CASE_TABLE`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Vernum Projecten B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use crate::v1_0::bmm::expression::el_case::ElCase;
use crate::v1_0::bmm::expression::el_expression::ElExpression;
use crate::v1_0::bmm::expression::el_simple::ElSimple;

/// Compound expression consisting of a list of value-range / expression pairs, and an  `_else_` member that as a whole, represents a case statement flavour of decision table.
///
/// Evaluated by iterating through `_items_` and for each one, comparing `_input_` to the item `_value_range_`. If the `_input_` is in the range, the evaluation result of the table is that item's `_result_` evaluation result.
///
/// If no member of `_items_` has a True-returning `_condition_`, the evaluation result is the result of evaluating the `_else_` expression.
#[doc(alias = "EL_CASE_TABLE")]
#[derive(Debug, Clone, PartialEq)]
pub struct ElCaseTable {
    // inherited: EL_DECISION_TABLE
    /// Result expression of the chain if no member of `_items_` succeeds in evaluation.
    pub r#else: Box<ElExpression>,
    /// Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.
    pub items: openehr_base::containers::NonEmptyVec<ElCase>,
    /// Input value that is compared against each `_items_[i]._value_range_` to determine the overall result.
    pub input: Box<ElSimple>,
}