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

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

use crate::v1_1::data_structures::item_structure::item_structure::ItemStructure;
use crate::v1_1::data_types::encapsulated::dv_parsable::DvParsable;
use crate::v1_1::data_types::text::dv_coded_text::DvCodedText;
use crate::v1_1::ehr_extract::common::extract_manifest::ExtractManifest;
use crate::v1_1::ehr_extract::common::extract_version_spec::ExtractVersionSpec;

/// Specification of an Extract's contents.
///
/// Subtypes can be used to add details specific to the type of Extract. The specification consists of attributes specifying the directory, and two further groups of attributes in their own classes, namely a version specfication (which versions of information items are to be included) and a manifest (which entities are to be included in the extract).
///
/// Use: Used in a request to specify an Extract, as well as to describe what is contained in an Extract.
#[doc(alias = "EXTRACT_SPEC")]
#[derive(Debug, Clone, PartialEq)]
pub struct ExtractSpec {
    /// Specification of which versions of information items to include in the Extract. If Void, the default is latest versions only (which is reasonable for non-versioning systems as well).
    pub version_spec: Option<ExtractVersionSpec>,
    /// Specification of entities (e.g. records) to include in the Extract.
    pub manifest: ExtractManifest,
    /// Coded term indicating the type of content required, e.g.
    ///
    /// * `|openehr-ehr|`
    /// * `|openehr-demographic|`
    /// * `|generic-emr|`
    /// * `|other|`
    ///
    /// Coded by openEHR Terminology group `'extract content type'`.
    pub extract_type: DvCodedText,
    /// Indicates whether in-line instances of `DV_MULTIMEDIA` in the source data are included or not.
    pub include_multimedia: bool,
    /// Requested priority of this request to be handled by server. Priority schemes are likely to be local, and use values agreed by both ends.
    ///
    /// TBD: alternative is standard coded terms
    pub priority: i32,
    /// Degree of links to follow emanating from content items specified for inclusion. The kind of links to follow is dependent on the type of Extract.
    ///
    /// All items at the target end of followed links at the given depth are also included in the extract; `EXTRACT_CONTENT_ITEM._is_primary_` is used to differentiate.
    ///
    /// * 0 = don't follow;
    /// * 1 = follow first degree links;
    /// * 2 = follow 2nd degree links;
    /// * ....
    /// * n = follow nth degree links
    pub link_depth: i32,
    /// Queries specifying the contents of this Extract.
    pub criteria: Option<Vec<DvParsable>>,
    /// Other specification items. Archetypable.
    pub other_details: Option<ItemStructure>,
}