From 807ce600a40796941226ac0338aef1ae5d7bcfcd Mon Sep 17 00:00:00 2001 From: Lukas Schmierer Date: Sat, 15 Nov 2025 17:42:47 +0100 Subject: [PATCH 1/5] do not download r6 files if already present --- crates/fhir-gen/build.rs | 25 ++++++++++++++++++++-- crates/fhir/build.rs | 45 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/crates/fhir-gen/build.rs b/crates/fhir-gen/build.rs index 45beba333..da22538dd 100644 --- a/crates/fhir-gen/build.rs +++ b/crates/fhir-gen/build.rs @@ -19,13 +19,19 @@ fn main() { return; } - println!("cargo:warning=Downloading R6 definitions from HL7 build server"); - let resources_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("resources/R6"); // Create the resources directory if it doesn't exist fs::create_dir_all(&resources_dir).expect("Failed to create resources directory"); + // Skip download when the repository already vendors the extracted fixtures. + if has_existing_payload(&resources_dir) { + println!("cargo:warning=Using existing R6 definitions; skipping download"); + return; + } + + println!("cargo:warning=Downloading R6 definitions from HL7 build server"); + let url = "https://build.fhir.org/definitions.json.zip"; let output_path = resources_dir.join("definitions.json.zip"); @@ -111,6 +117,21 @@ fn main() { println!("FHIR definitions downloaded successfully"); } +fn has_existing_payload(resources_dir: &Path) -> bool { + match resources_dir.read_dir() { + Ok(entries) => entries + .filter_map(Result::ok) + .any(|entry| entry.file_type().map(|ty| ty.is_file()).unwrap_or(false)), + Err(err) => { + println!( + "cargo:warning=Unable to inspect {:?} for cached payloads: {}", + resources_dir, err + ); + false + } + } +} + fn download_with_retry( client: &reqwest::blocking::Client, url: &str, diff --git a/crates/fhir/build.rs b/crates/fhir/build.rs index fe830a1a0..ddf82e5e8 100644 --- a/crates/fhir/build.rs +++ b/crates/fhir/build.rs @@ -18,13 +18,54 @@ fn main() { return; } - println!("cargo:warning=Downloading R6 test data from HL7 build server"); - let resources_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/data/R6"); // Create the resources directory if it doesn't exist fs::create_dir_all(&resources_dir).expect("Failed to create resources directory"); + // Skip download when the repository already contains the extracted fixtures. + // This allows offline builds/tests (and prevents repeated downloads) while + // still letting the fallback pull fresh fixtures when the directory is empty. + match resources_dir.read_dir() { + Ok(dir_entries) => { + let mut has_files = false; + for entry in dir_entries { + match entry { + Ok(entry) => { + if entry.file_type().map(|ft| ft.is_file()).unwrap_or(false) { + has_files = true; + break; + } + } + Err(err) => { + println!( + "cargo:warning=Failed to inspect {:?}: {}", + resources_dir, err + ); + } + } + } + + if has_files { + println!("cargo:warning=Using existing R6 test data; skipping download"); + return; + } else { + println!( + "cargo:warning=No files found in {:?}; downloading test data", + resources_dir + ); + } + } + Err(err) => { + println!( + "cargo:warning=Unable to list {:?}: {}; continuing with download", + resources_dir, err + ); + } + } + + println!("cargo:warning=Downloading R6 test data from HL7 build server"); + let url = "https://build.fhir.org/examples-json.zip"; let output_path = resources_dir.join("examples.json.zip"); From f6efaf5a7fa45b14d9235922b02441cf40daeab6 Mon Sep 17 00:00:00 2001 From: Lukas Schmierer Date: Sat, 15 Nov 2025 19:25:49 +0100 Subject: [PATCH 2/5] fix wrong identifiedDateTime field name --- crates/sof/tests/debug_datetime_instant_constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sof/tests/debug_datetime_instant_constants.rs b/crates/sof/tests/debug_datetime_instant_constants.rs index 1ff6cfc4e..5374bfb16 100644 --- a/crates/sof/tests/debug_datetime_instant_constants.rs +++ b/crates/sof/tests/debug_datetime_instant_constants.rs @@ -9,7 +9,7 @@ fn test_datetime_constant_debug() { "resourceType": "DetectedIssue", "id": "di2", "status": "final", - "identified": "2016-11-12" + "identifiedDateTime": "2016-11-12" }"#, ) .unwrap(); From 5f6330c298341c920b25407f7baf5fb2b9dcaff8 Mon Sep 17 00:00:00 2001 From: Lukas Schmierer Date: Sun, 16 Nov 2025 09:33:24 +0100 Subject: [PATCH 3/5] add AGENTS.md to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1a8420c5b..47e9b29a3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ package-lock.json CLAUDE.md .prettierrc off +AGENTS.md From 1353ce0e158462a2384ce4dcc710cf4b08f1ae96 Mon Sep 17 00:00:00 2001 From: Lukas Schmierer Date: Sun, 16 Nov 2025 22:08:35 +0100 Subject: [PATCH 4/5] make code generation deterministic --- crates/fhir-gen/src/lib.rs | 139 +- crates/fhir/src/r4.rs | 136818 ++++++++++++------------- crates/fhir/src/r4b.rs | 143018 +++++++++++++------------- crates/fhir/src/r5.rs | 187516 +++++++++++++++++----------------- crates/fhir/src/r6.rs | 171188 +++++++++++++++---------------- 5 files changed, 319318 insertions(+), 319361 deletions(-) diff --git a/crates/fhir-gen/src/lib.rs b/crates/fhir-gen/src/lib.rs index 3763439be..43691f5c3 100644 --- a/crates/fhir-gen/src/lib.rs +++ b/crates/fhir-gen/src/lib.rs @@ -330,7 +330,7 @@ fn process_single_version(version: &FhirVersion, output_path: impl AsRef) let mut all_resources = Vec::new(); let mut all_complex_types = Vec::new(); - // First pass: collect all bundles and extract global information + // First pass: parse all JSON files and collect all StructureDefinitions let bundles: Vec<_> = visit_dirs(&version_dir)? .into_iter() .filter_map(|file_path| match parse_structure_definitions(&file_path) { @@ -342,8 +342,29 @@ fn process_single_version(version: &FhirVersion, output_path: impl AsRef) }) .collect(); - // Extract global information from all bundles + // Collect and extract all elements for cycle detection + let mut all_elements = Vec::new(); + let mut all_struct_defs = Vec::new(); + for bundle in &bundles { + if let Some(entries) = bundle.entry.as_ref() { + for entry in entries { + if let Some(resource) = &entry.resource { + if let Resource::StructureDefinition(def) = resource { + if is_valid_structure_definition(def) { + all_struct_defs.push(def); + if let Some(snapshot) = &def.snapshot { + if let Some(elements) = &snapshot.element { + all_elements.extend(elements.iter()); + } + } + } + } + } + } + } + + // Extract global information if let Some((hierarchy, resources, complex_types)) = extract_bundle_info(bundle) { global_type_hierarchy.extend(hierarchy); all_resources.extend(resources); @@ -351,11 +372,28 @@ fn process_single_version(version: &FhirVersion, output_path: impl AsRef) } } - // Second pass: generate code for each bundle - for bundle in bundles { - generate_code(bundle, &version_path, false)?; // false = don't generate global constructs + // Sort StructureDefinitions by name for deterministic output + all_struct_defs.sort_by(|a, b| a.name.cmp(&b.name)); + + // Detect cycles across all elements + let cycles = detect_struct_cycles(&all_elements); + + // Generate code for each StructureDefinition in sorted order + for def in all_struct_defs { + let content = structure_definition_to_rust(def, &cycles); + let mut file = std::fs::OpenOptions::new() + .create(true) + .append(true) + .open(&version_path)?; + write!(file, "{}", content)?; } + // Sort for deterministic output + all_resources.sort(); + all_resources.dedup(); + all_complex_types.sort(); + all_complex_types.dedup(); + // Generate global constructs once at the end generate_global_constructs( &version_path, @@ -676,90 +714,6 @@ fn generate_global_constructs( Ok(()) } -/// Generates Rust code from a Bundle of FHIR StructureDefinitions. -/// -/// This is the main code generation function that processes all StructureDefinitions -/// in a Bundle and writes the corresponding Rust code to a file. -/// -/// # Arguments -/// -/// * `bundle` - FHIR Bundle containing StructureDefinitions and other resources -/// * `output_path` - Path to the output Rust file -/// -/// # Returns -/// -/// Returns `Ok(())` on success, or an `io::Error` if file operations fail. -/// -/// # Process Overview -/// -/// 1. **First Pass**: Collects all ElementDefinitions and detects circular dependencies -/// 2. **Second Pass**: Generates Rust code for each valid StructureDefinition -/// 3. **Final Step**: Generates a unified Resource enum and helper implementations -/// -/// # Generated Code Includes -/// -/// - Struct definitions for complex types and resources -/// - Enum definitions for choice types (polymorphic elements) -/// - A Resource enum containing all resource types -/// - From implementations for primitive type conversions -/// - Proper derive macros for serialization and FHIR-specific functionality -fn generate_code( - bundle: Bundle, - output_path: impl AsRef, - _generate_globals: bool, -) -> io::Result<()> { - // First collect all ElementDefinitions across all StructureDefinitions - let mut all_elements = Vec::new(); - - if let Some(entries) = bundle.entry.as_ref() { - // First pass: collect all elements - for entry in entries { - if let Some(resource) = &entry.resource { - if let Resource::StructureDefinition(def) = resource { - if is_valid_structure_definition(def) { - if let Some(snapshot) = &def.snapshot { - if let Some(elements) = &snapshot.element { - all_elements.extend(elements.iter()); - } - } - } - } - } - } - - // Detect cycles using all collected elements - let element_refs: Vec<&ElementDefinition> = all_elements; - let cycles = detect_struct_cycles(&element_refs); - - // Second pass: generate code - for entry in entries { - if let Some(resource) = &entry.resource { - match resource { - Resource::StructureDefinition(def) => { - if is_valid_structure_definition(def) { - let content = structure_definition_to_rust(def, &cycles); - let mut file = std::fs::OpenOptions::new() - .create(true) - .append(true) - .open(output_path.as_ref())?; - write!(file, "{}", content)?; - } - } - Resource::SearchParameter(_param) => { - // TODO: Generate code for search parameter - } - Resource::OperationDefinition(_op) => { - // TODO: Generate code for operation definition - } - _ => {} // Skip other resource types for now - } - } - } - } - - Ok(()) -} - /// Generates a Rust enum containing all FHIR resource types. /// /// This function creates a single enum that can represent any FHIR resource, @@ -2179,8 +2133,11 @@ fn process_elements( } } - // Process each group - for (path, group) in element_groups { + // Process each group in sorted order for deterministic output + let mut sorted_groups: Vec<_> = element_groups.into_iter().collect(); + sorted_groups.sort_by(|a, b| a.0.cmp(&b.0)); + + for (path, group) in sorted_groups { let type_name = generate_type_name(&path); // Skip if we've already processed this type diff --git a/crates/fhir/src/r4.rs b/crates/fhir/src/r4.rs index 3a6e1594c..f874853b5 100644 --- a/crates/fhir/src/r4.rs +++ b/crates/fhir/src/r4.rs @@ -133,133 +133,6 @@ use serde::{Deserialize, Serialize}; use crate::{DecimalElement, Element}; -/// The parties ultimately responsible for balancing the Account -/// -/// The parties responsible for balancing the account if other payment options -/// fall short. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AccountGuarantor { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Responsible entity - /// - /// The entity who is responsible. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub party: Reference, - /// Credit or other hold applied - /// - /// A guarantor may be placed on credit hold or otherwise have their role - /// temporarily suspended. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "onHold")] - pub on_hold: Option, - /// Guarantee account during - /// - /// The timeframe during which the guarantor accepts responsibility for the - /// account. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, -} - /// FHIR Account type /// /// A financial tool for tracking value accrued for a particular purpose. In the @@ -804,6 +677,133 @@ pub struct AccountCoverage { pub priority: Option, } +/// The parties ultimately responsible for balancing the Account +/// +/// The parties responsible for balancing the account if other payment options +/// fall short. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct AccountGuarantor { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Responsible entity + /// + /// The entity who is responsible. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub party: Reference, + /// Credit or other hold applied + /// + /// A guarantor may be placed on credit hold or otherwise have their role + /// temporarily suspended. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "onHold")] + pub on_hold: Option, + /// Guarantee account during + /// + /// The timeframe during which the guarantor accepts responsibility for the + /// account. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub period: Option, +} + /// Choice of types for the subject\[x\] field in ActivityDefinition #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] #[fhir_choice_element(base_name = "subject")] @@ -2198,6 +2198,284 @@ pub struct ActivityDefinitionParticipant { pub role: Option, } +/// FHIR Address type +/// +/// Base StructureDefinition for Address Type: An address expressed using postal +/// conventions (as opposed to GPS or other location definition formats). This +/// data type may be used to convey addresses for use in delivering mail as well +/// as for visiting locations which might not be valid for mail delivery. There +/// are a variety of postal address formats defined around the world. +/// +/// ## Purpose +/// Need to be able to record postal addresses, along with notes about their use. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [Address](http://hl7.org/fhir/StructureDefinition/Address) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Address { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// home | work | temp | old | billing - purpose of this address + /// + /// The purpose of this address. + /// + /// ## Requirements + /// Allows an appropriate address to be chosen from a list of many. + /// + /// ## Implementation Notes + /// Applications can assume that an address is current unless it explicitly says + /// that it is temporary or old. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not mistake a temporary or old address etc.for a current/permanent one + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The use of an address. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/address-use|4.0.1 + #[fhir_serde(rename = "use")] + pub r#use: Option, + /// postal | physical | both + /// + /// Distinguishes between physical addresses (those you can visit) and mailing + /// addresses (e.g. PO Boxes and care-of addresses). Most addresses are both. + /// + /// ## Implementation Notes + /// The definition of Address states that "address is intended to describe postal + /// addresses, not physical locations". However, many applications track whether + /// an address has a dual purpose of being a location that can be visited as well + /// as being a valid delivery destination, and Postal addresses are often used as + /// proxies for physical locations (also see the [Location](location.html#) + /// resource). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The type of an address (physical / postal). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/address-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Text representation of the address + /// + /// Specifies the entire address as it should be displayed e.g. on a postal + /// label. This may be provided instead of or as well as the specific parts. + /// + /// ## Requirements + /// A renderable, unencoded form. + /// + /// ## Implementation Notes + /// Can provide both a text representation and parts. Applications updating an + /// address SHALL ensure that when both text and parts are present, no content is + /// included in the text that isn't found in a part. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + pub text: Option, + /// Street name, number, direction & P.O. Box etc. + /// + /// This component contains the house number, apartment number, street name, + /// street direction, P.O. Box number, delivery hints, and similar address + /// information. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// - Order meaning: The order in which lines should appear in an address label + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + pub line: Option>, + /// Name of city, town etc. + /// + /// The name of the city, town, suburb, village or other community or delivery + /// center. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + /// + /// ## Aliases + /// Municpality + pub city: Option, + /// District name (aka county) + /// + /// The name of the administrative area (county). + /// + /// ## Implementation Notes + /// District is sometimes known as county, but in some regions 'county' is used + /// in place of city (municipality), so county name should be conveyed in city + /// instead. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + /// + /// ## Aliases + /// County + pub district: Option, + /// Sub-unit of country (abbreviations ok) + /// + /// Sub-unit of a country with limited sovereignty in a federally organized + /// country. A code may be used if codes are in common use (e.g. US 2 letter + /// state codes). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// Province, Territory + pub state: Option, + /// Postal code for area + /// + /// A postal code designating a region defined by the postal service. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + /// + /// ## Aliases + /// Zip + #[fhir_serde(rename = "postalCode")] + pub postal_code: Option, + /// Country (e.g. can be ISO 3166 2 or 3 letter code) + /// + /// Country - a nation as commonly understood or generally accepted. + /// + /// ## Implementation Notes + /// ISO 3166 3 letter codes can be used in place of a human readable country + /// name. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub country: Option, + /// Time period when address was/is in use + /// + /// Time period when address was/is in use. + /// + /// ## Requirements + /// Allows addresses to be placed in historical context. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Examples + /// - General: None + pub period: Option, +} + /// FHIR AdverseEvent type /// /// Actual or potential/avoided event causing unintended physical injury @@ -3050,18 +3328,20 @@ pub struct AdverseEventSuspectEntityCausality { pub method: Option, } -/// Adverse Reaction Events linked to exposure to substance +/// FHIR Age type /// -/// Details about each adverse reaction event linked to exposure to the -/// identified substance. +/// Base StructureDefinition for Age Type: A duration of time during which an +/// organism (or a process) has existed. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Quantity /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Age](http://hl7.org/fhir/StructureDefinition/Age) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AllergyIntoleranceReaction { +pub struct Age { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -3095,208 +3375,112 @@ pub struct AllergyIntoleranceReaction { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Numerical value (with implicit precision) /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The value of the measured amount. The value includes an implicit precision in + /// the presentation of the value. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Precision is handled implicitly in almost all cases of measurement. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The implicit precision in the value should always be honored. Monetary values + /// have their own rules for handling precision (refer to standard accounting + /// text books). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Specific substance or pharmaceutical product considered to be responsible for event + pub value: Option, + /// < | \<= | \>= | > - how to understand the value /// - /// Identification of the specific substance (or pharmaceutical product) - /// considered to be responsible for the Adverse Reaction event. Note: the - /// substance for a specific reaction may be different from the substance - /// identified as the cause of the risk, but it must be consistent with it. For - /// instance, it may be a more specific substance (e.g. a brand medication) or a - /// composite product that includes the identified substance. It must be - /// clinically safe to only process the 'code' and ignore the - /// 'reaction.substance'. If a receiving system is unable to confirm that - /// AllergyIntolerance.reaction.substance falls within the semantic scope of - /// AllergyIntolerance.code, then the receiving system should ignore - /// AllergyIntolerance.reaction.substance. + /// How the value should be understood and represented - whether the actual value + /// is greater or less than the stated value due to measurement issues; e.g. if + /// the comparator is "<" , then the real value is < stated value. /// - /// ## Implementation Notes - /// Coding of the specific substance (or pharmaceutical product) with a - /// terminology capable of triggering decision support should be used wherever - /// possible. The 'code' element allows for the use of a specific substance or - /// pharmaceutical product, or a group or class of substances. In the case of an - /// allergy or intolerance to a class of substances, (for example, - /// "penicillins"), the 'reaction.substance' element could be used to code the - /// specific substance that was identified as having caused the reaction (for - /// example, "amoxycillin"). Duplication of the value in the 'code' and - /// 'reaction.substance' elements is acceptable when a specific substance has - /// been recorded in 'code'. + /// ## Requirements + /// Need a framework for handling measures where the value is <5ug/L or >400mg/L + /// due to the limitations of measuring methodology. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes defining the type of the substance (including pharmaceutical products). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/substance-code - pub substance: Option, - /// Clinical symptoms/signs associated with the Event - /// - /// Clinical symptoms and/or signs that are observed or associated with the - /// adverse reaction event. - /// - /// ## Implementation Notes - /// Manifestation can be expressed as a single word, phrase or brief description. - /// For example: nausea, rash or no reaction. It is preferable that manifestation - /// should be coded with a terminology, where possible. The values entered here - /// may be used to display on an application screen as part of a list of adverse - /// reactions, as recommended in the UK NHS CUI guidelines. Terminologies - /// commonly used include, but are not limited to, SNOMED CT or ICD10. - /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value + /// - Included in summary + /// - When missing: If there is no comparator, then there is no modification of the value /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings - /// - /// ## Aliases - /// Symptoms, Signs - pub manifestation: Option>, - /// Description of the event as a whole + /// - **Strength**: required + /// - **Description**: How the Quantity should be understood and represented. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 + pub comparator: Option, + /// Unit representation /// - /// Text description about the reaction as a whole, including details of the - /// manifestation if required. + /// A human-readable form of the unit. /// - /// ## Implementation Notes - /// Use the description to provide any details of a particular event of the - /// occurred reaction such as circumstances, reaction specifics, what happened - /// before/after. Information, related to the event, but not describing a - /// particular care should be captured in the comment field. For example: at the - /// age of four, the patient was given penicillin for strep throat and - /// subsequently developed severe hives. + /// ## Requirements + /// There are many representations for units of measure and in many contexts, + /// particular representations are fixed and required. I.e. mcg for micrograms. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Narrative, Text - pub description: Option, - /// Date(/time) when manifestations showed - /// - /// Record of the date and/or time of the onset of the Reaction. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub onset: Option, - /// mild | moderate | severe (of event as a whole) + pub unit: Option, + /// System that defines coded unit form /// - /// Clinical assessment of the severity of the reaction event as a whole, - /// potentially considering multiple different manifestations. + /// The identification of the system that provides the coded form of the unit. /// - /// ## Implementation Notes - /// It is acknowledged that this assessment is very subjective. There may be some - /// specific practice domains where objective scales have been applied. Objective - /// scales can be included in this model as extensions. + /// ## Requirements + /// Need to know the system that defines the coded form of the unit. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/reaction-event-severity|4.0.1 - pub severity: Option, - /// How the subject was exposed to the substance + /// ## Conditions + /// Used when: qty-3 + pub system: Option, + /// Coded form of the unit /// - /// Identification of the route by which the subject was exposed to the - /// substance. + /// A computer processable form of the unit in some unit representation system. + /// + /// ## Requirements + /// Need a computable form of the unit that is fixed across all forms. UCUM + /// provides this for quantities, but SNOMED CT provides many units of interest. /// /// ## Implementation Notes - /// Coding of the route of exposure with a terminology should be used wherever - /// possible. + /// The preferred system is UCUM, but SNOMED CT can also be used (for customary + /// units) or ISO 4217 for currency. The context of use may additionally require + /// a code from a particular system. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/route-codes - #[fhir_serde(rename = "exposureRoute")] - pub exposure_route: Option, - /// Text about event not captured in other fields - /// - /// Additional text about the adverse reaction event not captured in other - /// fields. - /// - /// ## Implementation Notes - /// Use this field to record information indirectly related to a particular event - /// and not captured in the description. For example: Clinical records are no - /// longer available, recorded based on information provided to the patient by - /// her mother and her mother is deceased. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, + pub code: Option, } /// Choice of types for the onset\[x\] field in AllergyIntolerance @@ -3929,19 +4113,18 @@ pub struct AllergyIntolerance { pub reaction: Option>, } -/// Participants involved in appointment +/// Adverse Reaction Events linked to exposure to substance /// -/// List of participants involved in the appointment. +/// Details about each adverse reaction event linked to exposure to the +/// identified substance. /// -/// ## Cardinality: Required, Multiple (1..*) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints -/// - **app-1**: Either the type or actor on the participant SHALL be specified (error) -/// Expression: `type.exists() or actor.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AppointmentParticipant { +pub struct AllergyIntoleranceReaction { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -4022,59 +4205,113 @@ pub struct AppointmentParticipant { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Role of participant in the appointment + /// Specific substance or pharmaceutical product considered to be responsible for event /// - /// Role of participant in the appointment. + /// Identification of the specific substance (or pharmaceutical product) + /// considered to be responsible for the Adverse Reaction event. Note: the + /// substance for a specific reaction may be different from the substance + /// identified as the cause of the risk, but it must be consistent with it. For + /// instance, it may be a more specific substance (e.g. a brand medication) or a + /// composite product that includes the identified substance. It must be + /// clinically safe to only process the 'code' and ignore the + /// 'reaction.substance'. If a receiving system is unable to confirm that + /// AllergyIntolerance.reaction.substance falls within the semantic scope of + /// AllergyIntolerance.code, then the receiving system should ignore + /// AllergyIntolerance.reaction.substance. /// /// ## Implementation Notes - /// The role of the participant can be used to declare what the actor will be - /// doing in the scope of this appointment. + /// Coding of the specific substance (or pharmaceutical product) with a + /// terminology capable of triggering decision support should be used wherever + /// possible. The 'code' element allows for the use of a specific substance or + /// pharmaceutical product, or a group or class of substances. In the case of an + /// allergy or intolerance to a class of substances, (for example, + /// "penicillins"), the 'reaction.substance' element could be used to code the + /// specific substance that was identified as having caused the reaction (for + /// example, "amoxycillin"). Duplication of the value in the 'code' and + /// 'reaction.substance' elements is acceptable when a specific substance has + /// been recorded in 'code'. /// - /// If the actor is not specified, then it is expected that the actor will be - /// filled in at a later stage of planning. + /// ## Cardinality: Optional (0..1) /// - /// This value SHALL be the same when creating an AppointmentResponse so that - /// they can be matched, and subsequently update the Appointment. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes defining the type of the substance (including pharmaceutical products). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/substance-code + pub substance: Option, + /// Clinical symptoms/signs associated with the Event /// - /// ## Special Semantics - /// - Included in summary + /// Clinical symptoms and/or signs that are observed or associated with the + /// adverse reaction event. + /// + /// ## Implementation Notes + /// Manifestation can be expressed as a single word, phrase or brief description. + /// For example: nausea, rash or no reaction. It is preferable that manifestation + /// should be coded with a terminology, where possible. The values entered here + /// may be used to display on an application screen as part of a list of adverse + /// reactions, as recommended in the UK NHS CUI guidelines. Terminologies + /// commonly used include, but are not limited to, SNOMED CT or ICD10. + /// + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Role of participant in encounter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-participant-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// Person, Location/HealthcareService or Device + /// - **Strength**: example + /// - **Description**: Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings /// - /// A Person, Location/HealthcareService or Device that is participating in the - /// appointment. + /// ## Aliases + /// Symptoms, Signs + pub manifestation: Option>, + /// Description of the event as a whole /// - /// ## Cardinality: Optional (0..1) + /// Text description about the reaction as a whole, including details of the + /// manifestation if required. /// - /// ## Special Semantics - /// - Included in summary + /// ## Implementation Notes + /// Use the description to provide any details of a particular event of the + /// occurred reaction such as circumstances, reaction specifics, what happened + /// before/after. Information, related to the event, but not describing a + /// particular care should be captured in the comment field. For example: at the + /// age of four, the patient was given penicillin for strep throat and + /// subsequently developed severe hives. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub actor: Option, - /// required | optional | information-only /// - /// Whether this participant is required to be present at the meeting. This - /// covers a use-case where two doctors need to meet to discuss the results for a - /// specific patient, and the patient is not required to be present. + /// ## Aliases + /// Narrative, Text + pub description: Option, + /// Date(/time) when manifestations showed + /// + /// Record of the date and/or time of the onset of the Reaction. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub onset: Option, + /// mild | moderate | severe (of event as a whole) + /// + /// Clinical assessment of the severity of the reaction event as a whole, + /// potentially considering multiple different manifestations. + /// + /// ## Implementation Notes + /// It is acknowledged that this assessment is very subjective. There may be some + /// specific practice domains where objective scales have been applied. Objective + /// scales can be included in this model as extensions. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -4082,37 +4319,153 @@ pub struct AppointmentParticipant { /// /// ## Binding /// - **Strength**: required - /// - **Description**: Is the Participant required to attend the appointment. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participantrequired|4.0.1 - pub required: Option, - /// accepted | declined | tentative | needs-action + /// - **Description**: Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/reaction-event-severity|4.0.1 + pub severity: Option, + /// How the subject was exposed to the substance /// - /// Participation status of the actor. + /// Identification of the route by which the subject was exposed to the + /// substance. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Coding of the route of exposure with a terminology should be used wherever + /// possible. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The Participation status of an appointment. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participationstatus|4.0.1 - pub status: Code, - /// Participation period of the actor + /// - **Strength**: example + /// - **Description**: A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/route-codes + #[fhir_serde(rename = "exposureRoute")] + pub exposure_route: Option, + /// Text about event not captured in other fields /// - /// Participation period of the actor. + /// Additional text about the adverse reaction event not captured in other + /// fields. + /// + /// ## Implementation Notes + /// Use this field to record information indirectly related to a particular event + /// and not captured in the description. For example: Clinical records are no + /// longer available, recorded based on information provided to the patient by + /// her mother and her mother is deceased. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, +} + +/// Choice of types for the author\[x\] field in Annotation +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "author")] +pub enum AnnotationAuthor { + /// Variant accepting the Reference type. + #[fhir_serde(rename = "authorReference")] + Reference(Reference), + /// Variant accepting the String type. + #[fhir_serde(rename = "authorString")] + String(String), +} + +/// FHIR Annotation type +/// +/// Base StructureDefinition for Annotation Type: A text note which also contains +/// information about who made the statement and when. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [Annotation](http://hl7.org/fhir/StructureDefinition/Annotation) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "author")] +pub struct Annotation { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Individual responsible for the annotation + /// + /// The individual responsible for making the annotation. + /// + /// ## Implementation Notes + /// Organization is used when there's no need for specific attribution as to who + /// made the comment. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, + #[fhir_serde(flatten)] + pub author: Option, + /// When the annotation was made + /// + /// Indicates when this particular annotation was made. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub time: Option, + /// The annotation - text content (as markdown) + /// + /// The text of the annotation in markdown format. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub text: Markdown, } /// FHIR Appointment type @@ -4703,6 +5056,192 @@ pub struct Appointment { pub requested_period: Option>, } +/// Participants involved in appointment +/// +/// List of participants involved in the appointment. +/// +/// ## Cardinality: Required, Multiple (1..*) +/// +/// ## Constraints +/// - **app-1**: Either the type or actor on the participant SHALL be specified (error) +/// Expression: `type.exists() or actor.exists()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct AppointmentParticipant { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Role of participant in the appointment + /// + /// Role of participant in the appointment. + /// + /// ## Implementation Notes + /// The role of the participant can be used to declare what the actor will be + /// doing in the scope of this appointment. + /// + /// If the actor is not specified, then it is expected that the actor will be + /// filled in at a later stage of planning. + /// + /// This value SHALL be the same when creating an AppointmentResponse so that + /// they can be matched, and subsequently update the Appointment. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Role of participant in encounter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-participant-type + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Person, Location/HealthcareService or Device + /// + /// A Person, Location/HealthcareService or Device that is participating in the + /// appointment. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub actor: Option, + /// required | optional | information-only + /// + /// Whether this participant is required to be present at the meeting. This + /// covers a use-case where two doctors need to meet to discuss the results for a + /// specific patient, and the patient is not required to be present. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Is the Participant required to attend the appointment. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participantrequired|4.0.1 + pub required: Option, + /// accepted | declined | tentative | needs-action + /// + /// Participation status of the actor. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The Participation status of an appointment. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participationstatus|4.0.1 + pub status: Code, + /// Participation period of the actor + /// + /// Participation period of the actor. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub period: Option, +} + /// FHIR AppointmentResponse type /// /// A reply to an appointment request for a patient and/or practitioner(s), such @@ -5058,31 +5597,23 @@ pub struct AppointmentResponse { pub comment: Option, } -/// Data or objects used -/// -/// Specific instances of data or objects that have been accessed. +/// FHIR Attachment type /// -/// ## Requirements -/// The event may have other entities involved. +/// Base StructureDefinition for Attachment Type: For referring to data content +/// defined in other formats. /// -/// ## Implementation Notes -/// Required unless the values for event identification, agent identification, -/// and audit source identification are sufficient to document the entire -/// auditable event. Because events may have more than one entity, this group can -/// be a repeating set of values. +/// ## Purpose +/// Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -/// - **sev-1**: Either a name or a query (NOT both) (error) -/// Expression: `name.empty() or query.empty()` +/// ## Status: active +/// FHIR Version: 4.0.1 /// -/// ## Aliases -/// ParticipantObject +/// See: [Attachment](http://hl7.org/fhir/StructureDefinition/Attachment) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AuditEventEntity { +pub struct Attachment { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -5116,57 +5647,14 @@ pub struct AuditEventEntity { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Mime type of the content, with charset etc. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// Identifies the type of the data in the attachment and allows a method to be + /// chosen to interpret or render the data. Includes mime type parameters such as + /// charset where appropriate. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Specific instance of resource - /// - /// Identifies a specific instance of the entity. The reference should be version - /// specific. + /// Processors of the data need to be able to know how to interpret the data. /// /// ## Cardinality: Optional (0..1) /// @@ -5176,110 +5664,73 @@ pub struct AuditEventEntity { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub what: Option, - /// Type of entity involved - /// - /// The type of the object that was involved in this audit event. /// - /// ## Requirements - /// To describe the object being acted upon. In addition to queries on the - /// subject of the action in an auditable event, it is also important to be able - /// to query on the object type for the action. - /// - /// ## Implementation Notes - /// This value is distinct from the user's role or any user relationship to the - /// entity. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// ## Examples + /// - General: None /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Code for the entity type involved in the audit event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/audit-entity-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// What role the entity played + /// - **Strength**: required + /// - **Description**: The mime type of an attachment. Any valid mime type is allowed. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1 + #[fhir_serde(rename = "contentType")] + pub content_type: Option, + /// Human language of the content (BCP-47) /// - /// Code representing the role the entity played in the event being audited. + /// The human language of the content. The value can be any valid value according + /// to BCP 47. /// /// ## Requirements - /// For some detailed audit analysis it may be necessary to indicate a more - /// granular type of entity, based on the application role it serves. + /// Users need to be able to choose between the languages in a set of + /// attachments. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Code representing the role the entity played in the audit event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/object-role - pub role: Option, - /// Life-cycle stage for the entity - /// - /// Identifier for the data life-cycle stage for the entity. - /// - /// ## Requirements - /// Institutional policies for privacy and security may optionally fall under - /// different accountability rules based on data life cycle. This provides a - /// differentiating value for those cases. - /// - /// ## Implementation Notes - /// This can be used to provide an audit trail for data, over time, as it passes - /// through the system. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// + /// ## Examples + /// - General: None + /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Identifier for the data life-cycle stage for the entity. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/object-lifecycle-events - pub lifecycle: Option, - /// Security labels on the entity + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Data inline, base64ed /// - /// Security labels for the identified entity. + /// The actual data of the attachment - a sequence of bytes, base64 encoded. /// /// ## Requirements - /// This field identifies the security labels for a specific instance of an - /// object, such as a patient, to detect/track privacy and security issues. + /// The data needs to able to be transmitted inline. /// /// ## Implementation Notes - /// Copied from entity meta security tags. + /// The base64-encoded data SHALL be expressed in the same character set as the + /// base resource XML or JSON. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub data: Option, + /// Uri where the data can be found /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels - #[fhir_serde(rename = "securityLabel")] - pub security_label: Option>, - /// Descriptor for entity - /// - /// A name of the entity in the audit event. + /// A location where the data can be accessed. /// /// ## Requirements - /// Use only where entity can't be identified with an identifier. + /// The data needs to be transmitted by reference. /// /// ## Implementation Notes - /// This field may be used in a query/report to identify audit events for a - /// specific person. For example, where multiple synonymous entity identifiers - /// (patient number, medical record number, encounter number, etc.) have been - /// used. + /// If both data and url are provided, the url SHALL point to the same content as + /// the data contains. Urls may be relative references or may reference transient + /// locations such as a wrapping envelope using cid: though this has + /// ramifications for using signatures. Relative URLs are interpreted relative to + /// the service url, like a resource reference, rather than relative to the + /// resource itself. If a URL is provided, it SHALL resolve to actual data. /// /// ## Cardinality: Optional (0..1) /// @@ -5290,42 +5741,21 @@ pub struct AuditEventEntity { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Conditions - /// Used when: sev-1 - pub name: Option, - /// Descriptive text - /// - /// Text that describes the entity in more detail. - /// - /// ## Requirements - /// Use only where entity can't be identified with an identifier. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Query parameters + /// ## Examples + /// - General: None + pub url: Option, + /// Number of bytes of content (if url provided) /// - /// The query parameters for a query-type entities. + /// The number of bytes of data that make up this attachment (before base64 + /// encoding, if that is done). /// /// ## Requirements - /// For query events, it may be necessary to capture the actual query input to - /// the query process in order to identify the specific event. Because of - /// differences among query implementations and data encoding for them, this is a - /// base 64 encoded data blob. It may be subsequently decoded or interpreted by - /// downstream audit analysis processing. + /// Representing the size allows applications to determine whether they should + /// fetch the content automatically in advance, or refuse to fetch it at all. /// /// ## Implementation Notes - /// The meaning and secondary-encoding of the content of base64 encoded blob is - /// specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, - /// and AuditEvent.entity.role. The base64 is a general-use and safe container - /// for event specific data blobs regardless of the encoding used by the - /// transaction being recorded. An AuditEvent consuming application must - /// understand the event it is consuming and the formats used by the event. For - /// example, if auditing an Oracle network database access, the Oracle formats - /// must be understood as they will be simply encoded in the base64binary blob. + /// The number of bytes is redundant if the data is provided as a base64binary, + /// but is useful if the data is provided as a url reference. /// /// ## Cardinality: Optional (0..1) /// @@ -5335,185 +5765,69 @@ pub struct AuditEventEntity { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub size: Option, + /// Hash of the data (sha-1, base64ed) /// - /// ## Conditions - /// Used when: sev-1 - pub query: Option, - /// Additional Information about the entity - /// - /// Tagged value pairs for conveying additional information about the entity. + /// The calculated hash of the data using SHA-1. Represented using base64. /// /// ## Requirements - /// Implementation-defined data about specific details of the object accessed or - /// used. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, -} - -/// Audit Event Reporter -/// -/// The system that is reporting the event. -/// -/// ## Requirements -/// The event is reported by one source. -/// -/// ## Implementation Notes -/// Since multi-tier, distributed, or composite applications make source -/// identification ambiguous, this collection of fields may repeat for each -/// application or process actively involved in the event. For example, multiple -/// value-sets can identify participating web servers, application processes, and -/// database server threads in an n-tier distributed application. Passive event -/// participants (e.g. low-level network transports) need not be identified. -/// -/// ## Cardinality: Required (1..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AuditEventSource { - /// Unique id for inter-element referencing + /// Included so that applications can verify that the contents of a location have + /// not changed due to technical failures (e.g., storage rot, transport glitch, + /// incorrect version). /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Implementation Notes + /// The hash is calculated on the data prior to base64 encoding, if the data is + /// based64 encoded. The hash is not intended to support digital signatures. + /// Where protection against malicious threats a digital signature should be + /// considered, see + /// [Provenance.signature](provenance-definitions.html#Provenance.signature) for + /// mechanism to protect a resource with a digital signature. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + pub hash: Option, + /// Label to display in place of the data /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// A label or set of text to display in place of the data. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Applications need a label to display to a human user in place of the actual + /// data if the data cannot be rendered or perceived by the viewer. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Logical source location within the enterprise + /// ## Examples + /// - General: None + pub title: Option, + /// Date attachment was first created /// - /// Logical source location within the healthcare enterprise network. For - /// example, a hospital or other provider location within a multi-entity provider - /// group. + /// The date that the attachment was first created. /// /// ## Requirements - /// This value differentiates among the sites in a multi-site enterprise health - /// information system. + /// This is often tracked as an integrity issue for use of the attachment. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub site: Option, - /// The identity of source detecting the event - /// - /// Identifier of the source where the event was detected. - /// - /// ## Requirements - /// This field ties the event to a specific source system. It may be used to - /// group events for analysis according to where the event was detected. - /// - /// ## Cardinality: Required (1..1) - /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// SourceId - pub observer: Reference, - /// The type of source where event originated - /// - /// Code specifying the type of source where event originated. - /// - /// ## Requirements - /// This field indicates which type of source is identified by the Audit Source - /// ID. It is an optional value that may be used to group events for analysis - /// according to the type of source where the event occurred. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Code specifying the type of system that detected and recorded the event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/audit-source-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, + pub creation: Option, } /// FHIR AuditEvent type @@ -5970,18 +6284,32 @@ pub struct AuditEvent { pub entity: Option>, } -/// Logical network location for application activity +/// Actor involved in the event /// -/// Logical network location for application activity, if the activity has a -/// network location. +/// An actor taking an active role in the event or activity that is logged. /// -/// ## Cardinality: Optional (0..1) +/// ## Requirements +/// An agent can be a person, an organization, software, device, or other actors +/// that may be ascribed responsibility. +/// +/// ## Implementation Notes +/// Several agents may be associated (i.e. have some responsibility for an +/// activity) with an event or activity. +/// +/// For example, an activity may be initiated by one user for other users or +/// involve more than one user. However, only one user may be the +/// initiator/requestor for the activity. +/// +/// ## Cardinality: Required, Multiple (1..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Aliases +/// ActiveParticipant #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AuditEventAgentNetwork { +pub struct AuditEventAgent { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -6062,37 +6390,168 @@ pub struct AuditEventAgentNetwork { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Identifier for the network access point of the user device + /// How agent participated /// - /// An identifier for the network access point of the user device for the audit + /// Specification of the participation type the user plays when performing the /// event. /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The Participation type of the agent to the event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participation-role-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Agent role in the event + /// + /// The security role that the user was acting under, that come from local codes + /// defined by the access control security system (e.g. RBAC, ABAC) used in the + /// local context. + /// /// ## Requirements - /// This datum identifies the user's network access point, which may be distinct - /// from the server that performed the action. It is an optional value that may - /// be used to group events recorded on separate servers for analysis of a - /// specific network access point's data access across all servers. + /// This value ties an audited event to a user's role(s). It is an optional value + /// that might be used to group events for analysis by user functional role + /// categories. /// /// ## Implementation Notes - /// This could be a device id, IP address or some other identifier associated - /// with a device. + /// Should be roles relevant to the event. Should not be an exhaustive list of + /// roles. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: What security role enabled the agent to participate in the event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-role-type + pub role: Option>, + /// Identifier of who + /// + /// Reference to who this agent is that was involved in the event. + /// + /// ## Requirements + /// This field ties an audit event to a specific resource or identifier. + /// + /// ## Implementation Notes + /// Where a User ID is available it will go into who.identifier. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub address: Option, - /// The type of network access point /// - /// An identifier for the type of network access point that originated the audit - /// event. + /// ## Aliases + /// userId + pub who: Option, + /// Alternative User identity + /// + /// Alternative agent Identifier. For a human, this should be a user identifier + /// text string from authentication system. This identifier would be one known to + /// a common authentication system (e.g. single sign-on), if available. /// /// ## Requirements - /// This datum identifies the type of network access point identifier of the user - /// device for the audit event. It is an optional value that may be used to group - /// events recorded on separate servers for analysis of access according to a - /// network access point's type. + /// In some situations, a human user may authenticate with one identity but, to + /// access a specific application system, may use a synonymous identify. For + /// example, some "single sign on" implementations will do this. The alternative + /// identifier would then be the original identify used for authentication, and + /// the User ID is the one known to and used by the application. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "altId")] + pub alt_id: Option, + /// Human friendly name for the agent + /// + /// Human-meaningful name for the agent. + /// + /// ## Requirements + /// The User ID and Authorization User ID may be internal or otherwise obscure + /// values. This field assists the auditor in identifying the actual user. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub name: Option, + /// Whether user is initiator + /// + /// Indicator that the user is or is not the requestor, or initiator, for the + /// event being audited. + /// + /// ## Requirements + /// This value is used to distinguish between requestor-users and + /// recipient-users. For example, one person may initiate a report-output to be + /// sent to another user. + /// + /// ## Implementation Notes + /// There can only be one initiator. If the initiator is not clear, then do not + /// choose any one agent as the initiator. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub requestor: Boolean, + /// Where + /// + /// Where the event occurred. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub location: Option, + /// Policy that authorized event + /// + /// The policy or plan that authorized the activity being recorded. Typically, a + /// single activity may have multiple applicable policies, such as patient + /// consent, guarantor funding, etc. The policy would also indicate the security + /// token used. + /// + /// ## Requirements + /// This value is used retrospectively to determine the authorization policies. + /// + /// ## Implementation Notes + /// For example: Where an OAuth token authorizes, the unique identifier from the + /// OAuth token is placed into the policy element Where a policy engine (e.g. + /// XACML) holds policy logic, the unique policy identifier is placed into the + /// policy element. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub policy: Option>, + /// Type of media + /// + /// Type of media involved. Used when the event is about exporting/importing onto + /// media. + /// + /// ## Requirements + /// Usually, this is used instead of specifying a network address. This field is + /// not used for Media Id (i.e. the serial number of a CD). /// /// ## Cardinality: Optional (0..1) /// @@ -6101,41 +6560,58 @@ pub struct AuditEventAgentNetwork { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The type of network access point of this agent in the audit event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/network-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Option, -} - -/// Choice of types for the value\[x\] field in AuditEventEntityDetail -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum AuditEventEntityDetailValue { - /// Variant accepting the String type. - #[fhir_serde(rename = "valueString")] - String(String), - /// Variant accepting the Base64Binary type. - #[fhir_serde(rename = "valueBase64Binary")] - Base64Binary(Base64Binary), + /// - **Strength**: extensible + /// - **Description**: Used when the event is about exporting/importing onto media. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/dicm-405-mediatype + pub media: Option, + /// Logical network location for application activity + /// + /// Logical network location for application activity, if the activity has a + /// network location. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub network: Option, + /// Reason given for this user + /// + /// The reason (purpose of use), specific to this agent, that was used during the + /// event being recorded. + /// + /// ## Implementation Notes + /// Use AuditEvent.agent.purposeOfUse when you know that is specific to the + /// agent, otherwise use AuditEvent.purposeOfEvent. For example, during a + /// machine-to-machine transfer it might not be obvious to the audit system who + /// caused the event, but it does know why. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The reason the activity took place. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse + #[fhir_serde(rename = "purposeOfUse")] + pub purpose_of_use: Option>, } -/// Additional Information about the entity -/// -/// Tagged value pairs for conveying additional information about the entity. +/// Logical network location for application activity /// -/// ## Requirements -/// Implementation-defined data about specific details of the object accessed or -/// used. +/// Logical network location for application activity, if the activity has a +/// network location. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct AuditEventEntityDetail { +pub struct AuditEventAgentNetwork { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -6216,71 +6692,77 @@ pub struct AuditEventEntityDetail { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Name of the property + /// Identifier for the network access point of the user device /// - /// The type of extra detail provided in the value. + /// An identifier for the network access point of the user device for the audit + /// event. /// - /// ## Cardinality: Required (1..1) + /// ## Requirements + /// This datum identifies the user's network access point, which may be distinct + /// from the server that performed the action. It is an optional value that may + /// be used to group events recorded on separate servers for analysis of a + /// specific network access point's data access across all servers. + /// + /// ## Implementation Notes + /// This could be a device id, IP address or some other identifier associated + /// with a device. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "type")] - pub r#type: String, - /// Property value + pub address: Option, + /// The type of network access point /// - /// The value of the extra detail. + /// An identifier for the type of network access point that originated the audit + /// event. /// /// ## Requirements - /// Should not duplicate the entity value unless absolutely necessary. - /// - /// ## Implementation Notes - /// The value can be string when known to be a string, else base64 encoding - /// should be used to protect binary or undefined content. The meaning and - /// secondary-encoding of the content of base64 encoded blob is specific to the - /// AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and - /// AuditEvent.entity.role. The base64 is a general-use and safe container for - /// event specific data blobs regardless of the encoding used by the transaction - /// being recorded. An AuditEvent consuming application must understand the event - /// it is consuming and the formats used by the event. For example if auditing an - /// Oracle network database access, the Oracle formats must be understood as they - /// will be simply encoded in the base64binary blob. + /// This datum identifies the type of network access point identifier of the user + /// device for the audit event. It is an optional value that may be used to group + /// events recorded on separate servers for analysis of access according to a + /// network access point's type. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The type of network access point of this agent in the audit event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/network-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Option, } -/// Actor involved in the event +/// Data or objects used /// -/// An actor taking an active role in the event or activity that is logged. +/// Specific instances of data or objects that have been accessed. /// /// ## Requirements -/// An agent can be a person, an organization, software, device, or other actors -/// that may be ascribed responsibility. +/// The event may have other entities involved. /// /// ## Implementation Notes -/// Several agents may be associated (i.e. have some responsibility for an -/// activity) with an event or activity. -/// -/// For example, an activity may be initiated by one user for other users or -/// involve more than one user. However, only one user may be the -/// initiator/requestor for the activity. +/// Required unless the values for event identification, agent identification, +/// and audit source identification are sufficient to document the entire +/// auditable event. Because events may have more than one entity, this group can +/// be a repeating set of values. /// -/// ## Cardinality: Required, Multiple (1..*) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// - **sev-1**: Either a name or a query (NOT both) (error) +/// Expression: `name.empty() or query.empty()` /// /// ## Aliases -/// ActiveParticipant +/// ParticipantObject #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct AuditEventAgent { +pub struct AuditEventEntity { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -6361,10 +6843,32 @@ pub struct AuditEventAgent { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// How agent participated + /// Specific instance of resource /// - /// Specification of the participation type the user plays when performing the - /// event. + /// Identifies a specific instance of the entity. The reference should be version + /// specific. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub what: Option, + /// Type of entity involved + /// + /// The type of the object that was involved in this audit event. + /// + /// ## Requirements + /// To describe the object being acted upon. In addition to queries on the + /// subject of the action in an auditable event, it is also important to be able + /// to query on the object type for the action. + /// + /// ## Implementation Notes + /// This value is distinct from the user's role or any user relationship to the + /// entity. /// /// ## Cardinality: Optional (0..1) /// @@ -6374,24 +6878,63 @@ pub struct AuditEventAgent { /// /// ## Binding /// - **Strength**: extensible - /// - **Description**: The Participation type of the agent to the event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participation-role-type + /// - **Description**: Code for the entity type involved in the audit event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/audit-entity-type #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Agent role in the event + pub r#type: Option, + /// What role the entity played /// - /// The security role that the user was acting under, that come from local codes - /// defined by the access control security system (e.g. RBAC, ABAC) used in the - /// local context. + /// Code representing the role the entity played in the event being audited. /// /// ## Requirements - /// This value ties an audited event to a user's role(s). It is an optional value - /// that might be used to group events for analysis by user functional role - /// categories. + /// For some detailed audit analysis it may be necessary to indicate a more + /// granular type of entity, based on the application role it serves. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Code representing the role the entity played in the audit event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/object-role + pub role: Option, + /// Life-cycle stage for the entity + /// + /// Identifier for the data life-cycle stage for the entity. + /// + /// ## Requirements + /// Institutional policies for privacy and security may optionally fall under + /// different accountability rules based on data life cycle. This provides a + /// differentiating value for those cases. /// /// ## Implementation Notes - /// Should be roles relevant to the event. Should not be an exhaustive list of - /// roles. + /// This can be used to provide an audit trail for data, over time, as it passes + /// through the system. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Identifier for the data life-cycle stage for the entity. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/object-lifecycle-events + pub lifecycle: Option, + /// Security labels on the entity + /// + /// Security labels for the identified entity. + /// + /// ## Requirements + /// This field identifies the security labels for a specific instance of an + /// object, such as a patient, to detect/track privacy and security issues. + /// + /// ## Implementation Notes + /// Copied from entity meta security tags. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -6400,19 +6943,23 @@ pub struct AuditEventAgent { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: What security role enabled the agent to participate in the event. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-role-type - pub role: Option>, - /// Identifier of who + /// - **Strength**: extensible + /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels + #[fhir_serde(rename = "securityLabel")] + pub security_label: Option>, + /// Descriptor for entity /// - /// Reference to who this agent is that was involved in the event. + /// A name of the entity in the audit event. /// /// ## Requirements - /// This field ties an audit event to a specific resource or identifier. + /// Use only where entity can't be identified with an identifier. /// /// ## Implementation Notes - /// Where a User ID is available it will go into who.identifier. + /// This field may be used in a query/report to identify audit events for a + /// specific person. For example, where multiple synonymous entity identifiers + /// (patient number, medical record number, encounter number, etc.) have been + /// used. /// /// ## Cardinality: Optional (0..1) /// @@ -6423,139 +6970,364 @@ pub struct AuditEventAgent { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// userId - pub who: Option, - /// Alternative User identity + /// ## Conditions + /// Used when: sev-1 + pub name: Option, + /// Descriptive text /// - /// Alternative agent Identifier. For a human, this should be a user identifier - /// text string from authentication system. This identifier would be one known to - /// a common authentication system (e.g. single sign-on), if available. + /// Text that describes the entity in more detail. /// /// ## Requirements - /// In some situations, a human user may authenticate with one identity but, to - /// access a specific application system, may use a synonymous identify. For - /// example, some "single sign on" implementations will do this. The alternative - /// identifier would then be the original identify used for authentication, and - /// the User ID is the one known to and used by the application. + /// Use only where entity can't be identified with an identifier. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "altId")] - pub alt_id: Option, - /// Human friendly name for the agent + pub description: Option, + /// Query parameters /// - /// Human-meaningful name for the agent. + /// The query parameters for a query-type entities. /// /// ## Requirements - /// The User ID and Authorization User ID may be internal or otherwise obscure - /// values. This field assists the auditor in identifying the actual user. + /// For query events, it may be necessary to capture the actual query input to + /// the query process in order to identify the specific event. Because of + /// differences among query implementations and data encoding for them, this is a + /// base 64 encoded data blob. It may be subsequently decoded or interpreted by + /// downstream audit analysis processing. + /// + /// ## Implementation Notes + /// The meaning and secondary-encoding of the content of base64 encoded blob is + /// specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, + /// and AuditEvent.entity.role. The base64 is a general-use and safe container + /// for event specific data blobs regardless of the encoding used by the + /// transaction being recorded. An AuditEvent consuming application must + /// understand the event it is consuming and the formats used by the event. For + /// example, if auditing an Oracle network database access, the Oracle formats + /// must be understood as they will be simply encoded in the base64binary blob. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Whether user is initiator /// - /// Indicator that the user is or is not the requestor, or initiator, for the - /// event being audited. + /// ## Conditions + /// Used when: sev-1 + pub query: Option, + /// Additional Information about the entity + /// + /// Tagged value pairs for conveying additional information about the entity. /// /// ## Requirements - /// This value is used to distinguish between requestor-users and - /// recipient-users. For example, one person may initiate a report-output to be - /// sent to another user. + /// Implementation-defined data about specific details of the object accessed or + /// used. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option>, +} + +/// Choice of types for the value\[x\] field in AuditEventEntityDetail +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "value")] +pub enum AuditEventEntityDetailValue { + /// Variant accepting the String type. + #[fhir_serde(rename = "valueString")] + String(String), + /// Variant accepting the Base64Binary type. + #[fhir_serde(rename = "valueBase64Binary")] + Base64Binary(Base64Binary), +} + +/// Additional Information about the entity +/// +/// Tagged value pairs for conveying additional information about the entity. +/// +/// ## Requirements +/// Implementation-defined data about specific details of the object accessed or +/// used. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "value")] +pub struct AuditEventEntityDetail { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// There can only be one initiator. If the initiator is not clear, then do not - /// choose any one agent as the initiator. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub requestor: Boolean, - /// Where + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Where the event occurred. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Name of the property + /// + /// The type of extra detail provided in the value. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "type")] + pub r#type: String, + /// Property value + /// + /// The value of the extra detail. + /// + /// ## Requirements + /// Should not duplicate the entity value unless absolutely necessary. + /// + /// ## Implementation Notes + /// The value can be string when known to be a string, else base64 encoding + /// should be used to protect binary or undefined content. The meaning and + /// secondary-encoding of the content of base64 encoded blob is specific to the + /// AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and + /// AuditEvent.entity.role. The base64 is a general-use and safe container for + /// event specific data blobs regardless of the encoding used by the transaction + /// being recorded. An AuditEvent consuming application must understand the event + /// it is consuming and the formats used by the event. For example if auditing an + /// Oracle network database access, the Oracle formats must be understood as they + /// will be simply encoded in the base64binary blob. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub value: Option, +} + +/// Audit Event Reporter +/// +/// The system that is reporting the event. +/// +/// ## Requirements +/// The event is reported by one source. +/// +/// ## Implementation Notes +/// Since multi-tier, distributed, or composite applications make source +/// identification ambiguous, this collection of fields may repeat for each +/// application or process actively involved in the event. For example, multiple +/// value-sets can identify participating web servers, application processes, and +/// database server threads in an n-tier distributed application. Passive event +/// participants (e.g. low-level network transports) need not be identified. +/// +/// ## Cardinality: Required (1..1) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct AuditEventSource { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub location: Option, - /// Policy that authorized event + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The policy or plan that authorized the activity being recorded. Typically, a - /// single activity may have multiple applicable policies, such as patient - /// consent, guarantor funding, etc. The policy would also indicate the security - /// token used. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// This value is used retrospectively to determine the authorization policies. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example: Where an OAuth token authorizes, the unique identifier from the - /// OAuth token is placed into the policy element Where a policy engine (e.g. - /// XACML) holds policy logic, the unique policy identifier is placed into the - /// policy element. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub policy: Option>, - /// Type of media + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Type of media involved. Used when the event is about exporting/importing onto - /// media. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Logical source location within the enterprise + /// + /// Logical source location within the healthcare enterprise network. For + /// example, a hospital or other provider location within a multi-entity provider + /// group. /// /// ## Requirements - /// Usually, this is used instead of specifying a network address. This field is - /// not used for Media Id (i.e. the serial number of a CD). + /// This value differentiates among the sites in a multi-site enterprise health + /// information system. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub site: Option, + /// The identity of source detecting the event /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Used when the event is about exporting/importing onto media. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/dicm-405-mediatype - pub media: Option, - /// Logical network location for application activity + /// Identifier of the source where the event was detected. /// - /// Logical network location for application activity, if the activity has a - /// network location. + /// ## Requirements + /// This field ties the event to a specific source system. It may be used to + /// group events for analysis according to where the event was detected. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub network: Option, - /// Reason given for this user /// - /// The reason (purpose of use), specific to this agent, that was used during the - /// event being recorded. + /// ## Aliases + /// SourceId + pub observer: Reference, + /// The type of source where event originated /// - /// ## Implementation Notes - /// Use AuditEvent.agent.purposeOfUse when you know that is specific to the - /// agent, otherwise use AuditEvent.purposeOfEvent. For example, during a - /// machine-to-machine transfer it might not be obvious to the audit system who - /// caused the event, but it does know why. + /// Code specifying the type of source where event originated. + /// + /// ## Requirements + /// This field indicates which type of source is identified by the Audit Source + /// ID. It is an optional value that may be used to group events for analysis + /// according to the type of source where the event occurred. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -6565,10 +7337,10 @@ pub struct AuditEventAgent { /// /// ## Binding /// - **Strength**: extensible - /// - **Description**: The reason the activity took place. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse - #[fhir_serde(rename = "purposeOfUse")] - pub purpose_of_use: Option>, + /// - **Description**: Code specifying the type of system that detected and recorded the event. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/audit-source-type + #[fhir_serde(rename = "type")] + pub r#type: Option>, } /// FHIR Basic type @@ -7684,9 +8456,23 @@ pub struct BiologicallyDerivedProductManipulation { pub time: Option, } -/// Product storage +/// Choice of types for the time\[x\] field in BiologicallyDerivedProductProcessing +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "time")] +pub enum BiologicallyDerivedProductProcessingTime { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "timeDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "timePeriod")] + Period(Period), +} + +/// Any processing of the product during collection /// -/// Product storage. +/// Any processing of the product during collection that does not change the +/// fundamental nature of the product. For example adding anti-coagulants during +/// the collection of Peripheral Blood Stem Cells. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -7694,7 +8480,8 @@ pub struct BiologicallyDerivedProductManipulation { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct BiologicallyDerivedProductStorage { +#[fhir_resource(choice_elements = "time")] +pub struct BiologicallyDerivedProductProcessing { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -7775,9 +8562,9 @@ pub struct BiologicallyDerivedProductStorage { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Description of storage + /// Description of of processing /// - /// Description of storage. + /// Description of of processing. /// /// ## Cardinality: Optional (0..1) /// @@ -7785,60 +8572,47 @@ pub struct BiologicallyDerivedProductStorage { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub description: Option, - /// Storage temperature + /// Procesing code /// - /// Storage temperature. + /// Procesing code. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub temperature: Option, - /// farenheit | celsius | kelvin /// - /// Temperature scale used. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Biologically Derived Product Procedure. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/procedure-code + pub procedure: Option, + /// Substance added during processing + /// + /// Substance added during processing. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub additive: Option, + /// Time of processing /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: BiologicallyDerived Product Storage Scale. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/product-storage-scale|4.0.1 - pub scale: Option, - /// Storage timeperiod - /// - /// Storage timeperiod. + /// Time of processing. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub duration: Option, -} - -/// Choice of types for the time\[x\] field in BiologicallyDerivedProductProcessing -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "time")] -pub enum BiologicallyDerivedProductProcessingTime { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "timeDateTime")] - DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "timePeriod")] - Period(Period), + #[fhir_serde(flatten)] + pub time: Option, } -/// Any processing of the product during collection +/// Product storage /// -/// Any processing of the product during collection that does not change the -/// fundamental nature of the product. For example adding anti-coagulants during -/// the collection of Peripheral Blood Stem Cells. +/// Product storage. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -7846,8 +8620,7 @@ pub enum BiologicallyDerivedProductProcessingTime { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "time")] -pub struct BiologicallyDerivedProductProcessing { +pub struct BiologicallyDerivedProductStorage { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -7928,9 +8701,9 @@ pub struct BiologicallyDerivedProductProcessing { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Description of of processing + /// Description of storage /// - /// Description of of processing. + /// Description of storage. /// /// ## Cardinality: Optional (0..1) /// @@ -7938,42 +8711,41 @@ pub struct BiologicallyDerivedProductProcessing { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub description: Option, - /// Procesing code + /// Storage temperature /// - /// Procesing code. + /// Storage temperature. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub temperature: Option, + /// farenheit | celsius | kelvin /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Biologically Derived Product Procedure. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/procedure-code - pub procedure: Option, - /// Substance added during processing - /// - /// Substance added during processing. + /// Temperature scale used. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub additive: Option, - /// Time of processing /// - /// Time of processing. + /// ## Binding + /// - **Strength**: required + /// - **Description**: BiologicallyDerived Product Storage Scale. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/product-storage-scale|4.0.1 + pub scale: Option, + /// Storage timeperiod + /// + /// Storage timeperiod. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub time: Option, + pub duration: Option, } /// FHIR BodyStructure type @@ -8327,6 +9099,292 @@ pub struct BodyStructure { pub patient: Reference, } +/// FHIR Bundle type +/// +/// A container for a collection of resources. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/Resource +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [Bundle](http://hl7.org/fhir/StructureDefinition/Bundle) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Bundle { + /// Logical id of this artifact + /// + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created + /// + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Persistent identifier for the bundle + /// + /// A persistent identifier for the bundle that won't change as a bundle is + /// copied from server to server. + /// + /// ## Implementation Notes + /// Persistent identity generally only matters for batches of type Document, + /// Message, and Collection. It would not normally be populated for search and + /// history results and servers ignore Bundle.identifier when processing batches + /// and transactions. For Documents the .identifier SHALL be populated such that + /// the .identifier is globally unique. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option, + /// document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection + /// + /// Indicates the purpose of this bundle - how it is intended to be used. + /// + /// ## Implementation Notes + /// It's possible to use a bundle for other purposes (e.g. a document can be + /// accepted as a transaction). This is primarily defined so that there can be + /// specific rules for some of the bundle types. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Indicates the purpose of a bundle - how it is intended to be used. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/bundle-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// When the bundle was assembled + /// + /// The date/time that the bundle was assembled - i.e. when the resources were + /// placed in the bundle. + /// + /// ## Implementation Notes + /// For many bundles, the timestamp is equal to .meta.lastUpdated, because they + /// are not stored (e.g. search results). When a bundle is placed in a persistent + /// store, .meta.lastUpdated will be usually be changed by the server. When the + /// bundle is a message, a middleware agent altering the message (even if not + /// stored) SHOULD update .meta.lastUpdated. .timestamp is used to track the + /// original time of the Bundle, and SHOULD be populated. + /// + /// Usage: + /// + /// * document : the date the document was created. Note: the composition may + /// predate the document, or be associated with multiple documents. The date of + /// the composition - the authoring time - may be earlier than the document + /// assembly time + /// * message : the date that the content of the message was assembled. This date + /// is not changed by middleware engines unless they add additional data that + /// changes the meaning of the time of the message + /// * history : the date that the history was assembled. This time would be used + /// as the _since time to ask for subsequent updates + /// * searchset : the time that the search set was assembled. Note that different + /// pages MAY have different timestamps but need not. Having different + /// timestamps does not imply that subsequent pages will represent or include + /// changes made since the initial query + /// * transaction | transaction-response | batch | batch-response | collection : + /// no particular assigned meaning + /// + /// The timestamp value should be greater than the lastUpdated and other + /// timestamps in the resources in the bundle, and it should be equal or earlier + /// than the .meta.lastUpdated on the Bundle itself. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub timestamp: Option, + /// If search, the total number of matches + /// + /// If a set of search matches, this is the total number of entries of type + /// 'match' across all pages in the search. It does not include search.mode = + /// 'include' or 'outcome' entries and it does not provide a count of the number + /// of entries in the Bundle. + /// + /// ## Implementation Notes + /// Only used if the bundle is a search result set. The total does not include + /// resources such as OperationOutcome and included resources, only the total + /// number of matching resources. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Conditions + /// Used when: bdl-1 + pub total: Option, + /// Links related to this Bundle + /// + /// A series of links that provide context to this bundle. + /// + /// ## Implementation Notes + /// Both Bundle.link and Bundle.entry.link are defined to support providing + /// additional context when Bundles are used (e.g. + /// [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS)). + /// + /// Bundle.entry.link corresponds to links found in the HTTP header if the + /// resource in the entry was [read](http.html#read) directly. + /// + /// This specification defines some specific uses of Bundle.link for + /// [searching](search.html#conformance) and [paging](http.html#paging), but no + /// specific uses for Bundle.entry.link, and no defined function in a transaction + /// - the meaning is implementation specific. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub link: Option>, + /// Entry in the bundle - will have a resource or information + /// + /// An entry in a bundle resource - will either contain a resource or information + /// about a resource (transactions and history only). + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// - Order meaning: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type + /// + /// ## Constraints + /// - **bdl-5**: must be a resource unless there's a request or response (error) + /// Expression: `resource.exists() or request.exists() or response.exists()` + /// - **bdl-8**: fullUrl cannot be a version specific reference (error) + /// Expression: `fullUrl.contains('/_history/').not()` + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub entry: Option>, + /// Digital Signature + /// + /// Digital Signature - base64 encoded. XML-DSig or a JWT. + /// + /// ## Requirements + /// A Signature holds an electronic representation of a signature and its + /// supporting context in a FHIR accessible form. The signature may either be a + /// cryptographic type (XML DigSig or a JWS), which is able to provide + /// non-repudiation proof, or it may be a graphical image that represents a + /// signature or a signature process. This element allows capturing signatures on + /// documents, messages, transactions or even search responses, to support + /// content-authentication, non-repudiation or other business cases. This is + /// primarily relevant where the bundle may travel through multiple hops or via + /// other mechanisms where HTTPS non-repudiation is insufficient. + /// + /// ## Implementation Notes + /// The signature could be created by the "author" of the bundle or by the + /// originating device. Requirements around inclusion of a signature, + /// verification of signatures and treatment of signed/non-signed bundles is + /// implementation-environment specific. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub signature: Option, +} + /// Entry in the bundle - will have a resource or information /// /// An entry in a bundle resource - will either contain a resource or information @@ -8538,11 +9596,11 @@ pub struct BundleEntry { pub response: Option, } -/// Results of execution (transaction/batch/history) +/// Additional execution information (transaction/batch/history) /// -/// Indicates the results of processing the corresponding 'request' entry in the -/// batch or transaction being responded to or what the results of an operation -/// where when returning history. +/// Additional information about how this entry should be processed as part of a +/// transaction or batch. For history, it shows how the entry was processed to +/// create the version contained in the entry. /// /// ## Cardinality: Optional (0..1) /// @@ -8554,9 +9612,9 @@ pub struct BundleEntry { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Conditions -/// Used when: bdl-4 +/// Used when: bdl-3 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct BundleEntryResponse { +pub struct BundleEntryRequest { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -8637,11 +9695,10 @@ pub struct BundleEntryResponse { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Status response code (text optional) + /// GET | HEAD | POST | PUT | DELETE | PATCH /// - /// The status code returned by processing this entry. The status SHALL start - /// with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP - /// description associated with the status code. + /// In a transaction or batch, this is the HTTP action to be executed for this + /// entry. In a history bundle, this indicates the HTTP action that occurred. /// /// ## Cardinality: Required (1..1) /// @@ -8651,13 +9708,23 @@ pub struct BundleEntryResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub status: String, - /// The location (if the operation returns a location) /// - /// The location header created by processing this operation, populated if the - /// operation returns a location. + /// ## Binding + /// - **Strength**: required + /// - **Description**: HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/http-verb|4.0.1 + pub method: Code, + /// URL for HTTP equivalent of this entry /// - /// ## Cardinality: Optional (0..1) + /// The URL for this entry, relative to the root (the address to which the + /// request is posted). + /// + /// ## Implementation Notes + /// E.g. for a Patient Create, the method would be "POST" and the URL would be + /// "Patient". For a Patient Update, the method would be PUT and the URL would be + /// "Patient/[id]". + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -8665,17 +9732,11 @@ pub struct BundleEntryResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub location: Option, - /// The Etag for the resource (if relevant) - /// - /// The Etag for the resource, if the operation for the entry produced a - /// versioned resource (see [Resource Metadata and - /// Versioning](http.html#versioning) and [Managing Resource - /// Contention](http.html#concurrency)). + pub url: Uri, + /// For managing cache currency /// - /// ## Implementation Notes - /// Etags match the Resource.meta.versionId. The ETag has to match the version id - /// in the header if a resource is included. + /// If the ETag values match, return a 304 Not Modified status. See the API + /// documentation for ["Conditional Read"](http.html#cread). /// /// ## Cardinality: Optional (0..1) /// @@ -8685,14 +9746,12 @@ pub struct BundleEntryResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub etag: Option, - /// Server's date time modified - /// - /// The date/time that the resource was modified on the server. + #[fhir_serde(rename = "ifNoneMatch")] + pub if_none_match: Option, + /// For managing cache currency /// - /// ## Implementation Notes - /// This has to match the same time in the meta header (meta.lastUpdated) if a - /// resource is included. + /// Only perform the operation if the last updated date matches. See the API + /// documentation for ["Conditional Read"](http.html#cread). /// /// ## Cardinality: Optional (0..1) /// @@ -8702,35 +9761,47 @@ pub struct BundleEntryResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lastModified")] - pub last_modified: Option, - /// OperationOutcome with hints and warnings (for batch/transaction) + #[fhir_serde(rename = "ifModifiedSince")] + pub if_modified_since: Option, + /// For managing update contention /// - /// An OperationOutcome containing hints and warnings produced as part of - /// processing this entry in a batch or transaction. + /// Only perform the operation if the Etag value matches. For more information, + /// see the API section ["Managing Resource Contention"](http.html#concurrency). /// - /// ## Implementation Notes - /// For a POST/PUT operation, this is the equivalent outcome that would be - /// returned for prefer = operationoutcome - except that the resource is always - /// returned whether or not the outcome is returned. + /// ## Cardinality: Optional (0..1) /// - /// This outcome is not used for error responses in batch/transaction, only for - /// hints and warnings. In a batch operation, the error will be in - /// Bundle.entry.response, and for transaction, there will be a single - /// OperationOutcome instead of a bundle in the case of an error. + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "ifMatch")] + pub if_match: Option, + /// For conditional creates + /// + /// Instruct the server not to perform the create if a specified resource already + /// exists. For further information, see the API documentation for ["Conditional + /// Create"](http.html#ccreate). This is just the query portion of the URL - what + /// follows the "?" (not including the "?"). /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary - pub outcome: Option, + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "ifNoneExist")] + pub if_none_exist: Option, } -/// Additional execution information (transaction/batch/history) +/// Results of execution (transaction/batch/history) /// -/// Additional information about how this entry should be processed as part of a -/// transaction or batch. For history, it shows how the entry was processed to -/// create the version contained in the entry. +/// Indicates the results of processing the corresponding 'request' entry in the +/// batch or transaction being responded to or what the results of an operation +/// where when returning history. /// /// ## Cardinality: Optional (0..1) /// @@ -8742,9 +9813,9 @@ pub struct BundleEntryResponse { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Conditions -/// Used when: bdl-3 +/// Used when: bdl-4 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct BundleEntryRequest { +pub struct BundleEntryResponse { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -8825,34 +9896,11 @@ pub struct BundleEntryRequest { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// GET | HEAD | POST | PUT | DELETE | PATCH - /// - /// In a transaction or batch, this is the HTTP action to be executed for this - /// entry. In a history bundle, this indicates the HTTP action that occurred. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/http-verb|4.0.1 - pub method: Code, - /// URL for HTTP equivalent of this entry - /// - /// The URL for this entry, relative to the root (the address to which the - /// request is posted). + /// Status response code (text optional) /// - /// ## Implementation Notes - /// E.g. for a Patient Create, the method would be "POST" and the URL would be - /// "Patient". For a Patient Update, the method would be PUT and the URL would be - /// "Patient/[id]". + /// The status code returned by processing this entry. The status SHALL start + /// with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP + /// description associated with the status code. /// /// ## Cardinality: Required (1..1) /// @@ -8862,178 +9910,11 @@ pub struct BundleEntryRequest { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Uri, - /// For managing cache currency - /// - /// If the ETag values match, return a 304 Not Modified status. See the API - /// documentation for ["Conditional Read"](http.html#cread). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "ifNoneMatch")] - pub if_none_match: Option, - /// For managing cache currency - /// - /// Only perform the operation if the last updated date matches. See the API - /// documentation for ["Conditional Read"](http.html#cread). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "ifModifiedSince")] - pub if_modified_since: Option, - /// For managing update contention - /// - /// Only perform the operation if the Etag value matches. For more information, - /// see the API section ["Managing Resource Contention"](http.html#concurrency). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "ifMatch")] - pub if_match: Option, - /// For conditional creates - /// - /// Instruct the server not to perform the create if a specified resource already - /// exists. For further information, see the API documentation for ["Conditional - /// Create"](http.html#ccreate). This is just the query portion of the URL - what - /// follows the "?" (not including the "?"). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "ifNoneExist")] - pub if_none_exist: Option, -} - -/// FHIR Bundle type -/// -/// A container for a collection of resources. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/Resource -/// -/// ## Status: active -/// FHIR Version: 4.0.1 -/// -/// See: [Bundle](http://hl7.org/fhir/StructureDefinition/Bundle) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Bundle { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Persistent identifier for the bundle - /// - /// A persistent identifier for the bundle that won't change as a bundle is - /// copied from server to server. + pub status: String, + /// The location (if the operation returns a location) /// - /// ## Implementation Notes - /// Persistent identity generally only matters for batches of type Document, - /// Message, and Collection. It would not normally be populated for search and - /// history results and servers ignore Bundle.identifier when processing batches - /// and transactions. For Documents the .identifier SHALL be populated such that - /// the .identifier is globally unique. + /// The location header created by processing this operation, populated if the + /// operation returns a location. /// /// ## Cardinality: Optional (0..1) /// @@ -9043,65 +9924,17 @@ pub struct Bundle { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, - /// document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection - /// - /// Indicates the purpose of this bundle - how it is intended to be used. - /// - /// ## Implementation Notes - /// It's possible to use a bundle for other purposes (e.g. a document can be - /// accepted as a transaction). This is primarily defined so that there can be - /// specific rules for some of the bundle types. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Indicates the purpose of a bundle - how it is intended to be used. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/bundle-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// When the bundle was assembled + pub location: Option, + /// The Etag for the resource (if relevant) /// - /// The date/time that the bundle was assembled - i.e. when the resources were - /// placed in the bundle. + /// The Etag for the resource, if the operation for the entry produced a + /// versioned resource (see [Resource Metadata and + /// Versioning](http.html#versioning) and [Managing Resource + /// Contention](http.html#concurrency)). /// /// ## Implementation Notes - /// For many bundles, the timestamp is equal to .meta.lastUpdated, because they - /// are not stored (e.g. search results). When a bundle is placed in a persistent - /// store, .meta.lastUpdated will be usually be changed by the server. When the - /// bundle is a message, a middleware agent altering the message (even if not - /// stored) SHOULD update .meta.lastUpdated. .timestamp is used to track the - /// original time of the Bundle, and SHOULD be populated. - /// - /// Usage: - /// - /// * document : the date the document was created. Note: the composition may - /// predate the document, or be associated with multiple documents. The date of - /// the composition - the authoring time - may be earlier than the document - /// assembly time - /// * message : the date that the content of the message was assembled. This date - /// is not changed by middleware engines unless they add additional data that - /// changes the meaning of the time of the message - /// * history : the date that the history was assembled. This time would be used - /// as the _since time to ask for subsequent updates - /// * searchset : the time that the search set was assembled. Note that different - /// pages MAY have different timestamps but need not. Having different - /// timestamps does not imply that subsequent pages will represent or include - /// changes made since the initial query - /// * transaction | transaction-response | batch | batch-response | collection : - /// no particular assigned meaning - /// - /// The timestamp value should be greater than the lastUpdated and other - /// timestamps in the resources in the bundle, and it should be equal or earlier - /// than the .meta.lastUpdated on the Bundle itself. + /// Etags match the Resource.meta.versionId. The ETag has to match the version id + /// in the header if a resource is included. /// /// ## Cardinality: Optional (0..1) /// @@ -9111,18 +9944,14 @@ pub struct Bundle { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub timestamp: Option, - /// If search, the total number of matches + pub etag: Option, + /// Server's date time modified /// - /// If a set of search matches, this is the total number of entries of type - /// 'match' across all pages in the search. It does not include search.mode = - /// 'include' or 'outcome' entries and it does not provide a count of the number - /// of entries in the Bundle. + /// The date/time that the resource was modified on the server. /// /// ## Implementation Notes - /// Only used if the bundle is a search result set. The total does not include - /// resources such as OperationOutcome and included resources, only the total - /// number of matching resources. + /// This has to match the same time in the meta header (meta.lastUpdated) if a + /// resource is included. /// /// ## Cardinality: Optional (0..1) /// @@ -9132,85 +9961,28 @@ pub struct Bundle { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "lastModified")] + pub last_modified: Option, + /// OperationOutcome with hints and warnings (for batch/transaction) /// - /// ## Conditions - /// Used when: bdl-1 - pub total: Option, - /// Links related to this Bundle - /// - /// A series of links that provide context to this bundle. + /// An OperationOutcome containing hints and warnings produced as part of + /// processing this entry in a batch or transaction. /// /// ## Implementation Notes - /// Both Bundle.link and Bundle.entry.link are defined to support providing - /// additional context when Bundles are used (e.g. - /// [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS)). - /// - /// Bundle.entry.link corresponds to links found in the HTTP header if the - /// resource in the entry was [read](http.html#read) directly. - /// - /// This specification defines some specific uses of Bundle.link for - /// [searching](search.html#conformance) and [paging](http.html#paging), but no - /// specific uses for Bundle.entry.link, and no defined function in a transaction - /// - the meaning is implementation specific. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub link: Option>, - /// Entry in the bundle - will have a resource or information - /// - /// An entry in a bundle resource - will either contain a resource or information - /// about a resource (transactions and history only). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - Order meaning: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type - /// - /// ## Constraints - /// - **bdl-5**: must be a resource unless there's a request or response (error) - /// Expression: `resource.exists() or request.exists() or response.exists()` - /// - **bdl-8**: fullUrl cannot be a version specific reference (error) - /// Expression: `fullUrl.contains('/_history/').not()` - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub entry: Option>, - /// Digital Signature - /// - /// Digital Signature - base64 encoded. XML-DSig or a JWT. - /// - /// ## Requirements - /// A Signature holds an electronic representation of a signature and its - /// supporting context in a FHIR accessible form. The signature may either be a - /// cryptographic type (XML DigSig or a JWS), which is able to provide - /// non-repudiation proof, or it may be a graphical image that represents a - /// signature or a signature process. This element allows capturing signatures on - /// documents, messages, transactions or even search responses, to support - /// content-authentication, non-repudiation or other business cases. This is - /// primarily relevant where the bundle may travel through multiple hops or via - /// other mechanisms where HTTPS non-repudiation is insufficient. + /// For a POST/PUT operation, this is the equivalent outcome that would be + /// returned for prefer = operationoutcome - except that the resource is always + /// returned whether or not the outcome is returned. /// - /// ## Implementation Notes - /// The signature could be created by the "author" of the bundle or by the - /// originating device. Requirements around inclusion of a signature, - /// verification of signatures and treatment of signed/non-signed bundles is - /// implementation-environment specific. + /// This outcome is not used for error responses in batch/transaction, only for + /// hints and warnings. In a batch operation, the error will be in + /// Bundle.entry.response, and for transaction, there will be a single + /// OperationOutcome instead of a bundle in the case of an error. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub signature: Option, + pub outcome: Option, } /// Search related information @@ -9494,188 +10266,156 @@ pub struct BundleLink { pub url: Uri, } -/// Information about security of implementation +/// FHIR CapabilityStatement type /// -/// Information about security implementation from an interface perspective - -/// what a client needs to know. +/// A Capability Statement documents a set of capabilities (behaviors) of a FHIR +/// Server for a particular version of FHIR that may be used as a statement of +/// actual server functionality or a statement of required or desired server +/// implementation. /// -/// ## Cardinality: Optional (0..1) +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource /// -/// ## Special Semantics -/// - Included in summary +/// ## Status: active +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [CapabilityStatement](http://hl7.org/fhir/StructureDefinition/CapabilityStatement) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRestSecurity { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations +pub struct CapabilityStatement { + /// Logical id of this artifact /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Adds CORS Headers (http://enable-cors.org/) + pub meta: Option, + /// A set of rules under which this content was created /// - /// Server adds CORS headers when responding to requests - this enables - /// Javascript applications to use the server. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// The easiest CORS headers to add are Access-Control-Allow-Origin: * & - /// Access-Control-Request-Method: GET, POST, PUT, DELETE. All servers SHOULD - /// support CORS. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub cors: Option, - /// OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// Types of security services that are supported/required by the system. + /// The base language in which the resource is written. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Types of security services used with FHIR. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/restful-security-service - pub service: Option>, - /// General description of how security works + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// General description of how security works. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, -} - -/// If the endpoint is a RESTful one -/// -/// A definition of the restful capabilities of the solution, if any. -/// -/// ## Implementation Notes -/// Multiple repetitions allow definition of both client and/or server behaviors -/// or possibly behaviors under different configuration settings (for software or -/// requirements statements). -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **cpb-9**: A given resource can only be described once per RESTful mode. (error) -/// Expression: `resource.select(type).isDistinct()` -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Conditions -/// Used when: cpb-1 -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRest { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -9695,16 +10435,16 @@ pub struct CapabilityStatementRest { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -9729,8 +10469,7 @@ pub struct CapabilityStatementRest { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -9739,43 +10478,61 @@ pub struct CapabilityStatementRest { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// client | server - /// - /// Identifies whether this portion of the statement is describing the ability to - /// initiate or receive restful operations. + /// Canonical identifier for this capability statement, represented as a URI (globally unique) /// - /// ## Cardinality: Required (1..1) + /// An absolute URI that is used to identify this capability statement when it is + /// referenced in a specification, model, design or an instance; also called its + /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal + /// address at which at which an authoritative instance of this capability + /// statement is (or will be) published. This URL can be the target of a + /// canonical reference. It SHALL remain the same when the capability statement + /// is stored on different servers. /// - /// ## Special Semantics - /// - Included in summary + /// ## Requirements + /// Allows the capability statement to be referenced by a single globally unique + /// identifier. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// ## Implementation Notes + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The mode of a RESTful capability statement. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/restful-capability-mode|4.0.1 - pub mode: Code, - /// General description of implementation + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). /// - /// Information about the system's restful capabilities that apply across all - /// applications, such as security. + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, - /// Information about security of implementation + pub url: Option, + /// Business version of the capability statement /// - /// Information about security implementation from an interface perspective - - /// what a client needs to know. + /// The identifier that is used to identify this version of the capability + /// statement when it is referenced in a specification, model, design or + /// instance. This is an arbitrary value managed by the capability statement + /// author and is not expected to be globally unique. For example, it might be a + /// timestamp (e.g. yyyymmdd) if a managed version is not available. There is + /// also no expectation that versions can be placed in a lexicographical + /// sequence. + /// + /// ## Implementation Notes + /// There may be different capability statement instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the + /// capability statement with the format [url]|[version]. /// /// ## Cardinality: Optional (0..1) /// @@ -9785,72 +10542,89 @@ pub struct CapabilityStatementRest { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub security: Option, - /// Resource served on the REST interface + pub version: Option, + /// Name for this capability statement (computer friendly) /// - /// A specification of the restful capabilities of the solution for a specific - /// resource type. + /// A natural language name identifying the capability statement. This name + /// should be usable as an identifier for the module by machine processing + /// applications such as code generation. + /// + /// ## Requirements + /// Support human navigation and code generation. /// /// ## Implementation Notes - /// Max of one repetition per resource type. + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints - /// - **cpb-12**: Search parameter names must be unique in the context of a resource. (error) - /// Expression: `searchParam.select(name).isDistinct()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub resource: Option>, - /// What operations are supported? /// - /// A specification of restful operations supported by the system. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// Name for this capability statement (human friendly) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// A short, descriptive, user-friendly title for the capability statement. + /// + /// ## Implementation Notes + /// This name does not need to be machine-processing friendly and may contain + /// punctuation, white-space, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub interaction: Option>, - /// Search parameters for searching all resources + pub title: Option, + /// draft | active | retired | unknown /// - /// Search parameters that are supported for searching all resources for - /// implementations to support and/or make use of - either references to ones - /// defined in the specification, or additional ones defined for/by the - /// implementation. + /// The status of this capability statement. Enables tracking the life-cycle of + /// the content. /// /// ## Implementation Notes - /// Typically, the only search parameters supported for all searches are those - /// that apply to all resources - tags, profiles, text search etc. These search - /// parameters should include the control search parameters such as _sort, - /// _count, etc. that also apply to this resource (though many will be listed at - /// [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). - /// The behavior of some search parameters may be further described by other code - /// or extension elements, or narrative within the capability statement or linked - /// [SearchParameter](searchparameter.html#) definitions. + /// Allows filtering of capability statements that are appropriate for use versus + /// not.This is not intended for use with actual capability statements, but where + /// capability statements are used to describe possible or desired systems. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "searchParam")] - pub search_param: Option>, - /// Definition of a system level operation /// - /// Definition of an operation or a named query together with its parameters and - /// their meaning and type. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// For testing purposes, not real usage + /// + /// A Boolean value to indicate that this capability statement is authored for + /// testing purposes (or education/evaluation/marketing) and is not intended to + /// be used for genuine usage. + /// + /// ## Requirements + /// Enables experimental content to be developed following the same lifecycle + /// that would be used for a production-level capability statement. /// /// ## Implementation Notes - /// CapabilityStatement.rest.operation is for operations invoked at the system - /// level, or for operations that are supported across multiple resource types. - /// Operations linked from CapabilityStatement.rest.operation must have - /// OperationDefinition.system = true, or more than one Operation.resource. + /// Allows filtering of capability statements that are appropriate for use versus + /// not. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -9858,1017 +10632,95 @@ pub struct CapabilityStatementRest { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub operation: Option>, - /// Compartments served/used by system + pub experimental: Option, + /// Date last changed /// - /// An absolute URI which is a reference to the definition of a compartment that - /// the system supports. The reference is to a CompartmentDefinition resource by - /// its canonical URL . + /// The date (and optionally time) when the capability statement was published. + /// The date must change when the business version changes and it must change if + /// the status code changes. In addition, it should change when the substantive + /// content of the capability statement changes. /// /// ## Implementation Notes - /// At present, the only defined compartments are at - /// [CompartmentDefinition](compartmentdefinition.html). + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the capability statement. + /// Additional specific dates may be added as extensions or be found by + /// consulting Provenances associated with past versions of the resource. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub compartment: Option>, -} - -/// What operations are supported? -/// -/// A specification of restful operations supported by the system. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRestInteraction { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Aliases + /// Revision Date + pub date: DateTime, + /// Name of the publisher (organization or individual) /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// The name of the organization or individual that published the capability + /// statement. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// Helps establish the "authority/credibility" of the capability statement. May + /// also allow for contact. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the capability statement is the organization or individual primarily + /// responsible for the maintenance and upkeep of the capability statement. This + /// is not necessarily the same individual or organization that developed and + /// initially authored the content. The publisher is the primary point of contact + /// for questions or issues with the capability statement. This item SHOULD be + /// populated unless the information is available from context. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + pub publisher: Option, + /// Contact details for the publisher /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// May be a web site, an email address, a telephone number, etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub contact: Option>, + /// Natural language description of the capability statement /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// transaction | batch | search-system | history-system + /// A free text natural language description of the capability statement from a + /// consumer's perspective. Typically, this is used when the capability statement + /// describes a desired rather than an actual solution, for example as a formal + /// expression of requirements as part of an RFP. /// - /// A coded identifier of the operation, supported by the system. + /// ## Implementation Notes + /// This description can be used to capture details such as why the capability + /// statement was built, comments about misuse, instructions for clinical use and + /// interpretation, literature references, examples from the paper world, etc. It + /// is not a rendering of the capability statement as conveyed in the 'text' + /// field of the resource itself. This item SHOULD be populated unless the + /// information is available from context (e.g. the language of the capability + /// statement is presumed to be the predominant language in the place the + /// capability statement was created).This does not need to be populated if the + /// description is adequately implied by the software or implementation details. /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Operations supported by REST at the system level. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/system-restful-interaction|4.0.1 - pub code: Code, - /// Anything special about operation behavior - /// - /// Guidance specific to the implementation of this operation, such as - /// limitations on the kind of transactions allowed, or information about system - /// wide search is implemented. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, -} - -/// If messaging is supported -/// -/// A description of the messaging capabilities of the solution. -/// -/// ## Implementation Notes -/// Multiple repetitions allow the documentation of multiple endpoints per -/// solution. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Conditions -/// Used when: cpb-1 -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementMessaging { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Where messages should be sent - /// - /// An endpoint (network accessible address) to which messages and/or replies are - /// to be sent. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// 3 - pub endpoint: Option>, - /// Reliable Message Cache Length (min) - /// - /// Length if the receiver's reliable messaging cache in minutes (if a receiver) - /// or how long the cache length on the receiver should be (if a sender). - /// - /// ## Implementation Notes - /// If this value is missing then the application does not implement (receiver) - /// or depend on (sender) reliable messaging. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reliableCache")] - pub reliable_cache: Option, - /// Messaging interface behavior details - /// - /// Documentation about the system's messaging capabilities for this endpoint not - /// otherwise documented by the capability statement. For example, the process - /// for becoming an authorized messaging exchange partner. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, - /// Messages supported by this system - /// - /// References to message definitions for messages this system can send or - /// receive. - /// - /// ## Implementation Notes - /// This is a proposed alternative to the messaging.event structure. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportedMessage")] - pub supported_message: Option>, -} - -/// Where messages should be sent -/// -/// An endpoint (network accessible address) to which messages and/or replies are -/// to be sent. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Aliases -/// 3 -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementMessagingEndpoint { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// http | ftp | mllp + - /// - /// A list of the messaging transport protocol(s) identifiers, supported by this - /// endpoint. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The protocol used for message transport. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/message-transport - pub protocol: Coding, - /// Network address or identifier of the end-point - /// - /// The network address of the endpoint. For solutions that do not use network - /// addresses for routing, it can be just an identifier. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub address: Url, -} - -/// What operations are supported? -/// -/// Identifies a restful operation supported by the solution. -/// -/// ## Implementation Notes -/// In general, a Resource will only appear in a CapabilityStatement if the -/// server actually has some capabilities - e.g. there is at least one -/// interaction supported. However interactions can be omitted to support -/// summarization (_summary = true). -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRestResourceInteraction { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// read | vread | update | patch | delete | history-instance | history-type | create | search-type - /// - /// Coded identifier of the operation, supported by the system resource. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Operations supported by REST at the type or instance level. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/type-restful-interaction|4.0.1 - pub code: Code, - /// Anything special about operation behavior - /// - /// Guidance specific to the implementation of this operation, such as 'delete is - /// a logical delete' or 'updates are only allowed with version id' or 'creates - /// permitted from pre-authorized certificates only'. - /// - /// ## Requirements - /// REST allows a degree of variability in the implementation of RESTful - /// solutions that is useful for exchange partners to be aware of. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, -} - -/// FHIR CapabilityStatement type -/// -/// A Capability Statement documents a set of capabilities (behaviors) of a FHIR -/// Server for a particular version of FHIR that may be used as a statement of -/// actual server functionality or a statement of required or desired server -/// implementation. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: active -/// FHIR Version: 4.0.1 -/// -/// See: [CapabilityStatement](http://hl7.org/fhir/StructureDefinition/CapabilityStatement) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatement { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Canonical identifier for this capability statement, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this capability statement when it is - /// referenced in a specification, model, design or an instance; also called its - /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal - /// address at which at which an authoritative instance of this capability - /// statement is (or will be) published. This URL can be the target of a - /// canonical reference. It SHALL remain the same when the capability statement - /// is stored on different servers. - /// - /// ## Requirements - /// Allows the capability statement to be referenced by a single globally unique - /// identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). - /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Business version of the capability statement - /// - /// The identifier that is used to identify this version of the capability - /// statement when it is referenced in a specification, model, design or - /// instance. This is an arbitrary value managed by the capability statement - /// author and is not expected to be globally unique. For example, it might be a - /// timestamp (e.g. yyyymmdd) if a managed version is not available. There is - /// also no expectation that versions can be placed in a lexicographical - /// sequence. - /// - /// ## Implementation Notes - /// There may be different capability statement instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// capability statement with the format [url]|[version]. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this capability statement (computer friendly) - /// - /// A natural language name identifying the capability statement. This name - /// should be usable as an identifier for the module by machine processing - /// applications such as code generation. - /// - /// ## Requirements - /// Support human navigation and code generation. - /// - /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: inv-0 - pub name: Option, - /// Name for this capability statement (human friendly) - /// - /// A short, descriptive, user-friendly title for the capability statement. - /// - /// ## Implementation Notes - /// This name does not need to be machine-processing friendly and may contain - /// punctuation, white-space, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// draft | active | retired | unknown - /// - /// The status of this capability statement. Enables tracking the life-cycle of - /// the content. - /// - /// ## Implementation Notes - /// Allows filtering of capability statements that are appropriate for use versus - /// not.This is not intended for use with actual capability statements, but where - /// capability statements are used to describe possible or desired systems. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// For testing purposes, not real usage - /// - /// A Boolean value to indicate that this capability statement is authored for - /// testing purposes (or education/evaluation/marketing) and is not intended to - /// be used for genuine usage. - /// - /// ## Requirements - /// Enables experimental content to be developed following the same lifecycle - /// that would be used for a production-level capability statement. - /// - /// ## Implementation Notes - /// Allows filtering of capability statements that are appropriate for use versus - /// not. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub experimental: Option, - /// Date last changed - /// - /// The date (and optionally time) when the capability statement was published. - /// The date must change when the business version changes and it must change if - /// the status code changes. In addition, it should change when the substantive - /// content of the capability statement changes. - /// - /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the capability statement. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Revision Date - pub date: DateTime, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the capability - /// statement. - /// - /// ## Requirements - /// Helps establish the "authority/credibility" of the capability statement. May - /// also allow for contact. - /// - /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the capability statement is the organization or individual primarily - /// responsible for the maintenance and upkeep of the capability statement. This - /// is not necessarily the same individual or organization that developed and - /// initially authored the content. The publisher is the primary point of contact - /// for questions or issues with the capability statement. This item SHOULD be - /// populated unless the information is available from context. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher - /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. - /// - /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the capability statement - /// - /// A free text natural language description of the capability statement from a - /// consumer's perspective. Typically, this is used when the capability statement - /// describes a desired rather than an actual solution, for example as a formal - /// expression of requirements as part of an RFP. - /// - /// ## Implementation Notes - /// This description can be used to capture details such as why the capability - /// statement was built, comments about misuse, instructions for clinical use and - /// interpretation, literature references, examples from the paper world, etc. It - /// is not a rendering of the capability statement as conveyed in the 'text' - /// field of the resource itself. This item SHOULD be populated unless the - /// information is available from context (e.g. the language of the capability - /// statement is presumed to be the predominant language in the place the - /// capability statement was created).This does not need to be populated if the - /// description is adequately implied by the software or implementation details. - /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -11229,13 +11081,11 @@ pub struct CapabilityStatement { pub document: Option>, } -/// If this describes a specific instance +/// Document definition /// -/// Identifies a specific implementation instance that is described by the -/// capability statement - i.e. a particular installation, rather than the -/// capabilities of a software program. +/// A document definition. /// -/// ## Cardinality: Optional (0..1) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -11245,9 +11095,9 @@ pub struct CapabilityStatement { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Conditions -/// Used when: cpb-2, cpb-15 +/// Used when: cpb-1 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementImplementation { +pub struct CapabilityStatementDocument { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -11328,10 +11178,10 @@ pub struct CapabilityStatementImplementation { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Describes this specific instance + /// producer | consumer /// - /// Information about the specific installation that this capability statement - /// relates to. + /// Mode of this document declaration - whether an application is a producer or + /// consumer. /// /// ## Cardinality: Required (1..1) /// @@ -11341,27 +11191,33 @@ pub struct CapabilityStatementImplementation { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: String, - /// Base URL for the installation /// - /// An absolute base URL for the implementation. This forms the base for REST - /// interfaces as well as the mailbox and document interfaces. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Whether the application produces or consumes documents. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-mode|4.0.1 + pub mode: Code, + /// Description of document support /// - /// ## Cardinality: Optional (0..1) + /// A description of how the application supports or uses the specified document + /// profile. For example, when documents are created, what action is taken with + /// consumed documents, etc. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Organization that manages the data + pub documentation: Option, + /// Constraint on the resources used in the document /// - /// The organization responsible for the management of the instance and oversight - /// of the data on the server at the specified URL. + /// A profile on the document Bundle that constrains which resources are present, + /// and their contents. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// The profile is actually on the Bundle. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -11369,26 +11225,16 @@ pub struct CapabilityStatementImplementation { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub custodian: Option, + pub profile: Canonical, } -/// Definition of a resource operation -/// -/// Definition of an operation or a named query together with its parameters and -/// their meaning and type. Consult the definition of the operation for details -/// about how to invoke the operation, and the parameters. -/// -/// ## Implementation Notes -/// Operations linked from CapabilityStatement.rest.resource.operation must have -/// OperationDefinition.type = true or OperationDefinition.instance = true. +/// If this describes a specific instance /// -/// If an operation that is listed in multiple -/// CapabilityStatement.rest.resource.operation (e.g. for different resource -/// types), then clients should understand that the operation is only supported -/// on the specified resource types, and that may be a subset of those listed in -/// OperationDefinition.resource. +/// Identifies a specific implementation instance that is described by the +/// capability statement - i.e. a particular installation, rather than the +/// capabilities of a software program. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -11396,8 +11242,11 @@ pub struct CapabilityStatementImplementation { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: cpb-2, cpb-15 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRestResourceOperation { +pub struct CapabilityStatementImplementation { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -11478,16 +11327,10 @@ pub struct CapabilityStatementRestResourceOperation { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Name by which the operation/query is invoked - /// - /// The name of the operation or query. For an operation, this is the name - /// prefixed with $ and used in the URL. For a query, this is the name used in - /// the _query parameter when the query is called. + /// Describes this specific instance /// - /// ## Implementation Notes - /// The name here SHOULD be the same as the name in the definition, unless there - /// is a name clash and the name cannot be used. The name does not include the - /// "$" portion that is always included in the URL. + /// Information about the specific installation that this capability statement + /// relates to. /// /// ## Cardinality: Required (1..1) /// @@ -11497,22 +11340,13 @@ pub struct CapabilityStatementRestResourceOperation { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: String, - /// The defined operation/query - /// - /// Where the formal definition can be found. If a server references the base - /// definition of an Operation (i.e. from the specification itself such as - /// ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it - /// supports the full capabilities of the operation - e.g. both GET and POST - /// invocation. If it only supports a subset, it must define its own custom - /// [OperationDefinition](operationdefinition.html#) with a 'base' of the - /// original OperationDefinition. The custom definition would describe the - /// specific subset of functionality supported. + pub description: String, + /// Base URL for the installation /// - /// ## Implementation Notes - /// This can be used to build an HTML form to invoke the operation, for instance. + /// An absolute base URL for the implementation. This forms the base for REST + /// interfaces as well as the mailbox and document interfaces. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -11520,43 +11354,44 @@ pub struct CapabilityStatementRestResourceOperation { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub definition: Canonical, - /// Specific details about operation behavior + pub url: Option, + /// Organization that manages the data /// - /// Documentation that describes anything special about the operation behavior, - /// possibly detailing different behavior for system, type and instance-level - /// invocation of the operation. + /// The organization responsible for the management of the instance and oversight + /// of the data on the server at the specified URL. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, + pub custodian: Option, } -/// Search parameters supported by implementation +/// If messaging is supported /// -/// Search parameters for implementations to support and/or make use of - either -/// references to ones defined in the specification, or additional ones defined -/// for/by the implementation. +/// A description of the messaging capabilities of the solution. /// /// ## Implementation Notes -/// The search parameters should include the control search parameters such as -/// _sort, _count, etc. that also apply to this resource (though many will be -/// listed at -/// [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). -/// The behavior of some search parameters may be further described by other code -/// or extension elements, or narrative within the capability statement or linked -/// [SearchParameter](searchparameter.html#) definitions. -/// +/// Multiple repetitions allow the documentation of multiple endpoints per +/// solution. +/// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: cpb-1 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementRestResourceSearchParam { +pub struct CapabilityStatementMessaging { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -11637,54 +11472,167 @@ pub struct CapabilityStatementRestResourceSearchParam { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Name of search parameter + /// Where messages should be sent /// - /// The name of the search parameter used in the interface. + /// An endpoint (network accessible address) to which messages and/or replies are + /// to be sent. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// 3 + pub endpoint: Option>, + /// Reliable Message Cache Length (min) + /// + /// Length if the receiver's reliable messaging cache in minutes (if a receiver) + /// or how long the cache length on the receiver should be (if a sender). /// /// ## Implementation Notes - /// Parameter names cannot overlap with standard parameter names, and standard - /// parameters cannot be redefined. + /// If this value is missing then the application does not implement (receiver) + /// or depend on (sender) reliable messaging. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: String, - /// Source of definition for parameter + #[fhir_serde(rename = "reliableCache")] + pub reliable_cache: Option, + /// Messaging interface behavior details /// - /// An absolute URI that is a formal reference to where this parameter was first - /// defined, so that a client can be confident of the meaning of the search - /// parameter (a reference to - /// [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). - /// This element SHALL be populated if the search parameter refers to a - /// SearchParameter defined by the FHIR core specification or externally defined - /// IGs. + /// Documentation about the system's messaging capabilities for this endpoint not + /// otherwise documented by the capability statement. For example, the process + /// for becoming an authorized messaging exchange partner. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub documentation: Option, + /// Messages supported by this system + /// + /// References to message definitions for messages this system can send or + /// receive. /// /// ## Implementation Notes - /// This SHOULD be present, and matches refers to a SearchParameter by its - /// canonical URL. If systems wish to document their support for modifiers, - /// comparators, target resource types, and chained parameters, they should do - /// using a search parameter resource. This element SHALL be populated if the - /// search parameter refers to a SearchParameter defined by the FHIR core - /// specification or externally defined IGs. + /// This is a proposed alternative to the messaging.event structure. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "supportedMessage")] + pub supported_message: Option>, +} + +/// Where messages should be sent +/// +/// An endpoint (network accessible address) to which messages and/or replies are +/// to be sent. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Aliases +/// 3 +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CapabilityStatementMessagingEndpoint { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub definition: Option, - /// number | date | string | token | reference | composite | quantity | uri | special + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The type of value a search parameter refers to, and how the content is - /// interpreted. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// While this can be looked up from the definition, it is included here as a - /// convenience for systems that autogenerate a query interface based on the - /// server capability statement. It SHALL be the same as the type in the search - /// parameter definition. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// http | ftp | mllp + + /// + /// A list of the messaging transport protocol(s) identifiers, supported by this + /// endpoint. /// /// ## Cardinality: Required (1..1) /// @@ -11693,22 +11641,21 @@ pub struct CapabilityStatementRestResourceSearchParam { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Data types allowed to be used for search parameters. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/search-param-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// Server-specific usage + /// - **Strength**: extensible + /// - **Description**: The protocol used for message transport. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/message-transport + pub protocol: Coding, + /// Network address or identifier of the end-point /// - /// This allows documentation of any distinct behaviors about how the search - /// parameter is used. For example, text matching algorithms. + /// The network address of the endpoint. For solutions that do not use network + /// addresses for routing, it can be just an identifier. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub documentation: Option, + pub address: Url, } /// Messages supported by this system @@ -11844,6 +11791,365 @@ pub struct CapabilityStatementMessagingSupportedMessage { pub definition: Canonical, } +/// If the endpoint is a RESTful one +/// +/// A definition of the restful capabilities of the solution, if any. +/// +/// ## Implementation Notes +/// Multiple repetitions allow definition of both client and/or server behaviors +/// or possibly behaviors under different configuration settings (for software or +/// requirements statements). +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **cpb-9**: A given resource can only be described once per RESTful mode. (error) +/// Expression: `resource.select(type).isDistinct()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: cpb-1 +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CapabilityStatementRest { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// client | server + /// + /// Identifies whether this portion of the statement is describing the ability to + /// initiate or receive restful operations. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The mode of a RESTful capability statement. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/restful-capability-mode|4.0.1 + pub mode: Code, + /// General description of implementation + /// + /// Information about the system's restful capabilities that apply across all + /// applications, such as security. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub documentation: Option, + /// Information about security of implementation + /// + /// Information about security implementation from an interface perspective - + /// what a client needs to know. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub security: Option, + /// Resource served on the REST interface + /// + /// A specification of the restful capabilities of the solution for a specific + /// resource type. + /// + /// ## Implementation Notes + /// Max of one repetition per resource type. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **cpb-12**: Search parameter names must be unique in the context of a resource. (error) + /// Expression: `searchParam.select(name).isDistinct()` + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub resource: Option>, + /// What operations are supported? + /// + /// A specification of restful operations supported by the system. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub interaction: Option>, + /// Search parameters for searching all resources + /// + /// Search parameters that are supported for searching all resources for + /// implementations to support and/or make use of - either references to ones + /// defined in the specification, or additional ones defined for/by the + /// implementation. + /// + /// ## Implementation Notes + /// Typically, the only search parameters supported for all searches are those + /// that apply to all resources - tags, profiles, text search etc. These search + /// parameters should include the control search parameters such as _sort, + /// _count, etc. that also apply to this resource (though many will be listed at + /// [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). + /// The behavior of some search parameters may be further described by other code + /// or extension elements, or narrative within the capability statement or linked + /// [SearchParameter](searchparameter.html#) definitions. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "searchParam")] + pub search_param: Option>, + /// Definition of a system level operation + /// + /// Definition of an operation or a named query together with its parameters and + /// their meaning and type. + /// + /// ## Implementation Notes + /// CapabilityStatement.rest.operation is for operations invoked at the system + /// level, or for operations that are supported across multiple resource types. + /// Operations linked from CapabilityStatement.rest.operation must have + /// OperationDefinition.system = true, or more than one Operation.resource. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub operation: Option>, + /// Compartments served/used by system + /// + /// An absolute URI which is a reference to the definition of a compartment that + /// the system supports. The reference is to a CompartmentDefinition resource by + /// its canonical URL . + /// + /// ## Implementation Notes + /// At present, the only defined compartments are at + /// [CompartmentDefinition](compartmentdefinition.html). + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub compartment: Option>, +} + +/// What operations are supported? +/// +/// A specification of restful operations supported by the system. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CapabilityStatementRestInteraction { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// transaction | batch | search-system | history-system + /// + /// A coded identifier of the operation, supported by the system. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Operations supported by REST at the system level. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/system-restful-interaction|4.0.1 + pub code: Code, + /// Anything special about operation behavior + /// + /// Guidance specific to the implementation of this operation, such as + /// limitations on the kind of transactions allowed, or information about system + /// wide search is implemented. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub documentation: Option, +} + /// Resource served on the REST interface /// /// A specification of the restful capabilities of the solution for a specific @@ -12271,23 +12577,23 @@ pub struct CapabilityStatementRestResource { pub operation: Option>, } -/// Document definition +/// What operations are supported? /// -/// A document definition. +/// Identifies a restful operation supported by the solution. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Implementation Notes +/// In general, a Resource will only appear in a CapabilityStatement if the +/// server actually has some capabilities - e.g. there is at least one +/// interaction supported. However interactions can be omitted to support +/// summarization (_summary = true). /// -/// ## Special Semantics -/// - Included in summary +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Conditions -/// Used when: cpb-1 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementDocument { +pub struct CapabilityStatementRestResourceInteraction { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -12368,30 +12674,30 @@ pub struct CapabilityStatementDocument { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// producer | consumer + /// read | vread | update | patch | delete | history-instance | history-type | create | search-type /// - /// Mode of this document declaration - whether an application is a producer or - /// consumer. + /// Coded identifier of the operation, supported by the system resource. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: required - /// - **Description**: Whether the application produces or consumes documents. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-mode|4.0.1 - pub mode: Code, - /// Description of document support + /// - **Description**: Operations supported by REST at the type or instance level. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/type-restful-interaction|4.0.1 + pub code: Code, + /// Anything special about operation behavior /// - /// A description of how the application supports or uses the specified document - /// profile. For example, when documents are created, what action is taken with - /// consumed documents, etc. + /// Guidance specific to the implementation of this operation, such as 'delete is + /// a logical delete' or 'updates are only allowed with version id' or 'creates + /// permitted from pre-authorized certificates only'. + /// + /// ## Requirements + /// REST allows a degree of variability in the implementation of RESTful + /// solutions that is useful for exchange partners to be aware of. /// /// ## Cardinality: Optional (0..1) /// @@ -12399,32 +12705,25 @@ pub struct CapabilityStatementDocument { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub documentation: Option, - /// Constraint on the resources used in the document - /// - /// A profile on the document Bundle that constrains which resources are present, - /// and their contents. - /// - /// ## Implementation Notes - /// The profile is actually on the Bundle. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub profile: Canonical, } -/// Software that is covered by this capability statement +/// Definition of a resource operation /// -/// Software that is covered by this capability statement. It is used when the -/// capability statement describes the capabilities of a particular software -/// version, independent of an installation. +/// Definition of an operation or a named query together with its parameters and +/// their meaning and type. Consult the definition of the operation for details +/// about how to invoke the operation, and the parameters. /// -/// ## Cardinality: Optional (0..1) +/// ## Implementation Notes +/// Operations linked from CapabilityStatement.rest.resource.operation must have +/// OperationDefinition.type = true or OperationDefinition.instance = true. +/// +/// If an operation that is listed in multiple +/// CapabilityStatement.rest.resource.operation (e.g. for different resource +/// types), then clients should understand that the operation is only supported +/// on the specified resource types, and that may be a subset of those listed in +/// OperationDefinition.resource. +/// +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -12432,11 +12731,8 @@ pub struct CapabilityStatementDocument { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Conditions -/// Used when: cpb-2 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CapabilityStatementSoftware { +pub struct CapabilityStatementRestResourceOperation { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -12517,9 +12813,16 @@ pub struct CapabilityStatementSoftware { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// A name the software is known by + /// Name by which the operation/query is invoked /// - /// Name the software is known by. + /// The name of the operation or query. For an operation, this is the name + /// prefixed with $ and used in the URL. For a query, this is the name used in + /// the _query parameter when the query is called. + /// + /// ## Implementation Notes + /// The name here SHOULD be the same as the name in the definition, unless there + /// is a name clash and the name cannot be used. The name does not include the + /// "$" portion that is always included in the URL. /// /// ## Cardinality: Required (1..1) /// @@ -12530,15 +12833,21 @@ pub struct CapabilityStatementSoftware { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub name: String, - /// Version covered by this statement + /// The defined operation/query /// - /// The version identifier for the software covered by this statement. + /// Where the formal definition can be found. If a server references the base + /// definition of an Operation (i.e. from the specification itself such as + /// ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it + /// supports the full capabilities of the operation - e.g. both GET and POST + /// invocation. If it only supports a subset, it must define its own custom + /// [OperationDefinition](operationdefinition.html#) with a 'base' of the + /// original OperationDefinition. The custom definition would describe the + /// specific subset of functionality supported. /// /// ## Implementation Notes - /// If possible, a version should be specified, as statements are likely to be - /// different for different versions of software. + /// This can be used to build an HTML form to invoke the operation, for instance. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -12546,172 +12855,226 @@ pub struct CapabilityStatementSoftware { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Date this version was released + pub definition: Canonical, + /// Specific details about operation behavior /// - /// Date this version of the software was released. + /// Documentation that describes anything special about the operation behavior, + /// possibly detailing different behavior for system, type and instance-level + /// invocation of the operation. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "releaseDate")] - pub release_date: Option, + pub documentation: Option, } -/// FHIR CarePlan type +/// Search parameters supported by implementation /// -/// Describes the intention of how one or more practitioners intend to deliver -/// care for a particular patient, group or community for a period of time, -/// possibly limited to care for a specific condition or set of conditions. +/// Search parameters for implementations to support and/or make use of - either +/// references to ones defined in the specification, or additional ones defined +/// for/by the implementation. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Implementation Notes +/// The search parameters should include the control search parameters such as +/// _sort, _count, etc. that also apply to this resource (though many will be +/// listed at +/// [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). +/// The behavior of some search parameters may be further described by other code +/// or extension elements, or narrative within the capability statement or linked +/// [SearchParameter](searchparameter.html#) definitions. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [CarePlan](http://hl7.org/fhir/StructureDefinition/CarePlan) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CarePlan { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct CapabilityStatementRestResourceSearchParam { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Name of search parameter + /// + /// The name of the search parameter used in the interface. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// Parameter names cannot overlap with standard parameter names, and standard + /// parameters cannot be redefined. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub name: String, + /// Source of definition for parameter /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// An absolute URI that is a formal reference to where this parameter was first + /// defined, so that a client can be confident of the meaning of the search + /// parameter (a reference to + /// [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). + /// This element SHALL be populated if the search parameter refers to a + /// SearchParameter defined by the FHIR core specification or externally defined + /// IGs. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// This SHOULD be present, and matches refers to a SearchParameter by its + /// canonical URL. If systems wish to document their support for modifiers, + /// comparators, target resource types, and chained parameters, they should do + /// using a search parameter resource. This element SHALL be populated if the + /// search parameter refers to a SearchParameter defined by the FHIR core + /// specification or externally defined IGs. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub definition: Option, + /// number | date | string | token | reference | composite | quantity | uri | special /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// The type of value a search parameter refers to, and how the content is + /// interpreted. /// /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// While this can be looked up from the definition, it is included here as a + /// convenience for systems that autogenerate a query interface based on the + /// server capability statement. It SHALL be the same as the type in the search + /// parameter definition. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Data types allowed to be used for search parameters. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/search-param-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// Server-specific usage + /// + /// This allows documentation of any distinct behaviors about how the search + /// parameter is used. For example, text matching algorithms. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub documentation: Option, +} + +/// Information about security of implementation +/// +/// Information about security implementation from an interface perspective - +/// what a client needs to know. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CapabilityStatementRestSecurity { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -12731,16 +13094,16 @@ pub struct CarePlan { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -12765,7 +13128,8 @@ pub struct CarePlan { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -12774,43 +13138,20 @@ pub struct CarePlan { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// External Ids for this plan - /// - /// Business identifiers assigned to this care plan by the performer or other - /// systems which remain constant as the resource is updated and propagates from - /// server to server. + /// Adds CORS Headers (http://enable-cors.org/) /// - /// ## Requirements - /// Allows identification of the care plan as it is known by various - /// participating systems and in a way that remains consistent across servers. + /// Server adds CORS headers when responding to requests - this enables + /// Javascript applications to use the server. /// /// ## Implementation Notes - /// This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Instantiates FHIR protocol or definition - /// - /// The URL pointing to a FHIR-defined protocol, guideline, questionnaire or - /// other definition that is adhered to in whole or in part by this CarePlan. + /// The easiest CORS headers to add are Access-Control-Allow-Origin: * & + /// Access-Control-Request-Method: GET, POST, PUT, DELETE. All servers SHOULD + /// support CORS. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -12818,17 +13159,10 @@ pub struct CarePlan { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesCanonical")] - pub instantiates_canonical: Option>, - /// Instantiates external protocol or definition - /// - /// The URL pointing to an externally maintained protocol, guideline, - /// questionnaire or other definition that is adhered to in whole or in part by - /// this CarePlan. + pub cors: Option, + /// OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates /// - /// ## Implementation Notes - /// This might be an HTML page, PDF, etc. or could just be a non-resolvable URI - /// identifier. + /// Types of security services that are supported/required by the system. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -12838,29 +13172,467 @@ pub struct CarePlan { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesUri")] - pub instantiates_uri: Option>, - /// Fulfills CarePlan - /// - /// A care plan that is fulfilled in whole or in part by this care plan. /// - /// ## Requirements - /// Allows tracing of the care plan and tracking whether - /// proposals/recommendations were acted upon. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Types of security services used with FHIR. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/restful-security-service + pub service: Option>, + /// General description of how security works /// - /// ## Cardinality: Optional, Multiple (0..*) + /// General description of how security works. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// fulfills - #[fhir_serde(rename = "basedOn")] - pub based_on: Option>, + pub description: Option, +} + +/// Software that is covered by this capability statement +/// +/// Software that is covered by this capability statement. It is used when the +/// capability statement describes the capabilities of a particular software +/// version, independent of an installation. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: cpb-2 +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CapabilityStatementSoftware { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// A name the software is known by + /// + /// Name the software is known by. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub name: String, + /// Version covered by this statement + /// + /// The version identifier for the software covered by this statement. + /// + /// ## Implementation Notes + /// If possible, a version should be specified, as statements are likely to be + /// different for different versions of software. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option, + /// Date this version was released + /// + /// Date this version of the software was released. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "releaseDate")] + pub release_date: Option, +} + +/// FHIR CarePlan type +/// +/// Describes the intention of how one or more practitioners intend to deliver +/// care for a particular patient, group or community for a period of time, +/// possibly limited to care for a specific condition or set of conditions. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [CarePlan](http://hl7.org/fhir/StructureDefinition/CarePlan) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CarePlan { + /// Logical id of this artifact + /// + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created + /// + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// External Ids for this plan + /// + /// Business identifiers assigned to this care plan by the performer or other + /// systems which remain constant as the resource is updated and propagates from + /// server to server. + /// + /// ## Requirements + /// Allows identification of the care plan as it is known by various + /// participating systems and in a way that remains consistent across servers. + /// + /// ## Implementation Notes + /// This is a business identifier, not a resource identifier (see + /// [discussion](resource.html#identifiers)). It is best practice for the + /// identifier to only appear on a single resource instance, however business + /// practices may occasionally dictate that multiple resource instances with the + /// same identifier can exist - possibly even with different resource types. For + /// example, multiple Patient and a Person resource instance might share the same + /// social insurance number. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Instantiates FHIR protocol or definition + /// + /// The URL pointing to a FHIR-defined protocol, guideline, questionnaire or + /// other definition that is adhered to in whole or in part by this CarePlan. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "instantiatesCanonical")] + pub instantiates_canonical: Option>, + /// Instantiates external protocol or definition + /// + /// The URL pointing to an externally maintained protocol, guideline, + /// questionnaire or other definition that is adhered to in whole or in part by + /// this CarePlan. + /// + /// ## Implementation Notes + /// This might be an HTML page, PDF, etc. or could just be a non-resolvable URI + /// identifier. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "instantiatesUri")] + pub instantiates_uri: Option>, + /// Fulfills CarePlan + /// + /// A care plan that is fulfilled in whole or in part by this care plan. + /// + /// ## Requirements + /// Allows tracing of the care plan and tracking whether + /// proposals/recommendations were acted upon. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// fulfills + #[fhir_serde(rename = "basedOn")] + pub based_on: Option>, /// CarePlan replaced by this CarePlan /// /// Completed or terminated care plan whose function is taken by this new care @@ -15020,125 +15792,6 @@ pub struct CatalogEntryRelatedEntry { pub item: Reference, } -/// Who performed charged service -/// -/// Indicates who or what performed or participated in the charged service. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ChargeItemPerformer { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// What type of performance was done - /// - /// Describes the type of performance or participation(e.g. primary surgeon, - /// anesthesiologiest, etc.). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes describing the types of functional roles performers can take on when performing events. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/performer-role - pub function: Option, - /// Individual who was performing - /// - /// The device, practitioner, etc. who performed or participated in the service. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub actor: Reference, -} - /// Choice of types for the occurrence\[x\] field in ChargeItem #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] #[fhir_choice_element(base_name = "occurrence")] @@ -15831,15 +16484,9 @@ pub struct ChargeItem { pub supporting_information: Option>, } -/// Whether or not the billing code is applicable -/// -/// Expressions that describe applicability criteria for the billing code. +/// Who performed charged service /// -/// ## Implementation Notes -/// The applicability conditions can be used to ascertain whether a billing item -/// is allowed in a specific context. E.g. some billing codes may only be -/// applicable in out-patient settings, only to male/female patients or only to -/// children. +/// Indicates who or what performed or participated in the charged service. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -15847,7 +16494,7 @@ pub struct ChargeItem { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ChargeItemDefinitionApplicability { +pub struct ChargeItemPerformer { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -15928,82 +16575,185 @@ pub struct ChargeItemDefinitionApplicability { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Natural language description of the condition + /// What type of performance was done /// - /// A brief, natural language description of the condition that effectively - /// communicates the intended semantics. + /// Describes the type of performance or participation(e.g. primary surgeon, + /// anesthesiologiest, etc.). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Language of the expression /// - /// The media type of the language for the expression, e.g. "text/cql" for - /// Clinical Query Language expressions or "text/fhirpath" for FHIRPath - /// expressions. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes describing the types of functional roles performers can take on when performing events. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/performer-role + pub function: Option, + /// Individual who was performing + /// + /// The device, practitioner, etc. who performed or participated in the service. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub actor: Reference, +} + +/// FHIR ChargeItemDefinition type +/// +/// The ChargeItemDefinition resource provides the properties that apply to the +/// (billing) codes necessary to calculate costs and prices. The properties may +/// differ largely depending on type and realm, therefore this resource gives +/// only a rough structure and requires profiling for each type of billing code +/// system. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [ChargeItemDefinition](http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ChargeItemDefinition { + /// Logical id of this artifact + /// + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub language: Option, - /// Boolean-valued expression + pub meta: Option, + /// A set of rules under which this content was created /// - /// An expression that returns true or false, indicating whether the condition is - /// satisfied. When using FHIRPath expressions, the %context environment variable - /// must be replaced at runtime with the ChargeItem resource to which this - /// definition is applied. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// Please note that FHIRPath Expressions can only be evaluated in the scope of - /// the current ChargeItem resource to which this definition is being applied. - /// FHIRPath expressions can traverse into other resources linked from the - /// ChargeItem resource, however, testing rules such as that a billing code may - /// be billed only once per encounter need a wider scope. In such scenarios, CQL - /// may be the appropriate choice. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub expression: Option, -} - -/// Components of total line item price -/// -/// The price for a ChargeItem may be calculated as a base price with -/// surcharges/deductions that apply in certain conditions. A -/// ChargeItemDefinition resource that defines the prices, factors and conditions -/// that apply to a billing code is currently under development. The -/// priceComponent element can be used to offer transparency to the recipient of -/// the Invoice of how the prices have been calculated. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ChargeItemDefinitionPropertyGroupPriceComponent { - /// Unique id for inter-element referencing + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) - pub id: Option, + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -16023,410 +16773,16 @@ pub struct ChargeItemDefinitionPropertyGroupPriceComponent { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// base | surcharge | deduction | discount | tax | informational - /// - /// This code identifies the type of the component. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Codes indicating the kind of the price component. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/invoice-priceComponentType|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// Code identifying the specific component - /// - /// A code that identifies the component. Codes may be used to differentiate - /// between kinds of taxes, surcharges, discounts etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub code: Option, - /// Factor used for calculating this component - /// - /// The factor that has been applied on the base price for calculating this - /// component. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Monetary amount associated with this component - /// - /// The amount calculated for this component. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Option, -} - -/// Group of properties which are applicable under the same conditions -/// -/// Group of properties which are applicable under the same conditions. If no -/// applicability rules are established for the group, then all properties always -/// apply. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ChargeItemDefinitionPropertyGroup { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Conditions under which the priceComponent is applicable - /// - /// Expressions that describe applicability criteria for the priceComponent. - /// - /// ## Implementation Notes - /// The applicability conditions can be used to ascertain whether a billing item - /// is allowed in a specific context. E.g. some billing codes may only be - /// applicable in out-patient settings, only to male/female patients or only to - /// children. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub applicability: Option>, - /// Components of total line item price - /// - /// The price for a ChargeItem may be calculated as a base price with - /// surcharges/deductions that apply in certain conditions. A - /// ChargeItemDefinition resource that defines the prices, factors and conditions - /// that apply to a billing code is currently under development. The - /// priceComponent element can be used to offer transparency to the recipient of - /// the Invoice of how the prices have been calculated. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "priceComponent")] - pub price_component: Option>, -} - -/// FHIR ChargeItemDefinition type -/// -/// The ChargeItemDefinition resource provides the properties that apply to the -/// (billing) codes necessary to calculate costs and prices. The properties may -/// differ largely depending on type and realm, therefore this resource gives -/// only a rough structure and requires profiling for each type of billing code -/// system. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [ChargeItemDefinition](http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ChargeItemDefinition { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -16954,34 +17310,23 @@ pub struct ChargeItemDefinition { pub property_group: Option>, } -/// Patient insurance information -/// -/// Financial instruments for reimbursement for the health care products and -/// services specified on the claim. +/// Whether or not the billing code is applicable /// -/// ## Requirements -/// At least one insurer is required for a claim to be a claim. +/// Expressions that describe applicability criteria for the billing code. /// /// ## Implementation Notes -/// All insurance coverages for the patient which may be applicable for -/// reimbursement, of the products and services listed in the claim, are -/// typically provided in the claim to allow insurers to confirm the ordering of -/// the insurance coverages relative to local 'coordination of benefit' rules. -/// One coverage (and only one) with 'focal=true' is to be used in the -/// adjudication of this claim. Coverages appearing before the focal Coverage in -/// the list, and where 'Coverage.subrogation=false', should provide a reference -/// to the ClaimResponse containing the adjudication results of the prior claim. -/// -/// ## Cardinality: Required, Multiple (1..*) +/// The applicability conditions can be used to ascertain whether a billing item +/// is allowed in a specific context. E.g. some billing codes may only be +/// applicable in out-patient settings, only to male/female patients or only to +/// children. /// -/// ## Special Semantics -/// - Included in summary +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimInsurance { +pub struct ChargeItemDefinitionApplicability { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -17062,156 +17407,57 @@ pub struct ClaimInsurance { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Insurance instance identifier - /// - /// A number to uniquely identify insurance entries and provide a sequence of - /// coverages to convey coordination of benefit order. - /// - /// ## Requirements - /// To maintain order of the coverages. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Coverage to be used for adjudication - /// - /// A flag to indicate that this Coverage is to be used for adjudication of this - /// claim when set to true. - /// - /// ## Requirements - /// To identify which coverage in the list is being used to adjudicate this - /// claim. - /// - /// ## Implementation Notes - /// A patient may (will) have multiple insurance policies which provide - /// reimbursement for healthcare services and products. For example a person may - /// also be covered by their spouse's policy and both appear in the list (and may - /// be from the same insurer). This flag will be set to true for only one of the - /// listed policies and that policy will be used for adjudicating this claim. - /// Other claims would be created to request adjudication against the other - /// listed policies. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub focal: Boolean, - /// Pre-assigned Claim number - /// - /// The business identifier to be used when the claim is sent for adjudication - /// against this insurance policy. - /// - /// ## Requirements - /// This will be the claim number should it be necessary to create this claim in - /// the future. This is provided so that payors may forward claims to other - /// payors in the Coordination of Benefit for adjudication rather than the - /// provider being required to initiate each adjudication. + /// Natural language description of the condition /// - /// ## Implementation Notes - /// Only required in jurisdictions where insurers, rather than the provider, are - /// required to send claims to insurers that appear after them in the list. This - /// element is not required when 'subrogation=true'. + /// A brief, natural language description of the condition that effectively + /// communicates the intended semantics. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, - /// Insurance information - /// - /// Reference to the insurance card level information contained in the Coverage - /// resource. The coverage issuing insurer will use these details to locate the - /// patient's actual coverage within the insurer's information system. - /// - /// ## Requirements - /// Required to allow the adjudicator to locate the correct policy and history - /// within their information system. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Reference, - /// Additional provider contract number - /// - /// A business agreement number established between the provider and the insurer - /// for special business processing purposes. + pub description: Option, + /// Language of the expression /// - /// ## Requirements - /// Providers may have multiple business arrangements with a given insurer and - /// must supply the specific contract number for adjudication. + /// The media type of the language for the expression, e.g. "text/cql" for + /// Clinical Query Language expressions or "text/fhirpath" for FHIRPath + /// expressions. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "businessArrangement")] - pub business_arrangement: Option, - /// Prior authorization reference number - /// - /// Reference numbers previously provided by the insurer to the provider to be - /// quoted on subsequent claims containing services or products related to the - /// prior authorization. - /// - /// ## Requirements - /// Providers must quote previously issued authorization reference numbers in - /// order to obtain adjudication as previously advised on the Preauthorization. - /// - /// ## Implementation Notes - /// This value is an alphanumeric string that may be provided over the phone, via - /// text, via paper, or within a ClaimResponse resource and is not a FHIR - /// Identifier. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAuthRef")] - pub pre_auth_ref: Option>, - /// Adjudication results - /// - /// The result of the adjudication of the line items for the Coverage specified - /// in this insurance. + pub language: Option, + /// Boolean-valued expression /// - /// ## Requirements - /// An insurer need the adjudication results from prior insurers to determine the - /// outstanding balance remaining by item for the items in the curent claim. + /// An expression that returns true or false, indicating whether the condition is + /// satisfied. When using FHIRPath expressions, the %context environment variable + /// must be replaced at runtime with the ChargeItem resource to which this + /// definition is applied. /// /// ## Implementation Notes - /// Must not be specified when 'focal=true' for this insurance. + /// Please note that FHIRPath Expressions can only be evaluated in the scope of + /// the current ChargeItem resource to which this definition is being applied. + /// FHIRPath expressions can traverse into other resources linked from the + /// ChargeItem resource, however, testing rules such as that a billing code may + /// be billed only once per encounter need a wider scope. In such scenarios, CQL + /// may be the appropriate choice. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "claimResponse")] - pub claim_response: Option, + pub expression: Option, } -/// Members of the care team -/// -/// The members of the team who provided the products and services. +/// Group of properties which are applicable under the same conditions /// -/// ## Requirements -/// Common to identify the responsible and supporting practitioners. +/// Group of properties which are applicable under the same conditions. If no +/// applicability rules are established for the group, then all properties always +/// apply. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -17219,7 +17465,7 @@ pub struct ClaimInsurance { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimCareTeam { +pub struct ChargeItemDefinitionPropertyGroup { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -17300,103 +17546,48 @@ pub struct ClaimCareTeam { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Order of care team - /// - /// A number to uniquely identify care team entries. - /// - /// ## Requirements - /// Necessary to maintain the order of the care team and provide a mechanism to - /// link individuals to claim details. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Practitioner or organization - /// - /// Member of the team who provided the product or service. - /// - /// ## Requirements - /// Often a regulatory requirement to specify the responsible provider. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Reference, - /// Indicator of the lead practitioner - /// - /// The party who is billing and/or responsible for the claimed products or - /// services. - /// - /// ## Requirements - /// When multiple parties are present it is required to distinguish the lead or - /// responsible individual. - /// - /// ## Implementation Notes - /// Responsible might not be required when there is only a single provider - /// listed. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub responsible: Option, - /// Function within the team - /// - /// The lead, assisting or supervising practitioner and their discipline if a - /// multidisciplinary team. + /// Conditions under which the priceComponent is applicable /// - /// ## Requirements - /// When multiple parties are present it is required to distinguish the roles - /// performed by each member. + /// Expressions that describe applicability criteria for the priceComponent. /// /// ## Implementation Notes - /// Role might not be required when there is only a single provider listed. + /// The applicability conditions can be used to ascertain whether a billing item + /// is allowed in a specific context. E.g. some billing codes may only be + /// applicable in out-patient settings, only to male/female patients or only to + /// children. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub applicability: Option>, + /// Components of total line item price /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The role codes for the care team members. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-careteamrole - pub role: Option, - /// Practitioner credential or specialization - /// - /// The qualification of the practitioner which is applicable for this service. - /// - /// ## Requirements - /// Need to specify which qualification a provider is delivering the product or - /// service under. + /// The price for a ChargeItem may be calculated as a base price with + /// surcharges/deductions that apply in certain conditions. A + /// ChargeItemDefinition resource that defines the prices, factors and conditions + /// that apply to a billing code is currently under development. The + /// priceComponent element can be used to offer transparency to the recipient of + /// the Invoice of how the prices have been calculated. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Provider professional qualifications. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provider-qualification - pub qualification: Option, + #[fhir_serde(rename = "priceComponent")] + pub price_component: Option>, } -/// Product or service provided -/// -/// A claim detail line. Either a simple (a product or service) or a 'group' of -/// sub-details which are simple items. +/// Components of total line item price /// -/// ## Requirements -/// The items to be processed for adjudication. +/// The price for a ChargeItem may be calculated as a base price with +/// surcharges/deductions that apply in certain conditions. A +/// ChargeItemDefinition resource that defines the prices, factors and conditions +/// that apply to a billing code is currently under development. The +/// priceComponent element can be used to offer transparency to the recipient of +/// the Invoice of how the prices have been calculated. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -17404,7 +17595,7 @@ pub struct ClaimCareTeam { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimItemDetail { +pub struct ChargeItemDefinitionPropertyGroupPriceComponent { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -17485,285 +17676,208 @@ pub struct ClaimItemDetail { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Item instance identifier - /// - /// A number to uniquely identify item entries. + /// base | surcharge | deduction | discount | tax | informational /// - /// ## Requirements - /// Necessary to provide a mechanism to link to items from within the claim and - /// within the adjudication details of the ClaimResponse. + /// This code identifies the type of the component. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Revenue or cost center code /// - /// The type of revenue or cost center providing the product and/or service. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Codes indicating the kind of the price component. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/invoice-priceComponentType|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// Code identifying the specific component /// - /// ## Requirements - /// Needed in the processing of institutional claims. + /// A code that identifies the component. Codes may be used to differentiate + /// between kinds of taxes, surcharges, discounts etc. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub code: Option, + /// Factor used for calculating this component /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center - pub revenue: Option, - /// Benefit classification - /// - /// Code to identify the general type of benefits under which products and - /// services are provided. - /// - /// ## Requirements - /// Needed in the processing of institutional claims as this allows the insurer - /// to determine whether a facial X-Ray is for dental, orthopedic, or facial - /// surgery purposes. - /// - /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// The factor that has been applied on the base price for calculating this + /// component. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub factor: Option, + /// Monetary amount associated with this component /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral-basic, major, glasses. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. - /// - /// ## Requirements - /// Necessary to state what was provided or done. - /// - /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// The amount calculated for this component. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub amount: Option, +} + +/// FHIR Claim type +/// +/// A provider issued list of professional services and products which have been +/// provided, or are to be provided, to a patient which is sent to an insurer for +/// reimbursement. +/// +/// ## Purpose +/// The Claim resource is used by providers to exchange services and products rendered to patients or planned to be rendered with insurers for reimbuserment. It is also used by insurers to exchange claims information with statutory reporting and data analytics firms. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Claim](http://hl7.org/fhir/StructureDefinition/Claim) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Claim { + /// Logical id of this artifact /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// /// ## Implementation Notes - /// For example in Oral whether the treatment is cosmetic or associated with TMJ, - /// or for Medical whether the treatment was outside the clinic or out of office - /// hours. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under + /// ## Cardinality: Optional (0..1) /// - /// Identifies the program under which this may be recovered. + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Count of products or services - /// - /// The number of repetitions of a service or product. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. - /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor - /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// The base language in which the resource is written. /// /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost /// - /// The quantity times the unit price for an additional service or product or - /// charge. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Unique device identifier - /// - /// Unique Device Identifiers associated with this line item. - /// - /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. - /// - /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, - /// Product or service provided + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// A claim detail line. Either a simple (a product or service) or a 'group' of - /// sub-details which are simple items. + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// - /// ## Requirements - /// The items to be processed for adjudication. + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetail")] - pub sub_detail: Option>, -} - -/// Choice of types for the location\[x\] field in ClaimAccident -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "location")] -pub enum ClaimAccidentLocation { - /// Variant accepting the Address type. - #[fhir_serde(rename = "locationAddress")] - Address(Address), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "locationReference")] - Reference(Reference), -} - -/// Details of the event -/// -/// Details of an accident which resulted in injuries which required the products -/// and services listed in the claim. -/// -/// ## Requirements -/// When healthcare products and services are accident related, benefits may be -/// payable under accident provisions of policies, such as automotive, etc before -/// they are payable under normal health insurance. -/// -/// ## Cardinality: Optional (0..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "location")] -pub struct ClaimAccident { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -17783,16 +17897,16 @@ pub struct ClaimAccident { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -17817,8 +17931,7 @@ pub struct ClaimAccident { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -17827,283 +17940,10 @@ pub struct ClaimAccident { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// When the incident occurred - /// - /// Date of an accident event related to the products and services contained in - /// the claim. - /// - /// ## Requirements - /// Required for audit purposes and adjudication. - /// - /// ## Implementation Notes - /// The date of the accident has to precede the dates of the products and - /// services but within a reasonable timeframe. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Date, - /// The nature of the accident - /// - /// The type or context of the accident event for the purposes of selection of - /// potential insurance coverages and determination of coordination between - /// insurers. - /// - /// ## Requirements - /// Coverage may be dependant on the type of accident. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Type of accident: work place, auto, etc. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActIncidentCode - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Where the event occurred - /// - /// The physical location of the accident event. - /// - /// ## Requirements - /// Required for audit purposes and determination of applicable insurance - /// liability. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub location: Option, -} - -/// FHIR Claim type -/// -/// A provider issued list of professional services and products which have been -/// provided, or are to be provided, to a patient which is sent to an insurer for -/// reimbursement. -/// -/// ## Purpose -/// The Claim resource is used by providers to exchange services and products rendered to patients or planned to be rendered with insurers for reimbuserment. It is also used by insurers to exchange claims information with statutory reporting and data analytics firms. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [Claim](http://hl7.org/fhir/StructureDefinition/Claim) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Claim { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Business Identifier for claim + /// Business Identifier for claim /// /// A unique identifier assigned to this claim. /// @@ -18641,25 +18481,10 @@ pub struct Claim { pub total: Option, } -/// Choice of types for the serviced\[x\] field in ClaimItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum ClaimItemServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), -} - -/// Choice of types for the location\[x\] field in ClaimItem +/// Choice of types for the location\[x\] field in ClaimAccident #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] #[fhir_choice_element(base_name = "location")] -pub enum ClaimItemLocation { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "locationCodeableConcept")] - CodeableConcept(CodeableConcept), +pub enum ClaimAccidentLocation { /// Variant accepting the Address type. #[fhir_serde(rename = "locationAddress")] Address(Address), @@ -18668,22 +18493,860 @@ pub enum ClaimItemLocation { Reference(Reference), } -/// Product or service provided +/// Details of the event /// -/// A claim line. Either a simple product or service or a 'group' of details -/// which can each be a simple items or groups of sub-details. +/// Details of an accident which resulted in injuries which required the products +/// and services listed in the claim. /// /// ## Requirements -/// The items to be processed for adjudication. +/// When healthcare products and services are accident related, benefits may be +/// payable under accident provisions of policies, such as automotive, etc before +/// they are payable under normal health insurance. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced,location")] -pub struct ClaimItem { +#[fhir_resource(choice_elements = "location")] +pub struct ClaimAccident { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// When the incident occurred + /// + /// Date of an accident event related to the products and services contained in + /// the claim. + /// + /// ## Requirements + /// Required for audit purposes and adjudication. + /// + /// ## Implementation Notes + /// The date of the accident has to precede the dates of the products and + /// services but within a reasonable timeframe. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub date: Date, + /// The nature of the accident + /// + /// The type or context of the accident event for the purposes of selection of + /// potential insurance coverages and determination of coordination between + /// insurers. + /// + /// ## Requirements + /// Coverage may be dependant on the type of accident. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Type of accident: work place, auto, etc. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActIncidentCode + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Where the event occurred + /// + /// The physical location of the accident event. + /// + /// ## Requirements + /// Required for audit purposes and determination of applicable insurance + /// liability. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub location: Option, +} + +/// Members of the care team +/// +/// The members of the team who provided the products and services. +/// +/// ## Requirements +/// Common to identify the responsible and supporting practitioners. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimCareTeam { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Order of care team + /// + /// A number to uniquely identify care team entries. + /// + /// ## Requirements + /// Necessary to maintain the order of the care team and provide a mechanism to + /// link individuals to claim details. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Practitioner or organization + /// + /// Member of the team who provided the product or service. + /// + /// ## Requirements + /// Often a regulatory requirement to specify the responsible provider. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub provider: Reference, + /// Indicator of the lead practitioner + /// + /// The party who is billing and/or responsible for the claimed products or + /// services. + /// + /// ## Requirements + /// When multiple parties are present it is required to distinguish the lead or + /// responsible individual. + /// + /// ## Implementation Notes + /// Responsible might not be required when there is only a single provider + /// listed. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub responsible: Option, + /// Function within the team + /// + /// The lead, assisting or supervising practitioner and their discipline if a + /// multidisciplinary team. + /// + /// ## Requirements + /// When multiple parties are present it is required to distinguish the roles + /// performed by each member. + /// + /// ## Implementation Notes + /// Role might not be required when there is only a single provider listed. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The role codes for the care team members. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-careteamrole + pub role: Option, + /// Practitioner credential or specialization + /// + /// The qualification of the practitioner which is applicable for this service. + /// + /// ## Requirements + /// Need to specify which qualification a provider is delivering the product or + /// service under. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Provider professional qualifications. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provider-qualification + pub qualification: Option, +} + +/// Choice of types for the diagnosis\[x\] field in ClaimDiagnosis +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "diagnosis")] +pub enum ClaimDiagnosisDiagnosis { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "diagnosisCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "diagnosisReference")] + Reference(Reference), +} + +/// Pertinent diagnosis information +/// +/// Information about diagnoses relevant to the claim items. +/// +/// ## Requirements +/// Required for the adjudication by provided context for the services and +/// product listed. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "diagnosis")] +pub struct ClaimDiagnosis { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Diagnosis instance identifier + /// + /// A number to uniquely identify diagnosis entries. + /// + /// ## Requirements + /// Necessary to maintain the order of the diagnosis items and provide a + /// mechanism to link to claim details. + /// + /// ## Implementation Notes + /// Diagnosis are presented in list order to their expected importance: primary, + /// secondary, etc. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Nature of illness or problem + /// + /// The nature of illness or problem in a coded form or as a reference to an + /// external defined Condition. + /// + /// ## Requirements + /// Provides health context for the evaluation of the products and/or services. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Example ICD10 Diagnostic codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 + #[fhir_serde(flatten)] + pub diagnosis: Option, + /// Timing or nature of the diagnosis + /// + /// When the condition was observed or the relative ranking. + /// + /// ## Requirements + /// Often required to capture a particular diagnosis, for example: primary or + /// discharge. + /// + /// ## Implementation Notes + /// For example: admitting, primary, secondary, discharge. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The type of the diagnosis: admitting, principal, discharge. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosistype + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Present on admission + /// + /// Indication of whether the diagnosis was present on admission to a facility. + /// + /// ## Requirements + /// Many systems need to understand for adjudication if the diagnosis was present + /// a time of admission. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Present on admission. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission + #[fhir_serde(rename = "onAdmission")] + pub on_admission: Option, + /// Package billing code + /// + /// A package billing code or bundle code used to group products and services to + /// a particular health condition (such as heart attack) which is based on a + /// predetermined grouping code system. + /// + /// ## Requirements + /// Required to relate the current diagnosis to a package billing code that is + /// then referenced on the individual claim items which are specific to the + /// health condition covered by the package code. + /// + /// ## Implementation Notes + /// For example DRG (Diagnosis Related Group) or a bundled billing code. A + /// patient may have a diagnosis of a Myocardial Infarction and a DRG for + /// HeartAttack would be assigned. The Claim item (and possible subsequent + /// claims) would refer to the DRG for those line items that were for services + /// related to the heart attack event. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The DRG codes associated with the diagnosis. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + #[fhir_serde(rename = "packageCode")] + pub package_code: Option, +} + +/// Patient insurance information +/// +/// Financial instruments for reimbursement for the health care products and +/// services specified on the claim. +/// +/// ## Requirements +/// At least one insurer is required for a claim to be a claim. +/// +/// ## Implementation Notes +/// All insurance coverages for the patient which may be applicable for +/// reimbursement, of the products and services listed in the claim, are +/// typically provided in the claim to allow insurers to confirm the ordering of +/// the insurance coverages relative to local 'coordination of benefit' rules. +/// One coverage (and only one) with 'focal=true' is to be used in the +/// adjudication of this claim. Coverages appearing before the focal Coverage in +/// the list, and where 'Coverage.subrogation=false', should provide a reference +/// to the ClaimResponse containing the adjudication results of the prior claim. +/// +/// ## Cardinality: Required, Multiple (1..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimInsurance { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Insurance instance identifier + /// + /// A number to uniquely identify insurance entries and provide a sequence of + /// coverages to convey coordination of benefit order. + /// + /// ## Requirements + /// To maintain order of the coverages. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Coverage to be used for adjudication + /// + /// A flag to indicate that this Coverage is to be used for adjudication of this + /// claim when set to true. + /// + /// ## Requirements + /// To identify which coverage in the list is being used to adjudicate this + /// claim. + /// + /// ## Implementation Notes + /// A patient may (will) have multiple insurance policies which provide + /// reimbursement for healthcare services and products. For example a person may + /// also be covered by their spouse's policy and both appear in the list (and may + /// be from the same insurer). This flag will be set to true for only one of the + /// listed policies and that policy will be used for adjudicating this claim. + /// Other claims would be created to request adjudication against the other + /// listed policies. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub focal: Boolean, + /// Pre-assigned Claim number + /// + /// The business identifier to be used when the claim is sent for adjudication + /// against this insurance policy. + /// + /// ## Requirements + /// This will be the claim number should it be necessary to create this claim in + /// the future. This is provided so that payors may forward claims to other + /// payors in the Coordination of Benefit for adjudication rather than the + /// provider being required to initiate each adjudication. + /// + /// ## Implementation Notes + /// Only required in jurisdictions where insurers, rather than the provider, are + /// required to send claims to insurers that appear after them in the list. This + /// element is not required when 'subrogation=true'. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option, + /// Insurance information + /// + /// Reference to the insurance card level information contained in the Coverage + /// resource. The coverage issuing insurer will use these details to locate the + /// patient's actual coverage within the insurer's information system. + /// + /// ## Requirements + /// Required to allow the adjudicator to locate the correct policy and history + /// within their information system. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub coverage: Reference, + /// Additional provider contract number + /// + /// A business agreement number established between the provider and the insurer + /// for special business processing purposes. + /// + /// ## Requirements + /// Providers may have multiple business arrangements with a given insurer and + /// must supply the specific contract number for adjudication. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "businessArrangement")] + pub business_arrangement: Option, + /// Prior authorization reference number + /// + /// Reference numbers previously provided by the insurer to the provider to be + /// quoted on subsequent claims containing services or products related to the + /// prior authorization. + /// + /// ## Requirements + /// Providers must quote previously issued authorization reference numbers in + /// order to obtain adjudication as previously advised on the Preauthorization. + /// + /// ## Implementation Notes + /// This value is an alphanumeric string that may be provided over the phone, via + /// text, via paper, or within a ClaimResponse resource and is not a FHIR + /// Identifier. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "preAuthRef")] + pub pre_auth_ref: Option>, + /// Adjudication results + /// + /// The result of the adjudication of the line items for the Coverage specified + /// in this insurance. + /// + /// ## Requirements + /// An insurer need the adjudication results from prior insurers to determine the + /// outstanding balance remaining by item for the items in the curent claim. + /// + /// ## Implementation Notes + /// Must not be specified when 'focal=true' for this insurance. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "claimResponse")] + pub claim_response: Option, +} + +/// Choice of types for the serviced\[x\] field in ClaimItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "serviced")] +pub enum ClaimItemServiced { + /// Variant accepting the Date type. + #[fhir_serde(rename = "servicedDate")] + Date(Date), + /// Variant accepting the Period type. + #[fhir_serde(rename = "servicedPeriod")] + Period(Period), +} + +/// Choice of types for the location\[x\] field in ClaimItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "location")] +pub enum ClaimItemLocation { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "locationCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Address type. + #[fhir_serde(rename = "locationAddress")] + Address(Address), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "locationReference")] + Reference(Reference), +} + +/// Product or service provided +/// +/// A claim line. Either a simple product or service or a 'group' of details +/// which can each be a simple items or groups of sub-details. +/// +/// ## Requirements +/// The items to be processed for adjudication. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "serviced,location")] +pub struct ClaimItem { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -19169,7 +19832,7 @@ pub struct ClaimItem { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimItemDetailSubDetail { +pub struct ClaimItemDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -19332,6 +19995,9 @@ pub struct ClaimItemDetailSubDetail { /// - **Strength**: example /// - **Description**: Allowable service and product codes. /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + /// + /// ## Aliases + /// Drug Code, Bill Code, Service Code #[fhir_serde(rename = "productOrService")] pub product_or_service: CodeableConcept, /// Service/Product billing modifiers @@ -19465,28 +20131,30 @@ pub struct ClaimItemDetailSubDetail { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub udi: Option>, + /// Product or service provided + /// + /// A claim detail line. Either a simple (a product or service) or a 'group' of + /// sub-details which are simple items. + /// + /// ## Requirements + /// The items to be processed for adjudication. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "subDetail")] + pub sub_detail: Option>, } -/// Choice of types for the procedure\[x\] field in ClaimProcedure -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "procedure")] -pub enum ClaimProcedureProcedure { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "procedureCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "procedureReference")] - Reference(Reference), -} - -/// Clinical procedures performed +/// Product or service provided /// -/// Procedures performed on the patient relevant to the billing items with the -/// claim. +/// A claim detail line. Either a simple (a product or service) or a 'group' of +/// sub-details which are simple items. /// /// ## Requirements -/// The specific clinical invention are sometimes required to be provided to -/// justify billing a greater than customary amount for a service. +/// The items to be processed for adjudication. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -19494,8 +20162,7 @@ pub enum ClaimProcedureProcedure { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "procedure")] -pub struct ClaimProcedure { +pub struct ClaimItemDetailSubDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -19576,12 +20243,13 @@ pub struct ClaimProcedure { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Procedure instance identifier + /// Item instance identifier /// - /// A number to uniquely identify procedure entries. + /// A number to uniquely identify item entries. /// /// ## Requirements - /// Necessary to provide a mechanism to link to claim details. + /// Necessary to provide a mechanism to link to items from within the claim and + /// within the adjudication details of the ClaimResponse. /// /// ## Cardinality: Required (1..1) /// @@ -19589,18 +20257,14 @@ pub struct ClaimProcedure { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub sequence: PositiveInt, - /// Category of Procedure + /// Revenue or cost center code /// - /// When the condition was observed or the relative ranking. + /// The type of revenue or cost center providing the product and/or service. /// /// ## Requirements - /// Often required to capture a particular diagnosis, for example: primary or - /// discharge. - /// - /// ## Implementation Notes - /// For example: primary, secondary. + /// Needed in the processing of institutional claims. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -19608,30 +20272,48 @@ pub struct ClaimProcedure { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Example procedure type codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-procedure-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// When the procedure was performed + /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center + pub revenue: Option, + /// Benefit classification /// - /// Date and optionally time the procedure was performed. + /// Code to identify the general type of benefits under which products and + /// services are provided. /// /// ## Requirements - /// Required for auditing purposes. + /// Needed in the processing of institutional claims as this allows the insurer + /// to determine whether a facial X-Ray is for dental, orthopedic, or facial + /// surgery purposes. + /// + /// ## Implementation Notes + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// Specific clinical procedure /// - /// The code or reference to a Procedure resource which identifies the clinical - /// intervention performed. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral-basic, major, glasses. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: Option, + /// Billing, service, product, or drug code + /// + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// /// ## Requirements - /// This identifies the actual clinical procedure. + /// Necessary to state what was provided or done. + /// + /// ## Implementation Notes + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// /// ## Cardinality: Required (1..1) /// @@ -19641,84 +20323,201 @@ pub struct ClaimProcedure { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Example ICD10 Procedure codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10-procedures - #[fhir_serde(flatten)] - pub procedure: Option, - /// Unique device identifier + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers /// - /// Unique Device Identifiers associated with this line item. + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. + /// + /// ## Implementation Notes + /// For example in Oral whether the treatment is cosmetic or associated with TMJ, + /// or for Medical whether the treatment was outside the clinic or out of office + /// hours. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, -} - -/// Recipient of benefits payable -/// -/// The party to be reimbursed for cost of the products and services according to -/// the terms of the policy. -/// -/// ## Requirements -/// The provider needs to specify who they wish to be reimbursed and the claims -/// processor needs express who they will reimburse. -/// -/// ## Implementation Notes -/// Often providers agree to receive the benefits payable to reduce the near-term -/// costs to the patient. The insurer may decline to pay the provider and choose -/// to pay the subscriber instead. -/// -/// ## Cardinality: Optional (0..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimPayee { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Program the product or service is provided under /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// Identifies the program under which this may be recovered. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// Commonly used in in the identification of publicly provided program focused + /// on population segments or disease classifications. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// For example: Neonatal program, child dental program or drug users recovery + /// program. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element + /// ## Binding + /// - **Strength**: example + /// - **Description**: Program specific reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code + #[fhir_serde(rename = "programCode")] + pub program_code: Option>, + /// Count of products or services + /// + /// The number of repetitions of a service or product. + /// + /// ## Requirements + /// Required when the product or service code does not convey the quantity + /// provided. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// Fee, charge or cost per item + /// + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. + /// + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor + /// + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. + /// + /// ## Requirements + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. + /// + /// ## Implementation Notes + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub factor: Option, + /// Total item cost + /// + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. + /// + /// ## Implementation Notes + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Unique device identifier + /// + /// Unique Device Identifiers associated with this line item. + /// + /// ## Requirements + /// The UDI code allows the insurer to obtain device level information on the + /// product supplied. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub udi: Option>, +} + +/// Recipient of benefits payable +/// +/// The party to be reimbursed for cost of the products and services according to +/// the terms of the policy. +/// +/// ## Requirements +/// The provider needs to specify who they wish to be reimbursed and the claims +/// processor needs express who they will reimburse. +/// +/// ## Implementation Notes +/// Often providers agree to receive the benefits payable to reduce the near-term +/// costs to the patient. The insurer may decline to pay the provider and choose +/// to pay the subscriber instead. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimPayee { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of @@ -19800,25 +20599,26 @@ pub struct ClaimPayee { pub party: Option, } -/// Choice of types for the diagnosis\[x\] field in ClaimDiagnosis +/// Choice of types for the procedure\[x\] field in ClaimProcedure #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "diagnosis")] -pub enum ClaimDiagnosisDiagnosis { +#[fhir_choice_element(base_name = "procedure")] +pub enum ClaimProcedureProcedure { /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "diagnosisCodeableConcept")] + #[fhir_serde(rename = "procedureCodeableConcept")] CodeableConcept(CodeableConcept), /// Variant accepting the Reference type. - #[fhir_serde(rename = "diagnosisReference")] + #[fhir_serde(rename = "procedureReference")] Reference(Reference), } -/// Pertinent diagnosis information +/// Clinical procedures performed /// -/// Information about diagnoses relevant to the claim items. +/// Procedures performed on the patient relevant to the billing items with the +/// claim. /// /// ## Requirements -/// Required for the adjudication by provided context for the services and -/// product listed. +/// The specific clinical invention are sometimes required to be provided to +/// justify billing a greater than customary amount for a service. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -19826,8 +20626,8 @@ pub enum ClaimDiagnosisDiagnosis { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "diagnosis")] -pub struct ClaimDiagnosis { +#[fhir_resource(choice_elements = "procedure")] +pub struct ClaimProcedure { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -19908,17 +20708,12 @@ pub struct ClaimDiagnosis { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Diagnosis instance identifier + /// Procedure instance identifier /// - /// A number to uniquely identify diagnosis entries. + /// A number to uniquely identify procedure entries. /// /// ## Requirements - /// Necessary to maintain the order of the diagnosis items and provide a - /// mechanism to link to claim details. - /// - /// ## Implementation Notes - /// Diagnosis are presented in list order to their expected importance: primary, - /// secondary, etc. + /// Necessary to provide a mechanism to link to claim details. /// /// ## Cardinality: Required (1..1) /// @@ -19926,27 +20721,7 @@ pub struct ClaimDiagnosis { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub sequence: PositiveInt, - /// Nature of illness or problem - /// - /// The nature of illness or problem in a coded form or as a reference to an - /// external defined Condition. - /// - /// ## Requirements - /// Provides health context for the evaluation of the products and/or services. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Example ICD10 Diagnostic codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 - #[fhir_serde(flatten)] - pub diagnosis: Option, - /// Timing or nature of the diagnosis + /// Category of Procedure /// /// When the condition was observed or the relative ranking. /// @@ -19955,7 +20730,7 @@ pub struct ClaimDiagnosis { /// discharge. /// /// ## Implementation Notes - /// For example: admitting, primary, secondary, discharge. + /// For example: primary, secondary. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -19965,49 +20740,32 @@ pub struct ClaimDiagnosis { /// /// ## Binding /// - **Strength**: example - /// - **Description**: The type of the diagnosis: admitting, principal, discharge. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosistype + /// - **Description**: Example procedure type codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-procedure-type #[fhir_serde(rename = "type")] pub r#type: Option>, - /// Present on admission + /// When the procedure was performed /// - /// Indication of whether the diagnosis was present on admission to a facility. + /// Date and optionally time the procedure was performed. /// /// ## Requirements - /// Many systems need to understand for adjudication if the diagnosis was present - /// a time of admission. + /// Required for auditing purposes. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub date: Option, + /// Specific clinical procedure /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Present on admission. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission - #[fhir_serde(rename = "onAdmission")] - pub on_admission: Option, - /// Package billing code - /// - /// A package billing code or bundle code used to group products and services to - /// a particular health condition (such as heart attack) which is based on a - /// predetermined grouping code system. + /// The code or reference to a Procedure resource which identifies the clinical + /// intervention performed. /// /// ## Requirements - /// Required to relate the current diagnosis to a package billing code that is - /// then referenced on the individual claim items which are specific to the - /// health condition covered by the package code. - /// - /// ## Implementation Notes - /// For example DRG (Diagnosis Related Group) or a bundled billing code. A - /// patient may have a diagnosis of a Myocardial Infarction and a DRG for - /// HeartAttack would be assigned. The Claim item (and possible subsequent - /// claims) would refer to the DRG for those line items that were for services - /// related to the heart attack event. + /// This identifies the actual clinical procedure. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -20015,10 +20773,24 @@ pub struct ClaimDiagnosis { /// /// ## Binding /// - **Strength**: example - /// - **Description**: The DRG codes associated with the diagnosis. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - #[fhir_serde(rename = "packageCode")] - pub package_code: Option, + /// - **Description**: Example ICD10 Procedure codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10-procedures + #[fhir_serde(flatten)] + pub procedure: Option, + /// Unique device identifier + /// + /// Unique Device Identifiers associated with this line item. + /// + /// ## Requirements + /// The UDI code allows the insurer to obtain device level information on the + /// product supplied. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub udi: Option>, } /// Prior or corollary claims @@ -20428,871 +21200,6 @@ pub struct ClaimSupportingInfo { pub reason: Option, } -/// Processing errors -/// -/// Errors encountered during the processing of the adjudication. -/// -/// ## Requirements -/// Need to communicate processing issues to the requestor. -/// -/// ## Implementation Notes -/// If the request contains errors then an error element should be provided and -/// no adjudication related sections (item, addItem, or payment) should be -/// present. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseError { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Item sequence number - /// - /// The sequence number of the line item submitted which contains the error. This - /// value is omitted when the error occurs outside of the item structure. - /// - /// ## Requirements - /// Provides references to the claim items. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "itemSequence")] - pub item_sequence: Option, - /// Detail sequence number - /// - /// The sequence number of the detail within the line item submitted which - /// contains the error. This value is omitted when the error occurs outside of - /// the item structure. - /// - /// ## Requirements - /// Provides references to the claim details within the claim item. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "detailSequence")] - pub detail_sequence: Option, - /// Subdetail sequence number - /// - /// The sequence number of the sub-detail within the detail within the line item - /// submitted which contains the error. This value is omitted when the error - /// occurs outside of the item structure. - /// - /// ## Requirements - /// Provides references to the claim sub-details within the claim detail. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetailSequence")] - pub sub_detail_sequence: Option, - /// Error code detailing processing issues - /// - /// An error code, from a specified code system, which details why the claim - /// could not be adjudicated. - /// - /// ## Requirements - /// Required to convey processing errors. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication error codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-error - pub code: CodeableConcept, -} - -/// Adjudication for claim details -/// -/// A claim detail. Either a simple (a product or service) or a 'group' of -/// sub-details which are simple items. -/// -/// ## Requirements -/// The adjudication for details provided on the claim. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseItemDetail { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Claim detail instance identifier - /// - /// A number to uniquely reference the claim detail entry. - /// - /// ## Requirements - /// Necessary to provide a mechanism to link the adjudication result to the - /// submitted claim detail. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "detailSequence")] - pub detail_sequence: PositiveInt, - /// Applicable note numbers - /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. - /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Detail level adjudication details - /// - /// The adjudication results. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Adjudication for claim sub-details - /// - /// A sub-detail adjudication of a simple product or service. - /// - /// ## Requirements - /// The adjudication for sub-details provided on the claim. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetail")] - pub sub_detail: Option>, -} - -/// Insurer added line items -/// -/// The third-tier service adjudications for payor added services. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseAddItemDetailSubDetail { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. - /// - /// ## Requirements - /// Necessary to state what was provided or done. - /// - /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. - /// - /// ## Implementation Notes - /// For example in Oral whether the treatment is cosmetic or associated with TMJ, - /// or for Medical whether the treatment was outside the clinic or outside of - /// office hours. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Count of products or services - /// - /// The number of repetitions of a service or product. - /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. - /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor - /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. - /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. - /// - /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost - /// - /// The quantity times the unit price for an additional service or product or - /// charge. - /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. - /// - /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Applicable note numbers - /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. - /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Added items detail adjudication - /// - /// The adjudication results. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, -} - -/// Adjudication totals -/// -/// Categorized monetary totals for the adjudication. -/// -/// ## Requirements -/// To provide the requestor with financial totals by category for the -/// adjudication. -/// -/// ## Implementation Notes -/// Totals for amounts submitted, co-pays, benefits payable etc. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseTotal { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Type of adjudication information - /// - /// A code to indicate the information type of this adjudication record. - /// Information types may include: the value submitted, maximum values or - /// percentages allowed or payable under the plan, amounts that the patient is - /// responsible for in aggregate or pertaining to this item, amounts paid by - /// other coverages, and the benefit payable for this item. - /// - /// ## Requirements - /// Needed to convey the type of total provided. - /// - /// ## Implementation Notes - /// For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, - /// etc. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication - pub category: CodeableConcept, - /// Financial total for the category - /// - /// Monetary total amount associated with the category. - /// - /// ## Requirements - /// Needed to convey the total monetary amount. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Money, -} - -/// Adjudication for claim line items -/// -/// A claim line. Either a simple (a product or service) or a 'group' of details -/// which can also be a simple items or groups of sub-details. -/// -/// ## Requirements -/// The adjudication for items provided on the claim. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseItem { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Claim item instance identifier - /// - /// A number to uniquely reference the claim item entries. - /// - /// ## Requirements - /// Necessary to provide a mechanism to link the adjudication result to the - /// submitted claim item. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "itemSequence")] - pub item_sequence: PositiveInt, - /// Applicable note numbers - /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. - /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Adjudication details - /// - /// If this item is a group then the values here are a summary of the - /// adjudication of the detail items. If this item is a simple product or service - /// then this is the result of the adjudication of this item. - /// - /// ## Requirements - /// The adjudication results conveys the insurer's assessment of the item - /// provided in the claim under the terms of the patient's insurance coverage. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Adjudication for claim details - /// - /// A claim detail. Either a simple (a product or service) or a 'group' of - /// sub-details which are simple items. - /// - /// ## Requirements - /// The adjudication for details provided on the claim. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, -} - /// FHIR ClaimResponse type /// /// This resource provides the adjudication details from the processing of a @@ -22032,23 +21939,54 @@ pub struct ClaimResponse { pub error: Option>, } -/// Adjudication details +/// Choice of types for the serviced\[x\] field in ClaimResponseAddItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "serviced")] +pub enum ClaimResponseAddItemServiced { + /// Variant accepting the Date type. + #[fhir_serde(rename = "servicedDate")] + Date(Date), + /// Variant accepting the Period type. + #[fhir_serde(rename = "servicedPeriod")] + Period(Period), +} + +/// Choice of types for the location\[x\] field in ClaimResponseAddItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "location")] +pub enum ClaimResponseAddItemLocation { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "locationCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Address type. + #[fhir_serde(rename = "locationAddress")] + Address(Address), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "locationReference")] + Reference(Reference), +} + +/// Insurer added line items /// -/// If this item is a group then the values here are a summary of the -/// adjudication of the detail items. If this item is a simple product or service -/// then this is the result of the adjudication of this item. +/// The first-tier service adjudications for payor added product or service +/// lines. /// /// ## Requirements -/// The adjudication results conveys the insurer's assessment of the item -/// provided in the claim under the terms of the patient's insurance coverage. +/// Insurers may redefine the provided product or service or may package and/or +/// decompose groups of products and services. The addItems allows the insurer to +/// provide their line item list with linkage to the submitted +/// items/details/sub-details. In a preauthorization the insurer may use the +/// addItem structure to provide additional information on authorized products +/// and services. /// -/// ## Cardinality: Required, Multiple (1..*) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseItemAdjudication { +#[fhir_resource(choice_elements = "serviced,location")] +pub struct ClaimResponseAddItem { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -22129,232 +22067,255 @@ pub struct ClaimResponseItemAdjudication { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of adjudication information + /// Item sequence number /// - /// A code to indicate the information type of this adjudication record. - /// Information types may include the value submitted, maximum values or - /// percentages allowed or payable under the plan, amounts that: the patient is - /// responsible for in aggregate or pertaining to this item; amounts paid by - /// other coverages; and, the benefit payable for this item. + /// Claim items which this service line is intended to replace. /// /// ## Requirements - /// Needed to enable understanding of the context of the other information in the - /// adjudication. - /// - /// ## Implementation Notes - /// For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, - /// etc. + /// Provides references to the claim items. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "itemSequence")] + pub item_sequence: Option>, + /// Detail sequence number /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication - pub category: CodeableConcept, - /// Explanation of adjudication outcome - /// - /// A code supporting the understanding of the adjudication result and explaining - /// variance from expected amount. + /// The sequence number of the details within the claim item which this line is + /// intended to replace. /// /// ## Requirements - /// To support understanding of variance from adjudication expectations. + /// Provides references to the claim details within the claim item. /// - /// ## Implementation Notes - /// For example may indicate that the funds for this benefit type have been - /// exhausted. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "detailSequence")] + pub detail_sequence: Option>, + /// Subdetail sequence number + /// + /// The sequence number of the sub-details within the details within the claim + /// item which this line is intended to replace. + /// + /// ## Requirements + /// Provides references to the claim sub-details within the claim detail. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "subdetailSequence")] + pub subdetail_sequence: Option>, + /// Authorized providers /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-reason - pub reason: Option, - /// Monetary amount + /// The providers who are authorized for the services rendered to the patient. /// - /// Monetary amount associated with the category. + /// ## Requirements + /// Insurer may provide authorization specifically to a restricted set of + /// providers rather than an open authorization. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub provider: Option>, + /// Billing, service, product, or drug code + /// + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// /// ## Requirements - /// Most adjuciation categories convey a monetary amount. + /// Necessary to state what was provided or done. /// /// ## Implementation Notes - /// For example: amount submitted, eligible amount, co-payment, and benefit - /// payable. + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Option, - /// Non-monetary value /// - /// A non-monetary value associated with the category. Mutually exclusive to the - /// amount element above. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers + /// + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// /// ## Requirements - /// Some adjudication categories convey a percentage or a fixed value. + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// /// ## Implementation Notes - /// For example: eligible percentage or co-payment percentage. + /// For example in Oral whether the treatment is cosmetic or associated with TMJ, + /// or for Medical whether the treatment was outside the clinic or outside of + /// office hours. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: Option, -} - -/// Payment Details -/// -/// Payment details for the adjudication of the claim. -/// -/// ## Requirements -/// Needed to convey references to the financial instrument that has been used if -/// payment has been made. -/// -/// ## Cardinality: Optional (0..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponsePayment { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Program the product or service is provided under /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// Identifies the program under which this may be recovered. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// Commonly used in in the identification of publicly provided program focused + /// on population segments or disease classifications. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// For example: Neonatal program, child dental program or drug users recovery + /// program. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Program specific reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code + #[fhir_serde(rename = "programCode")] + pub program_code: Option>, + /// Date or dates of service or product delivery /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The date or dates when the service or product was supplied, performed or + /// completed. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Needed to determine whether the service or product was provided during the + /// term of the insurance coverage. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub serviced: Option, + /// Place of service or where product was supplied /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// Where the product or service was provided. + /// + /// ## Requirements + /// The location can alter whether the item was acceptable for insurance purposes + /// or impact the determination of the benefit amount. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Partial or complete payment + /// ## Binding + /// - **Strength**: example + /// - **Description**: Place of service: pharmacy, school, prison, etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place + #[fhir_serde(flatten)] + pub location: Option, + /// Count of products or services /// - /// Whether this represents partial or complete payment of the benefits payable. + /// The number of repetitions of a service or product. /// /// ## Requirements - /// To advise the requestor when the insurer believes all payments to have been - /// completed. + /// Required when the product or service code does not convey the quantity + /// provided. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// Fee, charge or cost per item /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The type (partial, complete) of the payment. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-paymenttype - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Payment adjustment for non-claim issues + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. /// - /// Total amount of all adjustments to this payment included in this transaction - /// which are not related to this claim's adjudication. + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor + /// + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. /// /// ## Requirements - /// To advise the requestor of adjustments applied to the payment. + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// /// ## Implementation Notes - /// Insurers will deduct amounts owing from the provider (adjustment), such as a - /// prior overpayment, from the amount owing to the provider (benefits payable) - /// when payment is made to the provider. + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjustment: Option, - /// Explanation for the adjustment + pub factor: Option, + /// Total item cost /// - /// Reason for the payment adjustment. + /// The quantity times the unit price for an additional service or product or + /// charge. /// /// ## Requirements - /// Needed to clarify the monetary adjustment. + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. + /// + /// ## Implementation Notes + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Anatomical location + /// + /// Physical service site on the patient (limb, tooth, etc.). + /// + /// ## Requirements + /// Allows insurer to validate specific procedures. + /// + /// ## Implementation Notes + /// For example: Providing a tooth code allows an insurer to identify a provider + /// performing a filling on a tooth that was previously removed. /// /// ## Cardinality: Optional (0..1) /// @@ -22364,53 +22325,65 @@ pub struct ClaimResponsePayment { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Payment Adjustment reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - #[fhir_serde(rename = "adjustmentReason")] - pub adjustment_reason: Option, - /// Expected date of payment + /// - **Description**: The code for the teeth, quadrant, sextant and arch. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth + #[fhir_serde(rename = "bodySite")] + pub body_site: Option, + /// Anatomical sub-location /// - /// Estimated date the payment will be issued or the actual issue date of - /// payment. + /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). /// /// ## Requirements - /// To advise the payee when payment can be expected. + /// Allows insurer to validate specific procedures. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// Payable amount after adjustment /// - /// Benefits payable less any payment adjustment. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The code for the tooth surface and surface combinations. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface + #[fhir_serde(rename = "subSite")] + pub sub_site: Option>, + /// Applicable note numbers + /// + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// /// ## Requirements - /// Needed to provide the actual payment amount. + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Money, - /// Business identifier for the payment + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Added items adjudication /// - /// Issuer's unique identifier for the payment instrument. + /// The adjudication results. /// - /// ## Requirements - /// Enable the receiver to reconcile when payment received. + /// ## Cardinality: Required, Multiple (1..*) /// - /// ## Implementation Notes - /// For example: EFT number or check number. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, + /// Insurer added line details /// - /// ## Cardinality: Optional (0..1) + /// The second-tier service adjudications for payor added services. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, + pub detail: Option>, } /// Insurer added line details @@ -22664,23 +22637,9 @@ pub struct ClaimResponseAddItemDetail { pub sub_detail: Option>, } -/// Patient insurance information -/// -/// Financial instruments for reimbursement for the health care products and -/// services specified on the claim. -/// -/// ## Requirements -/// At least one insurer is required for a claim to be a claim. +/// Insurer added line items /// -/// ## Implementation Notes -/// All insurance coverages for the patient which may be applicable for -/// reimbursement, of the products and services listed in the claim, are -/// typically provided in the claim to allow insurers to confirm the ordering of -/// the insurance coverages relative to local 'coordination of benefit' rules. -/// One coverage (and only one) with 'focal=true' is to be used in the -/// adjudication of this claim. Coverages appearing before the focal Coverage in -/// the list, and where 'subrogation=false', should provide a reference to the -/// ClaimResponse containing the adjudication results of the prior claim. +/// The third-tier service adjudications for payor added services. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -22688,7 +22647,7 @@ pub struct ClaimResponseAddItemDetail { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseInsurance { +pub struct ClaimResponseAddItemDetailSubDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -22769,105 +22728,166 @@ pub struct ClaimResponseInsurance { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Insurance instance identifier + /// Billing, service, product, or drug code /// - /// A number to uniquely identify insurance entries and provide a sequence of - /// coverages to convey coordination of benefit order. + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// /// ## Requirements - /// To maintain order of the coverages. + /// Necessary to state what was provided or done. + /// + /// ## Implementation Notes + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Coverage to be used for adjudication /// - /// A flag to indicate that this Coverage is to be used for adjudication of this - /// claim when set to true. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers + /// + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// /// ## Requirements - /// To identify which coverage in the list is being used to adjudicate this - /// claim. + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// /// ## Implementation Notes - /// A patient may (will) have multiple insurance policies which provide - /// reimbursement for healthcare services and products. For example a person may - /// also be covered by their spouse's policy and both appear in the list (and may - /// be from the same insurer). This flag will be set to true for only one of the - /// listed policies and that policy will be used for adjudicating this claim. - /// Other claims would be created to request adjudication against the other - /// listed policies. + /// For example in Oral whether the treatment is cosmetic or associated with TMJ, + /// or for Medical whether the treatment was outside the clinic or outside of + /// office hours. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub focal: Boolean, - /// Insurance information /// - /// Reference to the insurance card level information contained in the Coverage - /// resource. The coverage issuing insurer will use these details to locate the - /// patient's actual coverage within the insurer's information system. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Count of products or services + /// + /// The number of repetitions of a service or product. /// /// ## Requirements - /// Required to allow the adjudicator to locate the correct policy and history - /// within their information system. + /// Required when the product or service code does not convey the quantity + /// provided. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Reference, - /// Additional provider contract number + pub quantity: Option, + /// Fee, charge or cost per item /// - /// A business agreement number established between the provider and the insurer - /// for special business processing purposes. + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. /// /// ## Requirements - /// Providers may have multiple business arrangements with a given insurer and - /// must supply the specific contract number for adjudication. + /// The amount charged to the patient by the provider for a single unit. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "businessArrangement")] - pub business_arrangement: Option, - /// Adjudication results + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor /// - /// The result of the adjudication of the line items for the Coverage specified - /// in this insurance. + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. /// /// ## Requirements - /// An insurer need the adjudication results from prior insurers to determine the - /// outstanding balance remaining by item for the items in the curent claim. + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// /// ## Implementation Notes - /// Must not be specified when 'focal=true' for this insurance. + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "claimResponse")] - pub claim_response: Option, + pub factor: Option, + /// Total item cost + /// + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. + /// + /// ## Implementation Notes + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Applicable note numbers + /// + /// The numbers associated with notes below which apply to the adjudication of + /// this item. + /// + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Added items detail adjudication + /// + /// The adjudication results. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, } -/// Note concerning adjudication +/// Processing errors /// -/// A note that describes or explains adjudication results in a human readable -/// form. +/// Errors encountered during the processing of the adjudication. /// /// ## Requirements -/// Provides the insurer specific textual explanations associated with the -/// processing. +/// Need to communicate processing issues to the requestor. +/// +/// ## Implementation Notes +/// If the request contains errors then an error element should be provided and +/// no adjudication related sections (item, addItem, or payment) should be +/// present. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -22875,7 +22895,7 @@ pub struct ClaimResponseInsurance { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseProcessNote { +pub struct ClaimResponseError { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -22956,80 +22976,91 @@ pub struct ClaimResponseProcessNote { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Note instance identifier + /// Item sequence number /// - /// A number to uniquely identify a note entry. + /// The sequence number of the line item submitted which contains the error. This + /// value is omitted when the error occurs outside of the item structure. /// /// ## Requirements - /// Necessary to provide a mechanism to link from adjudications. + /// Provides references to the claim items. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub number: Option, - /// display | print | printoper + #[fhir_serde(rename = "itemSequence")] + pub item_sequence: Option, + /// Detail sequence number /// - /// The business purpose of the note text. + /// The sequence number of the detail within the line item submitted which + /// contains the error. This value is omitted when the error occurs outside of + /// the item structure. /// /// ## Requirements - /// To convey the expectation for when the text is used. + /// Provides references to the claim details within the claim item. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "detailSequence")] + pub detail_sequence: Option, + /// Subdetail sequence number /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The presentation types of notes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/note-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Note explanatory text - /// - /// The explanation or description associated with the processing. + /// The sequence number of the sub-detail within the detail within the line item + /// submitted which contains the error. This value is omitted when the error + /// occurs outside of the item structure. /// /// ## Requirements - /// Required to provide human readable explanation. + /// Provides references to the claim sub-details within the claim detail. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub text: String, - /// Language of the text + #[fhir_serde(rename = "subDetailSequence")] + pub sub_detail_sequence: Option, + /// Error code detailing processing issues /// - /// A code to define the language used in the text of the note. + /// An error code, from a specified code system, which details why the claim + /// could not be adjudicated. /// /// ## Requirements - /// Note text may vary from the resource defined language. - /// - /// ## Implementation Notes - /// Only required if the language is different from the resource language. + /// Required to convey processing errors. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, + /// - **Strength**: example + /// - **Description**: The adjudication error codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-error + pub code: CodeableConcept, } -/// Adjudication for claim sub-details +/// Patient insurance information /// -/// A sub-detail adjudication of a simple product or service. +/// Financial instruments for reimbursement for the health care products and +/// services specified on the claim. /// /// ## Requirements -/// The adjudication for sub-details provided on the claim. +/// At least one insurer is required for a claim to be a claim. +/// +/// ## Implementation Notes +/// All insurance coverages for the patient which may be applicable for +/// reimbursement, of the products and services listed in the claim, are +/// typically provided in the claim to allow insurers to confirm the ordering of +/// the insurance coverages relative to local 'coordination of benefit' rules. +/// One coverage (and only one) with 'focal=true' is to be used in the +/// adjudication of this claim. Coverages appearing before the focal Coverage in +/// the list, and where 'subrogation=false', should provide a reference to the +/// ClaimResponse containing the adjudication results of the prior claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -23037,7 +23068,7 @@ pub struct ClaimResponseProcessNote { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClaimResponseItemDetailSubDetail { +pub struct ClaimResponseInsurance { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -23118,88 +23149,104 @@ pub struct ClaimResponseItemDetailSubDetail { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Claim sub-detail instance identifier + /// Insurance instance identifier /// - /// A number to uniquely reference the claim sub-detail entry. + /// A number to uniquely identify insurance entries and provide a sequence of + /// coverages to convey coordination of benefit order. /// /// ## Requirements - /// Necessary to provide a mechanism to link the adjudication result to the - /// submitted claim sub-detail. + /// To maintain order of the coverages. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetailSequence")] - pub sub_detail_sequence: PositiveInt, - /// Applicable note numbers + pub sequence: PositiveInt, + /// Coverage to be used for adjudication /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + /// A flag to indicate that this Coverage is to be used for adjudication of this + /// claim when set to true. /// /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// To identify which coverage in the list is being used to adjudicate this + /// claim. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// A patient may (will) have multiple insurance policies which provide + /// reimbursement for healthcare services and products. For example a person may + /// also be covered by their spouse's policy and both appear in the list (and may + /// be from the same insurer). This flag will be set to true for only one of the + /// listed policies and that policy will be used for adjudicating this claim. + /// Other claims would be created to request adjudication against the other + /// listed policies. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Subdetail level adjudication details + pub focal: Boolean, + /// Insurance information /// - /// The adjudication results. + /// Reference to the insurance card level information contained in the Coverage + /// resource. The coverage issuing insurer will use these details to locate the + /// patient's actual coverage within the insurer's information system. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Required to allow the adjudicator to locate the correct policy and history + /// within their information system. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, -} - -/// Choice of types for the serviced\[x\] field in ClaimResponseAddItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum ClaimResponseAddItemServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), -} - -/// Choice of types for the location\[x\] field in ClaimResponseAddItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "location")] -pub enum ClaimResponseAddItemLocation { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "locationCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Address type. - #[fhir_serde(rename = "locationAddress")] - Address(Address), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "locationReference")] - Reference(Reference), + pub coverage: Reference, + /// Additional provider contract number + /// + /// A business agreement number established between the provider and the insurer + /// for special business processing purposes. + /// + /// ## Requirements + /// Providers may have multiple business arrangements with a given insurer and + /// must supply the specific contract number for adjudication. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "businessArrangement")] + pub business_arrangement: Option, + /// Adjudication results + /// + /// The result of the adjudication of the line items for the Coverage specified + /// in this insurance. + /// + /// ## Requirements + /// An insurer need the adjudication results from prior insurers to determine the + /// outstanding balance remaining by item for the items in the curent claim. + /// + /// ## Implementation Notes + /// Must not be specified when 'focal=true' for this insurance. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "claimResponse")] + pub claim_response: Option, } -/// Insurer added line items +/// Adjudication for claim line items /// -/// The first-tier service adjudications for payor added product or service -/// lines. +/// A claim line. Either a simple (a product or service) or a 'group' of details +/// which can also be a simple items or groups of sub-details. /// /// ## Requirements -/// Insurers may redefine the provided product or service or may package and/or -/// decompose groups of products and services. The addItems allows the insurer to -/// provide their line item list with linkage to the submitted -/// items/details/sub-details. In a preauthorization the insurer may use the -/// addItem structure to provide additional information on authorized products -/// and services. +/// The adjudication for items provided on the claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -23207,8 +23254,7 @@ pub enum ClaimResponseAddItemLocation { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced,location")] -pub struct ClaimResponseAddItem { +pub struct ClaimResponseItem { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -23289,130 +23335,183 @@ pub struct ClaimResponseAddItem { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Item sequence number + /// Claim item instance identifier /// - /// Claim items which this service line is intended to replace. + /// A number to uniquely reference the claim item entries. /// /// ## Requirements - /// Provides references to the claim items. + /// Necessary to provide a mechanism to link the adjudication result to the + /// submitted claim item. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[fhir_serde(rename = "itemSequence")] - pub item_sequence: Option>, - /// Detail sequence number + pub item_sequence: PositiveInt, + /// Applicable note numbers /// - /// The sequence number of the details within the claim item which this line is - /// intended to replace. + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// /// ## Requirements - /// Provides references to the claim details within the claim item. + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "detailSequence")] - pub detail_sequence: Option>, - /// Subdetail sequence number + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Adjudication details /// - /// The sequence number of the sub-details within the details within the claim - /// item which this line is intended to replace. + /// If this item is a group then the values here are a summary of the + /// adjudication of the detail items. If this item is a simple product or service + /// then this is the result of the adjudication of this item. /// /// ## Requirements - /// Provides references to the claim sub-details within the claim detail. + /// The adjudication results conveys the insurer's assessment of the item + /// provided in the claim under the terms of the patient's insurance coverage. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subdetailSequence")] - pub subdetail_sequence: Option>, - /// Authorized providers + pub adjudication: Option>, + /// Adjudication for claim details /// - /// The providers who are authorized for the services rendered to the patient. + /// A claim detail. Either a simple (a product or service) or a 'group' of + /// sub-details which are simple items. /// /// ## Requirements - /// Insurer may provide authorization specifically to a restricted set of - /// providers rather than an open authorization. + /// The adjudication for details provided on the claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option>, - /// Billing, service, product, or drug code + pub detail: Option>, +} + +/// Adjudication details +/// +/// If this item is a group then the values here are a summary of the +/// adjudication of the detail items. If this item is a simple product or service +/// then this is the result of the adjudication of this item. +/// +/// ## Requirements +/// The adjudication results conveys the insurer's assessment of the item +/// provided in the claim under the terms of the patient's insurance coverage. +/// +/// ## Cardinality: Required, Multiple (1..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimResponseItemAdjudication { + /// Unique id for inter-element referencing /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example in Oral whether the treatment is cosmetic or associated with TMJ, - /// or for Medical whether the treatment was outside the clinic or outside of - /// office hours. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Type of adjudication information /// - /// Identifies the program under which this may be recovered. + /// A code to indicate the information type of this adjudication record. + /// Information types may include the value submitted, maximum values or + /// percentages allowed or payable under the plan, amounts that: the patient is + /// responsible for in aggregate or pertaining to this item; amounts paid by + /// other coverages; and, the benefit payable for this item. /// /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. + /// Needed to enable understanding of the context of the other information in the + /// adjudication. /// /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. + /// For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, + /// etc. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -23420,33 +23519,20 @@ pub struct ClaimResponseAddItem { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Date or dates of service or product delivery + /// - **Description**: The adjudication codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication + pub category: CodeableConcept, + /// Explanation of adjudication outcome /// - /// The date or dates when the service or product was supplied, performed or - /// completed. + /// A code supporting the understanding of the adjudication result and explaining + /// variance from expected amount. /// /// ## Requirements - /// Needed to determine whether the service or product was provided during the - /// term of the insurance coverage. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub serviced: Option, - /// Place of service or where product was supplied - /// - /// Where the product or service was provided. + /// To support understanding of variance from adjudication expectations. /// - /// ## Requirements - /// The location can alter whether the item was acceptable for insurance purposes - /// or impact the determination of the benefit amount. + /// ## Implementation Notes + /// For example may indicate that the funds for this benefit type have been + /// exhausted. /// /// ## Cardinality: Optional (0..1) /// @@ -23456,120 +23542,155 @@ pub struct ClaimResponseAddItem { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Place of service: pharmacy, school, prison, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place - #[fhir_serde(flatten)] - pub location: Option, - /// Count of products or services + /// - **Description**: The adjudication reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-reason + pub reason: Option, + /// Monetary amount /// - /// The number of repetitions of a service or product. + /// Monetary amount associated with the category. /// /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + /// Most adjuciation categories convey a monetary amount. /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// ## Implementation Notes + /// For example: amount submitted, eligible amount, co-payment, and benefit + /// payable. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor + pub amount: Option, + /// Non-monetary value /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + /// A non-monetary value associated with the category. Mutually exclusive to the + /// amount element above. /// /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// Some adjudication categories convey a percentage or a fixed value. /// /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// For example: eligible percentage or co-payment percentage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost + pub value: Option, +} + +/// Adjudication for claim details +/// +/// A claim detail. Either a simple (a product or service) or a 'group' of +/// sub-details which are simple items. +/// +/// ## Requirements +/// The adjudication for details provided on the claim. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimResponseItemDetail { + /// Unique id for inter-element referencing /// - /// The quantity times the unit price for an additional service or product or - /// charge. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Anatomical location + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Physical service site on the patient (limb, tooth, etc.). + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Allows insurer to validate specific procedures. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example: Providing a tooth code allows an insurer to identify a provider - /// performing a filling on a tooth that was previously removed. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the teeth, quadrant, sextant and arch. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth - #[fhir_serde(rename = "bodySite")] - pub body_site: Option, - /// Anatomical sub-location + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Claim detail instance identifier /// - /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). + /// A number to uniquely reference the claim detail entry. /// /// ## Requirements - /// Allows insurer to validate specific procedures. + /// Necessary to provide a mechanism to link the adjudication result to the + /// submitted claim detail. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the tooth surface and surface combinations. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface - #[fhir_serde(rename = "subSite")] - pub sub_site: Option>, + #[fhir_serde(rename = "detailSequence")] + pub detail_sequence: PositiveInt, /// Applicable note numbers /// /// The numbers associated with notes below which apply to the adjudication of @@ -23586,7 +23707,7 @@ pub struct ClaimResponseAddItem { /// Expression: `hasValue() or (children().count() > id.count())` #[fhir_serde(rename = "noteNumber")] pub note_number: Option>, - /// Added items adjudication + /// Detail level adjudication details /// /// The adjudication results. /// @@ -23596,22 +23717,28 @@ pub struct ClaimResponseAddItem { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub adjudication: Option>, - /// Insurer added line details + /// Adjudication for claim sub-details /// - /// The second-tier service adjudications for payor added services. + /// A sub-detail adjudication of a simple product or service. + /// + /// ## Requirements + /// The adjudication for sub-details provided on the claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, + #[fhir_serde(rename = "subDetail")] + pub sub_detail: Option>, } -/// Possible or likely findings and diagnoses +/// Adjudication for claim sub-details /// -/// Specific findings or diagnoses that were considered likely or relevant to -/// ongoing treatment. +/// A sub-detail adjudication of a simple product or service. +/// +/// ## Requirements +/// The adjudication for sub-details provided on the claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -23619,7 +23746,7 @@ pub struct ClaimResponseAddItem { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ClinicalImpressionFinding { +pub struct ClaimResponseItemDetailSubDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -23700,213 +23827,78 @@ pub struct ClinicalImpressionFinding { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// What was found + /// Claim sub-detail instance identifier /// - /// Specific text or code for finding or diagnosis, which may include ruled-out - /// or resolved conditions. + /// A number to uniquely reference the claim sub-detail entry. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Necessary to provide a mechanism to link the adjudication result to the + /// submitted claim sub-detail. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "subDetailSequence")] + pub sub_detail_sequence: PositiveInt, + /// Applicable note numbers /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Identification of the Condition or diagnosis. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-code - #[fhir_serde(rename = "itemCodeableConcept")] - pub item_codeable_concept: Option, - /// What was found + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// - /// Specific reference for finding or diagnosis, which may include ruled-out or - /// resolved conditions. + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "itemReference")] - pub item_reference: Option, - /// Which investigations support finding + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Subdetail level adjudication details /// - /// Which investigations support finding or diagnosis. + /// The adjudication results. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub basis: Option, -} - -/// Choice of types for the effective\[x\] field in ClinicalImpression -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "effective")] -pub enum ClinicalImpressionEffective { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "effectiveDateTime")] - DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "effectivePeriod")] - Period(Period), + pub adjudication: Option>, } -/// FHIR ClinicalImpression type +/// Payment Details /// -/// A record of a clinical assessment performed to determine what problem(s) may -/// affect the patient and before planning the treatments or management -/// strategies that are best to manage a patient's condition. Assessments are -/// often 1:1 with a clinical consultation / encounter, but this varies greatly -/// depending on the clinical workflow. This resource is called -/// "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with -/// the recording of assessment tools such as Apgar score. +/// Payment details for the adjudication of the claim. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Requirements +/// Needed to convey references to the financial instrument that has been used if +/// payment has been made. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional (0..1) /// -/// See: [ClinicalImpression](http://hl7.org/fhir/StructureDefinition/ClinicalImpression) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "effective")] -pub struct ClinicalImpression { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct ClaimResponsePayment { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -23926,16 +23918,16 @@ pub struct ClinicalImpression { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -23960,7 +23952,8 @@ pub struct ClinicalImpression { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -23969,44 +23962,690 @@ pub struct ClinicalImpression { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business identifier + /// Partial or complete payment /// - /// Business identifiers assigned to this clinical impression by the performer or - /// other systems which remain constant as the resource is updated and propagates - /// from server to server. + /// Whether this represents partial or complete payment of the benefits payable. /// /// ## Requirements - /// Allows identification of the clinical impression as it is known by various - /// participating systems and in a way that remains consistent across servers. - /// - /// ## Implementation Notes - /// This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// To advise the requestor when the insurer believes all payments to have been + /// completed. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// in-progress | completed | entered-in-error /// - /// Identifies the workflow status of the assessment. - /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the code - /// entered-in-error that marks the clinical impression as not currently valid. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The type (partial, complete) of the payment. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-paymenttype + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Payment adjustment for non-claim issues + /// + /// Total amount of all adjustments to this payment included in this transaction + /// which are not related to this claim's adjudication. + /// + /// ## Requirements + /// To advise the requestor of adjustments applied to the payment. + /// + /// ## Implementation Notes + /// Insurers will deduct amounts owing from the provider (adjustment), such as a + /// prior overpayment, from the amount owing to the provider (benefits payable) + /// when payment is made to the provider. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjustment: Option, + /// Explanation for the adjustment + /// + /// Reason for the payment adjustment. + /// + /// ## Requirements + /// Needed to clarify the monetary adjustment. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Payment Adjustment reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/payment-adjustment-reason + #[fhir_serde(rename = "adjustmentReason")] + pub adjustment_reason: Option, + /// Expected date of payment + /// + /// Estimated date the payment will be issued or the actual issue date of + /// payment. + /// + /// ## Requirements + /// To advise the payee when payment can be expected. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub date: Option, + /// Payable amount after adjustment + /// + /// Benefits payable less any payment adjustment. + /// + /// ## Requirements + /// Needed to provide the actual payment amount. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub amount: Money, + /// Business identifier for the payment + /// + /// Issuer's unique identifier for the payment instrument. + /// + /// ## Requirements + /// Enable the receiver to reconcile when payment received. + /// + /// ## Implementation Notes + /// For example: EFT number or check number. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option, +} + +/// Note concerning adjudication +/// +/// A note that describes or explains adjudication results in a human readable +/// form. +/// +/// ## Requirements +/// Provides the insurer specific textual explanations associated with the +/// processing. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimResponseProcessNote { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Note instance identifier + /// + /// A number to uniquely identify a note entry. + /// + /// ## Requirements + /// Necessary to provide a mechanism to link from adjudications. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub number: Option, + /// display | print | printoper + /// + /// The business purpose of the note text. + /// + /// ## Requirements + /// To convey the expectation for when the text is used. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The presentation types of notes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/note-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Note explanatory text + /// + /// The explanation or description associated with the processing. + /// + /// ## Requirements + /// Required to provide human readable explanation. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub text: String, + /// Language of the text + /// + /// A code to define the language used in the text of the note. + /// + /// ## Requirements + /// Note text may vary from the resource defined language. + /// + /// ## Implementation Notes + /// Only required if the language is different from the resource language. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, +} + +/// Adjudication totals +/// +/// Categorized monetary totals for the adjudication. +/// +/// ## Requirements +/// To provide the requestor with financial totals by category for the +/// adjudication. +/// +/// ## Implementation Notes +/// Totals for amounts submitted, co-pays, benefits payable etc. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClaimResponseTotal { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Type of adjudication information + /// + /// A code to indicate the information type of this adjudication record. + /// Information types may include: the value submitted, maximum values or + /// percentages allowed or payable under the plan, amounts that the patient is + /// responsible for in aggregate or pertaining to this item, amounts paid by + /// other coverages, and the benefit payable for this item. + /// + /// ## Requirements + /// Needed to convey the type of total provided. + /// + /// ## Implementation Notes + /// For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, + /// etc. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The adjudication codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication + pub category: CodeableConcept, + /// Financial total for the category + /// + /// Monetary total amount associated with the category. + /// + /// ## Requirements + /// Needed to convey the total monetary amount. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub amount: Money, +} + +/// Choice of types for the effective\[x\] field in ClinicalImpression +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "effective")] +pub enum ClinicalImpressionEffective { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "effectiveDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "effectivePeriod")] + Period(Period), +} + +/// FHIR ClinicalImpression type +/// +/// A record of a clinical assessment performed to determine what problem(s) may +/// affect the patient and before planning the treatments or management +/// strategies that are best to manage a patient's condition. Assessments are +/// often 1:1 with a clinical consultation / encounter, but this varies greatly +/// depending on the clinical workflow. This resource is called +/// "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with +/// the recording of assessment tools such as Apgar score. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [ClinicalImpression](http://hl7.org/fhir/StructureDefinition/ClinicalImpression) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "effective")] +pub struct ClinicalImpression { + /// Logical id of this artifact + /// + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created + /// + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Business identifier + /// + /// Business identifiers assigned to this clinical impression by the performer or + /// other systems which remain constant as the resource is updated and propagates + /// from server to server. + /// + /// ## Requirements + /// Allows identification of the clinical impression as it is known by various + /// participating systems and in a way that remains consistent across servers. + /// + /// ## Implementation Notes + /// This is a business identifier, not a resource identifier (see + /// [discussion](resource.html#identifiers)). It is best practice for the + /// identifier to only appear on a single resource instance, however business + /// practices may occasionally dictate that multiple resource instances with the + /// same identifier can exist - possibly even with different resource types. For + /// example, multiple Patient and a Person resource instance might share the same + /// social insurance number. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// in-progress | completed | entered-in-error + /// + /// Identifies the workflow status of the assessment. + /// + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains the code + /// entered-in-error that marks the clinical impression as not currently valid. /// /// ## Cardinality: Required (1..1) /// @@ -24302,6 +24941,139 @@ pub struct ClinicalImpression { pub note: Option>, } +/// Possible or likely findings and diagnoses +/// +/// Specific findings or diagnoses that were considered likely or relevant to +/// ongoing treatment. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ClinicalImpressionFinding { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// What was found + /// + /// Specific text or code for finding or diagnosis, which may include ruled-out + /// or resolved conditions. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Identification of the Condition or diagnosis. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-code + #[fhir_serde(rename = "itemCodeableConcept")] + pub item_codeable_concept: Option, + /// What was found + /// + /// Specific reference for finding or diagnosis, which may include ruled-out or + /// resolved conditions. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "itemReference")] + pub item_reference: Option, + /// Which investigations support finding + /// + /// Which investigations support finding or diagnosis. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub basis: Option, +} + /// One or more sets of investigations (signs, symptoms, etc.) /// /// One or more sets of investigations (signs, symptoms, etc.). The actual @@ -25215,27 +25987,23 @@ pub struct CodeSystem { pub concept: Option>, } -/// Filter that can be used in a value set +/// Concepts in the code system /// -/// A filter that can be used in a value set compose statement when selecting -/// concepts using a filter. +/// Concepts that are in the code system. The concept definitions are inherently +/// hierarchical, but the definitions must be consulted to determine what the +/// meanings of the hierarchical relationships are. /// /// ## Implementation Notes -/// Note that filters defined in code systems usually require custom code on the -/// part of any terminology engine that will make them available for use in value -/// set filters. For this reason, they are generally only seen in high value -/// published terminologies. +/// If this is empty, it means that the code system resource does not represent +/// the content of the code system. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CodeSystemFilter { +pub struct CodeSystemConcept { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -25316,96 +26084,100 @@ pub struct CodeSystemFilter { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Code that identifies the filter + /// Code that identifies concept /// - /// The code that identifies this filter when it is used as a filter in - /// [ValueSet](valueset.html#).compose.include.filter. + /// A code - a text symbol - that uniquely identifies the concept within the code + /// system. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub code: Code, - /// How or why the filter is used + /// Text to display to the user /// - /// A description of how or why the filter is used. + /// A human readable string that is the recommended default way to present this + /// concept to a user. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub display: Option, + /// Formal definition + /// + /// The formal definition of the concept. The code system resource does not make + /// formal definitions required, because of the prevalence of legacy systems. + /// However, they are highly recommended, as without them there is no formal + /// meaning associated with the concept. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists + pub definition: Option, + /// Additional representations for the concept /// - /// A list of operators that can be used with the filter. + /// Additional representations for the concept - other languages, aliases, + /// specialized purposes, used for particular purposes, etc. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Requirements + /// Many concept definition systems support multiple representations, in multiple + /// languages, and for multiple purposes. /// - /// ## Special Semantics - /// - Included in summary + /// ## Implementation Notes + /// Concepts have both a ```display``` and an array of ```designation```. The + /// display is equivalent to a special designation with an implied + /// ```designation.use``` of "primary code" and a language equal to the [Resource + /// Language](resource.html#language). + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub designation: Option>, + /// Property value for the concept /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The kind of operation to perform as a part of a property based filter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/filter-operator|4.0.1 - pub operator: Option>, - /// What to use for the value + /// A property value for this concept. /// - /// A description of what the value for the filter should be. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Required (1..1) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub property: Option>, + /// Child Concepts (is-a/contains/categorizes) /// - /// ## Special Semantics - /// - Included in summary + /// Defines children of a concept to produce a hierarchy of concepts. The nature + /// of the relationships is variable (is-a/contains/categorizes) - see + /// hierarchyMeaning. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: String, -} - -/// Choice of types for the value\[x\] field in CodeSystemConceptProperty -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum CodeSystemConceptPropertyValue { - /// Variant accepting the Code type. - #[fhir_serde(rename = "valueCode")] - Code(Code), - /// Variant accepting the Coding type. - #[fhir_serde(rename = "valueCoding")] - Coding(Coding), - /// Variant accepting the String type. - #[fhir_serde(rename = "valueString")] - String(String), - /// Variant accepting the Integer type. - #[fhir_serde(rename = "valueInteger")] - Integer(Integer), - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "valueBoolean")] - Boolean(Boolean), - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "valueDateTime")] - DateTime(DateTime), - /// Variant accepting the Decimal type. - #[fhir_serde(rename = "valueDecimal")] - Decimal(Decimal), + pub concept: Option>, } -/// Property value for the concept +/// Additional representations for the concept /// -/// A property value for this concept. +/// Additional representations for the concept - other languages, aliases, +/// specialized purposes, used for particular purposes, etc. +/// +/// ## Requirements +/// Many concept definition systems support multiple representations, in multiple +/// languages, and for multiple purposes. +/// +/// ## Implementation Notes +/// Concepts have both a ```display``` and an array of ```designation```. The +/// display is equivalent to a special designation with an implied +/// ```designation.use``` of "primary code" and a language equal to the [Resource +/// Language](resource.html#language). /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -25413,8 +26185,7 @@ pub enum CodeSystemConceptPropertyValue { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct CodeSystemConceptProperty { +pub struct CodeSystemConceptDesignation { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -25495,38 +26266,86 @@ pub struct CodeSystemConceptProperty { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Reference to CodeSystem.property.code + /// Human language of the designation /// - /// A code that is a reference to CodeSystem.property.code. + /// The language this designation is defined for. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// In the absence of a language, the resource language applies. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub code: Code, - /// Value of the property for this concept /// - /// The value of this property. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Details how this designation would be used + /// + /// A code that details how this designation would be used. + /// + /// ## Implementation Notes + /// If no use is provided, the designation can be assumed to be suitable for + /// general display to a human user. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Details of how a designation would be used. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/designation-use + #[fhir_serde(rename = "use")] + pub r#use: Option, + /// The text value for this designation + /// + /// The text value for this designation. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, + pub value: String, } -/// Concepts in the code system -/// -/// Concepts that are in the code system. The concept definitions are inherently -/// hierarchical, but the definitions must be consulted to determine what the -/// meanings of the hierarchical relationships are. +/// Choice of types for the value\[x\] field in CodeSystemConceptProperty +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "value")] +pub enum CodeSystemConceptPropertyValue { + /// Variant accepting the Code type. + #[fhir_serde(rename = "valueCode")] + Code(Code), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "valueCoding")] + Coding(Coding), + /// Variant accepting the String type. + #[fhir_serde(rename = "valueString")] + String(String), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "valueInteger")] + Integer(Integer), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "valueBoolean")] + Boolean(Boolean), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "valueDateTime")] + DateTime(DateTime), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "valueDecimal")] + Decimal(Decimal), +} + +/// Property value for the concept /// -/// ## Implementation Notes -/// If this is empty, it means that the code system resource does not represent -/// the content of the code system. +/// A property value for this concept. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -25534,7 +26353,8 @@ pub struct CodeSystemConceptProperty { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CodeSystemConcept { +#[fhir_resource(choice_elements = "value")] +pub struct CodeSystemConceptProperty { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -25615,10 +26435,9 @@ pub struct CodeSystemConcept { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Code that identifies concept + /// Reference to CodeSystem.property.code /// - /// A code - a text symbol - that uniquely identifies the concept within the code - /// system. + /// A code that is a reference to CodeSystem.property.code. /// /// ## Cardinality: Required (1..1) /// @@ -25626,73 +26445,178 @@ pub struct CodeSystemConcept { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub code: Code, - /// Text to display to the user + /// Value of the property for this concept /// - /// A human readable string that is the recommended default way to present this - /// concept to a user. + /// The value of this property. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub display: Option, - /// Formal definition + #[fhir_serde(flatten)] + pub value: Option, +} + +/// Filter that can be used in a value set +/// +/// A filter that can be used in a value set compose statement when selecting +/// concepts using a filter. +/// +/// ## Implementation Notes +/// Note that filters defined in code systems usually require custom code on the +/// part of any terminology engine that will make them available for use in value +/// set filters. For this reason, they are generally only seen in high value +/// published terminologies. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CodeSystemFilter { + /// Unique id for inter-element referencing /// - /// The formal definition of the concept. The code system resource does not make - /// formal definitions required, because of the prevalence of legacy systems. - /// However, they are highly recommended, as without them there is no formal - /// meaning associated with the concept. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub definition: Option, - /// Additional representations for the concept + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Additional representations for the concept - other languages, aliases, - /// specialized purposes, used for particular purposes, etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Many concept definition systems support multiple representations, in multiple - /// languages, and for multiple purposes. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Concepts have both a ```display``` and an array of ```designation```. The - /// display is equivalent to a special designation with an implied - /// ```designation.use``` of "primary code" and a language equal to the [Resource - /// Language](resource.html#language). + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub designation: Option>, - /// Property value for the concept + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A property value for this concept. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Code that identifies the filter /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The code that identifies this filter when it is used as a filter in + /// [ValueSet](valueset.html#).compose.include.filter. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub property: Option>, - /// Child Concepts (is-a/contains/categorizes) + pub code: Code, + /// How or why the filter is used /// - /// Defines children of a concept to produce a hierarchy of concepts. The nature - /// of the relationships is variable (is-a/contains/categorizes) - see - /// hierarchyMeaning. + /// A description of how or why the filter is used. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub concept: Option>, + pub description: Option, + /// = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists + /// + /// A list of operators that can be used with the filter. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The kind of operation to perform as a part of a property based filter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/filter-operator|4.0.1 + pub operator: Option>, + /// What to use for the value + /// + /// A description of what the value for the filter should be. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub value: String, } /// Additional information supplied about each concept @@ -25856,28 +26780,24 @@ pub struct CodeSystemProperty { pub r#type: Code, } -/// Additional representations for the concept +/// FHIR CodeableConcept type /// -/// Additional representations for the concept - other languages, aliases, -/// specialized purposes, used for particular purposes, etc. +/// Base StructureDefinition for CodeableConcept Type: A concept that may be +/// defined by a formal reference to a terminology or ontology or may be provided +/// by text. /// -/// ## Requirements -/// Many concept definition systems support multiple representations, in multiple -/// languages, and for multiple purposes. +/// ## Purpose +/// This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept. /// -/// ## Implementation Notes -/// Concepts have both a ```display``` and an array of ```designation```. The -/// display is equivalent to a special designation with an implied -/// ```designation.use``` of "primary code" and a language equal to the [Resource -/// Language](resource.html#language). +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: active +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [CodeableConcept](http://hl7.org/fhir/StructureDefinition/CodeableConcept) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CodeSystemConceptDesignation { +pub struct CodeableConcept { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -25911,29 +26831,87 @@ pub struct CodeSystemConceptDesignation { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Code defined by a terminology system /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// A reference to a code defined by a terminology system. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Requirements + /// Allows for alternative encodings within a code system, and translations to + /// other code systems. + /// + /// ## Implementation Notes + /// Codes may be defined very casually in enumerations, or code lists, up to very + /// formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for + /// more information. Ordering of codings is undefined and SHALL NOT be used to + /// infer meaning. Generally, at most only one of the coding values will be + /// labeled as UserSelected = true. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub coding: Option>, + /// Plain text representation of the concept + /// + /// A human language representation of the concept as seen/selected/uttered by + /// the user who entered the data and/or which represents the intended meaning of + /// the user. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// The codes from the terminologies do not always capture the correct meaning + /// with all the nuances of the human using them, or sometimes there is no + /// appropriate code at all. In these cases, the text is used to capture the full + /// meaning of the source. + /// + /// ## Implementation Notes + /// Very often the text is the same as a displayName of one of the codings. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub text: Option, +} + +/// FHIR Coding type +/// +/// Base StructureDefinition for Coding Type: A reference to a code defined by a +/// terminology system. +/// +/// ## Purpose +/// References to codes are very common in healthcare models. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [Coding](http://hl7.org/fhir/StructureDefinition/Coding) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Coding { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -25944,10 +26922,6 @@ pub struct CodeSystemConceptDesignation { /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` @@ -25955,57 +26929,117 @@ pub struct CodeSystemConceptDesignation { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Human language of the designation + /// extensions, user content + pub extension: Option>, + /// Identity of the terminology system /// - /// The language this designation is defined for. + /// The identification of the code system that defines the meaning of the symbol + /// in the code. + /// + /// ## Requirements + /// Need to be unambiguous about the source of the definition of the symbol. /// /// ## Implementation Notes - /// In the absence of a language, the resource language applies. + /// The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs + /// SHALL be references to the HL7 OID registry. Otherwise, the URI should come + /// from HL7's list of FHIR defined special URIs or it should reference to some + /// definition that establishes the system clearly and unambiguously. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub system: Option, + /// Version of the system - if relevant /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Details how this designation would be used - /// - /// A code that details how this designation would be used. + /// The version of the code system which was used when choosing this code. Note + /// that a well-maintained code system does not need the version reported, + /// because the meaning of codes is consistent across versions. However this + /// cannot consistently be assured, and when the meaning is not guaranteed to be + /// consistent, the version SHOULD be exchanged. /// /// ## Implementation Notes - /// If no use is provided, the designation can be assumed to be suitable for - /// general display to a human user. + /// Where the terminology does not clearly define what string should be used to + /// identify code system versions, the recommendation is to use the date + /// (expressed in FHIR date format) on which that version was officially + /// published as the version date. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option, + /// Symbol in syntax defined by the system /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Details of how a designation would be used. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/designation-use - #[fhir_serde(rename = "use")] - pub r#use: Option, - /// The text value for this designation + /// A symbol in syntax defined by the system. The symbol may be a predefined code + /// or an expression in a syntax defined by the coding system (e.g. + /// post-coordination). /// - /// The text value for this designation. + /// ## Requirements + /// Need to refer to a particular code in the system. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: String, + pub code: Option, + /// Representation defined by the system + /// + /// A representation of the meaning of the code in the system, following the + /// rules of the system. + /// + /// ## Requirements + /// Need to be able to carry a human-readable meaning of the code for readers + /// that do not know the system. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub display: Option, + /// If this coding was chosen directly by the user + /// + /// Indicates that this coding was chosen by a user directly - e.g. off a pick + /// list of available items (codes or displays). + /// + /// ## Requirements + /// This has been identified as a clinical safety criterium - that this exact + /// system/code pair was chosen explicitly, rather than inferred by the system + /// based on some rules or language processing. + /// + /// ## Implementation Notes + /// Amongst a set of alternatives, a directly chosen code is the most appropriate + /// starting point for new translations. There is some ambiguity about what + /// exactly 'directly chosen' implies, and trading partner agreement may be + /// needed to clarify the use of this element and its consequences more + /// completely. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "userSelected")] + pub user_selected: Option, } /// FHIR Communication type @@ -28168,333 +29202,6 @@ pub struct CompartmentDefinitionResource { pub documentation: Option, } -/// Composition is broken into sections -/// -/// The root of the sections that make up the composition. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **cmp-1**: A section must contain at least one of text, entries, or sub-sections (error) -/// Expression: `text.exists() or entry.exists() or section.exists()` -/// - **cmp-2**: A section can only have an emptyReason if it is empty (error) -/// Expression: `emptyReason.empty() or entry.empty()` -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CompositionSection { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Label for section (e.g. for ToC) - /// - /// The label for this particular section. This will be part of the rendered - /// content for the document, and is often used to build a table of contents. - /// - /// ## Requirements - /// Section headings are often standardized for different types of documents. - /// They give guidance to humans on how the document is organized. - /// - /// ## Implementation Notes - /// The title identifies the section for a human reader. The title must be - /// consistent with the narrative of the resource that is the target of the - /// section.content reference. Generally, sections SHOULD have titles, but in - /// some documents, it is unnecessary or inappropriate. Typically, this is where - /// a section has subsections that have their own adequately distinguishing - /// title, or documents that only have a single section. Most Implementation - /// Guides will make section title to be a required element. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// header, label, caption - pub title: Option, - /// Classification of section (recommended) - /// - /// A code identifying the kind of content contained within the section. This - /// must be consistent with the section title. - /// - /// ## Requirements - /// Provides computable standardized labels to topics within the document. - /// - /// ## Implementation Notes - /// The code identifies the section for an automated processor of the document. - /// This is particularly relevant when using profiles to control the structure of - /// the document. - /// - /// If the section has content (instead of sub-sections), the section.code does - /// not change the meaning or interpretation of the resource that is the content - /// of the section in the comments for the section.code. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Classification of a section of a composition/document. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/doc-section-codes - pub code: Option, - /// Who and/or what authored the section - /// - /// Identifies who is responsible for the information in this section, not - /// necessarily who typed it in. - /// - /// ## Requirements - /// Identifies who is responsible for the content. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who/what the section is about, when it is not about the subject of composition - /// - /// The actual focus of the section when it is not the subject of the - /// composition, but instead represents something or someone associated with the - /// subject such as (for a patient subject) a spouse, parent, fetus, or donor. If - /// not focus is specified, the focus is assumed to be focus of the parent - /// section, or, for a section in the Composition itself, the subject of the - /// composition. Sections with a focus SHALL only include resources where the - /// logical subject (patient, subject, focus, etc.) matches the section focus, or - /// the resources have no logical subject (few resources). - /// - /// ## Implementation Notes - /// Typically, sections in a doument are about the subject of the document, - /// whether that is a patient, or group of patients, location, or device, or - /// whatever. For some kind of documents, some sections actually contain data - /// about related entities. Typical examples are a section in a newborn discharge - /// summary concerning the mother, or family history documents, with a section - /// about each family member, though there are many other examples. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub focus: Option, - /// Text summary of the section, for human interpretation - /// - /// A human-readable narrative that contains the attested content of the section, - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// - /// ## Implementation Notes - /// Document profiles may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: cmp-1 - pub text: Option, - /// working | snapshot | changes - /// - /// How the entry list was prepared - whether it is a working list that is - /// suitable for being maintained on an ongoing basis, or if it represents a - /// snapshot of a list of items from another source, or whether it is a prepared - /// list where items may be marked as added, modified or deleted. - /// - /// ## Requirements - /// Sections are used in various ways, and it must be known in what way it is - /// safe to use the entries in them. - /// - /// ## Implementation Notes - /// This element is labeled as a modifier because a change list must not be - /// misunderstood as a complete list. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The processing mode that applies to this section. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-mode|4.0.1 - pub mode: Option, - /// Order of section entries - /// - /// Specifies the order applied to the items in the section entries. - /// - /// ## Requirements - /// Important for presentation and rendering. Lists may be sorted to place more - /// important information first or to group related entries. - /// - /// ## Implementation Notes - /// Applications SHOULD render ordered lists in the order provided, but MAY allow - /// users to re-order based on their own preferences as well. If there is no - /// order specified, the order is unknown, though there may still be some order. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: What order applies to the items in the entry. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-order - #[fhir_serde(rename = "orderedBy")] - pub ordered_by: Option, - /// A reference to data that supports this section - /// - /// A reference to the actual resource from which the narrative in the section is - /// derived. - /// - /// ## Implementation Notes - /// If there are no entries in the list, an emptyReason SHOULD be provided. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: cmp-2 - pub entry: Option>, - /// Why the section is empty - /// - /// If the section is empty, why the list is empty. An empty section typically - /// has some text explaining the empty reason. - /// - /// ## Requirements - /// Allows capturing things like "none exist" or "not asked" which can be - /// important for most lists. - /// - /// ## Implementation Notes - /// The various reasons for an empty section make a significant interpretation to - /// its interpretation. Note that this code is for use when the entire section - /// content has been suppressed, and not for when individual items are omitted - - /// implementers may consider using a text note or a flag on an entry in these - /// cases. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: If a section is empty, why it is empty. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-empty-reason - /// - /// ## Conditions - /// Used when: cmp-2 - #[fhir_serde(rename = "emptyReason")] - pub empty_reason: Option, - /// Nested Section - /// - /// A nested sub-section within this section. - /// - /// ## Implementation Notes - /// Nested sections are primarily used to help human readers navigate to - /// particular portions of the document. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: cmp-1 - pub section: Option>, -} - /// FHIR Composition type /// /// A set of healthcare-related information that is assembled together into a @@ -29195,6 +29902,170 @@ pub struct CompositionAttester { pub party: Option, } +/// The clinical service(s) being documented +/// +/// The clinical service, such as a colonoscopy or an appendectomy, being +/// documented. +/// +/// ## Requirements +/// Provides context for the composition and creates a linkage between a resource +/// describing an event and the composition created describing the event. +/// +/// ## Implementation Notes +/// The event needs to be consistent with the type element, though can provide +/// further information if desired. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CompositionEvent { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Code(s) that apply to the event being documented + /// + /// This list of codes represents the main clinical acts, such as a colonoscopy + /// or an appendectomy, being documented. In some cases, the event is inherent in + /// the typeCode, such as a "History and Physical Report" in which the procedure + /// being documented is necessarily a "History and Physical" act. + /// + /// ## Implementation Notes + /// An event can further specialize the act inherent in the typeCode, such as + /// where it is simply "Procedure Report" and the procedure was a "colonoscopy". + /// If one or more eventCodes are included, they SHALL NOT conflict with the + /// values inherent in the classCode, practiceSettingCode or typeCode, as such a + /// conflict would create an ambiguous situation. This short list of codes is + /// provided to be used as key words for certain types of queries. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: This list of codes represents the main clinical acts being documented. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode + pub code: Option>, + /// The period covered by the documentation + /// + /// The period of time covered by the documentation. There is no assertion that + /// the documentation is a complete representation for this period, only that it + /// documents events during this time. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub period: Option, + /// The event(s) being documented + /// + /// The description and/or reference of the event(s) being documented. For + /// example, this could be used to document such a colonoscopy or an + /// appendectomy. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option>, +} + /// Choice of types for the target\[x\] field in CompositionRelatesTo #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] #[fhir_choice_element(base_name = "target")] @@ -29336,29 +30207,21 @@ pub struct CompositionRelatesTo { pub target: Option, } -/// The clinical service(s) being documented -/// -/// The clinical service, such as a colonoscopy or an appendectomy, being -/// documented. -/// -/// ## Requirements -/// Provides context for the composition and creates a linkage between a resource -/// describing an event and the composition created describing the event. +/// Composition is broken into sections /// -/// ## Implementation Notes -/// The event needs to be consistent with the type element, though can provide -/// further information if desired. +/// The root of the sections that make up the composition. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints +/// - **cmp-1**: A section must contain at least one of text, entries, or sub-sections (error) +/// Expression: `text.exists() or entry.exists() or section.exists()` +/// - **cmp-2**: A section can only have an emptyReason if it is empty (error) +/// Expression: `emptyReason.empty() or entry.empty()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CompositionEvent { +pub struct CompositionSection { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -29439,25 +30302,51 @@ pub struct CompositionEvent { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Code(s) that apply to the event being documented + /// Label for section (e.g. for ToC) /// - /// This list of codes represents the main clinical acts, such as a colonoscopy - /// or an appendectomy, being documented. In some cases, the event is inherent in - /// the typeCode, such as a "History and Physical Report" in which the procedure - /// being documented is necessarily a "History and Physical" act. + /// The label for this particular section. This will be part of the rendered + /// content for the document, and is often used to build a table of contents. + /// + /// ## Requirements + /// Section headings are often standardized for different types of documents. + /// They give guidance to humans on how the document is organized. /// /// ## Implementation Notes - /// An event can further specialize the act inherent in the typeCode, such as - /// where it is simply "Procedure Report" and the procedure was a "colonoscopy". - /// If one or more eventCodes are included, they SHALL NOT conflict with the - /// values inherent in the classCode, practiceSettingCode or typeCode, as such a - /// conflict would create an ambiguous situation. This short list of codes is - /// provided to be used as key words for certain types of queries. + /// The title identifies the section for a human reader. The title must be + /// consistent with the narrative of the resource that is the target of the + /// section.content reference. Generally, sections SHOULD have titles, but in + /// some documents, it is unnecessary or inappropriate. Typically, this is where + /// a section has subsections that have their own adequately distinguishing + /// title, or documents that only have a single section. Most Implementation + /// Guides will make section title to be a required element. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// header, label, caption + pub title: Option, + /// Classification of section (recommended) + /// + /// A code identifying the kind of content contained within the section. This + /// must be consistent with the section title. + /// + /// ## Requirements + /// Provides computable standardized labels to topics within the document. + /// + /// ## Implementation Notes + /// The code identifies the section for an automated processor of the document. + /// This is particularly relevant when using profiles to control the structure of + /// the document. + /// + /// If the section has content (instead of sub-sections), the section.code does + /// not change the meaning or interpretation of the resource that is the content + /// of the section in the comments for the section.code. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -29465,39 +30354,184 @@ pub struct CompositionEvent { /// /// ## Binding /// - **Strength**: example - /// - **Description**: This list of codes represents the main clinical acts being documented. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode - pub code: Option>, - /// The period covered by the documentation + /// - **Description**: Classification of a section of a composition/document. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/doc-section-codes + pub code: Option, + /// Who and/or what authored the section /// - /// The period of time covered by the documentation. There is no assertion that - /// the documentation is a complete representation for this period, only that it - /// documents events during this time. + /// Identifies who is responsible for the information in this section, not + /// necessarily who typed it in. + /// + /// ## Requirements + /// Identifies who is responsible for the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option>, + /// Who/what the section is about, when it is not about the subject of composition + /// + /// The actual focus of the section when it is not the subject of the + /// composition, but instead represents something or someone associated with the + /// subject such as (for a patient subject) a spouse, parent, fetus, or donor. If + /// not focus is specified, the focus is assumed to be focus of the parent + /// section, or, for a section in the Composition itself, the subject of the + /// composition. Sections with a focus SHALL only include resources where the + /// logical subject (patient, subject, focus, etc.) matches the section focus, or + /// the resources have no logical subject (few resources). + /// + /// ## Implementation Notes + /// Typically, sections in a doument are about the subject of the document, + /// whether that is a patient, or group of patients, location, or device, or + /// whatever. For some kind of documents, some sections actually contain data + /// about related entities. Typical examples are a section in a newborn discharge + /// summary concerning the mother, or family history documents, with a section + /// about each family member, though there are many other examples. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub focus: Option, + /// Text summary of the section, for human interpretation + /// + /// A human-readable narrative that contains the attested content of the section, + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// + /// ## Implementation Notes + /// Document profiles may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// The event(s) being documented /// - /// The description and/or reference of the event(s) being documented. For - /// example, this could be used to document such a colonoscopy or an - /// appendectomy. + /// ## Conditions + /// Used when: cmp-1 + pub text: Option, + /// working | snapshot | changes + /// + /// How the entry list was prepared - whether it is a working list that is + /// suitable for being maintained on an ongoing basis, or if it represents a + /// snapshot of a list of items from another source, or whether it is a prepared + /// list where items may be marked as added, modified or deleted. + /// + /// ## Requirements + /// Sections are used in various ways, and it must be known in what way it is + /// safe to use the entries in them. + /// + /// ## Implementation Notes + /// This element is labeled as a modifier because a change list must not be + /// misunderstood as a complete list. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The processing mode that applies to this section. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-mode|4.0.1 + pub mode: Option, + /// Order of section entries + /// + /// Specifies the order applied to the items in the section entries. + /// + /// ## Requirements + /// Important for presentation and rendering. Lists may be sorted to place more + /// important information first or to group related entries. + /// + /// ## Implementation Notes + /// Applications SHOULD render ordered lists in the order provided, but MAY allow + /// users to re-order based on their own preferences as well. If there is no + /// order specified, the order is unknown, though there may still be some order. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: What order applies to the items in the entry. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-order + #[fhir_serde(rename = "orderedBy")] + pub ordered_by: Option, + /// A reference to data that supports this section + /// + /// A reference to the actual resource from which the narrative in the section is + /// derived. + /// + /// ## Implementation Notes + /// If there are no entries in the list, an emptyReason SHOULD be provided. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Conditions + /// Used when: cmp-2 + pub entry: Option>, + /// Why the section is empty + /// + /// If the section is empty, why the list is empty. An empty section typically + /// has some text explaining the empty reason. + /// + /// ## Requirements + /// Allows capturing things like "none exist" or "not asked" which can be + /// important for most lists. + /// + /// ## Implementation Notes + /// The various reasons for an empty section make a significant interpretation to + /// its interpretation. Note that this code is for use when the entire section + /// content has been suppressed, and not for when individual items are omitted - + /// implementers may consider using a text note or a flag on an entry in these + /// cases. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: If a section is empty, why it is empty. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/list-empty-reason + /// + /// ## Conditions + /// Used when: cmp-2 + #[fhir_serde(rename = "emptyReason")] + pub empty_reason: Option, + /// Nested Section + /// + /// A nested sub-section within this section. + /// + /// ## Implementation Notes + /// Nested sections are primarily used to help human readers navigate to + /// particular portions of the document. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Conditions + /// Used when: cmp-1 + pub section: Option>, } /// Choice of types for the source\[x\] field in ConceptMap @@ -30135,6 +31169,201 @@ pub struct ConceptMap { pub group: Option>, } +/// Same source and target systems +/// +/// A group of mappings that all have the same source and target system. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ConceptMapGroup { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Source system where concepts to be mapped are defined + /// + /// An absolute URI that identifies the source system where the concepts to be + /// mapped are defined. + /// + /// ## Implementation Notes + /// This is not needed if the source value set is specified and it contains + /// concepts from only a single system. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub source: Option, + /// Specific version of the code system + /// + /// The specific version of the code system, as determined by the code system + /// authority. + /// + /// ## Implementation Notes + /// The specification of a particular code system version may be required for + /// code systems which lack concept permanence. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "sourceVersion")] + pub source_version: Option, + /// Target system that the concepts are to be mapped to + /// + /// An absolute URI that identifies the target system that the concepts will be + /// mapped to. + /// + /// ## Implementation Notes + /// This is not needed if the target value set is specified and it contains + /// concepts from only a single system. The group target may also be omitted if + /// all of the target element equivalence values are 'unmatched'. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub target: Option, + /// Specific version of the code system + /// + /// The specific version of the code system, as determined by the code system + /// authority. + /// + /// ## Implementation Notes + /// The specification of a particular code system version may be required for + /// code systems which lack concept permanence. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "targetVersion")] + pub target_version: Option, + /// Mappings for a concept from the source set + /// + /// Mappings for an individual concept in the source to one or more concepts in + /// the target. + /// + /// ## Implementation Notes + /// Generally, the ideal is that there would only be one mapping for each concept + /// in the source value set, but a given concept may be mapped multiple times + /// with different comments or dependencies. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// code, concept, item + pub element: Option>, + /// What to do when there is no mapping for the source concept + /// + /// What to do when there is no mapping for the source concept. "Unmapped" does + /// not include codes that are unmatched, and the unmapped element is ignored in + /// a code is specified to have equivalence = unmatched. + /// + /// ## Implementation Notes + /// This only applies if the source code has a system value that matches the + /// system defined for the group. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **cmd-2**: If the mode is 'fixed', a code must be provided (error) + /// Expression: `(mode = 'fixed') implies code.exists()` + /// - **cmd-3**: If the mode is 'other-map', a url must be provided (error) + /// Expression: `(mode = 'other-map') implies url.exists()` + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub unmapped: Option, +} + /// Mappings for a concept from the source set /// /// Mappings for an individual concept in the source to one or more concepts in @@ -30467,27 +31696,19 @@ pub struct ConceptMapGroupElementTarget { pub product: Option>, } -/// What to do when there is no mapping for the source concept -/// -/// What to do when there is no mapping for the source concept. "Unmapped" does -/// not include codes that are unmatched, and the unmapped element is ignored in -/// a code is specified to have equivalence = unmatched. +/// Other elements required for this mapping (from context) /// -/// ## Implementation Notes -/// This only applies if the source code has a system value that matches the -/// system defined for the group. +/// A set of additional dependencies for this mapping to hold. This mapping is +/// only applicable if the specified element can be resolved, and it has the +/// specified value. /// -/// ## Cardinality: Optional (0..1) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints -/// - **cmd-2**: If the mode is 'fixed', a code must be provided (error) -/// Expression: `(mode = 'fixed') implies code.exists()` -/// - **cmd-3**: If the mode is 'other-map', a url must be provided (error) -/// Expression: `(mode = 'other-map') implies url.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConceptMapGroupUnmapped { +pub struct ConceptMapGroupElementTargetDependsOn { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -30568,76 +31789,80 @@ pub struct ConceptMapGroupUnmapped { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// provided | fixed | other-map + /// Reference to property mapping depends on /// - /// Defines which action to take if there is no match for the source concept in - /// the target system designated for the group. One of 3 actions are possible: - /// use the unmapped code (this is useful when doing a mapping between versions, - /// and only a few codes have changed), use a fixed code (a default code), or - /// alternatively, a reference to a different concept map can be provided (by - /// canonical URL). + /// A reference to an element that holds a coded value that corresponds to a code + /// system property. The idea is that the information model carries an element + /// somewhere that is labeled to correspond with a code system property. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub property: Uri, + /// Code System (if necessary) /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Defines which action to take if there is no match in the group. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode|4.0.1 - pub mode: Code, - /// Fixed code when mode = fixed - /// - /// The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped - /// to a single fixed code. + /// An absolute URI that identifies the code system of the dependency code (if + /// the source/dependency is a value set that crosses code systems). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - When missing: The code is in the source (dependsOn) or target (product) system + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub code: Option, - /// Display for the code - /// - /// The display for the code. The display is only provided to help editors when - /// editing the concept map. + pub system: Option, + /// Value of the referenced element /// - /// ## Implementation Notes - /// The display is ignored when processing the map. + /// Identity (code or path) or the element/item/ValueSet/text that the map + /// depends on / refers to. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub display: Option, - /// canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped + pub value: String, + /// Display for the code (if value is a code) /// - /// The canonical reference to an additional ConceptMap resource instance to use - /// for mapping if this ConceptMap resource contains no matching mapping for the - /// source concept. + /// The display for the code. The display is only provided to help editors when + /// editing the concept map. + /// + /// ## Implementation Notes + /// The display is ignored when processing the map. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, + pub display: Option, } -/// Same source and target systems +/// What to do when there is no mapping for the source concept /// -/// A group of mappings that all have the same source and target system. +/// What to do when there is no mapping for the source concept. "Unmapped" does +/// not include codes that are unmatched, and the unmapped element is ignored in +/// a code is specified to have equivalence = unmatched. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Implementation Notes +/// This only applies if the source code has a system value that matches the +/// system defined for the group. +/// +/// ## Cardinality: Optional (0..1) /// /// ## Constraints +/// - **cmd-2**: If the mode is 'fixed', a code must be provided (error) +/// Expression: `(mode = 'fixed') implies code.exists()` +/// - **cmd-3**: If the mode is 'other-map', a url must be provided (error) +/// Expression: `(mode = 'other-map') implies url.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConceptMapGroup { +pub struct ConceptMapGroupUnmapped { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -30718,241 +31943,38 @@ pub struct ConceptMapGroup { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Source system where concepts to be mapped are defined - /// - /// An absolute URI that identifies the source system where the concepts to be - /// mapped are defined. - /// - /// ## Implementation Notes - /// This is not needed if the source value set is specified and it contains - /// concepts from only a single system. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub source: Option, - /// Specific version of the code system - /// - /// The specific version of the code system, as determined by the code system - /// authority. - /// - /// ## Implementation Notes - /// The specification of a particular code system version may be required for - /// code systems which lack concept permanence. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "sourceVersion")] - pub source_version: Option, - /// Target system that the concepts are to be mapped to - /// - /// An absolute URI that identifies the target system that the concepts will be - /// mapped to. - /// - /// ## Implementation Notes - /// This is not needed if the target value set is specified and it contains - /// concepts from only a single system. The group target may also be omitted if - /// all of the target element equivalence values are 'unmatched'. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub target: Option, - /// Specific version of the code system - /// - /// The specific version of the code system, as determined by the code system - /// authority. - /// - /// ## Implementation Notes - /// The specification of a particular code system version may be required for - /// code systems which lack concept permanence. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "targetVersion")] - pub target_version: Option, - /// Mappings for a concept from the source set - /// - /// Mappings for an individual concept in the source to one or more concepts in - /// the target. - /// - /// ## Implementation Notes - /// Generally, the ideal is that there would only be one mapping for each concept - /// in the source value set, but a given concept may be mapped multiple times - /// with different comments or dependencies. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// code, concept, item - pub element: Option>, - /// What to do when there is no mapping for the source concept - /// - /// What to do when there is no mapping for the source concept. "Unmapped" does - /// not include codes that are unmatched, and the unmapped element is ignored in - /// a code is specified to have equivalence = unmatched. - /// - /// ## Implementation Notes - /// This only applies if the source code has a system value that matches the - /// system defined for the group. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **cmd-2**: If the mode is 'fixed', a code must be provided (error) - /// Expression: `(mode = 'fixed') implies code.exists()` - /// - **cmd-3**: If the mode is 'other-map', a url must be provided (error) - /// Expression: `(mode = 'other-map') implies url.exists()` - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub unmapped: Option, -} - -/// Other elements required for this mapping (from context) -/// -/// A set of additional dependencies for this mapping to hold. This mapping is -/// only applicable if the specified element can be resolved, and it has the -/// specified value. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConceptMapGroupElementTargetDependsOn { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Reference to property mapping depends on + /// provided | fixed | other-map /// - /// A reference to an element that holds a coded value that corresponds to a code - /// system property. The idea is that the information model carries an element - /// somewhere that is labeled to correspond with a code system property. + /// Defines which action to take if there is no match for the source concept in + /// the target system designated for the group. One of 3 actions are possible: + /// use the unmapped code (this is useful when doing a mapping between versions, + /// and only a few codes have changed), use a fixed code (a default code), or + /// alternatively, a reference to a different concept map can be provided (by + /// canonical URL). /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub property: Uri, - /// Code System (if necessary) - /// - /// An absolute URI that identifies the code system of the dependency code (if - /// the source/dependency is a value set that crosses code systems). - /// - /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - When missing: The code is in the source (dependsOn) or target (product) system - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub system: Option, - /// Value of the referenced element + /// ## Binding + /// - **Strength**: required + /// - **Description**: Defines which action to take if there is no match in the group. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode|4.0.1 + pub mode: Code, + /// Fixed code when mode = fixed /// - /// Identity (code or path) or the element/item/ValueSet/text that the map - /// depends on / refers to. + /// The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped + /// to a single fixed code. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: String, - /// Display for the code (if value is a code) + pub code: Option, + /// Display for the code /// /// The display for the code. The display is only provided to help editors when /// editing the concept map. @@ -30966,151 +31988,18 @@ pub struct ConceptMapGroupElementTargetDependsOn { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub display: Option, -} - -/// Stage/grade, usually assessed formally -/// -/// Clinical stage or grade of a condition. May include formal severity -/// assessments. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **con-1**: Stage SHALL have summary or assessment (error) -/// Expression: `summary.exists() or assessment.exists()` -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConditionStage { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Simple summary (disease specific) - /// - /// A simple summary of the stage such as "Stage 3". The determination of the - /// stage is disease-specific. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes describing condition stages (e.g. Cancer stages). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-stage - /// - /// ## Conditions - /// Used when: con-1 - pub summary: Option, - /// Formal record of assessment - /// - /// Reference to a formal record of the evidence on which the staging assessment - /// is based. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: con-1 - pub assessment: Option>, - /// Kind of staging + /// canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped /// - /// The kind of staging, such as pathological or clinical staging. + /// The canonical reference to an additional ConceptMap resource instance to use + /// for mapping if this ConceptMap resource contains no matching mapping for the + /// source concept. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes describing the kind of condition staging (e.g. clinical or pathological). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-stage-type - #[fhir_serde(rename = "type")] - pub r#type: Option, + pub url: Option, } /// Choice of types for the onset\[x\] field in Condition @@ -31855,21 +32744,20 @@ pub struct ConditionEvidence { pub detail: Option>, } -/// Constraints to the base Consent.policyRule -/// -/// An exception to the base policy of this consent. An exception can be an -/// addition or removal of access permissions. +/// Stage/grade, usually assessed formally /// -/// ## Cardinality: Optional (0..1) +/// Clinical stage or grade of a condition. May include formal severity +/// assessments. /// -/// ## Special Semantics -/// - Included in summary +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints +/// - **con-1**: Stage SHALL have summary or assessment (error) +/// Expression: `summary.exists() or assessment.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConsentProvision { +pub struct ConditionStage { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -31950,731 +32838,55 @@ pub struct ConsentProvision { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// deny | permit - /// - /// Action to take - permit or deny - when the rule conditions are met. Not - /// permitted in root rule, required in all nested rules. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: How a rule statement is applied, such as adding additional consent or removing consent. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Timeframe for this rule + /// Simple summary (disease specific) /// - /// The timeframe in this rule is valid. + /// A simple summary of the stage such as "Stage 3". The determination of the + /// stage is disease-specific. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Who|what controlled by this rule (or group, by role) - /// - /// Who or what is controlled by this rule. Use group to identify a set of actors - /// by some property they share (e.g. 'admitting officers'). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - When missing: There is no specific actor associated with the exception - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub actor: Option>, - /// Actions controlled by this rule - /// - /// Actions controlled by this Rule. - /// - /// ## Implementation Notes - /// Note that this is the direct action (not the grounds for the action covered - /// in the purpose element). At present, the only action in the understood and - /// tested scope of this resource is 'read'. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - When missing: all actions - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the consent action. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-action - pub action: Option>, - /// Security Labels that define affected resources - /// - /// A security label, comprised of 0..* security label fields (Privacy tags), - /// which define which resources are controlled by this exception. - /// - /// ## Implementation Notes - /// If the consent specifies a security label of "R" then it applies to all - /// resources that are labeled "R" or lower. E.g. for Confidentiality, it's a - /// high water mark. For other kinds of security labels, subsumption logic - /// applies. When the purpose of use tag is on the data, access request purpose - /// of use shall not conflict. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels - #[fhir_serde(rename = "securityLabel")] - pub security_label: Option>, - /// Context of activities covered by this rule - /// - /// The context of the activities a user is taking - why the user is accessing - /// the data - that are controlled by this rule. - /// - /// ## Implementation Notes - /// When the purpose of use tag is on the data, access request purpose of use - /// shall not conflict. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse - pub purpose: Option>, - /// e.g. Resource Type, Profile, CDA, etc. - /// - /// The class of information covered by this rule. The type can be a FHIR - /// resource type, a profile on a type, or a CDA document, or some other type - /// that indicates what sort of information the consent relates to. - /// - /// ## Implementation Notes - /// Multiple types are or'ed together. The intention of the contentType element - /// is that the codes refer to profiles or document types defined in a standard - /// or an implementation guide somewhere. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The class (type) of information a consent rule covers. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-class - pub class: Option>, - /// e.g. LOINC or SNOMED CT code, etc. in the content - /// - /// If this code is found in an instance, then the rule applies. - /// - /// ## Implementation Notes - /// Typical use of this is a Document code with class = CDA. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: example - /// - **Description**: If this code is found in an instance, then the exception applies. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-code - pub code: Option>, - /// Timeframe for data controlled by this rule - /// - /// Clinical or Operational Relevant period of time that bounds the data - /// controlled by this rule. - /// - /// ## Implementation Notes - /// This has a different sense to the Consent.period - that is when the consent - /// agreement holds. This is the time period of the data that is controlled by - /// the agreement. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "dataPeriod")] - pub data_period: Option, - /// Data controlled by this rule - /// - /// The resources controlled by this rule if specific resources are referenced. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - When missing: all data - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub data: Option>, - /// Nested Exception Rules - /// - /// Rules which provide exceptions to the base rule or subrules. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub provision: Option>, -} - -/// Who|what controlled by this rule (or group, by role) -/// -/// Who or what is controlled by this rule. Use group to identify a set of actors -/// by some property they share (e.g. 'admitting officers'). -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - When missing: There is no specific actor associated with the exception -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConsentProvisionActor { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// How the actor is involved - /// - /// How the individual is involved in the resources content that is described in - /// the exception. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: How an actor is involved in the consent considerations. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-role-type - pub role: CodeableConcept, - /// Resource for the actor (or group, by role) - /// - /// The resource that identifies the actor. To identify actors by type, use group - /// to identify a set of actors by some property they share (e.g. 'admitting - /// officers'). - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Reference, -} - -/// Policies covered by this consent -/// -/// The references to the policies that are included in this consent scope. -/// Policies may be organizational, but are often defined jurisdictionally, or in -/// law. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConsentPolicy { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Enforcement source for policy - /// - /// Entity or Organization having regulatory jurisdiction or accountability for - /// enforcing policies pertaining to Consent Directives. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// - **Description**: Codes describing condition stages (e.g. Cancer stages). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-stage /// /// ## Conditions - /// Used when: ppc-1 - pub authority: Option, - /// Specific policy covered by this consent - /// - /// The references to the policies that are included in this consent scope. - /// Policies may be organizational, but are often defined jurisdictionally, or in - /// law. + /// Used when: con-1 + pub summary: Option, + /// Formal record of assessment /// - /// ## Implementation Notes - /// This element is for discoverability / documentation and does not modify or - /// qualify the policy rules. + /// Reference to a formal record of the evidence on which the staging assessment + /// is based. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Conditions - /// Used when: ppc-1 - pub uri: Option, -} - -/// Data controlled by this rule -/// -/// The resources controlled by this rule if specific resources are referenced. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// - When missing: all data -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConsentProvisionData { - /// Unique id for inter-element referencing + /// Used when: con-1 + pub assessment: Option>, + /// Kind of staging /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The kind of staging, such as pathological or clinical staging. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// instance | related | dependents | authoredby - /// - /// How the resource reference is interpreted when testing consent restrictions. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: How a resource reference is interpreted when testing consent restrictions. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1 - pub meaning: Code, - /// The actual data reference - /// - /// A reference to a specific resource that defines which resources are covered - /// by this consent. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Reference, -} - -/// Consent Verified by patient or family -/// -/// Whether a treatment instruction (e.g. artificial respiration yes or no) was -/// verified with the patient, his/her family or another authorized person. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ConsentVerification { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Has been verified - /// - /// Has the instruction been verified. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub verified: Boolean, - /// Person who verified - /// - /// Who verified the instruction (Patient, Relative or other Authorized Person). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "verifiedWith")] - pub verified_with: Option, - /// When consent verified - /// - /// Date verification was collected. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "verificationDate")] - pub verification_date: Option, + /// - **Strength**: example + /// - **Description**: Codes describing the kind of condition staging (e.g. clinical or pathological). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-stage-type + #[fhir_serde(rename = "type")] + pub r#type: Option, } /// Choice of types for the source\[x\] field in Consent @@ -33160,21 +33372,11 @@ pub struct Consent { pub provision: Option, } -/// Choice of types for the content\[x\] field in ContractLegal -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "content")] -pub enum ContractLegalContent { - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "contentAttachment")] - Attachment(Attachment), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "contentReference")] - Reference(Reference), -} - -/// Contract Legal Language +/// Policies covered by this consent /// -/// List of Legal expressions or representations of this Contract. +/// The references to the policies that are included in this consent scope. +/// Policies may be organizational, but are often defined jurisdictionally, or in +/// law. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -33182,8 +33384,7 @@ pub enum ContractLegalContent { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "content")] -pub struct ContractLegal { +pub struct ConsentPolicy { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -33264,44 +33465,56 @@ pub struct ContractLegal { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Contract Legal Text + /// Enforcement source for policy /// - /// Contract legal text in human renderable form. + /// Entity or Organization having regulatory jurisdiction or accountability for + /// enforcing policies pertaining to Consent Directives. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub content: Option, -} - -/// Choice of types for the topic\[x\] field in ContractTerm -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "topic")] -pub enum ContractTermTopic { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "topicCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "topicReference")] - Reference(Reference), + /// + /// ## Conditions + /// Used when: ppc-1 + pub authority: Option, + /// Specific policy covered by this consent + /// + /// The references to the policies that are included in this consent scope. + /// Policies may be organizational, but are often defined jurisdictionally, or in + /// law. + /// + /// ## Implementation Notes + /// This element is for discoverability / documentation and does not modify or + /// qualify the policy rules. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Conditions + /// Used when: ppc-1 + pub uri: Option, } -/// Contract Term List +/// Constraints to the base Consent.policyRule /// -/// One or more Contract Provisions, which may be related and conveyed as a -/// group, and may contain nested groups. +/// An exception to the base policy of this consent. An exception can be an +/// addition or removal of access permissions. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Optional (0..1) +/// +/// ## Special Semantics +/// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "topic")] -pub struct ContractTerm { +pub struct ConsentProvision { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -33382,9 +33595,10 @@ pub struct ContractTerm { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Contract Term Number + /// deny | permit /// - /// Unique identifier for this particular Contract Provision. + /// Action to take - permit or deny - when the rule conditions are met. Not + /// permitted in root rule, required in all nested rules. /// /// ## Cardinality: Optional (0..1) /// @@ -33394,10 +33608,16 @@ pub struct ContractTerm { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, - /// Contract Term Issue Date Time /// - /// When this Contract Provision was issued. + /// ## Binding + /// - **Strength**: required + /// - **Description**: How a rule statement is applied, such as adding additional consent or removing consent. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Timeframe for this rule + /// + /// The timeframe in this rule is valid. /// /// ## Cardinality: Optional (0..1) /// @@ -33407,39 +33627,35 @@ pub struct ContractTerm { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub issued: Option, - /// Contract Term Effective Time + pub period: Option, + /// Who|what controlled by this rule (or group, by role) /// - /// Relevant time or time-period when this Contract Provision is applicable. + /// Who or what is controlled by this rule. Use group to identify a set of actors + /// by some property they share (e.g. 'admitting officers'). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Included in summary + /// - When missing: There is no specific actor associated with the exception /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub applies: Option, - /// Term Concern - /// - /// The entity that the term applies to. + pub actor: Option>, + /// Actions controlled by this rule /// - /// ## Cardinality: Optional (0..1) + /// Actions controlled by this Rule. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub topic: Option, - /// Contract Term Type or Form + /// ## Implementation Notes + /// Note that this is the direct action (not the grounds for the action covered + /// in the purpose element). At present, the only action in the understood and + /// tested scope of this resource is 'read'. /// - /// A legal clause or condition contained within a contract that requires one or - /// both parties to perform a particular requirement by some specified time or - /// prevents one or both parties from performing a particular requirement by some - /// specified time. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary + /// - When missing: all actions /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -33447,31 +33663,46 @@ pub struct ContractTerm { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Detailed codes for the types of contract provisions. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Contract Term Type specific classification + /// - **Description**: Detailed codes for the consent action. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-action + pub action: Option>, + /// Security Labels that define affected resources /// - /// A specialized legal clause or condition based on overarching contract type. + /// A security label, comprised of 0..* security label fields (Privacy tags), + /// which define which resources are controlled by this exception. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// If the consent specifies a security label of "R" then it applies to all + /// resources that are labeled "R" or lower. E.g. for Confidentiality, it's a + /// high water mark. For other kinds of security labels, subsumption logic + /// applies. When the purpose of use tag is on the data, access request purpose + /// of use shall not conflict. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the subtypes of contract provisions. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-subtype - #[fhir_serde(rename = "subType")] - pub sub_type: Option, - /// Term Statement + /// - **Strength**: extensible + /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels + #[fhir_serde(rename = "securityLabel")] + pub security_label: Option>, + /// Context of activities covered by this rule /// - /// Statement of a provision in a policy or a contract. + /// The context of the activities a user is taking - why the user is accessing + /// the data - that are controlled by this rule. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// When the purpose of use tag is on the data, access request purpose of use + /// shall not conflict. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -33479,130 +33710,119 @@ pub struct ContractTerm { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub text: Option, - /// Protection for the Term /// - /// Security labels that protect the handling of information about the term and - /// its elements, which may be specifically identified.. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse + pub purpose: Option>, + /// e.g. Resource Type, Profile, CDA, etc. /// - /// ## Requirements - /// Requirement - Within a Contract, a security label may apply to the one to - /// many nested group of terms or to a term, whether inside a group or a - /// singleton. This security label protects the term and its contained provision - /// elements. The security label on the entire set of term provision elements may - /// be different from the security labels on a contained offer, asset, - /// valuedItem, or data such as sensitive information, and must be the high water - /// mark of all security labels within the term. Rationale is that a labelled - /// term, which may be disaggregated from the Contract, and must persist the - /// label on the term and on contained elements within other contexts. - /// Requirement - If more than one policy dictates a level of confidentiality of - /// the term, then each applicable policy may be represented by a security label - /// specific to its requirements. - /// Comment - A Security Label is comprised of 1..1 confidentiality code and 0..* - /// other security label codes (aka "privacy tags"). A Security Label is metadata - /// assigned (aka 'tagged') to Resources and Resource elements, which specify the - /// confidentiality and sensitivity of the Resource or element and their related - /// attributes, the purposes for which tagged items may be collected, access, - /// used or disclosed, any limitation on the type of entities authorized to - /// engage in permitted purposes, and handling instructions that obligate or - /// prohibit certain actions on the tagged items. + /// The class of information covered by this rule. The type can be a FHIR + /// resource type, a profile on a type, or a CDA document, or some other type + /// that indicates what sort of information the consent relates to. + /// + /// ## Implementation Notes + /// Multiple types are or'ed together. The intention of the contentType element + /// is that the codes refer to profiles or document types defined in a standard + /// or an implementation guide somewhere. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "securityLabel")] - pub security_label: Option>, - /// Context of the Contract term - /// - /// The matter of concern in the context of this provision of the agrement. /// - /// ## Cardinality: Required (1..1) + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The class (type) of information a consent rule covers. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-class + pub class: Option>, + /// e.g. LOINC or SNOMED CT code, etc. in the content /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub offer: ContractTermOffer, - /// Contract Term Asset List + /// If this code is found in an instance, then the rule applies. /// - /// Contract Term Asset List. + /// ## Implementation Notes + /// Typical use of this is a Document code with class = CDA. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub asset: Option>, - /// Entity being ascribed responsibility /// - /// An actor taking a role in an activity for which it can be assigned some - /// degree of responsibility for the activity taking place. + /// ## Binding + /// - **Strength**: example + /// - **Description**: If this code is found in an instance, then the exception applies. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-code + pub code: Option>, + /// Timeframe for data controlled by this rule /// - /// ## Requirements - /// An agent can be a person, an organization, software, device, or other - /// entities that may be ascribed responsibility. + /// Clinical or Operational Relevant period of time that bounds the data + /// controlled by this rule. /// /// ## Implementation Notes - /// Several agents may be associated (i.e. has some responsibility for an - /// activity) with an activity and vice-versa. - /// For example, in cases of actions initiated by one user for other users, or in - /// events that involve more than one user, hardware device, software, or system - /// process. However, only one user may be the initiator/requestor for the event. + /// This has a different sense to the Consent.period - that is when the consent + /// agreement holds. This is the time period of the data that is controlled by + /// the agreement. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "dataPeriod")] + pub data_period: Option, + /// Data controlled by this rule + /// + /// The resources controlled by this rule if specific resources are referenced. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// - When missing: all data + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub action: Option>, - /// Nested Contract Term Group + pub data: Option>, + /// Nested Exception Rules /// - /// Nested group of Contract Provisions. + /// Rules which provide exceptions to the base rule or subrules. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub group: Option>, + pub provision: Option>, } -/// Contract Signatory -/// -/// Parties with legal standing in the Contract, including the principal parties, -/// the grantor(s) and grantee(s), which are any person or organization bound by -/// the contract, and any ancillary parties, which facilitate the execution of -/// the contract such as a notary or witness. -/// -/// ## Requirements -/// The Contract.signer applies a signature to the Contract.binding referenced -/// resource, which is the documentation that is the legal "source of truth". The -/// Contract.signer may delegate, such as a legally recognized personal -/// representative, or have a delegate assigned e.g., by a court of law, to -/// actually sign the Contract, such as a trustee in the case of incompetence. +/// Who|what controlled by this rule (or group, by role) /// -/// ## Implementation Notes -/// Signers who are principal parties to the contract are bound by the -/// Contract.activity related to the Contract.topic, and the Contract.term(s), -/// which either extend or restrict the overall action on the topic by, for -/// example, stipulating specific policies or obligations constraining actions, -/// action reason, or agents with respect to some or all of the topic. -/// For example, specifying how policies or obligations shall constrain actions -/// and action reasons permitted or denied on all or a subset of the -/// Contract.topic (e.g., all or a portion of property being transferred by the -/// contract), agents (e.g., who can resell, assign interests, or alter the -/// property being transferred by the contract), actions, and action reasons; or -/// with respect to Contract.terms, stipulating, extending, or limiting the -/// Contract.period of applicability or valuation of items under consideration. +/// Who or what is controlled by this rule. Use group to identify a set of actors +/// by some property they share (e.g. 'admitting officers'). /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - When missing: There is no specific actor associated with the exception +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractSigner { +pub struct ConsentProvisionActor { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -33683,9 +33903,10 @@ pub struct ContractSigner { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Contract Signatory Role + /// How the actor is involved /// - /// Role of this Contract signer, e.g. notary, grantee. + /// How the individual is involved in the resources content that is described in + /// the exception. /// /// ## Cardinality: Required (1..1) /// @@ -33694,63 +33915,39 @@ pub struct ContractSigner { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: List of parties who may be signing. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-signer-type - #[fhir_serde(rename = "type")] - pub r#type: Coding, - /// Contract Signatory Party + /// - **Strength**: extensible + /// - **Description**: How an actor is involved in the consent considerations. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-role-type + pub role: CodeableConcept, + /// Resource for the actor (or group, by role) /// - /// Party which is a signator to this Contract. + /// The resource that identifies the actor. To identify actors by type, use group + /// to identify a set of actors by some property they share (e.g. 'admitting + /// officers'). /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub party: Reference, - /// Contract Documentation Signature - /// - /// Legally binding Contract DSIG signature contents in Base64. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub signature: Option>, -} - -/// Choice of types for the content\[x\] field in ContractFriendly -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "content")] -pub enum ContractFriendlyContent { - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "contentAttachment")] - Attachment(Attachment), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "contentReference")] - Reference(Reference), + pub reference: Reference, } -/// Contract Friendly Language +/// Data controlled by this rule /// -/// The "patient friendly language" versionof the Contract in whole or in parts. -/// "Patient friendly language" means the representation of the Contract and -/// Contract Provisions in a manner that is readily accessible and understandable -/// by a layperson in accordance with best practices for communication styles -/// that ensure that those agreeing to or signing the Contract understand the -/// roles, actions, obligations, responsibilities, and implication of the -/// agreement. +/// The resources controlled by this rule if specific resources are referenced. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// - When missing: all data +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "content")] -pub struct ContractFriendly { +pub struct ConsentProvisionData { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -33831,44 +34028,55 @@ pub struct ContractFriendly { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Easily comprehended representation of this Contract + /// instance | related | dependents | authoredby /// - /// Human readable rendering of this Contract in a format and representation - /// intended to enhance comprehension and ensure understandability. + /// How the resource reference is interpreted when testing consent restrictions. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub content: Option, -} - -/// Choice of types for the content\[x\] field in ContractRule -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "content")] -pub enum ContractRuleContent { - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "contentAttachment")] - Attachment(Attachment), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "contentReference")] - Reference(Reference), + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: How a resource reference is interpreted when testing consent restrictions. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1 + pub meaning: Code, + /// The actual data reference + /// + /// A reference to a specific resource that defines which resources are covered + /// by this consent. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub reference: Reference, } -/// Computable Contract Language +/// Consent Verified by patient or family /// -/// List of Computable Policy Rule Language Representations of this Contract. +/// Whether a treatment instruction (e.g. artificial respiration yes or no) was +/// verified with the patient, his/her family or another authorized person. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "content")] -pub struct ContractRule { +pub struct ConsentVerification { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -33949,33 +34157,60 @@ pub struct ContractRule { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Computable Contract Rules + /// Has been verified /// - /// Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, - /// SecPal). + /// Has the instruction been verified. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub content: Option, + pub verified: Boolean, + /// Person who verified + /// + /// Who verified the instruction (Patient, Relative or other Authorized Person). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "verifiedWith")] + pub verified_with: Option, + /// When consent verified + /// + /// Date verification was collected. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "verificationDate")] + pub verification_date: Option, } -/// Contract precursor content +/// FHIR ContactDetail type /// -/// Precusory content developed with a focus and intent of supporting the -/// formation a Contract instance, which may be associated with and transformable -/// into a Contract. +/// Base StructureDefinition for ContactDetail Type: Specifies contact +/// information for a person or organization. /// -/// ## Cardinality: Optional (0..1) +/// ## Purpose +/// Need to track contact information in the same way across multiple resources. /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [ContactDetail](http://hl7.org/fhir/StructureDefinition/ContactDetail) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractContentDefinition { +pub struct ContactDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -34009,167 +34244,57 @@ pub struct ContractContentDefinition { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// Name of an individual to contact /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// The name of an individual to contact. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// If there is no named individual, the telecom information is for the + /// organization as a whole. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Content structure and use - /// - /// Precusory content structure and use, i.e., a boilerplate, template, - /// application for a contract such as an insurance policy or benefits under a - /// program, e.g., workers compensation. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the definition of contracts. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-definition-type - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Detailed Content Type Definition - /// - /// Detailed Precusory content type. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the additional definition of contracts. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-definition-subtype - #[fhir_serde(rename = "subType")] - pub sub_type: Option, - /// Publisher Entity - /// - /// The individual or organization that published the Contract precursor content. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// When published - /// - /// The date (and optionally time) when the contract was published. The date must - /// change when the business version changes and it must change if the status - /// code changes. In addition, it should change when the substantive content of - /// the contract changes. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "publicationDate")] - pub publication_date: Option, - /// amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated - /// - /// amended | appended | cancelled | disputed | entered-in-error | executable | - /// executed | negotiable | offered | policy | rejected | renewed | revoked | - /// resolved | terminated. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + pub name: Option, + /// Contact details for individual or organization /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Status of the publication of contract content. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-publicationstatus|4.0.1 - #[fhir_serde(rename = "publicationStatus")] - pub publication_status: Code, - /// Publication Ownership + /// The contact details for the individual (if a name was provided) or the + /// organization. /// - /// A copyright statement relating to Contract precursor content. Copyright - /// statements are generally legal restrictions on the use and publishing of the - /// Contract precursor content. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub copyright: Option, -} - -/// Choice of types for the entity\[x\] field in ContractTermAssetValuedItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "entity")] -pub enum ContractTermAssetValuedItemEntity { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "entityCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "entityReference")] - Reference(Reference), + pub telecom: Option>, } -/// Contract Valued Item List +/// FHIR ContactPoint type /// -/// Contract Valued Item List. +/// Base StructureDefinition for ContactPoint Type: Details for all kinds of +/// technology mediated contact points for a person or organization, including +/// telephone, email, etc. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Purpose +/// Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc. /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [ContactPoint](http://hl7.org/fhir/StructureDefinition/ContactPoint) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "entity")] -pub struct ContractTermAssetValuedItem { +pub struct ContactPoint { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -34203,266 +34328,283 @@ pub struct ContractTermAssetValuedItem { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// phone | fax | email | pager | url | sms | other /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Telecommunications form for contact point - what communications system is + /// required to make use of the contact. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Contract Valued Item Type + /// ## Binding + /// - **Strength**: required + /// - **Description**: Telecommunications form for contact point. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contact-point-system|4.0.1 /// - /// Specific type of Contract Valued Item that may be priced. + /// ## Conditions + /// Used when: cpt-2 + pub system: Option, + /// The actual contact point details /// - /// ## Cardinality: Optional (0..1) + /// The actual contact point details, in a form that is meaningful to the + /// designated communication system (i.e. phone number or email address). /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub entity: Option, - /// Contract Valued Item Number + /// ## Requirements + /// Need to support legacy numbers that are not in a tightly controlled format. /// - /// Identifies a Contract Valued Item instance. + /// ## Implementation Notes + /// Additional text data such as phone extension numbers, or notes about use of + /// the contact are sometimes included in the value. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, - /// Contract Valued Item Effective Tiem - /// - /// Indicates the time during which this Contract ValuedItem information is - /// effective. + pub value: Option, + /// home | work | temp | old | mobile - purpose of this contact point /// - /// ## Cardinality: Optional (0..1) + /// Identifies the purpose for the contact point. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectiveTime")] - pub effective_time: Option, - /// Count of Contract Valued Items + /// ## Requirements + /// Need to track the way a person uses this contact, so a user can choose which + /// is appropriate for their purpose. /// - /// Specifies the units by which the Contract Valued Item is measured or counted, - /// and quantifies the countable or measurable Contract Valued Item instances. + /// ## Implementation Notes + /// Applications can assume that a contact is current unless it explicitly says + /// that it is temporary or old. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not mistake a temporary or old contact etc.for a current/permanent one + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Contract Valued Item fee, charge, or cost - /// - /// A Contract Valued Item unit valuation measure. /// - /// ## Cardinality: Optional (0..1) + /// ## Binding + /// - **Strength**: required + /// - **Description**: Use of contact point. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contact-point-use|4.0.1 + #[fhir_serde(rename = "use")] + pub r#use: Option, + /// Specify preferred order of use (1 = highest) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Contract Valued Item Price Scaling Factor + /// Specifies a preferred order in which to use a set of contacts. ContactPoints + /// with lower rank values are more preferred than those with higher rank values. /// - /// A real number that represents a multiplier used in determining the overall - /// value of the Contract Valued Item delivered. The concept of a Factor allows - /// for a discount or surcharge multiplier to be applied to a monetary amount. + /// ## Implementation Notes + /// Note that rank does not necessarily follow the order in which the contacts + /// are represented in the instance. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Contract Valued Item Difficulty Scaling Factor + pub rank: Option, + /// Time period when the contact point was/is in use /// - /// An amount that expresses the weighting (based on difficulty, cost and/or - /// resource intensiveness) associated with the Contract Valued Item delivered. - /// The concept of Points allows for assignment of point values for a Contract - /// Valued Item, such that a monetary amount can be assigned to each point. + /// Time period when the contact point was/is in use. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub points: Option, - /// Total Contract Valued Item Value + pub period: Option, +} + +/// Choice of types for the topic\[x\] field in Contract +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "topic")] +pub enum ContractTopic { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "topicCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "topicReference")] + Reference(Reference), +} + +/// Choice of types for the legallyBinding\[x\] field in Contract +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "legallyBinding")] +pub enum ContractLegallyBinding { + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "legallyBindingAttachment")] + Attachment(Attachment), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "legallyBindingReference")] + Reference(Reference), +} + +/// FHIR Contract type +/// +/// Legally enforceable, formally recorded unilateral or bilateral directive +/// i.e., a policy or agreement. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Contract](http://hl7.org/fhir/StructureDefinition/Contract) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "topic,legallyBinding")] +pub struct Contract { + /// Logical id of this artifact /// - /// Expresses the product of the Contract Valued Item unitQuantity and the - /// unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per - /// Point) * factor Number * points = net Amount. Quantity, factor and points are - /// assumed to be 1 if not supplied. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Terms of valuation + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// Terms of valuation. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub payment: Option, - /// When payment is due + pub meta: Option, + /// A set of rules under which this content was created /// - /// When payment is due. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "paymentDate")] - pub payment_date: Option, - /// Who will make payment + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// Who will make payment. + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub responsible: Option, - /// Who will receive payment /// - /// Who will receive payment. - /// - /// ## Cardinality: Optional (0..1) + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub recipient: Option, - /// Pointer to specific item + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// - /// Id of the clause or question text related to the context of this valuedItem - /// in the referenced form or QuestionnaireResponse. + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "linkId")] - pub link_id: Option>, - /// Security Labels that define affected terms /// - /// A set of security labels that define which terms are controlled by this - /// condition. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Cardinality: Optional, Multiple (0..*) + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "securityLabelNumber")] - pub security_label_number: Option>, -} - -/// Choice of types for the occurrence\[x\] field in ContractTermAction -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "occurrence")] -pub enum ContractTermActionOccurrence { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "occurrenceDateTime")] - DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "occurrencePeriod")] - Period(Period), - /// Variant accepting the Timing type. - #[fhir_serde(rename = "occurrenceTiming")] - Timing(Timing), -} - -/// Entity being ascribed responsibility -/// -/// An actor taking a role in an activity for which it can be assigned some -/// degree of responsibility for the activity taking place. -/// -/// ## Requirements -/// An agent can be a person, an organization, software, device, or other -/// entities that may be ascribed responsibility. -/// -/// ## Implementation Notes -/// Several agents may be associated (i.e. has some responsibility for an -/// activity) with an activity and vice-versa. -/// For example, in cases of actions initiated by one user for other users, or in -/// events that involve more than one user, hardware device, software, or system -/// process. However, only one user may be the initiator/requestor for the event. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "occurrence")] -pub struct ContractTermAction { - /// Unique id for inter-element referencing + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -34482,16 +34624,16 @@ pub struct ContractTermAction { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -34516,8 +34658,7 @@ pub struct ContractTermAction { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -34526,153 +34667,183 @@ pub struct ContractTermAction { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// True if the term prohibits the action + /// Contract number /// - /// True if the term prohibits the action. + /// Unique identifier for this Contract or a derivative that references a Source + /// Contract. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// This is the business identifier of the contract content conveyed. It may be a + /// derivative of the legally binding contract, in which case, the identifier of + /// the basal contract is contained in the Contract.binding referenced Contract. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - If true this element negates the specified action. For Example, instead of a dictate to perform an action, it is a dictate not to perform the action. + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "doNotPerform")] - pub do_not_perform: Option, - /// Type or form of the action + pub identifier: Option>, + /// Basal definition /// - /// Activity or service obligation to be done or not done, performed or not - /// performed, effectuated or not by this Contract term. + /// Canonical identifier for this contract, represented as a URI (globally + /// unique). /// - /// ## Cardinality: Required (1..1) + /// ## Requirements + /// An absolute URI that is used to identify this contract when it is referenced + /// in a specification, model, design, instance or a contract derivative; also + /// called its canonical identifier. This SHOULD be globally unique and SHOULD be + /// a literal address at which this plan definition is (or will be) published. + /// + /// ## Implementation Notes + /// Used in a domain that uses a supplied contract repository. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub url: Option, + /// Business edition /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the contract action. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-action - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Entity of the action - /// - /// Entity of the action. + /// An edition identifier used for business purposes to label business + /// significant variants. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// The identifier that is used to identify this version of the contract when it + /// is referenced in a specification, model, design, instance, or contract + /// derivative. This is an arbitrary value managed by the contract author and is + /// not expected to be globally unique. For example, it might be a timestamp + /// (e.g. yyyymmdd) if a managed version is not available. There is also no + /// expectation that versions can be placed in a lexicographical sequence. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Option>, - /// Purpose for the Contract Term Action + /// ## Implementation Notes + /// Note - This is a business versionId, not a resource version id (see + /// discussion http://build.fhir.org/resource.html#versions) + /// Comments - There may be different contract instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the plan + /// definition with the format [url]|[version]. /// - /// Reason or purpose for the action stipulated by this Contract Provision. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option, + /// amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the contract action reason. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse - pub intent: CodeableConcept, - /// Pointer to specific item - /// - /// Id [identifier??] of the clause or question text related to this action in - /// the referenced form or QuestionnaireResponse. + /// The status of the resource instance. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// This is the Contract Business Workflow Status. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "linkId")] - pub link_id: Option>, - /// State of the action + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains codes that + /// mark the contract as not currently valid or active. /// - /// Current state of the term action. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the status of an term action. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-actionstatus - pub status: CodeableConcept, - /// Episode associated with action + /// - **Strength**: required + /// - **Description**: A code specifying the state of the resource instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-status|4.0.1 + pub status: Option, + /// Negotiation status /// - /// Encounter or Episode with primary association to specified term activity. + /// Legal states of the formation of a legal instrument, which is a formally + /// executed written document that can be formally attributed to its author, + /// records and formally expresses a legally enforceable act, process, or + /// contractual duty, obligation, or right, and therefore evidences that act, + /// process, or agreement. + /// + /// ## Requirements + /// The legal state of a contract follows a prescribed flow as defined by the + /// legal community and these state may be indepenedent of the workflow state. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub context: Option, - /// Pointer to specific item /// - /// Id [identifier??] of the clause or question text related to the requester of - /// this action in the referenced form or QuestionnaireResponse. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "contextLinkId")] - pub context_link_id: Option>, - /// When action happens + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Detailed codes for the legal state of a contract. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-legalstate + #[fhir_serde(rename = "legalState")] + pub legal_state: Option, + /// Source Contract Definition /// - /// When action happens. + /// The URL pointing to a FHIR-defined Contract Definition that is adhered to in + /// whole or part by this Contract. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub occurrence: Option, - /// Who asked for action + #[fhir_serde(rename = "instantiatesCanonical")] + pub instantiates_canonical: Option, + /// External Contract Definition /// - /// Who or what initiated the action and has responsibility for its activation. + /// The URL pointing to an externally maintained definition that is adhered to in + /// whole or in part by this Contract. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub requester: Option>, - /// Pointer to specific item - /// - /// Id [identifier??] of the clause or question text related to the requester of - /// this action in the referenced form or QuestionnaireResponse. - /// - /// ## Cardinality: Optional, Multiple (0..*) + #[fhir_serde(rename = "instantiatesUri")] + pub instantiates_uri: Option, + /// Content derived from the basal information /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "requesterLinkId")] - pub requester_link_id: Option>, - /// Kind of service performer + /// The minimal content derived from the basal information source at a specific + /// stage in its lifecycle. /// - /// The type of individual that is desired or required to perform or not perform - /// the action. + /// ## Requirements + /// In the context of a contract, the information source of the content + /// derivative shall be the information referenced by the contract.binding. + /// The Contract Resource may function simply as the computable representation of + /// the executed contract, which may be the attached to the Contract Resource as + /// the “binding” or as the “friendly” electronic form. For example, a + /// Contract Resource may be automatically populated with the values expressed in + /// a related QuestionnaireResponse. + /// However, the Contract Resource may be considered the legally binding contract + /// if it is the only “executed” form of this contract, and includes the + /// signatures as *The Contract Resource may function as the computable + /// representation of an application or offer in a pre-executed Contract if the + /// grantor has not entered any values. In this case, it is populated with values + /// in a “legal” form of the application or offer or by the values in an + /// associated Questionnaire. If the grantor has filled in the legal form or the + /// associated Questionnaire Response, then these values are used to populate a + /// pre-executed Contract Resource. + /// If the Contract.topic is considered an application or offer, then the policy + /// is often required to be attached as the “legal” basis for the application + /// to ensure “informed consent” to the contract, and that any discrepancy + /// between the application and the policy are interpreted against the policy. + /// Implementers should check organizational and jurisdictional policies to + /// determine the relationship among multiple representations of a contract pre- + /// and post-execution. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -34680,55 +34851,49 @@ pub struct ContractTermAction { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes for the types of action perfomer. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provenance-agent-type - #[fhir_serde(rename = "performerType")] - pub performer_type: Option>, - /// Competency of the performer + /// - **Description**: This is an example set of Content Derivative type codes, which represent the minimal content derived from the basal information source. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-content-derivative + #[fhir_serde(rename = "contentDerivative")] + pub content_derivative: Option, + /// When this Contract was issued /// - /// The type of role or competency of an individual desired or required to - /// perform or not perform the action. + /// When this Contract was issued. + /// + /// ## Requirements + /// The Contract issuance dateTime often precedes the Contract effective + /// dateTime. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub issued: Option, + /// Effective time /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the role of the action performer. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provenance-agent-role - #[fhir_serde(rename = "performerRole")] - pub performer_role: Option, - /// Actor that wil execute (or not) the action + /// Relevant time or time-period when this Contract is applicable. /// - /// Indicates who or what is being asked to perform (or not perform) the ction. + /// ## Requirements + /// The dateTime upon which the Contract is binding. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub performer: Option, - /// Pointer to specific item - /// - /// Id [identifier??] of the clause or question text related to the reason type - /// or reference of this action in the referenced form or QuestionnaireResponse. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "performerLinkId")] - pub performer_link_id: Option>, - /// Why is action (not) needed? + pub applies: Option, + /// Contract cessation cause /// - /// Rationale for the action to be performed or not performed. Describes why the - /// action is permitted or prohibited. + /// Event resulting in discontinuation or termination of this Contract instance + /// by one or more parties to the contract. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -34736,389 +34901,241 @@ pub struct ContractTermAction { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Detailed codes for the contract action reason. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Why is action (not) needed? - /// - /// Indicates another resource whose existence justifies permitting or not - /// permitting this action. + /// - **Description**: Codes for the Cessation of Contracts. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-expiration-type + #[fhir_serde(rename = "expirationType")] + pub expiration_type: Option, + /// Contract Target Entity /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The target entity impacted by or of interest to parties to the agreement. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// Why action is to be performed + /// ## Requirements + /// The Contract.subject is an entity that has some role with respect to the + /// Contract.topic and Contract.topic.term, which is of focal interest to the + /// parties to the contract and likely impacted in a significant way by the + /// Contract.action/Contract.action.reason and the + /// Contract.term.action/Contract.action.reason. In many cases, the + /// Contract.subject is a Contract.signer if the subject is an adult; has a legal + /// interest in the contract; and incompetent to participate in the contract + /// agreement. /// - /// Describes why the action is to be performed or not performed in textual form. + /// ## Implementation Notes + /// The Contract.subject is an entity that has some role with respect to the + /// Contract.topic and Contract.topic.term, which is of focal interest to the + /// parties to the contract and likely impacted in a significant way by the + /// Contract.action/Contract.action.reason and the + /// Contract.term.action/Contract.action.reason. + /// In many cases, the Contract.subject is a Contract.signer if the subject is an + /// adult; has a legal interest in the contract; and incompetent to participate + /// in the contract agreement. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reason: Option>, - /// Pointer to specific item - /// - /// Id [identifier??] of the clause or question text related to the reason type - /// or reference of this action in the referenced form or QuestionnaireResponse. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Aliases + /// Patient + pub subject: Option>, + /// Authority under which this Contract has standing /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonLinkId")] - pub reason_link_id: Option>, - /// Comments about the action + /// A formally or informally recognized grouping of people, principals, + /// organizations, or jurisdictions formed for the purpose of achieving some form + /// of collective action such as the promulgation, administration and enforcement + /// of contracts and policies. /// - /// Comments made about the term action made by the requester, performer, subject - /// or other participants. + /// ## Requirements + /// The governance framework responsible for ensuring compliance with or + /// enforcement of the contract or policy. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// Action restriction numbers + pub authority: Option>, + /// A sphere of control governed by an authoritative jurisdiction, organization, or person /// - /// Security labels that protects the action. + /// Recognized governance framework or system operating with a circumscribed + /// scope in accordance with specified principles, policies, processes or + /// procedures for managing rights, actions, or behaviors of parties or + /// principals relative to resources. + /// + /// ## Requirements + /// The entities bound by governance to comply with the enforcement of contracts + /// or policies by a recognized authority. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "securityLabelNumber")] - pub security_label_number: Option>, -} - -/// Choice of types for the value\[x\] field in ContractTermOfferAnswer -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum ContractTermOfferAnswerValue { - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "valueBoolean")] - Boolean(Boolean), - /// Variant accepting the Decimal type. - #[fhir_serde(rename = "valueDecimal")] - Decimal(Decimal), - /// Variant accepting the Integer type. - #[fhir_serde(rename = "valueInteger")] - Integer(Integer), - /// Variant accepting the Date type. - #[fhir_serde(rename = "valueDate")] - Date(Date), - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "valueDateTime")] - DateTime(DateTime), - /// Variant accepting the Time type. - #[fhir_serde(rename = "valueTime")] - Time(Time), - /// Variant accepting the String type. - #[fhir_serde(rename = "valueString")] - String(String), - /// Variant accepting the Uri type. - #[fhir_serde(rename = "valueUri")] - Uri(Uri), - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "valueAttachment")] - Attachment(Attachment), - /// Variant accepting the Coding type. - #[fhir_serde(rename = "valueCoding")] - Coding(Coding), - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "valueQuantity")] - Quantity(Quantity), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "valueReference")] - Reference(Reference), -} - -/// Response to offer text -/// -/// Response to offer text. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct ContractTermOfferAnswer { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Aliases + /// scope of governance jurisdiction + pub domain: Option>, + /// Specific Location /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Sites in which the contract is complied with, exercised, or in force. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + pub site: Option>, + /// Computer friendly designation /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// A natural language name identifying this Contract definition, derivative, or + /// instance in any legal state. Provides additional information about its + /// content. This name should be usable as an identifier for the module by + /// machine processing applications such as code generation. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Support human navigation and code generation. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub name: Option, + /// Human Friendly name /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The actual answer response + /// A short, descriptive, user-friendly title for this Contract definition, + /// derivative, or instance in any legal state.t giving additional information + /// about its content. /// - /// Response to an offer clause or question text, which enables selection of - /// values to be agreed to, e.g., the period of participation, the date of - /// occupancy of a rental, warrently duration, or whether biospecimen may be used - /// for further research. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, -} - -/// Context of the Contract term -/// -/// The matter of concern in the context of this provision of the agrement. -/// -/// ## Cardinality: Required (1..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermOffer { - /// Unique id for inter-element referencing + pub title: Option, + /// Subordinate Friendly name /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// An explanatory or alternate user-friendly title for this Contract definition, + /// derivative, or instance in any legal state.t giving additional information + /// about its content. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub subtitle: Option, + /// Acronym or short name /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Alternative representation of the title for this Contract definition, + /// derivative, or instance in any legal state., e.g., a domain specific contract + /// number related to legislation. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + pub alias: Option>, + /// Source of Contract /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The individual or organization that authored the Contract definition, + /// derivative, or instance in any legal state. /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option, + /// Range of Legal Concerns /// - /// ## Cardinality: Optional, Multiple (0..*) + /// A selector of legal concerns for this Contract definition, derivative, or + /// instance in any legal state. /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Offer business ID + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the range of legal concerns. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-scope + pub scope: Option, + /// Focus of contract interest /// - /// Unique identifier for this particular Contract Provision. + /// Narrows the range of legal concerns to focus on the achievement of specific + /// contractual objectives. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Requirement: May be used to focus the topic of a Contract definition, + /// derivative, or instance in any legal state. + /// Comment: Contractual areas of concern are very broad. This element supports + /// narrowing the area of concern to more specific term topics within this + /// Contract. Given the wide range of contract topics, implementers need to be + /// cognizant of the business use case for which they are designing a FHIR + /// Contract, and narrowly specify the topic being represented with respect to + /// the Contract.type and any specializing Contract.subtype. The same topic, + /// e.g., an asset such as a good or service, such as a real property, medical + /// supply, insurance, information, a procedure or employment, or a manner of + /// conduct, such adherence to a privacy, trust, or security policy, may be the + /// topic of multiple types of contracts. + /// One way to determine the Contract.topic is to answer the question: “What is + /// the overall objective of this legal instrument. The Contract.topic is + /// described with more detail by the terms of the Contract. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Offer Recipient + #[fhir_serde(flatten)] + pub topic: Option, + /// Legal instrument category /// - /// Offer Recipient. + /// A high-level category for the legal instrument, whether constructed as a + /// Contract definition, derivative, or instance in any legal state. Provides + /// additional information about its content within the context of the Contract's + /// scope to distinguish the kinds of systems that would be interested in the + /// contract. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub party: Option>, - /// Negotiable offer asset - /// - /// The owner of an asset has the residual control rights over the asset: the - /// right to decide all usages of the asset in any way not inconsistent with a - /// prior contract, custom, or law (Hart, 1995, p. 30). /// - /// ## Requirements - /// In the context of a contract, the topic is the matter under consideration in - /// regards to which specific rights, privileges, obligations, restrictions, and - /// prohibitions are binding on any grantor and grantee parties upon the - /// execution of the contract. - /// Given the wide range of contract topics, implementers need to be cognizant of - /// the business use case for which they are designing a FHIR Contract, and - /// narrowly specify the topic being represented with respect to the - /// Contract.type and any specializing Contract.subtype. - /// The same topic, e.g., an asset such as a good or service, such as a real - /// property, medical supply, insurance, information, a procedure or employment, - /// or a manner of conduct, such adherence to a privacy, trust, or security - /// policy, may be the topic of multiple types of contracts. - /// One way to determine the Contract.topic is to answer the question: “What is - /// the object of negotiation?” - /// Answer: The Contract.topic, which may be described with more detail in the - /// [0..*]Contract.valuedItem @ [0..1] Contract.valuedItem.entity[x] Definition: - /// Specific type of Contract Valued Item that may be priced. - /// CodeableConcept|Reference(Any) - /// Contract.topic is “the what” that a grantor is exchanging with a grantee - /// in return for some benefit. - /// Contract.topic is “the what” to which any Contract.action is being - /// applied for any stipulated Contract.action.reason. - /// AContract.topic is “the what” governed by the execution of the contract - /// to which any party’s rights, privileges, obligations, restrictions, and - /// prohibitions apply. + /// ## Binding + /// - **Strength**: example + /// - **Description**: List of overall contract codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Subtype within the context of type /// - /// ## Implementation Notes - /// The Contract.topic may be an application for or offer of a policy or service - /// (e.g., uri to a consent directive form or a health insurance policy), which - /// becomes the Contract once accepted by both the grantor and grantee. - /// The Contract Resource may function simply as the computable representation of - /// the executed contract, which may be the attached to the Contract Resource as - /// the “binding” or as the “friendly” electronic form. For example, a - /// Contract Resource may be automatically populated with the values expressed in - /// a related QuestionnaireResponse. - /// However, the Contract Resource may be considered the legally binding contract - /// if it is the only “executed” form of this contract, and includes the - /// signatures as *The Contract Resource may function as the computable - /// representation of an application or offer in a pre-executed Contract if the - /// grantor has not entered any values. In this case, it is populated with values - /// in a “legal” form of the application or offer or by the values in an - /// associated Questionnaire. If the grantor has filled in the legal form or the - /// associated Questionnaire Response, then these values are used to populate a - /// pre-executed Contract Resource. - /// If the Contract.topic is considered an application or offer, then the policy - /// is often required to be attached as the “legal” basis for the application - /// to ensure “informed consent” to the contract, and that any discrepancy - /// between the application and the policy are interpreted against the policy. - /// Implementers should check organizational and jurisdictional policies to - /// determine the relationship among multiple representations of a contract pre- - /// and post-execution. + /// Sub-category for the Contract that distinguishes the kinds of systems that + /// would be interested in the Contract within the context of the Contract's + /// scope. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -35126,140 +35143,163 @@ pub struct ContractTermOffer { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub topic: Option, - /// Contract Offer Type or Form /// - /// Type of Contract Provision such as specific requirements, purposes for - /// actions, obligations, prohibitions, e.g. life time maximum benefit. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes within the above. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-subtype + #[fhir_serde(rename = "subType")] + pub sub_type: Option>, + /// Contract precursor content + /// + /// Precusory content developed with a focus and intent of supporting the + /// formation a Contract instance, which may be associated with and transformable + /// into a Contract. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "contentDefinition")] + pub content_definition: Option, + /// Contract Term List /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the types of contract provisions. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Accepting party choice + /// One or more Contract Provisions, which may be related and conveyed as a + /// group, and may contain nested groups. /// - /// Type of choice made by accepting party with respect to an offer made by an - /// offeror/ grantee. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Requirements - /// In some policy or contract contexts, the "offer" is made by an offeror - /// wishing to be the "grantee" of the offer topic by the grantor. From this - /// perspective, the grantor is the "offeree". + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub term: Option>, + /// Extra Information /// - /// ## Cardinality: Optional (0..1) + /// Information that may be needed by/relevant to the performer in their + /// execution of this term action. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "supportingInfo")] + pub supporting_info: Option>, + /// Key event in Contract History /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The type of decision made by a grantor with respect to an offer made by a grantee. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActConsentDirective - pub decision: Option, - /// How decision is conveyed - /// - /// How the decision about a Contract was conveyed. + /// Links to Provenance records for past versions of this Contract definition, + /// derivative, or instance, which identify key state transitions or updates that + /// are likely to be relevant to a user looking at the current version of the + /// Contract. The Provence.entity indicates the target that was changed in the + /// update. http://build.fhir.org/provenance-definitions.html#Provenance.entity. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "relevantHistory")] + pub relevant_history: Option>, + /// Contract Signatory /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for conveying a decision. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-decision-mode - #[fhir_serde(rename = "decisionMode")] - pub decision_mode: Option>, - /// Response to offer text + /// Parties with legal standing in the Contract, including the principal parties, + /// the grantor(s) and grantee(s), which are any person or organization bound by + /// the contract, and any ancillary parties, which facilitate the execution of + /// the contract such as a notary or witness. /// - /// Response to offer text. + /// ## Requirements + /// The Contract.signer applies a signature to the Contract.binding referenced + /// resource, which is the documentation that is the legal "source of truth". The + /// Contract.signer may delegate, such as a legally recognized personal + /// representative, or have a delegate assigned e.g., by a court of law, to + /// actually sign the Contract, such as a trustee in the case of incompetence. + /// + /// ## Implementation Notes + /// Signers who are principal parties to the contract are bound by the + /// Contract.activity related to the Contract.topic, and the Contract.term(s), + /// which either extend or restrict the overall action on the topic by, for + /// example, stipulating specific policies or obligations constraining actions, + /// action reason, or agents with respect to some or all of the topic. + /// For example, specifying how policies or obligations shall constrain actions + /// and action reasons permitted or denied on all or a subset of the + /// Contract.topic (e.g., all or a portion of property being transferred by the + /// contract), agents (e.g., who can resell, assign interests, or alter the + /// property being transferred by the contract), actions, and action reasons; or + /// with respect to Contract.terms, stipulating, extending, or limiting the + /// Contract.period of applicability or valuation of items under consideration. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub answer: Option>, - /// Human readable offer text + pub signer: Option>, + /// Contract Friendly Language /// - /// Human readable form of this Contract Offer. + /// The "patient friendly language" versionof the Contract in whole or in parts. + /// "Patient friendly language" means the representation of the Contract and + /// Contract Provisions in a manner that is readily accessible and understandable + /// by a layperson in accordance with best practices for communication styles + /// that ensure that those agreeing to or signing the Contract understand the + /// roles, actions, obligations, responsibilities, and implication of the + /// agreement. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub text: Option, - /// Pointer to text + pub friendly: Option>, + /// Contract Legal Language /// - /// The id of the clause or question text of the offer in the referenced - /// questionnaire/response. + /// List of Legal expressions or representations of this Contract. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "linkId")] - pub link_id: Option>, - /// Offer restriction numbers + pub legal: Option>, + /// Computable Contract Language /// - /// Security labels that protects the offer. + /// List of Computable Policy Rule Language Representations of this Contract. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "securityLabelNumber")] - pub security_label_number: Option>, + pub rule: Option>, + /// Binding Contract + /// + /// Legally binding Contract: This is the signed and legally recognized + /// representation of the Contract, which is considered the "source of truth" and + /// which would be the basis for legal action related to enforcement of this + /// Contract. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub legally_binding: Option, } -/// Protection for the Term -/// -/// Security labels that protect the handling of information about the term and -/// its elements, which may be specifically identified.. +/// Contract precursor content /// -/// ## Requirements -/// Requirement - Within a Contract, a security label may apply to the one to -/// many nested group of terms or to a term, whether inside a group or a -/// singleton. This security label protects the term and its contained provision -/// elements. The security label on the entire set of term provision elements may -/// be different from the security labels on a contained offer, asset, -/// valuedItem, or data such as sensitive information, and must be the high water -/// mark of all security labels within the term. Rationale is that a labelled -/// term, which may be disaggregated from the Contract, and must persist the -/// label on the term and on contained elements within other contexts. -/// Requirement - If more than one policy dictates a level of confidentiality of -/// the term, then each applicable policy may be represented by a security label -/// specific to its requirements. -/// Comment - A Security Label is comprised of 1..1 confidentiality code and 0..* -/// other security label codes (aka "privacy tags"). A Security Label is metadata -/// assigned (aka 'tagged') to Resources and Resource elements, which specify the -/// confidentiality and sensitivity of the Resource or element and their related -/// attributes, the purposes for which tagged items may be collected, access, -/// used or disclosed, any limitation on the type of entities authorized to -/// engage in permitted purposes, and handling instructions that obligate or -/// prohibit certain actions on the tagged items. +/// Precusory content developed with a focus and intent of supporting the +/// formation a Contract instance, which may be associated with and transformable +/// into a Contract. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermSecurityLabel { +pub struct ContractContentDefinition { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -35340,23 +35380,29 @@ pub struct ContractTermSecurityLabel { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Link to Security Labels + /// Content structure and use /// - /// Number used to link this term or term element to the applicable Security - /// Label. + /// Precusory content structure and use, i.e., a boilerplate, template, + /// application for a contract such as an insurance policy or benefits under a + /// program, e.g., workers compensation. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub number: Option>, - /// Confidentiality Protection /// - /// Security label privacy tag that species the level of confidentiality - /// protection required for this term and/or term elements. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the definition of contracts. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-definition-type + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Detailed Content Type Definition /// - /// ## Cardinality: Required (1..1) + /// Detailed Precusory content type. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -35364,46 +35410,87 @@ pub struct ContractTermSecurityLabel { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes for confidentiality protection. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-classification - pub classification: Coding, - /// Applicable Policy + /// - **Description**: Detailed codes for the additional definition of contracts. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-definition-subtype + #[fhir_serde(rename = "subType")] + pub sub_type: Option, + /// Publisher Entity /// - /// Security label privacy tag that species the applicable privacy and security - /// policies governing this term and/or term elements. + /// The individual or organization that published the Contract precursor content. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub publisher: Option, + /// When published /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for policy category. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-category - pub category: Option>, - /// Handling Instructions + /// The date (and optionally time) when the contract was published. The date must + /// change when the business version changes and it must change if the status + /// code changes. In addition, it should change when the substantive content of + /// the contract changes. /// - /// Security label privacy tag that species the manner in which term and/or term - /// elements are to be protected. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "publicationDate")] + pub publication_date: Option, + /// amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated + /// + /// amended | appended | cancelled | disputed | entered-in-error | executable | + /// executed | negotiable | offered | policy | rejected | renewed | revoked | + /// resolved | terminated. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for handling instructions. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-control - pub control: Option>, + /// - **Strength**: required + /// - **Description**: Status of the publication of contract content. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-publicationstatus|4.0.1 + #[fhir_serde(rename = "publicationStatus")] + pub publication_status: Code, + /// Publication Ownership + /// + /// A copyright statement relating to Contract precursor content. Copyright + /// statements are generally legal restrictions on the use and publishing of the + /// Contract precursor content. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub copyright: Option, } -/// Contract Term Asset List +/// Choice of types for the content\[x\] field in ContractFriendly +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "content")] +pub enum ContractFriendlyContent { + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "contentAttachment")] + Attachment(Attachment), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "contentReference")] + Reference(Reference), +} + +/// Contract Friendly Language /// -/// Contract Term Asset List. +/// The "patient friendly language" versionof the Contract in whole or in parts. +/// "Patient friendly language" means the representation of the Contract and +/// Contract Provisions in a manner that is readily accessible and understandable +/// by a layperson in accordance with best practices for communication styles +/// that ensure that those agreeing to or signing the Contract understand the +/// roles, actions, obligations, responsibilities, and implication of the +/// agreement. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -35411,7 +35498,8 @@ pub struct ContractTermSecurityLabel { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermAsset { +#[fhir_resource(choice_elements = "content")] +pub struct ContractFriendly { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -35492,198 +35580,35 @@ pub struct ContractTermAsset { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Range of asset - /// - /// Differentiates the kind of the asset . - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for scoping an asset. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetscope - pub scope: Option, - /// Asset category - /// - /// Target entity type about which the term may be concerned. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Condes for the type of an asset. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assettype - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// Associated entities - /// - /// Associated entities. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "typeReference")] - pub type_reference: Option>, - /// Asset sub-category - /// - /// May be a subtype or part of an offered asset. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Condes for the sub-type of an asset. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetsubtype - pub subtype: Option>, - /// Kinship of the asset - /// - /// Specifies the applicability of the term to an asset resource instance, and - /// instances it refers to orinstances that refer to it, and/or are owned by the - /// offeree. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The class (type) of information a consent rule covers. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-class - pub relationship: Option, - /// Circumstance of the asset - /// - /// Circumstance of the asset. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub context: Option>, - /// Quality desctiption of asset - /// - /// Description of the quality and completeness of the asset that imay be a - /// factor in its valuation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub condition: Option, - /// Asset availability types - /// - /// Type of Asset availability for use or ownership. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for asset availability. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/asset-availability - #[fhir_serde(rename = "periodType")] - pub period_type: Option>, - /// Time period of the asset - /// - /// Asset relevant contractual time period. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option>, - /// Time period - /// - /// Time period of asset use. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "usePeriod")] - pub use_period: Option>, - /// Asset clause or question text - /// - /// Clause or question text (Prose Object) concerning the asset in a linked form, - /// such as a QuestionnaireResponse used in the formation of the contract. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub text: Option, - /// Pointer to asset text - /// - /// Id [identifier??] of the clause or question text about the asset in the - /// referenced form or QuestionnaireResponse. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "linkId")] - pub link_id: Option>, - /// Response to assets - /// - /// Response to assets. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub answer: Option>, - /// Asset restriction numbers - /// - /// Security labels that protects the asset. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "securityLabelNumber")] - pub security_label_number: Option>, - /// Contract Valued Item List + /// Easily comprehended representation of this Contract /// - /// Contract Valued Item List. + /// Human readable rendering of this Contract in a format and representation + /// intended to enhance comprehension and ensure understandability. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "valuedItem")] - pub valued_item: Option>, + #[fhir_serde(flatten)] + pub content: Option, } -/// Offer Recipient +/// Choice of types for the content\[x\] field in ContractLegal +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "content")] +pub enum ContractLegalContent { + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "contentAttachment")] + Attachment(Attachment), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "contentReference")] + Reference(Reference), +} + +/// Contract Legal Language /// -/// Offer Recipient. +/// List of Legal expressions or representations of this Contract. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -35691,7 +35616,8 @@ pub struct ContractTermAsset { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermOfferParty { +#[fhir_resource(choice_elements = "content")] +pub struct ContractLegal { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -35772,36 +35698,34 @@ pub struct ContractTermOfferParty { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Referenced entity - /// - /// Participant in the offer. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Option>, - /// Participant engagement type + /// Contract Legal Text /// - /// How the party participates in the offer. + /// Contract legal text in human renderable form. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for offer participant roles. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-party-role - pub role: CodeableConcept, + #[fhir_serde(flatten)] + pub content: Option, } -/// Circumstance of the asset +/// Choice of types for the content\[x\] field in ContractRule +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "content")] +pub enum ContractRuleContent { + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "contentAttachment")] + Attachment(Attachment), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "contentReference")] + Reference(Reference), +} + +/// Computable Contract Language /// -/// Circumstance of the asset. +/// List of Computable Policy Rule Language Representations of this Contract. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -35809,7 +35733,8 @@ pub struct ContractTermOfferParty { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermAssetContext { +#[fhir_resource(choice_elements = "content")] +pub struct ContractRule { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -35890,49 +35815,47 @@ pub struct ContractTermAssetContext { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Creator,custodian or owner - /// - /// Asset context reference may include the creator, custodian, or owning Person - /// or Organization (e.g., bank, repository), location held, e.g., building, - /// jurisdiction. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Option, - /// Codeable asset context - /// - /// Coded representation of the context generally or of the Referenced entity, - /// such as the asset holder type or location. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the context of the asset. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetcontext - pub code: Option>, - /// Context description + /// Computable Contract Rules /// - /// Context description. + /// Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, + /// SecPal). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub text: Option, + #[fhir_serde(flatten)] + pub content: Option, } -/// Entity of the action +/// Contract Signatory /// -/// Entity of the action. +/// Parties with legal standing in the Contract, including the principal parties, +/// the grantor(s) and grantee(s), which are any person or organization bound by +/// the contract, and any ancillary parties, which facilitate the execution of +/// the contract such as a notary or witness. +/// +/// ## Requirements +/// The Contract.signer applies a signature to the Contract.binding referenced +/// resource, which is the documentation that is the legal "source of truth". The +/// Contract.signer may delegate, such as a legally recognized personal +/// representative, or have a delegate assigned e.g., by a court of law, to +/// actually sign the Contract, such as a trustee in the case of incompetence. +/// +/// ## Implementation Notes +/// Signers who are principal parties to the contract are bound by the +/// Contract.activity related to the Contract.topic, and the Contract.term(s), +/// which either extend or restrict the overall action on the topic by, for +/// example, stipulating specific policies or obligations constraining actions, +/// action reason, or agents with respect to some or all of the topic. +/// For example, specifying how policies or obligations shall constrain actions +/// and action reasons permitted or denied on all or a subset of the +/// Contract.topic (e.g., all or a portion of property being transferred by the +/// contract), agents (e.g., who can resell, assign interests, or alter the +/// property being transferred by the contract), actions, and action reasons; or +/// with respect to Contract.terms, stipulating, extending, or limiting the +/// Contract.period of applicability or valuation of items under consideration. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -35940,7 +35863,7 @@ pub struct ContractTermAssetContext { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ContractTermActionSubject { +pub struct ContractSigner { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -36021,37 +35944,48 @@ pub struct ContractTermActionSubject { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Entity of the action + /// Contract Signatory Role /// - /// The entity the action is performed or not performed on or for. + /// Role of this Contract signer, e.g. notary, grantee. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Option>, - /// Role type of the agent /// - /// Role type of agent assigned roles in this Contract. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: List of parties who may be signing. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-signer-type + #[fhir_serde(rename = "type")] + pub r#type: Coding, + /// Contract Signatory Party /// - /// ## Cardinality: Optional (0..1) + /// Party which is a signator to this Contract. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub party: Reference, + /// Contract Documentation Signature /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detailed codes for the contract actor role. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-actorrole - pub role: Option, + /// Legally binding Contract DSIG signature contents in Base64. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub signature: Option>, } -/// Choice of types for the topic\[x\] field in Contract +/// Choice of types for the topic\[x\] field in ContractTerm #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] #[fhir_choice_element(base_name = "topic")] -pub enum ContractTopic { +pub enum ContractTermTopic { /// Variant accepting the CodeableConcept type. #[fhir_serde(rename = "topicCodeableConcept")] CodeableConcept(CodeableConcept), @@ -36060,167 +35994,33 @@ pub enum ContractTopic { Reference(Reference), } -/// Choice of types for the legallyBinding\[x\] field in Contract -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "legallyBinding")] -pub enum ContractLegallyBinding { - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "legallyBindingAttachment")] - Attachment(Attachment), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "legallyBindingReference")] - Reference(Reference), -} - -/// FHIR Contract type -/// -/// Legally enforceable, formally recorded unilateral or bilateral directive -/// i.e., a policy or agreement. +/// Contract Term List /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// One or more Contract Provisions, which may be related and conveyed as a +/// group, and may contain nested groups. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [Contract](http://hl7.org/fhir/StructureDefinition/Contract) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "topic,legallyBinding")] -pub struct Contract { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +#[fhir_resource(choice_elements = "topic")] +pub struct ContractTerm { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -36240,16 +36040,16 @@ pub struct Contract { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -36274,7 +36074,8 @@ pub struct Contract { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -36283,20 +36084,14 @@ pub struct Contract { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Contract number - /// - /// Unique identifier for this Contract or a derivative that references a Source - /// Contract. + /// Contract Term Number /// - /// ## Requirements - /// This is the business identifier of the contract content conveyed. It may be a - /// derivative of the legally binding contract, in which case, the identifier of - /// the basal contract is contained in the Contract.binding referenced Contract. + /// Unique identifier for this particular Contract Provision. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -36304,47 +36099,23 @@ pub struct Contract { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Basal definition - /// - /// Canonical identifier for this contract, represented as a URI (globally - /// unique). - /// - /// ## Requirements - /// An absolute URI that is used to identify this contract when it is referenced - /// in a specification, model, design, instance or a contract derivative; also - /// called its canonical identifier. This SHOULD be globally unique and SHOULD be - /// a literal address at which this plan definition is (or will be) published. + pub identifier: Option, + /// Contract Term Issue Date Time /// - /// ## Implementation Notes - /// Used in a domain that uses a supplied contract repository. + /// When this Contract Provision was issued. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Business edition - /// - /// An edition identifier used for business purposes to label business - /// significant variants. - /// - /// ## Requirements - /// The identifier that is used to identify this version of the contract when it - /// is referenced in a specification, model, design, instance, or contract - /// derivative. This is an arbitrary value managed by the contract author and is - /// not expected to be globally unique. For example, it might be a timestamp - /// (e.g. yyyymmdd) if a managed version is not available. There is also no - /// expectation that versions can be placed in a lexicographical sequence. + pub issued: Option, + /// Contract Term Effective Time /// - /// ## Implementation Notes - /// Note - This is a business versionId, not a resource version id (see - /// discussion http://build.fhir.org/resource.html#versions) - /// Comments - There may be different contract instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the plan - /// definition with the format [url]|[version]. + /// Relevant time or time-period when this Contract Provision is applicable. /// /// ## Cardinality: Optional (0..1) /// @@ -36354,44 +36125,24 @@ pub struct Contract { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated - /// - /// The status of the resource instance. - /// - /// ## Requirements - /// This is the Contract Business Workflow Status. + pub applies: Option, + /// Term Concern /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the contract as not currently valid or active. + /// The entity that the term applies to. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub topic: Option, + /// Contract Term Type or Form /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-status|4.0.1 - pub status: Option, - /// Negotiation status - /// - /// Legal states of the formation of a legal instrument, which is a formally - /// executed written document that can be formally attributed to its author, - /// records and formally expresses a legally enforceable act, process, or - /// contractual duty, obligation, or right, and therefore evidences that act, - /// process, or agreement. - /// - /// ## Requirements - /// The legal state of a contract follows a prescribed flow as defined by the - /// legal community and these state may be indepenedent of the workflow state. + /// A legal clause or condition contained within a contract that requires one or + /// both parties to perform a particular requirement by some specified time or + /// prevents one or both parties from performing a particular requirement by some + /// specified time. /// /// ## Cardinality: Optional (0..1) /// @@ -36400,520 +36151,519 @@ pub struct Contract { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Detailed codes for the legal state of a contract. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-legalstate - #[fhir_serde(rename = "legalState")] - pub legal_state: Option, - /// Source Contract Definition + /// - **Strength**: example + /// - **Description**: Detailed codes for the types of contract provisions. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Contract Term Type specific classification /// - /// The URL pointing to a FHIR-defined Contract Definition that is adhered to in - /// whole or part by this Contract. + /// A specialized legal clause or condition based on overarching contract type. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesCanonical")] - pub instantiates_canonical: Option, - /// External Contract Definition /// - /// The URL pointing to an externally maintained definition that is adhered to in - /// whole or in part by this Contract. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the subtypes of contract provisions. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-subtype + #[fhir_serde(rename = "subType")] + pub sub_type: Option, + /// Term Statement + /// + /// Statement of a provision in a policy or a contract. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesUri")] - pub instantiates_uri: Option, - /// Content derived from the basal information + pub text: Option, + /// Protection for the Term /// - /// The minimal content derived from the basal information source at a specific - /// stage in its lifecycle. + /// Security labels that protect the handling of information about the term and + /// its elements, which may be specifically identified.. /// /// ## Requirements - /// In the context of a contract, the information source of the content - /// derivative shall be the information referenced by the contract.binding. - /// The Contract Resource may function simply as the computable representation of - /// the executed contract, which may be the attached to the Contract Resource as - /// the “binding” or as the “friendly” electronic form. For example, a - /// Contract Resource may be automatically populated with the values expressed in - /// a related QuestionnaireResponse. - /// However, the Contract Resource may be considered the legally binding contract - /// if it is the only “executed” form of this contract, and includes the - /// signatures as *The Contract Resource may function as the computable - /// representation of an application or offer in a pre-executed Contract if the - /// grantor has not entered any values. In this case, it is populated with values - /// in a “legal” form of the application or offer or by the values in an - /// associated Questionnaire. If the grantor has filled in the legal form or the - /// associated Questionnaire Response, then these values are used to populate a - /// pre-executed Contract Resource. - /// If the Contract.topic is considered an application or offer, then the policy - /// is often required to be attached as the “legal” basis for the application - /// to ensure “informed consent” to the contract, and that any discrepancy - /// between the application and the policy are interpreted against the policy. - /// Implementers should check organizational and jurisdictional policies to - /// determine the relationship among multiple representations of a contract pre- - /// and post-execution. + /// Requirement - Within a Contract, a security label may apply to the one to + /// many nested group of terms or to a term, whether inside a group or a + /// singleton. This security label protects the term and its contained provision + /// elements. The security label on the entire set of term provision elements may + /// be different from the security labels on a contained offer, asset, + /// valuedItem, or data such as sensitive information, and must be the high water + /// mark of all security labels within the term. Rationale is that a labelled + /// term, which may be disaggregated from the Contract, and must persist the + /// label on the term and on contained elements within other contexts. + /// Requirement - If more than one policy dictates a level of confidentiality of + /// the term, then each applicable policy may be represented by a security label + /// specific to its requirements. + /// Comment - A Security Label is comprised of 1..1 confidentiality code and 0..* + /// other security label codes (aka "privacy tags"). A Security Label is metadata + /// assigned (aka 'tagged') to Resources and Resource elements, which specify the + /// confidentiality and sensitivity of the Resource or element and their related + /// attributes, the purposes for which tagged items may be collected, access, + /// used or disclosed, any limitation on the type of entities authorized to + /// engage in permitted purposes, and handling instructions that obligate or + /// prohibit certain actions on the tagged items. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "securityLabel")] + pub security_label: Option>, + /// Context of the Contract term /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: This is an example set of Content Derivative type codes, which represent the minimal content derived from the basal information source. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-content-derivative - #[fhir_serde(rename = "contentDerivative")] - pub content_derivative: Option, - /// When this Contract was issued + /// The matter of concern in the context of this provision of the agrement. /// - /// When this Contract was issued. + /// ## Cardinality: Required (1..1) /// - /// ## Requirements - /// The Contract issuance dateTime often precedes the Contract effective - /// dateTime. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub offer: ContractTermOffer, + /// Contract Term Asset List /// - /// ## Cardinality: Optional (0..1) + /// Contract Term Asset List. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub issued: Option, - /// Effective time + pub asset: Option>, + /// Entity being ascribed responsibility /// - /// Relevant time or time-period when this Contract is applicable. + /// An actor taking a role in an activity for which it can be assigned some + /// degree of responsibility for the activity taking place. /// /// ## Requirements - /// The dateTime upon which the Contract is binding. + /// An agent can be a person, an organization, software, device, or other + /// entities that may be ascribed responsibility. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Several agents may be associated (i.e. has some responsibility for an + /// activity) with an activity and vice-versa. + /// For example, in cases of actions initiated by one user for other users, or in + /// events that involve more than one user, hardware device, software, or system + /// process. However, only one user may be the initiator/requestor for the event. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub applies: Option, - /// Contract cessation cause + pub action: Option>, + /// Nested Contract Term Group /// - /// Event resulting in discontinuation or termination of this Contract instance - /// by one or more parties to the contract. + /// Nested group of Contract Provisions. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub group: Option>, +} + +/// Choice of types for the occurrence\[x\] field in ContractTermAction +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "occurrence")] +pub enum ContractTermActionOccurrence { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "occurrenceDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "occurrencePeriod")] + Period(Period), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "occurrenceTiming")] + Timing(Timing), +} + +/// Entity being ascribed responsibility +/// +/// An actor taking a role in an activity for which it can be assigned some +/// degree of responsibility for the activity taking place. +/// +/// ## Requirements +/// An agent can be a person, an organization, software, device, or other +/// entities that may be ascribed responsibility. +/// +/// ## Implementation Notes +/// Several agents may be associated (i.e. has some responsibility for an +/// activity) with an activity and vice-versa. +/// For example, in cases of actions initiated by one user for other users, or in +/// events that involve more than one user, hardware device, software, or system +/// process. However, only one user may be the initiator/requestor for the event. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "occurrence")] +pub struct ContractTermAction { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the Cessation of Contracts. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-expiration-type - #[fhir_serde(rename = "expirationType")] - pub expiration_type: Option, - /// Contract Target Entity + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// The target entity impacted by or of interest to parties to the agreement. + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// The Contract.subject is an entity that has some role with respect to the - /// Contract.topic and Contract.topic.term, which is of focal interest to the - /// parties to the contract and likely impacted in a significant way by the - /// Contract.action/Contract.action.reason and the - /// Contract.term.action/Contract.action.reason. In many cases, the - /// Contract.subject is a Contract.signer if the subject is an adult; has a legal - /// interest in the contract; and incompetent to participate in the contract - /// agreement. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// The Contract.subject is an entity that has some role with respect to the - /// Contract.topic and Contract.topic.term, which is of focal interest to the - /// parties to the contract and likely impacted in a significant way by the - /// Contract.action/Contract.action.reason and the - /// Contract.term.action/Contract.action.reason. - /// In many cases, the Contract.subject is a Contract.signer if the subject is an - /// adult; has a legal interest in the contract; and incompetent to participate - /// in the contract agreement. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// Patient - pub subject: Option>, - /// Authority under which this Contract has standing + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// True if the term prohibits the action /// - /// A formally or informally recognized grouping of people, principals, - /// organizations, or jurisdictions formed for the purpose of achieving some form - /// of collective action such as the promulgation, administration and enforcement - /// of contracts and policies. + /// True if the term prohibits the action. /// - /// ## Requirements - /// The governance framework responsible for ensuring compliance with or - /// enforcement of the contract or policy. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Modifier element - If true this element negates the specified action. For Example, instead of a dictate to perform an action, it is a dictate not to perform the action. /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub authority: Option>, - /// A sphere of control governed by an authoritative jurisdiction, organization, or person - /// - /// Recognized governance framework or system operating with a circumscribed - /// scope in accordance with specified principles, policies, processes or - /// procedures for managing rights, actions, or behaviors of parties or - /// principals relative to resources. + #[fhir_serde(rename = "doNotPerform")] + pub do_not_perform: Option, + /// Type or form of the action /// - /// ## Requirements - /// The entities bound by governance to comply with the enforcement of contracts - /// or policies by a recognized authority. + /// Activity or service obligation to be done or not done, performed or not + /// performed, effectuated or not by this Contract term. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// scope of governance jurisdiction - pub domain: Option>, - /// Specific Location + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the contract action. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-action + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Entity of the action /// - /// Sites in which the contract is complied with, exercised, or in force. + /// Entity of the action. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub site: Option>, - /// Computer friendly designation - /// - /// A natural language name identifying this Contract definition, derivative, or - /// instance in any legal state. Provides additional information about its - /// content. This name should be usable as an identifier for the module by - /// machine processing applications such as code generation. - /// - /// ## Requirements - /// Support human navigation and code generation. - /// - /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + pub subject: Option>, + /// Purpose for the Contract Term Action /// - /// ## Cardinality: Optional (0..1) + /// Reason or purpose for the action stipulated by this Contract Provision. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Human Friendly name /// - /// A short, descriptive, user-friendly title for this Contract definition, - /// derivative, or instance in any legal state.t giving additional information - /// about its content. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the contract action reason. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse + pub intent: CodeableConcept, + /// Pointer to specific item /// - /// ## Cardinality: Optional (0..1) + /// Id [identifier??] of the clause or question text related to this action in + /// the referenced form or QuestionnaireResponse. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// Subordinate Friendly name + #[fhir_serde(rename = "linkId")] + pub link_id: Option>, + /// State of the action /// - /// An explanatory or alternate user-friendly title for this Contract definition, - /// derivative, or instance in any legal state.t giving additional information - /// about its content. + /// Current state of the term action. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subtitle: Option, - /// Acronym or short name /// - /// Alternative representation of the title for this Contract definition, - /// derivative, or instance in any legal state., e.g., a domain specific contract - /// number related to legislation. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the status of an term action. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-actionstatus + pub status: CodeableConcept, + /// Episode associated with action /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Encounter or Episode with primary association to specified term activity. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub alias: Option>, - /// Source of Contract + pub context: Option, + /// Pointer to specific item /// - /// The individual or organization that authored the Contract definition, - /// derivative, or instance in any legal state. + /// Id [identifier??] of the clause or question text related to the requester of + /// this action in the referenced form or QuestionnaireResponse. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option, - /// Range of Legal Concerns + #[fhir_serde(rename = "contextLinkId")] + pub context_link_id: Option>, + /// When action happens /// - /// A selector of legal concerns for this Contract definition, derivative, or - /// instance in any legal state. + /// When action happens. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub occurrence: Option, + /// Who asked for action /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the range of legal concerns. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-scope - pub scope: Option, - /// Focus of contract interest - /// - /// Narrows the range of legal concerns to focus on the achievement of specific - /// contractual objectives. - /// - /// ## Requirements - /// Requirement: May be used to focus the topic of a Contract definition, - /// derivative, or instance in any legal state. - /// Comment: Contractual areas of concern are very broad. This element supports - /// narrowing the area of concern to more specific term topics within this - /// Contract. Given the wide range of contract topics, implementers need to be - /// cognizant of the business use case for which they are designing a FHIR - /// Contract, and narrowly specify the topic being represented with respect to - /// the Contract.type and any specializing Contract.subtype. The same topic, - /// e.g., an asset such as a good or service, such as a real property, medical - /// supply, insurance, information, a procedure or employment, or a manner of - /// conduct, such adherence to a privacy, trust, or security policy, may be the - /// topic of multiple types of contracts. - /// One way to determine the Contract.topic is to answer the question: “What is - /// the overall objective of this legal instrument. The Contract.topic is - /// described with more detail by the terms of the Contract. + /// Who or what initiated the action and has responsibility for its activation. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub topic: Option, - /// Legal instrument category - /// - /// A high-level category for the legal instrument, whether constructed as a - /// Contract definition, derivative, or instance in any legal state. Provides - /// additional information about its content within the context of the Contract's - /// scope to distinguish the kinds of systems that would be interested in the - /// contract. + pub requester: Option>, + /// Pointer to specific item /// - /// ## Cardinality: Optional (0..1) + /// Id [identifier??] of the clause or question text related to the requester of + /// this action in the referenced form or QuestionnaireResponse. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "requesterLinkId")] + pub requester_link_id: Option>, + /// Kind of service performer /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: List of overall contract codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Subtype within the context of type - /// - /// Sub-category for the Contract that distinguishes the kinds of systems that - /// would be interested in the Contract within the context of the Contract's - /// scope. + /// The type of individual that is desired or required to perform or not perform + /// the action. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: example - /// - **Description**: Detailed codes within the above. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-subtype - #[fhir_serde(rename = "subType")] - pub sub_type: Option>, - /// Contract precursor content + /// - **Description**: Codes for the types of action perfomer. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provenance-agent-type + #[fhir_serde(rename = "performerType")] + pub performer_type: Option>, + /// Competency of the performer /// - /// Precusory content developed with a focus and intent of supporting the - /// formation a Contract instance, which may be associated with and transformable - /// into a Contract. + /// The type of role or competency of an individual desired or required to + /// perform or not perform the action. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "contentDefinition")] - pub content_definition: Option, - /// Contract Term List /// - /// One or more Contract Provisions, which may be related and conveyed as a - /// group, and may contain nested groups. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the role of the action performer. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provenance-agent-role + #[fhir_serde(rename = "performerRole")] + pub performer_role: Option, + /// Actor that wil execute (or not) the action /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Indicates who or what is being asked to perform (or not perform) the ction. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub term: Option>, - /// Extra Information + pub performer: Option, + /// Pointer to specific item /// - /// Information that may be needed by/relevant to the performer in their - /// execution of this term action. + /// Id [identifier??] of the clause or question text related to the reason type + /// or reference of this action in the referenced form or QuestionnaireResponse. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportingInfo")] - pub supporting_info: Option>, - /// Key event in Contract History + #[fhir_serde(rename = "performerLinkId")] + pub performer_link_id: Option>, + /// Why is action (not) needed? /// - /// Links to Provenance records for past versions of this Contract definition, - /// derivative, or instance, which identify key state transitions or updates that - /// are likely to be relevant to a user looking at the current version of the - /// Contract. The Provence.entity indicates the target that was changed in the - /// update. http://build.fhir.org/provenance-definitions.html#Provenance.entity. + /// Rationale for the action to be performed or not performed. Describes why the + /// action is permitted or prohibited. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relevantHistory")] - pub relevant_history: Option>, - /// Contract Signatory - /// - /// Parties with legal standing in the Contract, including the principal parties, - /// the grantor(s) and grantee(s), which are any person or organization bound by - /// the contract, and any ancillary parties, which facilitate the execution of - /// the contract such as a notary or witness. /// - /// ## Requirements - /// The Contract.signer applies a signature to the Contract.binding referenced - /// resource, which is the documentation that is the legal "source of truth". The - /// Contract.signer may delegate, such as a legally recognized personal - /// representative, or have a delegate assigned e.g., by a court of law, to - /// actually sign the Contract, such as a trustee in the case of incompetence. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the contract action reason. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse + #[fhir_serde(rename = "reasonCode")] + pub reason_code: Option>, + /// Why is action (not) needed? /// - /// ## Implementation Notes - /// Signers who are principal parties to the contract are bound by the - /// Contract.activity related to the Contract.topic, and the Contract.term(s), - /// which either extend or restrict the overall action on the topic by, for - /// example, stipulating specific policies or obligations constraining actions, - /// action reason, or agents with respect to some or all of the topic. - /// For example, specifying how policies or obligations shall constrain actions - /// and action reasons permitted or denied on all or a subset of the - /// Contract.topic (e.g., all or a portion of property being transferred by the - /// contract), agents (e.g., who can resell, assign interests, or alter the - /// property being transferred by the contract), actions, and action reasons; or - /// with respect to Contract.terms, stipulating, extending, or limiting the - /// Contract.period of applicability or valuation of items under consideration. + /// Indicates another resource whose existence justifies permitting or not + /// permitting this action. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub signer: Option>, - /// Contract Friendly Language + #[fhir_serde(rename = "reasonReference")] + pub reason_reference: Option>, + /// Why action is to be performed /// - /// The "patient friendly language" versionof the Contract in whole or in parts. - /// "Patient friendly language" means the representation of the Contract and - /// Contract Provisions in a manner that is readily accessible and understandable - /// by a layperson in accordance with best practices for communication styles - /// that ensure that those agreeing to or signing the Contract understand the - /// roles, actions, obligations, responsibilities, and implication of the - /// agreement. + /// Describes why the action is to be performed or not performed in textual form. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub friendly: Option>, - /// Contract Legal Language + pub reason: Option>, + /// Pointer to specific item /// - /// List of Legal expressions or representations of this Contract. + /// Id [identifier??] of the clause or question text related to the reason type + /// or reference of this action in the referenced form or QuestionnaireResponse. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub legal: Option>, - /// Computable Contract Language + #[fhir_serde(rename = "reasonLinkId")] + pub reason_link_id: Option>, + /// Comments about the action /// - /// List of Computable Policy Rule Language Representations of this Contract. + /// Comments made about the term action made by the requester, performer, subject + /// or other participants. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub rule: Option>, - /// Binding Contract + pub note: Option>, + /// Action restriction numbers /// - /// Legally binding Contract: This is the signed and legally recognized - /// representation of the Contract, which is considered the "source of truth" and - /// which would be the basis for legal action related to enforcement of this - /// Contract. + /// Security labels that protects the action. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub legally_binding: Option, + #[fhir_serde(rename = "securityLabelNumber")] + pub security_label_number: Option>, } -/// Additional coverage classifications -/// -/// A suite of underwriter specific classifiers. -/// -/// ## Requirements -/// The codes provided on the health card which identify or confirm the specific -/// policy for the insurer. +/// Entity of the action /// -/// ## Implementation Notes -/// For example may be used to identify a class of coverage or employer group, -/// Policy, Plan. +/// Entity of the action. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -36921,7 +36671,7 @@ pub struct Contract { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageClass { +pub struct ContractTermActionSubject { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -37002,104 +36752,44 @@ pub struct CoverageClass { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of class such as 'group' or 'plan' - /// - /// The type of classification for which an insurer-specific class label or - /// number and optional name is provided, for example may be used to identify a - /// class of coverage or employer group, Policy, Plan. - /// - /// ## Requirements - /// The insurer issued label for a specific health card value. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The policy classifications, eg. Group, Plan, Class, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-class - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Value associated with the type - /// - /// The alphanumeric string value associated with the insurer issued label. - /// - /// ## Requirements - /// The insurer issued label and value are necessary to identify the specific - /// policy. - /// - /// ## Implementation Notes - /// For example, the Group or Plan number. + /// Entity of the action /// - /// ## Cardinality: Required (1..1) + /// The entity the action is performed or not performed on or for. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: String, - /// Human readable description of the type and value - /// - /// A short description for the class. + pub reference: Option>, + /// Role type of the agent /// - /// ## Requirements - /// Used to provide a meaningful description in correspondence to the patient. + /// Role type of agent assigned roles in this Contract. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, -} - -/// Choice of types for the value\[x\] field in CoverageCostToBeneficiary -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum CoverageCostToBeneficiaryValue { - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "valueQuantity")] - Quantity(Quantity), - /// Variant accepting the Money type. - #[fhir_serde(rename = "valueMoney")] - Money(Money), + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the contract actor role. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-actorrole + pub role: Option, } -/// Patient payments for services/products -/// -/// A suite of codes indicating the cost category and associated amount which -/// have been detailed in the policy and may have been included on the health -/// card. -/// -/// ## Requirements -/// Required by providers to manage financial transaction with the patient. +/// Contract Term Asset List /// -/// ## Implementation Notes -/// For example by knowing the patient visit co-pay, the provider can collect the -/// amount prior to undertaking treatment. +/// Contract Term Asset List. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Aliases -/// CoPay, Deductible, Exceptions #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct CoverageCostToBeneficiary { +pub struct ContractTermAsset { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -37180,75 +36870,198 @@ pub struct CoverageCostToBeneficiary { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Cost category - /// - /// The category of patient centric costs associated with treatment. - /// - /// ## Requirements - /// Needed to identify the category associated with the amount for the patient. + /// Range of asset /// - /// ## Implementation Notes - /// For example visit, specialist visits, emergency, inpatient care, etc. + /// Differentiates the kind of the asset . /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The types of services to which patient copayments are specified. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-copay-type + /// - **Strength**: example + /// - **Description**: Codes for scoping an asset. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetscope + pub scope: Option, + /// Asset category + /// + /// Target entity type about which the term may be concerned. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Condes for the type of an asset. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assettype #[fhir_serde(rename = "type")] - pub r#type: Option, - /// The amount or percentage due from the beneficiary + pub r#type: Option>, + /// Associated entities /// - /// The amount due from the patient for the cost category. + /// Associated entities. /// - /// ## Requirements - /// Needed to identify the amount for the patient associated with the category. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// Amount may be expressed as a percentage of the service/product cost or a - /// fixed amount of currency. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "typeReference")] + pub type_reference: Option>, + /// Asset sub-category /// - /// ## Cardinality: Required (1..1) + /// May be a subtype or part of an offered asset. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, - /// Exceptions for patient payments /// - /// A suite of codes indicating exceptions or reductions to patient costs and - /// their effective periods. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Condes for the sub-type of an asset. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetsubtype + pub subtype: Option>, + /// Kinship of the asset /// - /// ## Requirements - /// Required by providers to manage financial transaction with the patient. + /// Specifies the applicability of the term to an asset resource instance, and + /// instances it refers to orinstances that refer to it, and/or are owned by the + /// offeree. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The class (type) of information a consent rule covers. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/consent-content-class + pub relationship: Option, + /// Circumstance of the asset + /// + /// Circumstance of the asset. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub exception: Option>, + pub context: Option>, + /// Quality desctiption of asset + /// + /// Description of the quality and completeness of the asset that imay be a + /// factor in its valuation. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub condition: Option, + /// Asset availability types + /// + /// Type of Asset availability for use or ownership. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for asset availability. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/asset-availability + #[fhir_serde(rename = "periodType")] + pub period_type: Option>, + /// Time period of the asset + /// + /// Asset relevant contractual time period. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub period: Option>, + /// Time period + /// + /// Time period of asset use. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "usePeriod")] + pub use_period: Option>, + /// Asset clause or question text + /// + /// Clause or question text (Prose Object) concerning the asset in a linked form, + /// such as a QuestionnaireResponse used in the formation of the contract. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub text: Option, + /// Pointer to asset text + /// + /// Id [identifier??] of the clause or question text about the asset in the + /// referenced form or QuestionnaireResponse. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "linkId")] + pub link_id: Option>, + /// Response to assets + /// + /// Response to assets. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub answer: Option>, + /// Asset restriction numbers + /// + /// Security labels that protects the asset. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "securityLabelNumber")] + pub security_label_number: Option>, + /// Contract Valued Item List + /// + /// Contract Valued Item List. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "valuedItem")] + pub valued_item: Option>, } -/// Exceptions for patient payments -/// -/// A suite of codes indicating exceptions or reductions to patient costs and -/// their effective periods. +/// Circumstance of the asset /// -/// ## Requirements -/// Required by providers to manage financial transaction with the patient. +/// Circumstance of the asset. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -37256,7 +37069,7 @@ pub struct CoverageCostToBeneficiary { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageCostToBeneficiaryException { +pub struct ContractTermAssetContext { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -37337,17 +37150,24 @@ pub struct CoverageCostToBeneficiaryException { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Exception category + /// Creator,custodian or owner /// - /// The code for the specific exception. + /// Asset context reference may include the creator, custodian, or owning Person + /// or Organization (e.g., bank, repository), location held, e.g., building, + /// jurisdiction. /// - /// ## Requirements - /// Needed to identify the exception associated with the amount for the patient. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub reference: Option, + /// Codeable asset context /// - /// ## Special Semantics - /// - Included in summary + /// Coded representation of the context generally or of the Referenced entity, + /// such as the asset holder type or location. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -37355,180 +37175,59 @@ pub struct CoverageCostToBeneficiaryException { /// /// ## Binding /// - **Strength**: example - /// - **Description**: The types of exceptions from the part or full value of financial obligations such as copays. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-financial-exception - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// The effective period of the exception - /// - /// The timeframe during when the exception is in force. + /// - **Description**: Codes for the context of the asset. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-assetcontext + pub code: Option>, + /// Context description /// - /// ## Requirements - /// Needed to identify the applicable timeframe for the exception for the correct - /// calculation of patient costs. + /// Context description. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, + pub text: Option, } -/// FHIR Coverage type -/// -/// Financial instrument which may be used to reimburse or pay for health care -/// products and services. Includes both insurance and self-payment. -/// -/// ## Purpose -/// Coverage provides a link between covered parties (patients) and the payors of their healthcare costs (both insurance and self-pay). +/// Choice of types for the entity\[x\] field in ContractTermAssetValuedItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "entity")] +pub enum ContractTermAssetValuedItemEntity { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "entityCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "entityReference")] + Reference(Reference), +} + +/// Contract Valued Item List /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// Contract Valued Item List. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [Coverage](http://hl7.org/fhir/StructureDefinition/Coverage) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Coverage { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +#[fhir_resource(choice_elements = "entity")] +pub struct ContractTermAssetValuedItem { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -37548,16 +37247,16 @@ pub struct Coverage { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -37582,7 +37281,8 @@ pub struct Coverage { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -37591,273 +37291,338 @@ pub struct Coverage { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business Identifier for the coverage + /// Contract Valued Item Type /// - /// A unique identifier assigned to this coverage. + /// Specific type of Contract Valued Item that may be priced. /// - /// ## Requirements - /// Allows coverages to be distinguished and referenced. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// The main (and possibly only) identifier for the coverage - often referred to - /// as a Member Id, Certificate number, Personal Health Number or Case ID. May be - /// constructed as the concatenation of the Coverage.SubscriberID and the - /// Coverage.dependant. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub entity: Option, + /// Contract Valued Item Number /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Identifies a Contract Valued Item instance. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | cancelled | draft | entered-in-error + pub identifier: Option, + /// Contract Valued Item Effective Tiem /// - /// The status of the resource instance. + /// Indicates the time during which this Contract ValuedItem information is + /// effective. /// - /// ## Requirements - /// Need to track the status of the resource as 'draft' resources may undergo - /// further edits while 'active' resources are immutable and may only have their - /// status changed to 'cancelled'. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the code - /// entered-in-error that marks the coverage as not currently valid. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "effectiveTime")] + pub effective_time: Option, + /// Count of Contract Valued Items /// - /// ## Cardinality: Required (1..1) + /// Specifies the units by which the Contract Valued Item is measured or counted, + /// and quantifies the countable or measurable Contract Valued Item instances. /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// Contract Valued Item fee, charge, or cost /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 - pub status: Code, - /// Coverage category such as medical or accident - /// - /// The type of coverage: social program, medical plan, accident coverage - /// (workers compensation, auto), group health or payment by an individual or - /// organization. - /// - /// ## Requirements - /// The order of application of coverages is dependent on the types of coverage. + /// A Contract Valued Item unit valuation measure. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Contract Valued Item Price Scaling Factor /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: The type of insurance: public health, worker compensation; private accident, auto, private health, etc.) or a direct payment by an individual or organization. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Owner of the policy + /// A real number that represents a multiplier used in determining the overall + /// value of the Contract Valued Item delivered. The concept of a Factor allows + /// for a discount or surcharge multiplier to be applied to a monetary amount. /// - /// The party who 'owns' the insurance policy. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// This provides employer information in the case of Worker's Compensation and - /// other policies. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub factor: Option, + /// Contract Valued Item Difficulty Scaling Factor /// - /// ## Implementation Notes - /// For example: may be an individual, corporation or the subscriber's employer. + /// An amount that expresses the weighting (based on difficulty, cost and/or + /// resource intensiveness) associated with the Contract Valued Item delivered. + /// The concept of Points allows for assignment of point values for a Contract + /// Valued Item, such that a monetary amount can be assigned to each point. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "policyHolder")] - pub policy_holder: Option, - /// Subscriber to the policy - /// - /// The party who has signed-up for or 'owns' the contractual relationship to the - /// policy or to whom the benefit of the policy for services rendered to them or - /// their family is due. - /// - /// ## Requirements - /// This is the party who is entitled to the benfits under the policy. + pub points: Option, + /// Total Contract Valued Item Value /// - /// ## Implementation Notes - /// May be self or a parent in the case of dependants. + /// Expresses the product of the Contract Valued Item unitQuantity and the + /// unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per + /// Point) * factor Number * points = net Amount. Quantity, factor and points are + /// assumed to be 1 if not supplied. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subscriber: Option, - /// ID assigned to the subscriber - /// - /// The insurer assigned ID for the Subscriber. + pub net: Option, + /// Terms of valuation /// - /// ## Requirements - /// The insurer requires this identifier on correspondance and claims (digital - /// and otherwise). + /// Terms of valuation. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subscriberId")] - pub subscriber_id: Option, - /// Plan beneficiary - /// - /// The party who benefits from the insurance coverage; the patient when products - /// and/or services are provided. - /// - /// ## Requirements - /// This is the party who receives treatment for which the costs are reimbursed - /// under the coverage. + pub payment: Option, + /// When payment is due /// - /// ## Cardinality: Required (1..1) + /// When payment is due. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub beneficiary: Reference, - /// Dependent number + #[fhir_serde(rename = "paymentDate")] + pub payment_date: Option, + /// Who will make payment /// - /// A unique identifier for a dependent under the coverage. + /// Who will make payment. /// - /// ## Requirements - /// For some coverages a single identifier is issued to the Subscriber and then a - /// unique dependent number is issued to each beneficiary. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// Periodically the member number is constructed from the subscriberId and the - /// dependant number. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub responsible: Option, + /// Who will receive payment /// - /// ## Cardinality: Optional (0..1) + /// Who will receive payment. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub dependent: Option, - /// Beneficiary relationship to the subscriber + pub recipient: Option, + /// Pointer to specific item /// - /// The relationship of beneficiary (patient) to the subscriber. + /// Id of the clause or question text related to the context of this valuedItem + /// in the referenced form or QuestionnaireResponse. /// - /// ## Requirements - /// To determine relationship between the patient and the subscriber to determine - /// coordination of benefits. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// Typically, an individual uses policies which are theirs (relationship='self') - /// before policies owned by others. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "linkId")] + pub link_id: Option>, + /// Security Labels that define affected terms /// - /// ## Cardinality: Optional (0..1) + /// A set of security labels that define which terms are controlled by this + /// condition. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "securityLabelNumber")] + pub security_label_number: Option>, +} + +/// Context of the Contract term +/// +/// The matter of concern in the context of this provision of the agrement. +/// +/// ## Cardinality: Required (1..1) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ContractTermOffer { + /// Unique id for inter-element referencing /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The relationship between the Subscriber and the Beneficiary (insured/covered party/patient). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/subscriber-relationship - pub relationship: Option, - /// Coverage start and end dates + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// Time period during which the coverage is in force. A missing start date - /// indicates the start date isn't known, a missing end date means the coverage - /// is continuing to be in force. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Requirements - /// Some insurers require the submission of the coverage term. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Issuer of the policy + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The program or plan underwriter or payor including both insurance and - /// non-insurance agreements, such as patient-pay agreements. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Need to identify the issuer to target for claim processing and for - /// coordination of benefit processing. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// May provide multiple identifiers such as insurance company identifier or - /// business identifier (BIN number). - /// For selfpay it may provide multiple paying persons and/or organizations. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub payor: Option>, - /// Additional coverage classifications + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A suite of underwriter specific classifiers. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Offer business ID /// - /// ## Requirements - /// The codes provided on the health card which identify or confirm the specific - /// policy for the insurer. + /// Unique identifier for this particular Contract Provision. /// - /// ## Implementation Notes - /// For example may be used to identify a class of coverage or employer group, - /// Policy, Plan. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Offer Recipient + /// + /// Offer Recipient. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub class: Option>, - /// Relative order of the coverage + pub party: Option>, + /// Negotiable offer asset /// - /// The order of applicability of this coverage relative to other coverages which - /// are currently in force. Note, there may be gaps in the numbering and this - /// does not imply primary, secondary etc. as the specific positioning of - /// coverages depends upon the episode of care. + /// The owner of an asset has the residual control rights over the asset: the + /// right to decide all usages of the asset in any way not inconsistent with a + /// prior contract, custom, or law (Hart, 1995, p. 30). /// /// ## Requirements - /// Used in managing the coordination of benefits. + /// In the context of a contract, the topic is the matter under consideration in + /// regards to which specific rights, privileges, obligations, restrictions, and + /// prohibitions are binding on any grantor and grantee parties upon the + /// execution of the contract. + /// Given the wide range of contract topics, implementers need to be cognizant of + /// the business use case for which they are designing a FHIR Contract, and + /// narrowly specify the topic being represented with respect to the + /// Contract.type and any specializing Contract.subtype. + /// The same topic, e.g., an asset such as a good or service, such as a real + /// property, medical supply, insurance, information, a procedure or employment, + /// or a manner of conduct, such adherence to a privacy, trust, or security + /// policy, may be the topic of multiple types of contracts. + /// One way to determine the Contract.topic is to answer the question: “What is + /// the object of negotiation?” + /// Answer: The Contract.topic, which may be described with more detail in the + /// [0..*]Contract.valuedItem @ [0..1] Contract.valuedItem.entity[x] Definition: + /// Specific type of Contract Valued Item that may be priced. + /// CodeableConcept|Reference(Any) + /// Contract.topic is “the what” that a grantor is exchanging with a grantee + /// in return for some benefit. + /// Contract.topic is “the what” to which any Contract.action is being + /// applied for any stipulated Contract.action.reason. + /// AContract.topic is “the what” governed by the execution of the contract + /// to which any party’s rights, privileges, obligations, restrictions, and + /// prohibitions apply. + /// + /// ## Implementation Notes + /// The Contract.topic may be an application for or offer of a policy or service + /// (e.g., uri to a consent directive form or a health insurance policy), which + /// becomes the Contract once accepted by both the grantor and grantee. + /// The Contract Resource may function simply as the computable representation of + /// the executed contract, which may be the attached to the Contract Resource as + /// the “binding” or as the “friendly” electronic form. For example, a + /// Contract Resource may be automatically populated with the values expressed in + /// a related QuestionnaireResponse. + /// However, the Contract Resource may be considered the legally binding contract + /// if it is the only “executed” form of this contract, and includes the + /// signatures as *The Contract Resource may function as the computable + /// representation of an application or offer in a pre-executed Contract if the + /// grantor has not entered any values. In this case, it is populated with values + /// in a “legal” form of the application or offer or by the values in an + /// associated Questionnaire. If the grantor has filled in the legal form or the + /// associated Questionnaire Response, then these values are used to populate a + /// pre-executed Contract Resource. + /// If the Contract.topic is considered an application or offer, then the policy + /// is often required to be attached as the “legal” basis for the application + /// to ensure “informed consent” to the contract, and that any discrepancy + /// between the application and the policy are interpreted against the policy. + /// Implementers should check organizational and jurisdictional policies to + /// determine the relationship among multiple representations of a contract pre- + /// and post-execution. /// /// ## Cardinality: Optional (0..1) /// @@ -37867,37 +37632,48 @@ pub struct Coverage { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub order: Option, - /// Insurer network - /// - /// The insurer-specific identifier for the insurer-defined network of providers - /// to which the beneficiary may seek treatment which will be covered at the - /// 'in-network' rate, otherwise 'out of network' terms and conditions apply. + pub topic: Option, + /// Contract Offer Type or Form /// - /// ## Requirements - /// Used in referral for treatment and in claims processing. + /// Type of Contract Provision such as specific requirements, purposes for + /// actions, obligations, prohibitions, e.g. life time maximum benefit. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub network: Option, - /// Patient payments for services/products /// - /// A suite of codes indicating the cost category and associated amount which - /// have been detailed in the policy and may have been included on the health - /// card. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Detailed codes for the types of contract provisions. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-term-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Accepting party choice + /// + /// Type of choice made by accepting party with respect to an offer made by an + /// offeror/ grantee. /// /// ## Requirements - /// Required by providers to manage financial transaction with the patient. + /// In some policy or contract contexts, the "offer" is made by an offeror + /// wishing to be the "grantee" of the offer topic by the grantor. From this + /// perspective, the grantor is the "offeree". /// - /// ## Implementation Notes - /// For example by knowing the patient visit co-pay, the provider can collect the - /// amount prior to undertaking treatment. + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The type of decision made by a grantor with respect to an offer made by a grantee. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActConsentDirective + pub decision: Option, + /// How decision is conveyed + /// + /// How the decision about a Contract was conveyed. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -37905,63 +37681,102 @@ pub struct Coverage { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// CoPay, Deductible, Exceptions - #[fhir_serde(rename = "costToBeneficiary")] - pub cost_to_beneficiary: Option>, - /// Reimbursement to insurer + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for conveying a decision. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-decision-mode + #[fhir_serde(rename = "decisionMode")] + pub decision_mode: Option>, + /// Response to offer text /// - /// When 'subrogation=true' this insurance instance has been included not for - /// adjudication but to provide insurers with the details to recover costs. + /// Response to offer text. /// - /// ## Requirements - /// See definition for when to be used. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// Typically, automotive and worker's compensation policies would be flagged - /// with 'subrogation=true' to enable healthcare payors to collect against - /// accident claims. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub answer: Option>, + /// Human readable offer text + /// + /// Human readable form of this Contract Offer. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subrogation: Option, - /// Contract details + pub text: Option, + /// Pointer to text /// - /// The policy(s) which constitute this insurance coverage. + /// The id of the clause or question text of the offer in the referenced + /// questionnaire/response. /// - /// ## Requirements - /// To reference the legally binding contract between the policy holder and the - /// insurer. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "linkId")] + pub link_id: Option>, + /// Offer restriction numbers + /// + /// Security labels that protects the offer. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contract: Option>, + #[fhir_serde(rename = "securityLabelNumber")] + pub security_label_number: Option>, } -/// Choice of types for the diagnosis\[x\] field in CoverageEligibilityRequestItemDiagnosis +/// Choice of types for the value\[x\] field in ContractTermOfferAnswer #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "diagnosis")] -pub enum CoverageEligibilityRequestItemDiagnosisDiagnosis { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "diagnosisCodeableConcept")] - CodeableConcept(CodeableConcept), +#[fhir_choice_element(base_name = "value")] +pub enum ContractTermOfferAnswerValue { + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "valueBoolean")] + Boolean(Boolean), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "valueDecimal")] + Decimal(Decimal), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "valueInteger")] + Integer(Integer), + /// Variant accepting the Date type. + #[fhir_serde(rename = "valueDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "valueDateTime")] + DateTime(DateTime), + /// Variant accepting the Time type. + #[fhir_serde(rename = "valueTime")] + Time(Time), + /// Variant accepting the String type. + #[fhir_serde(rename = "valueString")] + String(String), + /// Variant accepting the Uri type. + #[fhir_serde(rename = "valueUri")] + Uri(Uri), + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "valueAttachment")] + Attachment(Attachment), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "valueCoding")] + Coding(Coding), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "valueQuantity")] + Quantity(Quantity), /// Variant accepting the Reference type. - #[fhir_serde(rename = "diagnosisReference")] + #[fhir_serde(rename = "valueReference")] Reference(Reference), } -/// Applicable diagnosis -/// -/// Patient diagnosis for which care is sought. +/// Response to offer text /// -/// ## Requirements -/// Needed to support the evaluation of the eligibility. +/// Response to offer text. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -37969,8 +37784,8 @@ pub enum CoverageEligibilityRequestItemDiagnosisDiagnosis { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "diagnosis")] -pub struct CoverageEligibilityRequestItemDiagnosis { +#[fhir_resource(choice_elements = "value")] +pub struct ContractTermOfferAnswer { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -38051,540 +37866,41 @@ pub struct CoverageEligibilityRequestItemDiagnosis { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Nature of illness or problem - /// - /// The nature of illness or problem in a coded form or as a reference to an - /// external defined Condition. + /// The actual answer response /// - /// ## Requirements - /// Provides health context for the evaluation of the products and/or services. + /// Response to an offer clause or question text, which enables selection of + /// values to be agreed to, e.g., the period of participation, the date of + /// occupancy of a rental, warrently duration, or whether biospecimen may be used + /// for further research. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: ICD10 Diagnostic codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 #[fhir_serde(flatten)] - pub diagnosis: Option, -} - -/// Choice of types for the serviced\[x\] field in CoverageEligibilityRequest -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum CoverageEligibilityRequestServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), + pub value: Option, } -/// FHIR CoverageEligibilityRequest type -/// -/// The CoverageEligibilityRequest provides patient and insurance coverage -/// information to an insurer for them to respond, in the form of an -/// CoverageEligibilityResponse, with information regarding whether the stated -/// coverage is valid and in-force and optionally to provide the insurance -/// details of the policy. +/// Offer Recipient /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// Offer Recipient. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [CoverageEligibilityRequest](http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced")] -pub struct CoverageEligibilityRequest { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct ContractTermOfferParty { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Business Identifier for coverage eligiblity request - /// - /// A unique identifier assigned to this coverage eligiblity request. - /// - /// ## Requirements - /// Allows coverage eligibility requests to be distinguished and referenced. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | cancelled | draft | entered-in-error - /// - /// The status of the resource instance. - /// - /// ## Requirements - /// Need to track the status of the resource as 'draft' resources may undergo - /// further edits while 'active' resources are immutable and may only have their - /// status changed to 'cancelled'. - /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 - pub status: Code, - /// Desired processing priority - /// - /// When the requestor expects the processor to complete processing. - /// - /// ## Requirements - /// Needed to advise the prossesor on the urgency of the request. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The timeliness with which processing is required: STAT, normal, Deferred. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/process-priority - pub priority: Option, - /// auth-requirements | benefits | discovery | validation - /// - /// Code to specify whether requesting: prior authorization requirements for some - /// service categories or billing codes; benefits for coverages specified or - /// discovered; discovery and return of coverages for the patient; and/or - /// validation that the specified coverage is in-force at the date/period - /// specified or 'now' if not specified. - /// - /// ## Requirements - /// To indicate the processing actions requested. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the types of information being requested. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose|4.0.1 - pub purpose: Option>, - /// Intended recipient of products and services - /// - /// The party who is the beneficiary of the supplied coverage and for whom - /// eligibility is sought. - /// - /// ## Requirements - /// Required to provide context and coverage validation. - /// - /// ## Implementation Notes - /// 1..1. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Reference, - /// Estimated date or dates of service - /// - /// The date or dates when the enclosed suite of services were performed or - /// completed. - /// - /// ## Requirements - /// Required to provide time context for the request. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub serviced: Option, - /// Creation date - /// - /// The date when this resource was created. - /// - /// ## Requirements - /// Need to record a timestamp for use by both the recipient and the issuer. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub created: DateTime, - /// Author - /// - /// Person who created the request. - /// - /// ## Requirements - /// Some jurisdictions require the contact information for personnel completing - /// eligibility requests. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub enterer: Option, - /// Party responsible for the request - /// - /// The provider which is responsible for the request. - /// - /// ## Requirements - /// Needed to identify the requestor. - /// - /// ## Implementation Notes - /// Typically this field would be 1..1 where this party is responsible for the - /// eligibility request but not necessarily professionally responsible for the - /// provision of the individual products and services listed below. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option, - /// Coverage issuer - /// - /// The Insurer who issued the coverage in question and is the recipient of the - /// request. - /// - /// ## Requirements - /// Need to identify the recipient. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub insurer: Reference, - /// Servicing facility - /// - /// Facility where the services are intended to be provided. - /// - /// ## Requirements - /// Insurance adjudication can be dependant on where services were delivered. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub facility: Option, - /// Supporting information - /// - /// Additional information codes regarding exceptions, special considerations, - /// the condition, situation, prior or concurrent issues. - /// - /// ## Requirements - /// Typically these information codes are required to support the services - /// rendered or the adjudication of the services rendered. - /// - /// ## Implementation Notes - /// Often there are multiple jurisdiction specific valuesets which are required. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportingInfo")] - pub supporting_info: Option>, - /// Patient insurance information - /// - /// Financial instruments for reimbursement for the health care products and - /// services. - /// - /// ## Requirements - /// There must be at least one coverage for which eligibility is requested. - /// - /// ## Implementation Notes - /// All insurance coverages for the patient which may be applicable for - /// reimbursement, of the products and services listed in the claim, are - /// typically provided in the claim to allow insurers to confirm the ordering of - /// the insurance coverages relative to local 'coordination of benefit' rules. - /// One coverage (and only one) with 'focal=true' is to be used in the - /// adjudication of this claim. Coverages appearing before the focal Coverage in - /// the list, and where 'subrogation=false', should provide a reference to the - /// ClaimResponse containing the adjudication results of the prior claim. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub insurance: Option>, - /// Item to be evaluated for eligibiity - /// - /// Service categories or billable services for which benefit details and/or an - /// authorization prior to service delivery may be required by the payor. - /// - /// ## Requirements - /// The items to be processed for the request. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub item: Option>, -} - -/// Supporting information -/// -/// Additional information codes regarding exceptions, special considerations, -/// the condition, situation, prior or concurrent issues. -/// -/// ## Requirements -/// Typically these information codes are required to support the services -/// rendered or the adjudication of the services rendered. -/// -/// ## Implementation Notes -/// Often there are multiple jurisdiction specific valuesets which are required. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityRequestSupportingInfo { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic /// definition of the element. To make the use of extensions safe and manageable, @@ -38657,63 +37973,59 @@ pub struct CoverageEligibilityRequestSupportingInfo { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Information instance identifier - /// - /// A number to uniquely identify supporting information entries. + /// Referenced entity /// - /// ## Requirements - /// Necessary to maintain the order of the supporting information items and - /// provide a mechanism to link to claim details. + /// Participant in the offer. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Data to be provided - /// - /// Additional data or information such as resources, documents, images etc. - /// including references to the data or the actual inclusion of the data. - /// - /// ## Requirements - /// To convey the data content to be provided when the information is more than a - /// simple code or period. + pub reference: Option>, + /// Participant engagement type /// - /// ## Implementation Notes - /// Could be used to provide references to other resources, document. For example - /// could contain a PDF in an Attachment of the Police Report for an Accident. + /// How the party participates in the offer. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub information: Reference, - /// Applies to all items - /// - /// The supporting materials are applicable for all detail items, product/servce - /// categories and specific billing codes. - /// - /// ## Requirements - /// Needed to convey that the information is universal to the request. /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "appliesToAll")] - pub applies_to_all: Option, + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for offer participant roles. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-party-role + pub role: CodeableConcept, } -/// Item to be evaluated for eligibiity +/// Protection for the Term /// -/// Service categories or billable services for which benefit details and/or an -/// authorization prior to service delivery may be required by the payor. +/// Security labels that protect the handling of information about the term and +/// its elements, which may be specifically identified.. /// /// ## Requirements -/// The items to be processed for the request. +/// Requirement - Within a Contract, a security label may apply to the one to +/// many nested group of terms or to a term, whether inside a group or a +/// singleton. This security label protects the term and its contained provision +/// elements. The security label on the entire set of term provision elements may +/// be different from the security labels on a contained offer, asset, +/// valuedItem, or data such as sensitive information, and must be the high water +/// mark of all security labels within the term. Rationale is that a labelled +/// term, which may be disaggregated from the Contract, and must persist the +/// label on the term and on contained elements within other contexts. +/// Requirement - If more than one policy dictates a level of confidentiality of +/// the term, then each applicable policy may be represented by a security label +/// specific to its requirements. +/// Comment - A Security Label is comprised of 1..1 confidentiality code and 0..* +/// other security label codes (aka "privacy tags"). A Security Label is metadata +/// assigned (aka 'tagged') to Resources and Resource elements, which specify the +/// confidentiality and sensitivity of the Resource or element and their related +/// attributes, the purposes for which tagged items may be collected, access, +/// used or disclosed, any limitation on the type of entities authorized to +/// engage in permitted purposes, and handling instructions that obligate or +/// prohibit certain actions on the tagged items. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -38721,7 +38033,7 @@ pub struct CoverageEligibilityRequestSupportingInfo { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityRequestItem { +pub struct ContractTermSecurityLabel { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -38802,34 +38114,23 @@ pub struct CoverageEligibilityRequestItem { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Applicable exception or supporting information - /// - /// Exceptions, special conditions and supporting information applicable for this - /// service or product line. + /// Link to Security Labels /// - /// ## Requirements - /// Needed to support or inform the consideration for eligibility. + /// Number used to link this term or term element to the applicable Security + /// Label. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportingInfoSequence")] - pub supporting_info_sequence: Option>, - /// Benefit classification - /// - /// Code to identify the general type of benefits under which products and - /// services are provided. - /// - /// ## Requirements - /// Needed to convey the category of service or product for which eligibility is - /// sought. + pub number: Option>, + /// Confidentiality Protection /// - /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// Security label privacy tag that species the level of confidentiality + /// protection required for this term and/or term elements. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -38837,22 +38138,15 @@ pub struct CoverageEligibilityRequestItem { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// This contains the product, service, drug or other billing code for the item. - /// - /// ## Requirements - /// Needed to convey the actual service or product for which eligibility is - /// sought. + /// - **Description**: Codes for confidentiality protection. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-classification + pub classification: Coding, + /// Applicable Policy /// - /// ## Implementation Notes - /// Code to indicate the Professional Service or Product supplied (e.g. CTP, - /// HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). + /// Security label privacy tag that species the applicable privacy and security + /// policies governing this term and/or term elements. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -38860,22 +38154,13 @@ pub struct CoverageEligibilityRequestItem { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - #[fhir_serde(rename = "productOrService")] - pub product_or_service: Option, - /// Product or service billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support provision of the item or to charge an elevated fee. + /// - **Description**: Codes for policy category. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-category + pub category: Option>, + /// Handling Instructions /// - /// ## Implementation Notes - /// For example in Oral whether the treatment is cosmetic or associated with TMJ, - /// or for Medical whether the treatment was outside the clinic or out of office - /// hours. + /// Security label privacy tag that species the manner in which term and/or term + /// elements are to be protected. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -38885,117 +38170,28 @@ pub struct CoverageEligibilityRequestItem { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Perfoming practitioner - /// - /// The practitioner who is responsible for the product or service to be rendered - /// to the patient. - /// - /// ## Requirements - /// Needed to support the evaluation of the eligibility. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option, - /// Count of products or services - /// - /// The number of repetitions of a service or product. - /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// The amount charged to the patient by the provider for a single unit. - /// - /// ## Requirements - /// Needed to support the evaluation of the eligibility. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Servicing facility - /// - /// Facility where the services will be provided. - /// - /// ## Requirements - /// Needed to support the evaluation of the eligibility. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub facility: Option, - /// Applicable diagnosis - /// - /// Patient diagnosis for which care is sought. - /// - /// ## Requirements - /// Needed to support the evaluation of the eligibility. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub diagnosis: Option>, - /// Product or service details - /// - /// The plan/proposal/order describing the proposed service in detail. - /// - /// ## Requirements - /// Needed to provide complex service proposal such as a Device or a plan. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, + /// - **Description**: Codes for handling instructions. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contract-security-control + pub control: Option>, } -/// Patient insurance information +/// FHIR Contributor type /// -/// Financial instruments for reimbursement for the health care products and -/// services. +/// Base StructureDefinition for Contributor Type: A contributor to the content +/// of a knowledge asset, including authors, editors, reviewers, and endorsers. /// -/// ## Requirements -/// There must be at least one coverage for which eligibility is requested. +/// ## Purpose +/// Need to track contributor information in the same way across multiple resources. /// -/// ## Implementation Notes -/// All insurance coverages for the patient which may be applicable for -/// reimbursement, of the products and services listed in the claim, are -/// typically provided in the claim to allow insurers to confirm the ordering of -/// the insurance coverages relative to local 'coordination of benefit' rules. -/// One coverage (and only one) with 'focal=true' is to be used in the -/// adjudication of this claim. Coverages appearing before the focal Coverage in -/// the list, and where 'subrogation=false', should provide a reference to the -/// ClaimResponse containing the adjudication results of the prior claim. +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [Contributor](http://hl7.org/fhir/StructureDefinition/Contributor) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityRequestInsurance { +pub struct Contributor { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -39029,136 +38225,73 @@ pub struct CoverageEligibilityRequestInsurance { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// author | editor | reviewer | endorser /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The type of contributor. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Applicable coverage - /// - /// A flag to indicate that this Coverage is to be used for evaluation of this - /// request when set to true. - /// - /// ## Requirements - /// To identify which coverage in the list is being used to evaluate this - /// request. - /// - /// ## Implementation Notes - /// A patient may (will) have multiple insurance policies which provide - /// reimburement for healthcare services and products. For example a person may - /// also be covered by their spouse's policy and both appear in the list (and may - /// be from the same insurer). This flag will be set to true for only one of the - /// listed policies and that policy will be used for evaluating this request. - /// Other requests would be created to request evaluation against the other - /// listed policies. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub focal: Option, - /// Insurance information /// - /// Reference to the insurance card level information contained in the Coverage - /// resource. The coverage issuing insurer will use these details to locate the - /// patient's actual coverage within the insurer's information system. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The type of contributor. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/contributor-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// Who contributed the content /// - /// ## Requirements - /// Required to allow the adjudicator to locate the correct policy and history - /// within their information system. + /// The name of the individual or organization responsible for the contribution. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Reference, - /// Additional provider contract number + pub name: String, + /// Contact details of the contributor /// - /// A business agreement number established between the provider and the insurer - /// for special business processing purposes. + /// Contact details to assist a user in finding and communicating with the + /// contributor. /// - /// ## Requirements - /// Providers may have multiple business arrangements with a given insurer and - /// must supply the specific contract number for adjudication. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "businessArrangement")] - pub business_arrangement: Option, + pub contact: Option>, } -/// Patient insurance information +/// FHIR Count type /// -/// Financial instruments for reimbursement for the health care products and -/// services. +/// Base StructureDefinition for Count Type: A measured amount (or an amount that +/// can potentially be measured). Note that measured amounts include amounts that +/// are not precisely quantified, including amounts involving arbitrary units and +/// floating currencies. /// -/// ## Requirements -/// There must be at least one coverage for which eligibility is requested. +/// ## Purpose +/// Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD. /// -/// ## Implementation Notes -/// All insurance coverages for the patient which may be applicable for -/// reimbursement, of the products and services listed in the claim, are -/// typically provided in the claim to allow insurers to confirm the ordering of -/// the insurance coverages relative to local 'coordination of benefit' rules. -/// One coverage (and only one) with 'focal=true' is to be used in the -/// adjudication of this claim. Coverages appearing before the focal Coverage in -/// the list, and where 'subrogation=false', should provide a reference to the -/// ClaimResponse containing the adjudication results of the prior claim. +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Quantity /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [Count](http://hl7.org/fhir/StructureDefinition/Count) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityResponseInsurance { +pub struct Count { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -39192,132 +38325,121 @@ pub struct CoverageEligibilityResponseInsurance { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Numerical value (with implicit precision) /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The value of the measured amount. The value includes an implicit precision in + /// the presentation of the value. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Precision is handled implicitly in almost all cases of measurement. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The implicit precision in the value should always be honored. Monetary values + /// have their own rules for handling precision (refer to standard accounting + /// text books). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Insurance information + pub value: Option, + /// < | \<= | \>= | > - how to understand the value /// - /// Reference to the insurance card level information contained in the Coverage - /// resource. The coverage issuing insurer will use these details to locate the - /// patient's actual coverage within the insurer's information system. + /// How the value should be understood and represented - whether the actual value + /// is greater or less than the stated value due to measurement issues; e.g. if + /// the comparator is "<" , then the real value is < stated value. /// /// ## Requirements - /// Required to allow the adjudicator to locate the correct policy and history - /// within their information system. + /// Need a framework for handling measures where the value is <5ug/L or >400mg/L + /// due to the limitations of measuring methodology. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value /// - Included in summary + /// - When missing: If there is no comparator, then there is no modification of the value /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Reference, - /// Coverage inforce indicator /// - /// Flag indicating if the coverage provided is inforce currently if no service - /// date(s) specified or for the whole duration of the service dates. + /// ## Binding + /// - **Strength**: required + /// - **Description**: How the Quantity should be understood and represented. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 + pub comparator: Option, + /// Unit representation + /// + /// A human-readable form of the unit. /// /// ## Requirements - /// Needed to convey the answer to the eligibility validation request. + /// There are many representations for units of measure and in many contexts, + /// particular representations are fixed and required. I.e. mcg for micrograms. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub inforce: Option, - /// When the benefits are applicable + pub unit: Option, + /// System that defines coded unit form /// - /// The term of the benefits documented in this response. + /// The identification of the system that provides the coded form of the unit. /// /// ## Requirements - /// Needed as coverages may be multi-year while benefits tend to be annual - /// therefore a separate expression of the benefit period is needed. + /// Need to know the system that defines the coded form of the unit. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "benefitPeriod")] - pub benefit_period: Option, - /// Benefits and authorization details /// - /// Benefits and optionally current balances, and authorization details by - /// category or service. + /// ## Conditions + /// Used when: qty-3 + pub system: Option, + /// Coded form of the unit /// - /// ## Cardinality: Optional, Multiple (0..*) + /// A computer processable form of the unit in some unit representation system. + /// + /// ## Requirements + /// Need a computable form of the unit that is fixed across all forms. UCUM + /// provides this for quantities, but SNOMED CT provides many units of interest. + /// + /// ## Implementation Notes + /// The preferred system is UCUM, but SNOMED CT can also be used (for customary + /// units) or ISO 4217 for currency. The context of use may additionally require + /// a code from a particular system. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints - /// - **ces-1**: SHALL contain a category or a billcode but not both. (error) - /// Expression: `category.exists() xor productOrService.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub item: Option>, -} - -/// Choice of types for the serviced\[x\] field in CoverageEligibilityResponse -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum CoverageEligibilityResponseServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), + pub code: Option, } -/// FHIR CoverageEligibilityResponse type +/// FHIR Coverage type /// -/// This resource provides eligibility and plan details from the processing of an -/// CoverageEligibilityRequest resource. +/// Financial instrument which may be used to reimburse or pay for health care +/// products and services. Includes both insurance and self-payment. +/// +/// ## Purpose +/// Coverage provides a link between covered parties (patients) and the payors of their healthcare costs (both insurance and self-pay). /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -39325,10 +38447,9 @@ pub enum CoverageEligibilityResponseServiced { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [CoverageEligibilityResponse](http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse) +/// See: [Coverage](http://hl7.org/fhir/StructureDefinition/Coverage) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced")] -pub struct CoverageEligibilityResponse { +pub struct Coverage { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -39528,15 +38649,24 @@ pub struct CoverageEligibilityResponse { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business Identifier for coverage eligiblity request + /// Business Identifier for the coverage /// - /// A unique identifier assigned to this coverage eligiblity request. + /// A unique identifier assigned to this coverage. /// /// ## Requirements - /// Allows coverage eligibility requests to be distinguished and referenced. + /// Allows coverages to be distinguished and referenced. + /// + /// ## Implementation Notes + /// The main (and possibly only) identifier for the coverage - often referred to + /// as a Member Id, Certificate number, Personal Health Number or Case ID. May be + /// constructed as the concatenation of the Coverage.SubscriberID and the + /// Coverage.dependant. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` @@ -39551,13 +38681,13 @@ pub struct CoverageEligibilityResponse { /// status changed to 'cancelled'. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. + /// This element is labeled as a modifier because the status contains the code + /// entered-in-error that marks the coverage as not currently valid. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -39569,18 +38699,16 @@ pub struct CoverageEligibilityResponse { /// - **Description**: A code specifying the state of the resource instance. /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 pub status: Code, - /// auth-requirements | benefits | discovery | validation + /// Coverage category such as medical or accident /// - /// Code to specify whether requesting: prior authorization requirements for some - /// service categories or billing codes; benefits for coverages specified or - /// discovered; discovery and return of coverages for the patient; and/or - /// validation that the specified coverage is in-force at the date/period - /// specified or 'now' if not specified. + /// The type of coverage: social program, medical plan, accident coverage + /// (workers compensation, auto), group health or payment by an individual or + /// organization. /// /// ## Requirements - /// To indicate the processing actions requested. + /// The order of application of coverages is dependent on the types of coverage. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -39590,103 +38718,45 @@ pub struct CoverageEligibilityResponse { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the types of information being requested. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose|4.0.1 - pub purpose: Option>, - /// Intended recipient of products and services - /// - /// The party who is the beneficiary of the supplied coverage and for whom - /// eligibility is sought. - /// - /// ## Requirements - /// Required to provide context and coverage validation. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Reference, - /// Estimated date or dates of service - /// - /// The date or dates when the enclosed suite of services were performed or - /// completed. - /// - /// ## Requirements - /// Required to provide time context for the request. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub serviced: Option, - /// Response creation date + /// - **Strength**: preferred + /// - **Description**: The type of insurance: public health, worker compensation; private accident, auto, private health, etc.) or a direct payment by an individual or organization. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Owner of the policy /// - /// The date this resource was created. + /// The party who 'owns' the insurance policy. /// /// ## Requirements - /// Need to record a timestamp for use by both the recipient and the issuer. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub created: DateTime, - /// Party responsible for the request - /// - /// The provider which is responsible for the request. + /// This provides employer information in the case of Worker's Compensation and + /// other policies. /// /// ## Implementation Notes - /// Typically this field would be 1..1 where this party is responsible for the - /// claim but not necessarily professionally responsible for the provision of the - /// individual products and services listed below. + /// For example: may be an individual, corporation or the subscriber's employer. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub requestor: Option, - /// Eligibility request reference - /// - /// Reference to the original request resource. - /// - /// ## Requirements - /// Needed to allow the response to be linked to the request. - /// - /// ## Cardinality: Required (1..1) - /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub request: Reference, - /// queued | complete | error | partial + #[fhir_serde(rename = "policyHolder")] + pub policy_holder: Option, + /// Subscriber to the policy /// - /// The outcome of the request processing. + /// The party who has signed-up for or 'owns' the contractual relationship to the + /// policy or to whom the benefit of the policy for services rendered to them or + /// their family is due. /// /// ## Requirements - /// To advise the requestor of an overall processing outcome. + /// This is the party who is entitled to the benfits under the policy. /// /// ## Implementation Notes - /// The resource may be used to indicate that: the request has been held (queued) - /// for processing; that it has been processed and errors found (error); that no - /// errors were found and that some of the adjudication has been undertaken - /// (partial) or that all of the adjudication has been undertaken (complete). + /// May be self or a parent in the case of dependants. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -39694,32 +38764,33 @@ pub struct CoverageEligibilityResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub subscriber: Option, + /// ID assigned to the subscriber /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The outcome of the processing. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 - pub outcome: Code, - /// Disposition Message - /// - /// A human readable description of the status of the adjudication. + /// The insurer assigned ID for the Subscriber. /// /// ## Requirements - /// Provided for user display. + /// The insurer requires this identifier on correspondance and claims (digital + /// and otherwise). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub disposition: Option, - /// Coverage issuer + #[fhir_serde(rename = "subscriberId")] + pub subscriber_id: Option, + /// Plan beneficiary /// - /// The Insurer who issued the coverage in question and is the author of the - /// response. + /// The party who benefits from the insurance coverage; the patient when products + /// and/or services are provided. /// /// ## Requirements - /// Need to identify the author. + /// This is the party who receives treatment for which the costs are reimbursed + /// under the coverage. /// /// ## Cardinality: Required (1..1) /// @@ -39729,56 +38800,39 @@ pub struct CoverageEligibilityResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub insurer: Reference, - /// Patient insurance information + pub beneficiary: Reference, + /// Dependent number /// - /// Financial instruments for reimbursement for the health care products and - /// services. + /// A unique identifier for a dependent under the coverage. /// /// ## Requirements - /// There must be at least one coverage for which eligibility is requested. + /// For some coverages a single identifier is issued to the Subscriber and then a + /// unique dependent number is issued to each beneficiary. /// /// ## Implementation Notes - /// All insurance coverages for the patient which may be applicable for - /// reimbursement, of the products and services listed in the claim, are - /// typically provided in the claim to allow insurers to confirm the ordering of - /// the insurance coverages relative to local 'coordination of benefit' rules. - /// One coverage (and only one) with 'focal=true' is to be used in the - /// adjudication of this claim. Coverages appearing before the focal Coverage in - /// the list, and where 'subrogation=false', should provide a reference to the - /// ClaimResponse containing the adjudication results of the prior claim. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub insurance: Option>, - /// Preauthorization reference - /// - /// A reference from the Insurer to which these services pertain to be used on - /// further communication and as proof that the request occurred. - /// - /// ## Requirements - /// To provide any preauthorization reference for provider use. + /// Periodically the member number is constructed from the subscriberId and the + /// dependant number. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAuthRef")] - pub pre_auth_ref: Option, - /// Printed form identifier + pub dependent: Option, + /// Beneficiary relationship to the subscriber /// - /// A code for the form to be used for printing the content. + /// The relationship of beneficiary (patient) to the subscriber. /// /// ## Requirements - /// Needed to specify the specific form used for producing output for this - /// response. + /// To determine relationship between the patient and the subscriber to determine + /// coordination of benefits. /// /// ## Implementation Notes - /// May be needed to identify specific jurisdictional forms. + /// Typically, an individual uses policies which are theirs (relationship='self') + /// before policies owned by others. /// /// ## Cardinality: Optional (0..1) /// @@ -39787,406 +38841,175 @@ pub struct CoverageEligibilityResponse { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: The forms codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/forms - pub form: Option, - /// Processing errors + /// - **Strength**: extensible + /// - **Description**: The relationship between the Subscriber and the Beneficiary (insured/covered party/patient). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/subscriber-relationship + pub relationship: Option, + /// Coverage start and end dates /// - /// Errors encountered during the processing of the request. + /// Time period during which the coverage is in force. A missing start date + /// indicates the start date isn't known, a missing end date means the coverage + /// is continuing to be in force. /// /// ## Requirements - /// Need to communicate processing issues to the requestor. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub error: Option>, -} - -/// Benefits and authorization details -/// -/// Benefits and optionally current balances, and authorization details by -/// category or service. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ces-1**: SHALL contain a category or a billcode but not both. (error) -/// Expression: `category.exists() xor productOrService.exists()` -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityResponseInsuranceItem { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// Some insurers require the submission of the coverage term. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Benefit classification + pub period: Option, + /// Issuer of the policy /// - /// Code to identify the general type of benefits under which products and - /// services are provided. + /// The program or plan underwriter or payor including both insurance and + /// non-insurance agreements, such as patient-pay agreements. /// /// ## Requirements - /// Needed to convey the category of service or product for which eligibility is - /// sought. + /// Need to identify the issuer to target for claim processing and for + /// coordination of benefit processing. /// /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// This contains the product, service, drug or other billing code for the item. - /// - /// ## Requirements - /// Needed to convey the actual service or product for which eligibility is - /// sought. + /// May provide multiple identifiers such as insurance company identifier or + /// business identifier (BIN number). + /// For selfpay it may provide multiple paying persons and/or organizations. /// - /// ## Implementation Notes - /// Code to indicate the Professional Service or Product supplied (e.g. CTP, - /// HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). + /// ## Cardinality: Required, Multiple (1..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub payor: Option>, + /// Additional coverage classifications /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: Option, - /// Product or service billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. + /// A suite of underwriter specific classifiers. /// /// ## Requirements - /// To support provision of the item or to charge an elevated fee. + /// The codes provided on the health card which identify or confirm the specific + /// policy for the insurer. /// /// ## Implementation Notes - /// For example in Oral whether the treatment is cosmetic or associated with TMJ, - /// or for Medical whether the treatment was outside the clinic or out of office - /// hours. + /// For example may be used to identify a class of coverage or employer group, + /// Policy, Plan. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub class: Option>, + /// Relative order of the coverage /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Performing practitioner - /// - /// The practitioner who is eligible for the provision of the product or service. + /// The order of applicability of this coverage relative to other coverages which + /// are currently in force. Note, there may be gaps in the numbering and this + /// does not imply primary, secondary etc. as the specific positioning of + /// coverages depends upon the episode of care. /// /// ## Requirements - /// Needed to convey the eligible provider. + /// Used in managing the coordination of benefits. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option, - /// Excluded from the plan - /// - /// True if the indicated class of service is excluded from the plan, missing or - /// False indicates the product or service is included in the coverage. - /// - /// ## Requirements - /// Needed to identify items that are specifically excluded from the coverage. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub excluded: Option, - /// Short name for the benefit + pub order: Option, + /// Insurer network /// - /// A short name or tag for the benefit. + /// The insurer-specific identifier for the insurer-defined network of providers + /// to which the beneficiary may seek treatment which will be covered at the + /// 'in-network' rate, otherwise 'out of network' terms and conditions apply. /// /// ## Requirements - /// Required to align with other plan names. - /// - /// ## Implementation Notes - /// For example: MED01, or DENT2. + /// Used in referral for treatment and in claims processing. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Description of the benefit or services covered - /// - /// A richer description of the benefit or services covered. - /// - /// ## Requirements - /// Needed for human readable reference. - /// - /// ## Implementation Notes - /// For example 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, - /// Implants and Cosmetic services'. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// In or out of network + pub network: Option, + /// Patient payments for services/products /// - /// Is a flag to indicate whether the benefits refer to in-network providers or - /// out-of-network providers. + /// A suite of codes indicating the cost category and associated amount which + /// have been detailed in the policy and may have been included on the health + /// card. /// /// ## Requirements - /// Needed as in or out of network providers are treated differently under the - /// coverage. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Code to classify in or out of network services. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-network - pub network: Option, - /// Individual or family - /// - /// Indicates if the benefits apply to an individual or to the family. + /// Required by providers to manage financial transaction with the patient. /// - /// ## Requirements - /// Needed for the understanding of the benefits. + /// ## Implementation Notes + /// For example by knowing the patient visit co-pay, the provider can collect the + /// amount prior to undertaking treatment. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Unit covered/serviced - individual or family. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-unit - pub unit: Option, - /// Annual or lifetime + /// ## Aliases + /// CoPay, Deductible, Exceptions + #[fhir_serde(rename = "costToBeneficiary")] + pub cost_to_beneficiary: Option>, + /// Reimbursement to insurer /// - /// The term or period of the values such as 'maximum lifetime benefit' or - /// 'maximum annual visits'. + /// When 'subrogation=true' this insurance instance has been included not for + /// adjudication but to provide insurers with the details to recover costs. /// /// ## Requirements - /// Needed for the understanding of the benefits. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Coverage unit - annual, lifetime. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-term - pub term: Option, - /// Benefit Summary - /// - /// Benefits used to date. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub benefit: Option>, - /// Authorization required flag - /// - /// A boolean flag indicating whether a preauthorization is required prior to - /// actual service delivery. + /// See definition for when to be used. /// - /// ## Requirements - /// Needed to convey that preauthorization is required. + /// ## Implementation Notes + /// Typically, automotive and worker's compensation policies would be flagged + /// with 'subrogation=true' to enable healthcare payors to collect against + /// accident claims. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "authorizationRequired")] - pub authorization_required: Option, - /// Type of required supporting materials + pub subrogation: Option, + /// Contract details /// - /// Codes or comments regarding information or actions associated with the - /// preauthorization. + /// The policy(s) which constitute this insurance coverage. /// /// ## Requirements - /// Needed to inform the provider of collateral materials or actions needed for - /// preauthorization. + /// To reference the legally binding contract between the policy holder and the + /// insurer. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Type of supporting information to provide with a preauthorization. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverageeligibilityresponse-ex-auth-support - #[fhir_serde(rename = "authorizationSupporting")] - pub authorization_supporting: Option>, - /// Preauthorization requirements endpoint - /// - /// A web location for obtaining requirements or descriptive information - /// regarding the preauthorization. - /// - /// ## Requirements - /// Needed to enable insurers to advise providers of informative information. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "authorizationUrl")] - pub authorization_url: Option, -} - -/// Choice of types for the allowed\[x\] field in CoverageEligibilityResponseInsuranceItemBenefit -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "allowed")] -pub enum CoverageEligibilityResponseInsuranceItemBenefitAllowed { - /// Variant accepting the UnsignedInt type. - #[fhir_serde(rename = "allowedUnsignedInt")] - UnsignedInt(UnsignedInt), - /// Variant accepting the String type. - #[fhir_serde(rename = "allowedString")] - String(String), - /// Variant accepting the Money type. - #[fhir_serde(rename = "allowedMoney")] - Money(Money), -} - -/// Choice of types for the used\[x\] field in CoverageEligibilityResponseInsuranceItemBenefit -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "used")] -pub enum CoverageEligibilityResponseInsuranceItemBenefitUsed { - /// Variant accepting the UnsignedInt type. - #[fhir_serde(rename = "usedUnsignedInt")] - UnsignedInt(UnsignedInt), - /// Variant accepting the String type. - #[fhir_serde(rename = "usedString")] - String(String), - /// Variant accepting the Money type. - #[fhir_serde(rename = "usedMoney")] - Money(Money), + pub contract: Option>, } -/// Benefit Summary +/// Additional coverage classifications /// -/// Benefits used to date. +/// A suite of underwriter specific classifiers. +/// +/// ## Requirements +/// The codes provided on the health card which identify or confirm the specific +/// policy for the insurer. +/// +/// ## Implementation Notes +/// For example may be used to identify a class of coverage or employer group, +/// Policy, Plan. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -40194,8 +39017,7 @@ pub enum CoverageEligibilityResponseInsuranceItemBenefitUsed { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "allowed,used")] -pub struct CoverageEligibilityResponseInsuranceItemBenefit { +pub struct CoverageClass { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -40276,72 +39098,104 @@ pub struct CoverageEligibilityResponseInsuranceItemBenefit { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Benefit classification + /// Type of class such as 'group' or 'plan' /// - /// Classification of benefit being provided. + /// The type of classification for which an insurer-specific class label or + /// number and optional name is provided, for example may be used to identify a + /// class of coverage or employer group, Policy, Plan. /// /// ## Requirements - /// Needed to convey the nature of the benefit. - /// - /// ## Implementation Notes - /// For example: deductible, visits, benefit amount. + /// The insurer issued label for a specific health card value. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Deductable, visits, co-pay, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-type + /// - **Strength**: extensible + /// - **Description**: The policy classifications, eg. Group, Plan, Class, etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-class #[fhir_serde(rename = "type")] pub r#type: CodeableConcept, - /// Benefits allowed + /// Value associated with the type /// - /// The quantity of the benefit which is permitted under the coverage. + /// The alphanumeric string value associated with the insurer issued label. /// /// ## Requirements - /// Needed to convey the benefits offered under the coverage. + /// The insurer issued label and value are necessary to identify the specific + /// policy. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// For example, the Group or Plan number. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub allowed: Option, - /// Benefits used + pub value: String, + /// Human readable description of the type and value /// - /// The quantity of the benefit which have been consumed to date. + /// A short description for the class. /// /// ## Requirements - /// Needed to convey the benefits consumed to date. + /// Used to provide a meaningful description in correspondence to the patient. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub used: Option, + pub name: Option, } -/// Processing errors +/// Choice of types for the value\[x\] field in CoverageCostToBeneficiary +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "value")] +pub enum CoverageCostToBeneficiaryValue { + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "valueQuantity")] + Quantity(Quantity), + /// Variant accepting the Money type. + #[fhir_serde(rename = "valueMoney")] + Money(Money), +} + +/// Patient payments for services/products /// -/// Errors encountered during the processing of the request. +/// A suite of codes indicating the cost category and associated amount which +/// have been detailed in the policy and may have been included on the health +/// card. /// /// ## Requirements -/// Need to communicate processing issues to the requestor. +/// Required by providers to manage financial transaction with the patient. +/// +/// ## Implementation Notes +/// For example by knowing the patient visit co-pay, the provider can collect the +/// amount prior to undertaking treatment. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Aliases +/// CoPay, Deductible, Exceptions #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct CoverageEligibilityResponseError { +#[fhir_resource(choice_elements = "value")] +pub struct CoverageCostToBeneficiary { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -40422,33 +39276,75 @@ pub struct CoverageEligibilityResponseError { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Error code detailing processing issues + /// Cost category /// - /// An error code,from a specified code system, which details why the eligibility - /// check could not be performed. + /// The category of patient centric costs associated with treatment. /// /// ## Requirements - /// Required to convey processing errors. + /// Needed to identify the category associated with the amount for the patient. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// For example visit, specialist visits, emergency, inpatient care, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: The error codes for adjudication processing. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-error - pub code: CodeableConcept, + /// - **Strength**: extensible + /// - **Description**: The types of services to which patient copayments are specified. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-copay-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// The amount or percentage due from the beneficiary + /// + /// The amount due from the patient for the cost category. + /// + /// ## Requirements + /// Needed to identify the amount for the patient associated with the category. + /// + /// ## Implementation Notes + /// Amount may be expressed as a percentage of the service/product cost or a + /// fixed amount of currency. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub value: Option, + /// Exceptions for patient payments + /// + /// A suite of codes indicating exceptions or reductions to patient costs and + /// their effective periods. + /// + /// ## Requirements + /// Required by providers to manage financial transaction with the patient. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub exception: Option>, } -/// Step taken to address +/// Exceptions for patient payments /// -/// Indicates an action that has been taken or is committed to reduce or -/// eliminate the likelihood of the risk identified by the detected issue from -/// manifesting. Can also reflect an observation of known mitigating factors that -/// may reduce/eliminate the need for any action. +/// A suite of codes indicating exceptions or reductions to patient costs and +/// their effective periods. +/// +/// ## Requirements +/// Required by providers to manage financial transaction with the patient. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -40456,7 +39352,7 @@ pub struct CoverageEligibilityResponseError { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DetectedIssueMitigation { +pub struct CoverageCostToBeneficiaryException { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -40537,70 +39433,66 @@ pub struct DetectedIssueMitigation { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// What mitigation? + /// Exception category /// - /// Describes the action that was taken or the observation that was made that - /// reduces/eliminates the risk associated with the identified issue. + /// The code for the specific exception. /// - /// ## Implementation Notes - /// The "text" component can be used for detail or when no appropriate code - /// exists. + /// ## Requirements + /// Needed to identify the exception associated with the amount for the patient. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Codes describing steps taken to resolve the issue or other circumstances that mitigate the risk associated with the issue; e.g. 'added concurrent therapy', 'prior therapy documented', etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action - pub action: CodeableConcept, - /// Date committed + /// - **Strength**: example + /// - **Description**: The types of exceptions from the part or full value of financial obligations such as copays. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverage-financial-exception + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// The effective period of the exception /// - /// Indicates when the mitigating action was documented. + /// The timeframe during when the exception is in force. /// - /// ## Implementation Notes - /// This might not be the same as when the mitigating step was actually taken. + /// ## Requirements + /// Needed to identify the applicable timeframe for the exception for the correct + /// calculation of patient costs. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// Who is committing? - /// - /// Identifies the practitioner who determined the mitigation and takes - /// responsibility for the mitigation step occurring. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option, + pub period: Option, } -/// Choice of types for the identified\[x\] field in DetectedIssue +/// Choice of types for the serviced\[x\] field in CoverageEligibilityRequest #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "identified")] -pub enum DetectedIssueIdentified { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "identifiedDateTime")] - DateTime(DateTime), +#[fhir_choice_element(base_name = "serviced")] +pub enum CoverageEligibilityRequestServiced { + /// Variant accepting the Date type. + #[fhir_serde(rename = "servicedDate")] + Date(Date), /// Variant accepting the Period type. - #[fhir_serde(rename = "identifiedPeriod")] + #[fhir_serde(rename = "servicedPeriod")] Period(Period), } -/// FHIR DetectedIssue type +/// FHIR CoverageEligibilityRequest type /// -/// Indicates an actual or potential clinical issue with or between one or more -/// active or proposed clinical actions for a patient; e.g. Drug-drug -/// interaction, Ineffective treatment frequency, Procedure-condition conflict, -/// etc. +/// The CoverageEligibilityRequest provides patient and insurance coverage +/// information to an insurer for them to respond, in the form of an +/// CoverageEligibilityResponse, with information regarding whether the stated +/// coverage is valid and in-force and optionally to provide the insurance +/// details of the policy. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -40608,10 +39500,10 @@ pub enum DetectedIssueIdentified { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [DetectedIssue](http://hl7.org/fhir/StructureDefinition/DetectedIssue) +/// See: [CoverageEligibilityRequest](http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "identified")] -pub struct DetectedIssue { +#[fhir_resource(choice_elements = "serviced")] +pub struct CoverageEligibilityRequest { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -40811,30 +39703,31 @@ pub struct DetectedIssue { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Unique id for the detected issue + /// Business Identifier for coverage eligiblity request /// - /// Business identifier associated with the detected issue record. + /// A unique identifier assigned to this coverage eligiblity request. /// /// ## Requirements - /// Allows linking instances of the same detected issue found on different - /// servers. + /// Allows coverage eligibility requests to be distinguished and referenced. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// registered | preliminary | final | amended + + /// active | cancelled | draft | entered-in-error /// - /// Indicates the status of the detected issue. + /// The status of the resource instance. + /// + /// ## Requirements + /// Need to track the status of the resource as 'draft' resources may undergo + /// further edits while 'active' resources are immutable and may only have their + /// status changed to 'cancelled'. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the codes - /// cancelled and entered-in-error that mark the issue as not currently valid. + /// This element is labeled as a modifier because the status contains codes that + /// mark the resource as not currently valid. /// /// ## Cardinality: Required (1..1) /// @@ -40848,39 +39741,39 @@ pub struct DetectedIssue { /// /// ## Binding /// - **Strength**: required - /// - **Description**: Indicates the status of the identified issue. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/observation-status|4.0.1 - /// - /// ## Aliases - /// status + /// - **Description**: A code specifying the state of the resource instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 pub status: Code, - /// Issue Category, e.g. drug-drug, duplicate therapy, etc. + /// Desired processing priority /// - /// Identifies the general type of issue identified. + /// When the requestor expects the processor to complete processing. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Needed to advise the prossesor on the urgency of the request. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Codes identifying the general type of detected issue; e.g. Drug-drug interaction, Timing issue, Duplicate therapy, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-category + /// - **Strength**: example + /// - **Description**: The timeliness with which processing is required: STAT, normal, Deferred. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/process-priority + pub priority: Option, + /// auth-requirements | benefits | discovery | validation /// - /// ## Aliases - /// type - pub code: Option, - /// high | moderate | low + /// Code to specify whether requesting: prior authorization requirements for some + /// service categories or billing codes; benefits for coverages specified or + /// discovered; discovery and return of coverages for the patient; and/or + /// validation that the specified coverage is in-force at the date/period + /// specified or 'now' if not specified. /// - /// Indicates the degree of importance associated with the identified issue based - /// on the potential impact on the patient. + /// ## Requirements + /// To indicate the processing actions requested. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Special Semantics /// - Included in summary @@ -40891,21 +39784,21 @@ pub struct DetectedIssue { /// /// ## Binding /// - **Strength**: required - /// - **Description**: Indicates the potential degree of impact of the identified issue on the patient. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-severity|4.0.1 - /// - /// ## Aliases - /// severity - pub severity: Option, - /// Associated patient + /// - **Description**: A code specifying the types of information being requested. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose|4.0.1 + pub purpose: Option>, + /// Intended recipient of products and services /// - /// Indicates the patient whose record the detected issue is associated with. + /// The party who is the beneficiary of the supplied coverage and for whom + /// eligibility is sought. /// /// ## Requirements - /// While the subject could be inferred by tracing the subject of the implicated - /// resources, it's useful to have a direct link for query purposes. + /// Required to provide context and coverage validation. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// 1..1. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -40913,30 +39806,30 @@ pub struct DetectedIssue { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Option, - /// When identified + pub patient: Reference, + /// Estimated date or dates of service /// - /// The date or period when the detected issue was initially identified. + /// The date or dates when the enclosed suite of services were performed or + /// completed. /// /// ## Requirements - /// No-one can be responsible for mitigation prior to the issue being identified. + /// Required to provide time context for the request. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[fhir_serde(flatten)] - pub identified: Option, - /// The provider or device that identified the issue + pub serviced: Option, + /// Creation date /// - /// Individual or device responsible for the issue being raised. For example, a - /// decision support application or a pharmacist conducting a medication review. + /// The date when this resource was created. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Need to record a timestamp for use by both the recipient and the issuer. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -40944,93 +39837,154 @@ pub struct DetectedIssue { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option, - /// Problem resource - /// - /// Indicates the resource representing the current activity or proposed activity - /// that is potentially problematic. + pub created: DateTime, + /// Author /// - /// ## Implementation Notes - /// There's an implicit constraint on the number of implicated resources based on - /// DetectedIssue.type; e.g. For drug-drug, there would be more than one. For - /// timing, there would typically only be one. + /// Person who created the request. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Some jurisdictions require the contact information for personnel completing + /// eligibility requests. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub enterer: Option, + /// Party responsible for the request /// - /// ## Aliases - /// cause - pub implicated: Option>, - /// Supporting evidence + /// The provider which is responsible for the request. /// - /// Supporting evidence or manifestations that provide the basis for identifying - /// the detected issue such as a GuidanceResponse or MeasureReport. + /// ## Requirements + /// Needed to identify the requestor. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// Typically this field would be 1..1 where this party is responsible for the + /// eligibility request but not necessarily professionally responsible for the + /// provision of the individual products and services listed below. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub evidence: Option>, - /// Description and context + pub provider: Option, + /// Coverage issuer /// - /// A textual explanation of the detected issue. + /// The Insurer who issued the coverage in question and is the recipient of the + /// request. /// - /// ## Implementation Notes - /// Should focus on information not covered elsewhere as discrete data - no need - /// to duplicate the narrative. + /// ## Requirements + /// Need to identify the recipient. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option, - /// Authority for issue + pub insurer: Reference, + /// Servicing facility /// - /// The literature, knowledge-base or similar reference that describes the - /// propensity for the detected issue identified. + /// Facility where the services are intended to be provided. + /// + /// ## Requirements + /// Insurance adjudication can be dependant on where services were delivered. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Option, - /// Step taken to address + pub facility: Option, + /// Supporting information /// - /// Indicates an action that has been taken or is committed to reduce or - /// eliminate the likelihood of the risk identified by the detected issue from - /// manifesting. Can also reflect an observation of known mitigating factors that - /// may reduce/eliminate the need for any action. + /// Additional information codes regarding exceptions, special considerations, + /// the condition, situation, prior or concurrent issues. + /// + /// ## Requirements + /// Typically these information codes are required to support the services + /// rendered or the adjudication of the services rendered. + /// + /// ## Implementation Notes + /// Often there are multiple jurisdiction specific valuesets which are required. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub mitigation: Option>, -} - -/// Supporting evidence -/// -/// Supporting evidence or manifestations that provide the basis for identifying -/// the detected issue such as a GuidanceResponse or MeasureReport. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DetectedIssueEvidence { - /// Unique id for inter-element referencing + #[fhir_serde(rename = "supportingInfo")] + pub supporting_info: Option>, + /// Patient insurance information + /// + /// Financial instruments for reimbursement for the health care products and + /// services. + /// + /// ## Requirements + /// There must be at least one coverage for which eligibility is requested. + /// + /// ## Implementation Notes + /// All insurance coverages for the patient which may be applicable for + /// reimbursement, of the products and services listed in the claim, are + /// typically provided in the claim to allow insurers to confirm the ordering of + /// the insurance coverages relative to local 'coordination of benefit' rules. + /// One coverage (and only one) with 'focal=true' is to be used in the + /// adjudication of this claim. Coverages appearing before the focal Coverage in + /// the list, and where 'subrogation=false', should provide a reference to the + /// ClaimResponse containing the adjudication results of the prior claim. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub insurance: Option>, + /// Item to be evaluated for eligibiity + /// + /// Service categories or billable services for which benefit details and/or an + /// authorization prior to service delivery may be required by the payor. + /// + /// ## Requirements + /// The items to be processed for the request. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub item: Option>, +} + +/// Patient insurance information +/// +/// Financial instruments for reimbursement for the health care products and +/// services. +/// +/// ## Requirements +/// There must be at least one coverage for which eligibility is requested. +/// +/// ## Implementation Notes +/// All insurance coverages for the patient which may be applicable for +/// reimbursement, of the products and services listed in the claim, are +/// typically provided in the claim to allow insurers to confirm the ordering of +/// the insurance coverages relative to local 'coordination of benefit' rules. +/// One coverage (and only one) with 'focal=true' is to be used in the +/// adjudication of this claim. Coverages appearing before the focal Coverage in +/// the list, and where 'subrogation=false', should provide a reference to the +/// ClaimResponse containing the adjudication results of the prior claim. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct CoverageEligibilityRequestInsurance { + /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This /// may be any string value that does not contain spaces. @@ -41110,37 +40064,71 @@ pub struct DetectedIssueEvidence { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Manifestation + /// Applicable coverage /// - /// A manifestation that led to the recording of this detected issue. + /// A flag to indicate that this Coverage is to be used for evaluation of this + /// request when set to true. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// To identify which coverage in the list is being used to evaluate this + /// request. + /// + /// ## Implementation Notes + /// A patient may (will) have multiple insurance policies which provide + /// reimburement for healthcare services and products. For example a person may + /// also be covered by their spouse's policy and both appear in the list (and may + /// be from the same insurer). This flag will be set to true for only one of the + /// listed policies and that policy will be used for evaluating this request. + /// Other requests would be created to request evaluation against the other + /// listed policies. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub focal: Option, + /// Insurance information /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes that describes the types of evidence for a detected issue. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/manifestation-or-symptom - pub code: Option>, - /// Supporting information + /// Reference to the insurance card level information contained in the Coverage + /// resource. The coverage issuing insurer will use these details to locate the + /// patient's actual coverage within the insurer's information system. /// - /// Links to resources that constitute evidence for the detected issue such as a - /// GuidanceResponse or MeasureReport. + /// ## Requirements + /// Required to allow the adjudicator to locate the correct policy and history + /// within their information system. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, + pub coverage: Reference, + /// Additional provider contract number + /// + /// A business agreement number established between the provider and the insurer + /// for special business processing purposes. + /// + /// ## Requirements + /// Providers may have multiple business arrangements with a given insurer and + /// must supply the specific contract number for adjudication. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "businessArrangement")] + pub business_arrangement: Option, } -/// The actual design of the device or software version running on the device +/// Item to be evaluated for eligibiity /// -/// The actual design of the device or software version running on the device. +/// Service categories or billable services for which benefit details and/or an +/// authorization prior to service delivery may be required by the payor. +/// +/// ## Requirements +/// The items to be processed for the request. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -41148,7 +40136,7 @@ pub struct DetectedIssueEvidence { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceVersion { +pub struct CoverageEligibilityRequestItem { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -41229,164 +40217,193 @@ pub struct DeviceVersion { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The type of the device version + /// Applicable exception or supporting information /// - /// The type of the device version. + /// Exceptions, special conditions and supporting information applicable for this + /// service or product line. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Needed to support or inform the consideration for eligibility. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "supportingInfoSequence")] + pub supporting_info_sequence: Option>, + /// Benefit classification /// - /// ## Aliases - /// Σ - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// A single component of the device version + /// Code to identify the general type of benefits under which products and + /// services are provided. /// - /// A single component of the device version. + /// ## Requirements + /// Needed to convey the category of service or product for which eligibility is + /// sought. + /// + /// ## Implementation Notes + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub component: Option, - /// The version text /// - /// The version text. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral, medical, vision etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: Option, + /// Billing, service, product, or drug code /// - /// ## Cardinality: Required (1..1) + /// This contains the product, service, drug or other billing code for the item. + /// + /// ## Requirements + /// Needed to convey the actual service or product for which eligibility is + /// sought. + /// + /// ## Implementation Notes + /// Code to indicate the Professional Service or Product supplied (e.g. CTP, + /// HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: String, -} - -/// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication -/// -/// The capabilities supported on a device, the standards to which the device -/// conforms for a particular purpose, and used for the communication. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceSpecialization { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + #[fhir_serde(rename = "productOrService")] + pub product_or_service: Option, + /// Product or service billing modifiers /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// To support provision of the item or to charge an elevated fee. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// For example in Oral whether the treatment is cosmetic or associated with TMJ, + /// or for Medical whether the treatment was outside the clinic or out of office + /// hours. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Perfoming practitioner /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The practitioner who is responsible for the product or service to be rendered + /// to the patient. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Needed to support the evaluation of the eligibility. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub provider: Option, + /// Count of products or services /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// The number of repetitions of a service or product. + /// + /// ## Requirements + /// Required when the product or service code does not convey the quantity + /// provided. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub quantity: Option, + /// Fee, charge or cost per item /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The standard that is used to operate and communicate + /// The amount charged to the patient by the provider for a single unit. /// - /// The standard that is used to operate and communicate. + /// ## Requirements + /// Needed to support the evaluation of the eligibility. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Servicing facility /// - /// ## Aliases - /// Σ - #[fhir_serde(rename = "systemType")] - pub system_type: CodeableConcept, - /// The version of the standard that is used to operate and communicate + /// Facility where the services will be provided. /// - /// The version of the standard that is used to operate and communicate. + /// ## Requirements + /// Needed to support the evaluation of the eligibility. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, + pub facility: Option, + /// Applicable diagnosis + /// + /// Patient diagnosis for which care is sought. + /// + /// ## Requirements + /// Needed to support the evaluation of the eligibility. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub diagnosis: Option>, + /// Product or service details + /// + /// The plan/proposal/order describing the proposed service in detail. + /// + /// ## Requirements + /// Needed to provide complex service proposal such as a Device or a plan. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option>, } -/// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties +/// Choice of types for the diagnosis\[x\] field in CoverageEligibilityRequestItemDiagnosis +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "diagnosis")] +pub enum CoverageEligibilityRequestItemDiagnosisDiagnosis { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "diagnosisCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "diagnosisReference")] + Reference(Reference), +} + +/// Applicable diagnosis /// -/// The actual configuration settings of a device as it actually operates, e.g., -/// regulation status, time properties. +/// Patient diagnosis for which care is sought. +/// +/// ## Requirements +/// Needed to support the evaluation of the eligibility. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -41394,7 +40411,8 @@ pub struct DeviceSpecialization { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceProperty { +#[fhir_resource(choice_elements = "diagnosis")] +pub struct CoverageEligibilityRequestItemDiagnosis { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -41475,47 +40493,39 @@ pub struct DeviceProperty { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible) - /// - /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible). - /// - /// ## Cardinality: Required (1..1) + /// Nature of illness or problem /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Property value as a quantity + /// The nature of illness or problem in a coded form or as a reference to an + /// external defined Condition. /// - /// Property value as a quantity. + /// ## Requirements + /// Provides health context for the evaluation of the products and/or services. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "valueQuantity")] - pub value_quantity: Option>, - /// Property value as a code, e.g., NTP4 (synced to NTP) - /// - /// Property value as a code, e.g., NTP4 (synced to NTP). - /// - /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "valueCode")] - pub value_code: Option>, + /// ## Binding + /// - **Strength**: example + /// - **Description**: ICD10 Diagnostic codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 + #[fhir_serde(flatten)] + pub diagnosis: Option, } -/// The name of the device as given by the manufacturer +/// Supporting information /// -/// This represents the manufacturer's name of the device as provided by the -/// device, from a UDI label, or by a person describing the Device. This -/// typically would be used when a person provides the name(s) or when the device -/// represents one of the names available from DeviceDefinition. +/// Additional information codes regarding exceptions, special considerations, +/// the condition, situation, prior or concurrent issues. +/// +/// ## Requirements +/// Typically these information codes are required to support the services +/// rendered or the adjudication of the services rendered. +/// +/// ## Implementation Notes +/// Often there are multiple jurisdiction specific valuesets which are required. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -41523,7 +40533,7 @@ pub struct DeviceProperty { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDeviceName { +pub struct CoverageEligibilityRequestSupportingInfo { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -41604,47 +40614,72 @@ pub struct DeviceDeviceName { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The name of the device + /// Information instance identifier /// - /// The name of the device. + /// A number to uniquely identify supporting information entries. + /// + /// ## Requirements + /// Necessary to maintain the order of the supporting information items and + /// provide a mechanism to link to claim details. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Data to be provided /// - /// ## Aliases - /// Σ - pub name: String, - /// udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other + /// Additional data or information such as resources, documents, images etc. + /// including references to the data or the actual inclusion of the data. /// - /// The type of deviceName. - /// UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName - /// | ModelName. + /// ## Requirements + /// To convey the data content to be provided when the information is more than a + /// simple code or period. + /// + /// ## Implementation Notes + /// Could be used to provide references to other resources, document. For example + /// could contain a PDF in an Attachment of the Police Report for an Accident. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub information: Reference, + /// Applies to all items /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The type of name the device is referred by. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-nametype|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, + /// The supporting materials are applicable for all detail items, product/servce + /// categories and specific billing codes. + /// + /// ## Requirements + /// Needed to convey that the information is universal to the request. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "appliesToAll")] + pub applies_to_all: Option, } -/// FHIR Device type -/// -/// A type of a manufactured item that is used in the provision of healthcare -/// without being substantially changed through that activity. The device may be -/// a medical or non-medical device. +/// Choice of types for the serviced\[x\] field in CoverageEligibilityResponse +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "serviced")] +pub enum CoverageEligibilityResponseServiced { + /// Variant accepting the Date type. + #[fhir_serde(rename = "servicedDate")] + Date(Date), + /// Variant accepting the Period type. + #[fhir_serde(rename = "servicedPeriod")] + Period(Period), +} + +/// FHIR CoverageEligibilityResponse type /// -/// ## Purpose -/// Allows institutions to track their devices. +/// This resource provides eligibility and plan details from the processing of an +/// CoverageEligibilityRequest resource. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -41652,9 +40687,10 @@ pub struct DeviceDeviceName { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [Device](http://hl7.org/fhir/StructureDefinition/Device) +/// See: [CoverageEligibilityResponse](http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Device { +#[fhir_resource(choice_elements = "serviced")] +pub struct CoverageEligibilityResponse { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -41854,16 +40890,12 @@ pub struct Device { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Instance identifier + /// Business Identifier for coverage eligiblity request /// - /// Unique instance identifiers assigned to a device by manufacturers other - /// organizations or owners. + /// A unique identifier assigned to this coverage eligiblity request. /// - /// ## Implementation Notes - /// The barcode string from a barcode present on a device label or package may - /// identify the instance, include names given to the device in local usage, or - /// may identify the type of device. If the identifier identifies the type of - /// device, Device.type element should be used. + /// ## Requirements + /// Allows coverage eligibility requests to be distinguished and referenced. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -41871,51 +40903,48 @@ pub struct Device { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// The reference to the definition for the device - /// - /// The reference to the definition for the device. - /// - /// ## Cardinality: Optional (0..1) + /// active | cancelled | draft | entered-in-error /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub definition: Option, - /// Unique Device Identifier (UDI) Barcode string + /// The status of the resource instance. /// - /// Unique device identifier (UDI) assigned to device label or package. Note that - /// the Device may include multiple udiCarriers as it either may include just the - /// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it - /// could have been sold. + /// ## Requirements + /// Need to track the status of the resource as 'draft' resources may undergo + /// further edits while 'active' resources are immutable and may only have their + /// status changed to 'cancelled'. /// /// ## Implementation Notes - /// UDI may identify an unique instance of a device, or it may only identify the - /// type of the device. See [UDI mappings](device-mappings.html#udi) for a - /// complete mapping of UDI parts to Device. + /// This element is labeled as a modifier because the status contains codes that + /// mark the resource as not currently valid. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "udiCarrier")] - pub udi_carrier: Option>, - /// active | inactive | entered-in-error | unknown /// - /// Status of the Device availability. + /// ## Binding + /// - **Strength**: required + /// - **Description**: A code specifying the state of the resource instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 + pub status: Code, + /// auth-requirements | benefits | discovery | validation /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the codes - /// inactive and entered-in-error that mark the device (record)as not currently - /// valid. + /// Code to specify whether requesting: prior authorization requirements for some + /// service categories or billing codes; benefits for coverages specified or + /// discovered; discovery and return of coverages for the patient; and/or + /// validation that the specified coverage is in-force at the date/period + /// specified or 'now' if not specified. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// To indicate the processing actions requested. + /// + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -41924,315 +40953,235 @@ pub struct Device { /// /// ## Binding /// - **Strength**: required - /// - **Description**: The availability status of the device. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-status|4.0.1 - pub status: Option, - /// online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off - /// - /// Reason for the dtatus of the Device availability. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// - **Description**: A code specifying the types of information being requested. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose|4.0.1 + pub purpose: Option>, + /// Intended recipient of products and services /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The availability status reason of the device. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-status-reason - #[fhir_serde(rename = "statusReason")] - pub status_reason: Option>, - /// The distinct identification string + /// The party who is the beneficiary of the supplied coverage and for whom + /// eligibility is sought. /// - /// The distinct identification string as required by regulation for a human - /// cell, tissue, or cellular and tissue-based product. + /// ## Requirements + /// Required to provide context and coverage validation. /// - /// ## Implementation Notes - /// For example, this applies to devices in the United States regulated under - /// *Code of Federal Regulation 21CFR§1271.290(c)*. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub patient: Reference, + /// Estimated date or dates of service /// - /// ## Aliases - /// Distinct Identification Code (DIC) - #[fhir_serde(rename = "distinctIdentifier")] - pub distinct_identifier: Option, - /// Name of device manufacturer - /// - /// A name of the manufacturer. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub manufacturer: Option, - /// Date when the device was made + /// The date or dates when the enclosed suite of services were performed or + /// completed. /// - /// The date and time when the device was manufactured. + /// ## Requirements + /// Required to provide time context for the request. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "manufactureDate")] - pub manufacture_date: Option, - /// Date and time of expiry of this device (if applicable) - /// - /// The date and time beyond which this device is no longer valid or should not - /// be used (if applicable). + #[fhir_serde(flatten)] + pub serviced: Option, + /// Response creation date /// - /// ## Cardinality: Optional (0..1) + /// The date this resource was created. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "expirationDate")] - pub expiration_date: Option, - /// Lot number of manufacture + /// ## Requirements + /// Need to record a timestamp for use by both the recipient and the issuer. /// - /// Lot number assigned by the manufacturer. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lotNumber")] - pub lot_number: Option, - /// Serial number assigned by the manufacturer + pub created: DateTime, + /// Party responsible for the request /// - /// The serial number assigned by the organization when the device was - /// manufactured. + /// The provider which is responsible for the request. /// /// ## Implementation Notes - /// Alphanumeric Maximum 20. + /// Typically this field would be 1..1 where this party is responsible for the + /// claim but not necessarily professionally responsible for the provision of the + /// individual products and services listed below. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "serialNumber")] - pub serial_number: Option, - /// The name of the device as given by the manufacturer - /// - /// This represents the manufacturer's name of the device as provided by the - /// device, from a UDI label, or by a person describing the Device. This - /// typically would be used when a person provides the name(s) or when the device - /// represents one of the names available from DeviceDefinition. + pub requestor: Option, + /// Eligibility request reference /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Reference to the original request resource. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "deviceName")] - pub device_name: Option>, - /// The model number for the device + /// ## Requirements + /// Needed to allow the response to be linked to the request. /// - /// The model number for the device. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "modelNumber")] - pub model_number: Option, - /// The part number of the device - /// - /// The part number of the device. + pub request: Reference, + /// queued | complete | error | partial /// - /// ## Implementation Notes - /// Alphanumeric Maximum 20. + /// The outcome of the request processing. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// To advise the requestor of an overall processing outcome. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "partNumber")] - pub part_number: Option, - /// The kind or type of device + /// ## Implementation Notes + /// The resource may be used to indicate that: the request has been held (queued) + /// for processing; that it has been processed and errors found (error); that no + /// errors were found and that some of the adjudication has been undertaken + /// (partial) or that all of the adjudication has been undertaken (complete). /// - /// The kind or type of device. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes to identify medical devices. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication - /// - /// The capabilities supported on a device, the standards to which the device - /// conforms for a particular purpose, and used for the communication. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub specialization: Option>, - /// The actual design of the device or software version running on the device - /// - /// The actual design of the device or software version running on the device. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// - **Strength**: required + /// - **Description**: The outcome of the processing. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 + pub outcome: Code, + /// Disposition Message /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option>, - /// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties + /// A human readable description of the status of the adjudication. /// - /// The actual configuration settings of a device as it actually operates, e.g., - /// regulation status, time properties. + /// ## Requirements + /// Provided for user display. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub property: Option>, - /// Patient to whom Device is affixed + pub disposition: Option, + /// Coverage issuer /// - /// Patient information, If the device is affixed to a person. + /// The Insurer who issued the coverage in question and is the author of the + /// response. /// /// ## Requirements - /// If the device is implanted in a patient, then need to associate the device to - /// the patient. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Option, - /// Organization responsible for device + /// Need to identify the author. /// - /// An organization that is responsible for the provision and ongoing maintenance - /// of the device. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub owner: Option, - /// Details for human/organization for support + pub insurer: Reference, + /// Patient insurance information /// - /// Contact details for an organization or a particular human that is responsible - /// for the device. + /// Financial instruments for reimbursement for the health care products and + /// services. + /// + /// ## Requirements + /// There must be at least one coverage for which eligibility is requested. /// /// ## Implementation Notes - /// used for troubleshooting etc. + /// All insurance coverages for the patient which may be applicable for + /// reimbursement, of the products and services listed in the claim, are + /// typically provided in the claim to allow insurers to confirm the ordering of + /// the insurance coverages relative to local 'coordination of benefit' rules. + /// One coverage (and only one) with 'focal=true' is to be used in the + /// adjudication of this claim. Coverages appearing before the focal Coverage in + /// the list, and where 'subrogation=false', should provide a reference to the + /// ClaimResponse containing the adjudication results of the prior claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Where the device is found + pub insurance: Option>, + /// Preauthorization reference /// - /// The place where the device can be found. + /// A reference from the Insurer to which these services pertain to be used on + /// further communication and as proof that the request occurred. /// /// ## Requirements - /// Device.location can be used to track device location. + /// To provide any preauthorization reference for provider use. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub location: Option, - /// Network address to contact device + #[fhir_serde(rename = "preAuthRef")] + pub pre_auth_ref: Option, + /// Printed form identifier /// - /// A network address on which the device may be contacted directly. + /// A code for the form to be used for printing the content. + /// + /// ## Requirements + /// Needed to specify the specific form used for producing output for this + /// response. /// /// ## Implementation Notes - /// If the device is running a FHIR server, the network address should be the - /// Base URL from which a conformance statement may be retrieved. + /// May be needed to identify specific jurisdictional forms. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Device notes and comments - /// - /// Descriptive information, usage information or implantation information that - /// is not captured in an existing element. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Binding + /// - **Strength**: example + /// - **Description**: The forms codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/forms + pub form: Option, + /// Processing errors /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// Safety Characteristics of Device + /// Errors encountered during the processing of the request. /// - /// Provides additional safety characteristics about a medical device. For - /// example devices containing latex. + /// ## Requirements + /// Need to communicate processing issues to the requestor. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub safety: Option>, - /// The parent device - /// - /// The parent device. - /// - /// ## Cardinality: Optional (0..1) - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub parent: Option, + pub error: Option>, } -/// Unique Device Identifier (UDI) Barcode string +/// Processing errors /// -/// Unique device identifier (UDI) assigned to device label or package. Note that -/// the Device may include multiple udiCarriers as it either may include just the -/// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it -/// could have been sold. +/// Errors encountered during the processing of the request. /// -/// ## Implementation Notes -/// UDI may identify an unique instance of a device, or it may only identify the -/// type of the device. See [UDI mappings](device-mappings.html#udi) for a -/// complete mapping of UDI parts to Device. +/// ## Requirements +/// Need to communicate processing issues to the requestor. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceUdiCarrier { +pub struct CoverageEligibilityResponseError { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -42313,138 +41262,44 @@ pub struct DeviceUdiCarrier { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Mandatory fixed portion of UDI - /// - /// The device identifier (DI) is a mandatory, fixed portion of a UDI that - /// identifies the labeler and the specific version or model of a device. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// DI - #[fhir_serde(rename = "deviceIdentifier")] - pub device_identifier: Option, - /// UDI Issuing Organization - /// - /// Organization that is charged with issuing UDIs for devices. For example, the - /// US FDA issuers include : - /// 1) GS1: - /// http://hl7.org/fhir/NamingSystem/gs1-di, - /// 2) HIBCC: - /// http://hl7.org/fhir/NamingSystem/hibcc-dI, - /// 3) ICCBBA for blood containers: - /// http://hl7.org/fhir/NamingSystem/iccbba-blood-di, - /// 4) ICCBA for other devices: - /// http://hl7.org/fhir/NamingSystem/iccbba-other-di. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Barcode System - pub issuer: Option, - /// Regional UDI authority - /// - /// The identity of the authoritative source for UDI generation within a - /// jurisdiction. All UDIs are globally unique within a single namespace with the - /// appropriate repository uri as the system. For example, UDIs of devices - /// managed in the U.S. by the FDA, the value is - /// http://hl7.org/fhir/NamingSystem/fda-udi. - /// - /// ## Requirements - /// Allows a recipient of a UDI to know which database will contain the - /// UDI-associated metadata. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub jurisdiction: Option, - /// UDI Machine Readable Barcode String - /// - /// The full UDI carrier of the Automatic Identification and Data Capture (AIDC) - /// technology representation of the barcode string as printed on the packaging - /// of the device - e.g., a barcode or RFID. Because of limitations on character - /// sets in XML and the need to round-trip JSON data through XML, AIDC Formats - /// *SHALL* be base64 encoded. - /// - /// ## Implementation Notes - /// The AIDC form of UDIs should be scanned or otherwise used for the - /// identification of the device whenever possible to minimize errors in records - /// resulting from manual transcriptions. If separate barcodes for DI and PI are - /// present, concatenate the string with DI first and in order of human readable - /// expression on label. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Automatic Identification and Data Capture - #[fhir_serde(rename = "carrierAIDC")] - pub carrier_a_i_d_c: Option, - /// UDI Human Readable Barcode String - /// - /// The full UDI carrier as the human readable form (HRF) representation of the - /// barcode string as printed on the packaging of the device. - /// - /// ## Implementation Notes - /// If separate barcodes for DI and PI are present, concatenate the string with - /// DI first and in order of human readable expression on label. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Human Readable Form - #[fhir_serde(rename = "carrierHRF")] - pub carrier_h_r_f: Option, - /// barcode | rfid | manual + + /// Error code detailing processing issues /// - /// A coded entry to indicate how the data was entered. + /// An error code,from a specified code system, which details why the eligibility + /// check could not be performed. /// /// ## Requirements - /// Supports a way to distinguish hand entered from machine read data. + /// Required to convey processing errors. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Codes to identify how UDI data was entered. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/udi-entry-type|4.0.1 - #[fhir_serde(rename = "entryType")] - pub entry_type: Option, + /// - **Strength**: example + /// - **Description**: The error codes for adjudication processing. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-error + pub code: CodeableConcept, } -/// Device capabilities +/// Patient insurance information /// -/// Device capabilities. +/// Financial instruments for reimbursement for the health care products and +/// services. +/// +/// ## Requirements +/// There must be at least one coverage for which eligibility is requested. +/// +/// ## Implementation Notes +/// All insurance coverages for the patient which may be applicable for +/// reimbursement, of the products and services listed in the claim, are +/// typically provided in the claim to allow insurers to confirm the ordering of +/// the insurance coverages relative to local 'coordination of benefit' rules. +/// One coverage (and only one) with 'focal=true' is to be used in the +/// adjudication of this claim. Coverages appearing before the focal Coverage in +/// the list, and where 'subrogation=false', should provide a reference to the +/// ClaimResponse containing the adjudication results of the prior claim. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -42452,7 +41307,7 @@ pub struct DeviceUdiCarrier { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionCapability { +pub struct CoverageEligibilityResponseInsurance { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -42533,41 +41388,83 @@ pub struct DeviceDefinitionCapability { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of capability + /// Insurance information /// - /// Type of capability. + /// Reference to the insurance card level information contained in the Coverage + /// resource. The coverage issuing insurer will use these details to locate the + /// patient's actual coverage within the insurer's information system. + /// + /// ## Requirements + /// Required to allow the adjudicator to locate the correct policy and history + /// within their information system. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Description of capability + pub coverage: Reference, + /// Coverage inforce indicator /// - /// Description of capability. + /// Flag indicating if the coverage provided is inforce currently if no service + /// date(s) specified or for the whole duration of the service dates. + /// + /// ## Requirements + /// Needed to convey the answer to the eligibility validation request. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub inforce: Option, + /// When the benefits are applicable + /// + /// The term of the benefits documented in this response. + /// + /// ## Requirements + /// Needed as coverages may be multi-year while benefits tend to be annual + /// therefore a separate expression of the benefit period is needed. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "benefitPeriod")] + pub benefit_period: Option, + /// Benefits and authorization details + /// + /// Benefits and optionally current balances, and authorization details by + /// category or service. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints + /// - **ces-1**: SHALL contain a category or a billcode but not both. (error) + /// Expression: `category.exists() xor productOrService.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option>, + pub item: Option>, } -/// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties +/// Benefits and authorization details /// -/// The actual configuration settings of a device as it actually operates, e.g., -/// regulation status, time properties. +/// Benefits and optionally current balances, and authorization details by +/// category or service. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints +/// - **ces-1**: SHALL contain a category or a billcode but not both. (error) +/// Expression: `category.exists() xor productOrService.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionProperty { +pub struct CoverageEligibilityResponseInsuranceItem { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -42648,326 +41545,316 @@ pub struct DeviceDefinitionProperty { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible) + /// Benefit classification /// - /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible). + /// Code to identify the general type of benefits under which products and + /// services are provided. /// - /// ## Cardinality: Required (1..1) + /// ## Requirements + /// Needed to convey the category of service or product for which eligibility is + /// sought. + /// + /// ## Implementation Notes + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Property value as a quantity /// - /// Property value as a quantity. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral, medical, vision etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: Option, + /// Billing, service, product, or drug code /// - /// ## Cardinality: Optional, Multiple (0..*) + /// This contains the product, service, drug or other billing code for the item. + /// + /// ## Requirements + /// Needed to convey the actual service or product for which eligibility is + /// sought. + /// + /// ## Implementation Notes + /// Code to indicate the Professional Service or Product supplied (e.g. CTP, + /// HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "valueQuantity")] - pub value_quantity: Option>, - /// Property value as a code, e.g., NTP4 (synced to NTP) /// - /// Property value as a code, e.g., NTP4 (synced to NTP). + /// ## Binding + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + /// + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: Option, + /// Product or service billing modifiers + /// + /// Item typification or modifiers codes to convey additional context for the + /// product or service. + /// + /// ## Requirements + /// To support provision of the item or to charge an elevated fee. + /// + /// ## Implementation Notes + /// For example in Oral whether the treatment is cosmetic or associated with TMJ, + /// or for Medical whether the treatment was outside the clinic or out of office + /// hours. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "valueCode")] - pub value_code: Option>, -} - -/// A substance used to create the material(s) of which the device is made -/// -/// A substance used to create the material(s) of which the device is made. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionMaterial { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Performing practitioner /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// The practitioner who is eligible for the provision of the product or service. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Requirements + /// Needed to convey the eligible provider. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub provider: Option, + /// Excluded from the plan /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// True if the indicated class of service is excluded from the plan, missing or + /// False indicates the product or service is included in the coverage. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Requirements + /// Needed to identify items that are specifically excluded from the coverage. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub excluded: Option, + /// Short name for the benefit + /// + /// A short name or tag for the benefit. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Required to align with other plan names. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// For example: MED01, or DENT2. /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub name: Option, + /// Description of the benefit or services covered /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The substance + /// A richer description of the benefit or services covered. /// - /// The substance. + /// ## Requirements + /// Needed for human readable reference. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// For example 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, + /// Implants and Cosmetic services'. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub substance: CodeableConcept, - /// Indicates an alternative material of the device + pub description: Option, + /// In or out of network /// - /// Indicates an alternative material of the device. + /// Is a flag to indicate whether the benefits refer to in-network providers or + /// out-of-network providers. + /// + /// ## Requirements + /// Needed as in or out of network providers are treated differently under the + /// coverage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub alternate: Option, - /// Whether the substance is a known or suspected allergen /// - /// Whether the substance is a known or suspected allergen. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Code to classify in or out of network services. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-network + pub network: Option, + /// Individual or family + /// + /// Indicates if the benefits apply to an individual or to the family. + /// + /// ## Requirements + /// Needed for the understanding of the benefits. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "allergenicIndicator")] - pub allergenic_indicator: Option, -} - -/// Choice of types for the manufacturer\[x\] field in DeviceDefinition -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "manufacturer")] -pub enum DeviceDefinitionManufacturer { - /// Variant accepting the String type. - #[fhir_serde(rename = "manufacturerString")] - String(String), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "manufacturerReference")] - Reference(Reference), -} - -/// FHIR DeviceDefinition type -/// -/// The characteristics, operational status and capabilities of a medical-related -/// component of a medical device. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [DeviceDefinition](http://hl7.org/fhir/StructureDefinition/DeviceDefinition) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "manufacturer")] -pub struct DeviceDefinition { - /// Logical id of this artifact /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Unit covered/serviced - individual or family. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-unit + pub unit: Option, + /// Annual or lifetime /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// The term or period of the values such as 'maximum lifetime benefit' or + /// 'maximum annual visits'. + /// + /// ## Requirements + /// Needed for the understanding of the benefits. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Coverage unit - annual, lifetime. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-term + pub term: Option, + /// Benefit Summary /// - /// ## Cardinality: Optional (0..1) + /// Benefits used to date. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + pub benefit: Option>, + /// Authorization required flag /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// A boolean flag indicating whether a preauthorization is required prior to + /// actual service delivery. /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// ## Requirements + /// Needed to convey that preauthorization is required. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + #[fhir_serde(rename = "authorizationRequired")] + pub authorization_required: Option, + /// Type of required supporting materials /// - /// The base language in which the resource is written. + /// Codes or comments regarding information or actions associated with the + /// preauthorization. /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// ## Requirements + /// Needed to inform the provider of collateral materials or actions needed for + /// preauthorization. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// - **Strength**: example + /// - **Description**: Type of supporting information to provide with a preauthorization. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/coverageeligibilityresponse-ex-auth-support + #[fhir_serde(rename = "authorizationSupporting")] + pub authorization_supporting: Option>, + /// Preauthorization requirements endpoint /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// A web location for obtaining requirements or descriptive information + /// regarding the preauthorization. /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// ## Requirements + /// Needed to enable insurers to advise providers of informative information. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "authorizationUrl")] + pub authorization_url: Option, +} + +/// Choice of types for the allowed\[x\] field in CoverageEligibilityResponseInsuranceItemBenefit +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "allowed")] +pub enum CoverageEligibilityResponseInsuranceItemBenefitAllowed { + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "allowedUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "allowedString")] + String(String), + /// Variant accepting the Money type. + #[fhir_serde(rename = "allowedMoney")] + Money(Money), +} + +/// Choice of types for the used\[x\] field in CoverageEligibilityResponseInsuranceItemBenefit +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "used")] +pub enum CoverageEligibilityResponseInsuranceItemBenefitUsed { + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "usedUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "usedString")] + String(String), + /// Variant accepting the Money type. + #[fhir_serde(rename = "usedMoney")] + Money(Money), +} + +/// Benefit Summary +/// +/// Benefits used to date. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "allowed,used")] +pub struct CoverageEligibilityResponseInsuranceItemBenefit { + /// Unique id for inter-element referencing /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -42987,16 +41874,16 @@ pub struct DeviceDefinition { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -43021,7 +41908,8 @@ pub struct DeviceDefinition { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -43030,37 +41918,37 @@ pub struct DeviceDefinition { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Instance identifier - /// - /// Unique instance identifiers assigned to a device by the software, - /// manufacturers, other organizations or owners. For example: handle ID. + /// Benefit classification /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Classification of benefit being provided. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Unique Device Identifier (UDI) Barcode string + /// ## Requirements + /// Needed to convey the nature of the benefit. /// - /// Unique device identifier (UDI) assigned to device label or package. Note that - /// the Device may include multiple udiCarriers as it either may include just the - /// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it - /// could have been sold. + /// ## Implementation Notes + /// For example: deductible, visits, benefit amount. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "udiDeviceIdentifier")] - pub udi_device_identifier: Option>, - /// Name of device manufacturer /// - /// A name of the manufacturer. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Deductable, visits, co-pay, etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-type + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Benefits allowed + /// + /// The quantity of the benefit which is permitted under the coverage. + /// + /// ## Requirements + /// Needed to convey the benefits offered under the coverage. /// /// ## Cardinality: Optional (0..1) /// @@ -43068,71 +41956,90 @@ pub struct DeviceDefinition { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[fhir_serde(flatten)] - pub manufacturer: Option, - /// A name given to the device to identify it - /// - /// A name given to the device to identify it. - /// - /// ## Cardinality: Optional, Multiple (0..*) + pub allowed: Option, + /// Benefits used /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "deviceName")] - pub device_name: Option>, - /// The model number for the device + /// The quantity of the benefit which have been consumed to date. /// - /// The model number for the device. + /// ## Requirements + /// Needed to convey the benefits consumed to date. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "modelNumber")] - pub model_number: Option, - /// What kind of device or device system this is + #[fhir_serde(flatten)] + pub used: Option, +} + +/// Choice of types for the subject\[x\] field in DataRequirement +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "subject")] +pub enum DataRequirementSubject { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "subjectCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "subjectReference")] + Reference(Reference), +} + +/// FHIR DataRequirement type +/// +/// Base StructureDefinition for DataRequirement Type: Describes a required data +/// item for evaluation in terms of the type of data, and optional code or +/// date-based filters of the data. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Element +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [DataRequirement](http://hl7.org/fhir/StructureDefinition/DataRequirement) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "subject")] +pub struct DataRequirement { + /// Unique id for inter-element referencing /// - /// What kind of device or device system this is. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Type of device e.g. according to official classification. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-kind - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// The capabilities supported on a device, the standards to which the device - /// conforms for a particular purpose, and used for the communication. + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub specialization: Option>, - /// Available versions - /// - /// The available versions of the device, e.g., software versions. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option>, - /// Safety characteristics of the device + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// The type of the required data /// - /// Safety characteristics of the device. + /// The type of the required data, specified as the type name of a resource. For + /// profiles, this value is set to the type of the base resource of the profile. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -43142,140 +42049,256 @@ pub struct DeviceDefinition { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-safety - pub safety: Option>, - /// Shelf Life and storage information + /// - **Strength**: required + /// - **Description**: A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/all-types|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// The profile of the required data /// - /// Shelf Life and storage information. + /// The profile of the required data, specified as the uri of the profile + /// definition. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "shelfLifeStorage")] - pub shelf_life_storage: Option>, - /// Dimensions, color etc. + pub profile: Option>, + /// E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device /// - /// Dimensions, color etc. + /// The intended subjects of the data requirement. If this element is not + /// provided, a Patient subject is assumed. + /// + /// ## Implementation Notes + /// The subject of a data requirement is critical, as the data being specified is + /// determined with respect to a particular subject. This corresponds roughly to + /// the notion of a Compartment in that it limits what data is available based on + /// its relationship to the subject. In CQL, this corresponds to the context + /// declaration. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// - When missing: Patient + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "physicalCharacteristics")] - pub physical_characteristics: Option, - /// Language code for the human-readable text strings produced by the device (all supported) /// - /// Language code for the human-readable text strings produced by the device (all - /// supported). + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The possible types of subjects for a data requirement (E.g., Patient, Practitioner, Organization, Location, etc.). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/subject-type + #[fhir_serde(flatten)] + pub subject: Option, + /// Indicates specific structure elements that are referenced by the knowledge module + /// + /// Indicates that specific elements of the type are referenced by the knowledge + /// module and must be supported by the consumer in order to obtain an effective + /// evaluation. This does not mean that a value is required for this element, + /// only that the consuming system must understand the element and be able to + /// provide values for it if they are available. + /// + /// The value of mustSupport SHALL be a FHIRPath resolveable on the type of the + /// DataRequirement. The path SHALL consist only of identifiers, constant + /// indexers, and .resolve() (see the [Simple FHIRPath + /// Profile](fhirpath.html#simple) for full details). /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "languageCode")] - pub language_code: Option>, - /// Device capabilities + #[fhir_serde(rename = "mustSupport")] + pub must_support: Option>, + /// What codes are expected /// - /// Device capabilities. + /// Code filters specify additional constraints on the data, specifying the value + /// set of interest for a particular element of the data. Each code filter + /// defines an additional constraint on the data, i.e. code filters are AND'ed, + /// not OR'ed. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints + /// - **drq-1**: Either a path or a searchParam must be provided, but not both (error) + /// Expression: `path.exists() xor searchParam.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub capability: Option>, - /// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties + #[fhir_serde(rename = "codeFilter")] + pub code_filter: Option>, + /// What dates/date ranges are expected /// - /// The actual configuration settings of a device as it actually operates, e.g., - /// regulation status, time properties. + /// Date filters specify additional constraints on the data in terms of the + /// applicable date range for specific elements. Each date filter specifies an + /// additional constraint on the data, i.e. date filters are AND'ed, not OR'ed. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints + /// - **drq-2**: Either a path or a searchParam must be provided, but not both (error) + /// Expression: `path.exists() xor searchParam.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub property: Option>, - /// Organization responsible for device + #[fhir_serde(rename = "dateFilter")] + pub date_filter: Option>, + /// Number of results /// - /// An organization that is responsible for the provision and ongoing maintenance - /// of the device. + /// Specifies a maximum number of results that are required (uses the _count + /// search parameter). + /// + /// ## Requirements + /// Enables the requirement "most recent 5 results" to be expressed. + /// + /// ## Implementation Notes + /// This element can be used in combination with the sort element to specify + /// quota requirements such as "the most recent 5" or "the highest 5". /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub owner: Option, - /// Details for human/organization for support + pub limit: Option, + /// Order of the results /// - /// Contact details for an organization or a particular human that is responsible - /// for the device. + /// Specifies the order of the results to be returned. + /// + /// ## Requirements + /// Enables the requirement "most recent 5 results" to be expressed. /// /// ## Implementation Notes - /// used for troubleshooting etc. + /// This element can be used in combination with the sort element to specify + /// quota requirements such as "the most recent 5" or "the highest 5". When + /// multiple sorts are specified, they are applied in the order they appear in + /// the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Network address to contact device + pub sort: Option>, +} + +/// What codes are expected +/// +/// Code filters specify additional constraints on the data, specifying the value +/// set of interest for a particular element of the data. Each code filter +/// defines an additional constraint on the data, i.e. code filters are AND'ed, +/// not OR'ed. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **drq-1**: Either a path or a searchParam must be provided, but not both (error) +/// Expression: `path.exists() xor searchParam.exists()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DataRequirementCodeFilter { + /// Unique id for inter-element referencing /// - /// A network address on which the device may be contacted directly. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// If the device is running a FHIR server, the network address should be the - /// Base URL from which a conformance statement may be retrieved. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Access to on-line information + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Access to on-line information about the device. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// A code-valued attribute to filter on /// - /// ## Cardinality: Optional (0..1) + /// The code-valued attribute of the filter. The specified path SHALL be a + /// FHIRPath resolveable on the specified type of the DataRequirement, and SHALL + /// consist only of identifiers, constant indexers, and .resolve(). The path is + /// allowed to contain qualifiers (.) to traverse sub-elements, as well as + /// indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple + /// FHIRPath Profile](fhirpath.html#simple) for full details). Note that the + /// index must be an integer constant. The path must resolve to an element of + /// type code, Coding, or CodeableConcept. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "onlineInformation")] - pub online_information: Option, - /// Device notes and comments + /// ## Implementation Notes + /// The path attribute contains a [Simple FHIRPath Subset](fhirpath.html#simple) + /// that allows path traversal, but not calculation. /// - /// Descriptive information, usage information or implantation information that - /// is not captured in an existing element. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product) + pub path: Option, + /// A coded (token) parameter to search on /// - /// The quantity of the device present in the packaging (e.g. the number of - /// devices present in a pack, or the number of devices in the same package of - /// the medicinal product). + /// A token parameter that refers to a search parameter defined on the specified + /// type of the DataRequirement, and which searches on elements of type code, + /// Coding, or CodeableConcept. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// The parent device it can be part of + #[fhir_serde(rename = "searchParam")] + pub search_param: Option, + /// Valueset for the filter /// - /// The parent device it can be part of. + /// The valueset for the code filter. The valueSet and code elements are + /// additive. If valueSet is specified, the filter will return only those data + /// items for which the value of the code-valued element specified in the path is + /// a member of the specified valueset. /// /// ## Cardinality: Optional (0..1) /// @@ -43285,34 +42308,61 @@ pub struct DeviceDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "parentDevice")] - pub parent_device: Option, - /// A substance used to create the material(s) of which the device is made + #[fhir_serde(rename = "valueSet")] + pub value_set: Option, + /// What code is expected /// - /// A substance used to create the material(s) of which the device is made. + /// The codes for the code filter. If values are given, the filter will return + /// only those data items for which the code-valued attribute specified by the + /// path has a value that is one of the specified codes. If codes are specified + /// in addition to a value set, the filter returns items matching a code in the + /// value set or one of the specified codes. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub material: Option>, + pub code: Option>, } -/// Unique Device Identifier (UDI) Barcode string +/// Choice of types for the value\[x\] field in DataRequirementDateFilter +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "value")] +pub enum DataRequirementDateFilterValue { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "valueDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "valuePeriod")] + Period(Period), + /// Variant accepting the Duration type. + #[fhir_serde(rename = "valueDuration")] + Duration(Duration), +} + +/// What dates/date ranges are expected /// -/// Unique device identifier (UDI) assigned to device label or package. Note that -/// the Device may include multiple udiCarriers as it either may include just the -/// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it -/// could have been sold. +/// Date filters specify additional constraints on the data in terms of the +/// applicable date range for specific elements. Each date filter specifies an +/// additional constraint on the data, i.e. date filters are AND'ed, not OR'ed. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints +/// - **drq-2**: Either a path or a searchParam must be provided, but not both (error) +/// Expression: `path.exists() xor searchParam.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionUdiDeviceIdentifier { +#[fhir_resource(choice_elements = "value")] +pub struct DataRequirementDateFilter { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -43346,99 +42396,90 @@ pub struct DeviceDefinitionUdiDeviceIdentifier { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// A date-valued attribute to filter on /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// The date-valued attribute of the filter. The specified path SHALL be a + /// FHIRPath resolveable on the specified type of the DataRequirement, and SHALL + /// consist only of identifiers, constant indexers, and .resolve(). The path is + /// allowed to contain qualifiers (.) to traverse sub-elements, as well as + /// indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple + /// FHIRPath Profile](fhirpath.html#simple) for full details). Note that the + /// index must be an integer constant. The path must resolve to an element of + /// type date, dateTime, Period, Schedule, or Timing. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The path attribute contains a [Simple FHIR Subset](fhirpath.html#simple) that + /// allows path traversal, but not calculation. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub path: Option, + /// A date valued parameter to search on /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier + /// A date parameter that refers to a search parameter defined on the specified + /// type of the DataRequirement, and which searches on elements of type date, + /// dateTime, Period, Schedule, or Timing. /// - /// The identifier that is to be associated with every Device that references - /// this DeviceDefintiion for the issuer and jurisdication porvided in the - /// DeviceDefinition.udiDeviceIdentifier. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "deviceIdentifier")] - pub device_identifier: String, - /// The organization that assigns the identifier algorithm - /// - /// The organization that assigns the identifier algorithm. - /// - /// ## Cardinality: Required (1..1) + #[fhir_serde(rename = "searchParam")] + pub search_param: Option, + /// The value of the filter, as a Period, DateTime, or Duration value /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub issuer: Uri, - /// The jurisdiction to which the deviceIdentifier applies + /// The value of the filter. If period is specified, the filter will return only + /// those data items that fall within the bounds determined by the Period, + /// inclusive of the period boundaries. If dateTime is specified, the filter will + /// return only those data items that are equal to the specified dateTime. If a + /// Duration is specified, the filter will return only those data items that fall + /// within Duration before now. /// - /// The jurisdiction to which the deviceIdentifier applies. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub jurisdiction: Uri, + #[fhir_serde(flatten)] + pub value: Option, } -/// A name given to the device to identify it +/// Order of the results /// -/// A name given to the device to identify it. +/// Specifies the order of the results to be returned. +/// +/// ## Requirements +/// Enables the requirement "most recent 5 results" to be expressed. +/// +/// ## Implementation Notes +/// This element can be used in combination with the sort element to specify +/// quota requirements such as "the most recent 5" or "the highest 5". When +/// multiple sorts are specified, they are applied in the order they appear in +/// the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionDeviceName { +pub struct DataRequirementSort { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -43472,73 +42513,31 @@ pub struct DeviceDefinitionDeviceName { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// The name of the attribute to perform the sort /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The attribute of the sort. The specified path must be resolvable from the + /// type of the required data. The path is allowed to contain qualifiers (.) to + /// traverse sub-elements, as well as indexers ([x]) to traverse + /// multiple-cardinality sub-elements. Note that the index must be an integer + /// constant. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The name of the device + pub path: String, + /// ascending | descending /// - /// The name of the device. + /// The direction of the sort, ascending or descending. /// /// ## Cardinality: Required (1..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Σ - pub name: String, - /// udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other - /// - /// The type of deviceName. - /// UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName - /// | ModelName. - /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -43546,134 +42545,29 @@ pub struct DeviceDefinitionDeviceName { /// /// ## Binding /// - **Strength**: required - /// - **Description**: The type of name the device is referred by. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-nametype|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, + /// - **Description**: The possible sort directions, ascending or descending. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/sort-direction|4.0.1 + pub direction: Code, } -/// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication -/// -/// The capabilities supported on a device, the standards to which the device -/// conforms for a particular purpose, and used for the communication. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceDefinitionSpecialization { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// The standard that is used to operate and communicate - /// - /// The standard that is used to operate and communicate. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Σ - #[fhir_serde(rename = "systemType")] - pub system_type: String, - /// The version of the standard that is used to operate and communicate - /// - /// The version of the standard that is used to operate and communicate. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, +/// Choice of types for the identified\[x\] field in DetectedIssue +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "identified")] +pub enum DetectedIssueIdentified { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "identifiedDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "identifiedPeriod")] + Period(Period), } -/// FHIR DeviceMetric type +/// FHIR DetectedIssue type /// -/// Describes a measurement, calculation or setting capability of a medical -/// device. +/// Indicates an actual or potential clinical issue with or between one or more +/// active or proposed clinical actions for a patient; e.g. Drug-drug +/// interaction, Ineffective treatment frequency, Procedure-condition conflict, +/// etc. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -43681,9 +42575,10 @@ pub struct DeviceDefinitionSpecialization { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [DeviceMetric](http://hl7.org/fhir/StructureDefinition/DeviceMetric) +/// See: [DetectedIssue](http://hl7.org/fhir/StructureDefinition/DetectedIssue) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceMetric { +#[fhir_resource(choice_elements = "identified")] +pub struct DetectedIssue { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -43883,16 +42778,13 @@ pub struct DeviceMetric { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Instance identifier + /// Unique id for the detected issue /// - /// Unique instance identifiers assigned to a device by the device or gateway - /// software, manufacturers, other organizations or owners. For example: handle - /// ID. + /// Business identifier associated with the detected issue record. /// - /// ## Implementation Notes - /// For identifiers assigned to a device by the device or gateway software, the - /// `system` element of the identifier should be set to the unique identifier of - /// the device. + /// ## Requirements + /// Allows linking instances of the same detected issue found on different + /// servers. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -43903,16 +42795,18 @@ pub struct DeviceMetric { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// Identity of metric, for example Heart Rate or PEEP Setting + /// registered | preliminary | final | amended + /// - /// Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. + /// Indicates the status of the detected issue. /// /// ## Implementation Notes - /// DeviceMetric.type can be referred to either IEEE 11073-10101 or LOINC. + /// This element is labeled as a modifier because the status contains the codes + /// cancelled and entered-in-error that mark the issue as not currently valid. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -43920,19 +42814,16 @@ pub struct DeviceMetric { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Describes the metric type. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/devicemetric-type - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Unit of Measure for the Metric + /// - **Strength**: required + /// - **Description**: Indicates the status of the identified issue. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/observation-status|4.0.1 /// - /// Describes the unit that an observed value determined for this metric will - /// have. For example: Percent, Seconds, etc. + /// ## Aliases + /// status + pub status: Code, + /// Issue Category, e.g. drug-drug, duplicate therapy, etc. /// - /// ## Implementation Notes - /// DeviceMetric.unit can refer to either UCUM or preferable a RTMMS coding - /// system. + /// Identifies the general type of issue identified. /// /// ## Cardinality: Optional (0..1) /// @@ -43945,14 +42836,16 @@ pub struct DeviceMetric { /// /// ## Binding /// - **Strength**: preferred - /// - **Description**: Describes the unit of the metric. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/devicemetric-type - pub unit: Option, - /// Describes the link to the source Device + /// - **Description**: Codes identifying the general type of detected issue; e.g. Drug-drug interaction, Timing issue, Duplicate therapy, etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-category /// - /// Describes the link to the Device that this DeviceMetric belongs to and that - /// contains administrative device information such as manufacturer, serial - /// number, etc. + /// ## Aliases + /// type + pub code: Option, + /// high | moderate | low + /// + /// Indicates the degree of importance associated with the identified issue based + /// on the potential impact on the patient. /// /// ## Cardinality: Optional (0..1) /// @@ -43962,15 +42855,22 @@ pub struct DeviceMetric { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub source: Option, - /// Describes the link to the parent Device /// - /// Describes the link to the Device that this DeviceMetric belongs to and that - /// provide information about the location of this DeviceMetric in the - /// containment structure of the parent Device. An example would be a Device that - /// represents a Channel. This reference can be used by a client application to - /// distinguish DeviceMetrics that have the same type, but should be interpreted - /// based on their containment location. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Indicates the potential degree of impact of the identified issue on the patient. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-severity|4.0.1 + /// + /// ## Aliases + /// severity + pub severity: Option, + /// Associated patient + /// + /// Indicates the patient whose record the detected issue is associated with. + /// + /// ## Requirements + /// While the subject could be inferred by tracing the subject of the implicated + /// resources, it's useful to have a direct link for query purposes. /// /// ## Cardinality: Optional (0..1) /// @@ -43980,11 +42880,13 @@ pub struct DeviceMetric { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub parent: Option, - /// on | off | standby | entered-in-error + pub patient: Option, + /// When identified /// - /// Indicates current operational state of the device. For example: On, Off, - /// Standby, etc. + /// The date or period when the detected issue was initially identified. + /// + /// ## Requirements + /// No-one can be responsible for mitigation prior to the issue being identified. /// /// ## Cardinality: Optional (0..1) /// @@ -43994,20 +42896,12 @@ pub struct DeviceMetric { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub identified: Option, + /// The provider or device that identified the issue /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Describes the operational status of the DeviceMetric. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-operational-status|4.0.1 - #[fhir_serde(rename = "operationalStatus")] - pub operational_status: Option, - /// black | red | green | yellow | blue | magenta | cyan | white - /// - /// Describes the color representation for the metric. This is often used to aid - /// clinicians to track and identify parameter types by color. In practice, - /// consider a Patient Monitor that has ECG/HR and Pleth for example; the - /// parameters are displayed in different characteristic colors, such as HR-blue, - /// BP-green, and PR and SpO2- magenta. + /// Individual or device responsible for the issue being raised. For example, a + /// decision support application or a pharmacist conducting a medication review. /// /// ## Cardinality: Optional (0..1) /// @@ -44017,18 +42911,18 @@ pub struct DeviceMetric { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option, + /// Problem resource /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Describes the typical color of representation. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-color|4.0.1 - pub color: Option, - /// measurement | setting | calculation | unspecified + /// Indicates the resource representing the current activity or proposed activity + /// that is potentially problematic. /// - /// Indicates the category of the observation generation process. A DeviceMetric - /// can be for example a setting, measurement, or calculation. + /// ## Implementation Notes + /// There's an implicit constraint on the number of implicated resources based on + /// DetectedIssue.type; e.g. For drug-drug, there would be more than one. For + /// timing, there would typically only be one. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -44037,63 +42931,72 @@ pub struct DeviceMetric { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Describes the category of the metric. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-category|4.0.1 - pub category: Code, - /// Describes the measurement repetition time + /// ## Aliases + /// cause + pub implicated: Option>, + /// Supporting evidence /// - /// Describes the measurement repetition time. This is not necessarily the same - /// as the update period. The measurement repetition time can range from - /// milliseconds up to hours. An example for a measurement repetition time in the - /// range of milliseconds is the sampling rate of an ECG. An example for a - /// measurement repetition time in the range of hours is a NIBP that is triggered - /// automatically every hour. The update period may be different than the - /// measurement repetition time, if the device does not update the published - /// observed value with the same frequency as it was measured. + /// Supporting evidence or manifestations that provide the basis for identifying + /// the detected issue such as a GuidanceResponse or MeasureReport. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub evidence: Option>, + /// Description and context + /// + /// A textual explanation of the detected issue. + /// + /// ## Implementation Notes + /// Should focus on information not covered elsewhere as discrete data - no need + /// to duplicate the narrative. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option, + /// Authority for issue + /// + /// The literature, knowledge-base or similar reference that describes the + /// propensity for the detected issue identified. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "measurementPeriod")] - pub measurement_period: Option, - /// Describes the calibrations that have been performed or that are required to be performed + pub reference: Option, + /// Step taken to address /// - /// Describes the calibrations that have been performed or that are required to - /// be performed. + /// Indicates an action that has been taken or is committed to reduce or + /// eliminate the likelihood of the risk identified by the detected issue from + /// manifesting. Can also reflect an observation of known mitigating factors that + /// may reduce/eliminate the need for any action. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub calibration: Option>, + pub mitigation: Option>, } -/// Describes the calibrations that have been performed or that are required to be performed +/// Supporting evidence /// -/// Describes the calibrations that have been performed or that are required to -/// be performed. +/// Supporting evidence or manifestations that provide the basis for identifying +/// the detected issue such as a GuidanceResponse or MeasureReport. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DeviceMetricCalibration { +pub struct DetectedIssueEvidence { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -44174,89 +43077,182 @@ pub struct DeviceMetricCalibration { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// unspecified | offset | gain | two-point - /// - /// Describes the type of the calibration method. + /// Manifestation /// - /// ## Cardinality: Optional (0..1) + /// A manifestation that led to the recording of this detected issue. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Describes the type of a metric calibration. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-calibration-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// not-calibrated | calibration-required | calibrated | unspecified + /// - **Strength**: example + /// - **Description**: Codes that describes the types of evidence for a detected issue. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/manifestation-or-symptom + pub code: Option>, + /// Supporting information /// - /// Describes the state of the calibration. + /// Links to resources that constitute evidence for the detected issue such as a + /// GuidanceResponse or MeasureReport. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option>, +} + +/// Step taken to address +/// +/// Indicates an action that has been taken or is committed to reduce or +/// eliminate the likelihood of the risk identified by the detected issue from +/// manifesting. Can also reflect an observation of known mitigating factors that +/// may reduce/eliminate the need for any action. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DetectedIssueMitigation { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// What mitigation? + /// + /// Describes the action that was taken or the observation that was made that + /// reduces/eliminates the risk associated with the identified issue. + /// + /// ## Implementation Notes + /// The "text" component can be used for detail or when no appropriate code + /// exists. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Describes the state of a metric calibration. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-calibration-state|4.0.1 - pub state: Option, - /// Describes the time last calibration has been performed + /// - **Strength**: preferred + /// - **Description**: Codes describing steps taken to resolve the issue or other circumstances that mitigate the risk associated with the issue; e.g. 'added concurrent therapy', 'prior therapy documented', etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action + pub action: CodeableConcept, + /// Date committed /// - /// Describes the time last calibration has been performed. + /// Indicates when the mitigating action was documented. + /// + /// ## Implementation Notes + /// This might not be the same as when the mitigating step was actually taken. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub date: Option, + /// Who is committing? + /// + /// Identifies the practitioner who determined the mitigation and takes + /// responsibility for the mitigation step occurring. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub time: Option, -} - -/// Choice of types for the code\[x\] field in DeviceRequest -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "code")] -pub enum DeviceRequestCode { - /// Variant accepting the Reference type. - #[fhir_serde(rename = "codeReference")] - Reference(Reference), - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "codeCodeableConcept")] - CodeableConcept(CodeableConcept), -} - -/// Choice of types for the occurrence\[x\] field in DeviceRequest -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "occurrence")] -pub enum DeviceRequestOccurrence { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "occurrenceDateTime")] - DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "occurrencePeriod")] - Period(Period), - /// Variant accepting the Timing type. - #[fhir_serde(rename = "occurrenceTiming")] - Timing(Timing), + pub author: Option, } -/// FHIR DeviceRequest type +/// FHIR Device type /// -/// Represents a request for a patient to employ a medical device. The device may -/// be an implantable device, or an external assistive device, such as a walker. +/// A type of a manufactured item that is used in the provision of healthcare +/// without being substantially changed through that activity. The device may be +/// a medical or non-medical device. +/// +/// ## Purpose +/// Allows institutions to track their devices. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -44264,10 +43260,9 @@ pub enum DeviceRequestOccurrence { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [DeviceRequest](http://hl7.org/fhir/StructureDefinition/DeviceRequest) +/// See: [Device](http://hl7.org/fhir/StructureDefinition/Device) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "code,occurrence")] -pub struct DeviceRequest { +pub struct Device { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -44467,52 +43462,44 @@ pub struct DeviceRequest { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// External Request identifier + /// Instance identifier /// - /// Identifiers assigned to this order by the orderer or by the receiver. + /// Unique instance identifiers assigned to a device by manufacturers other + /// organizations or owners. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// The barcode string from a barcode present on a device label or package may + /// identify the instance, include names given to the device in local usage, or + /// may identify the type of device. If the identifier identifies the type of + /// device, Device.type element should be used. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// Instantiates FHIR protocol or definition - /// - /// The URL pointing to a FHIR-defined protocol, guideline, orderset or other - /// definition that is adhered to in whole or in part by this DeviceRequest. - /// - /// ## Implementation Notes - /// Note: This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. + /// The reference to the definition for the device /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The reference to the definition for the device. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesCanonical")] - pub instantiates_canonical: Option>, - /// Instantiates external protocol or definition + pub definition: Option, + /// Unique Device Identifier (UDI) Barcode string /// - /// The URL pointing to an externally maintained protocol, guideline, orderset or - /// other definition that is adhered to in whole or in part by this - /// DeviceRequest. + /// Unique device identifier (UDI) assigned to device label or package. Note that + /// the Device may include multiple udiCarriers as it either may include just the + /// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it + /// could have been sold. /// /// ## Implementation Notes - /// This might be an HTML page, PDF, etc. or could just be a non-resolvable URI - /// identifier. + /// UDI may identify an unique instance of a device, or it may only identify the + /// type of the device. See [UDI mappings](device-mappings.html#udi) for a + /// complete mapping of UDI parts to Device. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -44522,312 +43509,283 @@ pub struct DeviceRequest { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesUri")] - pub instantiates_uri: Option>, - /// What request fulfills + #[fhir_serde(rename = "udiCarrier")] + pub udi_carrier: Option>, + /// active | inactive | entered-in-error | unknown /// - /// Plan/proposal/order fulfilled by this request. + /// Status of the Device availability. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains the codes + /// inactive and entered-in-error that mark the device (record)as not currently + /// valid. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "basedOn")] - pub based_on: Option>, - /// What request replaces /// - /// The request takes the place of the referenced completed or terminated - /// request(s). + /// ## Binding + /// - **Strength**: required + /// - **Description**: The availability status of the device. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-status|4.0.1 + pub status: Option, + /// online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Reason for the dtatus of the Device availability. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "priorRequest")] - pub prior_request: Option>, - /// Identifier of composite request /// - /// Composite request this is part of. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The availability status reason of the device. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-status-reason + #[fhir_serde(rename = "statusReason")] + pub status_reason: Option>, + /// The distinct identification string /// - /// ## Cardinality: Optional (0..1) + /// The distinct identification string as required by regulation for a human + /// cell, tissue, or cellular and tissue-based product. /// - /// ## Special Semantics - /// - Included in summary + /// ## Implementation Notes + /// For example, this applies to devices in the United States regulated under + /// *Code of Federal Regulation 21CFR§1271.290(c)*. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "groupIdentifier")] - pub group_identifier: Option, - /// draft | active | on-hold | revoked | completed | entered-in-error | unknown /// - /// The status of the request. + /// ## Aliases + /// Distinct Identification Code (DIC) + #[fhir_serde(rename = "distinctIdentifier")] + pub distinct_identifier: Option, + /// Name of device manufacturer /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the codes - /// cancelled and entered-in-error that mark the request as not currently valid. + /// A name of the manufacturer. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub manufacturer: Option, + /// Date when the device was made /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Codes representing the status of the request. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-status|4.0.1 - pub status: Option, - /// proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option + /// The date and time when the device was manufactured. /// - /// Whether the request is a proposal, plan, an original order or a reflex order. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "manufactureDate")] + pub manufacture_date: Option, + /// Date and time of expiry of this device (if applicable) /// - /// ## Special Semantics - /// - Modifier element - This element changes the interpretation of all descriptive attributes. For example "the time the request is recommended to occur" vs. "the time the request is authorized to occur" or "who is recommended to perform the request" vs. "who is authorized to perform the request - /// - Included in summary + /// The date and time beyond which this device is no longer valid or should not + /// be used (if applicable). + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "expirationDate")] + pub expiration_date: Option, + /// Lot number of manufacture /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The kind of diagnostic request. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-intent|4.0.1 - pub intent: Code, - /// routine | urgent | asap | stat - /// - /// Indicates how quickly the {{title}} should be addressed with respect to other - /// requests. + /// Lot number assigned by the manufacturer. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// - When missing: If missing, normal priority - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "lotNumber")] + pub lot_number: Option, + /// Serial number assigned by the manufacturer /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Identifies the level of importance to be assigned to actioning the request. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-priority|4.0.1 - pub priority: Option, - /// Device requested - /// - /// The details of the device to be used. + /// The serial number assigned by the organization when the device was + /// manufactured. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Alphanumeric Maximum 20. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "serialNumber")] + pub serial_number: Option, + /// The name of the device as given by the manufacturer /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for devices that can be requested. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-kind - #[fhir_serde(flatten)] - pub code: Option, - /// Device details - /// - /// Specific parameters for the ordered item. For example, the prism value for - /// lenses. + /// This represents the manufacturer's name of the device as provided by the + /// device, from a UDI label, or by a person describing the Device. This + /// typically would be used when a person provides the name(s) or when the device + /// represents one of the names available from DeviceDefinition. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub parameter: Option>, - /// Focus of request - /// - /// The patient who will use the device. + #[fhir_serde(rename = "deviceName")] + pub device_name: Option>, + /// The model number for the device /// - /// ## Cardinality: Required (1..1) + /// The model number for the device. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Reference, - /// Encounter motivating request + #[fhir_serde(rename = "modelNumber")] + pub model_number: Option, + /// The part number of the device /// - /// An encounter that provides additional context in which this request is made. + /// The part number of the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Alphanumeric Maximum 20. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub encounter: Option, - /// Desired time or schedule for use + #[fhir_serde(rename = "partNumber")] + pub part_number: Option, + /// The kind or type of device /// - /// The timing schedule for the use of the device. The Schedule data type allows - /// many different expressions, for example. "Every 8 hours"; "Three times a - /// day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct - /// 2013, 17 Oct 2013 and 1 Nov 2013". + /// The kind or type of device. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub occurrence: Option, - /// When recorded /// - /// When the request transitioned to being actionable. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes to identify medical devices. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication /// - /// ## Cardinality: Optional (0..1) + /// The capabilities supported on a device, the standards to which the device + /// conforms for a particular purpose, and used for the communication. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "authoredOn")] - pub authored_on: Option, - /// Who/what is requesting diagnostics - /// - /// The individual who initiated the request and has responsibility for its - /// activation. + pub specialization: Option>, + /// The actual design of the device or software version running on the device /// - /// ## Cardinality: Optional (0..1) + /// The actual design of the device or software version running on the device. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub requester: Option, - /// Filler role - /// - /// Desired type of performer for doing the diagnostic testing. + pub version: Option>, + /// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties /// - /// ## Cardinality: Optional (0..1) + /// The actual configuration settings of a device as it actually operates, e.g., + /// regulation status, time properties. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub property: Option>, + /// Patient to whom Device is affixed /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participant-role - #[fhir_serde(rename = "performerType")] - pub performer_type: Option, - /// Requested Filler + /// Patient information, If the device is affixed to a person. /// - /// The desired performer for doing the diagnostic testing. + /// ## Requirements + /// If the device is implanted in a patient, then need to associate the device to + /// the patient. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub performer: Option, - /// Coded Reason for request - /// - /// Reason or justification for the use of this device. + pub patient: Option, + /// Organization responsible for device /// - /// ## Cardinality: Optional, Multiple (0..*) + /// An organization that is responsible for the provision and ongoing maintenance + /// of the device. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub owner: Option, + /// Details for human/organization for support /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Diagnosis or problem codes justifying the reason for requesting the device. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-code - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Linked Reason for request + /// Contact details for an organization or a particular human that is responsible + /// for the device. /// - /// Reason or justification for the use of this device. + /// ## Implementation Notes + /// used for troubleshooting etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// Associated insurance coverage + pub contact: Option>, + /// Where the device is found /// - /// Insurance plans, coverage extensions, pre-authorizations and/or - /// pre-determinations that may be required for delivering the requested service. + /// The place where the device can be found. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Device.location can be used to track device location. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub insurance: Option>, - /// Additional clinical information + pub location: Option, + /// Network address to contact device /// - /// Additional clinical information about the patient that may influence the - /// request fulfilment. For example, this may include where on the subject's body - /// the device will be used (i.e. the target site). + /// A network address on which the device may be contacted directly. /// - /// ## Requirements - /// Knowing where the device is targeted is important for tracking if multiple - /// sites are possible. + /// ## Implementation Notes + /// If the device is running a FHIR server, the network address should be the + /// Base URL from which a conformance statement may be retrieved. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportingInfo")] - pub supporting_info: Option>, - /// Notes or comments + pub url: Option, + /// Device notes and comments /// - /// Details about this request that were not represented at all or sufficiently - /// in one of the attributes provided in a class. These may include for example a - /// comment, an instruction, or a note associated with the statement. + /// Descriptive information, usage information or implantation information that + /// is not captured in an existing element. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -44835,52 +43793,38 @@ pub struct DeviceRequest { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub note: Option>, - /// Request provenance - /// - /// Key events in the history of the request. + /// Safety Characteristics of Device /// - /// ## Implementation Notes - /// This might not include provenances for all versions of the request - only - /// those deemed "relevant" or important. - /// This SHALL NOT include the Provenance associated with this current version of - /// the resource. (If that provenance is deemed to be a "relevant" change, it - /// will need to be added as part of a later update. Until then, it can be - /// queried directly as the Provenance that points to this version using - /// _revinclude - /// All Provenances should have some historical version of this Request as their - /// subject. + /// Provides additional safety characteristics about a medical device. For + /// example devices containing latex. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relevantHistory")] - pub relevant_history: Option>, -} - -/// Choice of types for the value\[x\] field in DeviceRequestParameter -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum DeviceRequestParameterValue { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "valueCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "valueQuantity")] - Quantity(Quantity), - /// Variant accepting the Range type. - #[fhir_serde(rename = "valueRange")] - Range(Range), - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "valueBoolean")] - Boolean(Boolean), + pub safety: Option>, + /// The parent device + /// + /// The parent device. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub parent: Option, } -/// Device details -/// -/// Specific parameters for the ordered item. For example, the prism value for -/// lenses. +/// The name of the device as given by the manufacturer +/// +/// This represents the manufacturer's name of the device as provided by the +/// device, from a UDI label, or by a person describing the Device. This +/// typically would be used when a person provides the name(s) or when the device +/// represents one of the names available from DeviceDefinition. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -44888,8 +43832,7 @@ pub enum DeviceRequestParameterValue { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct DeviceRequestParameter { +pub struct DeviceDeviceName { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -44970,201 +43913,192 @@ pub struct DeviceRequestParameter { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Device detail + /// The name of the device /// - /// A code or string that identifies the device detail being asserted. + /// The name of the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: A code that identifies the device detail. - pub code: Option, - /// Value of detail - /// - /// The value of the device detail. + /// ## Aliases + /// Σ + pub name: String, + /// udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other /// - /// ## Implementation Notes - /// Range means device should have a value that falls somewhere within the - /// specified range. + /// The type of deviceName. + /// UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName + /// | ModelName. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, -} - -/// Choice of types for the timing\[x\] field in DeviceUseStatement -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "timing")] -pub enum DeviceUseStatementTiming { - /// Variant accepting the Timing type. - #[fhir_serde(rename = "timingTiming")] - Timing(Timing), - /// Variant accepting the Period type. - #[fhir_serde(rename = "timingPeriod")] - Period(Period), - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "timingDateTime")] - DateTime(DateTime), + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The type of name the device is referred by. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-nametype|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, } -/// FHIR DeviceUseStatement type -/// -/// A record of a device being used by a patient where the record is the result -/// of a report from the patient or another clinician. +/// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// The actual configuration settings of a device as it actually operates, e.g., +/// regulation status, time properties. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [DeviceUseStatement](http://hl7.org/fhir/StructureDefinition/DeviceUseStatement) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "timing")] -pub struct DeviceUseStatement { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct DeviceProperty { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible) /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Property value as a quantity /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Property value as a quantity. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "valueQuantity")] + pub value_quantity: Option>, + /// Property value as a code, e.g., NTP4 (synced to NTP) /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// Property value as a code, e.g., NTP4 (synced to NTP). /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "valueCode")] + pub value_code: Option>, +} + +/// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication +/// +/// The capabilities supported on a device, the standards to which the device +/// conforms for a particular purpose, and used for the communication. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DeviceSpecialization { + /// Unique id for inter-element referencing /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -45184,16 +44118,16 @@ pub struct DeviceUseStatement { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -45218,7 +44152,8 @@ pub struct DeviceUseStatement { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -45227,80 +44162,143 @@ pub struct DeviceUseStatement { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// External identifier for this record + /// The standard that is used to operate and communicate /// - /// An external identifier for this statement such as an IRI. + /// The standard that is used to operate and communicate. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// Σ + #[fhir_serde(rename = "systemType")] + pub system_type: CodeableConcept, + /// The version of the standard that is used to operate and communicate + /// + /// The version of the standard that is used to operate and communicate. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Fulfills plan, proposal or order + pub version: Option, +} + +/// Unique Device Identifier (UDI) Barcode string +/// +/// Unique device identifier (UDI) assigned to device label or package. Note that +/// the Device may include multiple udiCarriers as it either may include just the +/// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it +/// could have been sold. +/// +/// ## Implementation Notes +/// UDI may identify an unique instance of a device, or it may only identify the +/// type of the device. See [UDI mappings](device-mappings.html#udi) for a +/// complete mapping of UDI parts to Device. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DeviceUdiCarrier { + /// Unique id for inter-element referencing /// - /// A plan, proposal or order that is fulfilled in whole or in part by this - /// DeviceUseStatement. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Requirements - /// Allows tracing of authorization for the DeviceUseStatement and tracking - /// whether proposals/recommendations were acted upon. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Cardinality: Optional, Multiple (0..*) + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Special Semantics - /// - Included in summary + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// fulfills - #[fhir_serde(rename = "basedOn")] - pub based_on: Option>, - /// active | completed | entered-in-error + + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// A code representing the patient or other source's judgment about the state of - /// the device used that this statement is about. Generally this will be active - /// or completed. + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. /// - /// ## Implementation Notes - /// DeviceUseStatment is a statement at a point in time. The status is only - /// representative at the point when it was asserted. The value set for contains - /// codes that assert the status of the use by the patient (for example, stopped - /// or on hold) as well as codes that assert the status of the resource itself - /// (for example, entered in error). + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// - /// This element is labeled as a modifier because the status contains the codes - /// that mark the statement as not currently valid. + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A coded concept indicating the current status of the Device Usage. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-statement-status|4.0.1 - pub status: Code, - /// Patient using device + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Mandatory fixed portion of UDI /// - /// The patient who used the device. + /// The device identifier (DI) is a mandatory, fixed portion of a UDI that + /// identifies the labeler and the specific version or model of a device. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -45308,45 +44306,65 @@ pub struct DeviceUseStatement { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Reference, - /// Supporting information - /// - /// Allows linking the DeviceUseStatement to the underlying Request, or to other - /// information that supports or is used to derive the DeviceUseStatement. /// - /// ## Implementation Notes - /// The most common use cases for deriving a DeviceUseStatement comes from - /// creating it from a request or from an observation or a claim. it should be - /// noted that the amount of information that is available varies from the type - /// resource that you derive the DeviceUseStatement from. + /// ## Aliases + /// DI + #[fhir_serde(rename = "deviceIdentifier")] + pub device_identifier: Option, + /// UDI Issuing Organization /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Organization that is charged with issuing UDIs for devices. For example, the + /// US FDA issuers include : + /// 1) GS1: + /// http://hl7.org/fhir/NamingSystem/gs1-di, + /// 2) HIBCC: + /// http://hl7.org/fhir/NamingSystem/hibcc-dI, + /// 3) ICCBBA for blood containers: + /// http://hl7.org/fhir/NamingSystem/iccbba-blood-di, + /// 4) ICCBA for other devices: + /// http://hl7.org/fhir/NamingSystem/iccbba-other-di. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "derivedFrom")] - pub derived_from: Option>, - /// How often the device was used /// - /// How often the device was used. + /// ## Aliases + /// Barcode System + pub issuer: Option, + /// Regional UDI authority /// - /// ## Cardinality: Optional (0..1) + /// The identity of the authoritative source for UDI generation within a + /// jurisdiction. All UDIs are globally unique within a single namespace with the + /// appropriate repository uri as the system. For example, UDIs of devices + /// managed in the U.S. by the FDA, the value is + /// http://hl7.org/fhir/NamingSystem/fda-udi. /// - /// ## Special Semantics - /// - Included in summary + /// ## Requirements + /// Allows a recipient of a UDI to know which database will contain the + /// UDI-associated metadata. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub timing: Option, - /// When statement was recorded + pub jurisdiction: Option, + /// UDI Machine Readable Barcode String /// - /// The time at which the statement was made/recorded. + /// The full UDI carrier of the Automatic Identification and Data Capture (AIDC) + /// technology representation of the barcode string as printed on the packaging + /// of the device - e.g., a barcode or RFID. Because of limitations on character + /// sets in XML and the need to round-trip JSON data through XML, AIDC Formats + /// *SHALL* be base64 encoded. + /// + /// ## Implementation Notes + /// The AIDC form of UDIs should be scanned or otherwise used for the + /// identification of the device whenever possible to minimize errors in records + /// resulting from manual transcriptions. If separate barcodes for DI and PI are + /// present, concatenate the string with DI first and in order of human readable + /// expression on label. /// /// ## Cardinality: Optional (0..1) /// @@ -45356,11 +44374,19 @@ pub struct DeviceUseStatement { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "recordedOn")] - pub recorded_on: Option, - /// Who made the statement /// - /// Who reported the device was being used by the patient. + /// ## Aliases + /// Automatic Identification and Data Capture + #[fhir_serde(rename = "carrierAIDC")] + pub carrier_a_i_d_c: Option, + /// UDI Human Readable Barcode String + /// + /// The full UDI carrier as the human readable form (HRF) representation of the + /// barcode string as printed on the packaging of the device. + /// + /// ## Implementation Notes + /// If separate barcodes for DI and PI are present, concatenate the string with + /// DI first and in order of human readable expression on label. /// /// ## Cardinality: Optional (0..1) /// @@ -45370,110 +44396,175 @@ pub struct DeviceUseStatement { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub source: Option, - /// Reference to device used /// - /// The details of the device used. + /// ## Aliases + /// Human Readable Form + #[fhir_serde(rename = "carrierHRF")] + pub carrier_h_r_f: Option, + /// barcode | rfid | manual + /// - /// ## Cardinality: Required (1..1) + /// A coded entry to indicate how the data was entered. /// - /// ## Special Semantics - /// - Included in summary + /// ## Requirements + /// Supports a way to distinguish hand entered from machine read data. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub device: Reference, - /// Why device was used /// - /// Reason or justification for the use of the device. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Codes to identify how UDI data was entered. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/udi-entry-type|4.0.1 + #[fhir_serde(rename = "entryType")] + pub entry_type: Option, +} + +/// The actual design of the device or software version running on the device +/// +/// The actual design of the device or software version running on the device. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DeviceVersion { + /// Unique id for inter-element referencing /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Why was DeviceUseStatement performed? + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Indicates another resource whose existence justifies this DeviceUseStatement. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// Target body site + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Indicates the anotomic location on the subject's body where the device was - /// used ( i.e. the target). + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// The type of the device version /// - /// ## Requirements - /// Knowing where the device is targeted is important for tracking if multiple - /// sites are possible. If more information than just a code is required, use the - /// extension [http://hl7.org/fhir/StructureDefinition/bodySite](null.html). + /// The type of the device version. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes describing anatomical locations. May include laterality. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/body-site - #[fhir_serde(rename = "bodySite")] - pub body_site: Option, - /// Addition details (comments, instructions) + /// ## Aliases + /// Σ + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// A single component of the device version /// - /// Details about the device statement that were not represented at all or - /// sufficiently in one of the attributes provided in a class. These may include - /// for example a comment, an instruction, or a note associated with the - /// statement. + /// A single component of the device version. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, + pub component: Option, + /// The version text + /// + /// The version text. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub value: String, } -/// Choice of types for the effective\[x\] field in DiagnosticReport +/// Choice of types for the manufacturer\[x\] field in DeviceDefinition #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "effective")] -pub enum DiagnosticReportEffective { - /// Variant accepting the DateTime type. - #[fhir_serde(rename = "effectiveDateTime")] - DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "effectivePeriod")] - Period(Period), +#[fhir_choice_element(base_name = "manufacturer")] +pub enum DeviceDefinitionManufacturer { + /// Variant accepting the String type. + #[fhir_serde(rename = "manufacturerString")] + String(String), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "manufacturerReference")] + Reference(Reference), } -/// FHIR DiagnosticReport type -/// -/// The findings and interpretation of diagnostic tests performed on patients, -/// groups of patients, devices, and locations, and/or specimens derived from -/// these. The report includes clinical context such as requesting and provider -/// information, and some mix of atomic results, images, textual and coded -/// interpretations, and formatted representation of diagnostic reports. +/// FHIR DeviceDefinition type /// -/// ## Purpose -/// To support reporting for any diagnostic report into a clinical data repository. +/// The characteristics, operational status and capabilities of a medical-related +/// component of a medical device. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -45481,10 +44572,10 @@ pub enum DiagnosticReportEffective { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [DiagnosticReport](http://hl7.org/fhir/StructureDefinition/DiagnosticReport) +/// See: [DeviceDefinition](http://hl7.org/fhir/StructureDefinition/DeviceDefinition) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "effective")] -pub struct DiagnosticReport { +#[fhir_resource(choice_elements = "manufacturer")] +pub struct DeviceDefinition { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -45684,94 +44775,69 @@ pub struct DiagnosticReport { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business identifier for report - /// - /// Identifiers assigned to this report by the performer or other systems. - /// - /// ## Requirements - /// Need to know what identifier to use when making queries about this report - /// from the source laboratory, and for linking to the report outside FHIR - /// context. + /// Instance identifier /// - /// ## Implementation Notes - /// Usually assigned by the Information System of the diagnostic service provider - /// (filler id). + /// Unique instance identifiers assigned to a device by the software, + /// manufacturers, other organizations or owners. For example: handle ID. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// ReportID, Filler ID, Placer ID pub identifier: Option>, - /// What was requested - /// - /// Details concerning a service requested. - /// - /// ## Requirements - /// This allows tracing of authorization for the report and tracking whether - /// proposals/recommendations were acted upon. + /// Unique Device Identifier (UDI) Barcode string /// - /// ## Implementation Notes - /// Note: Usually there is one test request for each result, however in some - /// circumstances multiple test requests may be represented using a single test - /// result resource. Note that there are also cases where one request leads to - /// multiple reports. + /// Unique device identifier (UDI) assigned to device label or package. Note that + /// the Device may include multiple udiCarriers as it either may include just the + /// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it + /// could have been sold. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "udiDeviceIdentifier")] + pub udi_device_identifier: Option>, + /// Name of device manufacturer /// - /// ## Aliases - /// Request - #[fhir_serde(rename = "basedOn")] - pub based_on: Option>, - /// registered | partial | preliminary | final + + /// A name of the manufacturer. /// - /// The status of the diagnostic report. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Diagnostic services routinely issue provisional/incomplete reports, and - /// sometimes withdraw previously released reports. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub manufacturer: Option, + /// A name given to the device to identify it /// - /// ## Cardinality: Required (1..1) + /// A name given to the device to identify it. /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "deviceName")] + pub device_name: Option>, + /// The model number for the device /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the diagnostic report. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnostic-report-status|4.0.1 - pub status: Code, - /// Service category + /// The model number for the device. /// - /// A code that classifies the clinical discipline, department or diagnostic - /// service that created the report (e.g. cardiology, biochemistry, hematology, - /// MRI). This is used for searching, sorting and display purposes. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// Multiple categories are allowed using various categorization schemes. The - /// level of granularity is defined by the category concepts in the value set. - /// More fine-grained filtering can be performed using the metadata and/or - /// terminology hierarchy in DiagnosticReport.code. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "modelNumber")] + pub model_number: Option, + /// What kind of device or device system this is /// - /// ## Cardinality: Optional, Multiple (0..*) + /// What kind of device or device system this is. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -45779,43 +44845,36 @@ pub struct DiagnosticReport { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes for diagnostic service sections. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnostic-service-sections - /// - /// ## Aliases - /// Department, Sub-department, Service, Discipline - pub category: Option>, - /// Name/Code for this diagnostic report - /// - /// A code or name that describes this diagnostic report. + /// - **Description**: Type of device e.g. according to official classification. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-kind + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication /// - /// ## Cardinality: Required (1..1) + /// The capabilities supported on a device, the standards to which the device + /// conforms for a particular purpose, and used for the communication. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub specialization: Option>, + /// Available versions /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Codes that describe Diagnostic Reports. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/report-codes + /// The available versions of the device, e.g., software versions. /// - /// ## Aliases - /// Type - pub code: CodeableConcept, - /// The subject of the report - usually, but not always, the patient + /// ## Cardinality: Optional, Multiple (0..*) /// - /// The subject of the report. Usually, but not always, this is a patient. - /// However, diagnostic services also perform analyses on specimens collected - /// from a variety of other sources. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option>, + /// Safety characteristics of the device /// - /// ## Requirements - /// SHALL know the subject context. + /// Safety characteristics of the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -45824,212 +44883,143 @@ pub struct DiagnosticReport { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// Patient - pub subject: Option, - /// Health care event when test ordered + /// ## Binding + /// - **Strength**: example + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-safety + pub safety: Option>, + /// Shelf Life and storage information /// - /// The healthcare event (e.g. a patient and healthcare provider interaction) - /// which this DiagnosticReport is about. + /// Shelf Life and storage information. /// - /// ## Requirements - /// Links the request to the Encounter context. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// This will typically be the encounter the event occurred within, but some - /// events may be initiated prior to or after the official completion of an - /// encounter but still be tied to the context of the encounter (e.g. - /// pre-admission laboratory tests). + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "shelfLifeStorage")] + pub shelf_life_storage: Option>, + /// Dimensions, color etc. /// - /// ## Cardinality: Optional (0..1) + /// Dimensions, color etc. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "physicalCharacteristics")] + pub physical_characteristics: Option, + /// Language code for the human-readable text strings produced by the device (all supported) /// - /// ## Aliases - /// Context - pub encounter: Option, - /// Clinically relevant time/time-period for report - /// - /// The time or time-period the observed values are related to. When the subject - /// of the report is a patient, this is usually either the time of the procedure - /// or of specimen collection(s), but very often the source of the date/time is - /// not known, only the date/time itself. + /// Language code for the human-readable text strings produced by the device (all + /// supported). /// - /// ## Requirements - /// Need to know where in the patient history to file/present this report. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// If the diagnostic procedure was performed on the patient, this is the time it - /// was performed. If there are specimens, the diagnostically relevant time can - /// be derived from the specimen collection times, but the specimen information - /// is not always available, and the exact relationship between the specimens and - /// the diagnostically relevant time is not always automatic. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "languageCode")] + pub language_code: Option>, + /// Device capabilities /// - /// ## Cardinality: Optional (0..1) + /// Device capabilities. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub capability: Option>, + /// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties /// - /// ## Aliases - /// Observation time, Effective Time, Occurrence - #[fhir_serde(flatten)] - pub effective: Option, - /// DateTime this version was made + /// The actual configuration settings of a device as it actually operates, e.g., + /// regulation status, time properties. /// - /// The date and time that this version of the report was made available to - /// providers, typically after the report was reviewed and verified. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Requirements - /// Clinicians need to be able to check the date that the report was released. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub property: Option>, + /// Organization responsible for device /// - /// ## Implementation Notes - /// May be different from the update time of the resource itself, because that is - /// the status of the record (potentially a secondary copy), not the actual - /// release time of the report. + /// An organization that is responsible for the provision and ongoing maintenance + /// of the device. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub owner: Option, + /// Details for human/organization for support /// - /// ## Aliases - /// Date published, Date Issued, Date Verified - pub issued: Option, - /// Responsible Diagnostic Service - /// - /// The diagnostic service that is responsible for issuing the report. - /// - /// ## Requirements - /// Need to know whom to contact if there are queries about the results. Also may - /// need to track the source of reports for secondary data analysis. + /// Contact details for an organization or a particular human that is responsible + /// for the device. /// /// ## Implementation Notes - /// This is not necessarily the source of the atomic data items or the entity - /// that interpreted the results. It is the entity that takes responsibility for - /// the clinical report. + /// used for troubleshooting etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub contact: Option>, + /// Network address to contact device /// - /// ## Aliases - /// Laboratory, Service, Practitioner, Department, Company, Authorized by, Director - pub performer: Option>, - /// Primary result interpreter - /// - /// The practitioner or organization that is responsible for the report's - /// conclusions and interpretations. - /// - /// ## Requirements - /// Need to know whom to contact if there are queries about the results. Also may - /// need to track the source of reports for secondary data analysis. + /// A network address on which the device may be contacted directly. /// /// ## Implementation Notes - /// Might not be the same entity that takes responsibility for the clinical - /// report. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// If the device is running a FHIR server, the network address should be the + /// Base URL from which a conformance statement may be retrieved. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub url: Option, + /// Access to on-line information /// - /// ## Aliases - /// Analyzed by, Reported by - #[fhir_serde(rename = "resultsInterpreter")] - pub results_interpreter: Option>, - /// Specimens this report is based on + /// Access to on-line information about the device. /// - /// Details about the specimens on which this diagnostic report is based. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Need to be able to report information about the collected specimens on which - /// the report is based. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "onlineInformation")] + pub online_information: Option, + /// Device notes and comments /// - /// ## Implementation Notes - /// If the specimen is sufficiently specified with a code in the test result - /// name, then this additional data may be redundant. If there are multiple - /// specimens, these may be represented per observation or group. + /// Descriptive information, usage information or implantation information that + /// is not captured in an existing element. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub specimen: Option>, - /// Observations - /// - /// [Observations](observation.html) that are part of this diagnostic report. - /// - /// ## Requirements - /// Need to support individual results, or groups of results, where the result - /// grouping is arbitrary, but meaningful. + pub note: Option>, + /// The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product) /// - /// ## Implementation Notes - /// Observations can contain observations. + /// The quantity of the device present in the packaging (e.g. the number of + /// devices present in a pack, or the number of devices in the same package of + /// the medicinal product). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// The parent device it can be part of /// - /// ## Aliases - /// Data, Atomic Value, Result, Atomic result, Data, Test, Analyte, Battery, Organizer - pub result: Option>, - /// Reference to full details of imaging associated with the diagnostic report + /// The parent device it can be part of. /// - /// One or more links to full details of any imaging performed during the - /// diagnostic investigation. Typically, this is imaging performed by DICOM - /// enabled modalities, but this is not required. A fully enabled PACS viewer can - /// use this information to provide views of the source images. - /// - /// ## Implementation Notes - /// ImagingStudy and the image element are somewhat overlapping - typically, the - /// list of image references in the image element will also be found in one of - /// the imaging study resources. However, each caters to different types of - /// displays for different types of purposes. Neither, either, or both may be - /// provided. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "imagingStudy")] - pub imaging_study: Option>, - /// Key images associated with this report - /// - /// A list of key images associated with this report. The images are generally - /// created during the diagnostic process, and may be directly of the patient, or - /// of treated specimens (i.e. slides of interest). - /// - /// ## Requirements - /// Many diagnostic services include images in the report as part of their - /// service. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -46037,91 +45027,31 @@ pub struct DiagnosticReport { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "parentDevice")] + pub parent_device: Option, + /// A substance used to create the material(s) of which the device is made /// - /// ## Aliases - /// DICOM, Slides, Scans - pub media: Option>, - /// Clinical conclusion (interpretation) of test results - /// - /// Concise and clinically contextualized summary conclusion - /// (interpretation/impression) of the diagnostic report. - /// - /// ## Requirements - /// Need to be able to provide a conclusion that is not lost among the basic - /// result data. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// Report - pub conclusion: Option, - /// Codes for the clinical conclusion of test results - /// - /// One or more codes that represent the summary conclusion - /// (interpretation/impression) of the diagnostic report. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Diagnosis codes provided as adjuncts to the report. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings - #[fhir_serde(rename = "conclusionCode")] - pub conclusion_code: Option>, - /// Entire report as issued - /// - /// Rich text representation of the entire result as issued by the diagnostic - /// service. Multiple formats are allowed but they SHALL be semantically - /// equivalent. - /// - /// ## Requirements - /// Gives laboratory the ability to provide its own fully formatted report for - /// clinical fidelity. - /// - /// ## Implementation Notes - /// "application/pdf" is recommended as the most reliable and interoperable in - /// this context. + /// A substance used to create the material(s) of which the device is made. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "presentedForm")] - pub presented_form: Option>, + pub material: Option>, } -/// Key images associated with this report -/// -/// A list of key images associated with this report. The images are generally -/// created during the diagnostic process, and may be directly of the patient, or -/// of treated specimens (i.e. slides of interest). +/// Device capabilities /// -/// ## Requirements -/// Many diagnostic services include images in the report as part of their -/// service. +/// Device capabilities. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Aliases -/// DICOM, Slides, Scans #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DiagnosticReportMedia { +pub struct DeviceDefinitionCapability { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -46202,190 +45132,178 @@ pub struct DiagnosticReportMedia { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Comment about the image (e.g. explanation) - /// - /// A comment about the image. Typically, this is used to provide an explanation - /// for why the image is included, or to draw the viewer's attention to important - /// features. - /// - /// ## Requirements - /// The provider of the report should make a comment about each image included in - /// the report. + /// Type of capability /// - /// ## Implementation Notes - /// The comment should be displayed with the image. It would be common for the - /// report to include additional discussion of the image contents in other - /// sections such as the conclusion. + /// Type of capability. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub comment: Option, - /// Reference to the image source - /// - /// Reference to the image source. + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Description of capability /// - /// ## Cardinality: Required (1..1) + /// Description of capability. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub link: Reference, + pub description: Option>, } -/// FHIR DocumentManifest type -/// -/// A collection of documents compiled for a purpose together with metadata that -/// applies to the collection. +/// A name given to the device to identify it /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// A name given to the device to identify it. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [DocumentManifest](http://hl7.org/fhir/StructureDefinition/DocumentManifest) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentManifest { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct DeviceDefinitionDeviceName { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// The name of the device /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// The name of the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// ## Aliases + /// Σ + pub name: String, + /// udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// The type of deviceName. + /// UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName + /// | ModelName. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The type of name the device is referred by. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-nametype|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, +} + +/// A substance used to create the material(s) of which the device is made +/// +/// A substance used to create the material(s) of which the device is made. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DeviceDefinitionMaterial { + /// Unique id for inter-element referencing /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -46405,16 +45323,16 @@ pub struct DocumentManifest { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -46439,7 +45357,8 @@ pub struct DocumentManifest { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -46448,237 +45367,173 @@ pub struct DocumentManifest { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Unique Identifier for the set of documents - /// - /// A single identifier that uniquely identifies this manifest. Principally used - /// to refer to the manifest in non-FHIR contexts. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "masterIdentifier")] - pub master_identifier: Option, - /// Other identifiers for the manifest - /// - /// Other identifiers associated with the document manifest, including version - /// independent identifiers. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// current | superseded | entered-in-error - /// - /// The status of this document manifest. + /// The substance /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains the codes - /// that mark the manifest as not currently valid. + /// The substance. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub substance: CodeableConcept, + /// Indicates an alternative material of the device /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the document reference. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 - pub status: Code, - /// Kind of document set - /// - /// The code specifying the type of clinical activity that resulted in placing - /// the associated content into the DocumentManifest. - /// - /// ## Implementation Notes - /// Specifies the kind of this set of documents (e.g. Patient Summary, Discharge - /// Summary, Prescription, etc.). The type of a set of documents may be the same - /// as one of the documents in it - especially if there is only one - but it may - /// be wider. + /// Indicates an alternative material of the device. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub alternate: Option, + /// Whether the substance is a known or suspected allergen /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The activity that caused the DocumentManifest to be created. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// The subject of the set of documents - /// - /// Who or what the set of documents is about. The documents can be about a - /// person, (patient or healthcare practitioner), a device (i.e. machine) or even - /// a group of subjects (such as a document about a herd of farm animals, or a - /// set of patients that share a common exposure). If the documents cross more - /// than one subject, then more than one subject is allowed here (unusual use - /// case). + /// Whether the substance is a known or suspected allergen. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Option, - /// When this document manifest created - /// - /// When the document manifest was created for submission to the server (not - /// necessarily the same thing as the actual resource last modified time, since - /// it may be modified, replicated, etc.). + #[fhir_serde(rename = "allergenicIndicator")] + pub allergenic_indicator: Option, +} + +/// The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties +/// +/// The actual configuration settings of a device as it actually operates, e.g., +/// regulation status, time properties. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct DeviceDefinitionProperty { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// Creation time is used for tracking, organizing versions and searching. This - /// is the creation time of the document set, not the documents on which it is - /// based. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub created: Option, - /// Who and/or what authored the DocumentManifest - /// - /// Identifies who is the author of the manifest. Manifest author is not - /// necessarly the author of the references included. - /// - /// ## Implementation Notes - /// Not necessarily who did the actual data entry (i.e. typist) or who was the - /// source (informant). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Intended to get notified about this set of documents - /// - /// A patient, practitioner, or organization for which this set of documents is - /// intended. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// How the recipient receives the document set or is notified of it is up to the - /// implementation. This element is just a statement of intent. If the recipient - /// is a person, and it is not known whether the person is a patient or a - /// practitioner, RelatedPerson would be the default choice. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub recipient: Option>, - /// The source system/application/software - /// - /// Identifies the source system, application, or software that produced the - /// document manifest. + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Cardinality: Optional (0..1) + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub source: Option, - /// Human-readable description (title) + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. /// - /// Human-readable description of the source document. This is sometimes known as - /// the "title". + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Helps humans to assess whether the document is of interest. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// What the document is about, rather than a terse summary of the document. It - /// is commonly the case that records do not have a title and are collectively - /// referred to by the display name of Record code (e.g. a "consultation" or - /// "progress note"). + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Items in manifest + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The list of Resources that consist of the parts of this manifest. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible) /// - /// ## Requirements - /// Any Resources are allowed to be grouped in a Manifest. The manifest brings - /// context to the group. + /// Code that specifies the property DeviceDefinitionPropetyCode (Extensible). /// - /// ## Implementation Notes - /// When used for XDS the intended focus of the DocumentManifest is for the - /// reference to target to be a set of DocumentReference Resources. The reference - /// is to "Any" to support EN 13606 usage, where an extract is DocumentManifest - /// that references List and Composition resources. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Property value as a quantity /// - /// ## Special Semantics - /// - Included in summary + /// Property value as a quantity. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub content: Option>, - /// Related things - /// - /// Related identifiers or resources associated with the DocumentManifest. + #[fhir_serde(rename = "valueQuantity")] + pub value_quantity: Option>, + /// Property value as a code, e.g., NTP4 (synced to NTP) /// - /// ## Implementation Notes - /// May be identifiers or resources that caused the DocumentManifest to be - /// created. + /// Property value as a code, e.g., NTP4 (synced to NTP). /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub related: Option>, + #[fhir_serde(rename = "valueCode")] + pub value_code: Option>, } -/// Related things -/// -/// Related identifiers or resources associated with the DocumentManifest. +/// The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication /// -/// ## Implementation Notes -/// May be identifiers or resources that caused the DocumentManifest to be -/// created. +/// The capabilities supported on a device, the standards to which the device +/// conforms for a particular purpose, and used for the communication. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -46686,7 +45541,7 @@ pub struct DocumentManifest { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentManifestRelated { +pub struct DeviceDefinitionSpecialization { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -46767,57 +45622,46 @@ pub struct DocumentManifestRelated { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Identifiers of things that are related - /// - /// Related identifier to this DocumentManifest. For example, Order numbers, - /// accession numbers, XDW workflow numbers. + /// The standard that is used to operate and communicate /// - /// ## Implementation Notes - /// If both identifier and ref elements are present they shall refer to the same - /// thing. + /// The standard that is used to operate and communicate. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, - /// Related Resource /// - /// Related Resource to this DocumentManifest. For example, Order, - /// ServiceRequest, Procedure, EligibilityRequest, etc. + /// ## Aliases + /// Σ + #[fhir_serde(rename = "systemType")] + pub system_type: String, + /// The version of the standard that is used to operate and communicate /// - /// ## Implementation Notes - /// If both identifier and ref elements are present they shall refer to the same - /// thing. + /// The version of the standard that is used to operate and communicate. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "ref")] - pub r#ref: Option, + pub version: Option, } -/// Clinical context of document -/// -/// The clinical context in which the document was prepared. -/// -/// ## Implementation Notes -/// These values are primarily added to help with searching for -/// interesting/relevant documents. +/// Unique Device Identifier (UDI) Barcode string /// -/// ## Cardinality: Optional (0..1) +/// Unique device identifier (UDI) assigned to device label or package. Note that +/// the Device may include multiple udiCarriers as it either may include just the +/// udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it +/// could have been sold. /// -/// ## Special Semantics -/// - Included in summary +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentReferenceContext { +pub struct DeviceDefinitionUdiDeviceIdentifier { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -46898,134 +45742,45 @@ pub struct DocumentReferenceContext { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Context of the document content - /// - /// Describes the clinical encounter or type of care that the document content is - /// associated with. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub encounter: Option>, - /// Main clinical acts documented - /// - /// This list of codes represents the main clinical acts, such as a colonoscopy - /// or an appendectomy, being documented. In some cases, the event is inherent in - /// the type Code, such as a "History and Physical Report" in which the procedure - /// being documented is necessarily a "History and Physical" act. - /// - /// ## Implementation Notes - /// An event can further specialize the act inherent in the type, such as where - /// it is simply "Procedure Report" and the procedure was a "colonoscopy". If one - /// or more event codes are included, they shall not conflict with the values - /// inherent in the class or type elements as such a conflict would create an - /// ambiguous situation. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: This list of codes represents the main clinical acts being documented. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode - pub event: Option>, - /// Time of service that is being documented - /// - /// The time period over which the service that is described by the document was - /// provided. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Kind of facility where patient was seen - /// - /// The kind of facility where the patient was seen. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: XDS Facility Type. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-facilitycodes - #[fhir_serde(rename = "facilityType")] - pub facility_type: Option, - /// Additional details about where the content was created (e.g. clinical specialty) - /// - /// This property may convey specifics about the practice setting where the - /// content was created, often reflecting the clinical specialty. - /// - /// ## Requirements - /// This is an important piece of metadata that providers often rely upon to - /// quickly sort and/or filter out to find specific content. + /// The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier /// - /// ## Implementation Notes - /// This element should be based on a coarse classification system for the class - /// of specialty practice. Recommend the use of the classification system for - /// Practice Setting, such as that described by the Subject Matter Domain in - /// LOINC. + /// The identifier that is to be associated with every Device that references + /// this DeviceDefintiion for the issuer and jurisdication porvided in the + /// DeviceDefinition.udiDeviceIdentifier. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "deviceIdentifier")] + pub device_identifier: String, + /// The organization that assigns the identifier algorithm /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Additional details about where the content was created (e.g. clinical specialty). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-practice-codes - #[fhir_serde(rename = "practiceSetting")] - pub practice_setting: Option, - /// Patient demographics from source - /// - /// The Patient Information as known when the document was published. May be a - /// reference to a version specific, or contained. + /// The organization that assigns the identifier algorithm. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "sourcePatientInfo")] - pub source_patient_info: Option, - /// Related identifiers or resources - /// - /// Related identifiers or resources associated with the DocumentReference. + pub issuer: Uri, + /// The jurisdiction to which the deviceIdentifier applies /// - /// ## Implementation Notes - /// May be identifiers or resources that caused the DocumentReference or - /// referenced Document to be created. + /// The jurisdiction to which the deviceIdentifier applies. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub related: Option>, + pub jurisdiction: Uri, } -/// FHIR DocumentReference type +/// FHIR DeviceMetric type /// -/// A reference to a document of any kind for any purpose. Provides metadata -/// about the document so that the document can be discovered and managed. The -/// scope of a document is any seralized object with a mime-type, so includes -/// formal patient centric documents (CDA), cliical notes, scanned paper, and -/// non-patient specific documents like policy text. +/// Describes a measurement, calculation or setting capability of a medical +/// device. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -47033,9 +45788,9 @@ pub struct DocumentReferenceContext { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [DocumentReference](http://hl7.org/fhir/StructureDefinition/DocumentReference) +/// See: [DeviceMetric](http://hl7.org/fhir/StructureDefinition/DeviceMetric) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentReference { +pub struct DeviceMetric { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -47235,38 +45990,16 @@ pub struct DocumentReference { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Master Version Specific Identifier - /// - /// Document identifier as assigned by the source of the document. This - /// identifier is specific to this version of the document. This unique - /// identifier may be used elsewhere to identify this version of the document. + /// Instance identifier /// - /// ## Requirements - /// The structure and format of this Id shall be consistent with the - /// specification corresponding to the formatCode attribute. (e.g. for a DICOM - /// standard document a 64-character numeric UID, for an HL7 CDA format a - /// serialization of the CDA Document Id extension and root in the form - /// "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char - /// max. If the OID is coded without the extension then the '^' character shall - /// not be included.). + /// Unique instance identifiers assigned to a device by the device or gateway + /// software, manufacturers, other organizations or owners. For example: handle + /// ID. /// /// ## Implementation Notes - /// CDA Document Id extension and root. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "masterIdentifier")] - pub master_identifier: Option, - /// Other identifiers for the document - /// - /// Other identifiers associated with the document, including version independent - /// identifiers. + /// For identifiers assigned to a device by the device or gateway software, the + /// `system` element of the identifier should be set to the unique identifier of + /// the device. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -47277,21 +46010,16 @@ pub struct DocumentReference { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// current | superseded | entered-in-error + /// Identity of metric, for example Heart Rate or PEEP Setting /// - /// The status of this document reference. + /// Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc. /// /// ## Implementation Notes - /// This is the status of the DocumentReference object, which might be - /// independent from the docStatus element. - /// - /// This element is labeled as a modifier because the status contains the codes - /// that mark the document or reference as not currently valid. + /// DeviceMetric.type can be referred to either IEEE 11073-10101 or LOINC. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -47299,16 +46027,19 @@ pub struct DocumentReference { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the document reference. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 - pub status: Code, - /// preliminary | final | amended | entered-in-error + /// - **Strength**: preferred + /// - **Description**: Describes the metric type. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/devicemetric-type + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Unit of Measure for the Metric /// - /// The status of the underlying document. + /// Describes the unit that an observed value determined for this metric will + /// have. For example: Percent, Seconds, etc. /// /// ## Implementation Notes - /// The document that is pointed to might be in various lifecycle states. + /// DeviceMetric.unit can refer to either UCUM or preferable a RTMMS coding + /// system. /// /// ## Cardinality: Optional (0..1) /// @@ -47320,21 +46051,15 @@ pub struct DocumentReference { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Status of the underlying document. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/composition-status|4.0.1 - #[fhir_serde(rename = "docStatus")] - pub doc_status: Option, - /// Kind of document (LOINC if possible) - /// - /// Specifies the particular kind of document referenced (e.g. History and - /// Physical, Discharge Summary, Progress Note). This usually equates to the - /// purpose of making the document referenced. + /// - **Strength**: preferred + /// - **Description**: Describes the unit of the metric. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/devicemetric-type + pub unit: Option, + /// Describes the link to the source Device /// - /// ## Implementation Notes - /// Key metadata element describing the document that describes he exact type of - /// document. Helps humans to assess whether the document is of interest when - /// viewing a list of documents. + /// Describes the link to the Device that this DeviceMetric belongs to and that + /// contains administrative device information such as manufacturer, serial + /// number, etc. /// /// ## Cardinality: Optional (0..1) /// @@ -47344,25 +46069,17 @@ pub struct DocumentReference { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub source: Option, + /// Describes the link to the parent Device /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Precise type of clinical document. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Categorization of document - /// - /// A categorization for the type of document referenced - helps for indexing and - /// searching. This may be implied by or derived from the code specified in the - /// DocumentReference.type. - /// - /// ## Implementation Notes - /// Key metadata element describing the the category or classification of the - /// document. This is a broader perspective that groups similar documents based - /// on how they would be used. This is a primary key used in searching. + /// Describes the link to the Device that this DeviceMetric belongs to and that + /// provide information about the location of this DeviceMetric in the + /// containment structure of the parent Device. An example would be a Device that + /// represents a Channel. This reference can be used by a client application to + /// distinguish DeviceMetrics that have the same type, but should be interpreted + /// based on their containment location. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -47370,21 +46087,11 @@ pub struct DocumentReference { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub parent: Option, + /// on | off | standby | entered-in-error /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: High-level kind of a clinical document at a macro level. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-classcodes - /// - /// ## Aliases - /// claxs - pub category: Option>, - /// Who/what is the subject of the document - /// - /// Who or what the document is about. The document can be about a person, - /// (patient or healthcare practitioner), a device (e.g. a machine) or even a - /// group of subjects (such as a document about a herd of farm animals, or a set - /// of patients that share a common exposure). + /// Indicates current operational state of the device. For example: On, Off, + /// Standby, etc. /// /// ## Cardinality: Optional (0..1) /// @@ -47394,14 +46101,20 @@ pub struct DocumentReference { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Option, - /// When this document reference was created /// - /// When the document reference was created. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Describes the operational status of the DeviceMetric. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-operational-status|4.0.1 + #[fhir_serde(rename = "operationalStatus")] + pub operational_status: Option, + /// black | red | green | yellow | blue | magenta | cyan | white /// - /// ## Implementation Notes - /// Referencing/indexing time is used for tracking, organizing versions and - /// searching. + /// Describes the color representation for the metric. This is often used to aid + /// clinicians to track and identify parameter types by color. In practice, + /// consider a Patient Monitor that has ECG/HR and Pleth for example; the + /// parameters are displayed in different characteristic colors, such as HR-blue, + /// BP-green, and PR and SpO2- magenta. /// /// ## Cardinality: Optional (0..1) /// @@ -47412,18 +46125,17 @@ pub struct DocumentReference { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// indexed - pub date: Option, - /// Who and/or what authored the document - /// - /// Identifies who is responsible for adding the information to the document. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Describes the typical color of representation. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-color|4.0.1 + pub color: Option, + /// measurement | setting | calculation | unspecified /// - /// ## Implementation Notes - /// Not necessarily who did the actual data entry (i.e. typist) or who was the - /// source (informant). + /// Indicates the category of the observation generation process. A DeviceMetric + /// can be for example a setting, measurement, or calculation. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -47431,49 +46143,37 @@ pub struct DocumentReference { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who/what authenticated the document /// - /// Which person or organization authenticates that this document is valid. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Describes the category of the metric. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-category|4.0.1 + pub category: Code, + /// Describes the measurement repetition time /// - /// ## Implementation Notes - /// Represents a participant within the author institution who has legally - /// authenticated or attested the document. Legal authentication implies that a - /// document has been signed manually or electronically by the legal - /// Authenticator. + /// Describes the measurement repetition time. This is not necessarily the same + /// as the update period. The measurement repetition time can range from + /// milliseconds up to hours. An example for a measurement repetition time in the + /// range of milliseconds is the sampling rate of an ECG. An example for a + /// measurement repetition time in the range of hours is a NIBP that is triggered + /// automatically every hour. The update period may be different than the + /// measurement repetition time, if the device does not update the published + /// observed value with the same frequency as it was measured. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub authenticator: Option, - /// Organization which maintains the document - /// - /// Identifies the organization or group who is responsible for ongoing - /// maintenance of and access to the document. - /// - /// ## Implementation Notes - /// Identifies the logical organization (software system, vendor, or department) - /// to go to find the current version, where to report issues, etc. This is - /// different from the physical location (URL, disk drive, or server) of the - /// document, which is the technical location of the document, which host may be - /// delegated to the management of some other organization. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub custodian: Option, - /// Relationships to other documents - /// - /// Relationships that this document has with other document references that - /// already exist. + #[fhir_serde(rename = "measurementPeriod")] + pub measurement_period: Option, + /// Describes the calibrations that have been performed or that are required to be performed /// - /// ## Implementation Notes - /// This element is labeled as a modifier because documents that append to other - /// documents are incomplete on their own. + /// Describes the calibrations that have been performed or that are required to + /// be performed. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -47483,111 +46183,13 @@ pub struct DocumentReference { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relatesTo")] - pub relates_to: Option>, - /// Human-readable description - /// - /// Human-readable description of the source document. - /// - /// ## Requirements - /// Helps humans to assess whether the document is of interest. - /// - /// ## Implementation Notes - /// What the document is about, a terse summary of the document. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Document security-tags - /// - /// A set of Security-Tag codes specifying the level of privacy/security of the - /// Document. Note that DocumentReference.meta.security contains the security - /// labels of the "reference" to the document, while - /// DocumentReference.securityLabel contains a snapshot of the security labels on - /// the document the reference refers to. - /// - /// ## Requirements - /// Use of the Health Care Privacy/Security Classification (HCS) system of - /// security-tag use is recommended. - /// - /// ## Implementation Notes - /// The confidentiality codes can carry multiple vocabulary items. HL7 has - /// developed an understanding of security and privacy tags that might be - /// desirable in a Document Sharing environment, called HL7 Healthcare Privacy - /// and Security Classification System (HCS). The following specification is - /// recommended but not mandated, as the vocabulary bindings are an - /// administrative domain responsibility. The use of this method is up to the - /// policy domain such as the XDS Affinity Domain or other Trust Domain where all - /// parties including sender and recipients are trusted to appropriately tag and - /// enforce. - /// - /// In the HL7 Healthcare Privacy and Security Classification (HCS) there are - /// code systems specific to Confidentiality, Sensitivity, Integrity, and - /// Handling Caveats. Some values would come from a local vocabulary as they are - /// related to workflow roles and special projects. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels - #[fhir_serde(rename = "securityLabel")] - pub security_label: Option>, - /// Document referenced - /// - /// The document and format referenced. There may be multiple content element - /// repetitions, each with a different format. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub content: Option>, - /// Clinical context of document - /// - /// The clinical context in which the document was prepared. - /// - /// ## Implementation Notes - /// These values are primarily added to help with searching for - /// interesting/relevant documents. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub context: Option, + pub calibration: Option>, } -/// Relationships to other documents -/// -/// Relationships that this document has with other document references that -/// already exist. +/// Describes the calibrations that have been performed or that are required to be performed /// -/// ## Implementation Notes -/// This element is labeled as a modifier because documents that append to other -/// documents are incomplete on their own. +/// Describes the calibrations that have been performed or that are required to +/// be performed. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -47598,7 +46200,7 @@ pub struct DocumentReference { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentReferenceRelatesTo { +pub struct DeviceMetricCalibration { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -47679,15 +46281,30 @@ pub struct DocumentReferenceRelatesTo { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// replaces | transforms | signs | appends + /// unspecified | offset | gain | two-point /// - /// The type of relationship that this document has with anther document. + /// Describes the type of the calibration method. /// - /// ## Implementation Notes - /// If this document appends another document, then the document cannot be fully - /// understood without also accessing the referenced document. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Describes the type of a metric calibration. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-calibration-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// not-calibrated | calibration-required | calibrated | unspecified + /// + /// Describes the state of the calibration. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -47698,14 +46315,14 @@ pub struct DocumentReferenceRelatesTo { /// /// ## Binding /// - **Strength**: required - /// - **Description**: The type of relationship between documents. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1 - pub code: Code, - /// Target of the relationship + /// - **Description**: Describes the state of a metric calibration. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/metric-calibration-state|4.0.1 + pub state: Option, + /// Describes the time last calibration has been performed /// - /// The target document of this relationship. + /// Describes the time last calibration has been performed. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -47713,38 +46330,185 @@ pub struct DocumentReferenceRelatesTo { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub target: Reference, + pub time: Option, } -/// Document referenced +/// Choice of types for the code\[x\] field in DeviceRequest +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "code")] +pub enum DeviceRequestCode { + /// Variant accepting the Reference type. + #[fhir_serde(rename = "codeReference")] + Reference(Reference), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "codeCodeableConcept")] + CodeableConcept(CodeableConcept), +} + +/// Choice of types for the occurrence\[x\] field in DeviceRequest +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "occurrence")] +pub enum DeviceRequestOccurrence { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "occurrenceDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "occurrencePeriod")] + Period(Period), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "occurrenceTiming")] + Timing(Timing), +} + +/// FHIR DeviceRequest type /// -/// The document and format referenced. There may be multiple content element -/// repetitions, each with a different format. +/// Represents a request for a patient to employ a medical device. The device may +/// be an implantable device, or an external assistive device, such as a walker. /// -/// ## Cardinality: Required, Multiple (1..*) +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource /// -/// ## Special Semantics -/// - Included in summary +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [DeviceRequest](http://hl7.org/fhir/StructureDefinition/DeviceRequest) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct DocumentReferenceContent { - /// Unique id for inter-element referencing +#[fhir_resource(choice_elements = "code,occurrence")] +pub struct DeviceRequest { + /// Logical id of this artifact /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created + /// + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -47764,16 +46528,16 @@ pub struct DocumentReferenceContent { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -47798,8 +46562,7 @@ pub struct DocumentReferenceContent { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -47808,15 +46571,14 @@ pub struct DocumentReferenceContent { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Where to access the document + /// External Request identifier /// - /// The document or URL of the document along with critical metadata to prove - /// content has integrity. + /// Identifiers assigned to this order by the orderer or by the receiver. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -47824,19 +46586,106 @@ pub struct DocumentReferenceContent { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub attachment: Attachment, - /// Format/content rules for the document + pub identifier: Option>, + /// Instantiates FHIR protocol or definition /// - /// An identifier of the document encoding, structure, and template that the - /// document conforms to beyond the base format indicated in the mimeType. + /// The URL pointing to a FHIR-defined protocol, guideline, orderset or other + /// definition that is adhered to in whole or in part by this DeviceRequest. /// /// ## Implementation Notes - /// Note that while IHE mostly issues URNs for format types, not all documents - /// can be identified by a URI. + /// Note: This is a business identifier, not a resource identifier (see + /// [discussion](resource.html#identifiers)). It is best practice for the + /// identifier to only appear on a single resource instance, however business + /// practices may occasionally dictate that multiple resource instances with the + /// same identifier can exist - possibly even with different resource types. For + /// example, multiple Patient and a Person resource instance might share the same + /// social insurance number. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "instantiatesCanonical")] + pub instantiates_canonical: Option>, + /// Instantiates external protocol or definition + /// + /// The URL pointing to an externally maintained protocol, guideline, orderset or + /// other definition that is adhered to in whole or in part by this + /// DeviceRequest. + /// + /// ## Implementation Notes + /// This might be an HTML page, PDF, etc. or could just be a non-resolvable URI + /// identifier. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "instantiatesUri")] + pub instantiates_uri: Option>, + /// What request fulfills + /// + /// Plan/proposal/order fulfilled by this request. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "basedOn")] + pub based_on: Option>, + /// What request replaces + /// + /// The request takes the place of the referenced completed or terminated + /// request(s). + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "priorRequest")] + pub prior_request: Option>, + /// Identifier of composite request + /// + /// Composite request this is part of. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "groupIdentifier")] + pub group_identifier: Option, + /// draft | active | on-hold | revoked | completed | entered-in-error | unknown + /// + /// The status of the request. + /// + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains the codes + /// cancelled and entered-in-error that mark the request as not currently valid. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -47844,140 +46693,301 @@ pub struct DocumentReferenceContent { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Document Format Codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/formatcodes - pub format: Option, -} - -/// What sample size was involved? -/// -/// A description of the size of the sample involved in the synthesis. -/// -/// ## Cardinality: Optional (0..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisSampleSize { - /// Unique id for inter-element referencing + /// - **Strength**: required + /// - **Description**: Codes representing the status of the request. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-status|4.0.1 + pub status: Option, + /// proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// Whether the request is a proposal, plan, an original order or a reflex order. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Modifier element - This element changes the interpretation of all descriptive attributes. For example "the time the request is recommended to occur" vs. "the time the request is authorized to occur" or "who is recommended to perform the request" vs. "who is authorized to perform the request + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: The kind of diagnostic request. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-intent|4.0.1 + pub intent: Code, + /// routine | urgent | asap | stat + /// + /// Indicates how quickly the {{title}} should be addressed with respect to other + /// requests. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Special Semantics + /// - Included in summary + /// - When missing: If missing, normal priority /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Identifies the level of importance to be assigned to actioning the request. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/request-priority|4.0.1 + pub priority: Option, + /// Device requested + /// + /// The details of the device to be used. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for devices that can be requested. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-kind + #[fhir_serde(flatten)] + pub code: Option, + /// Device details + /// + /// Specific parameters for the ordered item. For example, the prism value for + /// lenses. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub parameter: Option>, + /// Focus of request /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// The patient who will use the device. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Cardinality: Required (1..1) /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Special Semantics + /// - Included in summary /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub subject: Reference, + /// Encounter motivating request /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// An encounter that provides additional context in which this request is made. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub encounter: Option, + /// Desired time or schedule for use /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Description of sample size + /// The timing schedule for the use of the device. The Schedule data type allows + /// many different expressions, for example. "Every 8 hours"; "Three times a + /// day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct + /// 2013, 17 Oct 2013 and 1 Nov 2013". /// - /// Human-readable summary of sample size. + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub occurrence: Option, + /// When recorded + /// + /// When the request transitioned to being actionable. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// How many studies? + #[fhir_serde(rename = "authoredOn")] + pub authored_on: Option, + /// Who/what is requesting diagnostics /// - /// Number of studies included in this evidence synthesis. + /// The individual who initiated the request and has responsibility for its + /// activation. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "numberOfStudies")] - pub number_of_studies: Option, - /// How many participants? + pub requester: Option, + /// Filler role /// - /// Number of participants included in this evidence synthesis. + /// Desired type of performer for doing the diagnostic testing. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "numberOfParticipants")] - pub number_of_participants: Option, + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/participant-role + #[fhir_serde(rename = "performerType")] + pub performer_type: Option, + /// Requested Filler + /// + /// The desired performer for doing the diagnostic testing. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub performer: Option, + /// Coded Reason for request + /// + /// Reason or justification for the use of this device. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Diagnosis or problem codes justifying the reason for requesting the device. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-code + #[fhir_serde(rename = "reasonCode")] + pub reason_code: Option>, + /// Linked Reason for request + /// + /// Reason or justification for the use of this device. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "reasonReference")] + pub reason_reference: Option>, + /// Associated insurance coverage + /// + /// Insurance plans, coverage extensions, pre-authorizations and/or + /// pre-determinations that may be required for delivering the requested service. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub insurance: Option>, + /// Additional clinical information + /// + /// Additional clinical information about the patient that may influence the + /// request fulfilment. For example, this may include where on the subject's body + /// the device will be used (i.e. the target site). + /// + /// ## Requirements + /// Knowing where the device is targeted is important for tracking if multiple + /// sites are possible. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "supportingInfo")] + pub supporting_info: Option>, + /// Notes or comments + /// + /// Details about this request that were not represented at all or sufficiently + /// in one of the attributes provided in a class. These may include for example a + /// comment, an instruction, or a note associated with the statement. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, + /// Request provenance + /// + /// Key events in the history of the request. + /// + /// ## Implementation Notes + /// This might not include provenances for all versions of the request - only + /// those deemed "relevant" or important. + /// This SHALL NOT include the Provenance associated with this current version of + /// the resource. (If that provenance is deemed to be a "relevant" change, it + /// will need to be added as part of a later update. Until then, it can be + /// queried directly as the Provenance that points to this version using + /// _revinclude + /// All Provenances should have some historical version of this Request as their + /// subject. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "relevantHistory")] + pub relevant_history: Option>, } -/// How precise the estimate is +/// Choice of types for the value\[x\] field in DeviceRequestParameter +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "value")] +pub enum DeviceRequestParameterValue { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "valueCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "valueQuantity")] + Quantity(Quantity), + /// Variant accepting the Range type. + #[fhir_serde(rename = "valueRange")] + Range(Range), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "valueBoolean")] + Boolean(Boolean), +} + +/// Device details /// -/// A description of the precision of the estimate for the effect. +/// Specific parameters for the ordered item. For example, the prism value for +/// lenses. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -47985,7 +46995,8 @@ pub struct EffectEvidenceSynthesisSampleSize { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisEffectEstimatePrecisionEstimate { +#[fhir_resource(choice_elements = "value")] +pub struct DeviceRequestParameter { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -48066,9 +47077,9 @@ pub struct EffectEvidenceSynthesisEffectEstimatePrecisionEstimate { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of precision estimate + /// Device detail /// - /// Examples include confidence interval and interquartile range. + /// A code or string that identifies the device detail being asserted. /// /// ## Cardinality: Optional (0..1) /// @@ -48077,48 +47088,45 @@ pub struct EffectEvidenceSynthesisEffectEstimatePrecisionEstimate { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Method of reporting variability of estimates, such as confidence intervals, interquartile range or standard deviation. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/precision-estimate-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Level of confidence interval - /// - /// Use 95 for a 95% confidence interval. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub level: Option, - /// Lower bound - /// - /// Lower bound of confidence interval. - /// - /// ## Cardinality: Optional (0..1) + /// - **Strength**: example + /// - **Description**: A code that identifies the device detail. + pub code: Option, + /// Value of detail /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub from: Option, - /// Upper bound + /// The value of the device detail. /// - /// Upper bound of confidence interval. + /// ## Implementation Notes + /// Range means device should have a value that falls somewhere within the + /// specified range. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub to: Option, + #[fhir_serde(flatten)] + pub value: Option, } -/// FHIR EffectEvidenceSynthesis type +/// Choice of types for the timing\[x\] field in DeviceUseStatement +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "timing")] +pub enum DeviceUseStatementTiming { + /// Variant accepting the Timing type. + #[fhir_serde(rename = "timingTiming")] + Timing(Timing), + /// Variant accepting the Period type. + #[fhir_serde(rename = "timingPeriod")] + Period(Period), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "timingDateTime")] + DateTime(DateTime), +} + +/// FHIR DeviceUseStatement type /// -/// The EffectEvidenceSynthesis resource describes the difference in an outcome -/// between exposures states in a population where the effect estimate is derived -/// from a combination of research studies. +/// A record of a device being used by a patient where the record is the result +/// of a report from the patient or another clinician. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -48126,9 +47134,10 @@ pub struct EffectEvidenceSynthesisEffectEstimatePrecisionEstimate { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [EffectEvidenceSynthesis](http://hl7.org/fhir/StructureDefinition/EffectEvidenceSynthesis) +/// See: [DeviceUseStatement](http://hl7.org/fhir/StructureDefinition/DeviceUseStatement) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesis { +#[fhir_resource(choice_elements = "timing")] +pub struct DeviceUseStatement { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -48328,35 +47337,11 @@ pub struct EffectEvidenceSynthesis { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Canonical identifier for this effect evidence synthesis, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this effect evidence synthesis when - /// it is referenced in a specification, model, design or an instance; also - /// called its canonical identifier. This SHOULD be globally unique and SHOULD be - /// a literal address at which at which an authoritative instance of this effect - /// evidence synthesis is (or will be) published. This URL can be the target of a - /// canonical reference. It SHALL remain the same when the effect evidence - /// synthesis is stored on different servers. - /// - /// ## Requirements - /// Allows the effect evidence synthesis to be referenced by a single globally - /// unique identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). + /// External identifier for this record /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. + /// An external identifier for this statement such as an IRI. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -48364,21 +47349,15 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Additional identifier for the effect evidence synthesis + pub identifier: Option>, + /// Fulfills plan, proposal or order /// - /// A formal identifier that is used to identify this effect evidence synthesis - /// when it is represented in other formats, or referenced in a specification, - /// model, design or an instance. + /// A plan, proposal or order that is fulfilled in whole or in part by this + /// DeviceUseStatement. /// /// ## Requirements - /// Allows externally provided and/or usable business identifiers to be easily - /// associated with the module. - /// - /// ## Implementation Notes - /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance - /// identifier) data type, and can then identify this effect evidence synthesis - /// outside of FHIR, where it is not possible to use the logical URI. + /// Allows tracing of authorization for the DeviceUseStatement and tracking + /// whether proposals/recommendations were acted upon. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -48388,46 +47367,47 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Business version of the effect evidence synthesis /// - /// The identifier that is used to identify this version of the effect evidence - /// synthesis when it is referenced in a specification, model, design or - /// instance. This is an arbitrary value managed by the effect evidence synthesis - /// author and is not expected to be globally unique. For example, it might be a - /// timestamp (e.g. yyyymmdd) if a managed version is not available. There is - /// also no expectation that versions can be placed in a lexicographical - /// sequence. + /// ## Aliases + /// fulfills + #[fhir_serde(rename = "basedOn")] + pub based_on: Option>, + /// active | completed | entered-in-error + + /// + /// A code representing the patient or other source's judgment about the state of + /// the device used that this statement is about. Generally this will be active + /// or completed. /// /// ## Implementation Notes - /// There may be different effect evidence synthesis instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// effect evidence synthesis with the format [url]|[version]. + /// DeviceUseStatment is a statement at a point in time. The status is only + /// representative at the point when it was asserted. The value set for contains + /// codes that assert the status of the use by the patient (for example, stopped + /// or on hold) as well as codes that assert the status of the resource itself + /// (for example, entered in error). /// - /// ## Cardinality: Optional (0..1) + /// This element is labeled as a modifier because the status contains the codes + /// that mark the statement as not currently valid. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this effect evidence synthesis (computer friendly) - /// - /// A natural language name identifying the effect evidence synthesis. This name - /// should be usable as an identifier for the module by machine processing - /// applications such as code generation. /// - /// ## Requirements - /// Support human navigation and code generation. + /// ## Binding + /// - **Strength**: required + /// - **Description**: A coded concept indicating the current status of the Device Usage. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/device-statement-status|4.0.1 + pub status: Code, + /// Patient using device /// - /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + /// The patient who used the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -48435,19 +47415,19 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub subject: Reference, + /// Supporting information /// - /// ## Conditions - /// Used when: inv-0 - pub name: Option, - /// Name for this effect evidence synthesis (human friendly) - /// - /// A short, descriptive, user-friendly title for the effect evidence synthesis. + /// Allows linking the DeviceUseStatement to the underlying Request, or to other + /// information that supports or is used to derive the DeviceUseStatement. /// /// ## Implementation Notes - /// This name does not need to be machine-processing friendly and may contain - /// punctuation, white-space, etc. + /// The most common use cases for deriving a DeviceUseStatement comes from + /// creating it from a request or from an observation or a claim. it should be + /// noted that the amount of information that is available varies from the type + /// resource that you derive the DeviceUseStatement from. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -48455,43 +47435,25 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// draft | active | retired | unknown - /// - /// The status of this effect evidence synthesis. Enables tracking the life-cycle - /// of the content. + #[fhir_serde(rename = "derivedFrom")] + pub derived_from: Option>, + /// How often the device was used /// - /// ## Implementation Notes - /// Allows filtering of effect evidence synthesiss that are appropriate for use - /// versus not. + /// How often the device was used. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub timing: Option, + /// When statement was recorded /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// Date last changed - /// - /// The date (and optionally time) when the effect evidence synthesis was - /// published. The date must change when the business version changes and it must - /// change if the status code changes. In addition, it should change when the - /// substantive content of the effect evidence synthesis changes. - /// - /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the effect evidence synthesis. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. + /// The time at which the statement was made/recorded. /// /// ## Cardinality: Optional (0..1) /// @@ -48501,27 +47463,11 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "recordedOn")] + pub recorded_on: Option, + /// Who made the statement /// - /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the effect evidence - /// synthesis. - /// - /// ## Requirements - /// Helps establish the "authority/credibility" of the effect evidence synthesis. - /// May also allow for contact. - /// - /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the effect evidence synthesis is the organization or individual primarily - /// responsible for the maintenance and upkeep of the effect evidence synthesis. - /// This is not necessarily the same individual or organization that developed - /// and initially authored the content. The publisher is the primary point of - /// contact for questions or issues with the effect evidence synthesis. This item - /// SHOULD be populated unless the information is available from context. + /// Who reported the device was being used by the patient. /// /// ## Cardinality: Optional (0..1) /// @@ -48531,16 +47477,12 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher + pub source: Option, + /// Reference to device used /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. + /// The details of the device used. /// - /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -48548,23 +47490,12 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the effect evidence synthesis - /// - /// A free text natural language description of the effect evidence synthesis - /// from a consumer's perspective. + pub device: Reference, + /// Why device was used /// - /// ## Implementation Notes - /// This description can be used to capture details such as why the effect - /// evidence synthesis was built, comments about misuse, instructions for - /// clinical use and interpretation, literature references, examples from the - /// paper world, etc. It is not a rendering of the effect evidence synthesis as - /// conveyed in the 'text' field of the resource itself. This item SHOULD be - /// populated unless the information is available from context (e.g. the language - /// of the effect evidence synthesis is presumed to be the predominant language - /// in the place the effect evidence synthesis was created). + /// Reason or justification for the use of the device. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -48572,33 +47503,33 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Used for footnotes or explanatory notes + #[fhir_serde(rename = "reasonCode")] + pub reason_code: Option>, + /// Why was DeviceUseStatement performed? /// - /// A human-readable string to clarify or explain concepts about the resource. + /// Indicates another resource whose existence justifies this DeviceUseStatement. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// The context that the content is intended to support + #[fhir_serde(rename = "reasonReference")] + pub reason_reference: Option>, + /// Target body site /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate effect - /// evidence synthesis instances. + /// Indicates the anotomic location on the subject's body where the device was + /// used ( i.e. the target). /// /// ## Requirements - /// Assist in searching for appropriate content. - /// - /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. + /// Knowing where the device is targeted is important for tracking if multiple + /// sites are possible. If more information than just a code is required, use the + /// extension [http://hl7.org/fhir/StructureDefinition/bodySite](null.html). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -48606,251 +47537,345 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for effect evidence synthesis (if applicable) /// - /// A legal or geographic region in which the effect evidence synthesis is - /// intended to be used. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes describing anatomical locations. May include laterality. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/body-site + #[fhir_serde(rename = "bodySite")] + pub body_site: Option, + /// Addition details (comments, instructions) /// - /// ## Implementation Notes - /// It may be possible for the effect evidence synthesis to be used in - /// jurisdictions other than those for which it was originally designed or - /// intended. + /// Details about the device statement that were not represented at all or + /// sufficiently in one of the attributes provided in a class. These may include + /// for example a comment, an instruction, or a note associated with the + /// statement. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, +} + +/// Choice of types for the effective\[x\] field in DiagnosticReport +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "effective")] +pub enum DiagnosticReportEffective { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "effectiveDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "effectivePeriod")] + Period(Period), +} + +/// FHIR DiagnosticReport type +/// +/// The findings and interpretation of diagnostic tests performed on patients, +/// groups of patients, devices, and locations, and/or specimens derived from +/// these. The report includes clinical context such as requesting and provider +/// information, and some mix of atomic results, images, textual and coded +/// interpretations, and formatted representation of diagnostic reports. +/// +/// ## Purpose +/// To support reporting for any diagnostic report into a clinical data repository. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [DiagnosticReport](http://hl7.org/fhir/StructureDefinition/DiagnosticReport) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "effective")] +pub struct DiagnosticReport { + /// Logical id of this artifact /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Use and/or publishing restrictions + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// - /// A copyright statement relating to the effect evidence synthesis and/or its - /// contents. Copyright statements are generally legal restrictions on the use - /// and publishing of the effect evidence synthesis. + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// ## Requirements - /// Consumers must be able to determine any legal restrictions on the use of the - /// effect evidence synthesis and/or its content. + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Aliases - /// License, Restrictions - pub copyright: Option, - /// When the effect evidence synthesis was approved by publisher - /// - /// The date on which the resource content was approved by the publisher. - /// Approval happens once when the content is officially approved for usage. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// The 'date' element may be more recent than the approval date because of minor - /// changes or editorial corrections. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "approvalDate")] - pub approval_date: Option, - /// When the effect evidence synthesis was last reviewed - /// - /// The date on which the resource content was last reviewed. Review happens - /// periodically after approval but does not change the original approval date. + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// ## Requirements - /// Gives a sense of how "current" the content is. Resources that have not been - /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// The base language in which the resource is written. /// /// ## Implementation Notes - /// If specified, this date follows the original approval date. + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lastReviewDate")] - pub last_review_date: Option, - /// When the effect evidence synthesis is expected to be used /// - /// The period during which the effect evidence synthesis content was or is - /// planned to be in active use. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Allows establishing a transition before a resource comes into effect and also - /// allows for a sunsetting process when new versions of the effect evidence - /// synthesis are or are expected to be used instead. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// The effective period for a effect evidence synthesis determines when the - /// content is applicable for usage and is independent of publication and review - /// dates. For example, a measure intended to be used for the year 2016 might be - /// published in 2015. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectivePeriod")] - pub effective_period: Option, - /// The category of the EffectEvidenceSynthesis, such as Education, Treatment, Assessment, etc. /// - /// Descriptive topics related to the content of the EffectEvidenceSynthesis. - /// Topics provide a high-level categorization grouping types of - /// EffectEvidenceSynthesiss that can be useful for filtering and searching. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Requirements - /// Repositories must be able to determine how to categorize the - /// EffectEvidenceSynthesis so that it can be found by topical searches. + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic - pub topic: Option>, - /// Who authored the content + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// - /// An individiual or organization primarily involved in the creation and - /// maintenance of the content. + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who edited the content - /// - /// An individual or organization primarily responsible for internal coherence of - /// the content. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub editor: Option>, - /// Who reviewed the content + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored /// - /// An individual or organization primarily responsible for review of some aspect - /// of the content. + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reviewer: Option>, - /// Who endorsed the content + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// - /// An individual or organization responsible for officially endorsing the - /// content for use in some setting. + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub endorser: Option>, - /// Additional documentation, citations, etc. + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Related artifacts such as additional documentation, justification, or - /// bibliographic references. + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Business identifier for report + /// + /// Identifiers assigned to this report by the performer or other systems. /// /// ## Requirements - /// EffectEvidenceSynthesiss must be able to provide enough information for - /// consumers of the content (and/or interventions or results produced by the - /// content) to be able to determine and understand the justification for and - /// evidence in support of the content. + /// Need to know what identifier to use when making queries about this report + /// from the source laboratory, and for linking to the report outside FHIR + /// context. /// /// ## Implementation Notes - /// Each related artifact is either an attachment, or a reference to another - /// resource, but not both. + /// Usually assigned by the Information System of the diagnostic service provider + /// (filler id). /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relatedArtifact")] - pub related_artifact: Option>, - /// Type of synthesis - /// - /// Type of synthesis eg meta-analysis. /// - /// ## Cardinality: Optional (0..1) + /// ## Aliases + /// ReportID, Filler ID, Placer ID + pub identifier: Option>, + /// What was requested /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// Details concerning a service requested. /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Types of combining results from a body of evidence (eg. summary data meta-analysis). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/synthesis-type - #[fhir_serde(rename = "synthesisType")] - pub synthesis_type: Option, - /// Type of study + /// ## Requirements + /// This allows tracing of authorization for the report and tracking whether + /// proposals/recommendations were acted upon. /// - /// Type of study eg randomized trial. + /// ## Implementation Notes + /// Note: Usually there is one test request for each result, however in some + /// circumstances multiple test requests may be represented using a single test + /// result resource. Note that there are also cases where one request leads to + /// multiple reports. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Types of research studies (types of research methods). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/study-type - #[fhir_serde(rename = "studyType")] - pub study_type: Option, - /// What population? + /// ## Aliases + /// Request + #[fhir_serde(rename = "basedOn")] + pub based_on: Option>, + /// registered | partial | preliminary | final + /// - /// A reference to a EvidenceVariable resource that defines the population for - /// the research. + /// The status of the diagnostic report. + /// + /// ## Requirements + /// Diagnostic services routinely issue provisional/incomplete reports, and + /// sometimes withdraw previously released reports. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub population: Reference, - /// What exposure? /// - /// A reference to a EvidenceVariable resource that defines the exposure for the - /// research. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The status of the diagnostic report. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnostic-report-status|4.0.1 + pub status: Code, + /// Service category /// - /// ## Cardinality: Required (1..1) + /// A code that classifies the clinical discipline, department or diagnostic + /// service that created the report (e.g. cardiology, biochemistry, hematology, + /// MRI). This is used for searching, sorting and display purposes. + /// + /// ## Implementation Notes + /// Multiple categories are allowed using various categorization schemes. The + /// level of granularity is defined by the category concepts in the value set. + /// More fine-grained filtering can be performed using the metadata and/or + /// terminology hierarchy in DiagnosticReport.code. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -48858,11 +47883,18 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub exposure: Reference, - /// What comparison exposure? /// - /// A reference to a EvidenceVariable resource that defines the comparison - /// exposure for the research. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for diagnostic service sections. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnostic-service-sections + /// + /// ## Aliases + /// Department, Sub-department, Service, Discipline + pub category: Option>, + /// Name/Code for this diagnostic report + /// + /// A code or name that describes this diagnostic report. /// /// ## Cardinality: Required (1..1) /// @@ -48872,50 +47904,51 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "exposureAlternative")] - pub exposure_alternative: Reference, - /// What outcome? - /// - /// A reference to a EvidenceVariable resomece that defines the outcome for the - /// research. /// - /// ## Cardinality: Required (1..1) + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: Codes that describe Diagnostic Reports. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/report-codes /// - /// ## Special Semantics - /// - Included in summary + /// ## Aliases + /// Type + pub code: CodeableConcept, + /// The subject of the report - usually, but not always, the patient /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub outcome: Reference, - /// What sample size was involved? + /// The subject of the report. Usually, but not always, this is a patient. + /// However, diagnostic services also perform analyses on specimens collected + /// from a variety of other sources. /// - /// A description of the size of the sample involved in the synthesis. + /// ## Requirements + /// SHALL know the subject context. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "sampleSize")] - pub sample_size: Option, - /// What was the result per exposure? /// - /// A description of the results for each exposure considered in the effect - /// estimate. + /// ## Aliases + /// Patient + pub subject: Option, + /// Health care event when test ordered /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The healthcare event (e.g. a patient and healthcare provider interaction) + /// which this DiagnosticReport is about. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "resultsByExposure")] - pub results_by_exposure: Option>, - /// What was the estimated effect + /// ## Requirements + /// Links the request to the Encounter context. /// - /// The estimated effect of the exposure variant. + /// ## Implementation Notes + /// This will typically be the encounter the event occurred within, but some + /// events may be initiated prior to or after the official completion of an + /// encounter but still be tied to the context of the encounter (e.g. + /// pre-admission laboratory tests). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -48923,354 +47956,279 @@ pub struct EffectEvidenceSynthesis { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectEstimate")] - pub effect_estimate: Option>, - /// How certain is the effect /// - /// A description of the certainty of the effect estimate. + /// ## Aliases + /// Context + pub encounter: Option, + /// Clinically relevant time/time-period for report /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The time or time-period the observed values are related to. When the subject + /// of the report is a patient, this is usually either the time of the procedure + /// or of specimen collection(s), but very often the source of the date/time is + /// not known, only the date/time itself. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub certainty: Option>, -} - -/// What was the result per exposure? -/// -/// A description of the results for each exposure considered in the effect -/// estimate. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisResultsByExposure { - /// Unique id for inter-element referencing + /// ## Requirements + /// Need to know where in the patient history to file/present this report. /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Implementation Notes + /// If the diagnostic procedure was performed on the patient, this is the time it + /// was performed. If there are specimens, the diagnostically relevant time can + /// be derived from the specimen collection times, but the specimen information + /// is not always available, and the exact relationship between the specimens and + /// the diagnostically relevant time is not always automatic. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Observation time, Effective Time, Occurrence + #[fhir_serde(flatten)] + pub effective: Option, + /// DateTime this version was made /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The date and time that this version of the report was made available to + /// providers, typically after the report was reviewed and verified. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Clinicians need to be able to check the date that the report was released. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// May be different from the update time of the resource itself, because that is + /// the status of the record (potentially a secondary copy), not the actual + /// release time of the report. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Description of results by exposure + /// Date published, Date Issued, Date Verified + pub issued: Option, + /// Responsible Diagnostic Service /// - /// Human-readable summary of results by exposure state. + /// The diagnostic service that is responsible for issuing the report. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Need to know whom to contact if there are queries about the results. Also may + /// need to track the source of reports for secondary data analysis. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// exposure | exposure-alternative + /// ## Implementation Notes + /// This is not necessarily the source of the atomic data items or the entity + /// that interpreted the results. It is the entity that takes responsibility for + /// the clinical report. /// - /// Whether these results are for the exposure state or alternative exposure - /// state. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Whether the results by exposure is describing the results for the primary exposure of interest (exposure) or the alternative state (exposureAlternative). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/exposure-state|4.0.1 - #[fhir_serde(rename = "exposureState")] - pub exposure_state: Option, - /// Variant exposure states - /// - /// Used to define variant exposure states such as low-risk state. + /// ## Aliases + /// Laboratory, Service, Practitioner, Department, Company, Authorized by, Director + pub performer: Option>, + /// Primary result interpreter /// - /// ## Cardinality: Optional (0..1) + /// The practitioner or organization that is responsible for the report's + /// conclusions and interpretations. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// ## Requirements + /// Need to know whom to contact if there are queries about the results. Also may + /// need to track the source of reports for secondary data analysis. /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-variant-state - #[fhir_serde(rename = "variantState")] - pub variant_state: Option, - /// Risk evidence synthesis + /// ## Implementation Notes + /// Might not be the same entity that takes responsibility for the clinical + /// report. /// - /// Reference to a RiskEvidenceSynthesis resource. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "riskEvidenceSynthesis")] - pub risk_evidence_synthesis: Reference, -} - -/// What was the estimated effect -/// -/// The estimated effect of the exposure variant. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisEffectEstimate { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Aliases + /// Analyzed by, Reported by + #[fhir_serde(rename = "resultsInterpreter")] + pub results_interpreter: Option>, + /// Specimens this report is based on /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// Details about the specimens on which this diagnostic report is based. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// Need to be able to report information about the collected specimens on which + /// the report is based. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// If the specimen is sufficiently specified with a code in the test result + /// name, then this additional data may be redundant. If there are multiple + /// specimens, these may be represented per observation or group. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + pub specimen: Option>, + /// Observations /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// [Observations](observation.html) that are part of this diagnostic report. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Need to support individual results, or groups of results, where the result + /// grouping is arbitrary, but meaningful. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Observations can contain observations. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Description of effect estimate - /// - /// Human-readable summary of effect estimate. - /// - /// ## Cardinality: Optional (0..1) + /// Data, Atomic Value, Result, Atomic result, Data, Test, Analyte, Battery, Organizer + pub result: Option>, + /// Reference to full details of imaging associated with the diagnostic report /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Type of efffect estimate + /// One or more links to full details of any imaging performed during the + /// diagnostic investigation. Typically, this is imaging performed by DICOM + /// enabled modalities, but this is not required. A fully enabled PACS viewer can + /// use this information to provide views of the source images. /// - /// Examples include relative risk and mean difference. + /// ## Implementation Notes + /// ImagingStudy and the image element are somewhat overlapping - typically, the + /// list of image references in the image element will also be found in one of + /// the imaging study resources. However, each caters to different types of + /// displays for different types of purposes. Neither, either, or both may be + /// provided. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "imagingStudy")] + pub imaging_study: Option>, + /// Key images associated with this report /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Whether the effect estimate is an absolute effect estimate (absolute difference) or a relative effect estimate (relative difference), and the specific type of effect estimate (eg relative risk or median difference). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/effect-estimate-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Variant exposure states + /// A list of key images associated with this report. The images are generally + /// created during the diagnostic process, and may be directly of the patient, or + /// of treated specimens (i.e. slides of interest). /// - /// Used to define variant exposure states such as low-risk state. + /// ## Requirements + /// Many diagnostic services include images in the report as part of their + /// service. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-variant-state - #[fhir_serde(rename = "variantState")] - pub variant_state: Option, - /// Point estimate + /// ## Aliases + /// DICOM, Slides, Scans + pub media: Option>, + /// Clinical conclusion (interpretation) of test results /// - /// The point estimate of the effect estimate. + /// Concise and clinically contextualized summary conclusion + /// (interpretation/impression) of the diagnostic report. + /// + /// ## Requirements + /// Need to be able to provide a conclusion that is not lost among the basic + /// result data. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: Option, - /// What unit is the outcome described in? /// - /// Specifies the UCUM unit for the outcome. + /// ## Aliases + /// Report + pub conclusion: Option, + /// Codes for the clinical conclusion of test results /// - /// ## Cardinality: Optional (0..1) + /// One or more codes that represent the summary conclusion + /// (interpretation/impression) of the diagnostic report. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Unified Code for Units of Measure (UCUM). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ucum-units|4.0.1 - #[fhir_serde(rename = "unitOfMeasure")] - pub unit_of_measure: Option, - /// How precise the estimate is + /// - **Strength**: example + /// - **Description**: Diagnosis codes provided as adjuncts to the report. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings + #[fhir_serde(rename = "conclusionCode")] + pub conclusion_code: Option>, + /// Entire report as issued /// - /// A description of the precision of the estimate for the effect. + /// Rich text representation of the entire result as issued by the diagnostic + /// service. Multiple formats are allowed but they SHALL be semantically + /// equivalent. + /// + /// ## Requirements + /// Gives laboratory the ability to provide its own fully formatted report for + /// clinical fidelity. + /// + /// ## Implementation Notes + /// "application/pdf" is recommended as the most reliable and interoperable in + /// this context. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "precisionEstimate")] - pub precision_estimate: Option>, + #[fhir_serde(rename = "presentedForm")] + pub presented_form: Option>, } -/// A component that contributes to the overall certainty +/// Key images associated with this report /// -/// A description of a component of the overall certainty. +/// A list of key images associated with this report. The images are generally +/// created during the diagnostic process, and may be directly of the patient, or +/// of treated specimens (i.e. slides of interest). +/// +/// ## Requirements +/// Many diagnostic services include images in the report as part of their +/// service. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Aliases +/// DICOM, Slides, Scans #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisCertaintyCertaintySubcomponent { +pub struct DiagnosticReportMedia { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -49351,60 +48309,56 @@ pub struct EffectEvidenceSynthesisCertaintyCertaintySubcomponent { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of subcomponent of certainty rating - /// - /// Type of subcomponent of certainty rating. - /// - /// ## Cardinality: Optional (0..1) + /// Comment about the image (e.g. explanation) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// A comment about the image. Typically, this is used to provide an explanation + /// for why the image is included, or to draw the viewer's attention to important + /// features. /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The subcomponent classification of quality of evidence rating systems. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/certainty-subcomponent-type - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Subcomponent certainty rating + /// ## Requirements + /// The provider of the report should make a comment about each image included in + /// the report. /// - /// A rating of a subcomponent of rating certainty. + /// ## Implementation Notes + /// The comment should be displayed with the image. It would be common for the + /// report to include additional discussion of the image contents in other + /// sections such as the conclusion. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub comment: Option, + /// Reference to the image source /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The quality rating of the subcomponent of a quality of evidence rating. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/certainty-subcomponent-rating - pub rating: Option>, - /// Used for footnotes or explanatory notes + /// Reference to the image source. /// - /// A human-readable string to clarify or explain concepts about the resource. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, + pub link: Reference, } -/// How certain is the effect +/// FHIR Distance type /// -/// A description of the certainty of the effect estimate. +/// Base StructureDefinition for Distance Type: A length - a value with a unit +/// that is a physical distance. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Quantity /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Distance](http://hl7.org/fhir/StructureDefinition/Distance) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EffectEvidenceSynthesisCertainty { +pub struct Distance { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -49438,122 +48392,262 @@ pub struct EffectEvidenceSynthesisCertainty { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Numerical value (with implicit precision) /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The value of the measured amount. The value includes an implicit precision in + /// the presentation of the value. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Precision is handled implicitly in almost all cases of measurement. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The implicit precision in the value should always be honored. Monetary values + /// have their own rules for handling precision (refer to standard accounting + /// text books). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub value: Option, + /// < | \<= | \>= | > - how to understand the value /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Certainty rating + /// How the value should be understood and represented - whether the actual value + /// is greater or less than the stated value due to measurement issues; e.g. if + /// the comparator is "<" , then the real value is < stated value. /// - /// A rating of the certainty of the effect estimate. + /// ## Requirements + /// Need a framework for handling measures where the value is <5ug/L or >400mg/L + /// due to the limitations of measuring methodology. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value + /// - Included in summary + /// - When missing: If there is no comparator, then there is no modification of the value /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-quality - pub rating: Option>, - /// Used for footnotes or explanatory notes - /// - /// A human-readable string to clarify or explain concepts about the resource. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// - **Strength**: required + /// - **Description**: How the Quantity should be understood and represented. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 + pub comparator: Option, + /// Unit representation + /// + /// A human-readable form of the unit. + /// + /// ## Requirements + /// There are many representations for units of measure and in many contexts, + /// particular representations are fixed and required. I.e. mcg for micrograms. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// A component that contributes to the overall certainty + pub unit: Option, + /// System that defines coded unit form /// - /// A description of a component of the overall certainty. + /// The identification of the system that provides the coded form of the unit. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Need to know the system that defines the coded form of the unit. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "certaintySubcomponent")] - pub certainty_subcomponent: Option>, + /// + /// ## Conditions + /// Used when: qty-3 + pub system: Option, + /// Coded form of the unit + /// + /// A computer processable form of the unit in some unit representation system. + /// + /// ## Requirements + /// Need a computable form of the unit that is fixed across all forms. UCUM + /// provides this for quantities, but SNOMED CT provides many units of interest. + /// + /// ## Implementation Notes + /// The preferred system is UCUM, but SNOMED CT can also be used (for customary + /// units) or ISO 4217 for currency. The context of use may additionally require + /// a code from a particular system. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub code: Option, } -/// List of past encounter statuses +/// FHIR DocumentManifest type /// -/// The status history permits the encounter resource to contain the status -/// history without needing to read through the historical versions of the -/// resource, or even have the server store them. +/// A collection of documents compiled for a purpose together with metadata that +/// applies to the collection. /// -/// ## Implementation Notes -/// The current status is always found in the current version of the resource, -/// not the status history. +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [DocumentManifest](http://hl7.org/fhir/StructureDefinition/DocumentManifest) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterStatusHistory { - /// Unique id for inter-element referencing +pub struct DocumentManifest { + /// Logical id of this artifact /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created + /// + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. + /// + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -49573,16 +48667,16 @@ pub struct EncounterStatusHistory { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -49607,8 +48701,7 @@ pub struct EncounterStatusHistory { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -49617,45 +48710,237 @@ pub struct EncounterStatusHistory { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// planned | arrived | triaged | in-progress | onleave | finished | cancelled + + /// Unique Identifier for the set of documents /// - /// planned | arrived | triaged | in-progress | onleave | finished | cancelled +. + /// A single identifier that uniquely identifies this manifest. Principally used + /// to refer to the manifest in non-FHIR contexts. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "masterIdentifier")] + pub master_identifier: Option, + /// Other identifiers for the manifest + /// + /// Other identifiers associated with the document manifest, including version + /// independent identifiers. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// current | superseded | entered-in-error + /// + /// The status of this document manifest. + /// + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains the codes + /// that mark the manifest as not currently valid. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: required - /// - **Description**: Current state of the encounter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1 + /// - **Description**: The status of the document reference. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 pub status: Code, - /// The time that the episode was in the specified status + /// Kind of document set /// - /// The time that the episode was in the specified status. + /// The code specifying the type of clinical activity that resulted in placing + /// the associated content into the DocumentManifest. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Specifies the kind of this set of documents (e.g. Patient Summary, Discharge + /// Summary, Prescription, etc.). The type of a set of documents may be the same + /// as one of the documents in it - especially if there is only one - but it may + /// be wider. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Period, + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The activity that caused the DocumentManifest to be created. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// The subject of the set of documents + /// + /// Who or what the set of documents is about. The documents can be about a + /// person, (patient or healthcare practitioner), a device (i.e. machine) or even + /// a group of subjects (such as a document about a herd of farm animals, or a + /// set of patients that share a common exposure). If the documents cross more + /// than one subject, then more than one subject is allowed here (unusual use + /// case). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub subject: Option, + /// When this document manifest created + /// + /// When the document manifest was created for submission to the server (not + /// necessarily the same thing as the actual resource last modified time, since + /// it may be modified, replicated, etc.). + /// + /// ## Implementation Notes + /// Creation time is used for tracking, organizing versions and searching. This + /// is the creation time of the document set, not the documents on which it is + /// based. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub created: Option, + /// Who and/or what authored the DocumentManifest + /// + /// Identifies who is the author of the manifest. Manifest author is not + /// necessarly the author of the references included. + /// + /// ## Implementation Notes + /// Not necessarily who did the actual data entry (i.e. typist) or who was the + /// source (informant). + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option>, + /// Intended to get notified about this set of documents + /// + /// A patient, practitioner, or organization for which this set of documents is + /// intended. + /// + /// ## Implementation Notes + /// How the recipient receives the document set or is notified of it is up to the + /// implementation. This element is just a statement of intent. If the recipient + /// is a person, and it is not known whether the person is a patient or a + /// practitioner, RelatedPerson would be the default choice. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub recipient: Option>, + /// The source system/application/software + /// + /// Identifies the source system, application, or software that produced the + /// document manifest. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub source: Option, + /// Human-readable description (title) + /// + /// Human-readable description of the source document. This is sometimes known as + /// the "title". + /// + /// ## Requirements + /// Helps humans to assess whether the document is of interest. + /// + /// ## Implementation Notes + /// What the document is about, rather than a terse summary of the document. It + /// is commonly the case that records do not have a title and are collectively + /// referred to by the display name of Record code (e.g. a "consultation" or + /// "progress note"). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Items in manifest + /// + /// The list of Resources that consist of the parts of this manifest. + /// + /// ## Requirements + /// Any Resources are allowed to be grouped in a Manifest. The manifest brings + /// context to the group. + /// + /// ## Implementation Notes + /// When used for XDS the intended focus of the DocumentManifest is for the + /// reference to target to be a set of DocumentReference Resources. The reference + /// is to "Any" to support EN 13606 usage, where an extract is DocumentManifest + /// that references List and Composition resources. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub content: Option>, + /// Related things + /// + /// Related identifiers or resources associated with the DocumentManifest. + /// + /// ## Implementation Notes + /// May be identifiers or resources that caused the DocumentManifest to be + /// created. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub related: Option>, } -/// List of past encounter classes +/// Related things /// -/// The class history permits the tracking of the encounters transitions without -/// needing to go through the resource history. This would be used for a case -/// where an admission starts of as an emergency encounter, then transitions into -/// an inpatient scenario. Doing this and not restarting a new encounter ensures -/// that any lab/diagnostic results can more easily follow the patient and not -/// require re-processing and not get lost or cancelled during a kind of -/// discharge from emergency to inpatient. +/// Related identifiers or resources associated with the DocumentManifest. +/// +/// ## Implementation Notes +/// May be identifiers or resources that caused the DocumentManifest to be +/// created. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -49663,7 +48948,7 @@ pub struct EncounterStatusHistory { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterClassHistory { +pub struct DocumentManifestRelated { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -49744,38 +49029,46 @@ pub struct EncounterClassHistory { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// inpatient | outpatient | ambulatory | emergency + + /// Identifiers of things that are related /// - /// inpatient | outpatient | ambulatory | emergency +. + /// Related identifier to this DocumentManifest. For example, Order numbers, + /// accession numbers, XDW workflow numbers. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// If both identifier and ref elements are present they shall refer to the same + /// thing. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option, + /// Related Resource /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Classification of the encounter. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode - pub class: Coding, - /// The time that the episode was in the specified class + /// Related Resource to this DocumentManifest. For example, Order, + /// ServiceRequest, Procedure, EligibilityRequest, etc. /// - /// The time that the episode was in the specified class. + /// ## Implementation Notes + /// If both identifier and ref elements are present they shall refer to the same + /// thing. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Period, + #[fhir_serde(rename = "ref")] + pub r#ref: Option, } -/// FHIR Encounter type +/// FHIR DocumentReference type /// -/// An interaction between a patient and healthcare provider(s) for the purpose -/// of providing healthcare service(s) or assessing the health status of a -/// patient. +/// A reference to a document of any kind for any purpose. Provides metadata +/// about the document so that the document can be discovered and managed. The +/// scope of a document is any seralized object with a mime-type, so includes +/// formal patient centric documents (CDA), cliical notes, scanned paper, and +/// non-patient specific documents like policy text. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -49783,9 +49076,9 @@ pub struct EncounterClassHistory { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [Encounter](http://hl7.org/fhir/StructureDefinition/Encounter) +/// See: [DocumentReference](http://hl7.org/fhir/StructureDefinition/DocumentReference) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Encounter { +pub struct DocumentReference { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -49985,11 +49278,25 @@ pub struct Encounter { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Identifier(s) by which this encounter is known + /// Master Version Specific Identifier /// - /// Identifier(s) by which this encounter is known. + /// Document identifier as assigned by the source of the document. This + /// identifier is specific to this version of the document. This unique + /// identifier may be used elsewhere to identify this version of the document. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// The structure and format of this Id shall be consistent with the + /// specification corresponding to the formatCode attribute. (e.g. for a DICOM + /// standard document a 64-character numeric UID, for an HL7 CDA format a + /// serialization of the CDA Document Id extension and root in the form + /// "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char + /// max. If the OID is coded without the extension then the '^' character shall + /// not be included.). + /// + /// ## Implementation Notes + /// CDA Document Id extension and root. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -49997,56 +49304,37 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// planned | arrived | triaged | in-progress | onleave | finished | cancelled + - /// - /// planned | arrived | triaged | in-progress | onleave | finished | cancelled +. + #[fhir_serde(rename = "masterIdentifier")] + pub master_identifier: Option, + /// Other identifiers for the document /// - /// ## Implementation Notes - /// Note that internal business rules will determine the appropriate transitions - /// that may occur between statuses (and also classes). + /// Other identifiers associated with the document, including version independent + /// identifiers. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// current | superseded | entered-in-error /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Current state of the encounter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1 - pub status: Code, - /// List of past encounter statuses - /// - /// The status history permits the encounter resource to contain the status - /// history without needing to read through the historical versions of the - /// resource, or even have the server store them. + /// The status of this document reference. /// /// ## Implementation Notes - /// The current status is always found in the current version of the resource, - /// not the status history. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "statusHistory")] - pub status_history: Option>, - /// Classification of patient encounter + /// This is the status of the DocumentReference object, which might be + /// independent from the docStatus element. /// - /// Concepts representing classification of patient encounter such as ambulatory - /// (outpatient), inpatient, emergency, home health or others due to local - /// variations. + /// This element is labeled as a modifier because the status contains the codes + /// that mark the document or reference as not currently valid. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -50054,37 +49342,18 @@ pub struct Encounter { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Classification of the encounter. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode - pub class: Coding, - /// List of past encounter classes - /// - /// The class history permits the tracking of the encounters transitions without - /// needing to go through the resource history. This would be used for a case - /// where an admission starts of as an emergency encounter, then transitions into - /// an inpatient scenario. Doing this and not restarting a new encounter ensures - /// that any lab/diagnostic results can more easily follow the patient and not - /// require re-processing and not get lost or cancelled during a kind of - /// discharge from emergency to inpatient. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "classHistory")] - pub class_history: Option>, - /// Specific type of encounter + /// - **Strength**: required + /// - **Description**: The status of the document reference. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 + pub status: Code, + /// preliminary | final | amended | entered-in-error /// - /// Specific type of encounter (e.g. e-mail consultation, surgical day-care, - /// skilled nursing, rehabilitation). + /// The status of the underlying document. /// /// ## Implementation Notes - /// Since there are many ways to further classify encounters, this element is - /// 0..*. + /// The document that is pointed to might be in various lifecycle states. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -50094,14 +49363,21 @@ pub struct Encounter { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: The type of encounter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// Specific type of service + /// - **Strength**: required + /// - **Description**: Status of the underlying document. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/composition-status|4.0.1 + #[fhir_serde(rename = "docStatus")] + pub doc_status: Option, + /// Kind of document (LOINC if possible) /// - /// Broad categorization of the service that is to be provided (e.g. cardiology). + /// Specifies the particular kind of document referenced (e.g. History and + /// Physical, Discharge Summary, Progress Note). This usually equates to the + /// purpose of making the document referenced. + /// + /// ## Implementation Notes + /// Key metadata element describing the document that describes he exact type of + /// document. Helps humans to assess whether the document is of interest when + /// viewing a list of documents. /// /// ## Cardinality: Optional (0..1) /// @@ -50113,16 +49389,26 @@ pub struct Encounter { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Broad categorization of the service that is to be provided. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-type - #[fhir_serde(rename = "serviceType")] - pub service_type: Option, - /// Indicates the urgency of the encounter + /// - **Strength**: preferred + /// - **Description**: Precise type of clinical document. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Categorization of document /// - /// Indicates the urgency of the encounter. + /// A categorization for the type of document referenced - helps for indexing and + /// searching. This may be implied by or derived from the code specified in the + /// DocumentReference.type. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Key metadata element describing the the category or classification of the + /// document. This is a broader perspective that groups similar documents based + /// on how they would be used. This is a primary key used in searching. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -50130,21 +49416,18 @@ pub struct Encounter { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Indicates the urgency of the encounter. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActPriority - pub priority: Option, - /// The patient or group present at the encounter + /// - **Description**: High-level kind of a clinical document at a macro level. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-classcodes /// - /// The patient or group present at the encounter. + /// ## Aliases + /// claxs + pub category: Option>, + /// Who/what is the subject of the document /// - /// ## Implementation Notes - /// While the encounter is always about the patient, the patient might not - /// actually be known in all contexts of use, and there may be a group of - /// patients that could be anonymous (such as in a group therapy for Alcoholics - /// Anonymous - where the recording of the encounter could be used for billing on - /// the number of people/staff and not important to the context of the specific - /// patients) or alternately in veterinary care a herd of sheep receiving - /// treatment (where the animals are not individually tracked). + /// Who or what the document is about. The document can be about a person, + /// (patient or healthcare practitioner), a device (e.g. a machine) or even a + /// group of subjects (such as a document about a herd of farm animals, or a set + /// of patients that share a common exposure). /// /// ## Cardinality: Optional (0..1) /// @@ -50154,22 +49437,16 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// patient pub subject: Option, - /// Episode(s) of care that this encounter should be recorded against + /// When this document reference was created /// - /// Where a specific encounter should be classified as a part of a specific - /// episode(s) of care this field should be used. This association can facilitate - /// grouping of related encounters together for a specific purpose, such as - /// government reporting, issue tracking, association via a common problem. The - /// association is recorded on the encounter as these are typically created after - /// the episode of care and grouped on entry rather than editing the episode of - /// care to append another encounter to it (the episode of care could span - /// years). + /// When the document reference was created. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// Referencing/indexing time is used for tracking, organizing versions and + /// searching. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -50177,39 +49454,17 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "episodeOfCare")] - pub episode_of_care: Option>, - /// The ServiceRequest that initiated this encounter - /// - /// The request this encounter satisfies (e.g. incoming referral or procedure - /// request). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Aliases - /// incomingReferral - #[fhir_serde(rename = "basedOn")] - pub based_on: Option>, - /// List of participants involved in the encounter - /// - /// The list of people responsible for providing the service. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary + /// indexed + pub date: Option, + /// Who and/or what authored the document /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub participant: Option>, - /// The appointment that scheduled this encounter + /// Identifies who is responsible for adding the information to the document. /// - /// The appointment that scheduled this encounter. + /// ## Implementation Notes + /// Not necessarily who did the actual data entry (i.e. typist) or who was the + /// source (informant). /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -50219,44 +49474,49 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub appointment: Option>, - /// The start and end time of the encounter + pub author: Option>, + /// Who/what authenticated the document /// - /// The start and end time of the encounter. + /// Which person or organization authenticates that this document is valid. /// /// ## Implementation Notes - /// If not (yet) known, the end of the Period may be omitted. + /// Represents a participant within the author institution who has legally + /// authenticated or attested the document. Legal authentication implies that a + /// document has been signed manually or electronically by the legal + /// Authenticator. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Quantity of time the encounter lasted (less time absent) + pub authenticator: Option, + /// Organization which maintains the document /// - /// Quantity of time the encounter lasted. This excludes the time during leaves - /// of absence. + /// Identifies the organization or group who is responsible for ongoing + /// maintenance of and access to the document. /// /// ## Implementation Notes - /// May differ from the time the Encounter.period lasted because of leave of - /// absence. + /// Identifies the logical organization (software system, vendor, or department) + /// to go to find the current version, where to report issues, etc. This is + /// different from the physical location (URL, disk drive, or server) of the + /// document, which is the technical location of the document, which host may be + /// delegated to the management of some other organization. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub length: Option, - /// Coded reason the encounter takes place + pub custodian: Option, + /// Relationships to other documents /// - /// Reason the encounter takes place, expressed as a code. For admissions, this - /// can be used for a coded admission diagnosis. + /// Relationships that this document has with other document references that + /// already exist. /// /// ## Implementation Notes - /// For systems that need to know which was the primary diagnosis, these will be - /// marked with the standard extension primaryDiagnosis (which is a sequence - /// value rather than a flag, 1 = primary diagnosis). + /// This element is labeled as a modifier because documents that append to other + /// documents are incomplete on their own. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -50266,27 +49526,19 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "relatesTo")] + pub relates_to: Option>, + /// Human-readable description /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Reason why the encounter takes place. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-reason - /// - /// ## Aliases - /// Indication, Admission diagnosis - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Reason the encounter takes place (reference) + /// Human-readable description of the source document. /// - /// Reason the encounter takes place, expressed as a code. For admissions, this - /// can be used for a coded admission diagnosis. + /// ## Requirements + /// Helps humans to assess whether the document is of interest. /// /// ## Implementation Notes - /// For systems that need to know which was the primary diagnosis, these will be - /// marked with the standard extension primaryDiagnosis (which is a sequence - /// value rather than a flag, 1 = primary diagnosis). + /// What the document is about, a terse summary of the document. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -50294,14 +49546,34 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Document security-tags /// - /// ## Aliases - /// Indication, Admission diagnosis - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// The list of diagnosis relevant to this encounter + /// A set of Security-Tag codes specifying the level of privacy/security of the + /// Document. Note that DocumentReference.meta.security contains the security + /// labels of the "reference" to the document, while + /// DocumentReference.securityLabel contains a snapshot of the security labels on + /// the document the reference refers to. /// - /// The list of diagnosis relevant to this encounter. + /// ## Requirements + /// Use of the Health Care Privacy/Security Classification (HCS) system of + /// security-tag use is recommended. + /// + /// ## Implementation Notes + /// The confidentiality codes can carry multiple vocabulary items. HL7 has + /// developed an understanding of security and privacy tags that might be + /// desirable in a Document Sharing environment, called HL7 Healthcare Privacy + /// and Security Classification System (HCS). The following specification is + /// recommended but not mandated, as the vocabulary bindings are an + /// administrative domain responsibility. The use of this method is up to the + /// policy domain such as the XDS Affinity Domain or other Trust Domain where all + /// parties including sender and recipients are trusted to appropriately tag and + /// enforce. + /// + /// In the HL7 Healthcare Privacy and Security Classification (HCS) there are + /// code systems specific to Confidentiality, Sensitivity, Integrity, and + /// Handling Caveats. Some values would come from a local vocabulary as they are + /// related to workflow roles and special projects. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -50311,94 +49583,52 @@ pub struct Encounter { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub diagnosis: Option>, - /// The set of accounts that may be used for billing for this Encounter - /// - /// The set of accounts that may be used for billing for this Encounter. - /// - /// ## Implementation Notes - /// The billing system may choose to allocate billable items associated with the - /// Encounter to different referenced Accounts based on internal business rules. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub account: Option>, - /// Details about the admission to a healthcare service /// - /// Details about the admission to a healthcare service. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Security Labels from the Healthcare Privacy and Security Classification System. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/security-labels + #[fhir_serde(rename = "securityLabel")] + pub security_label: Option>, + /// Document referenced /// - /// ## Implementation Notes - /// An Encounter may cover more than just the inpatient stay. Contexts such as - /// outpatients, community clinics, and aged care facilities are also included. + /// The document and format referenced. There may be multiple content element + /// repetitions, each with a different format. /// - /// The duration recorded in the period of this encounter covers the entire scope - /// of this hospitalization record. + /// ## Cardinality: Required, Multiple (1..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub hospitalization: Option, - /// List of locations where the patient has been + pub content: Option>, + /// Clinical context of document /// - /// List of locations where the patient has been during this encounter. + /// The clinical context in which the document was prepared. /// /// ## Implementation Notes - /// Virtual encounters can be recorded in the Encounter by specifying a location - /// reference to a location of type "kind" such as "client's home" and an - /// encounter.class = "virtual". - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub location: Option>, - /// The organization (facility) responsible for this encounter - /// - /// The organization that is primarily responsible for this Encounter's services. - /// This MAY be the same as the organization on the Patient record, however it - /// could be different, such as if the actor performing the services was from an - /// external organization (which may be billed seperately) for an external - /// consultation. Refer to the example bundle showing an abbreviated set of - /// Encounters for a colonoscopy. + /// These values are primarily added to help with searching for + /// interesting/relevant documents. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "serviceProvider")] - pub service_provider: Option, - /// Another Encounter this encounter is part of - /// - /// Another Encounter of which this encounter is a part of (administratively or - /// in time). - /// - /// ## Implementation Notes - /// This is also used for associating a child's encounter back to the mother's - /// encounter. - /// - /// Refer to the Notes section in the Patient resource for further details. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "partOf")] - pub part_of: Option, + pub context: Option, } -/// List of participants involved in the encounter +/// Document referenced /// -/// The list of people responsible for providing the service. +/// The document and format referenced. There may be multiple content element +/// repetitions, each with a different format. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Required, Multiple (1..*) /// /// ## Special Semantics /// - Included in summary @@ -50407,7 +49637,7 @@ pub struct Encounter { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterParticipant { +pub struct DocumentReferenceContent { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -50488,19 +49718,12 @@ pub struct EncounterParticipant { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Role of participant in encounter - /// - /// Role of participant in encounter. + /// Where to access the document /// - /// ## Implementation Notes - /// The participant type indicates how an individual participates in an - /// encounter. It includes non-practitioner participants, and for practitioners - /// this is to describe the action type in the context of this encounter (e.g. - /// Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to - /// the practitioner roles which are functional roles, derived from terms of - /// employment, education, licensing, etc. + /// The document or URL of the document along with critical metadata to prove + /// content has integrity. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -50508,28 +49731,15 @@ pub struct EncounterParticipant { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub attachment: Attachment, + /// Format/content rules for the document /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Role of participant in encounter. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-participant-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// Period of time during the encounter that the participant participated - /// - /// The period of time that the specified participant participated in the - /// encounter. These can overlap or be sub-sets of the overall encounter's - /// period. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Persons involved in the encounter other than the patient + /// An identifier of the document encoding, structure, and template that the + /// document conforms to beyond the base format indicated in the mimeType. /// - /// Persons involved in the encounter other than the patient. + /// ## Implementation Notes + /// Note that while IHE mostly issues URNs for format types, not all documents + /// can be identified by a URI. /// /// ## Cardinality: Optional (0..1) /// @@ -50539,14 +49749,23 @@ pub struct EncounterParticipant { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub individual: Option, + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: Document Format Codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/formatcodes + pub format: Option, } -/// The list of diagnosis relevant to this encounter +/// Clinical context of document /// -/// The list of diagnosis relevant to this encounter. +/// The clinical context in which the document was prepared. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Implementation Notes +/// These values are primarily added to help with searching for +/// interesting/relevant documents. +/// +/// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -50555,7 +49774,7 @@ pub struct EncounterParticipant { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterDiagnosis { +pub struct DocumentReferenceContext { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -50636,77 +49855,146 @@ pub struct EncounterDiagnosis { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The diagnosis or procedure relevant to the encounter - /// - /// Reason the encounter takes place, as specified using information from another - /// resource. For admissions, this is the admission diagnosis. The indication - /// will typically be a Condition (with other resources referenced in the - /// evidence.detail), or a Procedure. - /// - /// ## Implementation Notes - /// For systems that need to know which was the primary diagnosis, these will be - /// marked with the standard extension primaryDiagnosis (which is a sequence - /// value rather than a flag, 1 = primary diagnosis). + /// Context of the document content /// - /// ## Cardinality: Required (1..1) + /// Describes the clinical encounter or type of care that the document content is + /// associated with. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub encounter: Option>, + /// Main clinical acts documented /// - /// ## Aliases - /// Admission diagnosis, discharge diagnosis, indication - pub condition: Reference, - /// Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …) + /// This list of codes represents the main clinical acts, such as a colonoscopy + /// or an appendectomy, being documented. In some cases, the event is inherent in + /// the type Code, such as a "History and Physical Report" in which the procedure + /// being documented is necessarily a "History and Physical" act. /// - /// Role that this diagnosis has within the encounter (e.g. admission, billing, - /// discharge …). + /// ## Implementation Notes + /// An event can further specialize the act inherent in the type, such as where + /// it is simply "Procedure Report" and the procedure was a "colonoscopy". If one + /// or more event codes are included, they shall not conflict with the values + /// inherent in the class or type elements as such a conflict would create an + /// ambiguous situation. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: The type of diagnosis this condition represents. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnosis-role - #[fhir_serde(rename = "use")] - pub r#use: Option, - /// Ranking of the diagnosis (for each role type) + /// - **Strength**: example + /// - **Description**: This list of codes represents the main clinical acts being documented. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActCode + pub event: Option>, + /// Time of service that is being documented /// - /// Ranking of the diagnosis (for each role type). + /// The time period over which the service that is described by the document was + /// provided. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub rank: Option, + pub period: Option, + /// Kind of facility where patient was seen + /// + /// The kind of facility where the patient was seen. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: XDS Facility Type. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-facilitycodes + #[fhir_serde(rename = "facilityType")] + pub facility_type: Option, + /// Additional details about where the content was created (e.g. clinical specialty) + /// + /// This property may convey specifics about the practice setting where the + /// content was created, often reflecting the clinical specialty. + /// + /// ## Requirements + /// This is an important piece of metadata that providers often rely upon to + /// quickly sort and/or filter out to find specific content. + /// + /// ## Implementation Notes + /// This element should be based on a coarse classification system for the class + /// of specialty practice. Recommend the use of the classification system for + /// Practice Setting, such as that described by the Subject Matter Domain in + /// LOINC. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Additional details about where the content was created (e.g. clinical specialty). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/c80-practice-codes + #[fhir_serde(rename = "practiceSetting")] + pub practice_setting: Option, + /// Patient demographics from source + /// + /// The Patient Information as known when the document was published. May be a + /// reference to a version specific, or contained. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "sourcePatientInfo")] + pub source_patient_info: Option, + /// Related identifiers or resources + /// + /// Related identifiers or resources associated with the DocumentReference. + /// + /// ## Implementation Notes + /// May be identifiers or resources that caused the DocumentReference or + /// referenced Document to be created. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub related: Option>, } -/// Details about the admission to a healthcare service +/// Relationships to other documents /// -/// Details about the admission to a healthcare service. +/// Relationships that this document has with other document references that +/// already exist. /// /// ## Implementation Notes -/// An Encounter may cover more than just the inpatient stay. Contexts such as -/// outpatients, community clinics, and aged care facilities are also included. +/// This element is labeled as a modifier because documents that append to other +/// documents are incomplete on their own. /// -/// The duration recorded in the period of this encounter covers the entire scope -/// of this hospitalization record. +/// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Cardinality: Optional (0..1) +/// ## Special Semantics +/// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterHospitalization { +pub struct DocumentReferenceRelatesTo { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -50787,161 +50075,70 @@ pub struct EncounterHospitalization { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Pre-admission identifier - /// - /// Pre-admission identifier. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAdmissionIdentifier")] - pub pre_admission_identifier: Option, - /// The location/organization from which the patient came before admission - /// - /// The location/organization from which the patient came before admission. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub origin: Option, - /// From where patient was admitted (physician referral, transfer) - /// - /// From where patient was admitted (physician referral, transfer). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: From where the patient was admitted. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-admit-source - #[fhir_serde(rename = "admitSource")] - pub admit_source: Option, - /// The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission - /// - /// Whether this hospitalization is a readmission and why if known. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The reason for re-admission of this hospitalization encounter. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v2-0092 - #[fhir_serde(rename = "reAdmission")] - pub re_admission: Option, - /// Diet preferences reported by the patient - /// - /// Diet preferences reported by the patient. + /// replaces | transforms | signs | appends /// - /// ## Requirements - /// Used to track patient's diet restrictions and/or preference. For a complete - /// description of the nutrition needs of a patient during their stay, one should - /// use the nutritionOrder resource which links to Encounter. + /// The type of relationship that this document has with anther document. /// /// ## Implementation Notes - /// For example, a patient may request both a dairy-free and nut-free diet - /// preference (not mutually exclusive). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Medical, cultural or ethical food preferences to help with catering requirements. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-diet - #[fhir_serde(rename = "dietPreference")] - pub diet_preference: Option>, - /// Special courtesies (VIP, board member) - /// - /// Special courtesies (VIP, board member). - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Special courtesies. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-special-courtesy - #[fhir_serde(rename = "specialCourtesy")] - pub special_courtesy: Option>, - /// Wheelchair, translator, stretcher, etc. + /// If this document appends another document, then the document cannot be fully + /// understood without also accessing the referenced document. /// - /// Any special requests that have been made for this hospitalization encounter, - /// such as the provision of specific equipment or other things. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Special arrangements. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-special-arrangements - #[fhir_serde(rename = "specialArrangement")] - pub special_arrangement: Option>, - /// Location/organization to which the patient is discharged - /// - /// Location/organization to which the patient is discharged. - /// - /// ## Cardinality: Optional (0..1) + /// - **Strength**: required + /// - **Description**: The type of relationship between documents. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1 + pub code: Code, + /// Target of the relationship /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub destination: Option, - /// Category or kind of location after discharge + /// The target document of this relationship. /// - /// Category or kind of location after discharge. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Discharge Disposition. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition - #[fhir_serde(rename = "dischargeDisposition")] - pub discharge_disposition: Option, + pub target: Reference, } -/// List of locations where the patient has been +/// Choice of types for the asNeeded\[x\] field in Dosage +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "asNeeded")] +pub enum DosageAsNeeded { + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "asNeededBoolean")] + Boolean(Boolean), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "asNeededCodeableConcept")] + CodeableConcept(CodeableConcept), +} + +/// FHIR Dosage type /// -/// List of locations where the patient has been during this encounter. +/// Base StructureDefinition for Dosage Type: Indicates how the medication is/was +/// taken or should be taken by the patient. /// -/// ## Implementation Notes -/// Virtual encounters can be recorded in the Encounter by specifying a location -/// reference to a location of type "kind" such as "client's home" and an -/// encounter.class = "virtual". +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/BackboneElement /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [Dosage](http://hl7.org/fhir/StructureDefinition/Dosage) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EncounterLocation { +#[fhir_resource(choice_elements = "asNeeded")] +pub struct Dosage { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -51022,51 +50219,70 @@ pub struct EncounterLocation { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Location the encounter takes place + /// The order of the dosage instructions /// - /// The location where the encounter takes place. + /// Indicates the order in which the dosage instructions should be applied or + /// interpreted. /// - /// ## Cardinality: Required (1..1) + /// ## Requirements + /// If the sequence number of multiple Dosages is the same, then it is implied + /// that the instructions are to be treated as concurrent. If the sequence number + /// is different, then the Dosages are intended to be sequential. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub location: Reference, - /// planned | active | reserved | completed + pub sequence: Option, + /// Free text dosage instructions e.g. SIG /// - /// The status of the participants' presence at the specified location during the - /// period specified. If the participant is no longer at the location, then the - /// period will have an end date/time. + /// Free text dosage instructions e.g. SIG. /// - /// ## Implementation Notes - /// When the patient is no longer active at a location, then the period end date - /// is entered, and the status may be changed to completed. + /// ## Requirements + /// Free text dosage instructions can be used for cases where the instructions + /// are too complex to code. The content of this attribute does not include the + /// name or description of the medication. When coded instructions are present, + /// the free text instructions may still be present for display to humans taking + /// or administering the medication. It is expected that the text instructions + /// will always be populated. If the dosage.timing attribute is also populated, + /// then the dosage.text should reflect the same information as the timing. + /// Additional information about administration or preparation of the medication + /// should be included as text. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub text: Option, + /// Supplemental instruction or warnings to the patient - e.g. "with meals", "may cause drowsiness" /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the location. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1 - pub status: Option, - /// The physical type of the location (usually the level in the location hierachy - bed room ward etc.) + /// Supplemental instructions to the patient on how to take the medication (e.g. + /// "with meals" or"take half to one hour before food") or warnings for the + /// patient about the medication (e.g. "may cause drowsiness" or "avoid exposure + /// of skin to direct sunlight or sunlamps"). /// - /// This will be used to specify the required levels (bed/ward/room/etc.) desired - /// to be recorded to simplify either messaging or query. + /// ## Requirements + /// Additional instruction is intended to be coded, but where no code exists, the + /// element could include text. For example, "Swallow with plenty of water" which + /// might or might not be coded. /// /// ## Implementation Notes - /// This information is de-normalized from the Location resource to support the - /// easier understanding of the encounter resource and processing in messaging or - /// query. + /// Information about administration or preparation of the medication (e.g. + /// "infuse as rapidly as possibly via intraperitoneal port" or "immediately + /// following drug x") should be populated in dosage.text. /// - /// There may be many levels in the hierachy, and this may only pic specific - /// levels that are required for a specific usage scenario. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -51074,56 +50290,64 @@ pub struct EncounterLocation { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Physical form of the location. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/location-physical-type - #[fhir_serde(rename = "physicalType")] - pub physical_type: Option, - /// Time period during which the patient was present at the location + /// - **Description**: A coded concept identifying additional instructions such as "take with water" or "avoid operating heavy machinery". + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/additional-instruction-codes + #[fhir_serde(rename = "additionalInstruction")] + pub additional_instruction: Option>, + /// Patient or consumer oriented instructions /// - /// Time period during which the patient was present at the location. + /// Instructions in terms that are understood by the patient or consumer. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, -} - -/// FHIR Endpoint type -/// -/// The technical details of an endpoint that can be used for electronic -/// services, such as for web services providing XDS.b or a REST endpoint for -/// another FHIR server. This may include any security context information. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [Endpoint](http://hl7.org/fhir/StructureDefinition/Endpoint) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Endpoint { - /// Logical id of this artifact + #[fhir_serde(rename = "patientInstruction")] + pub patient_instruction: Option, + /// When medication should be administered /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. + /// When medication should be administered. + /// + /// ## Requirements + /// The timing schedule for giving the medication to the patient. This data type + /// allows many different expressions. For example: "Every 8 hours"; "Three times + /// a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct + /// 2013, 17 Oct 2013 and 1 Nov 2013". Sometimes, a rate can imply duration when + /// expressed as total volume / duration (e.g. 500mL/2 hours implies a duration + /// of 2 hours). However, when rate doesn't imply duration (e.g. 250mL/hour), + /// then the timing.repeat.duration is needed to convey the infuse over time + /// period. /// /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// This attribute might not always be populated while the Dosage.text is + /// expected to be populated. If both are populated, then the Dosage.text should + /// reflect the content of the Dosage.timing. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary - pub id: Option, - /// Metadata about the resource /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub timing: Option, + /// Take "as needed" (for x) + /// + /// Indicates whether the Medication is only taken when needed within a specific + /// dosing schedule (Boolean option), or it indicates the precondition for taking + /// the Medication (CodeableConcept). + /// + /// ## Implementation Notes + /// Can express "as needed" without a reason by setting the Boolean = True. In + /// this case the CodeableConcept is not populated. Or you can express "as + /// needed" with a reason by including the CodeableConcept. In this case the + /// Boolean is assumed to be True. If you set the Boolean to False, then the dose + /// is given according to the schedule and is not "prn" or "as needed". /// /// ## Cardinality: Optional (0..1) /// @@ -51133,183 +50357,160 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Binding + /// - **Strength**: example + /// - **Description**: A coded concept identifying the precondition that should be met or evaluated prior to consuming or administering a medication dose. For example "pain", "30 minutes prior to sexual intercourse", "on flare-up" etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + #[fhir_serde(flatten)] + pub as_needed: Option, + /// Body site to administer to + /// + /// Body site to administer to. + /// + /// ## Requirements + /// A coded specification of the anatomic site where the medication first enters + /// the body. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// If the use case requires attributes from the BodySite resource (e.g. to + /// identify and track separately) then use the standard extension + /// [bodySite](extension-bodysite.html). May be a summary code, or a reference to + /// a very precise definition of the location, or both. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content /// - /// The base language in which the resource is written. + /// ## Binding + /// - **Strength**: example + /// - **Description**: A coded concept describing the site location the medicine enters into or onto the body. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/approach-site-codes + pub site: Option, + /// How drug should enter body /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// How drug should enter body. + /// + /// ## Requirements + /// A code specifying the route or physiological path of administration of a + /// therapeutic agent into or onto a patient's body. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// - **Strength**: example + /// - **Description**: A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/route-codes + pub route: Option, + /// Technique for administering medication /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// Technique for administering medication. + /// + /// ## Requirements + /// A coded value indicating the method by which the medication is introduced + /// into or onto the body. Most commonly used for injections. For examples, Slow + /// Push; Deep IV. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Terminologies used often pre-coordinate this term with the route and or form + /// of administration. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Binding + /// - **Strength**: example + /// - **Description**: A coded concept describing the technique by which the medicine is administered. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/administration-method-codes + pub method: Option, + /// Amount of medication administered /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// The amount of medication administered. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations + /// ## Special Semantics + /// - Included in summary /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "doseAndRate")] + pub dose_and_rate: Option>, + /// Upper limit on medication per unit of time + /// + /// Upper limit on medication per unit of time. + /// + /// ## Requirements + /// The maximum total quantity of a therapeutic substance that may be + /// administered to a subject over the period of time. For example, 1000mg in 24 + /// hours. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// This is intended for use as an adjunct to the dosage when there is an upper + /// cap. For example "2 tablets every 4 hours to a maximum of 8/day". /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + #[fhir_serde(rename = "maxDosePerPeriod")] + pub max_dose_per_period: Option, + /// Upper limit on medication per administration /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// Upper limit on medication per administration. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// The maximum total quantity of a therapeutic substance that may be + /// administered to a subject per administration. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// This is intended for use as an adjunct to the dosage when there is an upper + /// cap. For example, a body surface area related dose with a maximum amount, + /// such as 1.5 mg/m2 (maximum 2 mg) IV over 5 – 10 minutes would have + /// doseQuantity of 1.5 mg/m2 and maxDosePerAdministration of 2 mg. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(rename = "maxDosePerAdministration")] + pub max_dose_per_administration: Option, + /// Upper limit on medication per lifetime of the patient /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Identifies this endpoint across multiple systems + /// Upper limit on medication per lifetime of the patient. /// - /// Identifier for the organization that is used to identify the endpoint across - /// multiple disparate systems. + /// ## Requirements + /// The maximum total quantity of a therapeutic substance that may be + /// administered per lifetime of the subject. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -51317,41 +50518,93 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | suspended | error | off | entered-in-error | test + #[fhir_serde(rename = "maxDosePerLifetime")] + pub max_dose_per_lifetime: Option, +} + +/// Choice of types for the dose\[x\] field in DosageDoseAndRate +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "dose")] +pub enum DosageDoseAndRateDose { + /// Variant accepting the Range type. + #[fhir_serde(rename = "doseRange")] + Range(Range), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "doseQuantity")] + Quantity(Quantity), +} + +/// Choice of types for the rate\[x\] field in DosageDoseAndRate +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "rate")] +pub enum DosageDoseAndRateRate { + /// Variant accepting the Ratio type. + #[fhir_serde(rename = "rateRatio")] + Ratio(Ratio), + /// Variant accepting the Range type. + #[fhir_serde(rename = "rateRange")] + Range(Range), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "rateQuantity")] + Quantity(Quantity), +} + +/// Amount of medication administered +/// +/// The amount of medication administered. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "dose,rate")] +pub struct DosageDoseAndRate { + /// Unique id for inter-element referencing /// - /// active | suspended | error | off | test. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the endpoint as not currently valid. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Cardinality: Required (1..1) + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the endpoint. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-status|4.0.1 - pub status: Code, - /// Protocol/Profile/Standard to be used with this endpoint connection + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// The kind of dose or rate specified /// - /// A coded value that represents the technical details of the usage of this - /// endpoint, such as what WSDLs should be used in what way. (e.g. - /// XDS.b/DICOM/cds-hook). + /// The kind of dose or rate specified, for example, ordered or calculated. /// - /// ## Implementation Notes - /// For additional connectivity details for the protocol, extensions will be used - /// at this point, as in the XDS example. + /// ## Requirements + /// If the type is not populated, assume to be "ordered". /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -51361,13 +50614,34 @@ pub struct Endpoint { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-connection-type - #[fhir_serde(rename = "connectionType")] - pub connection_type: Coding, - /// A name that this endpoint can be identified by + /// - **Strength**: example + /// - **Description**: The kind of dose or rate specified. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/dose-rate-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Amount of medication per dose /// - /// A friendly name that this endpoint can be referred to with. + /// Amount of medication per dose. + /// + /// ## Requirements + /// The amount of therapeutic or other substance given at one administration + /// event. + /// + /// ## Implementation Notes + /// Note that this specifies the quantity of the specified medication, not the + /// quantity for each active ingredient(s). Each ingredient amount can be + /// communicated in the Medication resource. For example, if one wants to + /// communicate that a tablet was 375 mg, where the dose was one tablet, you can + /// use the Medication resource to document that the tablet was comprised of 375 + /// mg of drug XYZ. Alternatively if the dose was 375 mg, then you may only need + /// to use the Medication resource to indicate this was a tablet. If the example + /// were an IV such as dopamine and you wanted to communicate that 400mg of + /// dopamine was mixed in 500 ml of some IV solution, then this would all be + /// communicated in the Medication resource. If the administration is not + /// intended to be instantaneous (rate is present or timing has a duration), this + /// can be specified to convey the total amount to be administered over the + /// period of time as indicated by the schedule e.g. 500 ml in dose, with timing + /// used to convey that this should be done over 4 hours. /// /// ## Cardinality: Optional (0..1) /// @@ -51377,20 +50651,36 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Organization that manages this endpoint (might not be the organization that exposes the endpoint) + #[fhir_serde(flatten)] + pub dose: Option, + /// Amount of medication per unit of time /// - /// The organization that manages this endpoint (even if technically another - /// organization is hosting this in the cloud, it is the organization associated - /// with the data). + /// Amount of medication per unit of time. + /// + /// ## Requirements + /// Identifies the speed with which the medication was or will be introduced into + /// the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 + /// ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 + /// hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + /// Sometimes, a rate can imply duration when expressed as total volume / + /// duration (e.g. 500mL/2 hours implies a duration of 2 hours). However, when + /// rate doesn't imply duration (e.g. 250mL/hour), then the + /// timing.repeat.duration is needed to convey the infuse over time period. /// /// ## Implementation Notes - /// This property is not typically used when searching for Endpoint resources for - /// usage. The typical usage is via the reference from an applicable - /// Organization/Location/Practitioner resource, which is where the context is - /// provided. Multiple Locations may reference a single endpoint, and don't have - /// to be within the same organization resource, but most likely within the same - /// organizational hierarchy. + /// It is possible to supply both a rate and a doseQuantity to provide full + /// details about how the medication is to be administered and supplied. If the + /// rate is intended to change over time, depending on local rules/regulations, + /// each change should be captured as a new version of the MedicationRequest with + /// an updated rate, or captured with a new MedicationRequest with the new rate. + /// + /// It is possible to specify a rate over time (for example, 100 ml/hour) using + /// either the rateRatio and rateQuantity. The rateQuantity approach requires + /// systems to have the capability to parse UCUM grammer where ml/hour is + /// included rather than a specific ratio where the time is specified as the + /// denominator. Where a rate such as 500ml over 2 hours is specified, the use of + /// rateRatio may be more semantically correct than specifying using a + /// rateQuantity of 250 mg/hour. /// /// ## Cardinality: Optional (0..1) /// @@ -51400,22 +50690,68 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "managingOrganization")] - pub managing_organization: Option, - /// Contact details for source (e.g. troubleshooting) + #[fhir_serde(flatten)] + pub rate: Option, +} + +/// FHIR Duration type +/// +/// Base StructureDefinition for Duration Type: A length of time. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/Quantity +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [Duration](http://hl7.org/fhir/StructureDefinition/Duration) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Duration { + /// Unique id for inter-element referencing /// - /// Contact details for a human to contact about the subscription. The primary - /// use of this for system administrator troubleshooting. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Interval the endpoint is expected to be operational + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The interval during which the endpoint is expected to be operational. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Numerical value (with implicit precision) + /// + /// The value of the measured amount. The value includes an implicit precision in + /// the presentation of the value. + /// + /// ## Requirements + /// Precision is handled implicitly in almost all cases of measurement. + /// + /// ## Implementation Notes + /// The implicit precision in the value should always be honored. Monetary values + /// have their own rules for handling precision (refer to standard accounting + /// text books). /// /// ## Cardinality: Optional (0..1) /// @@ -51425,43 +50761,42 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// The type of content that may be used at this endpoint (e.g. XDS Discharge summaries) + pub value: Option, + /// < | \<= | \>= | > - how to understand the value /// - /// The payload type describes the acceptable content that can be communicated on - /// the endpoint. + /// How the value should be understood and represented - whether the actual value + /// is greater or less than the stated value due to measurement issues; e.g. if + /// the comparator is "<" , then the real value is < stated value. /// - /// ## Implementation Notes - /// The payloadFormat describes the serialization format of the data, where the - /// payloadType indicates the specific document/schema that is being transferred; - /// e.g. DischargeSummary or CarePlan. + /// ## Requirements + /// Need a framework for handling measures where the value is <5ug/L or >400mg/L + /// due to the limitations of measuring methodology. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value /// - Included in summary + /// - When missing: If there is no comparator, then there is no modification of the value /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-payload-type - #[fhir_serde(rename = "payloadType")] - pub payload_type: Option>, - /// Mimetype to send. If not specified, the content could be anything (including no payload, if the connectionType defined this) + /// - **Strength**: required + /// - **Description**: How the Quantity should be understood and represented. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 + pub comparator: Option, + /// Unit representation /// - /// The mime type to send the payload in - e.g. application/fhir+xml, - /// application/fhir+json. If the mime type is not specified, then the sender - /// could send any content (including no content depending on the - /// connectionType). + /// A human-readable form of the unit. /// - /// ## Implementation Notes - /// Sending the payload has obvious security consequences. The server is - /// responsible for ensuring that the content is appropriately secured. + /// ## Requirements + /// There are many representations for units of measure and in many contexts, + /// particular representations are fixed and required. I.e. mcg for micrograms. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -51469,35 +50804,15 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub unit: Option, + /// System that defines coded unit form /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The mime type of an attachment. Any valid mime type is allowed. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1 - #[fhir_serde(rename = "payloadMimeType")] - pub payload_mime_type: Option>, - /// The technical base address for connecting to this endpoint - /// - /// The uri that describes the actual end-point to connect to. - /// - /// ## Implementation Notes - /// For rest-hook, and websocket, the end-point must be an http: or https: URL; - /// for email, a mailto: url, for sms, a tel: url, and for message the endpoint - /// can be in any form of url the server understands (usually, http: or mllp:). - /// The URI is allowed to be relative; in which case, it is relative to the - /// server end-point (since there may be more than one, clients should avoid - /// using relative URIs) - /// - /// This address will be to the service base, without any parameters, or - /// sub-services or resources tacked on. - /// - /// E.g. for a WADO-RS endpoint, the url should be - /// "https://pacs.hospital.org/wado-rs" + /// The identification of the system that provides the coded form of the unit. /// - /// and not - /// "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345678.678910/series/1.2.250.1.59.40211.789001276.14556172.67789/instances/...". + /// ## Requirements + /// Need to know the system that defines the coded form of the unit. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -51505,27 +50820,39 @@ pub struct Endpoint { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub address: Url, - /// Usage depends on the channel type /// - /// Additional headers / information to send as part of the notification. + /// ## Conditions + /// Used when: qty-3 + pub system: Option, + /// Coded form of the unit + /// + /// A computer processable form of the unit in some unit representation system. + /// + /// ## Requirements + /// Need a computable form of the unit that is fixed across all forms. UCUM + /// provides this for quantities, but SNOMED CT provides many units of interest. /// /// ## Implementation Notes - /// Exactly what these mean depends on the channel type. The can convey - /// additional information to the recipient and/or meet security requirements. + /// The preferred system is UCUM, but SNOMED CT can also be used (for customary + /// units) or ISO 4217 for currency. The context of use may additionally require + /// a code from a particular system. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub header: Option>, + pub code: Option, } -/// FHIR EnrollmentRequest type +/// FHIR EffectEvidenceSynthesis type /// -/// This resource provides the insurance enrollment details to the insurer -/// regarding a specified coverage. +/// The EffectEvidenceSynthesis resource describes the difference in an outcome +/// between exposures states in a population where the effect estimate is derived +/// from a combination of research studies. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -51533,9 +50860,9 @@ pub struct Endpoint { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [EnrollmentRequest](http://hl7.org/fhir/StructureDefinition/EnrollmentRequest) +/// See: [EffectEvidenceSynthesis](http://hl7.org/fhir/StructureDefinition/EffectEvidenceSynthesis) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EnrollmentRequest { +pub struct EffectEvidenceSynthesis { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -51735,128 +51062,200 @@ pub struct EnrollmentRequest { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business Identifier + /// Canonical identifier for this effect evidence synthesis, represented as a URI (globally unique) /// - /// The Response business identifier. + /// An absolute URI that is used to identify this effect evidence synthesis when + /// it is referenced in a specification, model, design or an instance; also + /// called its canonical identifier. This SHOULD be globally unique and SHOULD be + /// a literal address at which at which an authoritative instance of this effect + /// evidence synthesis is (or will be) published. This URL can be the target of a + /// canonical reference. It SHALL remain the same when the effect evidence + /// synthesis is stored on different servers. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Allows the effect evidence synthesis to be referenced by a single globally + /// unique identifier. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | cancelled | draft | entered-in-error + /// ## Implementation Notes + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. /// - /// The status of the resource instance. + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the request as not currently valid. + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub url: Option, + /// Additional identifier for the effect evidence synthesis /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 - pub status: Option, - /// Creation date + /// A formal identifier that is used to identify this effect evidence synthesis + /// when it is represented in other formats, or referenced in a specification, + /// model, design or an instance. /// - /// The date when this resource was created. + /// ## Requirements + /// Allows externally provided and/or usable business identifiers to be easily + /// associated with the module. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance + /// identifier) data type, and can then identify this effect evidence synthesis + /// outside of FHIR, where it is not possible to use the logical URI. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub created: Option, - /// Target + pub identifier: Option>, + /// Business version of the effect evidence synthesis /// - /// The Insurer who is target of the request. + /// The identifier that is used to identify this version of the effect evidence + /// synthesis when it is referenced in a specification, model, design or + /// instance. This is an arbitrary value managed by the effect evidence synthesis + /// author and is not expected to be globally unique. For example, it might be a + /// timestamp (e.g. yyyymmdd) if a managed version is not available. There is + /// also no expectation that versions can be placed in a lexicographical + /// sequence. + /// + /// ## Implementation Notes + /// There may be different effect evidence synthesis instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the + /// effect evidence synthesis with the format [url]|[version]. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub insurer: Option, - /// Responsible practitioner + pub version: Option, + /// Name for this effect evidence synthesis (computer friendly) /// - /// The practitioner who is responsible for the services rendered to the patient. + /// A natural language name identifying the effect evidence synthesis. This name + /// should be usable as an identifier for the module by machine processing + /// applications such as code generation. + /// + /// ## Requirements + /// Support human navigation and code generation. + /// + /// ## Implementation Notes + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option, - /// The subject to be enrolled /// - /// Patient Resource. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// Name for this effect evidence synthesis (human friendly) + /// + /// A short, descriptive, user-friendly title for the effect evidence synthesis. + /// + /// ## Implementation Notes + /// This name does not need to be machine-processing friendly and may contain + /// punctuation, white-space, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub candidate: Option, - /// Insurance information + pub title: Option, + /// draft | active | retired | unknown /// - /// Reference to the program or plan identification, underwriter or payor. + /// The status of this effect evidence synthesis. Enables tracking the life-cycle + /// of the content. /// - /// ## Requirements - /// Need to identify the issuer to target for processing and for coordination of - /// benefit processing. + /// ## Implementation Notes + /// Allows filtering of effect evidence synthesiss that are appropriate for use + /// versus not. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Option, -} - -/// FHIR EnrollmentResponse type -/// -/// This resource provides enrollment and plan details from the processing of an -/// EnrollmentRequest resource. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [EnrollmentResponse](http://hl7.org/fhir/StructureDefinition/EnrollmentResponse) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EnrollmentResponse { - /// Logical id of this artifact /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// Date last changed + /// + /// The date (and optionally time) when the effect evidence synthesis was + /// published. The date must change when the business version changes and it must + /// change if the status code changes. In addition, it should change when the + /// substantive content of the effect evidence synthesis changes. /// /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the effect evidence synthesis. + /// Additional specific dates may be added as extensions or be found by + /// consulting Provenances associated with past versions of the resource. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary - pub id: Option, - /// Metadata about the resource /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// Revision Date + pub date: Option, + /// Name of the publisher (organization or individual) + /// + /// The name of the organization or individual that published the effect evidence + /// synthesis. + /// + /// ## Requirements + /// Helps establish the "authority/credibility" of the effect evidence synthesis. + /// May also allow for contact. + /// + /// ## Implementation Notes + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the effect evidence synthesis is the organization or individual primarily + /// responsible for the maintenance and upkeep of the effect evidence synthesis. + /// This is not necessarily the same individual or organization that developed + /// and initially authored the content. The publisher is the primary point of + /// contact for questions or issues with the effect evidence synthesis. This item + /// SHOULD be populated unless the information is available from context. /// /// ## Cardinality: Optional (0..1) /// @@ -51866,292 +51265,423 @@ pub struct EnrollmentResponse { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + pub publisher: Option, + /// Contact details for the publisher /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// May be a web site, an email address, a telephone number, etc. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + pub contact: Option>, + /// Natural language description of the effect evidence synthesis /// - /// The base language in which the resource is written. + /// A free text natural language description of the effect evidence synthesis + /// from a consumer's perspective. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// This description can be used to capture details such as why the effect + /// evidence synthesis was built, comments about misuse, instructions for + /// clinical use and interpretation, literature references, examples from the + /// paper world, etc. It is not a rendering of the effect evidence synthesis as + /// conveyed in the 'text' field of the resource itself. This item SHOULD be + /// populated unless the information is available from context (e.g. the language + /// of the effect evidence synthesis is presumed to be the predominant language + /// in the place the effect evidence synthesis was created). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Used for footnotes or explanatory notes /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// A human-readable string to clarify or explain concepts about the resource. /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, + /// The context that the content is intended to support + /// + /// The content was developed with a focus and intent of supporting the contexts + /// that are listed. These contexts may be general categories (gender, age, ...) + /// or may be references to specific programs (insurance plans, studies, ...) and + /// may be used to assist with indexing and searching for appropriate effect + /// evidence synthesis instances. + /// + /// ## Requirements + /// Assist in searching for appropriate content. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// When multiple useContexts are specified, there is no expectation that all or + /// any of the contexts apply. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "useContext")] + pub use_context: Option>, + /// Intended jurisdiction for effect evidence synthesis (if applicable) /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// A legal or geographic region in which the effect evidence synthesis is + /// intended to be used. /// /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// It may be possible for the effect evidence synthesis to be used in + /// jurisdictions other than those for which it was originally designed or + /// intended. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Countries and regions within which this artifact is targeted for use. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction + pub jurisdiction: Option>, + /// Use and/or publishing restrictions + /// + /// A copyright statement relating to the effect evidence synthesis and/or its + /// contents. Copyright statements are generally legal restrictions on the use + /// and publishing of the effect evidence synthesis. + /// + /// ## Requirements + /// Consumers must be able to determine any legal restrictions on the use of the + /// effect evidence synthesis and/or its content. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations + /// License, Restrictions + pub copyright: Option, + /// When the effect evidence synthesis was approved by publisher /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// The date on which the resource content was approved by the publisher. + /// Approval happens once when the content is officially approved for usage. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The 'date' element may be more recent than the approval date because of minor + /// changes or editorial corrections. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(rename = "approvalDate")] + pub approval_date: Option, + /// When the effect evidence synthesis was last reviewed /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored + /// The date on which the resource content was last reviewed. Review happens + /// periodically after approval but does not change the original approval date. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Requirements + /// Gives a sense of how "current" the content is. Resources that have not been + /// reviewed in a long time may have a risk of being less appropriate/relevant. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Implementation Notes + /// If specified, this date follows the original approval date. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "lastReviewDate")] + pub last_review_date: Option, + /// When the effect evidence synthesis is expected to be used + /// + /// The period during which the effect evidence synthesis content was or is + /// planned to be in active use. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Allows establishing a transition before a resource comes into effect and also + /// allows for a sunsetting process when new versions of the effect evidence + /// synthesis are or are expected to be used instead. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The effective period for a effect evidence synthesis determines when the + /// content is applicable for usage and is independent of publication and review + /// dates. For example, a measure intended to be used for the year 2016 might be + /// published in 2015. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(rename = "effectivePeriod")] + pub effective_period: Option, + /// The category of the EffectEvidenceSynthesis, such as Education, Treatment, Assessment, etc. /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Business Identifier + /// Descriptive topics related to the content of the EffectEvidenceSynthesis. + /// Topics provide a high-level categorization grouping types of + /// EffectEvidenceSynthesiss that can be useful for filtering and searching. /// - /// The Response business identifier. + /// ## Requirements + /// Repositories must be able to determine how to categorize the + /// EffectEvidenceSynthesis so that it can be found by topical searches. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | cancelled | draft | entered-in-error /// - /// The status of the resource instance. + /// ## Binding + /// - **Strength**: example + /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic + pub topic: Option>, + /// Who authored the content + /// + /// An individiual or organization primarily involved in the creation and + /// maintenance of the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option>, + /// Who edited the content + /// + /// An individual or organization primarily responsible for internal coherence of + /// the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub editor: Option>, + /// Who reviewed the content + /// + /// An individual or organization primarily responsible for review of some aspect + /// of the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub reviewer: Option>, + /// Who endorsed the content + /// + /// An individual or organization responsible for officially endorsing the + /// content for use in some setting. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub endorser: Option>, + /// Additional documentation, citations, etc. + /// + /// Related artifacts such as additional documentation, justification, or + /// bibliographic references. + /// + /// ## Requirements + /// EffectEvidenceSynthesiss must be able to provide enough information for + /// consumers of the content (and/or interventions or results produced by the + /// content) to be able to determine and understand the justification for and + /// evidence in support of the content. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the response as not currently valid. + /// Each related artifact is either an attachment, or a reference to another + /// resource, but not both. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "relatedArtifact")] + pub related_artifact: Option>, + /// Type of synthesis + /// + /// Type of synthesis eg meta-analysis. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Types of combining results from a body of evidence (eg. summary data meta-analysis). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/synthesis-type + #[fhir_serde(rename = "synthesisType")] + pub synthesis_type: Option, + /// Type of study + /// + /// Type of study eg randomized trial. /// /// ## Cardinality: Optional (0..1) /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Types of research studies (types of research methods). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/study-type + #[fhir_serde(rename = "studyType")] + pub study_type: Option, + /// What population? + /// + /// A reference to a EvidenceVariable resource that defines the population for + /// the research. + /// + /// ## Cardinality: Required (1..1) + /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub population: Reference, + /// What exposure? /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 - pub status: Option, - /// Claim reference + /// A reference to a EvidenceVariable resource that defines the exposure for the + /// research. /// - /// Original request resource reference. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub request: Option, - /// queued | complete | error | partial + pub exposure: Reference, + /// What comparison exposure? /// - /// Processing status: error, complete. + /// A reference to a EvidenceVariable resource that defines the comparison + /// exposure for the research. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "exposureAlternative")] + pub exposure_alternative: Reference, + /// What outcome? /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The outcome of the processing. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 - pub outcome: Option, - /// Disposition Message + /// A reference to a EvidenceVariable resomece that defines the outcome for the + /// research. /// - /// A description of the status of the adjudication. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub disposition: Option, - /// Creation date + pub outcome: Reference, + /// What sample size was involved? /// - /// The date when the enclosed suite of services were performed or completed. + /// A description of the size of the sample involved in the synthesis. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub created: Option, - /// Insurer + #[fhir_serde(rename = "sampleSize")] + pub sample_size: Option, + /// What was the result per exposure? /// - /// The Insurer who produced this adjudicated response. + /// A description of the results for each exposure considered in the effect + /// estimate. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub organization: Option, - /// Responsible practitioner + #[fhir_serde(rename = "resultsByExposure")] + pub results_by_exposure: Option>, + /// What was the estimated effect /// - /// The practitioner who is responsible for the services rendered to the patient. + /// The estimated effect of the exposure variant. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "requestProvider")] - pub request_provider: Option, + #[fhir_serde(rename = "effectEstimate")] + pub effect_estimate: Option>, + /// How certain is the effect + /// + /// A description of the certainty of the effect estimate. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub certainty: Option>, } -/// The list of diagnosis relevant to this episode of care +/// How certain is the effect /// -/// The list of diagnosis relevant to this episode of care. +/// A description of the certainty of the effect estimate. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EpisodeOfCareDiagnosis { +pub struct EffectEvidenceSynthesisCertainty { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -52232,58 +51762,47 @@ pub struct EpisodeOfCareDiagnosis { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Conditions/problems/diagnoses this episode of care is for - /// - /// A list of conditions/problems/diagnoses that this episode of care is intended - /// to be providing care for. + /// Certainty rating /// - /// ## Cardinality: Required (1..1) + /// A rating of the certainty of the effect estimate. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub condition: Reference, - /// Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …) /// - /// Role that this diagnosis has within the episode of care (e.g. admission, - /// billing, discharge …). + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-quality + pub rating: Option>, + /// Used for footnotes or explanatory notes /// - /// ## Cardinality: Optional (0..1) + /// A human-readable string to clarify or explain concepts about the resource. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, + /// A component that contributes to the overall certainty /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: The type of diagnosis this condition represents. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnosis-role - pub role: Option, - /// Ranking of the diagnosis (for each role type) - /// - /// Ranking of the diagnosis (for each role type). - /// - /// ## Cardinality: Optional (0..1) + /// A description of a component of the overall certainty. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub rank: Option, + #[fhir_serde(rename = "certaintySubcomponent")] + pub certainty_subcomponent: Option>, } -/// Past list of status codes (the current status may be included to cover the start date of the status) +/// A component that contributes to the overall certainty /// -/// The history of statuses that the EpisodeOfCare has been through (without -/// requiring processing the history of the resource). +/// A description of a component of the overall certainty. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -52291,7 +51810,7 @@ pub struct EpisodeOfCareDiagnosis { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EpisodeOfCareStatusHistory { +pub struct EffectEvidenceSynthesisCertaintyCertaintySubcomponent { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -52372,119 +51891,156 @@ pub struct EpisodeOfCareStatusHistory { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// planned | waitlist | active | onhold | finished | cancelled | entered-in-error + /// Type of subcomponent of certainty rating /// - /// planned | waitlist | active | onhold | finished | cancelled. + /// Type of subcomponent of certainty rating. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the episode of care. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1 - pub status: Code, - /// Duration the EpisodeOfCare was in the specified status + /// - **Strength**: extensible + /// - **Description**: The subcomponent classification of quality of evidence rating systems. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/certainty-subcomponent-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Subcomponent certainty rating /// - /// The period during this EpisodeOfCare that the specific status applied. + /// A rating of a subcomponent of rating certainty. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Period, + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The quality rating of the subcomponent of a quality of evidence rating. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/certainty-subcomponent-rating + pub rating: Option>, + /// Used for footnotes or explanatory notes + /// + /// A human-readable string to clarify or explain concepts about the resource. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub note: Option>, } -/// FHIR EpisodeOfCare type +/// What was the estimated effect /// -/// An association between a patient and an organization / healthcare provider(s) -/// during which time encounters may occur. The managing organization assumes a -/// level of responsibility for the patient during this time. +/// The estimated effect of the exposure variant. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Special Semantics +/// - Included in summary /// -/// See: [EpisodeOfCare](http://hl7.org/fhir/StructureDefinition/EpisodeOfCare) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EpisodeOfCare { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct EffectEvidenceSynthesisEffectEstimate { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Description of effect estimate /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// Human-readable summary of effect estimate. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Type of efffect estimate + /// + /// Examples include relative risk and mean difference. /// /// ## Cardinality: Optional (0..1) /// @@ -52493,61 +52049,91 @@ pub struct EpisodeOfCare { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// - **Strength**: extensible + /// - **Description**: Whether the effect estimate is an absolute effect estimate (absolute difference) or a relative effect estimate (relative difference), and the specific type of effect estimate (eg relative risk or median difference). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/effect-estimate-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Variant exposure states /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// Used to define variant exposure states such as low-risk state. /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-variant-state + #[fhir_serde(rename = "variantState")] + pub variant_state: Option, + /// Point estimate + /// + /// The point estimate of the effect estimate. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub value: Option, + /// What unit is the outcome described in? /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// Specifies the UCUM unit for the outcome. /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: required + /// - **Description**: Unified Code for Units of Measure (UCUM). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ucum-units|4.0.1 + #[fhir_serde(rename = "unitOfMeasure")] + pub unit_of_measure: Option, + /// How precise the estimate is + /// + /// A description of the precision of the estimate for the effect. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "precisionEstimate")] + pub precision_estimate: Option>, +} + +/// How precise the estimate is +/// +/// A description of the precision of the estimate for the effect. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct EffectEvidenceSynthesisEffectEstimatePrecisionEstimate { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -52567,16 +52153,16 @@ pub struct EpisodeOfCare { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -52601,7 +52187,8 @@ pub struct EpisodeOfCare { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -52610,351 +52197,893 @@ pub struct EpisodeOfCare { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business Identifier(s) relevant for this EpisodeOfCare + /// Type of precision estimate /// - /// The EpisodeOfCare may be known by different identifiers for different - /// contexts of use, such as when an external agency is tracking the Episode for - /// funding purposes. + /// Examples include confidence interval and interquartile range. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// planned | waitlist | active | onhold | finished | cancelled | entered-in-error - /// - /// planned | waitlist | active | onhold | finished | cancelled. /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the episode as not currently valid. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Method of reporting variability of estimates, such as confidence intervals, interquartile range or standard deviation. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/precision-estimate-type + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Level of confidence interval /// - /// ## Cardinality: Required (1..1) + /// Use 95 for a 95% confidence interval. /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub level: Option, + /// Lower bound /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of the episode of care. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1 - pub status: Code, - /// Past list of status codes (the current status may be included to cover the start date of the status) - /// - /// The history of statuses that the EpisodeOfCare has been through (without - /// requiring processing the history of the resource). + /// Lower bound of confidence interval. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "statusHistory")] - pub status_history: Option>, - /// Type/class - e.g. specialist referral, disease management - /// - /// A classification of the type of episode of care; e.g. specialist referral, - /// disease management, type of funded care. - /// - /// ## Implementation Notes - /// The type can be very important in processing as this could be used in - /// determining if the EpisodeOfCare is relevant to specific government - /// reporting, or other types of classifications. + pub from: Option, + /// Upper bound /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Upper bound of confidence interval. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub to: Option, +} + +/// What was the result per exposure? +/// +/// A description of the results for each exposure considered in the effect +/// estimate. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct EffectEvidenceSynthesisResultsByExposure { + /// Unique id for inter-element referencing /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The type of the episode of care. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episodeofcare-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// The list of diagnosis relevant to this episode of care - /// - /// The list of diagnosis relevant to this episode of care. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub diagnosis: Option>, - /// The patient who is the focus of this episode of care - /// - /// The patient who is the focus of this episode of care. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Reference, - /// Organization that assumes care + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The organization that has assumed the specific responsibilities for the - /// specified duration. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// ## Cardinality: Optional (0..1) + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. /// - /// ## Special Semantics - /// - Included in summary + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "managingOrganization")] - pub managing_organization: Option, - /// Interval during responsibility is assumed + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// - /// The interval during which the managing organization assumes the defined - /// responsibility. + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Originating Referral Request(s) + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming - /// referrals. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Description of results by exposure /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Human-readable summary of results by exposure state. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "referralRequest")] - pub referral_request: Option>, - /// Care manager/care coordinator for the patient + pub description: Option, + /// exposure | exposure-alternative /// - /// The practitioner that is the care manager/care coordinator for this patient. + /// Whether these results are for the exposure state or alternative exposure + /// state. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "careManager")] - pub care_manager: Option, - /// Other practitioners facilitating this episode of care /// - /// The list of practitioners that may be facilitating this episode of care for - /// specific purposes. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Whether the results by exposure is describing the results for the primary exposure of interest (exposure) or the alternative state (exposureAlternative). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/exposure-state|4.0.1 + #[fhir_serde(rename = "exposureState")] + pub exposure_state: Option, + /// Variant exposure states /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Used to define variant exposure states such as low-risk state. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// CareTeam - pub team: Option>, - /// The set of accounts that may be used for billing for this EpisodeOfCare - /// - /// The set of accounts that may be used for billing for this EpisodeOfCare. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/evidence-variant-state + #[fhir_serde(rename = "variantState")] + pub variant_state: Option, + /// Risk evidence synthesis /// - /// ## Implementation Notes - /// The billing system may choose to allocate billable items associated with the - /// EpisodeOfCare to different referenced Accounts based on internal business - /// rules. + /// Reference to a RiskEvidenceSynthesis resource. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub account: Option>, -} - -/// Choice of types for the subject\[x\] field in EventDefinition -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "subject")] -pub enum EventDefinitionSubject { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "subjectCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "subjectReference")] - Reference(Reference), + #[fhir_serde(rename = "riskEvidenceSynthesis")] + pub risk_evidence_synthesis: Reference, } -/// FHIR EventDefinition type -/// -/// The EventDefinition resource provides a reusable description of when a -/// particular event can occur. +/// What sample size was involved? /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// A description of the size of the sample involved in the synthesis. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional (0..1) /// -/// See: [EventDefinition](http://hl7.org/fhir/StructureDefinition/EventDefinition) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "subject")] -pub struct EventDefinition { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct EffectEvidenceSynthesisSampleSize { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Description of sample size /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// Human-readable summary of sample size. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// How many studies? /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Number of studies included in this evidence synthesis. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "numberOfStudies")] + pub number_of_studies: Option, + /// How many participants? /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// Number of participants included in this evidence synthesis. /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "numberOfParticipants")] + pub number_of_participants: Option, +} + +/// Choice of types for the defaultValue\[x\] field in ElementDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "defaultValue")] +pub enum ElementDefinitionDefaultValue { + /// Variant accepting the Base64Binary type. + #[fhir_serde(rename = "defaultValueBase64Binary")] + Base64Binary(Base64Binary), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "defaultValueBoolean")] + Boolean(Boolean), + /// Variant accepting the Canonical type. + #[fhir_serde(rename = "defaultValueCanonical")] + Canonical(Canonical), + /// Variant accepting the Code type. + #[fhir_serde(rename = "defaultValueCode")] + Code(Code), + /// Variant accepting the Date type. + #[fhir_serde(rename = "defaultValueDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "defaultValueDateTime")] + DateTime(DateTime), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "defaultValueDecimal")] + Decimal(Decimal), + /// Variant accepting the Id type. + #[fhir_serde(rename = "defaultValueId")] + Id(Id), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "defaultValueInstant")] + Instant(Instant), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "defaultValueInteger")] + Integer(Integer), + /// Variant accepting the Markdown type. + #[fhir_serde(rename = "defaultValueMarkdown")] + Markdown(Markdown), + /// Variant accepting the Oid type. + #[fhir_serde(rename = "defaultValueOid")] + Oid(Oid), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "defaultValuePositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "defaultValueString")] + String(String), + /// Variant accepting the Time type. + #[fhir_serde(rename = "defaultValueTime")] + Time(Time), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "defaultValueUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Uri type. + #[fhir_serde(rename = "defaultValueUri")] + Uri(Uri), + /// Variant accepting the Url type. + #[fhir_serde(rename = "defaultValueUrl")] + Url(Url), + /// Variant accepting the Uuid type. + #[fhir_serde(rename = "defaultValueUuid")] + Uuid(Uuid), + /// Variant accepting the Address type. + #[fhir_serde(rename = "defaultValueAddress")] + Address(Address), + /// Variant accepting the Age type. + #[fhir_serde(rename = "defaultValueAge")] + Age(Age), + /// Variant accepting the Annotation type. + #[fhir_serde(rename = "defaultValueAnnotation")] + Annotation(Annotation), + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "defaultValueAttachment")] + Attachment(Attachment), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "defaultValueCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "defaultValueCoding")] + Coding(Coding), + /// Variant accepting the ContactPoint type. + #[fhir_serde(rename = "defaultValueContactPoint")] + ContactPoint(ContactPoint), + /// Variant accepting the Count type. + #[fhir_serde(rename = "defaultValueCount")] + Count(Count), + /// Variant accepting the Distance type. + #[fhir_serde(rename = "defaultValueDistance")] + Distance(Distance), + /// Variant accepting the Duration type. + #[fhir_serde(rename = "defaultValueDuration")] + Duration(Duration), + /// Variant accepting the HumanName type. + #[fhir_serde(rename = "defaultValueHumanName")] + HumanName(HumanName), + /// Variant accepting the Identifier type. + #[fhir_serde(rename = "defaultValueIdentifier")] + Identifier(Identifier), + /// Variant accepting the Money type. + #[fhir_serde(rename = "defaultValueMoney")] + Money(Money), + /// Variant accepting the Period type. + #[fhir_serde(rename = "defaultValuePeriod")] + Period(Period), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "defaultValueQuantity")] + Quantity(Quantity), + /// Variant accepting the Range type. + #[fhir_serde(rename = "defaultValueRange")] + Range(Range), + /// Variant accepting the Ratio type. + #[fhir_serde(rename = "defaultValueRatio")] + Ratio(Ratio), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "defaultValueReference")] + Reference(Reference), + /// Variant accepting the SampledData type. + #[fhir_serde(rename = "defaultValueSampledData")] + SampledData(SampledData), + /// Variant accepting the Signature type. + #[fhir_serde(rename = "defaultValueSignature")] + Signature(Signature), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "defaultValueTiming")] + Timing(Timing), + /// Variant accepting the ContactDetail type. + #[fhir_serde(rename = "defaultValueContactDetail")] + ContactDetail(ContactDetail), + /// Variant accepting the Contributor type. + #[fhir_serde(rename = "defaultValueContributor")] + Contributor(Contributor), + /// Variant accepting the DataRequirement type. + #[fhir_serde(rename = "defaultValueDataRequirement")] + DataRequirement(DataRequirement), + /// Variant accepting the Expression type. + #[fhir_serde(rename = "defaultValueExpression")] + Expression(Expression), + /// Variant accepting the ParameterDefinition type. + #[fhir_serde(rename = "defaultValueParameterDefinition")] + ParameterDefinition(ParameterDefinition), + /// Variant accepting the RelatedArtifact type. + #[fhir_serde(rename = "defaultValueRelatedArtifact")] + RelatedArtifact(RelatedArtifact), + /// Variant accepting the TriggerDefinition type. + #[fhir_serde(rename = "defaultValueTriggerDefinition")] + TriggerDefinition(TriggerDefinition), + /// Variant accepting the UsageContext type. + #[fhir_serde(rename = "defaultValueUsageContext")] + UsageContext(UsageContext), + /// Variant accepting the Dosage type. + #[fhir_serde(rename = "defaultValueDosage")] + Dosage(Dosage), + /// Variant accepting the Meta type. + #[fhir_serde(rename = "defaultValueMeta")] + Meta(Meta), +} + +/// Choice of types for the fixed\[x\] field in ElementDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "fixed")] +pub enum ElementDefinitionFixed { + /// Variant accepting the Base64Binary type. + #[fhir_serde(rename = "fixedBase64Binary")] + Base64Binary(Base64Binary), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "fixedBoolean")] + Boolean(Boolean), + /// Variant accepting the Canonical type. + #[fhir_serde(rename = "fixedCanonical")] + Canonical(Canonical), + /// Variant accepting the Code type. + #[fhir_serde(rename = "fixedCode")] + Code(Code), + /// Variant accepting the Date type. + #[fhir_serde(rename = "fixedDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "fixedDateTime")] + DateTime(DateTime), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "fixedDecimal")] + Decimal(Decimal), + /// Variant accepting the Id type. + #[fhir_serde(rename = "fixedId")] + Id(Id), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "fixedInstant")] + Instant(Instant), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "fixedInteger")] + Integer(Integer), + /// Variant accepting the Markdown type. + #[fhir_serde(rename = "fixedMarkdown")] + Markdown(Markdown), + /// Variant accepting the Oid type. + #[fhir_serde(rename = "fixedOid")] + Oid(Oid), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "fixedPositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "fixedString")] + String(String), + /// Variant accepting the Time type. + #[fhir_serde(rename = "fixedTime")] + Time(Time), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "fixedUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Uri type. + #[fhir_serde(rename = "fixedUri")] + Uri(Uri), + /// Variant accepting the Url type. + #[fhir_serde(rename = "fixedUrl")] + Url(Url), + /// Variant accepting the Uuid type. + #[fhir_serde(rename = "fixedUuid")] + Uuid(Uuid), + /// Variant accepting the Address type. + #[fhir_serde(rename = "fixedAddress")] + Address(Address), + /// Variant accepting the Age type. + #[fhir_serde(rename = "fixedAge")] + Age(Age), + /// Variant accepting the Annotation type. + #[fhir_serde(rename = "fixedAnnotation")] + Annotation(Annotation), + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "fixedAttachment")] + Attachment(Attachment), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "fixedCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "fixedCoding")] + Coding(Coding), + /// Variant accepting the ContactPoint type. + #[fhir_serde(rename = "fixedContactPoint")] + ContactPoint(ContactPoint), + /// Variant accepting the Count type. + #[fhir_serde(rename = "fixedCount")] + Count(Count), + /// Variant accepting the Distance type. + #[fhir_serde(rename = "fixedDistance")] + Distance(Distance), + /// Variant accepting the Duration type. + #[fhir_serde(rename = "fixedDuration")] + Duration(Duration), + /// Variant accepting the HumanName type. + #[fhir_serde(rename = "fixedHumanName")] + HumanName(HumanName), + /// Variant accepting the Identifier type. + #[fhir_serde(rename = "fixedIdentifier")] + Identifier(Identifier), + /// Variant accepting the Money type. + #[fhir_serde(rename = "fixedMoney")] + Money(Money), + /// Variant accepting the Period type. + #[fhir_serde(rename = "fixedPeriod")] + Period(Period), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "fixedQuantity")] + Quantity(Quantity), + /// Variant accepting the Range type. + #[fhir_serde(rename = "fixedRange")] + Range(Range), + /// Variant accepting the Ratio type. + #[fhir_serde(rename = "fixedRatio")] + Ratio(Ratio), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "fixedReference")] + Reference(Reference), + /// Variant accepting the SampledData type. + #[fhir_serde(rename = "fixedSampledData")] + SampledData(SampledData), + /// Variant accepting the Signature type. + #[fhir_serde(rename = "fixedSignature")] + Signature(Signature), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "fixedTiming")] + Timing(Timing), + /// Variant accepting the ContactDetail type. + #[fhir_serde(rename = "fixedContactDetail")] + ContactDetail(ContactDetail), + /// Variant accepting the Contributor type. + #[fhir_serde(rename = "fixedContributor")] + Contributor(Contributor), + /// Variant accepting the DataRequirement type. + #[fhir_serde(rename = "fixedDataRequirement")] + DataRequirement(DataRequirement), + /// Variant accepting the Expression type. + #[fhir_serde(rename = "fixedExpression")] + Expression(Expression), + /// Variant accepting the ParameterDefinition type. + #[fhir_serde(rename = "fixedParameterDefinition")] + ParameterDefinition(ParameterDefinition), + /// Variant accepting the RelatedArtifact type. + #[fhir_serde(rename = "fixedRelatedArtifact")] + RelatedArtifact(RelatedArtifact), + /// Variant accepting the TriggerDefinition type. + #[fhir_serde(rename = "fixedTriggerDefinition")] + TriggerDefinition(TriggerDefinition), + /// Variant accepting the UsageContext type. + #[fhir_serde(rename = "fixedUsageContext")] + UsageContext(UsageContext), + /// Variant accepting the Dosage type. + #[fhir_serde(rename = "fixedDosage")] + Dosage(Dosage), + /// Variant accepting the Meta type. + #[fhir_serde(rename = "fixedMeta")] + Meta(Meta), +} + +/// Choice of types for the pattern\[x\] field in ElementDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "pattern")] +pub enum ElementDefinitionPattern { + /// Variant accepting the Base64Binary type. + #[fhir_serde(rename = "patternBase64Binary")] + Base64Binary(Base64Binary), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "patternBoolean")] + Boolean(Boolean), + /// Variant accepting the Canonical type. + #[fhir_serde(rename = "patternCanonical")] + Canonical(Canonical), + /// Variant accepting the Code type. + #[fhir_serde(rename = "patternCode")] + Code(Code), + /// Variant accepting the Date type. + #[fhir_serde(rename = "patternDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "patternDateTime")] + DateTime(DateTime), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "patternDecimal")] + Decimal(Decimal), + /// Variant accepting the Id type. + #[fhir_serde(rename = "patternId")] + Id(Id), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "patternInstant")] + Instant(Instant), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "patternInteger")] + Integer(Integer), + /// Variant accepting the Markdown type. + #[fhir_serde(rename = "patternMarkdown")] + Markdown(Markdown), + /// Variant accepting the Oid type. + #[fhir_serde(rename = "patternOid")] + Oid(Oid), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "patternPositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "patternString")] + String(String), + /// Variant accepting the Time type. + #[fhir_serde(rename = "patternTime")] + Time(Time), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "patternUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Uri type. + #[fhir_serde(rename = "patternUri")] + Uri(Uri), + /// Variant accepting the Url type. + #[fhir_serde(rename = "patternUrl")] + Url(Url), + /// Variant accepting the Uuid type. + #[fhir_serde(rename = "patternUuid")] + Uuid(Uuid), + /// Variant accepting the Address type. + #[fhir_serde(rename = "patternAddress")] + Address(Address), + /// Variant accepting the Age type. + #[fhir_serde(rename = "patternAge")] + Age(Age), + /// Variant accepting the Annotation type. + #[fhir_serde(rename = "patternAnnotation")] + Annotation(Annotation), + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "patternAttachment")] + Attachment(Attachment), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "patternCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "patternCoding")] + Coding(Coding), + /// Variant accepting the ContactPoint type. + #[fhir_serde(rename = "patternContactPoint")] + ContactPoint(ContactPoint), + /// Variant accepting the Count type. + #[fhir_serde(rename = "patternCount")] + Count(Count), + /// Variant accepting the Distance type. + #[fhir_serde(rename = "patternDistance")] + Distance(Distance), + /// Variant accepting the Duration type. + #[fhir_serde(rename = "patternDuration")] + Duration(Duration), + /// Variant accepting the HumanName type. + #[fhir_serde(rename = "patternHumanName")] + HumanName(HumanName), + /// Variant accepting the Identifier type. + #[fhir_serde(rename = "patternIdentifier")] + Identifier(Identifier), + /// Variant accepting the Money type. + #[fhir_serde(rename = "patternMoney")] + Money(Money), + /// Variant accepting the Period type. + #[fhir_serde(rename = "patternPeriod")] + Period(Period), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "patternQuantity")] + Quantity(Quantity), + /// Variant accepting the Range type. + #[fhir_serde(rename = "patternRange")] + Range(Range), + /// Variant accepting the Ratio type. + #[fhir_serde(rename = "patternRatio")] + Ratio(Ratio), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "patternReference")] + Reference(Reference), + /// Variant accepting the SampledData type. + #[fhir_serde(rename = "patternSampledData")] + SampledData(SampledData), + /// Variant accepting the Signature type. + #[fhir_serde(rename = "patternSignature")] + Signature(Signature), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "patternTiming")] + Timing(Timing), + /// Variant accepting the ContactDetail type. + #[fhir_serde(rename = "patternContactDetail")] + ContactDetail(ContactDetail), + /// Variant accepting the Contributor type. + #[fhir_serde(rename = "patternContributor")] + Contributor(Contributor), + /// Variant accepting the DataRequirement type. + #[fhir_serde(rename = "patternDataRequirement")] + DataRequirement(DataRequirement), + /// Variant accepting the Expression type. + #[fhir_serde(rename = "patternExpression")] + Expression(Expression), + /// Variant accepting the ParameterDefinition type. + #[fhir_serde(rename = "patternParameterDefinition")] + ParameterDefinition(ParameterDefinition), + /// Variant accepting the RelatedArtifact type. + #[fhir_serde(rename = "patternRelatedArtifact")] + RelatedArtifact(RelatedArtifact), + /// Variant accepting the TriggerDefinition type. + #[fhir_serde(rename = "patternTriggerDefinition")] + TriggerDefinition(TriggerDefinition), + /// Variant accepting the UsageContext type. + #[fhir_serde(rename = "patternUsageContext")] + UsageContext(UsageContext), + /// Variant accepting the Dosage type. + #[fhir_serde(rename = "patternDosage")] + Dosage(Dosage), + /// Variant accepting the Meta type. + #[fhir_serde(rename = "patternMeta")] + Meta(Meta), +} + +/// Choice of types for the minValue\[x\] field in ElementDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "minValue")] +pub enum ElementDefinitionMinValue { + /// Variant accepting the Date type. + #[fhir_serde(rename = "minValueDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "minValueDateTime")] + DateTime(DateTime), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "minValueInstant")] + Instant(Instant), + /// Variant accepting the Time type. + #[fhir_serde(rename = "minValueTime")] + Time(Time), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "minValueDecimal")] + Decimal(Decimal), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "minValueInteger")] + Integer(Integer), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "minValuePositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "minValueUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "minValueQuantity")] + Quantity(Quantity), +} + +/// Choice of types for the maxValue\[x\] field in ElementDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "maxValue")] +pub enum ElementDefinitionMaxValue { + /// Variant accepting the Date type. + #[fhir_serde(rename = "maxValueDate")] + Date(Date), + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "maxValueDateTime")] + DateTime(DateTime), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "maxValueInstant")] + Instant(Instant), + /// Variant accepting the Time type. + #[fhir_serde(rename = "maxValueTime")] + Time(Time), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "maxValueDecimal")] + Decimal(Decimal), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "maxValueInteger")] + Integer(Integer), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "maxValuePositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "maxValueUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "maxValueQuantity")] + Quantity(Quantity), +} + +/// FHIR ElementDefinition type +/// +/// Base StructureDefinition for ElementDefinition Type: Captures constraints on +/// each element within the resource, profile, or extension. +/// +/// ## Type: Complex-type type +/// Base type: http://hl7.org/fhir/StructureDefinition/BackboneElement +/// +/// ## Status: active +/// FHIR Version: 4.0.1 +/// +/// See: [ElementDefinition](http://hl7.org/fhir/StructureDefinition/ElementDefinition) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "defaultValue,fixed,pattern,minValue,maxValue")] +pub struct ElementDefinition { + /// Unique id for inter-element referencing /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -52974,16 +53103,16 @@ pub struct EventDefinition { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -53008,7 +53137,8 @@ pub struct EventDefinition { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -53017,38 +53147,15 @@ pub struct EventDefinition { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Canonical identifier for this event definition, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this event definition when it is - /// referenced in a specification, model, design or an instance; also called its - /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal - /// address at which at which an authoritative instance of this event definition - /// is (or will be) published. This URL can be the target of a canonical - /// reference. It SHALL remain the same when the event definition is stored on - /// different servers. - /// - /// ## Requirements - /// Allows the event definition to be referenced by a single globally unique - /// identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). + /// Path of the element in the hierarchy of elements /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. + /// The path identifies the element and is expressed as a "."-separated list of + /// ancestor elements, beginning with the name of the resource or extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -53056,21 +53163,18 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Additional identifier for the event definition - /// - /// A formal identifier that is used to identify this event definition when it is - /// represented in other formats, or referenced in a specification, model, design - /// or an instance. + pub path: String, + /// xmlAttr | xmlText | typeAttr | cdaText | xhtml /// - /// ## Requirements - /// Allows externally provided and/or usable business identifiers to be easily - /// associated with the module. + /// Codes that define how this element is represented in instances, when the + /// deviation varies from the normal case. /// /// ## Implementation Notes - /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance - /// identifier) data type, and can then identify this event definition outside of - /// FHIR, where it is not possible to use the logical URI. + /// In resources, this is rarely used except for special cases where the + /// representation deviates from the normal, and can only be done in the base + /// standard (and profiles must reproduce what the base standard does). This + /// element is used quite commonly in Logical models when the logical models + /// represent a specific serialization format (e.g. CDA, v2 etc.). /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -53080,21 +53184,26 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Business version of the event definition /// - /// The identifier that is used to identify this version of the event definition - /// when it is referenced in a specification, model, design or instance. This is - /// an arbitrary value managed by the event definition author and is not expected - /// to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) - /// if a managed version is not available. There is also no expectation that - /// versions can be placed in a lexicographical sequence. + /// ## Binding + /// - **Strength**: required + /// - **Description**: How a property is represented when serialized. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/property-representation|4.0.1 + pub representation: Option>, + /// Name for this particular element (in a set of slices) + /// + /// The name of this element definition slice, when slicing is working. The name + /// must be a token with no dots or spaces. This is a unique name referring to a + /// specific set of constraints applied to this element, used to provide a name + /// to different slices of the same element. + /// + /// ## Requirements + /// May also be used for code generation purposes. /// /// ## Implementation Notes - /// There may be different event definition instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// event definition with the format [url]|[version]. + /// The name SHALL be unique within the structure within the context of the + /// constrained resource element. (Though to avoid confusion, uniqueness across + /// all elements is recommended.). /// /// ## Cardinality: Optional (0..1) /// @@ -53104,19 +53213,24 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this event definition (computer friendly) + #[fhir_serde(rename = "sliceName")] + pub slice_name: Option, + /// If this slice definition constrains an inherited slice definition (or not) /// - /// A natural language name identifying the event definition. This name should be - /// usable as an identifier for the module by machine processing applications - /// such as code generation. + /// If true, indicates that this slice definition is constraining a slice + /// definition with the same name in an inherited profile. If false, the slice is + /// not overriding any slice in an inherited profile. If missing, the slice might + /// or might not be overriding a slice in an inherited profile, depending on the + /// sliceName. /// /// ## Requirements - /// Support human navigation and code generation. + /// Allows detection of a situation where an ancestor profile adds or removes + /// slicing with the same name where that might impact the child profile. /// /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + /// If set to true, an ancestor profile SHALL have a slicing definition with this + /// name. If set to false, no ancestor profile is permitted to have a slicing + /// definition with this name. /// /// ## Cardinality: Optional (0..1) /// @@ -53126,17 +53240,17 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "sliceIsConstraining")] + pub slice_is_constraining: Option, + /// Name for element to display with or prompt for element /// - /// ## Conditions - /// Used when: inv-0 - pub name: Option, - /// Name for this event definition (human friendly) - /// - /// A short, descriptive, user-friendly title for the event definition. + /// A single preferred label which is the text to display beside the element + /// indicating its meaning or to use to prompt for the element in a user display + /// or form. /// /// ## Implementation Notes - /// This name does not need to be machine-processing friendly and may contain - /// punctuation, white-space, etc. + /// See also the extension + /// (http://hl7.org/fhir/StructureDefinition/elementdefinition-question)[extension-elementdefinition-question.html]. /// /// ## Cardinality: Optional (0..1) /// @@ -53146,31 +53260,27 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// Subordinate title of the event definition + pub label: Option, + /// Corresponding codes in terminologies /// - /// An explanatory or alternate title for the event definition giving additional - /// information about its content. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub subtitle: Option, - /// draft | active | retired | unknown + /// A code that has the same meaning as the element in a particular terminology. /// - /// The status of this event definition. Enables tracking the life-cycle of the - /// content. + /// ## Requirements + /// Links the meaning of an element to an external terminology, and is very + /// useful for searching and indexing. /// /// ## Implementation Notes - /// Allows filtering of event definitions that are appropriate for use versus - /// not. + /// The concept SHALL be properly aligned with the data element definition and + /// other constraints, as defined in the code system, including relationships, of + /// any code listed here. Where multiple codes exist in a terminology that could + /// correspond to the data element, the most granular code(s) should be selected, + /// so long as they are not more restrictive than the data element itself. The + /// mappings may be used to provide more or less granular or structured + /// equivalences in the code system. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration /// - Included in summary /// /// ## Constraints @@ -53178,23 +53288,25 @@ pub struct EventDefinition { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// For testing purposes, not real usage - /// - /// A Boolean value to indicate that this event definition is authored for - /// testing purposes (or education/evaluation/marketing) and is not intended to - /// be used for genuine usage. + /// - **Strength**: example + /// - **Description**: Codes that indicate the meaning of a data element. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/observation-codes + pub code: Option>, + /// This element is sliced - slices follow /// - /// ## Requirements - /// Enables experimental content to be developed following the same lifecycle - /// that would be used for a production-level event definition. + /// Indicates that the element is sliced into a set of alternative definitions + /// (i.e. in a structure definition, there are multiple different constraints on + /// a single element in the base resource). Slicing can be used in any resource + /// that has cardinality ..* on the base resource, or any resource with a choice + /// of types. The set of slices is any elements that come after this in the + /// element sequence that have the same path, until a shorter path occurs (the + /// shorter path terminates the set). /// /// ## Implementation Notes - /// Allows filtering of event definitions that are appropriate for use versus - /// not. + /// The first element in the sequence, the one that carries the slicing, is the + /// definition that applies to all the slices. This is based on the unconstrained + /// element, but can apply any constraints as appropriate. This may include the + /// common constraints on the children of the element. /// /// ## Cardinality: Optional (0..1) /// @@ -53202,41 +53314,46 @@ pub struct EventDefinition { /// - Included in summary /// /// ## Constraints + /// - **eld-1**: If there are no discriminators, there must be a definition (error) + /// Expression: `discriminator.exists() or description.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub experimental: Option, - /// Type of individual the event definition is focused on + pub slicing: Option, + /// Concise definition for space-constrained presentation /// - /// A code or group definition that describes the intended subject of the event - /// definition. + /// A concise description of what this element means (e.g. for use in + /// autogenerated summaries). + /// + /// ## Implementation Notes + /// It is easy for a different short definition to change the meaning of an + /// element and this can have nasty downstream consequences. Please be careful + /// when providing short definitions in a profile. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - When missing: Patient + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub short: Option, + /// Full formal definition as narrative text /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The possible types of subjects for an event (E.g. Patient, Practitioner, Organization, Location, etc.). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/subject-type - #[fhir_serde(flatten)] - pub subject: Option, - /// Date last changed + /// Provides a complete explanation of the meaning of the data element for human + /// readability. For the case of elements derived from existing elements (e.g. + /// constraints), the definition SHALL be consistent with the base definition, + /// but convey the meaning of the element in the particular context of use of the + /// resource. (Note: The text you are reading is specified in + /// ElementDefinition.definition). /// - /// The date (and optionally time) when the event definition was published. The - /// date must change when the business version changes and it must change if the - /// status code changes. In addition, it should change when the substantive - /// content of the event definition changes. + /// ## Requirements + /// To allow a user to state the usage of an element in a particular context. /// /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the event definition. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. + /// It is easy for a different definition to change the meaning of an element and + /// this can have nasty downstream consequences. Please be careful when providing + /// definitions in a profile. /// /// ## Cardinality: Optional (0..1) /// @@ -53248,25 +53365,18 @@ pub struct EventDefinition { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the event - /// definition. + /// Description + pub definition: Option, + /// Comments about the use of this element /// - /// ## Requirements - /// Helps establish the "authority/credibility" of the event definition. May also - /// allow for contact. + /// Explanatory notes and implementation guidance about the data element, + /// including notes about how to use the data properly, exceptions to proper use, + /// etc. (Note: The text you are reading is specified in + /// ElementDefinition.comment). /// /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the event definition is the organization or individual primarily - /// responsible for the maintenance and upkeep of the event definition. This is - /// not necessarily the same individual or organization that developed and - /// initially authored the content. The publisher is the primary point of contact - /// for questions or issues with the event definition. This item SHOULD be - /// populated unless the information is available from context. + /// If it is possible to capture usage rules using constraints, that mechanism + /// should be used in preference to this element. /// /// ## Cardinality: Optional (0..1) /// @@ -53276,16 +53386,20 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher + pub comment: Option, + /// Why this resource has been created /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. + /// This element is for traceability of why the element was created and why the + /// constraints exist as they do. This may be used to point to source materials + /// or specifications that drove the structure of this element. /// /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. + /// This element does not describe the usage of the element (that's done in + /// comments), rather it's for traceability of *why* the element is either needed + /// or why the constraints exist as they do. This may be used to point to source + /// materials or specifications that drove the structure of this data element. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -53293,44 +53407,32 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the event definition + pub requirements: Option, + /// Other names /// - /// A free text natural language description of the event definition from a - /// consumer's perspective. + /// Identifies additional names by which this element might also be known. /// - /// ## Implementation Notes - /// This description can be used to capture details such as why the event - /// definition was built, comments about misuse, instructions for clinical use - /// and interpretation, literature references, examples from the paper world, - /// etc. It is not a rendering of the event definition as conveyed in the 'text' - /// field of the resource itself. This item SHOULD be populated unless the - /// information is available from context (e.g. the language of the event - /// definition is presumed to be the predominant language in the place the event - /// definition was created). + /// ## Requirements + /// Allows for better easier recognition of the element by multiple communities, + /// including international communities. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// The context that the content is intended to support - /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate event - /// definition instances. /// - /// ## Requirements - /// Assist in searching for appropriate content. + /// ## Aliases + /// synonym, other name + pub alias: Option>, + /// Minimum Cardinality /// - /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. + /// The minimum number of times this element SHALL appear in the instance. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -53338,108 +53440,123 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for event definition (if applicable) /// - /// A legal or geographic region in which the event definition is intended to be - /// used. + /// ## Conditions + /// Used when: eld-2 + pub min: Option, + /// Maximum Cardinality (a number or *) /// - /// ## Implementation Notes - /// It may be possible for the event definition to be used in jurisdictions other - /// than those for which it was originally designed or intended. + /// The maximum number of times this element is permitted to appear in the + /// instance. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints + /// - **eld-3**: Max SHALL be a number or "*" (error) + /// Expression: `empty() or ($this = '*') or (toInteger() \>= 0)` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Why this event definition is defined + /// ## Conditions + /// Used when: eld-3, eld-2 + pub max: Option, + /// Base definition information for tools /// - /// Explanation of why this event definition is needed and why it has been - /// designed as it has. + /// Information about the base definition of the element, provided to make it + /// unnecessary for tools to trace the deviation of the element through the + /// derived and related profiles. When the element definition is not the original + /// definition of an element - i.g. either in a constraint on another type, or + /// for elements from a super type in a snap shot - then the information in + /// provided in the element definition may be different to the base definition. + /// On the original definition of the element, it will be same. /// /// ## Implementation Notes - /// This element does not describe the usage of the event definition. Instead, it - /// provides traceability of ''why'' the resource is either needed or ''why'' it - /// is defined as it is. This may be used to point to source materials or - /// specifications that drove the structure of this event definition. + /// The base information does not carry any information that could not be + /// determined from the path and related profiles, but making this determination + /// requires both that the related profiles are available, and that the algorithm + /// to determine them be available. For tooling simplicity, the base information + /// must always be populated in element definitions in snap shots, even if it is + /// the same. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub purpose: Option, - /// Describes the clinical usage of the event definition - /// - /// A detailed description of how the event definition is used from a clinical - /// perspective. - /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub usage: Option, - /// Use and/or publishing restrictions + pub base: Option, + /// Reference to definition of content for the element /// - /// A copyright statement relating to the event definition and/or its contents. - /// Copyright statements are generally legal restrictions on the use and - /// publishing of the event definition. + /// Identifies an element defined elsewhere in the definition whose content rules + /// should be applied to the current element. ContentReferences bring across all + /// the rules that are in the ElementDefinition for the element, including + /// definitions, cardinality constraints, bindings, invariants etc. /// - /// ## Requirements - /// Consumers must be able to determine any legal restrictions on the use of the - /// event definition and/or its content. + /// ## Implementation Notes + /// ContentReferences can only be defined in specializations, not constrained + /// types, and they cannot be changed and always reference the non-constrained + /// definition. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// License, Restrictions - pub copyright: Option, - /// When the event definition was approved by publisher + /// ## Conditions + /// Used when: eld-5 + #[fhir_serde(rename = "contentReference")] + pub content_reference: Option, + /// Data type and Profile for this element /// - /// The date on which the resource content was approved by the publisher. - /// Approval happens once when the content is officially approved for usage. + /// The data type or resource that the value of this element is permitted to be. /// /// ## Implementation Notes - /// The 'date' element may be more recent than the approval date because of minor - /// changes or editorial corrections. + /// The Type of the element can be left blank in a differential constraint, in + /// which case the type is inherited from the resource. Abstract types are not + /// permitted to appear as a type when multiple types are listed. (I.e. Abstract + /// types cannot be part of a choice). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints + /// - **eld-4**: Aggregation may only be specified if one of the allowed types for the element is a reference (error) + /// Expression: `aggregation.empty() or (code = 'Reference') or (code = 'canonical')` + /// - **eld-17**: targetProfile is only allowed if the type is Reference or canonical (error) + /// Expression: `(code='Reference' or code = 'canonical') or targetProfile.empty()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "approvalDate")] - pub approval_date: Option, - /// When the event definition was last reviewed /// - /// The date on which the resource content was last reviewed. Review happens - /// periodically after approval but does not change the original approval date. + /// ## Conditions + /// Used when: eld-13 + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Specified value if missing from instance /// - /// ## Requirements - /// Gives a sense of how "current" the content is. Resources that have not been - /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// The value that should be used if there is no value stated in the instance + /// (e.g. 'if not otherwise specified, the abstract is false'). /// /// ## Implementation Notes - /// If specified, this date follows the original approval date. + /// Specifying a default value means that the property can never been unknown - + /// it must always have a value. Further, the default value can never be changed, + /// or changed in constraints on content models. Defining default values creates + /// many difficulties in implementation (e.g. when is a value missing?). For + /// these reasons, default values are (and should be) used extremely sparingly. + /// + /// No default values are ever defined in the FHIR specification, nor can they be + /// defined in constraints ("profiles") on data types or resources. This element + /// only exists so that default values may be defined in logical models. /// /// ## Cardinality: Optional (0..1) /// @@ -53449,23 +53566,22 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lastReviewDate")] - pub last_review_date: Option, - /// When the event definition is expected to be used /// - /// The period during which the event definition content was or is planned to be - /// in active use. + /// ## Conditions + /// Used when: eld-15 + #[fhir_serde(flatten)] + pub default_value: Option, + /// Implicit meaning when this element is missing /// - /// ## Requirements - /// Allows establishing a transition before a resource comes into effect and also - /// allows for a sunsetting process when new versions of the event definition are - /// or are expected to be used instead. + /// The Implicit meaning that is to be understood when this element is missing + /// (e.g. 'when this element is missing, the period is ongoing'). /// /// ## Implementation Notes - /// The effective period for a event definition determines when the content is - /// applicable for usage and is independent of publication and review dates. For - /// example, a measure intended to be used for the year 2016 might be published - /// in 2015. + /// Implicit meanings for missing values can only be specified on a resource, + /// data type, or extension definition, and never in a profile that applies to + /// one of these. An implicit meaning for a missing value can never be changed, + /// and specifying one has the consequence that constraining its use in profiles + /// eliminates use cases as possibilities, not merely moving them out of scope. /// /// ## Cardinality: Optional (0..1) /// @@ -53475,101 +53591,84 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectivePeriod")] - pub effective_period: Option, - /// E.g. Education, Treatment, Assessment, etc. /// - /// Descriptive topics related to the module. Topics provide a high-level - /// categorization of the module that can be useful for filtering and searching. - /// - /// ## Requirements - /// Repositories must be able to determine how to categorize the module so that - /// it can be found by topical searches. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Conditions + /// Used when: eld-15 + #[fhir_serde(rename = "meaningWhenMissing")] + pub meaning_when_missing: Option, + /// What the order of the elements means /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// If present, indicates that the order of the repeating element has meaning and + /// describes what that meaning is. If absent, it means that the order of the + /// element has no meaning. /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic - pub topic: Option>, - /// Who authored the content + /// ## Implementation Notes + /// This element can only be asserted on repeating elements and can only be + /// introduced when defining resources or data types. It can be further refined + /// profiled elements but if absent in the base type, a profile cannot assert + /// meaning. /// - /// An individiual or organization primarily involved in the creation and - /// maintenance of the content. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who edited the content - /// - /// An individual or organization primarily responsible for internal coherence of - /// the content. + #[fhir_serde(rename = "orderMeaning")] + pub order_meaning: Option, + /// Value must be exactly this /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Specifies a value that SHALL be exactly the value for this element in the + /// instance. For purposes of comparison, non-significant whitespace is ignored, + /// and all values must be an exact match (case and accent sensitive). Missing + /// elements/attributes must also be missing. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub editor: Option>, - /// Who reviewed the content + /// ## Implementation Notes + /// This is not recommended for Coding and CodeableConcept since these often have + /// highly contextual properties such as version or display. /// - /// An individual or organization primarily responsible for review of some aspect - /// of the content. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reviewer: Option>, - /// Who endorsed the content - /// - /// An individual or organization responsible for officially endorsing the - /// content for use in some setting. /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub endorser: Option>, - /// Additional documentation, citations, etc. + /// ## Conditions + /// Used when: eld-5, eld-6, eld-8 + #[fhir_serde(flatten)] + pub fixed: Option, + /// Value must have at least these property values /// - /// Related resources such as additional documentation, justification, or - /// bibliographic references. + /// Specifies a value that the value in the instance SHALL follow - that is, any + /// value in the pattern must be found in the instance. Other additional values + /// may be found too. This is effectively constraint by example. /// - /// ## Requirements - /// Modules must be able to provide enough information for consumers of the - /// content (and/or interventions or results produced by the content) to be able - /// to determine and understand the justification for and evidence in support of - /// the content. + /// When pattern[x] is used to constrain a primitive, it means that the value + /// provided in the pattern[x] must match the instance value exactly. /// - /// ## Implementation Notes - /// Each related resource is either an attachment, or a reference to another - /// resource, but not both. + /// When pattern[x] is used to constrain an array, it means that each element + /// provided in the pattern[x] array must (recursively) match at least one + /// element from the instance array. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// When pattern[x] is used to constrain a complex object, it means that each + /// property in the pattern must be present in the complex object, and its value + /// must recursively match -- i.e., /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relatedArtifact")] - pub related_artifact: Option>, - /// "when" the event occurs (multiple = 'or') + /// 1. If primitive: it must match exactly the pattern value + /// 2. If a complex object: it must match (recursively) the pattern value + /// 3. If an array: it must match (recursively) the pattern value. /// - /// The trigger element defines when the event occurs. If more than one trigger - /// condition is specified, the event fires whenever any one of the trigger - /// conditions is met. + /// ## Implementation Notes + /// Mostly used for fixing values of CodeableConcept. In general, pattern[x] is + /// not intended for use with primitive types, where is has the same meaning as + /// fixed[x]. /// - /// ## Cardinality: Required, Multiple (1..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -53577,45 +53676,24 @@ pub struct EventDefinition { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub trigger: Option>, -} - -/// FHIR Evidence type -/// -/// The Evidence resource describes the conditional state (population and any -/// exposures being compared within the population) and outcome (if specified) -/// that the knowledge (evidence, assertion, recommendation) is about. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [Evidence](http://hl7.org/fhir/StructureDefinition/Evidence) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Evidence { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. /// - /// ## Cardinality: Optional (0..1) + /// ## Conditions + /// Used when: eld-5, eld-7, eld-8 + #[fhir_serde(flatten)] + pub pattern: Option, + /// Example value (as defined for type) /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource + /// A sample value for this element demonstrating the type of information that + /// would typically be found in the element. /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// ## Implementation Notes + /// Examples will most commonly be present for data where it's not implicitly + /// obvious from either the data type or value set what the values might be. + /// (I.e. Example values for dates or quantities would generally be unnecessary.) + /// If the example value is fully populated, the publication tool can generate an + /// instance automatically. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -53623,254 +53701,189 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + pub example: Option>, + /// Minimum Allowed Value (for some types) /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// The minimum allowed value for the element. The value is inclusive. This is + /// allowed for the types date, dateTime, instant, time, decimal, integer, and + /// Quantity. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// Except for date/date/instant, the type of the minValue[x] SHALL be the same + /// as the specified type of the element. For the date/dateTime/instant values, + /// the type of minValue[x] SHALL be either the same, or a + /// [Duration](datatypes.html#Duration) which specifies a relative time limit to + /// the current time. The duration value is positive, and is subtracted from the + /// current clock to determine the minimum allowable value. A minimum value for a + /// Quantity is interpreted as an canonical minimum - e.g. you cannot provide + /// 100mg if the minimum value is 10g. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + #[fhir_serde(flatten)] + pub min_value: Option, + /// Maximum Allowed Value (for some types) /// - /// The base language in which the resource is written. + /// The maximum allowed value for the element. The value is inclusive. This is + /// allowed for the types date, dateTime, instant, time, decimal, integer, and + /// Quantity. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// Except for date/date/instant, the type of the maxValue[x] SHALL be the same + /// as the specified type of the element. For the date/dateTime/instant values, + /// the type of maxValue[x] SHALL be either the same, or a + /// [Duration](datatypes.html#Duration) which specifies a relative time limit to + /// the current time. The duration value is positive, and is added to the current + /// clock to determine the maximum allowable value. A maximum value for a + /// Quantity is interpreted as an canonical maximum - e.g. you cannot provide 10g + /// if the maximum value is 50mg. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub max_value: Option, + /// Max length for strings /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// Indicates the maximum length in characters that is permitted to be present in + /// conformant instances and which is expected to be supported by conformant + /// consumers that support the element. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Receivers are not required to reject instances that exceed the maximum + /// length. The full length could be stored. In some cases, data might be + /// truncated, though truncation should be undertaken with care and an + /// understanding of the consequences of doing so. If not specified, there is no + /// conformance expectation for length support. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "maxLength")] + pub max_length: Option, + /// Reference to invariant about presence /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// A reference to an invariant that may make additional statements about the + /// cardinality or value in the instance. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + pub condition: Option>, + /// Condition that must evaluate to true /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Formal constraints such as co-occurrence and other constraints that can be + /// computationally evaluated within the context of the instance. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Constraints should be declared on the "context" element - the lowest element + /// in the hierarchy that is common to all nodes referenced by the constraint. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Included in summary /// /// ## Constraints + /// - **eld-21**: Constraints should have an expression or else validators will not be able to enforce them (warning) + /// Expression: `expression.exists()` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Canonical identifier for this evidence, represented as a URI (globally unique) + pub constraint: Option>, + /// If the element must be supported /// - /// An absolute URI that is used to identify this evidence when it is referenced - /// in a specification, model, design or an instance; also called its canonical - /// identifier. This SHOULD be globally unique and SHOULD be a literal address at - /// which at which an authoritative instance of this evidence is (or will be) - /// published. This URL can be the target of a canonical reference. It SHALL - /// remain the same when the evidence is stored on different servers. + /// If true, implementations that produce or consume resources SHALL provide + /// "support" for the element in some meaningful way. If false, the element may + /// be ignored and not supported. If false, whether to populate or use the data + /// element in any way is at the discretion of the implementation. /// /// ## Requirements - /// Allows the evidence to be referenced by a single globally unique identifier. + /// Allows a profile to set expectations for system capabilities beyond merely + /// respecting cardinality constraints. /// /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). - /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. + /// "Something useful" is context dependent and impossible to describe in the + /// base FHIR specification. For this reason, tue mustSupport flag is never set + /// to true by the FHIR specification itself - it is only set to true in + /// profiles. A profile on a type can always make musSupport = true if it is + /// false in the base type but cannot make mustSupport = false if it is true in + /// the base type. This is done in [Resource + /// Profiles](profiling.html#mustsupport), where the profile labels an element as + /// mustSupport=true. When a profile does this, it SHALL also make clear exactly + /// what kind of "support" is required, as this can mean many things. Note that + /// an element that has the property IsModifier is not necessarily a "key" + /// element (e.g. one of the important elements to make use of the resource), nor + /// is it automatically mustSupport - however both of these things are more + /// likely to be true for IsModifier elements than for other elements. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary + /// - When missing: In a base type, where the element is being defined for the first time, the element is assumed to be mustSupport = false. In a profile (a constraint on an existing type), if mustSupport is not specific in either the differentil or the snapshot, the mustSupport value is not changed fro the base definition. Not, though, that the snapshot SHOULD always populate the mustSuppot value /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Additional identifier for the evidence + #[fhir_serde(rename = "mustSupport")] + pub must_support: Option, + /// If this modifies the meaning of other elements /// - /// A formal identifier that is used to identify this evidence when it is - /// represented in other formats, or referenced in a specification, model, design - /// or an instance. + /// If true, the value of this element affects the interpretation of the element + /// or resource that contains it, and the value of the element cannot be ignored. + /// Typically, this is used for status, negation and qualification codes. The + /// effect of this is that the element cannot be ignored by systems: they SHALL + /// either recognize the element and process it, and/or a pre-determination has + /// been made that it is not relevant to their particular system. /// /// ## Requirements - /// Allows externally provided and/or usable business identifiers to be easily - /// associated with the module. + /// Allows elements to be introduced into a specification that can't safely be + /// ignored by applications that don't recognize them. /// /// ## Implementation Notes - /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance - /// identifier) data type, and can then identify this evidence outside of FHIR, - /// where it is not possible to use the logical URI. + /// Only the definition of an element can set IsModifier true - either the + /// specification itself or where an extension is originally defined. Once set, + /// it cannot be changed in derived profiles. An element/extension that has + /// isModifier=true SHOULD also have a minimum cardinality of 1, so that there is + /// no lack of clarity about what to do if it is missing. If it can be missing, + /// the definition SHALL make the meaning of a missing element clear. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary + /// - When missing: An element is not a modifier element unless it is explicitly specified to be one /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Business version of the evidence - /// - /// The identifier that is used to identify this version of the evidence when it - /// is referenced in a specification, model, design or instance. This is an - /// arbitrary value managed by the evidence author and is not expected to be - /// globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a - /// managed version is not available. There is also no expectation that versions - /// can be placed in a lexicographical sequence. To provide a version consistent - /// with the Decision Support Service specification, use the format - /// Major.Minor.Revision (e.g. 1.0.0). For more information on versioning - /// knowledge assets, refer to the Decision Support Service specification. Note - /// that a version is required for non-experimental active artifacts. + #[fhir_serde(rename = "isModifier")] + pub is_modifier: Option, + /// Reason that this element is marked as a modifier /// - /// ## Implementation Notes - /// There may be different evidence instances that have the same identifier but - /// different versions. The version can be appended to the url in a reference to - /// allow a reference to a particular business version of the evidence with the - /// format [url]|[version]. + /// Explains how that element affects the interpretation of the resource or + /// element that contains it. /// /// ## Cardinality: Optional (0..1) /// @@ -53880,39 +53893,48 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this evidence (computer friendly) + #[fhir_serde(rename = "isModifierReason")] + pub is_modifier_reason: Option, + /// Include when _summary = true? /// - /// A natural language name identifying the evidence. This name should be usable - /// as an identifier for the module by machine processing applications such as - /// code generation. + /// Whether the element should be included if a client requests a search with the + /// parameter _summary=true. /// /// ## Requirements - /// Support human navigation and code generation. + /// Allow clients to search through large resources quickly. /// /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + /// Some resources include a set of simple metadata, and some very large data. + /// This element is used to reduce the quantity of data returned in searches. + /// Note that servers may pre-cache summarized resources for optimal performance, + /// so servers might not support per-profile use of the isSummary flag. When a + /// request is made with _summary=true, serailisers only include elements marked + /// as 'isSummary = true'. Other than Attachment.data, all data type properties + /// are included in the summary form. In resource and data type definitions, if + /// an element is at the root or has a parent that is 'mustSupport' and the + /// minimum cardinality is 1 or the element is a modifier, it must be marked as + /// isSummary=true. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary + /// - When missing: An element is not included in the summary unless it is explicitly specified to be so /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "isSummary")] + pub is_summary: Option, + /// ValueSet details if this is coded /// - /// ## Conditions - /// Used when: inv-0 - pub name: Option, - /// Name for this evidence (human friendly) - /// - /// A short, descriptive, user-friendly title for the evidence. + /// Binds to a value set if this element is coded (code, Coding, CodeableConcept, + /// Quantity), or the data types (string, uri). /// /// ## Implementation Notes - /// This name does not need to be machine-processing friendly and may contain - /// punctuation, white-space, etc. + /// For a CodeableConcept, when no codes are allowed - only text, use a binding + /// of strength "required" with a description explaining that no coded values are + /// allowed and what sort of information to put in the "text" element. /// /// ## Cardinality: Optional (0..1) /// @@ -53920,101 +53942,107 @@ pub struct Evidence { /// - Included in summary /// /// ## Constraints + /// - **eld-12**: ValueSet SHALL start with http:// or https:// or urn: (error) + /// Expression: `valueSet.exists() implies (valueSet.startsWith('http:') or valueSet.startsWith('https') or valueSet.startsWith('urn:'))` /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// Title for use in informal contexts - /// - /// The short title provides an alternate title for use in informal descriptive - /// contexts where the full, formal title is not necessary. - /// - /// ## Requirements - /// Need to be able to reference the content by a short description, but still - /// provide a longer, more formal title for the content. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "shortTitle")] - pub short_title: Option, - /// Subordinate title of the Evidence - /// - /// An explanatory or alternate title for the Evidence giving additional - /// information about its content. /// - /// ## Cardinality: Optional (0..1) + /// ## Conditions + /// Used when: eld-11 + pub binding: Option, + /// Map element to another set of definitions /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub subtitle: Option, - /// draft | active | retired | unknown + /// Identifies a concept from an external specification that roughly corresponds + /// to this element. /// - /// The status of this evidence. Enables tracking the life-cycle of the content. + /// ## Requirements + /// Provides guidance to implementers familiar with or converting content from + /// other specifications. /// /// ## Implementation Notes - /// Allows filtering of evidences that are appropriate for use versus not. + /// Mappings are not necessarily specific enough for safe translation. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub mapping: Option>, +} + +/// Base definition information for tools +/// +/// Information about the base definition of the element, provided to make it +/// unnecessary for tools to trace the deviation of the element through the +/// derived and related profiles. When the element definition is not the original +/// definition of an element - i.g. either in a constraint on another type, or +/// for elements from a super type in a snap shot - then the information in +/// provided in the element definition may be different to the base definition. +/// On the original definition of the element, it will be same. +/// +/// ## Implementation Notes +/// The base information does not carry any information that could not be +/// determined from the path and related profiles, but making this determination +/// requires both that the related profiles are available, and that the algorithm +/// to determine them be available. For tooling simplicity, the base information +/// must always be populated in element definitions in snap shots, even if it is +/// the same. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionBase { + /// Unique id for inter-element referencing /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// Date last changed + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// The date (and optionally time) when the evidence was published. The date must - /// change when the business version changes and it must change if the status - /// code changes. In addition, it should change when the substantive content of - /// the evidence changes. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the evidence. Additional - /// specific dates may be added as extensions or be found by consulting - /// Provenances associated with past versions of the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the evidence. - /// - /// ## Requirements - /// Helps establish the "authority/credibility" of the evidence. May also allow - /// for contact. + /// extensions, user content + pub extension: Option>, + /// Path that identifies the base element /// - /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the evidence is the organization or individual primarily responsible for - /// the maintenance and upkeep of the evidence. This is not necessarily the same - /// individual or organization that developed and initially authored the content. - /// The publisher is the primary point of contact for questions or issues with - /// the evidence. This item SHOULD be populated unless the information is - /// available from context. + /// The Path that identifies the base element - this matches the + /// ElementDefinition.path for that element. Across FHIR, there is only one base + /// definition of any element - that is, an element definition on a + /// [StructureDefinition](structuredefinition.html#) without a + /// StructureDefinition.base. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54022,16 +54050,17 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher + pub path: String, + /// Min cardinality of the base element /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. + /// Minimum cardinality of the base element identified by the path. /// /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. + /// This is provided for consistency with max, and may affect code generation of + /// mandatory elements of the base resource are generated differently (some + /// reference implementations have done this). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54039,22 +54068,17 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the evidence + pub min: UnsignedInt, + /// Max cardinality of the base element /// - /// A free text natural language description of the evidence from a consumer's - /// perspective. + /// Maximum cardinality of the base element identified by the path. /// /// ## Implementation Notes - /// This description can be used to capture details such as why the evidence was - /// built, comments about misuse, instructions for clinical use and - /// interpretation, literature references, examples from the paper world, etc. It - /// is not a rendering of the evidence as conveyed in the 'text' field of the - /// resource itself. This item SHOULD be populated unless the information is - /// available from context (e.g. the language of the evidence is presumed to be - /// the predominant language in the place the evidence was created). + /// This is provided to code generation, since the serialization representation + /// in JSON differs depending on whether the base element has max > 1. Also, some + /// forms of code generation may differ. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54062,51 +54086,77 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Used for footnotes or explanatory notes - /// - /// A human-readable string to clarify or explain concepts about the resource. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// The context that the content is intended to support - /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate evidence - /// instances. - /// - /// ## Requirements - /// Assist in searching for appropriate content. + pub max: String, +} + +/// ValueSet details if this is coded +/// +/// Binds to a value set if this element is coded (code, Coding, CodeableConcept, +/// Quantity), or the data types (string, uri). +/// +/// ## Implementation Notes +/// For a CodeableConcept, when no codes are allowed - only text, use a binding +/// of strength "required" with a description explaining that no coded values are +/// allowed and what sort of information to put in the "text" element. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **eld-12**: ValueSet SHALL start with http:// or https:// or urn: (error) +/// Expression: `valueSet.exists() implies (valueSet.startsWith('http:') or valueSet.startsWith('https') or valueSet.startsWith('urn:'))` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: eld-11 +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionBinding { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for evidence (if applicable) + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A legal or geographic region in which the evidence is intended to be used. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// required | extensible | preferred | example + /// + /// Indicates the degree of conformance expectations associated with this binding + /// - that is, the degree to which the provided value set must be adhered to in + /// the instances. /// /// ## Implementation Notes - /// It may be possible for the evidence to be used in jurisdictions other than - /// those for which it was originally designed or intended. + /// For further discussion, see [Using Terminologies](terminologies.html). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54116,80 +54166,111 @@ pub struct Evidence { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Use and/or publishing restrictions + /// - **Strength**: required + /// - **Description**: Indication of the degree of conformance expectations associated with a binding. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/binding-strength|4.0.1 /// - /// A copyright statement relating to the evidence and/or its contents. Copyright - /// statements are generally legal restrictions on the use and publishing of the - /// evidence. + /// ## Aliases + /// conformance, extensibility + pub strength: Code, + /// Human explanation of the value set /// - /// ## Requirements - /// Consumers must be able to determine any legal restrictions on the use of the - /// evidence and/or its content. + /// Describes the intended use of this particular set of codes. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Source of value set /// - /// ## Aliases - /// License, Restrictions - pub copyright: Option, - /// When the evidence was approved by publisher - /// - /// The date on which the resource content was approved by the publisher. - /// Approval happens once when the content is officially approved for usage. + /// Refers to the value set that identifies the set of codes the binding refers + /// to. /// /// ## Implementation Notes - /// The 'date' element may be more recent than the approval date because of minor - /// changes or editorial corrections. + /// The reference may be version-specific or not (e.g. have a |[version] at the + /// end of the canonical URL). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "approvalDate")] - pub approval_date: Option, - /// When the evidence was last reviewed /// - /// The date on which the resource content was last reviewed. Review happens - /// periodically after approval but does not change the original approval date. + /// ## Conditions + /// Used when: eld-12 + #[fhir_serde(rename = "valueSet")] + pub value_set: Option, +} + +/// Condition that must evaluate to true +/// +/// Formal constraints such as co-occurrence and other constraints that can be +/// computationally evaluated within the context of the instance. +/// +/// ## Implementation Notes +/// Constraints should be declared on the "context" element - the lowest element +/// in the hierarchy that is common to all nodes referenced by the constraint. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **eld-21**: Constraints should have an expression or else validators will not be able to enforce them (warning) +/// Expression: `expression.exists()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionConstraint { + /// Unique id for inter-element referencing /// - /// ## Requirements - /// Gives a sense of how "current" the content is. Resources that have not been - /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// If specified, this date follows the original approval date. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lastReviewDate")] - pub last_review_date: Option, - /// When the evidence is expected to be used - /// - /// The period during which the evidence content was or is planned to be in - /// active use. + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Requirements - /// Allows establishing a transition before a resource comes into effect and also - /// allows for a sunsetting process when new versions of the evidence are or are - /// expected to be used instead. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Target of 'condition' reference above /// - /// ## Implementation Notes - /// The effective period for a evidence determines when the content is applicable - /// for usage and is independent of publication and review dates. For example, a - /// measure intended to be used for the year 2016 might be published in 2015. + /// Allows identification of which elements have their cardinalities impacted by + /// the constraint. Will not be referenced for constraints that do not affect + /// cardinality. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54197,101 +54278,80 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectivePeriod")] - pub effective_period: Option, - /// The category of the Evidence, such as Education, Treatment, Assessment, etc. - /// - /// Descriptive topics related to the content of the Evidence. Topics provide a - /// high-level categorization grouping types of Evidences that can be useful for - /// filtering and searching. - /// - /// ## Requirements - /// Repositories must be able to determine how to categorize the Evidence so that - /// it can be found by topical searches. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Conditions + /// Used when: eld-14 + pub key: Id, + /// Why this constraint is necessary or appropriate /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// Description of why this constraint is necessary or appropriate. /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic - pub topic: Option>, - /// Who authored the content + /// ## Implementation Notes + /// To be used if the reason for the constraint might not be intuitive to all + /// implementers. /// - /// An individiual or organization primarily involved in the creation and - /// maintenance of the content. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who edited the content + pub requirements: Option, + /// error | warning /// - /// An individual or organization primarily responsible for internal coherence of - /// the content. + /// Identifies the impact constraint violation has on the conformance of the + /// instance. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// This allows constraints to be asserted as "shall" (error) and "should" + /// (warning). + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub editor: Option>, - /// Who reviewed the content /// - /// An individual or organization primarily responsible for review of some aspect - /// of the content. + /// ## Binding + /// - **Strength**: required + /// - **Description**: SHALL applications comply with this constraint? + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/constraint-severity|4.0.1 + pub severity: Code, + /// Human description of constraint /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Text that can be used to describe the constraint in messages identifying that + /// the constraint has been violated. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub reviewer: Option>, - /// Who endorsed the content + /// ## Implementation Notes + /// Should be expressed in business terms as much as possible. /// - /// An individual or organization responsible for officially endorsing the - /// content for use in some setting. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub endorser: Option>, - /// Additional documentation, citations, etc. + pub human: String, + /// FHIRPath expression of constraint /// - /// Related artifacts such as additional documentation, justification, or - /// bibliographic references. + /// A [FHIRPath](fhirpath.html) expression of constraint that can be executed to + /// see if this constraint is met. /// /// ## Requirements - /// Evidences must be able to provide enough information for consumers of the - /// content (and/or interventions or results produced by the content) to be able - /// to determine and understand the justification for and evidence in support of - /// the content. + /// Used by validation tooling tests of the validity of the resource. /// /// ## Implementation Notes - /// Each related artifact is either an attachment, or a reference to another - /// resource, but not both. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relatedArtifact")] - pub related_artifact: Option>, - /// What population? - /// - /// A reference to a EvidenceVariable resource that defines the population for - /// the research. + /// In the absense of an expression, the expression is likely not enforceable by + /// validators, and might be missed by many systems. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -54299,14 +54359,23 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "exposureBackground")] - pub exposure_background: Reference, - /// What exposure? + pub expression: Option, + /// XPath expression of constraint /// - /// A reference to a EvidenceVariable resource that defines the exposure for the - /// research. + /// An XPath expression of constraint that can be executed to see if this + /// constraint is met. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Used in Schematron tests of the validity of the resource. + /// + /// ## Implementation Notes + /// Elements SHALL use "f" as the namespace prefix for the FHIR namespace, and + /// "x" for the xhtml namespace, and SHALL NOT use any other prefixes. Note: + /// XPath is generally considered not useful because it does not apply to JSON + /// and other formats and because of XSLT implementation issues, and may be + /// removed in the future. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -54314,14 +54383,17 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "exposureVariant")] - pub exposure_variant: Option>, - /// What outcome? + pub xpath: Option, + /// Reference to original source of constraint /// - /// A reference to a EvidenceVariable resomece that defines the outcome for the - /// research. + /// A reference to the original source of the constraint, for traceability + /// purposes. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// This is used when, e.g. rendering, where it is not useful to present + /// inherited constraints when rendering the snapshot. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -54329,62 +54401,178 @@ pub struct Evidence { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub outcome: Option>, + pub source: Option, } -/// Choice of types for the definition\[x\] field in EvidenceVariableCharacteristic +/// Choice of types for the value\[x\] field in ElementDefinitionExample #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "definition")] -pub enum EvidenceVariableCharacteristicDefinition { - /// Variant accepting the Reference type. - #[fhir_serde(rename = "definitionReference")] - Reference(Reference), +#[fhir_choice_element(base_name = "value")] +pub enum ElementDefinitionExampleValue { + /// Variant accepting the Base64Binary type. + #[fhir_serde(rename = "valueBase64Binary")] + Base64Binary(Base64Binary), + /// Variant accepting the Boolean type. + #[fhir_serde(rename = "valueBoolean")] + Boolean(Boolean), /// Variant accepting the Canonical type. - #[fhir_serde(rename = "definitionCanonical")] + #[fhir_serde(rename = "valueCanonical")] Canonical(Canonical), - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "definitionCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Expression type. - #[fhir_serde(rename = "definitionExpression")] - Expression(Expression), - /// Variant accepting the DataRequirement type. - #[fhir_serde(rename = "definitionDataRequirement")] - DataRequirement(DataRequirement), - /// Variant accepting the TriggerDefinition type. - #[fhir_serde(rename = "definitionTriggerDefinition")] - TriggerDefinition(TriggerDefinition), -} - -/// Choice of types for the participantEffective\[x\] field in EvidenceVariableCharacteristic -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "participantEffective")] -pub enum EvidenceVariableCharacteristicParticipantEffective { + /// Variant accepting the Code type. + #[fhir_serde(rename = "valueCode")] + Code(Code), + /// Variant accepting the Date type. + #[fhir_serde(rename = "valueDate")] + Date(Date), /// Variant accepting the DateTime type. - #[fhir_serde(rename = "participantEffectiveDateTime")] + #[fhir_serde(rename = "valueDateTime")] DateTime(DateTime), - /// Variant accepting the Period type. - #[fhir_serde(rename = "participantEffectivePeriod")] - Period(Period), + /// Variant accepting the Decimal type. + #[fhir_serde(rename = "valueDecimal")] + Decimal(Decimal), + /// Variant accepting the Id type. + #[fhir_serde(rename = "valueId")] + Id(Id), + /// Variant accepting the Instant type. + #[fhir_serde(rename = "valueInstant")] + Instant(Instant), + /// Variant accepting the Integer type. + #[fhir_serde(rename = "valueInteger")] + Integer(Integer), + /// Variant accepting the Markdown type. + #[fhir_serde(rename = "valueMarkdown")] + Markdown(Markdown), + /// Variant accepting the Oid type. + #[fhir_serde(rename = "valueOid")] + Oid(Oid), + /// Variant accepting the PositiveInt type. + #[fhir_serde(rename = "valuePositiveInt")] + PositiveInt(PositiveInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "valueString")] + String(String), + /// Variant accepting the Time type. + #[fhir_serde(rename = "valueTime")] + Time(Time), + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "valueUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Uri type. + #[fhir_serde(rename = "valueUri")] + Uri(Uri), + /// Variant accepting the Url type. + #[fhir_serde(rename = "valueUrl")] + Url(Url), + /// Variant accepting the Uuid type. + #[fhir_serde(rename = "valueUuid")] + Uuid(Uuid), + /// Variant accepting the Address type. + #[fhir_serde(rename = "valueAddress")] + Address(Address), + /// Variant accepting the Age type. + #[fhir_serde(rename = "valueAge")] + Age(Age), + /// Variant accepting the Annotation type. + #[fhir_serde(rename = "valueAnnotation")] + Annotation(Annotation), + /// Variant accepting the Attachment type. + #[fhir_serde(rename = "valueAttachment")] + Attachment(Attachment), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "valueCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Coding type. + #[fhir_serde(rename = "valueCoding")] + Coding(Coding), + /// Variant accepting the ContactPoint type. + #[fhir_serde(rename = "valueContactPoint")] + ContactPoint(ContactPoint), + /// Variant accepting the Count type. + #[fhir_serde(rename = "valueCount")] + Count(Count), + /// Variant accepting the Distance type. + #[fhir_serde(rename = "valueDistance")] + Distance(Distance), /// Variant accepting the Duration type. - #[fhir_serde(rename = "participantEffectiveDuration")] + #[fhir_serde(rename = "valueDuration")] Duration(Duration), + /// Variant accepting the HumanName type. + #[fhir_serde(rename = "valueHumanName")] + HumanName(HumanName), + /// Variant accepting the Identifier type. + #[fhir_serde(rename = "valueIdentifier")] + Identifier(Identifier), + /// Variant accepting the Money type. + #[fhir_serde(rename = "valueMoney")] + Money(Money), + /// Variant accepting the Period type. + #[fhir_serde(rename = "valuePeriod")] + Period(Period), + /// Variant accepting the Quantity type. + #[fhir_serde(rename = "valueQuantity")] + Quantity(Quantity), + /// Variant accepting the Range type. + #[fhir_serde(rename = "valueRange")] + Range(Range), + /// Variant accepting the Ratio type. + #[fhir_serde(rename = "valueRatio")] + Ratio(Ratio), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "valueReference")] + Reference(Reference), + /// Variant accepting the SampledData type. + #[fhir_serde(rename = "valueSampledData")] + SampledData(SampledData), + /// Variant accepting the Signature type. + #[fhir_serde(rename = "valueSignature")] + Signature(Signature), /// Variant accepting the Timing type. - #[fhir_serde(rename = "participantEffectiveTiming")] + #[fhir_serde(rename = "valueTiming")] Timing(Timing), + /// Variant accepting the ContactDetail type. + #[fhir_serde(rename = "valueContactDetail")] + ContactDetail(ContactDetail), + /// Variant accepting the Contributor type. + #[fhir_serde(rename = "valueContributor")] + Contributor(Contributor), + /// Variant accepting the DataRequirement type. + #[fhir_serde(rename = "valueDataRequirement")] + DataRequirement(DataRequirement), + /// Variant accepting the Expression type. + #[fhir_serde(rename = "valueExpression")] + Expression(Expression), + /// Variant accepting the ParameterDefinition type. + #[fhir_serde(rename = "valueParameterDefinition")] + ParameterDefinition(ParameterDefinition), + /// Variant accepting the RelatedArtifact type. + #[fhir_serde(rename = "valueRelatedArtifact")] + RelatedArtifact(RelatedArtifact), + /// Variant accepting the TriggerDefinition type. + #[fhir_serde(rename = "valueTriggerDefinition")] + TriggerDefinition(TriggerDefinition), + /// Variant accepting the UsageContext type. + #[fhir_serde(rename = "valueUsageContext")] + UsageContext(UsageContext), + /// Variant accepting the Dosage type. + #[fhir_serde(rename = "valueDosage")] + Dosage(Dosage), + /// Variant accepting the Meta type. + #[fhir_serde(rename = "valueMeta")] + Meta(Meta), } -/// What defines the members of the evidence element +/// Example value (as defined for type) /// -/// A characteristic that defines the members of the evidence element. Multiple -/// characteristics are applied with "and" semantics. +/// A sample value for this element demonstrating the type of information that +/// would typically be found in the element. /// /// ## Implementation Notes -/// Characteristics can be defined flexibly to accommodate different use cases -/// for membership criteria, ranging from simple codes, all the way to using an -/// expression language to express the criteria. +/// Examples will most commonly be present for data where it's not implicitly +/// obvious from either the data type or value set what the values might be. +/// (I.e. Example values for dates or quantities would generally be unnecessary.) +/// If the example value is fully populated, the publication tool can generate an +/// instance automatically. /// -/// ## Cardinality: Required, Multiple (1..*) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -54393,8 +54581,8 @@ pub enum EvidenceVariableCharacteristicParticipantEffective { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "definition,participantEffective")] -pub struct EvidenceVariableCharacteristic { +#[fhir_resource(choice_elements = "value")] +pub struct ElementDefinitionExample { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -54428,80 +54616,94 @@ pub struct EvidenceVariableCharacteristic { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Describes the purpose of this example /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Describes the purpose of this example amoung the set of examples. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Cardinality: Required (1..1) /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Special Semantics + /// - Included in summary /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub label: String, + /// Value of Example (one of allowed types) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The actual value for the element, which must be one of the types allowed for + /// this element. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(flatten)] + pub value: Option, +} + +/// Map element to another set of definitions +/// +/// Identifies a concept from an external specification that roughly corresponds +/// to this element. +/// +/// ## Requirements +/// Provides guidance to implementers familiar with or converting content from +/// other specifications. +/// +/// ## Implementation Notes +/// Mappings are not necessarily specific enough for safe translation. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionMapping { + /// Unique id for inter-element referencing /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Natural language description of the characteristic + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// A short, natural language description of the characteristic that could be - /// used to communicate the criteria to an end-user. + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Requirements - /// Need to be able to describe characteristics in natural language so that end - /// users can understand the criteria. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// What code or expression defines members? + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Define members of the evidence element using Codes (such as condition, - /// medication, or observation), Expressions ( using an expression language such - /// as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in - /// the last year). + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Reference to mapping declaration /// - /// ## Requirements - /// Need to be able to define members in simple codes when the membership aligns - /// well with terminology, with common criteria such as observations in a value - /// set or lab tests within a year, or with expression language to support - /// criteria that do not fit in the above. + /// An internal reference to the definition of a mapping. /// /// ## Cardinality: Required (1..1) /// @@ -54511,270 +54713,252 @@ pub struct EvidenceVariableCharacteristic { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub definition: Option, - /// What code/value pairs define members? - /// - /// Use UsageContext to define the members of the population, such as Age Ranges, - /// Genders, Settings. - /// - /// ## Requirements - /// Need to be able to define members more structurally when more information can - /// be communicated such as age range. - /// - /// ## Cardinality: Optional, Multiple (0..*) + pub identity: Id, + /// Computable language of mapping /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "usageContext")] - pub usage_context: Option>, - /// Whether the characteristic includes or excludes members + /// Identifies the computable language in which mapping.map is expressed. /// - /// When true, members with this characteristic are excluded from the element. + /// ## Implementation Notes + /// If omitted, then there can be no expectation of computational interpretation + /// of the mapping. /// /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - When missing: False + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub exclude: Option, - /// What time period do participants cover /// - /// Indicates what effective period the study covers. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The mime type of an attachment. Any valid mime type is allowed. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1 + pub language: Option, + /// Details of the mapping /// - /// ## Cardinality: Optional (0..1) + /// Expresses what part of the target specification corresponds to this element. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub participant_effective: Option, - /// Observation time from study start + /// ## Implementation Notes + /// For most mappings, the syntax is undefined. Syntax will be provided for + /// mappings to the RIM. Multiple mappings may be possible and may include + /// constraints on other resource elements that identify when a particular + /// mapping applies. /// - /// Indicates duration from the participant's study entry. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "timeFromStart")] - pub time_from_start: Option, - /// mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median + pub map: String, + /// Comments about the mapping or its use /// - /// Indicates how elements are aggregated within the study effective period. + /// Comments that provide information about the mapping or its use. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Possible group measure aggregates (E.g. Mean, Median). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/group-measure|4.0.1 - #[fhir_serde(rename = "groupMeasure")] - pub group_measure: Option, + pub comment: Option, } -/// FHIR EvidenceVariable type +/// This element is sliced - slices follow /// -/// The EvidenceVariable resource describes a "PICO" element that knowledge -/// (evidence, assertion, recommendation) is about. +/// Indicates that the element is sliced into a set of alternative definitions +/// (i.e. in a structure definition, there are multiple different constraints on +/// a single element in the base resource). Slicing can be used in any resource +/// that has cardinality ..* on the base resource, or any resource with a choice +/// of types. The set of slices is any elements that come after this in the +/// element sequence that have the same path, until a shorter path occurs (the +/// shorter path terminates the set). /// -/// ## Purpose -/// Need to be able to define and reuse the definition of individual elements of a research question. +/// ## Implementation Notes +/// The first element in the sequence, the one that carries the slicing, is the +/// definition that applies to all the slices. This is based on the unconstrained +/// element, but can apply any constraints as appropriate. This may include the +/// common constraints on the children of the element. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Cardinality: Optional (0..1) /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Special Semantics +/// - Included in summary /// -/// See: [EvidenceVariable](http://hl7.org/fhir/StructureDefinition/EvidenceVariable) +/// ## Constraints +/// - **eld-1**: If there are no discriminators, there must be a definition (error) +/// Expression: `discriminator.exists() or description.exists()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct EvidenceVariable { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct ElementDefinitionSlicing { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Element values that are used to distinguish the slices + /// + /// Designates which child elements are used to discriminate between the slices + /// when processing an instance. If one or more discriminators are provided, the + /// value of the child elements in the instance data SHALL completely distinguish + /// which slice the element in the resource matches based on the allowed values + /// for those elements in each of the slices. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// If there is no discriminator, the content is hard to process, so this should + /// be avoided. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + pub discriminator: Option>, + /// Text description of how slicing works (or not) /// - /// The base language in which the resource is written. + /// A human-readable text description of how the slicing works. If there is no + /// discriminator, this is required to be present to provide whatever information + /// is possible about how the slices can be differentiated. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// If it's really not possible to differentiate them, the design should be + /// re-evaluated to make the content usable. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// ## Conditions + /// Used when: eld-1 + pub description: Option, + /// If elements must be in same order as slices /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// If the matching elements have to occur in the same order as defined in the + /// profile. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Order should only be required when it is a pressing concern for presentation. + /// Profile authors should consider making the order a feature of the rules about + /// the narrative, not the rules about the data - requiring ordered data makes + /// the profile much less re-usable. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// - When missing: Order is not required unless specified + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub ordered: Option, + /// closed | open | openAtEnd /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// Whether additional slices are allowed or not. When the slices are ordered, + /// profile authors can also say that additional slices are only allowed at the + /// end. /// /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// Allowing additional elements makes for a much for flexible template - it's + /// open for use in wider contexts, but also means that the content of the + /// resource is not closed, and applications have to decide how to handle content + /// not described by the profile. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored + /// ## Binding + /// - **Strength**: required + /// - **Description**: How slices are interpreted when evaluating an instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-slicing-rules|4.0.1 + pub rules: Code, +} + +/// Element values that are used to distinguish the slices +/// +/// Designates which child elements are used to discriminate between the slices +/// when processing an instance. If one or more discriminators are provided, the +/// value of the child elements in the instance data SHALL completely distinguish +/// which slice the element in the resource matches based on the allowed values +/// for those elements in each of the slices. +/// +/// ## Implementation Notes +/// If there is no discriminator, the content is hard to process, so this should +/// be avoided. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionSlicingDiscriminator { + /// Unique id for inter-element referencing /// - /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -54785,9 +54969,6 @@ pub struct EvidenceVariable { /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` @@ -54796,37 +54977,12 @@ pub struct EvidenceVariable { /// /// ## Aliases /// extensions, user content - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Canonical identifier for this evidence variable, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this evidence variable when it is - /// referenced in a specification, model, design or an instance; also called its - /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal - /// address at which at which an authoritative instance of this evidence variable - /// is (or will be) published. This URL can be the target of a canonical - /// reference. It SHALL remain the same when the evidence variable is stored on - /// different servers. - /// - /// ## Requirements - /// Allows the evidence variable to be referenced by a single globally unique - /// identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). + pub extension: Option>, + /// value | exists | pattern | type | profile /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. + /// How the element value is interpreted when discrimination is evaluated. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54834,23 +54990,24 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Additional identifier for the evidence variable /// - /// A formal identifier that is used to identify this evidence variable when it - /// is represented in other formats, or referenced in a specification, model, - /// design or an instance. + /// ## Binding + /// - **Strength**: required + /// - **Description**: How an element value is interpreted when discrimination is evaluated. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/discriminator-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// Path to element value /// - /// ## Requirements - /// Allows externally provided and/or usable business identifiers to be easily - /// associated with the module. + /// A FHIRPath expression, using [the simple subset of + /// FHIRPath](fhirpath.html#simple), that is used to identify the element on + /// which discrimination is based. /// /// ## Implementation Notes - /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance - /// identifier) data type, and can then identify this evidence variable outside - /// of FHIR, where it is not possible to use the logical URI. + /// The only FHIRPath functions that are allowed are as(type), resolve(), and + /// extension(url). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54858,27 +55015,84 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Business version of the evidence variable + pub path: String, +} + +/// Data type and Profile for this element +/// +/// The data type or resource that the value of this element is permitted to be. +/// +/// ## Implementation Notes +/// The Type of the element can be left blank in a differential constraint, in +/// which case the type is inherited from the resource. Abstract types are not +/// permitted to appear as a type when multiple types are listed. (I.e. Abstract +/// types cannot be part of a choice). +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **eld-4**: Aggregation may only be specified if one of the allowed types for the element is a reference (error) +/// Expression: `aggregation.empty() or (code = 'Reference') or (code = 'canonical')` +/// - **eld-17**: targetProfile is only allowed if the type is Reference or canonical (error) +/// Expression: `(code='Reference' or code = 'canonical') or targetProfile.empty()` +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +/// +/// ## Conditions +/// Used when: eld-13 +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ElementDefinitionType { + /// Unique id for inter-element referencing /// - /// The identifier that is used to identify this version of the evidence variable - /// when it is referenced in a specification, model, design or instance. This is - /// an arbitrary value managed by the evidence variable author and is not - /// expected to be globally unique. For example, it might be a timestamp (e.g. - /// yyyymmdd) if a managed version is not available. There is also no expectation - /// that versions can be placed in a lexicographical sequence. To provide a - /// version consistent with the Decision Support Service specification, use the - /// format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning - /// knowledge assets, refer to the Decision Support Service specification. Note - /// that a version is required for non-experimental active artifacts. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// There may be different evidence variable instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// evidence variable with the format [url]|[version]. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Data type or Resource (reference to definition) + /// + /// URL of Data type or Resource that is a(or the) type used for this element. + /// References are URLs that are relative to + /// http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to + /// http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only + /// allowed in logical models. + /// + /// ## Implementation Notes + /// If the element is a reference to another resource, this element contains + /// "Reference", and the targetProfile element defines what resources can be + /// referenced. The targetProfile may be a reference to the general definition of + /// a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient). + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -54886,21 +55100,28 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this evidence variable (computer friendly) /// - /// A natural language name identifying the evidence variable. This name should - /// be usable as an identifier for the module by machine processing applications - /// such as code generation. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Either a resource or a data type, including logical model types. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/defined-types + pub code: Uri, + /// Profiles (StructureDefinition or IG) - one must apply /// - /// ## Requirements - /// Support human navigation and code generation. + /// Identifies a profile structure or implementation Guide that applies to the + /// datatype this element refers to. If any profiles are specified, then the + /// content must conform to at least one of them. The URL can be a local + /// reference - to a contained StructureDefinition, or a reference to another + /// StructureDefinition or Implementation Guide by a canonical URL. When an + /// implementation guide is specified, the type SHALL conform to at least one + /// profile defined in the implementation guide. /// /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + /// It is possible to profile backbone element (e.g. part of a resource), using + /// the [profile-element](extension-elementdefinition-profile-element.html) + /// extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -54908,19 +55129,39 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub profile: Option>, + /// Profile (StructureDefinition or IG) on the Reference/canonical target - one must apply /// - /// ## Conditions - /// Used when: inv-0 - pub name: Option, - /// Name for this evidence variable (human friendly) + /// Used when the type is "Reference" or "canonical", and identifies a profile + /// structure or implementation Guide that applies to the target of the reference + /// this element refers to. If any profiles are specified, then the content must + /// conform to at least one of them. The URL can be a local reference - to a + /// contained StructureDefinition, or a reference to another StructureDefinition + /// or Implementation Guide by a canonical URL. When an implementation guide is + /// specified, the target resource SHALL conform to at least one profile defined + /// in the implementation guide. /// - /// A short, descriptive, user-friendly title for the evidence variable. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "targetProfile")] + pub target_profile: Option>, + /// contained | referenced | bundled - how aggregated + /// + /// If the type is a reference to another resource, how the resource is or can be + /// aggregated - is it a contained resource, or a reference, and if the context + /// is a bundle, is it included in the bundle. /// /// ## Implementation Notes - /// This name does not need to be machine-processing friendly and may contain - /// punctuation, white-space, etc. + /// See [Aggregation Rules](elementdefinition.html#aggregation) for further + /// clarification. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -54928,15 +55169,24 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: Option, - /// Title for use in informal contexts /// - /// The short title provides an alternate title for use in informal descriptive - /// contexts where the full, formal title is not necessary. + /// ## Binding + /// - **Strength**: required + /// - **Description**: How resource references can be aggregated. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-aggregation-mode|4.0.1 /// - /// ## Requirements - /// Need to be able to reference the content by a short description, but still - /// provide a longer, more formal title for the content. + /// ## Conditions + /// Used when: eld-4 + pub aggregation: Option>, + /// either | independent | specific + /// + /// Whether this reference needs to be version specific or version independent, + /// or whether either can be used. + /// + /// ## Implementation Notes + /// The base specification never makes a rule as to which form is allowed, but + /// implementation guides may do this. See [Aggregation + /// Rules](elementdefinition.html#aggregation) for further clarification. /// /// ## Cardinality: Optional (0..1) /// @@ -54946,102 +55196,231 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "shortTitle")] - pub short_title: Option, - /// Subordinate title of the EvidenceVariable /// - /// An explanatory or alternate title for the EvidenceVariable giving additional - /// information about its content. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Whether a reference needs to be version specific or version independent, or whether either can be used. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/reference-version-rules|4.0.1 + pub versioning: Option, +} + +/// FHIR Encounter type +/// +/// An interaction between a patient and healthcare provider(s) for the purpose +/// of providing healthcare service(s) or assessing the health status of a +/// patient. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Encounter](http://hl7.org/fhir/StructureDefinition/Encounter) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Encounter { + /// Logical id of this artifact + /// + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subtitle: Option, - /// draft | active | retired | unknown + pub meta: Option, + /// A set of rules under which this content was created /// - /// The status of this evidence variable. Enables tracking the life-cycle of the - /// content. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// Allows filtering of evidence variables that are appropriate for use versus - /// not. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content + /// + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// Date last changed + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// The date (and optionally time) when the evidence variable was published. The - /// date must change when the business version changes and it must change if the - /// status code changes. In addition, it should change when the substantive - /// content of the evidence variable changes. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the evidence variable. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored /// - /// The name of the organization or individual that published the evidence - /// variable. + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Helps establish the "authority/credibility" of the evidence variable. May - /// also allow for contact. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the evidence variable is the organization or individual primarily - /// responsible for the maintenance and upkeep of the evidence variable. This is - /// not necessarily the same individual or organization that developed and - /// initially authored the content. The publisher is the primary point of contact - /// for questions or issues with the evidence variable. This item SHOULD be - /// populated unless the information is available from context. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Identifier(s) by which this encounter is known /// - /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. + /// Identifier(s) by which this encounter is known. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -55051,55 +55430,92 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the evidence variable + pub identifier: Option>, + /// planned | arrived | triaged | in-progress | onleave | finished | cancelled + /// - /// A free text natural language description of the evidence variable from a - /// consumer's perspective. + /// planned | arrived | triaged | in-progress | onleave | finished | cancelled +. /// /// ## Implementation Notes - /// This description can be used to capture details such as why the evidence - /// variable was built, comments about misuse, instructions for clinical use and - /// interpretation, literature references, examples from the paper world, etc. It - /// is not a rendering of the evidence variable as conveyed in the 'text' field - /// of the resource itself. This item SHOULD be populated unless the information - /// is available from context (e.g. the language of the evidence variable is - /// presumed to be the predominant language in the place the evidence variable - /// was created). + /// Note that internal business rules will determine the appropriate transitions + /// that may occur between statuses (and also classes). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Used for footnotes or explanatory notes /// - /// A human-readable string to clarify or explain concepts about the resource. + /// ## Binding + /// - **Strength**: required + /// - **Description**: Current state of the encounter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1 + pub status: Code, + /// List of past encounter statuses + /// + /// The status history permits the encounter resource to contain the status + /// history without needing to read through the historical versions of the + /// resource, or even have the server store them. + /// + /// ## Implementation Notes + /// The current status is always found in the current version of the resource, + /// not the status history. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// The context that the content is intended to support + #[fhir_serde(rename = "statusHistory")] + pub status_history: Option>, + /// Classification of patient encounter /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate evidence - /// variable instances. + /// Concepts representing classification of patient encounter such as ambulatory + /// (outpatient), inpatient, emergency, home health or others due to local + /// variations. /// - /// ## Requirements - /// Assist in searching for appropriate content. + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Classification of the encounter. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode + pub class: Coding, + /// List of past encounter classes + /// + /// The class history permits the tracking of the encounters transitions without + /// needing to go through the resource history. This would be used for a case + /// where an admission starts of as an emergency encounter, then transitions into + /// an inpatient scenario. Doing this and not restarting a new encounter ensures + /// that any lab/diagnostic results can more easily follow the patient and not + /// require re-processing and not get lost or cancelled during a kind of + /// discharge from emergency to inpatient. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "classHistory")] + pub class_history: Option>, + /// Specific type of encounter + /// + /// Specific type of encounter (e.g. e-mail consultation, surgical day-care, + /// skilled nursing, rehabilitation). /// /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. + /// Since there are many ways to further classify encounters, this element is + /// 0..*. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -55109,18 +55525,18 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for evidence variable (if applicable) /// - /// A legal or geographic region in which the evidence variable is intended to be - /// used. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The type of encounter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-type + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Specific type of service /// - /// ## Implementation Notes - /// It may be possible for the evidence variable to be used in jurisdictions - /// other than those for which it was originally designed or intended. + /// Broad categorization of the service that is to be provided (e.g. cardiology). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -55130,19 +55546,14 @@ pub struct EvidenceVariable { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Use and/or publishing restrictions - /// - /// A copyright statement relating to the evidence variable and/or its contents. - /// Copyright statements are generally legal restrictions on the use and - /// publishing of the evidence variable. + /// - **Strength**: example + /// - **Description**: Broad categorization of the service that is to be provided. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-type + #[fhir_serde(rename = "serviceType")] + pub service_type: Option, + /// Indicates the urgency of the encounter /// - /// ## Requirements - /// Consumers must be able to determine any legal restrictions on the use of the - /// evidence variable and/or its content. + /// Indicates the urgency of the encounter. /// /// ## Cardinality: Optional (0..1) /// @@ -55150,61 +55561,77 @@ pub struct EvidenceVariable { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// License, Restrictions - pub copyright: Option, - /// When the evidence variable was approved by publisher + /// ## Binding + /// - **Strength**: example + /// - **Description**: Indicates the urgency of the encounter. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActPriority + pub priority: Option, + /// The patient or group present at the encounter /// - /// The date on which the resource content was approved by the publisher. - /// Approval happens once when the content is officially approved for usage. + /// The patient or group present at the encounter. /// /// ## Implementation Notes - /// The 'date' element may be more recent than the approval date because of minor - /// changes or editorial corrections. + /// While the encounter is always about the patient, the patient might not + /// actually be known in all contexts of use, and there may be a group of + /// patients that could be anonymous (such as in a group therapy for Alcoholics + /// Anonymous - where the recording of the encounter could be used for billing on + /// the number of people/staff and not important to the context of the specific + /// patients) or alternately in veterinary care a herd of sheep receiving + /// treatment (where the animals are not individually tracked). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "approvalDate")] - pub approval_date: Option, - /// When the evidence variable was last reviewed /// - /// The date on which the resource content was last reviewed. Review happens - /// periodically after approval but does not change the original approval date. + /// ## Aliases + /// patient + pub subject: Option, + /// Episode(s) of care that this encounter should be recorded against /// - /// ## Requirements - /// Gives a sense of how "current" the content is. Resources that have not been - /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// Where a specific encounter should be classified as a part of a specific + /// episode(s) of care this field should be used. This association can facilitate + /// grouping of related encounters together for a specific purpose, such as + /// government reporting, issue tracking, association via a common problem. The + /// association is recorded on the encounter as these are typically created after + /// the episode of care and grouped on entry rather than editing the episode of + /// care to append another encounter to it (the episode of care could span + /// years). /// - /// ## Implementation Notes - /// If specified, this date follows the original approval date. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "lastReviewDate")] - pub last_review_date: Option, - /// When the evidence variable is expected to be used + #[fhir_serde(rename = "episodeOfCare")] + pub episode_of_care: Option>, + /// The ServiceRequest that initiated this encounter /// - /// The period during which the evidence variable content was or is planned to be - /// in active use. + /// The request this encounter satisfies (e.g. incoming referral or procedure + /// request). /// - /// ## Requirements - /// Allows establishing a transition before a resource comes into effect and also - /// allows for a sunsetting process when new versions of the evidence variable - /// are or are expected to be used instead. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// The effective period for a evidence variable determines when the content is - /// applicable for usage and is independent of publication and review dates. For - /// example, a measure intended to be used for the year 2016 might be published - /// in 2015. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Cardinality: Optional (0..1) + /// ## Aliases + /// incomingReferral + #[fhir_serde(rename = "basedOn")] + pub based_on: Option>, + /// List of participants involved in the encounter + /// + /// The list of people responsible for providing the service. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -55212,138 +55639,203 @@ pub struct EvidenceVariable { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "effectivePeriod")] - pub effective_period: Option, - /// The category of the EvidenceVariable, such as Education, Treatment, Assessment, etc. - /// - /// Descriptive topics related to the content of the EvidenceVariable. Topics - /// provide a high-level categorization grouping types of EvidenceVariables that - /// can be useful for filtering and searching. + pub participant: Option>, + /// The appointment that scheduled this encounter /// - /// ## Requirements - /// Repositories must be able to determine how to categorize the EvidenceVariable - /// so that it can be found by topical searches. + /// The appointment that scheduled this encounter. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub appointment: Option>, + /// The start and end time of the encounter /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic - pub topic: Option>, - /// Who authored the content + /// The start and end time of the encounter. /// - /// An individiual or organization primarily involved in the creation and - /// maintenance of the content. + /// ## Implementation Notes + /// If not (yet) known, the end of the Period may be omitted. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option>, - /// Who edited the content + pub period: Option, + /// Quantity of time the encounter lasted (less time absent) /// - /// An individual or organization primarily responsible for internal coherence of - /// the content. + /// Quantity of time the encounter lasted. This excludes the time during leaves + /// of absence. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// May differ from the time the Encounter.period lasted because of leave of + /// absence. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub editor: Option>, - /// Who reviewed the content + pub length: Option, + /// Coded reason the encounter takes place /// - /// An individual or organization primarily responsible for review of some aspect - /// of the content. + /// Reason the encounter takes place, expressed as a code. For admissions, this + /// can be used for a coded admission diagnosis. + /// + /// ## Implementation Notes + /// For systems that need to know which was the primary diagnosis, these will be + /// marked with the standard extension primaryDiagnosis (which is a sequence + /// value rather than a flag, 1 = primary diagnosis). /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reviewer: Option>, - /// Who endorsed the content /// - /// An individual or organization responsible for officially endorsing the - /// content for use in some setting. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: Reason why the encounter takes place. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-reason + /// + /// ## Aliases + /// Indication, Admission diagnosis + #[fhir_serde(rename = "reasonCode")] + pub reason_code: Option>, + /// Reason the encounter takes place (reference) + /// + /// Reason the encounter takes place, expressed as a code. For admissions, this + /// can be used for a coded admission diagnosis. + /// + /// ## Implementation Notes + /// For systems that need to know which was the primary diagnosis, these will be + /// marked with the standard extension primaryDiagnosis (which is a sequence + /// value rather than a flag, 1 = primary diagnosis). /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub endorser: Option>, - /// Additional documentation, citations, etc. /// - /// Related artifacts such as additional documentation, justification, or - /// bibliographic references. + /// ## Aliases + /// Indication, Admission diagnosis + #[fhir_serde(rename = "reasonReference")] + pub reason_reference: Option>, + /// The list of diagnosis relevant to this encounter /// - /// ## Requirements - /// EvidenceVariables must be able to provide enough information for consumers of - /// the content (and/or interventions or results produced by the content) to be - /// able to determine and understand the justification for and evidence in - /// support of the content. + /// The list of diagnosis relevant to this encounter. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub diagnosis: Option>, + /// The set of accounts that may be used for billing for this Encounter + /// + /// The set of accounts that may be used for billing for this Encounter. /// /// ## Implementation Notes - /// Each related artifact is either an attachment, or a reference to another - /// resource, but not both. + /// The billing system may choose to allocate billable items associated with the + /// Encounter to different referenced Accounts based on internal business rules. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "relatedArtifact")] - pub related_artifact: Option>, - /// dichotomous | continuous | descriptive + pub account: Option>, + /// Details about the admission to a healthcare service /// - /// The type of evidence element, a population, an exposure, or an outcome. + /// Details about the admission to a healthcare service. + /// + /// ## Implementation Notes + /// An Encounter may cover more than just the inpatient stay. Contexts such as + /// outpatients, community clinics, and aged care facilities are also included. + /// + /// The duration recorded in the period of this encounter covers the entire scope + /// of this hospitalization record. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub hospitalization: Option, + /// List of locations where the patient has been + /// + /// List of locations where the patient has been during this encounter. + /// + /// ## Implementation Notes + /// Virtual encounters can be recorded in the Encounter by specifying a location + /// reference to a location of type "kind" such as "client's home" and an + /// encounter.class = "virtual". + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub location: Option>, + /// The organization (facility) responsible for this encounter /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/variable-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// What defines the members of the evidence element + /// The organization that is primarily responsible for this Encounter's services. + /// This MAY be the same as the organization on the Patient record, however it + /// could be different, such as if the actor performing the services was from an + /// external organization (which may be billed seperately) for an external + /// consultation. Refer to the example bundle showing an abbreviated set of + /// Encounters for a colonoscopy. /// - /// A characteristic that defines the members of the evidence element. Multiple - /// characteristics are applied with "and" semantics. + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "serviceProvider")] + pub service_provider: Option, + /// Another Encounter this encounter is part of + /// + /// Another Encounter of which this encounter is a part of (administratively or + /// in time). /// /// ## Implementation Notes - /// Characteristics can be defined flexibly to accommodate different use cases - /// for membership criteria, ranging from simple codes, all the way to using an - /// expression language to express the criteria. + /// This is also used for associating a child's encounter back to the mother's + /// encounter. /// - /// ## Cardinality: Required, Multiple (1..*) + /// Refer to the Notes section in the Patient resource for further details. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub characteristic: Option>, + #[fhir_serde(rename = "partOf")] + pub part_of: Option, } -/// Each resource and each version that is present in the workflow +/// List of past encounter classes /// -/// Each resource and each version that is present in the workflow. +/// The class history permits the tracking of the encounters transitions without +/// needing to go through the resource history. This would be used for a case +/// where an admission starts of as an emergency encounter, then transitions into +/// an inpatient scenario. Doing this and not restarting a new encounter ensures +/// that any lab/diagnostic results can more easily follow the patient and not +/// require re-processing and not get lost or cancelled during a kind of +/// discharge from emergency to inpatient. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -55351,7 +55843,7 @@ pub struct EvidenceVariable { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioInstance { +pub struct EncounterClassHistory { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -55432,20 +55924,9 @@ pub struct ExampleScenarioInstance { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The id of the resource for referencing - /// - /// The id of the resource for referencing. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "resourceId")] - pub resource_id: String, - /// The type of the resource + /// inpatient | outpatient | ambulatory | emergency + /// - /// The type of the resource. + /// inpatient | outpatient | ambulatory | emergency +. /// /// ## Cardinality: Required (1..1) /// @@ -55454,66 +55935,36 @@ pub struct ExampleScenarioInstance { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The type of resource. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-types|4.0.1 - #[fhir_serde(rename = "resourceType")] - pub resource_type: Code, - /// A short name for the resource instance - /// - /// A short name for the resource instance. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Human-friendly description of the resource instance - /// - /// Human-friendly description of the resource instance. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// A specific version of the resource - /// - /// A specific version of the resource. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option>, - /// Resources contained in the instance + /// - **Strength**: extensible + /// - **Description**: Classification of the encounter. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode + pub class: Coding, + /// The time that the episode was in the specified class /// - /// Resources contained in the instance (e.g. the observations contained in a - /// bundle). + /// The time that the episode was in the specified class. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "containedInstance")] - pub contained_instance: Option>, + pub period: Period, } -/// Actor participating in the resource +/// The list of diagnosis relevant to this encounter /// -/// Actor participating in the resource. +/// The list of diagnosis relevant to this encounter. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioActor { +pub struct EncounterDiagnosis { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -55594,67 +56045,69 @@ pub struct ExampleScenarioActor { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// ID or acronym of the actor + /// The diagnosis or procedure relevant to the encounter /// - /// ID or acronym of actor. + /// Reason the encounter takes place, as specified using information from another + /// resource. For admissions, this is the admission diagnosis. The indication + /// will typically be a Condition (with other resources referenced in the + /// evidence.detail), or a Procedure. /// /// ## Implementation Notes - /// should this be called ID or acronym? + /// For systems that need to know which was the primary diagnosis, these will be + /// marked with the standard extension primaryDiagnosis (which is a sequence + /// value rather than a flag, 1 = primary diagnosis). /// /// ## Cardinality: Required (1..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "actorId")] - pub actor_id: String, - /// person | entity - /// - /// The type of actor - person or system. - /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The type of actor - system or human. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/examplescenario-actor-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// The name of the actor as shown in the page - /// - /// The name of the actor as shown in the page. + /// ## Aliases + /// Admission diagnosis, discharge diagnosis, indication + pub condition: Reference, + /// Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …) /// - /// ## Implementation Notes - /// Cardinality: is name and description 1..1? + /// Role that this diagnosis has within the encounter (e.g. admission, billing, + /// discharge …). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// The description of the actor /// - /// The description of the actor. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: The type of diagnosis this condition represents. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnosis-role + #[fhir_serde(rename = "use")] + pub r#use: Option, + /// Ranking of the diagnosis (for each role type) /// - /// ## Implementation Notes - /// Cardinality: is name and description 1..1? + /// Ranking of the diagnosis (for each role type). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, + pub rank: Option, } -/// Each interaction or action +/// Details about the admission to a healthcare service /// -/// Each interaction or action. +/// Details about the admission to a healthcare service. +/// +/// ## Implementation Notes +/// An Encounter may cover more than just the inpatient stay. Contexts such as +/// outpatients, community clinics, and aged care facilities are also included. +/// +/// The duration recorded in the period of this encounter covers the entire scope +/// of this hospitalization record. /// /// ## Cardinality: Optional (0..1) /// @@ -55662,7 +56115,7 @@ pub struct ExampleScenarioActor { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioProcessStepOperation { +pub struct EncounterHospitalization { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -55743,240 +56196,153 @@ pub struct ExampleScenarioProcessStepOperation { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The sequential number of the interaction - /// - /// The sequential number of the interaction, e.g. 1.2.5. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub number: String, - /// The type of operation - CRUD + /// Pre-admission identifier /// - /// The type of operation - CRUD. + /// Pre-admission identifier. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// The human-friendly name of the interaction + #[fhir_serde(rename = "preAdmissionIdentifier")] + pub pre_admission_identifier: Option, + /// The location/organization from which the patient came before admission /// - /// The human-friendly name of the interaction. + /// The location/organization from which the patient came before admission. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Who starts the transaction + pub origin: Option, + /// From where patient was admitted (physician referral, transfer) /// - /// Who starts the transaction. + /// From where patient was admitted (physician referral, transfer). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub initiator: Option, - /// Who receives the transaction /// - /// Who receives the transaction. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: From where the patient was admitted. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-admit-source + #[fhir_serde(rename = "admitSource")] + pub admit_source: Option, + /// The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission + /// + /// Whether this hospitalization is a readmission and why if known. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub receiver: Option, - /// A comment to be inserted in the diagram - /// - /// A comment to be inserted in the diagram. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Whether the initiator is deactivated right after the transaction - /// - /// Whether the initiator is deactivated right after the transaction. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "initiatorActive")] - pub initiator_active: Option, - /// Whether the receiver is deactivated right after the transaction - /// - /// Whether the receiver is deactivated right after the transaction. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "receiverActive")] - pub receiver_active: Option, - /// Each resource instance used by the initiator /// - /// Each resource instance used by the initiator. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The reason for re-admission of this hospitalization encounter. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v2-0092 + #[fhir_serde(rename = "reAdmission")] + pub re_admission: Option, + /// Diet preferences reported by the patient /// - /// ## Cardinality: Optional (0..1) + /// Diet preferences reported by the patient. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub request: Option, - /// Each resource instance used by the responder + /// ## Requirements + /// Used to track patient's diet restrictions and/or preference. For a complete + /// description of the nutrition needs of a patient during their stay, one should + /// use the nutritionOrder resource which links to Encounter. /// - /// Each resource instance used by the responder. + /// ## Implementation Notes + /// For example, a patient may request both a dairy-free and nut-free diet + /// preference (not mutually exclusive). /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub response: Option, -} - -/// Alternate non-typical step action -/// -/// Indicates an alternative step that can be taken instead of the operations on -/// the base step in exceptional/atypical circumstances. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioProcessStepAlternative { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Medical, cultural or ethical food preferences to help with catering requirements. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-diet + #[fhir_serde(rename = "dietPreference")] + pub diet_preference: Option>, + /// Special courtesies (VIP, board member) /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Special courtesies (VIP, board member). /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: Special courtesies. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-special-courtesy + #[fhir_serde(rename = "specialCourtesy")] + pub special_courtesy: Option>, + /// Wheelchair, translator, stretcher, etc. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Any special requests that have been made for this hospitalization encounter, + /// such as the provision of specific equipment or other things. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Label for alternative + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: Special arrangements. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-special-arrangements + #[fhir_serde(rename = "specialArrangement")] + pub special_arrangement: Option>, + /// Location/organization to which the patient is discharged /// - /// The label to display for the alternative that gives a sense of the - /// circumstance in which the alternative should be invoked. + /// Location/organization to which the patient is discharged. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: String, - /// A human-readable description of each option + pub destination: Option, + /// Category or kind of location after discharge /// - /// A human-readable description of the alternative explaining when the - /// alternative should occur rather than the base step. + /// Category or kind of location after discharge. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// What happens in each alternative option /// - /// What happens in each alternative option. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub step: Option>, + /// ## Binding + /// - **Strength**: example + /// - **Description**: Discharge Disposition. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition + #[fhir_serde(rename = "dischargeDisposition")] + pub discharge_disposition: Option, } -/// Each major process - a group of operations +/// List of locations where the patient has been /// -/// Each major process - a group of operations. +/// List of locations where the patient has been during this encounter. +/// +/// ## Implementation Notes +/// Virtual encounters can be recorded in the Encounter by specifying a location +/// reference to a location of type "kind" such as "client's home" and an +/// encounter.class = "virtual". /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -55984,7 +56350,7 @@ pub struct ExampleScenarioProcessStepAlternative { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioProcess { +pub struct EncounterLocation { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -56065,74 +56431,88 @@ pub struct ExampleScenarioProcess { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The diagram title of the group of operations + /// Location the encounter takes place /// - /// The diagram title of the group of operations. + /// The location where the encounter takes place. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub title: String, - /// A longer description of the group of operations + pub location: Reference, + /// planned | active | reserved | completed /// - /// A longer description of the group of operations. + /// The status of the participants' presence at the specified location during the + /// period specified. If the participant is no longer at the location, then the + /// period will have an end date/time. + /// + /// ## Implementation Notes + /// When the patient is no longer active at a location, then the period end date + /// is entered, and the status may be changed to completed. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Description of initial status before the process starts /// - /// Description of initial status before the process starts. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The status of the location. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1 + pub status: Option, + /// The physical type of the location (usually the level in the location hierachy - bed room ward etc.) /// - /// ## Cardinality: Optional (0..1) + /// This will be used to specify the required levels (bed/ward/room/etc.) desired + /// to be recorded to simplify either messaging or query. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preConditions")] - pub pre_conditions: Option, - /// Description of final status after the process ends + /// ## Implementation Notes + /// This information is de-normalized from the Location resource to support the + /// easier understanding of the encounter resource and processing in messaging or + /// query. /// - /// Description of final status after the process ends. + /// There may be many levels in the hierachy, and this may only pic specific + /// levels that are required for a specific usage scenario. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "postConditions")] - pub post_conditions: Option, - /// Each step of the process /// - /// Each step of the process. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Physical form of the location. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/location-physical-type + #[fhir_serde(rename = "physicalType")] + pub physical_type: Option, + /// Time period during which the patient was present at the location /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Time period during which the patient was present at the location. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub step: Option>, + pub period: Option, } -/// A specific version of the resource +/// List of participants involved in the encounter /// -/// A specific version of the resource. +/// The list of people responsible for providing the service. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioInstanceVersion { +pub struct EncounterParticipant { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -56213,148 +56593,69 @@ pub struct ExampleScenarioInstanceVersion { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The identifier of a specific version of a resource - /// - /// The identifier of a specific version of a resource. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "versionId")] - pub version_id: String, - /// The description of the resource version - /// - /// The description of the resource version. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Markdown, -} - -/// Resources contained in the instance -/// -/// Resources contained in the instance (e.g. the observations contained in a -/// bundle). -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioInstanceContainedInstance { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. - /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// Role of participant in encounter /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Role of participant in encounter. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// The participant type indicates how an individual participates in an + /// encounter. It includes non-practitioner participants, and for practitioners + /// this is to describe the action type in the context of this encounter (e.g. + /// Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to + /// the practitioner roles which are functional roles, derived from terms of + /// employment, education, licensing, etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Each resource contained in the instance + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Role of participant in encounter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-participant-type + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Period of time during the encounter that the participant participated /// - /// Each resource contained in the instance. + /// The period of time that the specified participant participated in the + /// encounter. These can overlap or be sub-sets of the overall encounter's + /// period. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "resourceId")] - pub resource_id: String, - /// A specific version of a resource contained in the instance + pub period: Option, + /// Persons involved in the encounter other than the patient /// - /// A specific version of a resource contained in the instance. + /// Persons involved in the encounter other than the patient. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "versionId")] - pub version_id: Option, + pub individual: Option, } -/// Each step of the process +/// List of past encounter statuses /// -/// Each step of the process. +/// The status history permits the encounter resource to contain the status +/// history without needing to read through the historical versions of the +/// resource, or even have the server store them. +/// +/// ## Implementation Notes +/// The current status is always found in the current version of the resource, +/// not the status history. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -56362,7 +56663,7 @@ pub struct ExampleScenarioInstanceContainedInstance { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenarioProcessStep { +pub struct EncounterStatusHistory { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -56443,52 +56744,38 @@ pub struct ExampleScenarioProcessStep { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Nested process - /// - /// Nested process. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub process: Option>, - /// If there is a pause in the flow + /// planned | arrived | triaged | in-progress | onleave | finished | cancelled + /// - /// If there is a pause in the flow. + /// planned | arrived | triaged | in-progress | onleave | finished | cancelled +. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub pause: Option, - /// Each interaction or action - /// - /// Each interaction or action. /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub operation: Option, - /// Alternate non-typical step action + /// ## Binding + /// - **Strength**: required + /// - **Description**: Current state of the encounter. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1 + pub status: Code, + /// The time that the episode was in the specified status /// - /// Indicates an alternative step that can be taken instead of the operations on - /// the base step in exceptional/atypical circumstances. + /// The time that the episode was in the specified status. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub alternative: Option>, + pub period: Period, } -/// FHIR ExampleScenario type +/// FHIR Endpoint type /// -/// Example of workflow instance. +/// The technical details of an endpoint that can be used for electronic +/// services, such as for web services providing XDS.b or a REST endpoint for +/// another FHIR server. This may include any security context information. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -56496,9 +56783,9 @@ pub struct ExampleScenarioProcessStep { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [ExampleScenario](http://hl7.org/fhir/StructureDefinition/ExampleScenario) +/// See: [Endpoint](http://hl7.org/fhir/StructureDefinition/Endpoint) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExampleScenario { +pub struct Endpoint { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -56698,35 +56985,12 @@ pub struct ExampleScenario { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Canonical identifier for this example scenario, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this example scenario when it is - /// referenced in a specification, model, design or an instance; also called its - /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal - /// address at which at which an authoritative instance of this example scenario - /// is (or will be) published. This URL can be the target of a canonical - /// reference. It SHALL remain the same when the example scenario is stored on - /// different servers. - /// - /// ## Requirements - /// Allows the example scenario to be referenced by a single globally unique - /// identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). + /// Identifies this endpoint across multiple systems /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. + /// Identifier for the organization that is used to identify the endpoint across + /// multiple disparate systems. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -56734,47 +56998,41 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Additional identifier for the example scenario - /// - /// A formal identifier that is used to identify this example scenario when it is - /// represented in other formats, or referenced in a specification, model, design - /// or an instance. + pub identifier: Option>, + /// active | suspended | error | off | entered-in-error | test /// - /// ## Requirements - /// Allows externally provided and/or usable business identifiers to be easily - /// associated with the module. + /// active | suspended | error | off | test. /// /// ## Implementation Notes - /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance - /// identifier) data type, and can then identify this example scenario outside of - /// FHIR, where it is not possible to use the logical URI. + /// This element is labeled as a modifier because the status contains codes that + /// mark the endpoint as not currently valid. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Business version of the example scenario /// - /// The identifier that is used to identify this version of the example scenario - /// when it is referenced in a specification, model, design or instance. This is - /// an arbitrary value managed by the example scenario author and is not expected - /// to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) - /// if a managed version is not available. There is also no expectation that - /// versions can be placed in a lexicographical sequence. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The status of the endpoint. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-status|4.0.1 + pub status: Code, + /// Protocol/Profile/Standard to be used with this endpoint connection + /// + /// A coded value that represents the technical details of the usage of this + /// endpoint, such as what WSDLs should be used in what way. (e.g. + /// XDS.b/DICOM/cds-hook). /// /// ## Implementation Notes - /// There may be different example scenario instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// example scenario with the format [url]|[version]. + /// For additional connectivity details for the protocol, extensions will be used + /// at this point, as in the XDS example. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -56782,19 +57040,15 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this example scenario (computer friendly) - /// - /// A natural language name identifying the example scenario. This name should be - /// usable as an identifier for the module by machine processing applications - /// such as code generation. /// - /// ## Requirements - /// Support human navigation and code generation. + /// ## Binding + /// - **Strength**: extensible + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-connection-type + #[fhir_serde(rename = "connectionType")] + pub connection_type: Coding, + /// A name that this endpoint can be identified by /// - /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. + /// A friendly name that this endpoint can be referred to with. /// /// ## Cardinality: Optional (0..1) /// @@ -56804,47 +57058,45 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: inv-0 pub name: Option, - /// draft | active | retired | unknown + /// Organization that manages this endpoint (might not be the organization that exposes the endpoint) /// - /// The status of this example scenario. Enables tracking the life-cycle of the - /// content. + /// The organization that manages this endpoint (even if technically another + /// organization is hosting this in the cloud, it is the organization associated + /// with the data). /// /// ## Implementation Notes - /// Allows filtering of example scenarios that are appropriate for use versus - /// not. + /// This property is not typically used when searching for Endpoint resources for + /// usage. The typical usage is via the reference from an applicable + /// Organization/Location/Practitioner resource, which is where the context is + /// provided. Multiple Locations may reference a single endpoint, and don't have + /// to be within the same organization resource, but most likely within the same + /// organizational hierarchy. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "managingOrganization")] + pub managing_organization: Option, + /// Contact details for source (e.g. troubleshooting) /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// For testing purposes, not real usage + /// Contact details for a human to contact about the subscription. The primary + /// use of this for system administrator troubleshooting. /// - /// A Boolean value to indicate that this example scenario is authored for - /// testing purposes (or education/evaluation/marketing) and is not intended to - /// be used for genuine usage. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Requirements - /// Enables experimental content to be developed following the same lifecycle - /// that would be used for a production-level example scenario. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub contact: Option>, + /// Interval the endpoint is expected to be operational /// - /// ## Implementation Notes - /// Allows filtering of example scenarios that are appropriate for use versus - /// not. + /// The interval during which the endpoint is expected to be operational. /// /// ## Cardinality: Optional (0..1) /// @@ -56854,22 +57106,18 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub experimental: Option, - /// Date last changed + pub period: Option, + /// The type of content that may be used at this endpoint (e.g. XDS Discharge summaries) /// - /// The date (and optionally time) when the example scenario was published. The - /// date must change when the business version changes and it must change if the - /// status code changes. In addition, it should change when the substantive - /// content of the example scenario changes. (e.g. the 'content logical - /// definition'). + /// The payload type describes the acceptable content that can be communicated on + /// the endpoint. /// /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the example scenario. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. + /// The payloadFormat describes the serialization format of the data, where the + /// payloadType indicates the specific document/schema that is being transferred; + /// e.g. DischargeSummary or CarePlan. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required, Multiple (1..*) /// /// ## Special Semantics /// - Included in summary @@ -56878,28 +57126,23 @@ pub struct ExampleScenario { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the example - /// scenario. + /// ## Binding + /// - **Strength**: example + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/endpoint-payload-type + #[fhir_serde(rename = "payloadType")] + pub payload_type: Option>, + /// Mimetype to send. If not specified, the content could be anything (including no payload, if the connectionType defined this) /// - /// ## Requirements - /// Helps establish the "authority/credibility" of the example scenario. May also - /// allow for contact. + /// The mime type to send the payload in - e.g. application/fhir+xml, + /// application/fhir+json. If the mime type is not specified, then the sender + /// could send any content (including no content depending on the + /// connectionType). /// /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the example scenario is the organization or individual primarily - /// responsible for the maintenance and upkeep of the example scenario. This is - /// not necessarily the same individual or organization that developed and - /// initially authored the content. The publisher is the primary point of contact - /// for questions or issues with the example scenario. This item SHOULD be - /// populated unless the information is available from context. + /// Sending the payload has obvious security consequences. The server is + /// responsible for ensuring that the content is appropriately secured. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics /// - Included in summary @@ -56907,16 +57150,35 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The mime type of an attachment. Any valid mime type is allowed. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1 + #[fhir_serde(rename = "payloadMimeType")] + pub payload_mime_type: Option>, + /// The technical base address for connecting to this endpoint + /// + /// The uri that describes the actual end-point to connect to. /// /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. + /// For rest-hook, and websocket, the end-point must be an http: or https: URL; + /// for email, a mailto: url, for sms, a tel: url, and for message the endpoint + /// can be in any form of url the server understands (usually, http: or mllp:). + /// The URI is allowed to be relative; in which case, it is relative to the + /// server end-point (since there may be more than one, clients should avoid + /// using relative URIs) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// This address will be to the service base, without any parameters, or + /// sub-services or resources tacked on. + /// + /// E.g. for a WADO-RS endpoint, the url should be + /// "https://pacs.hospital.org/wado-rs" + /// + /// and not + /// "https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345678.678910/series/1.2.250.1.59.40211.789001276.14556172.67789/instances/...". + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -56924,42 +57186,58 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// The context that the content is intended to support - /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate example - /// scenario instances. + pub address: Url, + /// Usage depends on the channel type /// - /// ## Requirements - /// Assist in searching for appropriate content. + /// Additional headers / information to send as part of the notification. /// /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. + /// Exactly what these mean depends on the channel type. The can convey + /// additional information to the recipient and/or meet security requirements. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for example scenario (if applicable) + pub header: Option>, +} + +/// FHIR EnrollmentRequest type +/// +/// This resource provides the insurance enrollment details to the insurer +/// regarding a specified coverage. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [EnrollmentRequest](http://hl7.org/fhir/StructureDefinition/EnrollmentRequest) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct EnrollmentRequest { + /// Logical id of this artifact /// - /// A legal or geographic region in which the example scenario is intended to be - /// used. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// /// ## Implementation Notes - /// It may be possible for the example scenario to be used in jurisdictions other - /// than those for which it was originally designed or intended. + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource + /// + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -56967,121 +57245,112 @@ pub struct ExampleScenario { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Use and/or publishing restrictions - /// - /// A copyright statement relating to the example scenario and/or its contents. - /// Copyright statements are generally legal restrictions on the use and - /// publishing of the example scenario. - /// - /// ## Requirements - /// Consumers must be able to determine any legal restrictions on the use of the - /// example scenario and/or its content. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// nullFrequently, the copyright differs between the value set and the codes - /// that are included. The copyright statement should clearly differentiate - /// between these when required. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// ## Aliases - /// License, Restrictions - pub copyright: Option, - /// The purpose of the example, e.g. to illustrate a scenario - /// - /// What the example scenario resource is created for. This should not be used to - /// show the business purpose of the scenario itself, but the purpose of - /// documenting a scenario. + /// The base language in which the resource is written. /// /// ## Implementation Notes - /// This element does not describe the usage of the example scenario. Instead, it - /// provides traceability of ''why'' the resource is either needed or ''why'' it - /// is defined as it is. This may be used to point to source materials or - /// specifications that drove the structure of this example scenario. + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub purpose: Option, - /// Actor participating in the resource - /// - /// Actor participating in the resource. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub actor: Option>, - /// Each resource and each version that is present in the workflow + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// - /// Each resource and each version that is present in the workflow. + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub instance: Option>, - /// Each major process - a group of operations - /// - /// Each major process - a group of operations. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub process: Option>, - /// Another nested workflow + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// - /// Another nested workflow. + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub workflow: Option>, -} - -/// Insurer added line items -/// -/// The third-tier service adjudications for payor added services. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitAddItemDetailSubDetail { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -57101,16 +57370,16 @@ pub struct ExplanationOfBenefitAddItemDetailSubDetail { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -57135,8 +57404,7 @@ pub struct ExplanationOfBenefitAddItemDetailSubDetail { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -57145,166 +57413,102 @@ pub struct ExplanationOfBenefitAddItemDetailSubDetail { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. - /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// Business Identifier /// - /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// The Response business identifier. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// active | cancelled | draft | entered-in-error /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// The status of the resource instance. /// /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or out of - /// office hours. + /// This element is labeled as a modifier because the status contains codes that + /// mark the request as not currently valid. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Count of products or services - /// - /// The number of repetitions of a service or product. + /// - **Strength**: required + /// - **Description**: A code specifying the state of the resource instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 + pub status: Option, + /// Creation date /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// The date when this resource was created. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + pub created: Option, + /// Target /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// The Insurer who is target of the request. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor - /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. - /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + pub insurer: Option, + /// Responsible practitioner /// - /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// The practitioner who is responsible for the services rendered to the patient. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost + pub provider: Option, + /// The subject to be enrolled /// - /// The quantity times the unit price for an additional service or product or - /// charge. - /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. - /// - /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// Patient Resource. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Applicable note numbers + pub candidate: Option, + /// Insurance information /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + /// Reference to the program or plan identification, underwriter or payor. /// /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Added items adjudication - /// - /// The adjudication results. + /// Need to identify the issuer to target for processing and for coordination of + /// benefit processing. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, + pub coverage: Option, } -/// FHIR ExplanationOfBenefit type +/// FHIR EnrollmentResponse type /// -/// This resource provides: the claim details; adjudication details from the -/// processing of a Claim; and optionally account balance information, for -/// informing the subscriber of the benefits provided. +/// This resource provides enrollment and plan details from the processing of an +/// EnrollmentRequest resource. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -57312,9 +57516,9 @@ pub struct ExplanationOfBenefitAddItemDetailSubDetail { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [ExplanationOfBenefit](http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit) +/// See: [EnrollmentResponse](http://hl7.org/fhir/StructureDefinition/EnrollmentResponse) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefit { +pub struct EnrollmentResponse { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -57514,12 +57718,9 @@ pub struct ExplanationOfBenefit { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business Identifier for the resource - /// - /// A unique identifier assigned to this explanation of benefit. + /// Business Identifier /// - /// ## Requirements - /// Allows EOBs to be distinguished and referenced. + /// The Response business identifier. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -57531,19 +57732,14 @@ pub struct ExplanationOfBenefit { /// /// The status of the resource instance. /// - /// ## Requirements - /// Need to track the status of the resource as 'draft' resources may undergo - /// further edits while 'active' resources are immutable and may only have their - /// status changed to 'cancelled'. - /// /// ## Implementation Notes /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. + /// mark the response as not currently valid. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -57553,78 +57749,23 @@ pub struct ExplanationOfBenefit { /// ## Binding /// - **Strength**: required /// - **Description**: A code specifying the state of the resource instance. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/explanationofbenefit-status|4.0.1 - pub status: Code, - /// Category or discipline - /// - /// The category of claim, e.g. oral, pharmacy, vision, institutional, - /// professional. - /// - /// ## Requirements - /// Claim type determine the general sets of business rules applied for - /// information requirements and adjudication. - /// - /// ## Implementation Notes - /// The majority of jurisdictions use: oral, pharmacy, vision, professional and - /// institutional, or variants on those terms, as the general styles of claims. - /// The valueset is extensible to accommodate other jurisdictional requirements. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: The type or discipline-style of the claim. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-type - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// More granular claim type - /// - /// A finer grained suite of claim type codes which may convey additional - /// information such as Inpatient vs Outpatient and/or a specialty service. - /// - /// ## Requirements - /// Some jurisdictions need a finer grained claim type for routing and - /// adjudication. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fm-status|4.0.1 + pub status: Option, + /// Claim reference /// - /// ## Implementation Notes - /// This may contain the local bill type codes such as the US UB-04 bill type - /// code. + /// Original request resource reference. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub request: Option, + /// queued | complete | error | partial /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: A more granular claim typecode. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-subtype - #[fhir_serde(rename = "subType")] - pub sub_type: Option, - /// claim | preauthorization | predetermination - /// - /// A code to indicate whether the nature of the request is: to request - /// adjudication of products and services previously rendered; or requesting - /// authorization and adjudication for provision in the future; or requesting the - /// non-binding adjudication of the listed products and services which could be - /// provided in the future. - /// - /// ## Requirements - /// This element is required to understand the nature of the request for - /// adjudication. - /// - /// ## Cardinality: Required (1..1) + /// Processing status: error, complete. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -57632,117 +57773,88 @@ pub struct ExplanationOfBenefit { /// /// ## Binding /// - **Strength**: required - /// - **Description**: Complete, proposed, exploratory, other. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-use|4.0.1 - #[fhir_serde(rename = "use")] - pub r#use: Code, - /// The recipient of the products and services - /// - /// The party to whom the professional services and/or products have been - /// supplied or are being considered and for whom actual for forecast - /// reimbursement is sought. - /// - /// ## Requirements - /// The patient must be supplied to the insurer so that confirmation of coverage - /// and service history may be considered as part of the authorization and/or - /// adjudiction. + /// - **Description**: The outcome of the processing. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 + pub outcome: Option, + /// Disposition Message /// - /// ## Cardinality: Required (1..1) + /// A description of the status of the adjudication. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub patient: Reference, - /// Relevant time frame for the claim - /// - /// The period for which charges are being submitted. - /// - /// ## Requirements - /// A number jurisdictions required the submission of the billing period when - /// submitting claims for example for hospital stays or long-term care. + pub disposition: Option, + /// Creation date /// - /// ## Implementation Notes - /// Typically this would be today or in the past for a claim, and today or in the - /// future for preauthorizations and prodeterminations. Typically line item dates - /// of service should fall within the billing period if one is specified. + /// The date when the enclosed suite of services were performed or completed. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "billablePeriod")] - pub billable_period: Option, - /// Response creation date - /// - /// The date this resource was created. - /// - /// ## Requirements - /// Need to record a timestamp for use by both the recipient and the issuer. - /// - /// ## Implementation Notes - /// This field is independent of the date of creation of the resource as it may - /// reflect the creation date of a source document prior to digitization. - /// Typically for claims all services must be completed as of this date. + pub created: Option, + /// Insurer /// - /// ## Cardinality: Required (1..1) + /// The Insurer who produced this adjudicated response. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub created: DateTime, - /// Author of the claim - /// - /// Individual who created the claim, predetermination or preauthorization. + pub organization: Option, + /// Responsible practitioner /// - /// ## Requirements - /// Some jurisdictions require the contact information for personnel completing - /// claims. + /// The practitioner who is responsible for the services rendered to the patient. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub enterer: Option, - /// Party responsible for reimbursement + #[fhir_serde(rename = "requestProvider")] + pub request_provider: Option, +} + +/// FHIR EpisodeOfCare type +/// +/// An association between a patient and an organization / healthcare provider(s) +/// during which time encounters may occur. The managing organization assumes a +/// level of responsibility for the patient during this time. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [EpisodeOfCare](http://hl7.org/fhir/StructureDefinition/EpisodeOfCare) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct EpisodeOfCare { + /// Logical id of this artifact /// - /// The party responsible for authorization, adjudication and reimbursement. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// - /// ## Requirements - /// To be a valid claim, preauthorization or predetermination there must be a - /// party who is responsible for adjudicating the contents against a policy which - /// provides benefits for the patient. + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub insurer: Reference, - /// Party responsible for the claim - /// - /// The provider which is responsible for the claim, predetermination or - /// preauthorization. - /// - /// ## Implementation Notes - /// Typically this field would be 1..1 where this party is responsible for the - /// claim but not necessarily professionally responsible for the provision of the - /// individual products and services listed below. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -57750,44 +57862,49 @@ pub struct ExplanationOfBenefit { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Reference, - /// Desired processing urgency - /// - /// The provider-required urgency of processing the request. Typical values - /// include: stat, routine deferred. + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Requirements - /// The provider may need to indicate their processing requirements so that the - /// processor can indicate if they are unable to comply. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// If a claim processor is unable to complete the processing as per the priority - /// then they should generate and error and not process the request. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The timeliness with which processing is required: stat, normal, deferred. - /// - **ValueSet**: http://terminology.hl7.org/CodeSystem/processpriority - pub priority: Option, - /// For whom to reserve funds - /// - /// A code to indicate whether and for whom funds are to be reserved for future - /// claims. - /// - /// ## Requirements - /// In the case of a Pre-Determination/Pre-Authorization the provider may request - /// that funds in the amount of the expected Benefit be reserved ('Patient' or - /// 'Provider') to pay for the Benefits determined on the subsequent claim(s). - /// 'None' explicitly indicates no funds reserving is requested. + /// The base language in which the resource is written. /// /// ## Implementation Notes - /// This field is only used for preauthorizations. + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// @@ -57796,26 +57913,26 @@ pub struct ExplanationOfBenefit { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: For whom funds are to be reserved: (Patient, Provider, None). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fundsreserve - /// - /// ## Aliases - /// Fund pre-allocation - #[fhir_serde(rename = "fundsReserveRequested")] - pub funds_reserve_requested: Option, - /// Funds reserved status - /// - /// A code, used only on a response to a preauthorization, to indicate whether - /// the benefits payable have been reserved and for whom. + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Needed to advise the submitting provider on whether the rquest for - /// reservation of funds has been honored. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// Fund would be release by a future claim quoting the preAuthRef of this - /// response. Examples of values include: provider, patient, none. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// @@ -57823,164 +57940,123 @@ pub struct ExplanationOfBenefit { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: For whom funds are to be reserved: (Patient, Provider, None). - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fundsreserve - #[fhir_serde(rename = "fundsReserve")] - pub funds_reserve: Option, - /// Prior or corollary claims - /// - /// Other claims which are related to this claim such as prior submissions or - /// claims for related services or for the same event. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Requirements - /// For workplace or other accidents it is common to relate separate claims - /// arising from the same event. + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// /// ## Implementation Notes - /// For example, for the original treatment and follow-up exams. + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub related: Option>, - /// Prescription authorizing services or products - /// - /// Prescription to support the dispensing of pharmacy, device or vision - /// products. - /// - /// ## Requirements - /// Required to authorize the dispensing of controlled substances and devices. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub prescription: Option, - /// Original prescription if superceded by fulfiller - /// - /// Original prescription which has been superseded by this prescription to - /// support the dispensing of pharmacy services, medications or products. + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations /// - /// ## Requirements - /// Often required when a fulfiller varies what is fulfilled from that authorized - /// on the original prescription. + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes - /// For example, a physician may prescribe a medication which the pharmacy - /// determines is contraindicated, or for which the patient has an intolerance, - /// and therefor issues a new prescription for an alternate medication which has - /// the same therapeutic intent. The prescription from the pharmacy becomes the - /// 'prescription' and that from the physician becomes the 'original - /// prescription'. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "originalPrescription")] - pub original_prescription: Option, - /// Recipient of benefits payable - /// - /// The party to be reimbursed for cost of the products and services according to - /// the terms of the policy. - /// - /// ## Requirements - /// The provider needs to specify who they wish to be reimbursed and the claims - /// processor needs express who they will reimburse. - /// - /// ## Implementation Notes - /// Often providers agree to receive the benefits payable to reduce the near-term - /// costs to the patient. The insurer may decline to pay the provider and may - /// choose to pay the subscriber instead. + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Cardinality: Optional (0..1) + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub payee: Option, - /// Treatment Referral + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. /// - /// A reference to a referral resource. + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Some insurers require proof of referral to pay for services or to pay - /// specialist rates for services. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// The referral resource which lists the date, practitioner, reason and other - /// supporting information. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub referral: Option, - /// Servicing Facility - /// - /// Facility where the services were provided. - /// - /// ## Requirements - /// Insurance adjudication can be dependant on where services were delivered. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub facility: Option, - /// Claim reference - /// - /// The business identifier for the instance of the adjudication request: claim - /// predetermination or preauthorization. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Requirements - /// To provide a link to the original adjudication request. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub claim: Option, - /// Claim response reference + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The business identifier for the instance of the adjudication response: claim, - /// predetermination or preauthorization response. + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Business Identifier(s) relevant for this EpisodeOfCare /// - /// ## Requirements - /// To provide a link to the original adjudication response. + /// The EpisodeOfCare may be known by different identifiers for different + /// contexts of use, such as when an external agency is tracking the Episode for + /// funding purposes. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "claimResponse")] - pub claim_response: Option, - /// queued | complete | error | partial - /// - /// The outcome of the claim, predetermination, or preauthorization processing. + pub identifier: Option>, + /// planned | waitlist | active | onhold | finished | cancelled | entered-in-error /// - /// ## Requirements - /// To advise the requestor of an overall processing outcome. + /// planned | waitlist | active | onhold | finished | cancelled. /// /// ## Implementation Notes - /// The resource may be used to indicate that: the request has been held (queued) - /// for processing; that it has been processed and errors found (error); that no - /// errors were found and that some of the adjudication has been undertaken - /// (partial) or that all of the adjudication has been undertaken (complete). + /// This element is labeled as a modifier because the status contains codes that + /// mark the episode as not currently valid. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -57989,389 +58065,169 @@ pub struct ExplanationOfBenefit { /// /// ## Binding /// - **Strength**: required - /// - **Description**: The result of the claim processing. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 - pub outcome: Code, - /// Disposition Message - /// - /// A human readable description of the status of the adjudication. - /// - /// ## Requirements - /// Provided for user display. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub disposition: Option, - /// Preauthorization reference - /// - /// Reference from the Insurer which is used in later communications which refers - /// to this adjudication. - /// - /// ## Requirements - /// On subsequent claims, the insurer may require the provider to quote this - /// value. + /// - **Description**: The status of the episode of care. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1 + pub status: Code, + /// Past list of status codes (the current status may be included to cover the start date of the status) /// - /// ## Implementation Notes - /// This value is only present on preauthorization adjudications. + /// The history of statuses that the EpisodeOfCare has been through (without + /// requiring processing the history of the resource). /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAuthRef")] - pub pre_auth_ref: Option>, - /// Preauthorization in-effect period - /// - /// The timeframe during which the supplied preauthorization reference may be - /// quoted on claims to obtain the adjudication as provided. + #[fhir_serde(rename = "statusHistory")] + pub status_history: Option>, + /// Type/class - e.g. specialist referral, disease management /// - /// ## Requirements - /// On subsequent claims, the insurer may require the provider to quote this - /// value. + /// A classification of the type of episode of care; e.g. specialist referral, + /// disease management, type of funded care. /// /// ## Implementation Notes - /// This value is only present on preauthorization adjudications. + /// The type can be very important in processing as this could be used in + /// determining if the EpisodeOfCare is relevant to specific government + /// reporting, or other types of classifications. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAuthRefPeriod")] - pub pre_auth_ref_period: Option>, - /// Care Team members - /// - /// The members of the team who provided the products and services. - /// - /// ## Requirements - /// Common to identify the responsible and supporting practitioners. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "careTeam")] - pub care_team: Option>, - /// Supporting information - /// - /// Additional information codes regarding exceptions, special considerations, - /// the condition, situation, prior or concurrent issues. /// - /// ## Requirements - /// Typically these information codes are required to support the services - /// rendered or the adjudication of the services rendered. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The type of the episode of care. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episodeofcare-type + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// The list of diagnosis relevant to this episode of care /// - /// ## Implementation Notes - /// Often there are multiple jurisdiction specific valuesets which are required. + /// The list of diagnosis relevant to this episode of care. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "supportingInfo")] - pub supporting_info: Option>, - /// Pertinent diagnosis information - /// - /// Information about diagnoses relevant to the claim items. - /// - /// ## Requirements - /// Required for the adjudication by provided context for the services and - /// product listed. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub diagnosis: Option>, - /// Clinical procedures performed + pub diagnosis: Option>, + /// The patient who is the focus of this episode of care /// - /// Procedures performed on the patient relevant to the billing items with the - /// claim. + /// The patient who is the focus of this episode of care. /// - /// ## Requirements - /// The specific clinical invention are sometimes required to be provided to - /// justify billing a greater than customary amount for a service. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub procedure: Option>, - /// Precedence (primary, secondary, etc.) - /// - /// This indicates the relative order of a series of EOBs related to different - /// coverages for the same suite of services. + pub patient: Reference, + /// Organization that assumes care /// - /// ## Requirements - /// Needed to coordinate between multiple EOBs for the same suite of services. + /// The organization that has assumed the specific responsibilities for the + /// specified duration. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub precedence: Option, - /// Patient insurance information - /// - /// Financial instruments for reimbursement for the health care products and - /// services specified on the claim. - /// - /// ## Requirements - /// At least one insurer is required for a claim to be a claim. - /// - /// ## Implementation Notes - /// All insurance coverages for the patient which may be applicable for - /// reimbursement, of the products and services listed in the claim, are - /// typically provided in the claim to allow insurers to confirm the ordering of - /// the insurance coverages relative to local 'coordination of benefit' rules. - /// One coverage (and only one) with 'focal=true' is to be used in the - /// adjudication of this claim. Coverages appearing before the focal Coverage in - /// the list, and where 'Coverage.subrogation=false', should provide a reference - /// to the ClaimResponse containing the adjudication results of the prior claim. - /// - /// ## Cardinality: Required, Multiple (1..*) - /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub insurance: Option>, - /// Details of the event - /// - /// Details of a accident which resulted in injuries which required the products - /// and services listed in the claim. + #[fhir_serde(rename = "managingOrganization")] + pub managing_organization: Option, + /// Interval during responsibility is assumed /// - /// ## Requirements - /// When healthcare products and services are accident related, benefits may be - /// payable under accident provisions of policies, such as automotive, etc before - /// they are payable under normal health insurance. + /// The interval during which the managing organization assumes the defined + /// responsibility. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub accident: Option, - /// Product or service provided - /// - /// A claim line. Either a simple (a product or service) or a 'group' of details - /// which can also be a simple items or groups of sub-details. - /// - /// ## Requirements - /// The items to be processed for adjudication. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub item: Option>, - /// Insurer added line items - /// - /// The first-tier service adjudications for payor added product or service - /// lines. - /// - /// ## Requirements - /// Insurers may redefine the provided product or service or may package and/or - /// decompose groups of products and services. The addItems allows the insurer to - /// provide their line item list with linkage to the submitted - /// items/details/sub-details. In a preauthorization the insurer may use the - /// addItem structure to provide additional information on authorized products - /// and services. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "addItem")] - pub add_item: Option>, - /// Header-level adjudication - /// - /// The adjudication results which are presented at the header level rather than - /// at the line-item or add-item levels. - /// - /// ## Requirements - /// Some insurers will receive line-items but provide the adjudication only at a - /// summary or header-level. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Adjudication totals - /// - /// Categorized monetary totals for the adjudication. - /// - /// ## Requirements - /// To provide the requestor with financial totals by category for the - /// adjudication. - /// - /// ## Implementation Notes - /// Totals for amounts submitted, co-pays, benefits payable etc. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub total: Option>, - /// Payment Details - /// - /// Payment details for the adjudication of the claim. - /// - /// ## Requirements - /// Needed to convey references to the financial instrument that has been used if - /// payment has been made. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub payment: Option, - /// Printed form identifier - /// - /// A code for the form to be used for printing the content. - /// - /// ## Requirements - /// Needed to specify the specific form used for producing output for this - /// response. + pub period: Option, + /// Originating Referral Request(s) /// - /// ## Implementation Notes - /// May be needed to identify specific jurisdictional forms. + /// Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming + /// referrals. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "referralRequest")] + pub referral_request: Option>, + /// Care manager/care coordinator for the patient /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The forms codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/forms - #[fhir_serde(rename = "formCode")] - pub form_code: Option, - /// Printed reference or actual form - /// - /// The actual form, by reference or inclusion, for printing the content or an - /// EOB. - /// - /// ## Requirements - /// Needed to include the specific form used for producing output for this - /// response. - /// - /// ## Implementation Notes - /// Needed to permit insurers to include the actual form. + /// The practitioner that is the care manager/care coordinator for this patient. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub form: Option, - /// Note concerning adjudication - /// - /// A note that describes or explains adjudication results in a human readable - /// form. + #[fhir_serde(rename = "careManager")] + pub care_manager: Option, + /// Other practitioners facilitating this episode of care /// - /// ## Requirements - /// Provides the insurer specific textual explanations associated with the - /// processing. + /// The list of practitioners that may be facilitating this episode of care for + /// specific purposes. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "processNote")] - pub process_note: Option>, - /// When the benefits are applicable /// - /// The term of the benefits documented in this response. + /// ## Aliases + /// CareTeam + pub team: Option>, + /// The set of accounts that may be used for billing for this EpisodeOfCare /// - /// ## Requirements - /// Needed as coverages may be multi-year while benefits tend to be annual - /// therefore a separate expression of the benefit period is needed. + /// The set of accounts that may be used for billing for this EpisodeOfCare. /// /// ## Implementation Notes - /// Not applicable when use=claim. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "benefitPeriod")] - pub benefit_period: Option, - /// Balance by Benefit Category - /// - /// Balance by Benefit Category. + /// The billing system may choose to allocate billable items associated with the + /// EpisodeOfCare to different referenced Accounts based on internal business + /// rules. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "benefitBalance")] - pub benefit_balance: Option>, -} - -/// Choice of types for the allowed\[x\] field in ExplanationOfBenefitBenefitBalanceFinancial -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "allowed")] -pub enum ExplanationOfBenefitBenefitBalanceFinancialAllowed { - /// Variant accepting the UnsignedInt type. - #[fhir_serde(rename = "allowedUnsignedInt")] - UnsignedInt(UnsignedInt), - /// Variant accepting the String type. - #[fhir_serde(rename = "allowedString")] - String(String), - /// Variant accepting the Money type. - #[fhir_serde(rename = "allowedMoney")] - Money(Money), -} - -/// Choice of types for the used\[x\] field in ExplanationOfBenefitBenefitBalanceFinancial -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "used")] -pub enum ExplanationOfBenefitBenefitBalanceFinancialUsed { - /// Variant accepting the UnsignedInt type. - #[fhir_serde(rename = "usedUnsignedInt")] - UnsignedInt(UnsignedInt), - /// Variant accepting the Money type. - #[fhir_serde(rename = "usedMoney")] - Money(Money), + pub account: Option>, } -/// Benefit Summary +/// The list of diagnosis relevant to this episode of care /// -/// Benefits Used to date. +/// The list of diagnosis relevant to this episode of care. /// /// ## Cardinality: Optional, Multiple (0..*) /// +/// ## Special Semantics +/// - Included in summary +/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "allowed,used")] -pub struct ExplanationOfBenefitBenefitBalanceFinancial { +pub struct EpisodeOfCareDiagnosis { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -58452,92 +58308,58 @@ pub struct ExplanationOfBenefitBenefitBalanceFinancial { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Benefit classification - /// - /// Classification of benefit being provided. - /// - /// ## Requirements - /// Needed to convey the nature of the benefit. + /// Conditions/problems/diagnoses this episode of care is for /// - /// ## Implementation Notes - /// For example: deductible, visits, benefit amount. + /// A list of conditions/problems/diagnoses that this episode of care is intended + /// to be providing care for. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub condition: Reference, + /// Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …) /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Deductable, visits, co-pay, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-type - #[fhir_serde(rename = "type")] - pub r#type: CodeableConcept, - /// Benefits allowed - /// - /// The quantity of the benefit which is permitted under the coverage. - /// - /// ## Requirements - /// Needed to convey the benefits offered under the coverage. + /// Role that this diagnosis has within the episode of care (e.g. admission, + /// billing, discharge …). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub allowed: Option, - /// Benefits used /// - /// The quantity of the benefit which have been consumed to date. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: The type of diagnosis this condition represents. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/diagnosis-role + pub role: Option, + /// Ranking of the diagnosis (for each role type) /// - /// ## Requirements - /// Needed to convey the benefits consumed to date. + /// Ranking of the diagnosis (for each role type). /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub used: Option, -} - -/// Choice of types for the serviced\[x\] field in ExplanationOfBenefitItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum ExplanationOfBenefitItemServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), -} - -/// Choice of types for the location\[x\] field in ExplanationOfBenefitItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "location")] -pub enum ExplanationOfBenefitItemLocation { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "locationCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Address type. - #[fhir_serde(rename = "locationAddress")] - Address(Address), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "locationReference")] - Reference(Reference), + pub rank: Option, } -/// Product or service provided -/// -/// A claim line. Either a simple (a product or service) or a 'group' of details -/// which can also be a simple items or groups of sub-details. +/// Past list of status codes (the current status may be included to cover the start date of the status) /// -/// ## Requirements -/// The items to be processed for adjudication. +/// The history of statuses that the EpisodeOfCare has been through (without +/// requiring processing the history of the resource). /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -58545,8 +58367,7 @@ pub enum ExplanationOfBenefitItemLocation { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced,location")] -pub struct ExplanationOfBenefitItem { +pub struct EpisodeOfCareStatusHistory { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -58627,110 +58448,131 @@ pub struct ExplanationOfBenefitItem { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Item instance identifier - /// - /// A number to uniquely identify item entries. + /// planned | waitlist | active | onhold | finished | cancelled | entered-in-error /// - /// ## Requirements - /// Necessary to provide a mechanism to link to items from within the claim and - /// within the adjudication details of the ClaimResponse. + /// planned | waitlist | active | onhold | finished | cancelled. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Applicable care team members /// - /// Care team members related to this service or product. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The status of the episode of care. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1 + pub status: Code, + /// Duration the EpisodeOfCare was in the specified status /// - /// ## Requirements - /// Need to identify the individuals and their roles in the provision of the - /// product or service. + /// The period during this EpisodeOfCare that the specific status applied. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "careTeamSequence")] - pub care_team_sequence: Option>, - /// Applicable diagnoses - /// - /// Diagnoses applicable for this service or product. - /// - /// ## Requirements - /// Need to related the product or service to the associated diagnoses. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "diagnosisSequence")] - pub diagnosis_sequence: Option>, - /// Applicable procedures + pub period: Period, +} + +/// Choice of types for the subject\[x\] field in EventDefinition +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "subject")] +pub enum EventDefinitionSubject { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "subjectCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "subjectReference")] + Reference(Reference), +} + +/// FHIR EventDefinition type +/// +/// The EventDefinition resource provides a reusable description of when a +/// particular event can occur. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [EventDefinition](http://hl7.org/fhir/StructureDefinition/EventDefinition) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "subject")] +pub struct EventDefinition { + /// Logical id of this artifact /// - /// Procedures applicable for this service or product. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// - /// ## Requirements - /// Need to provide any listed specific procedures to support the product or - /// service being claimed. + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "procedureSequence")] - pub procedure_sequence: Option>, - /// Applicable exception and supporting information + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// Exceptions, special conditions and supporting information applicable for this - /// service or product. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Requirements - /// Need to reference the supporting information items that relate directly to - /// this product or service. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "informationSequence")] - pub information_sequence: Option>, - /// Revenue or cost center code + pub meta: Option, + /// A set of rules under which this content was created /// - /// The type of revenue or cost center providing the product and/or service. + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// - /// ## Requirements - /// Needed in the processing of institutional claims. + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center - pub revenue: Option, - /// Benefit classification - /// - /// Code to identify the general type of benefits under which products and - /// services are provided. - /// - /// ## Requirements - /// Needed in the processing of institutional claims as this allows the insurer - /// to determine whether a facial X-Ray is for dental, orthopedic, or facial - /// surgery purposes. + /// The base language in which the resource is written. /// /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// @@ -58739,796 +58581,835 @@ pub struct ExplanationOfBenefitItem { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Product or service billing modifiers + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or out of - /// office hours. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored /// - /// Identifies the program under which this may be recovered. + /// May be used to represent additional information that is not part of the basic + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Date or dates of service or product delivery + /// ## Aliases + /// extensions, user content + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Canonical identifier for this event definition, represented as a URI (globally unique) /// - /// The date or dates when the service or product was supplied, performed or - /// completed. + /// An absolute URI that is used to identify this event definition when it is + /// referenced in a specification, model, design or an instance; also called its + /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal + /// address at which at which an authoritative instance of this event definition + /// is (or will be) published. This URL can be the target of a canonical + /// reference. It SHALL remain the same when the event definition is stored on + /// different servers. /// /// ## Requirements - /// Needed to determine whether the service or product was provided during the - /// term of the insurance coverage. + /// Allows the event definition to be referenced by a single globally unique + /// identifier. + /// + /// ## Implementation Notes + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. + /// + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). + /// + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub serviced: Option, - /// Place of service or where product was supplied + pub url: Option, + /// Additional identifier for the event definition /// - /// Where the product or service was provided. + /// A formal identifier that is used to identify this event definition when it is + /// represented in other formats, or referenced in a specification, model, design + /// or an instance. /// /// ## Requirements - /// The location can alter whether the item was acceptable for insurance purposes - /// or impact the determination of the benefit amount. + /// Allows externally provided and/or usable business identifiers to be easily + /// associated with the module. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance + /// identifier) data type, and can then identify this event definition outside of + /// FHIR, where it is not possible to use the logical URI. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Business version of the event definition /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Place where the service is rendered. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place - #[fhir_serde(flatten)] - pub location: Option, - /// Count of products or services - /// - /// The number of repetitions of a service or product. + /// The identifier that is used to identify this version of the event definition + /// when it is referenced in a specification, model, design or instance. This is + /// an arbitrary value managed by the event definition author and is not expected + /// to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) + /// if a managed version is not available. There is also no expectation that + /// versions can be placed in a lexicographical sequence. /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// ## Implementation Notes + /// There may be different event definition instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the + /// event definition with the format [url]|[version]. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item + pub version: Option, + /// Name for this event definition (computer friendly) /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + /// A natural language name identifying the event definition. This name should be + /// usable as an identifier for the module by machine processing applications + /// such as code generation. /// /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// Support human navigation and code generation. + /// + /// ## Implementation Notes + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// Name for this event definition (human friendly) /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// A short, descriptive, user-friendly title for the event definition. /// /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// This name does not need to be machine-processing friendly and may contain + /// punctuation, white-space, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost - /// - /// The quantity times the unit price for an additional service or product or - /// charge. - /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + pub title: Option, + /// Subordinate title of the event definition /// - /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// An explanatory or alternate title for the event definition giving additional + /// information about its content. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Unique device identifier + pub subtitle: Option, + /// draft | active | retired | unknown /// - /// Unique Device Identifiers associated with this line item. + /// The status of this event definition. Enables tracking the life-cycle of the + /// content. /// - /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. + /// ## Implementation Notes + /// Allows filtering of event definitions that are appropriate for use versus + /// not. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, - /// Anatomical location /// - /// Physical service site on the patient (limb, tooth, etc.). + /// ## Binding + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// For testing purposes, not real usage + /// + /// A Boolean value to indicate that this event definition is authored for + /// testing purposes (or education/evaluation/marketing) and is not intended to + /// be used for genuine usage. /// /// ## Requirements - /// Allows insurer to validate specific procedures. + /// Enables experimental content to be developed following the same lifecycle + /// that would be used for a production-level event definition. /// /// ## Implementation Notes - /// For example: Providing a tooth code, allows an insurer to identify a provider - /// performing a filling on a tooth that was previously removed. + /// Allows filtering of event definitions that are appropriate for use versus + /// not. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub experimental: Option, + /// Type of individual the event definition is focused on /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the teeth, quadrant, sextant and arch. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth - #[fhir_serde(rename = "bodySite")] - pub body_site: Option, - /// Anatomical sub-location - /// - /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). + /// A code or group definition that describes the intended subject of the event + /// definition. /// - /// ## Requirements - /// Allows insurer to validate specific procedures. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - When missing: Patient /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the tooth surface and surface combinations. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface - #[fhir_serde(rename = "subSite")] - pub sub_site: Option>, - /// Encounters related to this billed item + /// - **Strength**: extensible + /// - **Description**: The possible types of subjects for an event (E.g. Patient, Practitioner, Organization, Location, etc.). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/subject-type + #[fhir_serde(flatten)] + pub subject: Option, + /// Date last changed /// - /// A billed item may include goods or services provided in multiple encounters. + /// The date (and optionally time) when the event definition was published. The + /// date must change when the business version changes and it must change if the + /// status code changes. In addition, it should change when the substantive + /// content of the event definition changes. /// - /// ## Requirements - /// Used in some jurisdictions to link clinical events to claim items. + /// ## Implementation Notes + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the event definition. + /// Additional specific dates may be added as extensions or be found by + /// consulting Provenances associated with past versions of the resource. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub encounter: Option>, - /// Applicable note numbers /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + /// ## Aliases + /// Revision Date + pub date: Option, + /// Name of the publisher (organization or individual) + /// + /// The name of the organization or individual that published the event + /// definition. /// /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// Helps establish the "authority/credibility" of the event definition. May also + /// allow for contact. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the event definition is the organization or individual primarily + /// responsible for the maintenance and upkeep of the event definition. This is + /// not necessarily the same individual or organization that developed and + /// initially authored the content. The publisher is the primary point of contact + /// for questions or issues with the event definition. This item SHOULD be + /// populated unless the information is available from context. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Adjudication details + pub publisher: Option, + /// Contact details for the publisher /// - /// If this item is a group then the values here are a summary of the - /// adjudication of the detail items. If this item is a simple product or service - /// then this is the result of the adjudication of this item. + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// - /// ## Requirements - /// The adjudication results conveys the insurer's assessment of the item - /// provided in the claim under the terms of the patient's insurance coverage. + /// ## Implementation Notes + /// May be a web site, an email address, a telephone number, etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Additional items + pub contact: Option>, + /// Natural language description of the event definition /// - /// Second-tier of goods and services. + /// A free text natural language description of the event definition from a + /// consumer's perspective. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// This description can be used to capture details such as why the event + /// definition was built, comments about misuse, instructions for clinical use + /// and interpretation, literature references, examples from the paper world, + /// etc. It is not a rendering of the event definition as conveyed in the 'text' + /// field of the resource itself. This item SHOULD be populated unless the + /// information is available from context (e.g. the language of the event + /// definition is presumed to be the predominant language in the place the event + /// definition was created). + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, -} - -/// Insurer added line items -/// -/// The second-tier service adjudications for payor added services. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitAddItemDetail { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + pub description: Option, + /// The context that the content is intended to support /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// The content was developed with a focus and intent of supporting the contexts + /// that are listed. These contexts may be general categories (gender, age, ...) + /// or may be references to specific programs (insurance plans, studies, ...) and + /// may be used to assist with indexing and searching for appropriate event + /// definition instances. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Requirements + /// Assist in searching for appropriate content. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// When multiple useContexts are specified, there is no expectation that all or + /// any of the contexts apply. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + #[fhir_serde(rename = "useContext")] + pub use_context: Option>, + /// Intended jurisdiction for event definition (if applicable) /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// A legal or geographic region in which the event definition is intended to be + /// used. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// It may be possible for the event definition to be used in jurisdictions other + /// than those for which it was originally designed or intended. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Billing, service, product, or drug code /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Countries and regions within which this artifact is targeted for use. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction + pub jurisdiction: Option>, + /// Why this event definition is defined /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// Explanation of why this event definition is needed and why it has been + /// designed as it has. /// /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// This element does not describe the usage of the event definition. Instead, it + /// provides traceability of ''why'' the resource is either needed or ''why'' it + /// is defined as it is. This may be used to point to source materials or + /// specifications that drove the structure of this event definition. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub purpose: Option, + /// Describes the clinical usage of the event definition /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. - /// - /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or out of - /// office hours. + /// A detailed description of how the event definition is used from a clinical + /// perspective. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub usage: Option, + /// Use and/or publishing restrictions /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Count of products or services - /// - /// The number of repetitions of a service or product. + /// A copyright statement relating to the event definition and/or its contents. + /// Copyright statements are generally legal restrictions on the use and + /// publishing of the event definition. /// /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// Consumers must be able to determine any legal restrictions on the use of the + /// event definition and/or its content. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + /// ## Aliases + /// License, Restrictions + pub copyright: Option, + /// When the event definition was approved by publisher /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// The date on which the resource content was approved by the publisher. + /// Approval happens once when the content is officially approved for usage. + /// + /// ## Implementation Notes + /// The 'date' element may be more recent than the approval date because of minor + /// changes or editorial corrections. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor + #[fhir_serde(rename = "approvalDate")] + pub approval_date: Option, + /// When the event definition was last reviewed /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + /// The date on which the resource content was last reviewed. Review happens + /// periodically after approval but does not change the original approval date. /// /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// Gives a sense of how "current" the content is. Resources that have not been + /// reviewed in a long time may have a risk of being less appropriate/relevant. /// /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// If specified, this date follows the original approval date. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost + #[fhir_serde(rename = "lastReviewDate")] + pub last_review_date: Option, + /// When the event definition is expected to be used /// - /// The quantity times the unit price for an additional service or product or - /// charge. + /// The period during which the event definition content was or is planned to be + /// in active use. /// /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + /// Allows establishing a transition before a resource comes into effect and also + /// allows for a sunsetting process when new versions of the event definition are + /// or are expected to be used instead. /// /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// The effective period for a event definition determines when the content is + /// applicable for usage and is independent of publication and review dates. For + /// example, a measure intended to be used for the year 2016 might be published + /// in 2015. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Applicable note numbers + #[fhir_serde(rename = "effectivePeriod")] + pub effective_period: Option, + /// E.g. Education, Treatment, Assessment, etc. /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + /// Descriptive topics related to the module. Topics provide a high-level + /// categorization of the module that can be useful for filtering and searching. /// /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// Repositories must be able to determine how to categorize the module so that + /// it can be found by topical searches. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Added items adjudication /// - /// The adjudication results. + /// ## Binding + /// - **Strength**: example + /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic + pub topic: Option>, + /// Who authored the content + /// + /// An individiual or organization primarily involved in the creation and + /// maintenance of the content. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Insurer added line items + pub author: Option>, + /// Who edited the content /// - /// The third-tier service adjudications for payor added services. + /// An individual or organization primarily responsible for internal coherence of + /// the content. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetail")] - pub sub_detail: Option>, -} - -/// Choice of types for the procedure\[x\] field in ExplanationOfBenefitProcedure -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "procedure")] -pub enum ExplanationOfBenefitProcedureProcedure { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "procedureCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "procedureReference")] - Reference(Reference), -} - -/// Clinical procedures performed -/// -/// Procedures performed on the patient relevant to the billing items with the -/// claim. -/// -/// ## Requirements -/// The specific clinical invention are sometimes required to be provided to -/// justify billing a greater than customary amount for a service. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "procedure")] -pub struct ExplanationOfBenefitProcedure { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + pub editor: Option>, + /// Who reviewed the content /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// An individual or organization primarily responsible for review of some aspect + /// of the content. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). - /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + pub reviewer: Option>, + /// Who endorsed the content /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// An individual or organization responsible for officially endorsing the + /// content for use in some setting. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Procedure instance identifier + pub endorser: Option>, + /// Additional documentation, citations, etc. /// - /// A number to uniquely identify procedure entries. + /// Related resources such as additional documentation, justification, or + /// bibliographic references. /// /// ## Requirements - /// Necessary to provide a mechanism to link to claim details. + /// Modules must be able to provide enough information for consumers of the + /// content (and/or interventions or results produced by the content) to be able + /// to determine and understand the justification for and evidence in support of + /// the content. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Each related resource is either an attachment, or a reference to another + /// resource, but not both. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Category of Procedure + #[fhir_serde(rename = "relatedArtifact")] + pub related_artifact: Option>, + /// "when" the event occurs (multiple = 'or') /// - /// When the condition was observed or the relative ranking. + /// The trigger element defines when the event occurs. If more than one trigger + /// condition is specified, the event fires whenever any one of the trigger + /// conditions is met. /// - /// ## Requirements - /// Often required to capture a particular diagnosis, for example: primary or - /// discharge. + /// ## Cardinality: Required, Multiple (1..*) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub trigger: Option>, +} + +/// FHIR Evidence type +/// +/// The Evidence resource describes the conditional state (population and any +/// exposures being compared within the population) and outcome (if specified) +/// that the knowledge (evidence, assertion, recommendation) is about. +/// +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// +/// ## Status: draft +/// FHIR Version: 4.0.1 +/// +/// See: [Evidence](http://hl7.org/fhir/StructureDefinition/Evidence) +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct Evidence { + /// Logical id of this artifact /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Example procedure type codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-procedure-type - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// When the procedure was performed - /// - /// Date and optionally time the procedure was performed. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. /// - /// ## Requirements - /// Required for auditing purposes. + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// Specific clinical procedure + /// ## Special Semantics + /// - Included in summary + pub id: Option, + /// Metadata about the resource /// - /// The code or reference to a Procedure resource which identifies the clinical - /// intervention performed. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Requirements - /// This identifies the actual clinical procedure. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: ICD10 Procedure codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10-procedures - #[fhir_serde(flatten)] - pub procedure: Option, - /// Unique device identifier + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// - /// Unique Device Identifiers associated with this line item. + /// ## Implementation Notes + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// - /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, -} - -/// Choice of types for the location\[x\] field in ExplanationOfBenefitAccident -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "location")] -pub enum ExplanationOfBenefitAccidentLocation { - /// Variant accepting the Address type. - #[fhir_serde(rename = "locationAddress")] - Address(Address), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "locationReference")] - Reference(Reference), -} - -/// Details of the event -/// -/// Details of a accident which resulted in injuries which required the products -/// and services listed in the claim. -/// -/// ## Requirements -/// When healthcare products and services are accident related, benefits may be -/// payable under accident provisions of policies, such as automotive, etc before -/// they are payable under normal health insurance. -/// -/// ## Cardinality: Optional (0..1) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "location")] -pub struct ExplanationOfBenefitAccident { - /// Unique id for inter-element referencing + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The base language in which the resource is written. + /// + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) - pub id: Option, + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation + /// + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. + /// + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources + /// + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -59548,16 +59429,16 @@ pub struct ExplanationOfBenefitAccident { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -59582,8 +59463,7 @@ pub struct ExplanationOfBenefitAccident { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -59592,192 +59472,201 @@ pub struct ExplanationOfBenefitAccident { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// When the incident occurred + /// Canonical identifier for this evidence, represented as a URI (globally unique) /// - /// Date of an accident event related to the products and services contained in - /// the claim. + /// An absolute URI that is used to identify this evidence when it is referenced + /// in a specification, model, design or an instance; also called its canonical + /// identifier. This SHOULD be globally unique and SHOULD be a literal address at + /// which at which an authoritative instance of this evidence is (or will be) + /// published. This URL can be the target of a canonical reference. It SHALL + /// remain the same when the evidence is stored on different servers. /// /// ## Requirements - /// Required for audit purposes and adjudication. + /// Allows the evidence to be referenced by a single globally unique identifier. /// /// ## Implementation Notes - /// The date of the accident has to precede the dates of the products and - /// services but within a reasonable timeframe. + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. + /// + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). + /// + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// The nature of the accident + pub url: Option, + /// Additional identifier for the evidence /// - /// The type or context of the accident event for the purposes of selection of - /// potential insurance coverages and determination of coordination between - /// insurers. + /// A formal identifier that is used to identify this evidence when it is + /// represented in other formats, or referenced in a specification, model, design + /// or an instance. /// /// ## Requirements - /// Coverage may be dependant on the type of accident. + /// Allows externally provided and/or usable business identifiers to be easily + /// associated with the module. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance + /// identifier) data type, and can then identify this evidence outside of FHIR, + /// where it is not possible to use the logical URI. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Business version of the evidence /// - /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Type of accident: work place, auto, etc. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActIncidentCode - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Where the event occurred + /// The identifier that is used to identify this version of the evidence when it + /// is referenced in a specification, model, design or instance. This is an + /// arbitrary value managed by the evidence author and is not expected to be + /// globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a + /// managed version is not available. There is also no expectation that versions + /// can be placed in a lexicographical sequence. To provide a version consistent + /// with the Decision Support Service specification, use the format + /// Major.Minor.Revision (e.g. 1.0.0). For more information on versioning + /// knowledge assets, refer to the Decision Support Service specification. Note + /// that a version is required for non-experimental active artifacts. /// - /// The physical location of the accident event. + /// ## Implementation Notes + /// There may be different evidence instances that have the same identifier but + /// different versions. The version can be appended to the url in a reference to + /// allow a reference to a particular business version of the evidence with the + /// format [url]|[version]. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option, + /// Name for this evidence (computer friendly) + /// + /// A natural language name identifying the evidence. This name should be usable + /// as an identifier for the module by machine processing applications such as + /// code generation. /// /// ## Requirements - /// Required for audit purposes and determination of applicable insurance - /// liability. + /// Support human navigation and code generation. + /// + /// ## Implementation Notes + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub location: Option, -} - -/// Patient insurance information -/// -/// Financial instruments for reimbursement for the health care products and -/// services specified on the claim. -/// -/// ## Requirements -/// At least one insurer is required for a claim to be a claim. -/// -/// ## Implementation Notes -/// All insurance coverages for the patient which may be applicable for -/// reimbursement, of the products and services listed in the claim, are -/// typically provided in the claim to allow insurers to confirm the ordering of -/// the insurance coverages relative to local 'coordination of benefit' rules. -/// One coverage (and only one) with 'focal=true' is to be used in the -/// adjudication of this claim. Coverages appearing before the focal Coverage in -/// the list, and where 'Coverage.subrogation=false', should provide a reference -/// to the ClaimResponse containing the adjudication results of the prior claim. -/// -/// ## Cardinality: Required, Multiple (1..*) -/// -/// ## Special Semantics -/// - Included in summary -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitInsurance { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// Name for this evidence (human friendly) + /// + /// A short, descriptive, user-friendly title for the evidence. + /// + /// ## Implementation Notes + /// This name does not need to be machine-processing friendly and may contain + /// punctuation, white-space, etc. /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Special Semantics + /// - Included in summary /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub title: Option, + /// Title for use in informal contexts /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The short title provides an alternate title for use in informal descriptive + /// contexts where the full, formal title is not necessary. + /// + /// ## Requirements + /// Need to be able to reference the content by a short description, but still + /// provide a longer, more formal title for the content. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(rename = "shortTitle")] + pub short_title: Option, + /// Subordinate title of the Evidence /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// An explanatory or alternate title for the Evidence giving additional + /// information about its content. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Cardinality: Optional (0..1) /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub subtitle: Option, + /// draft | active | retired | unknown /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// The status of this evidence. Enables tracking the life-cycle of the content. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Allows filtering of evidences that are appropriate for use versus not. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Coverage to be used for adjudication /// - /// A flag to indicate that this Coverage is to be used for adjudication of this - /// claim when set to true. + /// ## Binding + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// Date last changed /// - /// ## Requirements - /// To identify which coverage in the list is being used to adjudicate this - /// claim. + /// The date (and optionally time) when the evidence was published. The date must + /// change when the business version changes and it must change if the status + /// code changes. In addition, it should change when the substantive content of + /// the evidence changes. /// /// ## Implementation Notes - /// A patient may (will) have multiple insurance policies which provide - /// reimbursement for healthcare services and products. For example, a person may - /// also be covered by their spouse's policy and both appear in the list (and may - /// be from the same insurer). This flag will be set to true for only one of the - /// listed policies and that policy will be used for adjudicating this claim. - /// Other claims would be created to request adjudication against the other - /// listed policies. + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the evidence. Additional + /// specific dates may be added as extensions or be found by consulting + /// Provenances associated with past versions of the resource. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -59785,18 +59674,28 @@ pub struct ExplanationOfBenefitInsurance { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub focal: Boolean, - /// Insurance information /// - /// Reference to the insurance card level information contained in the Coverage - /// resource. The coverage issuing insurer will use these details to locate the - /// patient's actual coverage within the insurer's information system. + /// ## Aliases + /// Revision Date + pub date: Option, + /// Name of the publisher (organization or individual) + /// + /// The name of the organization or individual that published the evidence. /// /// ## Requirements - /// Required to allow the adjudicator to locate the correct policy and history - /// within their information system. + /// Helps establish the "authority/credibility" of the evidence. May also allow + /// for contact. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the evidence is the organization or individual primarily responsible for + /// the maintenance and upkeep of the evidence. This is not necessarily the same + /// individual or organization that developed and initially authored the content. + /// The publisher is the primary point of contact for questions or issues with + /// the evidence. This item SHOULD be populated unless the information is + /// available from context. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -59804,322 +59703,404 @@ pub struct ExplanationOfBenefitInsurance { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub coverage: Reference, - /// Prior authorization reference number - /// - /// Reference numbers previously provided by the insurer to the provider to be - /// quoted on subsequent claims containing services or products related to the - /// prior authorization. + pub publisher: Option, + /// Contact details for the publisher /// - /// ## Requirements - /// Providers must quote previously issued authorization reference numbers in - /// order to obtain adjudication as previously advised on the Preauthorization. + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// /// ## Implementation Notes - /// This value is an alphanumeric string that may be provided over the phone, via - /// text, via paper, or within a ClaimResponse resource and is not a FHIR - /// Identifier. + /// May be a web site, an email address, a telephone number, etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "preAuthRef")] - pub pre_auth_ref: Option>, -} - -/// Adjudication details -/// -/// If this item is a group then the values here are a summary of the -/// adjudication of the detail items. If this item is a simple product or service -/// then this is the result of the adjudication of this item. -/// -/// ## Requirements -/// The adjudication results conveys the insurer's assessment of the item -/// provided in the claim under the terms of the patient's insurance coverage. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitItemAdjudication { - /// Unique id for inter-element referencing + pub contact: Option>, + /// Natural language description of the evidence /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// A free text natural language description of the evidence from a consumer's + /// perspective. + /// + /// ## Implementation Notes + /// This description can be used to capture details such as why the evidence was + /// built, comments about misuse, instructions for clinical use and + /// interpretation, literature references, examples from the paper world, etc. It + /// is not a rendering of the evidence as conveyed in the 'text' field of the + /// resource itself. This item SHOULD be populated unless the information is + /// available from context (e.g. the language of the evidence is presumed to be + /// the predominant language in the place the evidence was created). /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Special Semantics + /// - Included in summary /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Used for footnotes or explanatory notes + /// + /// A human-readable string to clarify or explain concepts about the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub note: Option>, + /// The context that the content is intended to support /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// The content was developed with a focus and intent of supporting the contexts + /// that are listed. These contexts may be general categories (gender, age, ...) + /// or may be references to specific programs (insurance plans, studies, ...) and + /// may be used to assist with indexing and searching for appropriate evidence + /// instances. /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// ## Requirements + /// Assist in searching for appropriate content. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Implementation Notes + /// When multiple useContexts are specified, there is no expectation that all or + /// any of the contexts apply. /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "useContext")] + pub use_context: Option>, + /// Intended jurisdiction for evidence (if applicable) + /// + /// A legal or geographic region in which the evidence is intended to be used. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// It may be possible for the evidence to be used in jurisdictions other than + /// those for which it was originally designed or intended. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Type of adjudication information + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Countries and regions within which this artifact is targeted for use. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction + pub jurisdiction: Option>, + /// Use and/or publishing restrictions /// - /// A code to indicate the information type of this adjudication record. - /// Information types may include: the value submitted, maximum values or - /// percentages allowed or payable under the plan, amounts that the patient is - /// responsible for in-aggregate or pertaining to this item, amounts paid by - /// other coverages, and the benefit payable for this item. + /// A copyright statement relating to the evidence and/or its contents. Copyright + /// statements are generally legal restrictions on the use and publishing of the + /// evidence. /// /// ## Requirements - /// Needed to enable understanding of the context of the other information in the - /// adjudication. + /// Consumers must be able to determine any legal restrictions on the use of the + /// evidence and/or its content. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// License, Restrictions + pub copyright: Option, + /// When the evidence was approved by publisher + /// + /// The date on which the resource content was approved by the publisher. + /// Approval happens once when the content is officially approved for usage. /// /// ## Implementation Notes - /// For example, codes indicating: Co-Pay, deductible, eligible, benefit, tax, - /// etc. + /// The 'date' element may be more recent than the approval date because of minor + /// changes or editorial corrections. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "approvalDate")] + pub approval_date: Option, + /// When the evidence was last reviewed /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication - pub category: CodeableConcept, - /// Explanation of adjudication outcome + /// The date on which the resource content was last reviewed. Review happens + /// periodically after approval but does not change the original approval date. /// - /// A code supporting the understanding of the adjudication result and explaining - /// variance from expected amount. + /// ## Requirements + /// Gives a sense of how "current" the content is. Resources that have not been + /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// + /// ## Implementation Notes + /// If specified, this date follows the original approval date. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "lastReviewDate")] + pub last_review_date: Option, + /// When the evidence is expected to be used + /// + /// The period during which the evidence content was or is planned to be in + /// active use. /// /// ## Requirements - /// To support understanding of variance from adjudication expectations. + /// Allows establishing a transition before a resource comes into effect and also + /// allows for a sunsetting process when new versions of the evidence are or are + /// expected to be used instead. /// /// ## Implementation Notes - /// For example, may indicate that the funds for this benefit type have been - /// exhausted. + /// The effective period for a evidence determines when the content is applicable + /// for usage and is independent of publication and review dates. For example, a + /// measure intended to be used for the year 2016 might be published in 2015. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "effectivePeriod")] + pub effective_period: Option, + /// The category of the Evidence, such as Education, Treatment, Assessment, etc. + /// + /// Descriptive topics related to the content of the Evidence. Topics provide a + /// high-level categorization grouping types of Evidences that can be useful for + /// filtering and searching. + /// + /// ## Requirements + /// Repositories must be able to determine how to categorize the Evidence so that + /// it can be found by topical searches. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: example - /// - **Description**: Adjudication reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-reason - pub reason: Option, - /// Monetary amount + /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic + pub topic: Option>, + /// Who authored the content /// - /// Monetary amount associated with the category. + /// An individiual or organization primarily involved in the creation and + /// maintenance of the content. /// - /// ## Requirements - /// Most adjuciation categories convey a monetary amount. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// For example, amount submitted, eligible amount, co-payment, and benefit - /// payable. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option>, + /// Who edited the content /// - /// ## Cardinality: Optional (0..1) + /// An individual or organization primarily responsible for internal coherence of + /// the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Option, - /// Non-monitary value + pub editor: Option>, + /// Who reviewed the content /// - /// A non-monetary value associated with the category. Mutually exclusive to the - /// amount element above. + /// An individual or organization primarily responsible for review of some aspect + /// of the content. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub reviewer: Option>, + /// Who endorsed the content + /// + /// An individual or organization responsible for officially endorsing the + /// content for use in some setting. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub endorser: Option>, + /// Additional documentation, citations, etc. + /// + /// Related artifacts such as additional documentation, justification, or + /// bibliographic references. /// /// ## Requirements - /// Some adjudication categories convey a percentage or a fixed value. + /// Evidences must be able to provide enough information for consumers of the + /// content (and/or interventions or results produced by the content) to be able + /// to determine and understand the justification for and evidence in support of + /// the content. /// /// ## Implementation Notes - /// For example: eligible percentage or co-payment percentage. + /// Each related artifact is either an attachment, or a reference to another + /// resource, but not both. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub value: Option, + #[fhir_serde(rename = "relatedArtifact")] + pub related_artifact: Option>, + /// What population? + /// + /// A reference to a EvidenceVariable resource that defines the population for + /// the research. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "exposureBackground")] + pub exposure_background: Reference, + /// What exposure? + /// + /// A reference to a EvidenceVariable resource that defines the exposure for the + /// research. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "exposureVariant")] + pub exposure_variant: Option>, + /// What outcome? + /// + /// A reference to a EvidenceVariable resomece that defines the outcome for the + /// research. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub outcome: Option>, } -/// Recipient of benefits payable +/// FHIR EvidenceVariable type /// -/// The party to be reimbursed for cost of the products and services according to -/// the terms of the policy. +/// The EvidenceVariable resource describes a "PICO" element that knowledge +/// (evidence, assertion, recommendation) is about. /// -/// ## Requirements -/// The provider needs to specify who they wish to be reimbursed and the claims -/// processor needs express who they will reimburse. +/// ## Purpose +/// Need to be able to define and reuse the definition of individual elements of a research question. /// -/// ## Implementation Notes -/// Often providers agree to receive the benefits payable to reduce the near-term -/// costs to the patient. The insurer may decline to pay the provider and may -/// choose to pay the subscriber instead. +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource /// -/// ## Cardinality: Optional (0..1) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [EvidenceVariable](http://hl7.org/fhir/StructureDefinition/EvidenceVariable) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitPayee { - /// Unique id for inter-element referencing +pub struct EvidenceVariable { + /// Logical id of this artifact /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary pub id: Option, - /// Additional content defined by implementations + /// Metadata about the resource /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Category of recipient + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// Type of Party to be reimbursed: Subscriber, provider, other. + /// The base language in which the resource is written. /// - /// ## Requirements - /// Need to know who should receive payment with the most common situations being - /// the Provider (assignment of benefits) or the Subscriber. + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// /// ## Cardinality: Optional (0..1) /// @@ -60128,54 +60109,61 @@ pub struct ExplanationOfBenefitPayee { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: A code for the party to be reimbursed. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/payeetype - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Recipient reference - /// - /// Reference to the individual or organization to whom any payment will be made. + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Need to provide demographics if the payee is not 'subscriber' nor 'provider'. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// /// ## Implementation Notes - /// Not required if the payee is 'subscriber' or 'provider'. + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub party: Option, -} - -/// Balance by Benefit Category -/// -/// Balance by Benefit Category. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitBenefitBalance { - /// Unique id for inter-element referencing /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. + /// + /// ## Implementation Notes + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -60195,16 +60183,16 @@ pub struct ExplanationOfBenefitBenefitBalance { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -60229,8 +60217,7 @@ pub struct ExplanationOfBenefitBenefitBalance { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -60239,387 +60226,436 @@ pub struct ExplanationOfBenefitBenefitBalance { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Benefit classification - /// - /// Code to identify the general type of benefits under which products and - /// services are provided. - /// - /// ## Requirements - /// Needed to convey the category of service or product for which eligibility is - /// sought. + /// Canonical identifier for this evidence variable, represented as a URI (globally unique) /// - /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// An absolute URI that is used to identify this evidence variable when it is + /// referenced in a specification, model, design or an instance; also called its + /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal + /// address at which at which an authoritative instance of this evidence variable + /// is (or will be) published. This URL can be the target of a canonical + /// reference. It SHALL remain the same when the evidence variable is stored on + /// different servers. /// - /// ## Cardinality: Required (1..1) + /// ## Requirements + /// Allows the evidence variable to be referenced by a single globally unique + /// identifier. + /// + /// ## Implementation Notes + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. + /// + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). + /// + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub url: Option, + /// Additional identifier for the evidence variable /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: CodeableConcept, - /// Excluded from the plan - /// - /// True if the indicated class of service is excluded from the plan, missing or - /// False indicates the product or service is included in the coverage. + /// A formal identifier that is used to identify this evidence variable when it + /// is represented in other formats, or referenced in a specification, model, + /// design or an instance. /// /// ## Requirements - /// Needed to identify items that are specifically excluded from the coverage. + /// Allows externally provided and/or usable business identifiers to be easily + /// associated with the module. + /// + /// ## Implementation Notes + /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance + /// identifier) data type, and can then identify this evidence variable outside + /// of FHIR, where it is not possible to use the logical URI. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Business version of the evidence variable + /// + /// The identifier that is used to identify this version of the evidence variable + /// when it is referenced in a specification, model, design or instance. This is + /// an arbitrary value managed by the evidence variable author and is not + /// expected to be globally unique. For example, it might be a timestamp (e.g. + /// yyyymmdd) if a managed version is not available. There is also no expectation + /// that versions can be placed in a lexicographical sequence. To provide a + /// version consistent with the Decision Support Service specification, use the + /// format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning + /// knowledge assets, refer to the Decision Support Service specification. Note + /// that a version is required for non-experimental active artifacts. + /// + /// ## Implementation Notes + /// There may be different evidence variable instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the + /// evidence variable with the format [url]|[version]. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub excluded: Option, - /// Short name for the benefit + pub version: Option, + /// Name for this evidence variable (computer friendly) /// - /// A short name or tag for the benefit. + /// A natural language name identifying the evidence variable. This name should + /// be usable as an identifier for the module by machine processing applications + /// such as code generation. /// /// ## Requirements - /// Required to align with other plan names. + /// Support human navigation and code generation. /// /// ## Implementation Notes - /// For example: MED01, or DENT2. + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Description of the benefit or services covered /// - /// A richer description of the benefit or services covered. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// Name for this evidence variable (human friendly) /// - /// ## Requirements - /// Needed for human readable reference. + /// A short, descriptive, user-friendly title for the evidence variable. /// /// ## Implementation Notes - /// For example, 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, - /// Implants and Cosmetic services'. + /// This name does not need to be machine-processing friendly and may contain + /// punctuation, white-space, etc. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// In or out of network + pub title: Option, + /// Title for use in informal contexts /// - /// Is a flag to indicate whether the benefits refer to in-network providers or - /// out-of-network providers. + /// The short title provides an alternate title for use in informal descriptive + /// contexts where the full, formal title is not necessary. /// /// ## Requirements - /// Needed as in or out of network providers are treated differently under the - /// coverage. + /// Need to be able to reference the content by a short description, but still + /// provide a longer, more formal title for the content. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "shortTitle")] + pub short_title: Option, + /// Subordinate title of the EvidenceVariable + /// + /// An explanatory or alternate title for the EvidenceVariable giving additional + /// information about its content. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub subtitle: Option, + /// draft | active | retired | unknown + /// + /// The status of this evidence variable. Enables tracking the life-cycle of the + /// content. + /// + /// ## Implementation Notes + /// Allows filtering of evidence variables that are appropriate for use versus + /// not. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Code to classify in or out of network services. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-network - pub network: Option, - /// Individual or family + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// Date last changed /// - /// Indicates if the benefits apply to an individual or to the family. + /// The date (and optionally time) when the evidence variable was published. The + /// date must change when the business version changes and it must change if the + /// status code changes. In addition, it should change when the substantive + /// content of the evidence variable changes. /// - /// ## Requirements - /// Needed for the understanding of the benefits. + /// ## Implementation Notes + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the evidence variable. + /// Additional specific dates may be added as extensions or be found by + /// consulting Provenances associated with past versions of the resource. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Unit covered/serviced - individual or family. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-unit - pub unit: Option, - /// Annual or lifetime + /// ## Aliases + /// Revision Date + pub date: Option, + /// Name of the publisher (organization or individual) /// - /// The term or period of the values such as 'maximum lifetime benefit' or - /// 'maximum annual visits'. + /// The name of the organization or individual that published the evidence + /// variable. /// /// ## Requirements - /// Needed for the understanding of the benefits. + /// Helps establish the "authority/credibility" of the evidence variable. May + /// also allow for contact. + /// + /// ## Implementation Notes + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the evidence variable is the organization or individual primarily + /// responsible for the maintenance and upkeep of the evidence variable. This is + /// not necessarily the same individual or organization that developed and + /// initially authored the content. The publisher is the primary point of contact + /// for questions or issues with the evidence variable. This item SHOULD be + /// populated unless the information is available from context. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub publisher: Option, + /// Contact details for the publisher /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Coverage unit - annual, lifetime. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-term - pub term: Option, - /// Benefit Summary + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// - /// Benefits Used to date. + /// ## Implementation Notes + /// May be a web site, an email address, a telephone number, etc. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub financial: Option>, -} - -/// Choice of types for the timing\[x\] field in ExplanationOfBenefitSupportingInfo -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "timing")] -pub enum ExplanationOfBenefitSupportingInfoTiming { - /// Variant accepting the Date type. - #[fhir_serde(rename = "timingDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "timingPeriod")] - Period(Period), -} - -/// Choice of types for the value\[x\] field in ExplanationOfBenefitSupportingInfo -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum ExplanationOfBenefitSupportingInfoValue { - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "valueBoolean")] - Boolean(Boolean), - /// Variant accepting the String type. - #[fhir_serde(rename = "valueString")] - String(String), - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "valueQuantity")] - Quantity(Quantity), - /// Variant accepting the Attachment type. - #[fhir_serde(rename = "valueAttachment")] - Attachment(Attachment), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "valueReference")] - Reference(Reference), -} - -/// Supporting information -/// -/// Additional information codes regarding exceptions, special considerations, -/// the condition, situation, prior or concurrent issues. -/// -/// ## Requirements -/// Typically these information codes are required to support the services -/// rendered or the adjudication of the services rendered. -/// -/// ## Implementation Notes -/// Often there are multiple jurisdiction specific valuesets which are required. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "timing,value")] -pub struct ExplanationOfBenefitSupportingInfo { - /// Unique id for inter-element referencing + pub contact: Option>, + /// Natural language description of the evidence variable /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// A free text natural language description of the evidence variable from a + /// consumer's perspective. + /// + /// ## Implementation Notes + /// This description can be used to capture details such as why the evidence + /// variable was built, comments about misuse, instructions for clinical use and + /// interpretation, literature references, examples from the paper world, etc. It + /// is not a rendering of the evidence variable as conveyed in the 'text' field + /// of the resource itself. This item SHOULD be populated unless the information + /// is available from context (e.g. the language of the evidence variable is + /// presumed to be the predominant language in the place the evidence variable + /// was created). /// /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Special Semantics + /// - Included in summary /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Used for footnotes or explanatory notes + /// + /// A human-readable string to clarify or explain concepts about the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + pub note: Option>, + /// The context that the content is intended to support /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// The content was developed with a focus and intent of supporting the contexts + /// that are listed. These contexts may be general categories (gender, age, ...) + /// or may be references to specific programs (insurance plans, studies, ...) and + /// may be used to assist with indexing and searching for appropriate evidence + /// variable instances. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Assist in searching for appropriate content. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// When multiple useContexts are specified, there is no expectation that all or + /// any of the contexts apply. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + #[fhir_serde(rename = "useContext")] + pub use_context: Option>, + /// Intended jurisdiction for evidence variable (if applicable) /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Information instance identifier + /// A legal or geographic region in which the evidence variable is intended to be + /// used. /// - /// A number to uniquely identify supporting information entries. + /// ## Implementation Notes + /// It may be possible for the evidence variable to be used in jurisdictions + /// other than those for which it was originally designed or intended. /// - /// ## Requirements - /// Necessary to maintain the order of the supporting information items and - /// provide a mechanism to link to claim details. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Required (1..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Classification of the supplied information /// - /// The general class of the information supplied: information; exception; - /// accident, employment; onset, etc. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Countries and regions within which this artifact is targeted for use. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction + pub jurisdiction: Option>, + /// Use and/or publishing restrictions /// - /// ## Requirements - /// Required to group or associate information items with common characteristics. - /// For example: admission information or prior treatments. + /// A copyright statement relating to the evidence variable and/or its contents. + /// Copyright statements are generally legal restrictions on the use and + /// publishing of the evidence variable. /// - /// ## Implementation Notes - /// This may contain a category for the local bill type codes. + /// ## Requirements + /// Consumers must be able to determine any legal restrictions on the use of the + /// evidence variable and/or its content. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The valuset used for additional information category codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-informationcategory - pub category: CodeableConcept, - /// Type of information - /// - /// System and code pertaining to the specific information regarding special - /// conditions relating to the setting, treatment or patient for which care is - /// sought. + /// ## Aliases + /// License, Restrictions + pub copyright: Option, + /// When the evidence variable was approved by publisher /// - /// ## Requirements - /// Required to identify the kind of additional information. + /// The date on which the resource content was approved by the publisher. + /// Approval happens once when the content is officially approved for usage. /// /// ## Implementation Notes - /// This may contain the local bill type codes such as the US UB-04 bill type - /// code. + /// The 'date' element may be more recent than the approval date because of minor + /// changes or editorial corrections. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "approvalDate")] + pub approval_date: Option, + /// When the evidence variable was last reviewed /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The valuset used for additional information codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-exception - pub code: Option, - /// When it occurred + /// The date on which the resource content was last reviewed. Review happens + /// periodically after approval but does not change the original approval date. /// - /// The date when or period to which this information refers. + /// ## Requirements + /// Gives a sense of how "current" the content is. Resources that have not been + /// reviewed in a long time may have a risk of being less appropriate/relevant. + /// + /// ## Implementation Notes + /// If specified, this date follows the original approval date. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub timing: Option, - /// Data to be provided + #[fhir_serde(rename = "lastReviewDate")] + pub last_review_date: Option, + /// When the evidence variable is expected to be used /// - /// Additional data or information such as resources, documents, images etc. - /// including references to the data or the actual inclusion of the data. + /// The period during which the evidence variable content was or is planned to be + /// in active use. /// /// ## Requirements - /// To convey the data content to be provided when the information is more than a - /// simple code or period. + /// Allows establishing a transition before a resource comes into effect and also + /// allows for a sunsetting process when new versions of the evidence variable + /// are or are expected to be used instead. /// /// ## Implementation Notes - /// Could be used to provide references to other resources, document. For - /// example, could contain a PDF in an Attachment of the Police Report for an - /// Accident. + /// The effective period for a evidence variable determines when the content is + /// applicable for usage and is independent of publication and review dates. For + /// example, a measure intended to be used for the year 2016 might be published + /// in 2015. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub value: Option, - /// Explanation for the information + #[fhir_serde(rename = "effectivePeriod")] + pub effective_period: Option, + /// The category of the EvidenceVariable, such as Education, Treatment, Assessment, etc. /// - /// Provides the reason in the situation where a reason code is required in - /// addition to the content. + /// Descriptive topics related to the content of the EvidenceVariable. Topics + /// provide a high-level categorization grouping types of EvidenceVariables that + /// can be useful for filtering and searching. /// /// ## Requirements - /// Needed when the supporting information has both a date and amount/value and - /// requires explanation. - /// - /// ## Implementation Notes - /// For example: the reason for the additional stay, or why a tooth is missing. + /// Repositories must be able to determine how to categorize the EvidenceVariable + /// so that it can be found by topical searches. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -60627,203 +60663,178 @@ pub struct ExplanationOfBenefitSupportingInfo { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Reason codes for the missing teeth. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/missing-tooth-reason - pub reason: Option, -} - -/// Note concerning adjudication -/// -/// A note that describes or explains adjudication results in a human readable -/// form. -/// -/// ## Requirements -/// Provides the insurer specific textual explanations associated with the -/// processing. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitProcessNote { - /// Unique id for inter-element referencing + /// - **Description**: High-level categorization of the definition, used for searching, sorting, and filtering. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/definition-topic + pub topic: Option>, + /// Who authored the content /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// An individiual or organization primarily involved in the creation and + /// maintenance of the content. /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + /// ## Cardinality: Optional, Multiple (0..*) /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub author: Option>, + /// Who edited the content /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// An individual or organization primarily responsible for internal coherence of + /// the content. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + pub editor: Option>, + /// Who reviewed the content /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + /// An individual or organization primarily responsible for review of some aspect + /// of the content. /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub reviewer: Option>, + /// Who endorsed the content /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// An individual or organization responsible for officially endorsing the + /// content for use in some setting. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Note instance identifier + pub endorser: Option>, + /// Additional documentation, citations, etc. /// - /// A number to uniquely identify a note entry. + /// Related artifacts such as additional documentation, justification, or + /// bibliographic references. /// /// ## Requirements - /// Necessary to provide a mechanism to link from adjudications. + /// EvidenceVariables must be able to provide enough information for consumers of + /// the content (and/or interventions or results produced by the content) to be + /// able to determine and understand the justification for and evidence in + /// support of the content. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Each related artifact is either an attachment, or a reference to another + /// resource, but not both. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub number: Option, - /// display | print | printoper - /// - /// The business purpose of the note text. + #[fhir_serde(rename = "relatedArtifact")] + pub related_artifact: Option>, + /// dichotomous | continuous | descriptive /// - /// ## Requirements - /// To convey the expectation for when the text is used. + /// The type of evidence element, a population, an exposure, or an outcome. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: required - /// - **Description**: The presentation types of notes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/note-type|4.0.1 + /// - **Description**: The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/variable-type|4.0.1 #[fhir_serde(rename = "type")] pub r#type: Option, - /// Note explanatory text - /// - /// The explanation or description associated with the processing. - /// - /// ## Requirements - /// Required to provide human readable explanation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub text: Option, - /// Language of the text - /// - /// A code to define the language used in the text of the note. + /// What defines the members of the evidence element /// - /// ## Requirements - /// Note text may vary from the resource defined language. + /// A characteristic that defines the members of the evidence element. Multiple + /// characteristics are applied with "and" semantics. /// /// ## Implementation Notes - /// Only required if the language is different from the resource language. + /// Characteristics can be defined flexibly to accommodate different use cases + /// for membership criteria, ranging from simple codes, all the way to using an + /// expression language to express the criteria. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, + pub characteristic: Option>, } -/// Choice of types for the diagnosis\[x\] field in ExplanationOfBenefitDiagnosis +/// Choice of types for the definition\[x\] field in EvidenceVariableCharacteristic #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "diagnosis")] -pub enum ExplanationOfBenefitDiagnosisDiagnosis { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "diagnosisCodeableConcept")] - CodeableConcept(CodeableConcept), +#[fhir_choice_element(base_name = "definition")] +pub enum EvidenceVariableCharacteristicDefinition { /// Variant accepting the Reference type. - #[fhir_serde(rename = "diagnosisReference")] + #[fhir_serde(rename = "definitionReference")] Reference(Reference), + /// Variant accepting the Canonical type. + #[fhir_serde(rename = "definitionCanonical")] + Canonical(Canonical), + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "definitionCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Expression type. + #[fhir_serde(rename = "definitionExpression")] + Expression(Expression), + /// Variant accepting the DataRequirement type. + #[fhir_serde(rename = "definitionDataRequirement")] + DataRequirement(DataRequirement), + /// Variant accepting the TriggerDefinition type. + #[fhir_serde(rename = "definitionTriggerDefinition")] + TriggerDefinition(TriggerDefinition), } -/// Pertinent diagnosis information +/// Choice of types for the participantEffective\[x\] field in EvidenceVariableCharacteristic +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "participantEffective")] +pub enum EvidenceVariableCharacteristicParticipantEffective { + /// Variant accepting the DateTime type. + #[fhir_serde(rename = "participantEffectiveDateTime")] + DateTime(DateTime), + /// Variant accepting the Period type. + #[fhir_serde(rename = "participantEffectivePeriod")] + Period(Period), + /// Variant accepting the Duration type. + #[fhir_serde(rename = "participantEffectiveDuration")] + Duration(Duration), + /// Variant accepting the Timing type. + #[fhir_serde(rename = "participantEffectiveTiming")] + Timing(Timing), +} + +/// What defines the members of the evidence element /// -/// Information about diagnoses relevant to the claim items. +/// A characteristic that defines the members of the evidence element. Multiple +/// characteristics are applied with "and" semantics. /// -/// ## Requirements -/// Required for the adjudication by provided context for the services and -/// product listed. +/// ## Implementation Notes +/// Characteristics can be defined flexibly to accommodate different use cases +/// for membership criteria, ranging from simple codes, all the way to using an +/// expression language to express the criteria. /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Cardinality: Required, Multiple (1..*) +/// +/// ## Special Semantics +/// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "diagnosis")] -pub struct ExplanationOfBenefitDiagnosis { +#[fhir_resource(choice_elements = "definition,participantEffective")] +pub struct EvidenceVariableCharacteristic { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -60904,104 +60915,98 @@ pub struct ExplanationOfBenefitDiagnosis { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Diagnosis instance identifier + /// Natural language description of the characteristic /// - /// A number to uniquely identify diagnosis entries. + /// A short, natural language description of the characteristic that could be + /// used to communicate the criteria to an end-user. /// /// ## Requirements - /// Necessary to maintain the order of the diagnosis items and provide a - /// mechanism to link to claim details. - /// - /// ## Implementation Notes - /// Diagnosis are presented in list order to their expected importance: primary, - /// secondary, etc. + /// Need to be able to describe characteristics in natural language so that end + /// users can understand the criteria. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Nature of illness or problem + pub description: Option, + /// What code or expression defines members? /// - /// The nature of illness or problem in a coded form or as a reference to an - /// external defined Condition. + /// Define members of the evidence element using Codes (such as condition, + /// medication, or observation), Expressions ( using an expression language such + /// as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in + /// the last year). /// /// ## Requirements - /// Provides health context for the evaluation of the products and/or services. + /// Need to be able to define members in simple codes when the membership aligns + /// well with terminology, with common criteria such as observations in a value + /// set or lab tests within a year, or with expression language to support + /// criteria that do not fit in the above. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: ICD10 Diagnostic codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 #[fhir_serde(flatten)] - pub diagnosis: Option, - /// Timing or nature of the diagnosis + pub definition: Option, + /// What code/value pairs define members? /// - /// When the condition was observed or the relative ranking. + /// Use UsageContext to define the members of the population, such as Age Ranges, + /// Genders, Settings. /// /// ## Requirements - /// Often required to capture a particular diagnosis, for example: primary or - /// discharge. - /// - /// ## Implementation Notes - /// For example: admitting, primary, secondary, discharge. + /// Need to be able to define members more structurally when more information can + /// be communicated such as age range. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "usageContext")] + pub usage_context: Option>, + /// Whether the characteristic includes or excludes members /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The type of the diagnosis: admitting, principal, discharge. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosistype - #[fhir_serde(rename = "type")] - pub r#type: Option>, - /// Present on admission + /// When true, members with this characteristic are excluded from the element. /// - /// Indication of whether the diagnosis was present on admission to a facility. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Many systems need to understand for adjudication if the diagnosis was present - /// a time of admission. + /// ## Special Semantics + /// - When missing: False + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub exclude: Option, + /// What time period do participants cover + /// + /// Indicates what effective period the study covers. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub participant_effective: Option, + /// Observation time from study start /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Present on admission. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission - #[fhir_serde(rename = "onAdmission")] - pub on_admission: Option, - /// Package billing code + /// Indicates duration from the participant's study entry. /// - /// A package billing code or bundle code used to group products and services to - /// a particular health condition (such as heart attack) which is based on a - /// predetermined grouping code system. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Required to relate the current diagnosis to a package billing code that is - /// then referenced on the individual claim items which are specific to the - /// health condition covered by the package code. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "timeFromStart")] + pub time_from_start: Option, + /// mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median /// - /// ## Implementation Notes - /// For example, DRG (Diagnosis Related Group) or a bundled billing code. A - /// patient may have a diagnosis of a Myocardio-infarction and a DRG for - /// HeartAttack would assigned. The Claim item (and possible subsequent claims) - /// would refer to the DRG for those line items that were for services related to - /// the heart attack event. + /// Indicates how elements are aggregated within the study effective period. /// /// ## Cardinality: Optional (0..1) /// @@ -61010,222 +61015,160 @@ pub struct ExplanationOfBenefitDiagnosis { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: The DRG codes associated with the diagnosis. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - #[fhir_serde(rename = "packageCode")] - pub package_code: Option, + /// - **Strength**: required + /// - **Description**: Possible group measure aggregates (E.g. Mean, Median). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/group-measure|4.0.1 + #[fhir_serde(rename = "groupMeasure")] + pub group_measure: Option, } -/// Care Team members +/// FHIR ExampleScenario type /// -/// The members of the team who provided the products and services. +/// Example of workflow instance. /// -/// ## Requirements -/// Common to identify the responsible and supporting practitioners. +/// ## Type: Resource type +/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource /// -/// ## Cardinality: Optional, Multiple (0..*) +/// ## Status: draft +/// FHIR Version: 4.0.1 /// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` +/// See: [ExampleScenario](http://hl7.org/fhir/StructureDefinition/ExampleScenario) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitCareTeam { - /// Unique id for inter-element referencing +pub struct ExampleScenario { + /// Logical id of this artifact /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// The logical id of the resource, as used in the URL for the resource. Once + /// assigned, this value never changes. + /// + /// ## Implementation Notes + /// The only time that a resource does not have an id is when it is being + /// submitted to the server using a create operation. /// /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary pub id: Option, - /// Additional content defined by implementations + /// Metadata about the resource /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// The metadata about the resource. This is content that is maintained by the + /// infrastructure. Changes to the content might not always be associated with + /// version changes to the resource. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Cardinality: Optional (0..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. - /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + pub meta: Option, + /// A set of rules under which this content was created /// - /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// A reference to a set of rules that were followed when the resource was + /// constructed, and which must be understood when processing the content. Often, + /// this is a reference to an implementation guide that defines the special rules + /// along with other profiles etc. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Asserting this rule set restricts the content to be only understood by a + /// limited set of trading partners. This inherently limits the usefulness of the + /// data in the long term. However, the existing health eco-system is highly + /// fractured, and not yet ready to define, collect, and exchange data in a + /// generally computable sense. Wherever possible, implementers and/or + /// specification writers should avoid using this element. Often, when used, the + /// URL is a reference to an implementation guide that defines these special + /// rules as part of it's narrative along with other profiles, value sets, etc. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Order of care team + #[fhir_serde(rename = "implicitRules")] + pub implicit_rules: Option, + /// Language of the resource content /// - /// A number to uniquely identify care team entries. + /// The base language in which the resource is written. /// - /// ## Requirements - /// Necessary to maintain the order of the care team and provide a mechanism to - /// link individuals to claim details. + /// ## Implementation Notes + /// Language is provided to support indexing and accessibility (typically, + /// services such as text to speech use the language tag). The html language tag + /// in the narrative applies to the narrative. The language tag on the resource + /// may be used to specify the language of other presentations generated from the + /// data in the resource. Not all the content has to be in the base language. The + /// Resource.language should not be assumed to apply to the narrative + /// automatically. If a language is specified, it should it also be specified on + /// the div element in the html (see rules in HTML5 for information about the + /// relationship between xml:lang and the html lang attribute). /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Practitioner or organization /// - /// Member of the team who provided the product or service. + /// ## Binding + /// - **Strength**: preferred + /// - **Description**: A human language. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages + pub language: Option, + /// Text summary of the resource, for human interpretation /// - /// ## Requirements - /// Often a regulatory requirement to specify the responsible provider. + /// A human-readable narrative that contains a summary of the resource and can be + /// used to represent the content of the resource to a human. The narrative need + /// not encode all the structured data, but is required to contain sufficient + /// detail to make it "clinically safe" for a human to just read the narrative. + /// Resource definitions may define what content should be represented in the + /// narrative to ensure clinical safety. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Contained resources do not have narrative. Resources that are not contained + /// SHOULD have a narrative. In some cases, a resource may only have text with + /// little or no additional discrete data (as long as all minOccurs=1 elements + /// are satisfied). This may be necessary for data from legacy systems where + /// information is captured as a "text blob" or where text is additionally + /// entered raw or narrated and encoded information is added later. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Reference, - /// Indicator of the lead practitioner /// - /// The party who is billing and/or responsible for the claimed products or - /// services. - /// - /// ## Requirements - /// When multiple parties are present it is required to distinguish the lead or - /// responsible individual. - /// - /// ## Implementation Notes - /// Responsible might not be required when there is only a single provider - /// listed. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub responsible: Option, - /// Function within the team - /// - /// The lead, assisting or supervising practitioner and their discipline if a - /// multidisciplinary team. + /// ## Aliases + /// narrative, html, xhtml, display + pub text: Option, + /// Contained, inline Resources /// - /// ## Requirements - /// When multiple parties are present it is required to distinguish the roles - /// performed by each member. + /// These resources do not have an independent existence apart from the resource + /// that contains them - they cannot be identified independently, and nor can + /// they have their own independent transaction scope. /// /// ## Implementation Notes - /// Role might not be required when there is only a single provider listed. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The role codes for the care team members. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-careteamrole - pub role: Option, - /// Practitioner credential or specialization - /// - /// The qualification of the practitioner which is applicable for this service. - /// - /// ## Requirements - /// Need to specify which qualification a provider is delivering the product or - /// service under. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Provider professional qualifications. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provider-qualification - pub qualification: Option, -} - -/// Additional items -/// -/// Second-tier of goods and services. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitItemDetail { - /// Unique id for inter-element referencing + /// This should never be done when the content can be identified properly, as + /// once identification is lost, it is extremely difficult (and context + /// dependent) to restore it again. Contained resources may have profiles and + /// tags In their meta elements, but SHALL NOT have security labels. /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) - pub id: Option, + /// ## Aliases + /// inline resources, anonymous resources, contained resources + pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// definition of the resource. To make the use of extensions safe and + /// manageable, there is a strict set of governance applied to the definition and + /// use of extensions. Though any implementer can define an extension, there is a + /// set of requirements that SHALL be met as part of the definition of the + /// extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -61245,16 +61188,16 @@ pub struct ExplanationOfBenefitItemDetail { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized + /// Extensions that cannot be ignored /// /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's + /// definition of the resource and that modifies the understanding of the element + /// that contains it and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications + /// implementer is allowed to define an extension, there is a set of requirements + /// that SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -61279,8 +61222,7 @@ pub struct ExplanationOfBenefitItemDetail { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -61289,282 +61231,379 @@ pub struct ExplanationOfBenefitItemDetail { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content, modifiers + /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Product or service provided + /// Canonical identifier for this example scenario, represented as a URI (globally unique) /// - /// A claim detail line. Either a simple (a product or service) or a 'group' of - /// sub-details which are simple items. + /// An absolute URI that is used to identify this example scenario when it is + /// referenced in a specification, model, design or an instance; also called its + /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal + /// address at which at which an authoritative instance of this example scenario + /// is (or will be) published. This URL can be the target of a canonical + /// reference. It SHALL remain the same when the example scenario is stored on + /// different servers. /// /// ## Requirements - /// The items to be processed for adjudication. + /// Allows the example scenario to be referenced by a single globally unique + /// identifier. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. + /// Multiple instances may share the same URL if they have a distinct version. + /// + /// The determination of when to create a new version of a resource (same url, + /// new version) vs. defining a new artifact is up to the author. Considerations + /// for making this decision are found in [Technical and Business + /// Versions](resource.html#versions). + /// + /// In some cases, the resource can no longer be found at the stated url, but the + /// url itself cannot change. Implementations can use the + /// [meta.source](resource.html#meta) element to indicate where the current + /// master source of the resource can be found. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Revenue or cost center code + pub url: Option, + /// Additional identifier for the example scenario /// - /// The type of revenue or cost center providing the product and/or service. + /// A formal identifier that is used to identify this example scenario when it is + /// represented in other formats, or referenced in a specification, model, design + /// or an instance. /// /// ## Requirements - /// Needed in the processing of institutional claims. + /// Allows externally provided and/or usable business identifiers to be easily + /// associated with the module. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// Typically, this is used for identifiers that can go in an HL7 V3 II (instance + /// identifier) data type, and can then identify this example scenario outside of + /// FHIR, where it is not possible to use the logical URI. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub identifier: Option>, + /// Business version of the example scenario /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center - pub revenue: Option, - /// Benefit classification + /// The identifier that is used to identify this version of the example scenario + /// when it is referenced in a specification, model, design or instance. This is + /// an arbitrary value managed by the example scenario author and is not expected + /// to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) + /// if a managed version is not available. There is also no expectation that + /// versions can be placed in a lexicographical sequence. /// - /// Code to identify the general type of benefits under which products and - /// services are provided. + /// ## Implementation Notes + /// There may be different example scenario instances that have the same + /// identifier but different versions. The version can be appended to the url in + /// a reference to allow a reference to a particular business version of the + /// example scenario with the format [url]|[version]. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub version: Option, + /// Name for this example scenario (computer friendly) + /// + /// A natural language name identifying the example scenario. This name should be + /// usable as an identifier for the module by machine processing applications + /// such as code generation. /// /// ## Requirements - /// Needed in the processing of institutional claims as this allows the insurer - /// to determine whether a facial X-Ray is for dental, orthopedic, or facial - /// surgery purposes. + /// Support human navigation and code generation. /// /// ## Implementation Notes - /// Examples include: Medical Care, Periodontics, Renal Dialysis, Vision - /// Coverage. + /// The name is not expected to be globally unique. The name should be a simple + /// alphanumeric type name to ensure that it is machine-processing friendly. /// /// ## Cardinality: Optional (0..1) /// + /// ## Special Semantics + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. + /// ## Conditions + /// Used when: inv-0 + pub name: Option, + /// draft | active | retired | unknown /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// The status of this example scenario. Enables tracking the life-cycle of the + /// content. /// /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// Allows filtering of example scenarios that are appropriate for use versus + /// not. /// /// ## Cardinality: Required (1..1) /// + /// ## Special Semantics + /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers + /// - **Strength**: required + /// - **Description**: The lifecycle status of an artifact. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 + pub status: Code, + /// For testing purposes, not real usage /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. + /// A Boolean value to indicate that this example scenario is authored for + /// testing purposes (or education/evaluation/marketing) and is not intended to + /// be used for genuine usage. /// /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// Enables experimental content to be developed following the same lifecycle + /// that would be used for a production-level example scenario. /// /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or out of - /// office hours. + /// Allows filtering of example scenarios that are appropriate for use versus + /// not. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub experimental: Option, + /// Date last changed /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under + /// The date (and optionally time) when the example scenario was published. The + /// date must change when the business version changes and it must change if the + /// status code changes. In addition, it should change when the substantive + /// content of the example scenario changes. (e.g. the 'content logical + /// definition'). /// - /// Identifies the program under which this may be recovered. + /// ## Implementation Notes + /// Note that this is not the same as the resource last-modified-date, since the + /// resource may be a secondary representation of the example scenario. + /// Additional specific dates may be added as extensions or be found by + /// consulting Provenances associated with past versions of the resource. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Aliases + /// Revision Date + pub date: Option, + /// Name of the publisher (organization or individual) + /// + /// The name of the organization or individual that published the example + /// scenario. /// /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. + /// Helps establish the "authority/credibility" of the example scenario. May also + /// allow for contact. /// /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. + /// Usually an organization but may be an individual. The publisher (or steward) + /// of the example scenario is the organization or individual primarily + /// responsible for the maintenance and upkeep of the example scenario. This is + /// not necessarily the same individual or organization that developed and + /// initially authored the content. The publisher is the primary point of contact + /// for questions or issues with the example scenario. This item SHOULD be + /// populated unless the information is available from context. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub publisher: Option, + /// Contact details for the publisher /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Count of products or services + /// Contact details to assist a user in finding and communicating with the + /// publisher. /// - /// The number of repetitions of a service or product. + /// ## Implementation Notes + /// May be a web site, an email address, a telephone number, etc. /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item + pub contact: Option>, + /// The context that the content is intended to support /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + /// The content was developed with a focus and intent of supporting the contexts + /// that are listed. These contexts may be general categories (gender, age, ...) + /// or may be references to specific programs (insurance plans, studies, ...) and + /// may be used to assist with indexing and searching for appropriate example + /// scenario instances. /// /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// Assist in searching for appropriate content. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// When multiple useContexts are specified, there is no expectation that all or + /// any of the contexts apply. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor + #[fhir_serde(rename = "useContext")] + pub use_context: Option>, + /// Intended jurisdiction for example scenario (if applicable) /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + /// A legal or geographic region in which the example scenario is intended to be + /// used. + /// + /// ## Implementation Notes + /// It may be possible for the example scenario to be used in jurisdictions other + /// than those for which it was originally designed or intended. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Countries and regions within which this artifact is targeted for use. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction + pub jurisdiction: Option>, + /// Use and/or publishing restrictions + /// + /// A copyright statement relating to the example scenario and/or its contents. + /// Copyright statements are generally legal restrictions on the use and + /// publishing of the example scenario. /// /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// Consumers must be able to determine any legal restrictions on the use of the + /// example scenario and/or its content. /// /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// nullFrequently, the copyright differs between the value set and the codes + /// that are included. The copyright statement should clearly differentiate + /// between these when required. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost /// - /// The quantity times the unit price for an additional service or product or - /// charge. + /// ## Aliases + /// License, Restrictions + pub copyright: Option, + /// The purpose of the example, e.g. to illustrate a scenario /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + /// What the example scenario resource is created for. This should not be used to + /// show the business purpose of the scenario itself, but the purpose of + /// documenting a scenario. /// /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// This element does not describe the usage of the example scenario. Instead, it + /// provides traceability of ''why'' the resource is either needed or ''why'' it + /// is defined as it is. This may be used to point to source materials or + /// specifications that drove the structure of this example scenario. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Unique device identifier - /// - /// Unique Device Identifiers associated with this line item. + pub purpose: Option, + /// Actor participating in the resource /// - /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. + /// Actor participating in the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, - /// Applicable note numbers - /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + pub actor: Option>, + /// Each resource and each version that is present in the workflow /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// Each resource and each version that is present in the workflow. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Detail level adjudication details + pub instance: Option>, + /// Each major process - a group of operations /// - /// The adjudication results. + /// Each major process - a group of operations. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Additional items + pub process: Option>, + /// Another nested workflow /// - /// Third-tier of goods and services. + /// Another nested workflow. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetail")] - pub sub_detail: Option>, + pub workflow: Option>, } -/// Payment Details -/// -/// Payment details for the adjudication of the claim. +/// Actor participating in the resource /// -/// ## Requirements -/// Needed to convey references to the financial instrument that has been used if -/// payment has been made. +/// Actor participating in the resource. /// -/// ## Cardinality: Optional (0..1) +/// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitPayment { +pub struct ExampleScenarioActor { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -61645,112 +61684,67 @@ pub struct ExplanationOfBenefitPayment { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Partial or complete payment - /// - /// Whether this represents partial or complete payment of the benefits payable. - /// - /// ## Requirements - /// To advise the requestor when the insurer believes all payments to have been - /// completed. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The type (partial, complete) of the payment. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-paymenttype - #[fhir_serde(rename = "type")] - pub r#type: Option, - /// Payment adjustment for non-claim issues - /// - /// Total amount of all adjustments to this payment included in this transaction - /// which are not related to this claim's adjudication. + /// ID or acronym of the actor /// - /// ## Requirements - /// To advise the requestor of adjustments applied to the payment. + /// ID or acronym of actor. /// /// ## Implementation Notes - /// Insurers will deduct amounts owing from the provider (adjustment), such as a - /// prior overpayment, from the amount owing to the provider (benefits payable) - /// when payment is made to the provider. + /// should this be called ID or acronym? /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjustment: Option, - /// Explanation for the variance - /// - /// Reason for the payment adjustment. + #[fhir_serde(rename = "actorId")] + pub actor_id: String, + /// person | entity /// - /// ## Requirements - /// Needed to clarify the monetary adjustment. + /// The type of actor - person or system. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Payment Adjustment reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - #[fhir_serde(rename = "adjustmentReason")] - pub adjustment_reason: Option, - /// Expected date of payment - /// - /// Estimated date the payment will be issued or the actual issue date of - /// payment. - /// - /// ## Requirements - /// To advise the payee when payment can be expected. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// Payable amount after adjustment + /// - **Strength**: required + /// - **Description**: The type of actor - system or human. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/examplescenario-actor-type|4.0.1 + #[fhir_serde(rename = "type")] + pub r#type: Code, + /// The name of the actor as shown in the page /// - /// Benefits payable less any payment adjustment. + /// The name of the actor as shown in the page. /// - /// ## Requirements - /// Needed to provide the actual payment amount. + /// ## Implementation Notes + /// Cardinality: is name and description 1..1? /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Option, - /// Business identifier for the payment - /// - /// Issuer's unique identifier for the payment instrument. + pub name: Option, + /// The description of the actor /// - /// ## Requirements - /// Enable the receiver to reconcile when payment received. + /// The description of the actor. /// /// ## Implementation Notes - /// For example: EFT number or check number. + /// Cardinality: is name and description 1..1? /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option, + pub description: Option, } -/// Additional items +/// Each resource and each version that is present in the workflow /// -/// Third-tier of goods and services. +/// Each resource and each version that is present in the workflow. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -61758,7 +61752,7 @@ pub struct ExplanationOfBenefitPayment { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitItemDetailSubDetail { +pub struct ExampleScenarioInstance { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -61839,77 +61833,20 @@ pub struct ExplanationOfBenefitItemDetailSubDetail { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Product or service provided - /// - /// A claim detail line. Either a simple (a product or service) or a 'group' of - /// sub-details which are simple items. + /// The id of the resource for referencing /// - /// ## Requirements - /// The items to be processed for adjudication. + /// The id of the resource for referencing. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub sequence: PositiveInt, - /// Revenue or cost center code - /// - /// The type of revenue or cost center providing the product and/or service. - /// - /// ## Requirements - /// Needed in the processing of institutional claims. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center - pub revenue: Option, - /// Benefit classification - /// - /// Code to identify the general type of benefits under which products and - /// services are provided. - /// - /// ## Requirements - /// Needed in the processing of institutional claims as this allows the insurer - /// to determine whether a facial X-Ray is for dental, orthopedic, or facial - /// surgery purposes. - /// - /// ## Implementation Notes - /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory - pub category: Option, - /// Billing, service, product, or drug code - /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. - /// - /// ## Requirements - /// Necessary to state what was provided or done. + #[fhir_serde(rename = "resourceId")] + pub resource_id: String, + /// The type of the resource /// - /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// The type of the resource. /// /// ## Cardinality: Required (1..1) /// @@ -61918,184 +61855,59 @@ pub struct ExplanationOfBenefitItemDetailSubDetail { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls - /// - /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers - /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. - /// - /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. - /// - /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or outside - /// of office hours. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under - /// - /// Identifies the program under which this may be recovered. - /// - /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. - /// - /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Count of products or services - /// - /// The number of repetitions of a service or product. - /// - /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item - /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. - /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor - /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. - /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// - **Strength**: required + /// - **Description**: The type of resource. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-types|4.0.1 + #[fhir_serde(rename = "resourceType")] + pub resource_type: Code, + /// A short name for the resource instance /// - /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// A short name for the resource instance. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost - /// - /// The quantity times the unit price for an additional service or product or - /// charge. - /// - /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + pub name: Option, + /// Human-friendly description of the resource instance /// - /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// Human-friendly description of the resource instance. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Unique device identifier - /// - /// Unique Device Identifiers associated with this line item. - /// - /// ## Requirements - /// The UDI code allows the insurer to obtain device level information on the - /// product supplied. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub udi: Option>, - /// Applicable note numbers - /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + pub description: Option, + /// A specific version of the resource /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// A specific version of the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Subdetail level adjudication details + pub version: Option>, + /// Resources contained in the instance /// - /// The adjudication results. + /// Resources contained in the instance (e.g. the observations contained in a + /// bundle). /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, + #[fhir_serde(rename = "containedInstance")] + pub contained_instance: Option>, } -/// Prior or corollary claims -/// -/// Other claims which are related to this claim such as prior submissions or -/// claims for related services or for the same event. -/// -/// ## Requirements -/// For workplace or other accidents it is common to relate separate claims -/// arising from the same event. +/// Resources contained in the instance /// -/// ## Implementation Notes -/// For example, for the original treatment and follow-up exams. +/// Resources contained in the instance (e.g. the observations contained in a +/// bundle). /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -62103,7 +61915,7 @@ pub struct ExplanationOfBenefitItemDetailSubDetail { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitRelated { +pub struct ExampleScenarioInstanceContainedInstance { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -62184,83 +61996,41 @@ pub struct ExplanationOfBenefitRelated { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Reference to the related claim - /// - /// Reference to a related claim. - /// - /// ## Requirements - /// For workplace or other accidents it is common to relate separate claims - /// arising from the same event. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub claim: Option, - /// How the reference claim is related - /// - /// A code to convey how the claims are related. - /// - /// ## Requirements - /// Some insurers need a declaration of the type of relationship. + /// Each resource contained in the instance /// - /// ## Implementation Notes - /// For example, prior claim or umbrella. + /// Each resource contained in the instance. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "resourceId")] + pub resource_id: String, + /// A specific version of a resource contained in the instance /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Relationship of this claim to a related Claim. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/related-claim-relationship - pub relationship: Option, - /// File or case reference - /// - /// An alternate organizational reference to the case or file to which this - /// particular claim pertains. - /// - /// ## Requirements - /// In cases where an event-triggered claim is being submitted to an insurer - /// which requires a reference number to be specified on all exchanges. - /// - /// ## Implementation Notes - /// For example, Property/Casualty insurer claim number or Workers Compensation - /// case number. + /// A specific version of a resource contained in the instance. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub reference: Option, + #[fhir_serde(rename = "versionId")] + pub version_id: Option, } -/// Adjudication totals -/// -/// Categorized monetary totals for the adjudication. -/// -/// ## Requirements -/// To provide the requestor with financial totals by category for the -/// adjudication. +/// A specific version of the resource /// -/// ## Implementation Notes -/// Totals for amounts submitted, co-pays, benefits payable etc. +/// A specific version of the resource. /// /// ## Cardinality: Optional, Multiple (0..*) /// -/// ## Special Semantics -/// - Included in summary -/// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct ExplanationOfBenefitTotal { +pub struct ExampleScenarioInstanceVersion { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -62341,92 +62111,32 @@ pub struct ExplanationOfBenefitTotal { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of adjudication information - /// - /// A code to indicate the information type of this adjudication record. - /// Information types may include: the value submitted, maximum values or - /// percentages allowed or payable under the plan, amounts that the patient is - /// responsible for in aggregate or pertaining to this item, amounts paid by - /// other coverages, and the benefit payable for this item. - /// - /// ## Requirements - /// Needed to convey the type of total provided. + /// The identifier of a specific version of a resource /// - /// ## Implementation Notes - /// For example, codes indicating: Co-Pay, deductible, eligible, benefit, tax, - /// etc. + /// The identifier of a specific version of a resource. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "versionId")] + pub version_id: String, + /// The description of the resource version /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The adjudication codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication - pub category: CodeableConcept, - /// Financial total for the category - /// - /// Monetary total amount associated with the category. - /// - /// ## Requirements - /// Needed to convey the total monetary amount. + /// The description of the resource version. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub amount: Money, -} - -/// Choice of types for the serviced\[x\] field in ExplanationOfBenefitAddItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "serviced")] -pub enum ExplanationOfBenefitAddItemServiced { - /// Variant accepting the Date type. - #[fhir_serde(rename = "servicedDate")] - Date(Date), - /// Variant accepting the Period type. - #[fhir_serde(rename = "servicedPeriod")] - Period(Period), -} - -/// Choice of types for the location\[x\] field in ExplanationOfBenefitAddItem -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "location")] -pub enum ExplanationOfBenefitAddItemLocation { - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "locationCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the Address type. - #[fhir_serde(rename = "locationAddress")] - Address(Address), - /// Variant accepting the Reference type. - #[fhir_serde(rename = "locationReference")] - Reference(Reference), + pub description: Markdown, } -/// Insurer added line items -/// -/// The first-tier service adjudications for payor added product or service -/// lines. +/// Each major process - a group of operations /// -/// ## Requirements -/// Insurers may redefine the provided product or service or may package and/or -/// decompose groups of products and services. The addItems allows the insurer to -/// provide their line item list with linkage to the submitted -/// items/details/sub-details. In a preauthorization the insurer may use the -/// addItem structure to provide additional information on authorized products -/// and services. +/// Each major process - a group of operations. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -62434,8 +62144,7 @@ pub enum ExplanationOfBenefitAddItemLocation { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "serviced,location")] -pub struct ExplanationOfBenefitAddItem { +pub struct ExampleScenarioProcess { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -62516,383 +62225,524 @@ pub struct ExplanationOfBenefitAddItem { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Item sequence number + /// The diagram title of the group of operations /// - /// Claim items which this service line is intended to replace. + /// The diagram title of the group of operations. /// - /// ## Requirements - /// Provides references to the claim items. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "itemSequence")] - pub item_sequence: Option>, - /// Detail sequence number - /// - /// The sequence number of the details within the claim item which this line is - /// intended to replace. + pub title: String, + /// A longer description of the group of operations /// - /// ## Requirements - /// Provides references to the claim details within the claim item. + /// A longer description of the group of operations. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "detailSequence")] - pub detail_sequence: Option>, - /// Subdetail sequence number - /// - /// The sequence number of the sub-details woithin the details within the claim - /// item which this line is intended to replace. + pub description: Option, + /// Description of initial status before the process starts /// - /// ## Requirements - /// Provides references to the claim sub-details within the claim detail. + /// Description of initial status before the process starts. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "subDetailSequence")] - pub sub_detail_sequence: Option>, - /// Authorized providers - /// - /// The providers who are authorized for the services rendered to the patient. + #[fhir_serde(rename = "preConditions")] + pub pre_conditions: Option, + /// Description of final status after the process ends /// - /// ## Requirements - /// Insurer may provide authorization specifically to a restricted set of - /// providers rather than an open authorization. + /// Description of final status after the process ends. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub provider: Option>, - /// Billing, service, product, or drug code + #[fhir_serde(rename = "postConditions")] + pub post_conditions: Option, + /// Each step of the process /// - /// When the value is a group code then this item collects a set of related claim - /// details, otherwise this contains the product, service, drug or other billing - /// code for the item. + /// Each step of the process. /// - /// ## Requirements - /// Necessary to state what was provided or done. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub step: Option>, +} + +/// Each step of the process +/// +/// Each step of the process. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ExampleScenarioProcessStep { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes - /// If this is an actual service or product line, i.e. not a Group, then use code - /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, - /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a - /// group code to indicate the type of thing being grouped e.g. 'glasses' or - /// 'compound'. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Allowable service and product codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// Drug Code, Bill Code, Service Code - #[fhir_serde(rename = "productOrService")] - pub product_or_service: CodeableConcept, - /// Service/Product billing modifiers + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// Item typification or modifiers codes to convey additional context for the - /// product or service. + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// To support inclusion of the item for adjudication or to charge an elevated - /// fee. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example, in Oral whether the treatment is cosmetic or associated with - /// TMJ, or for Medical whether the treatment was outside the clinic or out of - /// office hours. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// /// ## Cardinality: Optional, Multiple (0..*) /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers - pub modifier: Option>, - /// Program the product or service is provided under - /// - /// Identifies the program under which this may be recovered. - /// - /// ## Requirements - /// Commonly used in in the identification of publicly provided program focused - /// on population segments or disease classifications. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Nested process /// - /// ## Implementation Notes - /// For example: Neonatal program, child dental program or drug users recovery - /// program. + /// Nested process. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub process: Option>, + /// If there is a pause in the flow /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Program specific reason codes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code - #[fhir_serde(rename = "programCode")] - pub program_code: Option>, - /// Date or dates of service or product delivery + /// If there is a pause in the flow. /// - /// The date or dates when the service or product was supplied, performed or - /// completed. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Needed to determine whether the service or product was provided during the - /// term of the insurance coverage. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub pause: Option, + /// Each interaction or action + /// + /// Each interaction or action. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub serviced: Option, - /// Place of service or where product was supplied + pub operation: Option, + /// Alternate non-typical step action /// - /// Where the product or service was provided. + /// Indicates an alternative step that can be taken instead of the operations on + /// the base step in exceptional/atypical circumstances. /// - /// ## Requirements - /// The location can alter whether the item was acceptable for insurance purposes - /// or impact the determination of the benefit amount. + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub alternative: Option>, +} + +/// Alternate non-typical step action +/// +/// Indicates an alternative step that can be taken instead of the operations on +/// the base step in exceptional/atypical circumstances. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ExampleScenarioProcessStepAlternative { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Place where the service is rendered. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place - #[fhir_serde(flatten)] - pub location: Option, - /// Count of products or services + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized /// - /// The number of repetitions of a service or product. + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Required when the product or service code does not convey the quantity - /// provided. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Fee, charge or cost per item + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// If the item is not a group then this is the fee for the product or service, - /// otherwise this is the total of the fees for the details of the group. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Label for alternative /// - /// ## Requirements - /// The amount charged to the patient by the provider for a single unit. + /// The label to display for the alternative that gives a sense of the + /// circumstance in which the alternative should be invoked. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub title: String, + /// A human-readable description of each option + /// + /// A human-readable description of the alternative explaining when the + /// alternative should occur rather than the base step. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "unitPrice")] - pub unit_price: Option, - /// Price scaling factor + pub description: Option, + /// What happens in each alternative option /// - /// A real number that represents a multiplier used in determining the overall - /// value of services delivered and/or goods received. The concept of a Factor - /// allows for a discount or surcharge multiplier to be applied to a monetary - /// amount. + /// What happens in each alternative option. /// - /// ## Requirements - /// When discounts are provided to a patient (example: Senior's discount) then - /// this must be documented for adjudication. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub step: Option>, +} + +/// Each interaction or action +/// +/// Each interaction or action. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ExampleScenarioProcessStepOperation { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) + pub id: Option, + /// Additional content defined by implementations + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. + /// + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub factor: Option, - /// Total item cost + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The quantity times the unit price for an additional service or product or - /// charge. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). /// /// ## Requirements - /// Provides the total amount claimed for the group (if a grouper) or the line - /// item. + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// For example, the formula: quantity * unitPrice * factor = net. Quantity and - /// factor are assumed to be 1 if not supplied. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Special Semantics + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` + /// + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// The sequential number of the interaction + /// + /// The sequential number of the interaction, e.g. 1.2.5. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub number: String, + /// The type of operation - CRUD + /// + /// The type of operation - CRUD. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub net: Option, - /// Anatomical location + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// The human-friendly name of the interaction /// - /// Physical service site on the patient (limb, tooth, etc.). + /// The human-friendly name of the interaction. /// - /// ## Requirements - /// Allows insurer to validate specific procedures. + /// ## Cardinality: Optional (0..1) /// - /// ## Implementation Notes - /// For example, providing a tooth code allows an insurer to identify a provider - /// performing a filling on a tooth that was previously removed. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub name: Option, + /// Who starts the transaction + /// + /// Who starts the transaction. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub initiator: Option, + /// Who receives the transaction /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the teeth, quadrant, sextant and arch. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth - #[fhir_serde(rename = "bodySite")] - pub body_site: Option, - /// Anatomical sub-location + /// Who receives the transaction. /// - /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Allows insurer to validate specific procedures. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub receiver: Option, + /// A comment to be inserted in the diagram /// - /// ## Cardinality: Optional, Multiple (0..*) + /// A comment to be inserted in the diagram. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub description: Option, + /// Whether the initiator is deactivated right after the transaction /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The code for the tooth surface and surface combinations. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface - #[fhir_serde(rename = "subSite")] - pub sub_site: Option>, - /// Applicable note numbers + /// Whether the initiator is deactivated right after the transaction. /// - /// The numbers associated with notes below which apply to the adjudication of - /// this item. + /// ## Cardinality: Optional (0..1) /// - /// ## Requirements - /// Provides a condensed manner for associating human readable descriptive - /// explanations for adjudications on the line item. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "initiatorActive")] + pub initiator_active: Option, + /// Whether the receiver is deactivated right after the transaction /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Whether the receiver is deactivated right after the transaction. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "noteNumber")] - pub note_number: Option>, - /// Added items adjudication + #[fhir_serde(rename = "receiverActive")] + pub receiver_active: Option, + /// Each resource instance used by the initiator /// - /// The adjudication results. + /// Each resource instance used by the initiator. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub adjudication: Option>, - /// Insurer added line items + pub request: Option, + /// Each resource instance used by the responder /// - /// The second-tier service adjudications for payor added services. + /// Each resource instance used by the responder. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub detail: Option>, -} - -/// Choice of types for the born\[x\] field in FamilyMemberHistory -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "born")] -pub enum FamilyMemberHistoryBorn { - /// Variant accepting the Period type. - #[fhir_serde(rename = "bornPeriod")] - Period(Period), - /// Variant accepting the Date type. - #[fhir_serde(rename = "bornDate")] - Date(Date), - /// Variant accepting the String type. - #[fhir_serde(rename = "bornString")] - String(String), -} - -/// Choice of types for the age\[x\] field in FamilyMemberHistory -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "age")] -pub enum FamilyMemberHistoryAge { - /// Variant accepting the Age type. - #[fhir_serde(rename = "ageAge")] - Age(Age), - /// Variant accepting the Range type. - #[fhir_serde(rename = "ageRange")] - Range(Range), - /// Variant accepting the String type. - #[fhir_serde(rename = "ageString")] - String(String), -} - -/// Choice of types for the deceased\[x\] field in FamilyMemberHistory -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "deceased")] -pub enum FamilyMemberHistoryDeceased { - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "deceasedBoolean")] - Boolean(Boolean), - /// Variant accepting the Age type. - #[fhir_serde(rename = "deceasedAge")] - Age(Age), - /// Variant accepting the Range type. - #[fhir_serde(rename = "deceasedRange")] - Range(Range), - /// Variant accepting the Date type. - #[fhir_serde(rename = "deceasedDate")] - Date(Date), - /// Variant accepting the String type. - #[fhir_serde(rename = "deceasedString")] - String(String), + pub response: Option, } -/// FHIR FamilyMemberHistory type +/// FHIR ExplanationOfBenefit type /// -/// Significant health conditions for a person related to the patient relevant in -/// the context of care for the patient. +/// This resource provides: the claim details; adjudication details from the +/// processing of a Claim; and optionally account balance information, for +/// informing the subscriber of the benefits provided. /// /// ## Type: Resource type /// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource @@ -62900,10 +62750,9 @@ pub enum FamilyMemberHistoryDeceased { /// ## Status: draft /// FHIR Version: 4.0.1 /// -/// See: [FamilyMemberHistory](http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory) +/// See: [ExplanationOfBenefit](http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit) #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "born,age,deceased")] -pub struct FamilyMemberHistory { +pub struct ExplanationOfBenefit { /// Logical id of this artifact /// /// The logical id of the resource, as used in the URL for the resource. Once @@ -63103,61 +62952,62 @@ pub struct FamilyMemberHistory { /// extensions, user content #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// External Id(s) for this record + /// Business Identifier for the resource /// - /// Business identifiers assigned to this family member history by the performer - /// or other systems which remain constant as the resource is updated and - /// propagates from server to server. + /// A unique identifier assigned to this explanation of benefit. /// /// ## Requirements - /// Allows identification of the family member history as it is known by various - /// participating systems and in a way that remains consistent across servers. - /// - /// ## Implementation Notes - /// This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. + /// Allows EOBs to be distinguished and referenced. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` pub identifier: Option>, - /// Instantiates FHIR protocol or definition + /// active | cancelled | draft | entered-in-error /// - /// The URL pointing to a FHIR-defined protocol, guideline, orderset or other - /// definition that is adhered to in whole or in part by this - /// FamilyMemberHistory. + /// The status of the resource instance. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Need to track the status of the resource as 'draft' resources may undergo + /// further edits while 'active' resources are immutable and may only have their + /// status changed to 'cancelled'. + /// + /// ## Implementation Notes + /// This element is labeled as a modifier because the status contains codes that + /// mark the resource as not currently valid. + /// + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics + /// - Modifier element - This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesCanonical")] - pub instantiates_canonical: Option>, - /// Instantiates external protocol or definition /// - /// The URL pointing to an externally maintained protocol, guideline, orderset or - /// other definition that is adhered to in whole or in part by this - /// FamilyMemberHistory. + /// ## Binding + /// - **Strength**: required + /// - **Description**: A code specifying the state of the resource instance. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/explanationofbenefit-status|4.0.1 + pub status: Code, + /// Category or discipline + /// + /// The category of claim, e.g. oral, pharmacy, vision, institutional, + /// professional. + /// + /// ## Requirements + /// Claim type determine the general sets of business rules applied for + /// information requirements and adjudication. /// /// ## Implementation Notes - /// This might be an HTML page, PDF, etc. or could just be a non-resolvable URI - /// identifier. + /// The majority of jurisdictions use: oral, pharmacy, vision, professional and + /// institutional, or variants on those terms, as the general styles of claims. + /// The valueset is extensible to accommodate other jurisdictional requirements. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -63165,21 +63015,53 @@ pub struct FamilyMemberHistory { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "instantiatesUri")] - pub instantiates_uri: Option>, - /// partial | completed | entered-in-error | health-unknown /// - /// A code specifying the status of the record of the family history of a - /// specific family member. + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: The type or discipline-style of the claim. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-type + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// More granular claim type + /// + /// A finer grained suite of claim type codes which may convey additional + /// information such as Inpatient vs Outpatient and/or a specialty service. + /// + /// ## Requirements + /// Some jurisdictions need a finer grained claim type for routing and + /// adjudication. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. + /// This may contain the local bill type codes such as the US UB-04 bill type + /// code. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: A more granular claim typecode. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-subtype + #[fhir_serde(rename = "subType")] + pub sub_type: Option, + /// claim | preauthorization | predetermination + /// + /// A code to indicate whether the nature of the request is: to request + /// adjudication of products and services previously rendered; or requesting + /// authorization and adjudication for provision in the future; or requesting the + /// non-binding adjudication of the listed products and services which could be + /// provided in the future. + /// + /// ## Requirements + /// This element is required to understand the nature of the request for + /// adjudication. /// /// ## Cardinality: Required (1..1) /// /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid /// - Included in summary /// /// ## Constraints @@ -63188,18 +63070,22 @@ pub struct FamilyMemberHistory { /// /// ## Binding /// - **Strength**: required - /// - **Description**: A code that identifies the status of the family history record. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/history-status|4.0.1 - pub status: Code, - /// subject-unknown | withheld | unable-to-obtain | deferred + /// - **Description**: Complete, proposed, exploratory, other. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-use|4.0.1 + #[fhir_serde(rename = "use")] + pub r#use: Code, + /// The recipient of the products and services /// - /// Describes why the family member's history is not available. + /// The party to whom the professional services and/or products have been + /// supplied or are being considered and for whom actual for forecast + /// reimbursement is sought. /// /// ## Requirements - /// This is a separate element to allow it to have a distinct binding from - /// reasonCode. + /// The patient must be supplied to the insurer so that confirmation of coverage + /// and service history may be considered as part of the authorization and/or + /// adjudiction. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -63207,18 +63093,21 @@ pub struct FamilyMemberHistory { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub patient: Reference, + /// Relevant time frame for the claim /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes describing the reason why a family member's history is not available. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/history-absent-reason - #[fhir_serde(rename = "dataAbsentReason")] - pub data_absent_reason: Option, - /// Patient history is about + /// The period for which charges are being submitted. /// - /// The person who this history concerns. + /// ## Requirements + /// A number jurisdictions required the submission of the billing period when + /// submitting claims for example for hospital stays or long-term care. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// Typically this would be today or in the past for a claim, and today or in the + /// future for preauthorizations and prodeterminations. Typically line item dates + /// of service should fall within the billing period if one is specified. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Special Semantics /// - Included in summary @@ -63226,23 +63115,21 @@ pub struct FamilyMemberHistory { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "billablePeriod")] + pub billable_period: Option, + /// Response creation date /// - /// ## Aliases - /// Proband - pub patient: Reference, - /// When history was recorded or last updated - /// - /// The date (and possibly time) when the family member history was recorded or - /// last updated. + /// The date this resource was created. /// /// ## Requirements - /// Allows determination of how current the summary is. + /// Need to record a timestamp for use by both the recipient and the issuer. /// /// ## Implementation Notes - /// This should be captured even if the same as the date on the List aggregating - /// the full family history. + /// This field is independent of the date of creation of the resource as it may + /// reflect the creation date of a source document prior to digitization. + /// Typically for claims all services must be completed as of this date. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -63250,28 +63137,48 @@ pub struct FamilyMemberHistory { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub date: Option, - /// The family member described + pub created: DateTime, + /// Author of the claim /// - /// This will either be a name or a description; e.g. "Aunt Susan", "my cousin - /// with the red hair". + /// Individual who created the claim, predetermination or preauthorization. /// /// ## Requirements - /// Allows greater ease in ensuring the same person is being talked about. + /// Some jurisdictions require the contact information for personnel completing + /// claims. /// /// ## Cardinality: Optional (0..1) /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub enterer: Option, + /// Party responsible for reimbursement + /// + /// The party responsible for authorization, adjudication and reimbursement. + /// + /// ## Requirements + /// To be a valid claim, preauthorization or predetermination there must be a + /// party who is responsible for adjudicating the contents against a policy which + /// provides benefits for the patient. + /// + /// ## Cardinality: Required (1..1) + /// /// ## Special Semantics /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Relationship to the subject + pub insurer: Reference, + /// Party responsible for the claim /// - /// The type of relationship this person has to the patient (father, mother, - /// brother etc.). + /// The provider which is responsible for the claim, predetermination or + /// preauthorization. + /// + /// ## Implementation Notes + /// Typically this field would be 1..1 where this party is responsible for the + /// claim but not necessarily professionally responsible for the provision of the + /// individual products and services listed below. /// /// ## Cardinality: Required (1..1) /// @@ -63281,50 +63188,72 @@ pub struct FamilyMemberHistory { /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub provider: Reference, + /// Desired processing urgency + /// + /// The provider-required urgency of processing the request. Typical values + /// include: stat, routine deferred. + /// + /// ## Requirements + /// The provider may need to indicate their processing requirements so that the + /// processor can indicate if they are unable to comply. + /// + /// ## Implementation Notes + /// If a claim processor is unable to complete the processing as per the priority + /// then they should generate and error and not process the request. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: example - /// - **Description**: The nature of the relationship between the patient and the related person being described in the family member history. - /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-FamilyMember - pub relationship: CodeableConcept, - /// male | female | other | unknown + /// - **Description**: The timeliness with which processing is required: stat, normal, deferred. + /// - **ValueSet**: http://terminology.hl7.org/CodeSystem/processpriority + pub priority: Option, + /// For whom to reserve funds /// - /// The birth sex of the family member. + /// A code to indicate whether and for whom funds are to be reserved for future + /// claims. /// /// ## Requirements - /// Not all relationship codes imply sex and the relative's sex can be relevant - /// for risk assessments. + /// In the case of a Pre-Determination/Pre-Authorization the provider may request + /// that funds in the amount of the expected Benefit be reserved ('Patient' or + /// 'Provider') to pay for the Benefits determined on the subsequent claim(s). + /// 'None' explicitly indicates no funds reserving is requested. /// /// ## Implementation Notes - /// This element should ideally reflect whether the individual is genetically - /// male or female. However, as reported information based on the knowledge of - /// the patient or reporting friend/relative, there may be situations where the - /// reported sex might not be totally accurate. E.g. 'Aunt Sue' might be XY - /// rather than XX. Questions soliciting this information should be phrased to - /// encourage capture of genetic sex where known. However, systems performing - /// analysis should also allow for the possibility of imprecision with this - /// element. + /// This field is only used for preauthorizations. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Codes describing the sex assigned at birth as documented on the birth registration. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/administrative-gender - pub sex: Option, - /// (approximate) date of birth + /// - **Strength**: example + /// - **Description**: For whom funds are to be reserved: (Patient, Provider, None). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fundsreserve /// - /// The actual or approximate date of birth of the relative. + /// ## Aliases + /// Fund pre-allocation + #[fhir_serde(rename = "fundsReserveRequested")] + pub funds_reserve_requested: Option, + /// Funds reserved status + /// + /// A code, used only on a response to a preauthorization, to indicate whether + /// the benefits payable have been reserved and for whom. /// /// ## Requirements - /// Allows calculation of the relative's age. + /// Needed to advise the submitting provider on whether the rquest for + /// reservation of funds has been honored. + /// + /// ## Implementation Notes + /// Fund would be release by a future claim quoting the preAuthRef of this + /// response. Examples of values include: provider, patient, none. /// /// ## Cardinality: Optional (0..1) /// @@ -63332,83 +63261,162 @@ pub struct FamilyMemberHistory { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Conditions - /// Used when: fhs-1 - #[fhir_serde(flatten)] - pub born: Option, - /// (approximate) age + /// ## Binding + /// - **Strength**: example + /// - **Description**: For whom funds are to be reserved: (Patient, Provider, None). + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/fundsreserve + #[fhir_serde(rename = "fundsReserve")] + pub funds_reserve: Option, + /// Prior or corollary claims /// - /// The age of the relative at the time the family member history is recorded. + /// Other claims which are related to this claim such as prior submissions or + /// claims for related services or for the same event. /// /// ## Requirements - /// While age can be calculated from date of birth, sometimes recording age - /// directly is more natural for clinicians. + /// For workplace or other accidents it is common to relate separate claims + /// arising from the same event. /// /// ## Implementation Notes - /// use estimatedAge to indicate whether the age is actual or not. + /// For example, for the original treatment and follow-up exams. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub related: Option>, + /// Prescription authorizing services or products + /// + /// Prescription to support the dispensing of pharmacy, device or vision + /// products. + /// + /// ## Requirements + /// Required to authorize the dispensing of controlled substances and devices. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub prescription: Option, + /// Original prescription if superceded by fulfiller + /// + /// Original prescription which has been superseded by this prescription to + /// support the dispensing of pharmacy services, medications or products. + /// + /// ## Requirements + /// Often required when a fulfiller varies what is fulfilled from that authorized + /// on the original prescription. + /// + /// ## Implementation Notes + /// For example, a physician may prescribe a medication which the pharmacy + /// determines is contraindicated, or for which the patient has an intolerance, + /// and therefor issues a new prescription for an alternate medication which has + /// the same therapeutic intent. The prescription from the pharmacy becomes the + /// 'prescription' and that from the physician becomes the 'original + /// prescription'. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "originalPrescription")] + pub original_prescription: Option, + /// Recipient of benefits payable /// - /// ## Conditions - /// Used when: fhs-1 - #[fhir_serde(flatten)] - pub age: Option, - /// Age is estimated? + /// The party to be reimbursed for cost of the products and services according to + /// the terms of the policy. /// - /// If true, indicates that the age value specified is an estimated value. + /// ## Requirements + /// The provider needs to specify who they wish to be reimbursed and the claims + /// processor needs express who they will reimburse. + /// + /// ## Implementation Notes + /// Often providers agree to receive the benefits payable to reduce the near-term + /// costs to the patient. The insurer may decline to pay the provider and may + /// choose to pay the subscriber instead. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub payee: Option, + /// Treatment Referral + /// + /// A reference to a referral resource. /// /// ## Requirements - /// Clinicians often prefer to specify an estimaged age rather than an age range. + /// Some insurers require proof of referral to pay for services or to pay + /// specialist rates for services. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the fact that age is estimated - /// can/should change the results of any algorithm that calculates based on the - /// specified age. + /// The referral resource which lists the date, practitioner, reason and other + /// supporting information. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// - When missing: It is unknown whether the age is an estimate or not + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub referral: Option, + /// Servicing Facility + /// + /// Facility where the services were provided. + /// + /// ## Requirements + /// Insurance adjudication can be dependant on where services were delivered. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub facility: Option, + /// Claim reference /// - /// ## Conditions - /// Used when: fhs-2 - #[fhir_serde(rename = "estimatedAge")] - pub estimated_age: Option, - /// Dead? How old/when? + /// The business identifier for the instance of the adjudication request: claim + /// predetermination or preauthorization. /// - /// Deceased flag or the actual or approximate age of the relative at the time of - /// death for the family member history record. + /// ## Requirements + /// To provide a link to the original adjudication request. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub claim: Option, + /// Claim response reference + /// + /// The business identifier for the instance of the adjudication response: claim, + /// predetermination or preauthorization response. + /// + /// ## Requirements + /// To provide a link to the original adjudication response. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub deceased: Option, - /// Why was family member history performed? + #[fhir_serde(rename = "claimResponse")] + pub claim_response: Option, + /// queued | complete | error | partial /// - /// Describes why the family member history occurred in coded or textual form. + /// The outcome of the claim, predetermination, or preauthorization processing. + /// + /// ## Requirements + /// To advise the requestor of an overall processing outcome. /// /// ## Implementation Notes - /// Textual reasons can be captured using reasonCode.text. + /// The resource may be used to indicate that: the request has been held (queued) + /// for processing; that it has been processed and errors found (error); that no + /// errors were found and that some of the adjudication has been undertaken + /// (partial) or that all of the adjudication has been undertaken (complete). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Required (1..1) /// /// ## Special Semantics /// - Included in summary @@ -63418,324 +63426,273 @@ pub struct FamilyMemberHistory { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: example - /// - **Description**: Codes indicating why the family member history was done. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Why was family member history performed? + /// - **Strength**: required + /// - **Description**: The result of the claim processing. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1 + pub outcome: Code, + /// Disposition Message /// - /// Indicates a Condition, Observation, AllergyIntolerance, or - /// QuestionnaireResponse that justifies this family member history event. + /// A human readable description of the status of the adjudication. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Provided for user display. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// General note about related person + pub disposition: Option, + /// Preauthorization reference /// - /// This property allows a non condition-specific note to the made about the - /// related person. Ideally, the note would be in the condition property, but - /// this is not always possible. + /// Reference from the Insurer which is used in later communications which refers + /// to this adjudication. + /// + /// ## Requirements + /// On subsequent claims, the insurer may require the provider to quote this + /// value. + /// + /// ## Implementation Notes + /// This value is only present on preauthorization adjudications. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// Condition that the related person had + #[fhir_serde(rename = "preAuthRef")] + pub pre_auth_ref: Option>, + /// Preauthorization in-effect period /// - /// The significant Conditions (or condition) that the family member had. This is - /// a repeating section to allow a system to represent more than one condition - /// per resource, though there is nothing stopping multiple resources - one per - /// condition. + /// The timeframe during which the supplied preauthorization reference may be + /// quoted on claims to obtain the adjudication as provided. + /// + /// ## Requirements + /// On subsequent claims, the insurer may require the provider to quote this + /// value. + /// + /// ## Implementation Notes + /// This value is only present on preauthorization adjudications. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub condition: Option>, -} - -/// Choice of types for the onset\[x\] field in FamilyMemberHistoryCondition -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "onset")] -pub enum FamilyMemberHistoryConditionOnset { - /// Variant accepting the Age type. - #[fhir_serde(rename = "onsetAge")] - Age(Age), - /// Variant accepting the Range type. - #[fhir_serde(rename = "onsetRange")] - Range(Range), - /// Variant accepting the Period type. - #[fhir_serde(rename = "onsetPeriod")] - Period(Period), - /// Variant accepting the String type. - #[fhir_serde(rename = "onsetString")] - String(String), -} - -/// Condition that the related person had -/// -/// The significant Conditions (or condition) that the family member had. This is -/// a repeating section to allow a system to represent more than one condition -/// per resource, though there is nothing stopping multiple resources - one per -/// condition. -/// -/// ## Cardinality: Optional, Multiple (0..*) -/// -/// ## Constraints -/// - **ele-1**: All FHIR elements must have a @value or children (error) -/// Expression: `hasValue() or (children().count() > id.count())` -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "onset")] -pub struct FamilyMemberHistoryCondition { - /// Unique id for inter-element referencing - /// - /// Unique id for the element within a resource (for internal references). This - /// may be any string value that does not contain spaces. - /// - /// ## Cardinality: Optional (0..1) - pub id: Option, - /// Additional content defined by implementations + #[fhir_serde(rename = "preAuthRefPeriod")] + pub pre_auth_ref_period: Option>, + /// Care Team members /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element. To make the use of extensions safe and manageable, - /// there is a strict set of governance applied to the definition and use of - /// extensions. Though any implementer can define an extension, there is a set of - /// requirements that SHALL be met as part of the definition of the extension. + /// The members of the team who provided the products and services. /// - /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// ## Requirements + /// Common to identify the responsible and supporting practitioners. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` - /// - /// ## Aliases - /// extensions, user content - pub extension: Option>, - /// Extensions that cannot be ignored even if unrecognized - /// - /// May be used to represent additional information that is not part of the basic - /// definition of the element and that modifies the understanding of the element - /// in which it is contained and/or the understanding of the containing element's - /// descendants. Usually modifier elements provide negation or qualification. To - /// make the use of extensions safe and manageable, there is a strict set of - /// governance applied to the definition and use of extensions. Though any - /// implementer can define an extension, there is a set of requirements that - /// SHALL be met as part of the definition of the extension. Applications - /// processing a resource are required to check for modifier extensions. + #[fhir_serde(rename = "careTeam")] + pub care_team: Option>, + /// Supporting information /// - /// Modifier extensions SHALL NOT change the meaning of any elements on Resource - /// or DomainResource (including cannot change the meaning of modifierExtension - /// itself). + /// Additional information codes regarding exceptions, special considerations, + /// the condition, situation, prior or concurrent issues. /// /// ## Requirements - /// Modifier extensions allow for extensions that *cannot* be safely ignored to - /// be clearly distinguished from the vast majority of extensions which can be - /// safely ignored. This promotes interoperability by eliminating the need for - /// implementers to prohibit the presence of extensions. For further information, - /// see the [definition of modifier - /// extensions](extensibility.html#modifierExtension). + /// Typically these information codes are required to support the services + /// rendered or the adjudication of the services rendered. /// /// ## Implementation Notes - /// There can be no stigma associated with the use of extensions by any - /// application, project, or standard - regardless of the institution or - /// jurisdiction that uses or defines the extensions. The use of extensions is - /// what allows the FHIR specification to retain a core level of simplicity for - /// everyone. + /// Often there are multiple jurisdiction specific valuesets which are required. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "supportingInfo")] + pub supporting_info: Option>, + /// Pertinent diagnosis information + /// + /// Information about diagnoses relevant to the claim items. + /// + /// ## Requirements + /// Required for the adjudication by provided context for the services and + /// product listed. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **ext-1**: Must have either extensions or value[x], not both (error) - /// Expression: `extension.exists() != value.exists()` + pub diagnosis: Option>, + /// Clinical procedures performed /// - /// ## Aliases - /// extensions, user content, modifiers - #[fhir_serde(rename = "modifierExtension")] - pub modifier_extension: Option>, - /// Condition suffered by relation + /// Procedures performed on the patient relevant to the billing items with the + /// claim. /// - /// The actual condition specified. Could be a coded condition (like MI or - /// Diabetes) or a less specific string like 'cancer' depending on how much is - /// known about the condition and the capabilities of the creating system. + /// ## Requirements + /// The specific clinical invention are sometimes required to be provided to + /// justify billing a greater than customary amount for a service. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub procedure: Option>, + /// Precedence (primary, secondary, etc.) /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Identification of the Condition or diagnosis. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-code - pub code: CodeableConcept, - /// deceased | permanent disability | etc. + /// This indicates the relative order of a series of EOBs related to different + /// coverages for the same suite of services. /// - /// Indicates what happened following the condition. If the condition resulted in - /// death, deceased date is captured on the relation. + /// ## Requirements + /// Needed to coordinate between multiple EOBs for the same suite of services. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub precedence: Option, + /// Patient insurance information /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The result of the condition for the patient; e.g. death, permanent disability, temporary disability, etc. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/condition-outcome - pub outcome: Option, - /// Whether the condition contributed to the cause of death + /// Financial instruments for reimbursement for the health care products and + /// services specified on the claim. /// - /// This condition contributed to the cause of death of the related person. If - /// contributedToDeath is not populated, then it is unknown. + /// ## Requirements + /// At least one insurer is required for a claim to be a claim. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// All insurance coverages for the patient which may be applicable for + /// reimbursement, of the products and services listed in the claim, are + /// typically provided in the claim to allow insurers to confirm the ordering of + /// the insurance coverages relative to local 'coordination of benefit' rules. + /// One coverage (and only one) with 'focal=true' is to be used in the + /// adjudication of this claim. Coverages appearing before the focal Coverage in + /// the list, and where 'Coverage.subrogation=false', should provide a reference + /// to the ClaimResponse containing the adjudication results of the prior claim. + /// + /// ## Cardinality: Required, Multiple (1..*) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "contributedToDeath")] - pub contributed_to_death: Option, - /// When condition first manifested + pub insurance: Option>, + /// Details of the event /// - /// Either the age of onset, range of approximate age or descriptive string can - /// be recorded. For conditions with multiple occurrences, this describes the - /// first known occurrence. + /// Details of a accident which resulted in injuries which required the products + /// and services listed in the claim. /// /// ## Requirements - /// Age of onset of a condition in relatives is predictive of risk for the - /// patient. + /// When healthcare products and services are accident related, benefits may be + /// payable under accident provisions of policies, such as automotive, etc before + /// they are payable under normal health insurance. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub onset: Option, - /// Extra information about condition + pub accident: Option, + /// Product or service provided /// - /// An area where general notes can be placed about this specific condition. + /// A claim line. Either a simple (a product or service) or a 'group' of details + /// which can also be a simple items or groups of sub-details. + /// + /// ## Requirements + /// The items to be processed for adjudication. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, -} - -/// FHIR Flag type -/// -/// Prospective warnings of potential issues when providing care to the patient. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [Flag](http://hl7.org/fhir/StructureDefinition/Flag) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Flag { - /// Logical id of this artifact + pub item: Option>, + /// Insurer added line items /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. + /// The first-tier service adjudications for payor added product or service + /// lines. /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// ## Requirements + /// Insurers may redefine the provided product or service or may package and/or + /// decompose groups of products and services. The addItems allows the insurer to + /// provide their line item list with linkage to the submitted + /// items/details/sub-details. In a preauthorization the insurer may use the + /// addItem structure to provide additional information on authorized products + /// and services. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "addItem")] + pub add_item: Option>, + /// Header-level adjudication /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// The adjudication results which are presented at the header level rather than + /// at the line-item or add-item levels. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Some insurers will receive line-items but provide the adjudication only at a + /// summary or header-level. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + pub adjudication: Option>, + /// Adjudication totals /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// Categorized monetary totals for the adjudication. + /// + /// ## Requirements + /// To provide the requestor with financial totals by category for the + /// adjudication. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// Totals for amounts submitted, co-pays, benefits payable etc. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + pub total: Option>, + /// Payment Details /// - /// The base language in which the resource is written. + /// Payment details for the adjudication of the claim. + /// + /// ## Requirements + /// Needed to convey references to the financial instrument that has been used if + /// payment has been made. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub payment: Option, + /// Printed form identifier + /// + /// A code for the form to be used for printing the content. + /// + /// ## Requirements + /// Needed to specify the specific form used for producing output for this + /// response. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// May be needed to identify specific jurisdictional forms. /// /// ## Cardinality: Optional (0..1) /// @@ -63744,61 +63701,120 @@ pub struct Flag { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// - **Strength**: example + /// - **Description**: The forms codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/forms + #[fhir_serde(rename = "formCode")] + pub form_code: Option, + /// Printed reference or actual form /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// The actual form, by reference or inclusion, for printing the content or an + /// EOB. + /// + /// ## Requirements + /// Needed to include the specific form used for producing output for this + /// response. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// Needed to permit insurers to include the actual form. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub form: Option, + /// Note concerning adjudication /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// A note that describes or explains adjudication results in a human readable + /// form. /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Requirements + /// Provides the insurer specific textual explanations associated with the + /// processing. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "processNote")] + pub process_note: Option>, + /// When the benefits are applicable + /// + /// The term of the benefits documented in this response. + /// + /// ## Requirements + /// Needed as coverages may be multi-year while benefits tend to be annual + /// therefore a separate expression of the benefit period is needed. /// /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// Not applicable when use=claim. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "benefitPeriod")] + pub benefit_period: Option, + /// Balance by Benefit Category + /// + /// Balance by Benefit Category. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "benefitBalance")] + pub benefit_balance: Option>, +} + +/// Choice of types for the location\[x\] field in ExplanationOfBenefitAccident +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "location")] +pub enum ExplanationOfBenefitAccidentLocation { + /// Variant accepting the Address type. + #[fhir_serde(rename = "locationAddress")] + Address(Address), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "locationReference")] + Reference(Reference), +} + +/// Details of the event +/// +/// Details of a accident which resulted in injuries which required the products +/// and services listed in the claim. +/// +/// ## Requirements +/// When healthcare products and services are accident related, benefits may be +/// payable under accident provisions of policies, such as automotive, etc before +/// they are payable under normal health insurance. +/// +/// ## Cardinality: Optional (0..1) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "location")] +pub struct ExplanationOfBenefitAccident { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -63818,16 +63834,16 @@ pub struct Flag { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -63852,7 +63868,8 @@ pub struct Flag { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -63861,330 +63878,127 @@ pub struct Flag { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Business identifier + /// When the incident occurred /// - /// Business identifiers assigned to this flag by the performer or other systems - /// which remain constant as the resource is updated and propagates from server - /// to server. + /// Date of an accident event related to the products and services contained in + /// the claim. /// /// ## Requirements - /// Allows identification of the flag as it is known by various participating - /// systems and in a way that remains consistent across servers. - /// - /// ## Implementation Notes - /// This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// active | inactive | entered-in-error - /// - /// Supports basic workflow. - /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Indicates whether this flag is active and needs to be displayed to a user, or whether it is no longer needed or was entered in error. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/flag-status|4.0.1 - pub status: Code, - /// Clinical, administrative, etc. - /// - /// Allows a flag to be divided into different categories like clinical, - /// administrative etc. Intended to be used as a means of filtering which flags - /// are displayed to particular user or in a given context. - /// - /// ## Implementation Notes - /// The value set will often need to be adjusted based on local business rules - /// and usage context. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: A general category for flags for filtering/display purposes. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/flag-category - pub category: Option>, - /// Coded or textual message to display to user - /// - /// The coded value or textual component of the flag to display to the user. + /// Required for audit purposes and adjudication. /// /// ## Implementation Notes - /// If non-coded, use CodeableConcept.text. This element should always be - /// included in the narrative. - /// - /// ## Cardinality: Required (1..1) + /// The date of the accident has to precede the dates of the products and + /// services but within a reasonable timeframe. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub date: Option, + /// The nature of the accident /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: Detail codes identifying specific flagged issues. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/flag-code - pub code: CodeableConcept, - /// Who/What is flag about? - /// - /// The patient, location, group, organization, or practitioner etc. this is - /// about record this flag is associated with. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Reference, - /// Time period when flag is active + /// The type or context of the accident event for the purposes of selection of + /// potential insurance coverages and determination of coordination between + /// insurers. /// - /// The period of time from the activation of the flag to inactivation of the - /// flag. If the flag is active, the end of the period should be unspecified. + /// ## Requirements + /// Coverage may be dependant on the type of accident. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// Alert relevant during encounter /// - /// This alert is only relevant during the encounter. - /// - /// ## Implementation Notes - /// If both Flag.encounter and Flag.period are valued, then Flag.period.start - /// shall not be before Encounter.period.start and Flag.period.end shall not be - /// after Encounter.period.end. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary + /// ## Binding + /// - **Strength**: extensible + /// - **Description**: Type of accident: work place, auto, etc. + /// - **ValueSet**: http://terminology.hl7.org/ValueSet/v3-ActIncidentCode + #[fhir_serde(rename = "type")] + pub r#type: Option, + /// Where the event occurred /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub encounter: Option, - /// Flag creator + /// The physical location of the accident event. /// - /// The person, organization or device that created the flag. + /// ## Requirements + /// Required for audit purposes and determination of applicable insurance + /// liability. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub author: Option, + #[fhir_serde(flatten)] + pub location: Option, } -/// Choice of types for the start\[x\] field in Goal +/// Choice of types for the serviced\[x\] field in ExplanationOfBenefitAddItem #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "start")] -pub enum GoalStart { +#[fhir_choice_element(base_name = "serviced")] +pub enum ExplanationOfBenefitAddItemServiced { /// Variant accepting the Date type. - #[fhir_serde(rename = "startDate")] + #[fhir_serde(rename = "servicedDate")] Date(Date), + /// Variant accepting the Period type. + #[fhir_serde(rename = "servicedPeriod")] + Period(Period), +} + +/// Choice of types for the location\[x\] field in ExplanationOfBenefitAddItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "location")] +pub enum ExplanationOfBenefitAddItemLocation { /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "startCodeableConcept")] + #[fhir_serde(rename = "locationCodeableConcept")] CodeableConcept(CodeableConcept), + /// Variant accepting the Address type. + #[fhir_serde(rename = "locationAddress")] + Address(Address), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "locationReference")] + Reference(Reference), } -/// FHIR Goal type +/// Insurer added line items /// -/// Describes the intended objective(s) for a patient, group or organization -/// care, for example, weight loss, restoring an activity of daily living, -/// obtaining herd immunity via immunization, meeting a process improvement -/// objective, etc. +/// The first-tier service adjudications for payor added product or service +/// lines. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Requirements +/// Insurers may redefine the provided product or service or may package and/or +/// decompose groups of products and services. The addItems allows the insurer to +/// provide their line item list with linkage to the submitted +/// items/details/sub-details. In a preauthorization the insurer may use the +/// addItem structure to provide additional information on authorized products +/// and services. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Cardinality: Optional, Multiple (0..*) /// -/// See: [Goal](http://hl7.org/fhir/StructureDefinition/Goal) +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "start")] -pub struct Goal { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +#[fhir_resource(choice_elements = "serviced,location")] +pub struct ExplanationOfBenefitAddItem { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. - /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content - /// - /// The base language in which the resource is written. - /// - /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. - /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -64204,16 +64018,16 @@ pub struct Goal { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -64238,7 +64052,8 @@ pub struct Goal { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -64247,92 +64062,84 @@ pub struct Goal { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// External Ids for this goal + /// Item sequence number /// - /// Business identifiers assigned to this goal by the performer or other systems - /// which remain constant as the resource is updated and propagates from server - /// to server. + /// Claim items which this service line is intended to replace. /// /// ## Requirements - /// Allows identification of the goal as it is known by various participating - /// systems and in a way that remains consistent across servers. - /// - /// ## Implementation Notes - /// This is a business identifier, not a resource identifier (see - /// [discussion](resource.html#identifiers)). It is best practice for the - /// identifier to only appear on a single resource instance, however business - /// practices may occasionally dictate that multiple resource instances with the - /// same identifier can exist - possibly even with different resource types. For - /// example, multiple Patient and a Person resource instance might share the same - /// social insurance number. + /// Provides references to the claim items. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected + #[fhir_serde(rename = "itemSequence")] + pub item_sequence: Option>, + /// Detail sequence number /// - /// The state of the goal throughout its lifecycle. + /// The sequence number of the details within the claim item which this line is + /// intended to replace. /// /// ## Requirements - /// Allows knowing whether goal needs to be further tracked. + /// Provides references to the claim details within the claim item. /// - /// ## Implementation Notes - /// This element is labeled as a modifier because the lifecycleStatus contains - /// codes that mark the resource as not currently valid. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Cardinality: Required (1..1) + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "detailSequence")] + pub detail_sequence: Option>, + /// Subdetail sequence number /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary + /// The sequence number of the sub-details woithin the details within the claim + /// item which this line is intended to replace. + /// + /// ## Requirements + /// Provides references to the claim sub-details within the claim detail. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "subDetailSequence")] + pub sub_detail_sequence: Option>, + /// Authorized providers /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Codes that reflect the current state of a goal and whether the goal is still being targeted. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/goal-status|4.0.1 - #[fhir_serde(rename = "lifecycleStatus")] - pub lifecycle_status: Code, - /// in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable - /// - /// Describes the progression, or lack thereof, towards the goal against the - /// target. + /// The providers who are authorized for the services rendered to the patient. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Insurer may provide authorization specifically to a restricted set of + /// providers rather than an open authorization. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub provider: Option>, + /// Billing, service, product, or drug code /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: Indicates the progression, or lack thereof, towards the goal against the target. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/goal-achievement - #[fhir_serde(rename = "achievementStatus")] - pub achievement_status: Option, - /// E.g. Treatment, dietary, behavioral, etc. - /// - /// Indicates a category the goal falls within. + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// /// ## Requirements - /// Allows goals to be filtered and sorted. + /// Necessary to state what was provided or done. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -64340,57 +64147,51 @@ pub struct Goal { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes for grouping and sorting goals. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/goal-category - pub category: Option>, - /// high-priority | medium-priority | low-priority + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls /// - /// Identifies the mutually agreed level of importance associated with - /// reaching/sustaining the goal. + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers + /// + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// /// ## Requirements - /// Used for sorting and presenting goals. + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// /// ## Implementation Notes - /// Extensions are available to track priorities as established by each - /// participant (i.e. Priority from the patient's perspective, different - /// practitioners' perspectives, family member's perspectives) - /// - /// The ordinal extension on Coding can be used to convey a numerically - /// comparable ranking to priority. (Keep in mind that different coding systems - /// may use a "low value=important". - /// - /// ## Cardinality: Optional (0..1) + /// For example, in Oral whether the treatment is cosmetic or associated with + /// TMJ, or for Medical whether the treatment was outside the clinic or out of + /// office hours. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: preferred - /// - **Description**: The level of importance associated with a goal. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/goal-priority - pub priority: Option, - /// Code or text describing goal + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Program the product or service is provided under /// - /// Human-readable and/or coded description of a specific desired objective of - /// care, such as "control blood pressure" or "negotiate an obstacle course" or - /// "dance with child at wedding". + /// Identifies the program under which this may be recovered. /// /// ## Requirements - /// Without a description of what's trying to be achieved, element has no - /// purpose. + /// Commonly used in in the identification of publicly provided program focused + /// on population segments or disease classifications. /// /// ## Implementation Notes - /// If no code is available, use CodeableConcept.text. - /// - /// ## Cardinality: Required (1..1) + /// For example: Neonatal program, child dental program or drug users recovery + /// program. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -64398,268 +64199,205 @@ pub struct Goal { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes providing the details of a particular goal. This will generally be system or implementation guide-specific. In many systems, only the text element will be used. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings - pub description: CodeableConcept, - /// Who this goal is intended for + /// - **Description**: Program specific reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code + #[fhir_serde(rename = "programCode")] + pub program_code: Option>, + /// Date or dates of service or product delivery /// - /// Identifies the patient, group or organization for whom the goal is being - /// established. + /// The date or dates when the service or product was supplied, performed or + /// completed. /// /// ## Requirements - /// Subject is optional to support annonymized reporting. - /// - /// ## Cardinality: Required (1..1) + /// Needed to determine whether the service or product was provided during the + /// term of the insurance coverage. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Reference, - /// When goal pursuit begins - /// - /// The date or event after which the goal should begin being pursued. + #[fhir_serde(flatten)] + pub serviced: Option, + /// Place of service or where product was supplied + /// + /// Where the product or service was provided. /// /// ## Requirements - /// Goals can be established prior to there being an intention to start pursuing - /// them; e.g. Goals for post-surgical recovery established prior to surgery. + /// The location can alter whether the item was acceptable for insurance purposes + /// or impact the determination of the benefit amount. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes describing events that can trigger the initiation of a goal. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/goal-start-event + /// - **Description**: Place where the service is rendered. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place #[fhir_serde(flatten)] - pub start: Option, - /// Target outcome for the goal + pub location: Option, + /// Count of products or services /// - /// Indicates what should be done by when. + /// The number of repetitions of a service or product. /// /// ## Requirements - /// Allows the progress of the goal to be monitored against an observation or due - /// date. Target is 0..* to support Observations with multiple components, such - /// as blood pressure goals with both a systolic and diastolic target. - /// - /// ## Implementation Notes - /// When multiple targets are present for a single goal instance, all targets - /// must be met for the overall goal to be met. + /// Required when the product or service code does not convey the quantity + /// provided. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - /// - **gol-1**: Goal.target.measure is required if Goal.target.detail is populated (error) - /// Expression: `(detail.exists() and measure.exists()) or detail.exists().not()` - /// - /// ## Conditions - /// Used when: gol-1 - pub target: Option>, - /// When goal status took effect + pub quantity: Option, + /// Fee, charge or cost per item /// - /// Identifies when the current status. I.e. When initially created, when - /// achieved, when cancelled, etc. + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. /// - /// ## Implementation Notes - /// To see the date for past statuses, query history. + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "statusDate")] - pub status_date: Option, - /// Reason for current status + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor /// - /// Captures the reason for the current status. + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. + /// + /// ## Requirements + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// /// ## Implementation Notes - /// This will typically be captured for statuses such as rejected, on-hold or - /// cancelled, but could be present for others. + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "statusReason")] - pub status_reason: Option, - /// Who's responsible for creating Goal? + pub factor: Option, + /// Total item cost /// - /// Indicates whose goal this is - patient goal, practitioner goal, etc. + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. /// /// ## Implementation Notes - /// This is the individual responsible for establishing the goal, not necessarily - /// who recorded it. (For that, use the Provenance resource.). + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "expressedBy")] - pub expressed_by: Option, - /// Issues addressed by this goal + pub net: Option, + /// Anatomical location /// - /// The identified conditions and other health record elements that are intended - /// to be addressed by the goal. + /// Physical service site on the patient (limb, tooth, etc.). /// /// ## Requirements - /// Allows specific goals to explicitly linked to the concerns they're dealing - /// with - makes the goal more understandable. + /// Allows insurer to validate specific procedures. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Implementation Notes + /// For example, providing a tooth code allows an insurer to identify a provider + /// performing a filling on a tooth that was previously removed. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub addresses: Option>, - /// Comments about the goal /// - /// Any comments related to the goal. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The code for the teeth, quadrant, sextant and arch. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth + #[fhir_serde(rename = "bodySite")] + pub body_site: Option, + /// Anatomical sub-location /// - /// ## Requirements - /// There's a need to capture information about the goal that doesn't actually - /// describe the goal. + /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). /// - /// ## Implementation Notes - /// May be used for progress notes, concerns or other related information that - /// doesn't actually describe the goal itself. + /// ## Requirements + /// Allows insurer to validate specific procedures. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// What result was achieved regarding the goal? /// - /// Identifies the change (or lack of change) at the point when the status of the - /// goal is assessed. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The code for the tooth surface and surface combinations. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface + #[fhir_serde(rename = "subSite")] + pub sub_site: Option>, + /// Applicable note numbers /// - /// ## Requirements - /// Outcome tracking is a key aspect of care planning. + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// - /// ## Implementation Notes - /// Note that this should not duplicate the goal status. + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Added items adjudication /// - /// ## Binding - /// - **Strength**: example - /// - **Description**: The result of the goal; e.g. "25% increase in shoulder mobility", "Anxiety reduced to moderate levels". "15 kg weight loss sustained over 6 months". - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/clinical-findings - #[fhir_serde(rename = "outcomeCode")] - pub outcome_code: Option>, - /// Observation that resulted from goal + /// The adjudication results. /// - /// Details of what's changed (or not changed). + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Requirements - /// Outcome tracking is a key aspect of care planning. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, + /// Insurer added line items /// - /// ## Implementation Notes - /// The goal outcome is independent of the outcome of the related activities. For - /// example, if the Goal is to achieve a target body weight of 150 lb and a care - /// plan activity is defined to diet, then the care plan’s activity outcome - /// could be calories consumed whereas goal outcome is an observation for the - /// actual body weight measured. + /// The second-tier service adjudications for payor added services. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "outcomeReference")] - pub outcome_reference: Option>, -} - -/// Choice of types for the detail\[x\] field in GoalTarget -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "detail")] -pub enum GoalTargetDetail { - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "detailQuantity")] - Quantity(Quantity), - /// Variant accepting the Range type. - #[fhir_serde(rename = "detailRange")] - Range(Range), - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "detailCodeableConcept")] - CodeableConcept(CodeableConcept), - /// Variant accepting the String type. - #[fhir_serde(rename = "detailString")] - String(String), - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "detailBoolean")] - Boolean(Boolean), - /// Variant accepting the Integer type. - #[fhir_serde(rename = "detailInteger")] - Integer(Integer), - /// Variant accepting the Ratio type. - #[fhir_serde(rename = "detailRatio")] - Ratio(Ratio), -} - -/// Choice of types for the due\[x\] field in GoalTarget -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "due")] -pub enum GoalTargetDue { - /// Variant accepting the Date type. - #[fhir_serde(rename = "dueDate")] - Date(Date), - /// Variant accepting the Duration type. - #[fhir_serde(rename = "dueDuration")] - Duration(Duration), + pub detail: Option>, } -/// Target outcome for the goal -/// -/// Indicates what should be done by when. -/// -/// ## Requirements -/// Allows the progress of the goal to be monitored against an observation or due -/// date. Target is 0..* to support Observations with multiple components, such -/// as blood pressure goals with both a systolic and diastolic target. +/// Insurer added line items /// -/// ## Implementation Notes -/// When multiple targets are present for a single goal instance, all targets -/// must be met for the overall goal to be met. +/// The second-tier service adjudications for payor added services. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// - **gol-1**: Goal.target.measure is required if Goal.target.detail is populated (error) -/// Expression: `(detail.exists() and measure.exists()) or detail.exists().not()` -/// -/// ## Conditions -/// Used when: gol-1 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "detail,due")] -pub struct GoalTarget { +pub struct ExplanationOfBenefitAddItemDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -64740,15 +64478,23 @@ pub struct GoalTarget { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The parameter whose value is being tracked + /// Billing, service, product, or drug code /// - /// The parameter whose value is being tracked, e.g. body weight, blood pressure, - /// or hemoglobin A1c level. + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Necessary to state what was provided or done. /// - /// ## Special Semantics - /// - Included in summary + /// ## Implementation Notes + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -64756,30 +64502,28 @@ pub struct GoalTarget { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes to identify the value being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/observation-codes + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls /// - /// ## Conditions - /// Used when: gol-1 - pub measure: Option, - /// The target value to be achieved + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers /// - /// The target value of the focus to be achieved to signify the fulfillment of - /// the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the - /// range can be specified. When a low value is missing, it indicates that the - /// goal is achieved at any focus value at or below the high value. Similarly, if - /// the high value is missing, it indicates that the goal is achieved at any - /// focus value at or above the low value. + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// - /// ## Implementation Notes - /// A CodeableConcept with just a text would be used instead of a string if the - /// field was usually coded, or if the type associated with the - /// Goal.target.measure defines a coded value. + /// ## Requirements + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// For example, in Oral whether the treatment is cosmetic or associated with + /// TMJ, or for Medical whether the treatment was outside the clinic or out of + /// office hours. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -64787,35 +64531,119 @@ pub struct GoalTarget { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Codes to identify the target value of the focus to be achieved to signify the fulfillment of the goal. + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Count of products or services /// - /// ## Conditions - /// Used when: gol-1 - #[fhir_serde(flatten)] - pub detail: Option, - /// Reach goal on or before + /// The number of repetitions of a service or product. /// - /// Indicates either the date or the duration after start by which the goal - /// should be met. + /// ## Requirements + /// Required when the product or service code does not convey the quantity + /// provided. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// Fee, charge or cost per item + /// + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. /// /// ## Requirements - /// Identifies when the goal should be evaluated. + /// The amount charged to the patient by the provider for a single unit. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor + /// + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. + /// + /// ## Requirements + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. + /// + /// ## Implementation Notes + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub due: Option, + pub factor: Option, + /// Total item cost + /// + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. + /// + /// ## Implementation Notes + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Applicable note numbers + /// + /// The numbers associated with notes below which apply to the adjudication of + /// this item. + /// + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Added items adjudication + /// + /// The adjudication results. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, + /// Insurer added line items + /// + /// The third-tier service adjudications for payor added services. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "subDetail")] + pub sub_detail: Option>, } -/// Potential target for the link +/// Insurer added line items /// -/// Potential target for the link. +/// The third-tier service adjudications for payor added services. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -64823,7 +64651,7 @@ pub struct GoalTarget { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct GraphDefinitionLinkTarget { +pub struct ExplanationOfBenefitAddItemDetailSubDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -64904,9 +64732,21 @@ pub struct GraphDefinitionLinkTarget { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Type of resource this link refers to + /// Billing, service, product, or drug code /// - /// Type of resource this link refers to. + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. + /// + /// ## Requirements + /// Necessary to state what was provided or done. + /// + /// ## Implementation Notes + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// /// ## Cardinality: Required (1..1) /// @@ -64915,206 +64755,160 @@ pub struct GraphDefinitionLinkTarget { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: One of the resource types defined as part of this version of FHIR. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-types|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// Criteria for reverse lookup - /// - /// A set of parameters to look up. + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls /// - /// ## Implementation Notes - /// At least one of the parameters must have the value {ref} which identifies the - /// focus resource. + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers /// - /// ## Cardinality: Optional (0..1) + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub params: Option, - /// Profile for the target resource + /// ## Requirements + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// - /// Profile for the target resource. + /// ## Implementation Notes + /// For example, in Oral whether the treatment is cosmetic or associated with + /// TMJ, or for Medical whether the treatment was outside the clinic or out of + /// office hours. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub profile: Option, - /// Compartment Consistency Rules /// - /// Compartment Consistency Rules. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Count of products or services /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub compartment: Option>, - /// Additional links from target resource + /// The number of repetitions of a service or product. /// - /// Additional links from target resource. + /// ## Requirements + /// Required when the product or service code does not convey the quantity + /// provided. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub link: Option>, -} - -/// FHIR GraphDefinition type -/// -/// A formal computable definition of a graph of resources - that is, a coherent -/// set of resources that form a graph by following references. The Graph -/// Definition resource defines a set and makes rules about the set. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [GraphDefinition](http://hl7.org/fhir/StructureDefinition/GraphDefinition) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct GraphDefinition { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. - /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) + pub quantity: Option, + /// Fee, charge or cost per item /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. + /// + /// ## Requirements + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + pub factor: Option, + /// Total item cost /// - /// The base language in which the resource is written. + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Applicable note numbers /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation - /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Added items adjudication /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// The adjudication results. /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, +} + +/// Balance by Benefit Category +/// +/// Balance by Benefit Category. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ExplanationOfBenefitBenefitBalance { + /// Unique id for inter-element referencing /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -65134,16 +64928,16 @@ pub struct GraphDefinition { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -65168,7 +64962,8 @@ pub struct GraphDefinition { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -65177,344 +64972,178 @@ pub struct GraphDefinition { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Canonical identifier for this graph definition, represented as a URI (globally unique) - /// - /// An absolute URI that is used to identify this graph definition when it is - /// referenced in a specification, model, design or an instance; also called its - /// canonical identifier. This SHOULD be globally unique and SHOULD be a literal - /// address at which at which an authoritative instance of this graph definition - /// is (or will be) published. This URL can be the target of a canonical - /// reference. It SHALL remain the same when the graph definition is stored on - /// different servers. - /// - /// ## Requirements - /// Allows the graph definition to be referenced by a single globally unique - /// identifier. - /// - /// ## Implementation Notes - /// Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. - /// Multiple instances may share the same URL if they have a distinct version. - /// - /// The determination of when to create a new version of a resource (same url, - /// new version) vs. defining a new artifact is up to the author. Considerations - /// for making this decision are found in [Technical and Business - /// Versions](resource.html#versions). - /// - /// In some cases, the resource can no longer be found at the stated url, but the - /// url itself cannot change. Implementations can use the - /// [meta.source](resource.html#meta) element to indicate where the current - /// master source of the resource can be found. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub url: Option, - /// Business version of the graph definition - /// - /// The identifier that is used to identify this version of the graph definition - /// when it is referenced in a specification, model, design or instance. This is - /// an arbitrary value managed by the graph definition author and is not expected - /// to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) - /// if a managed version is not available. There is also no expectation that - /// versions can be placed in a lexicographical sequence. - /// - /// ## Implementation Notes - /// There may be different graph definition instances that have the same - /// identifier but different versions. The version can be appended to the url in - /// a reference to allow a reference to a particular business version of the - /// graph definition with the format [url]|[version]. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub version: Option, - /// Name for this graph definition (computer friendly) + /// Benefit classification /// - /// A natural language name identifying the graph definition. This name should be - /// usable as an identifier for the module by machine processing applications - /// such as code generation. + /// Code to identify the general type of benefits under which products and + /// services are provided. /// /// ## Requirements - /// Support human navigation and code generation. - /// - /// ## Implementation Notes - /// The name is not expected to be globally unique. The name should be a simple - /// alphanumeric type name to ensure that it is machine-processing friendly. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - /// - /// ## Conditions - /// Used when: inv-0 - pub name: String, - /// draft | active | retired | unknown - /// - /// The status of this graph definition. Enables tracking the life-cycle of the - /// content. + /// Needed to convey the category of service or product for which eligibility is + /// sought. /// /// ## Implementation Notes - /// Allows filtering of graph definitions that are appropriate for use versus - /// not. + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Modifier element - This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The lifecycle status of an artifact. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/publication-status|4.0.1 - pub status: Code, - /// For testing purposes, not real usage + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: CodeableConcept, + /// Excluded from the plan /// - /// A Boolean value to indicate that this graph definition is authored for - /// testing purposes (or education/evaluation/marketing) and is not intended to - /// be used for genuine usage. + /// True if the indicated class of service is excluded from the plan, missing or + /// False indicates the product or service is included in the coverage. /// /// ## Requirements - /// Enables experimental content to be developed following the same lifecycle - /// that would be used for a production-level graph definition. - /// - /// ## Implementation Notes - /// Allows filtering of graph definitions that are appropriate for use versus - /// not. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub experimental: Option, - /// Date last changed - /// - /// The date (and optionally time) when the graph definition was published. The - /// date must change when the business version changes and it must change if the - /// status code changes. In addition, it should change when the substantive - /// content of the graph definition changes. - /// - /// ## Implementation Notes - /// Note that this is not the same as the resource last-modified-date, since the - /// resource may be a secondary representation of the graph definition. - /// Additional specific dates may be added as extensions or be found by - /// consulting Provenances associated with past versions of the resource. + /// Needed to identify items that are specifically excluded from the coverage. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub excluded: Option, + /// Short name for the benefit /// - /// ## Aliases - /// Revision Date - pub date: Option, - /// Name of the publisher (organization or individual) - /// - /// The name of the organization or individual that published the graph - /// definition. + /// A short name or tag for the benefit. /// /// ## Requirements - /// Helps establish the "authority/credibility" of the graph definition. May also - /// allow for contact. + /// Required to align with other plan names. /// /// ## Implementation Notes - /// Usually an organization but may be an individual. The publisher (or steward) - /// of the graph definition is the organization or individual primarily - /// responsible for the maintenance and upkeep of the graph definition. This is - /// not necessarily the same individual or organization that developed and - /// initially authored the content. The publisher is the primary point of contact - /// for questions or issues with the graph definition. This item SHOULD be - /// populated unless the information is available from context. + /// For example: MED01, or DENT2. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub publisher: Option, - /// Contact details for the publisher - /// - /// Contact details to assist a user in finding and communicating with the - /// publisher. - /// - /// ## Implementation Notes - /// May be a web site, an email address, a telephone number, etc. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary + pub name: Option, + /// Description of the benefit or services covered /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub contact: Option>, - /// Natural language description of the graph definition + /// A richer description of the benefit or services covered. /// - /// A free text natural language description of the graph definition from a - /// consumer's perspective. + /// ## Requirements + /// Needed for human readable reference. /// /// ## Implementation Notes - /// This description can be used to capture details such as why the graph - /// definition was built, comments about misuse, instructions for clinical use - /// and interpretation, literature references, examples from the paper world, - /// etc. It is not a rendering of the graph definition as conveyed in the 'text' - /// field of the resource itself. This item SHOULD be populated unless the - /// information is available from context (e.g. the language of the graph - /// definition is presumed to be the predominant language in the place the graph - /// definition was created). + /// For example, 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, + /// Implants and Cosmetic services'. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// The context that the content is intended to support + pub description: Option, + /// In or out of network /// - /// The content was developed with a focus and intent of supporting the contexts - /// that are listed. These contexts may be general categories (gender, age, ...) - /// or may be references to specific programs (insurance plans, studies, ...) and - /// may be used to assist with indexing and searching for appropriate graph - /// definition instances. + /// Is a flag to indicate whether the benefits refer to in-network providers or + /// out-of-network providers. /// /// ## Requirements - /// Assist in searching for appropriate content. - /// - /// ## Implementation Notes - /// When multiple useContexts are specified, there is no expectation that all or - /// any of the contexts apply. - /// - /// ## Cardinality: Optional, Multiple (0..*) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "useContext")] - pub use_context: Option>, - /// Intended jurisdiction for graph definition (if applicable) - /// - /// A legal or geographic region in which the graph definition is intended to be - /// used. - /// - /// ## Implementation Notes - /// It may be possible for the graph definition to be used in jurisdictions other - /// than those for which it was originally designed or intended. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Needed as in or out of network providers are treated differently under the + /// coverage. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: extensible - /// - **Description**: Countries and regions within which this artifact is targeted for use. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/jurisdiction - pub jurisdiction: Option>, - /// Why this graph definition is defined + /// - **Strength**: example + /// - **Description**: Code to classify in or out of network services. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-network + pub network: Option, + /// Individual or family /// - /// Explanation of why this graph definition is needed and why it has been - /// designed as it has. + /// Indicates if the benefits apply to an individual or to the family. /// - /// ## Implementation Notes - /// This element does not describe the usage of the graph definition. Instead, it - /// provides traceability of ''why'' the resource is either needed or ''why'' it - /// is defined as it is. This may be used to point to source materials or - /// specifications that drove the structure of this graph definition. + /// ## Requirements + /// Needed for the understanding of the benefits. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub purpose: Option, - /// Type of resource at which the graph starts - /// - /// The type of FHIR resource at which instances of this graph start. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Special Semantics - /// - Included in summary - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: One of the resource types defined as part of this version of FHIR. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/resource-types|4.0.1 - pub start: Code, - /// Profile on base resource + /// - **Strength**: example + /// - **Description**: Unit covered/serviced - individual or family. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-unit + pub unit: Option, + /// Annual or lifetime /// - /// The profile that describes the use of the base resource. + /// The term or period of the values such as 'maximum lifetime benefit' or + /// 'maximum annual visits'. /// - /// ## Implementation Notes - /// The code does not include the '$' prefix that is always included in the URL - /// when the operation is invoked. + /// ## Requirements + /// Needed for the understanding of the benefits. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub profile: Option, - /// Links this graph makes rules about /// - /// Links this graph makes rules about. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Coverage unit - annual, lifetime. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-term + pub term: Option, + /// Benefit Summary + /// + /// Benefits Used to date. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub link: Option>, + pub financial: Option>, } -/// Compartment Consistency Rules +/// Choice of types for the allowed\[x\] field in ExplanationOfBenefitBenefitBalanceFinancial +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "allowed")] +pub enum ExplanationOfBenefitBenefitBalanceFinancialAllowed { + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "allowedUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the String type. + #[fhir_serde(rename = "allowedString")] + String(String), + /// Variant accepting the Money type. + #[fhir_serde(rename = "allowedMoney")] + Money(Money), +} + +/// Choice of types for the used\[x\] field in ExplanationOfBenefitBenefitBalanceFinancial +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "used")] +pub enum ExplanationOfBenefitBenefitBalanceFinancialUsed { + /// Variant accepting the UnsignedInt type. + #[fhir_serde(rename = "usedUnsignedInt")] + UnsignedInt(UnsignedInt), + /// Variant accepting the Money type. + #[fhir_serde(rename = "usedMoney")] + Money(Money), +} + +/// Benefit Summary /// -/// Compartment Consistency Rules. +/// Benefits Used to date. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -65522,7 +65151,8 @@ pub struct GraphDefinition { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct GraphDefinitionLinkTargetCompartment { +#[fhir_resource(choice_elements = "allowed,used")] +pub struct ExplanationOfBenefitBenefitBalanceFinancial { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -65603,31 +65233,15 @@ pub struct GraphDefinitionLinkTargetCompartment { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// condition | requirement - /// - /// Defines how the compartment rule is used - whether it it is used to test - /// whether resources are subject to the rule, or whether it is a rule that must - /// be followed. - /// - /// ## Implementation Notes - /// All conditional rules are evaluated; if they are true, then the rules are - /// evaluated. - /// - /// ## Cardinality: Required (1..1) + /// Benefit classification /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// Classification of benefit being provided. /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: Defines how a compartment rule is used. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/graph-compartment-use|4.0.1 - #[fhir_serde(rename = "use")] - pub r#use: Code, - /// Patient | Encounter | RelatedPerson | Practitioner | Device + /// ## Requirements + /// Needed to convey the nature of the benefit. /// - /// Identifies the compartment. + /// ## Implementation Notes + /// For example: deductible, visits, benefit amount. /// /// ## Cardinality: Required (1..1) /// @@ -65636,50 +65250,47 @@ pub struct GraphDefinitionLinkTargetCompartment { /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Identifies a compartment. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/compartment-type|4.0.1 - pub code: Code, - /// identical | matching | different | custom - /// - /// identical | matching | different | no-rule | custom. - /// - /// ## Cardinality: Required (1..1) - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` + /// - **Strength**: example + /// - **Description**: Deductable, visits, co-pay, etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/benefit-type + #[fhir_serde(rename = "type")] + pub r#type: CodeableConcept, + /// Benefits allowed /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: How a compartment must be linked. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/graph-compartment-rule|4.0.1 - pub rule: Code, - /// Custom rule, as a FHIRPath expression + /// The quantity of the benefit which is permitted under the coverage. /// - /// Custom rule, as a FHIRPath expression. + /// ## Requirements + /// Needed to convey the benefits offered under the coverage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub expression: Option, - /// Documentation for FHIRPath expression + #[fhir_serde(flatten)] + pub allowed: Option, + /// Benefits used /// - /// Documentation for FHIRPath expression. + /// The quantity of the benefit which have been consumed to date. + /// + /// ## Requirements + /// Needed to convey the benefits consumed to date. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, + #[fhir_serde(flatten)] + pub used: Option, } -/// Links this graph makes rules about +/// Care Team members /// -/// Links this graph makes rules about. +/// The members of the team who provided the products and services. +/// +/// ## Requirements +/// Common to identify the responsible and supporting practitioners. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -65687,7 +65298,7 @@ pub struct GraphDefinitionLinkTargetCompartment { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct GraphDefinitionLink { +pub struct ExplanationOfBenefitCareTeam { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -65768,106 +65379,115 @@ pub struct GraphDefinitionLink { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Path in the resource that contains the link + /// Order of care team /// - /// A FHIR expression that identifies one of FHIR References to other resources. + /// A number to uniquely identify care team entries. /// - /// ## Implementation Notes - /// The path expression cannot contain a resolve() function. If there is no path, - /// the link is a reverse lookup, using target.params. If the path is "*" then - /// this means all references in the resource. + /// ## Requirements + /// Necessary to maintain the order of the care team and provide a mechanism to + /// link individuals to claim details. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub path: Option, - /// Which slice (if profiled) + pub sequence: PositiveInt, + /// Practitioner or organization /// - /// Which slice (if profiled). + /// Member of the team who provided the product or service. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Often a regulatory requirement to specify the responsible provider. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "sliceName")] - pub slice_name: Option, - /// Minimum occurrences for this link - /// - /// Minimum occurrences for this link. + pub provider: Reference, + /// Indicator of the lead practitioner /// - /// ## Cardinality: Optional (0..1) + /// The party who is billing and/or responsible for the claimed products or + /// services. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub min: Option, - /// Maximum occurrences for this link + /// ## Requirements + /// When multiple parties are present it is required to distinguish the lead or + /// responsible individual. /// - /// Maximum occurrences for this link. + /// ## Implementation Notes + /// Responsible might not be required when there is only a single provider + /// listed. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub max: Option, - /// Why this link is specified + pub responsible: Option, + /// Function within the team /// - /// Information about why this link is of interest in this graph definition. + /// The lead, assisting or supervising practitioner and their discipline if a + /// multidisciplinary team. + /// + /// ## Requirements + /// When multiple parties are present it is required to distinguish the roles + /// performed by each member. + /// + /// ## Implementation Notes + /// Role might not be required when there is only a single provider listed. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub description: Option, - /// Potential target for the link /// - /// Potential target for the link. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The role codes for the care team members. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-careteamrole + pub role: Option, + /// Practitioner credential or specialization /// - /// ## Cardinality: Optional, Multiple (0..*) + /// The qualification of the practitioner which is applicable for this service. + /// + /// ## Requirements + /// Need to specify which qualification a provider is delivering the product or + /// service under. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub target: Option>, + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Provider professional qualifications. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/provider-qualification + pub qualification: Option, } -/// Choice of types for the value\[x\] field in GroupCharacteristic +/// Choice of types for the diagnosis\[x\] field in ExplanationOfBenefitDiagnosis #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "value")] -pub enum GroupCharacteristicValue { +#[fhir_choice_element(base_name = "diagnosis")] +pub enum ExplanationOfBenefitDiagnosisDiagnosis { /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "valueCodeableConcept")] + #[fhir_serde(rename = "diagnosisCodeableConcept")] CodeableConcept(CodeableConcept), - /// Variant accepting the Boolean type. - #[fhir_serde(rename = "valueBoolean")] - Boolean(Boolean), - /// Variant accepting the Quantity type. - #[fhir_serde(rename = "valueQuantity")] - Quantity(Quantity), - /// Variant accepting the Range type. - #[fhir_serde(rename = "valueRange")] - Range(Range), /// Variant accepting the Reference type. - #[fhir_serde(rename = "valueReference")] + #[fhir_serde(rename = "diagnosisReference")] Reference(Reference), } -/// Include / Exclude group members by Trait +/// Pertinent diagnosis information /// -/// Identifies traits whose presence r absence is shared by members of the group. +/// Information about diagnoses relevant to the claim items. /// /// ## Requirements -/// Needs to be a generic mechanism for identifying what individuals can be part -/// of a group. -/// -/// ## Implementation Notes -/// All the identified characteristics must be true for an entity to a member of -/// the group. +/// Required for the adjudication by provided context for the services and +/// product listed. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -65875,8 +65495,8 @@ pub enum GroupCharacteristicValue { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "value")] -pub struct GroupCharacteristic { +#[fhir_resource(choice_elements = "diagnosis")] +pub struct ExplanationOfBenefitDiagnosis { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -65957,12 +65577,31 @@ pub struct GroupCharacteristic { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Kind of characteristic + /// Diagnosis instance identifier /// - /// A code that identifies the kind of trait being asserted. + /// A number to uniquely identify diagnosis entries. /// /// ## Requirements - /// Need a formal way of identifying the characteristic being described. + /// Necessary to maintain the order of the diagnosis items and provide a + /// mechanism to link to claim details. + /// + /// ## Implementation Notes + /// Diagnosis are presented in list order to their expected importance: primary, + /// secondary, etc. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Nature of illness or problem + /// + /// The nature of illness or problem in a coded form or as a reference to an + /// external defined Condition. + /// + /// ## Requirements + /// Provides health context for the evaluation of the products and/or services. /// /// ## Cardinality: Required (1..1) /// @@ -65972,21 +65611,22 @@ pub struct GroupCharacteristic { /// /// ## Binding /// - **Strength**: example - /// - **Description**: List of characteristics used to describe group members; e.g. gender, age, owner, location, etc. - pub code: CodeableConcept, - /// Value held by characteristic + /// - **Description**: ICD10 Diagnostic codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/icd-10 + #[fhir_serde(flatten)] + pub diagnosis: Option, + /// Timing or nature of the diagnosis /// - /// The value of the trait that holds (or does not hold - see 'exclude') for - /// members of the group. + /// When the condition was observed or the relative ranking. /// /// ## Requirements - /// The value of the characteristic is what determines group membership. + /// Often required to capture a particular diagnosis, for example: primary or + /// discharge. /// /// ## Implementation Notes - /// For Range, it means members of the group have a value that falls somewhere - /// within the specified range. + /// For example: admitting, primary, secondary, discharge. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -65994,190 +65634,297 @@ pub struct GroupCharacteristic { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Value of descriptive member characteristic; e.g. red, male, pneumonia, Caucasian, etc. - #[fhir_serde(flatten)] - pub value: Option, - /// Group includes or excludes + /// - **Description**: The type of the diagnosis: admitting, principal, discharge. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosistype + #[fhir_serde(rename = "type")] + pub r#type: Option>, + /// Present on admission /// - /// If true, indicates the characteristic is one that is NOT held by members of - /// the group. + /// Indication of whether the diagnosis was present on admission to a facility. /// /// ## Requirements - /// Sometimes group membership is determined by characteristics not possessed. - /// - /// ## Implementation Notes - /// This is labeled as "Is Modifier" because applications cannot wrongly include - /// excluded members as included or vice versa. + /// Many systems need to understand for adjudication if the diagnosis was present + /// a time of admission. /// - /// ## Cardinality: Required (1..1) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub exclude: Boolean, - /// Period over which characteristic is tested /// - /// The period over which the characteristic is tested; e.g. the patient had an - /// operation during the month of June. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Present on admission. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission + #[fhir_serde(rename = "onAdmission")] + pub on_admission: Option, + /// Package billing code + /// + /// A package billing code or bundle code used to group products and services to + /// a particular health condition (such as heart attack) which is based on a + /// predetermined grouping code system. + /// + /// ## Requirements + /// Required to relate the current diagnosis to a package billing code that is + /// then referenced on the individual claim items which are specific to the + /// health condition covered by the package code. + /// + /// ## Implementation Notes + /// For example, DRG (Diagnosis Related Group) or a bundled billing code. A + /// patient may have a diagnosis of a Myocardio-infarction and a DRG for + /// HeartAttack would assigned. The Claim item (and possible subsequent claims) + /// would refer to the DRG for those line items that were for services related to + /// the heart attack event. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The DRG codes associated with the diagnosis. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + #[fhir_serde(rename = "packageCode")] + pub package_code: Option, } -/// FHIR Group type +/// Patient insurance information /// -/// Represents a defined collection of entities that may be discussed or acted -/// upon collectively but which are not expected to act collectively, and are not -/// formally or legally recognized; i.e. a collection of entities that isn't an -/// Organization. +/// Financial instruments for reimbursement for the health care products and +/// services specified on the claim. /// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource +/// ## Requirements +/// At least one insurer is required for a claim to be a claim. /// -/// ## Status: draft -/// FHIR Version: 4.0.1 +/// ## Implementation Notes +/// All insurance coverages for the patient which may be applicable for +/// reimbursement, of the products and services listed in the claim, are +/// typically provided in the claim to allow insurers to confirm the ordering of +/// the insurance coverages relative to local 'coordination of benefit' rules. +/// One coverage (and only one) with 'focal=true' is to be used in the +/// adjudication of this claim. Coverages appearing before the focal Coverage in +/// the list, and where 'Coverage.subrogation=false', should provide a reference +/// to the ClaimResponse containing the adjudication results of the prior claim. /// -/// See: [Group](http://hl7.org/fhir/StructureDefinition/Group) +/// ## Cardinality: Required, Multiple (1..*) +/// +/// ## Special Semantics +/// - Included in summary +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct Group { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. +pub struct ExplanationOfBenefitInsurance { + /// Unique id for inter-element referencing /// - /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary pub id: Option, - /// Metadata about the resource + /// Additional content defined by implementations /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// May be used to represent additional information that is not part of the basic + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// - /// ## Cardinality: Optional (0..1) + /// ## Implementation Notes + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. + /// ## Aliases + /// extensions, user content + pub extension: Option>, + /// Extensions that cannot be ignored even if unrecognized + /// + /// May be used to represent additional information that is not part of the basic + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's + /// descendants. Usually modifier elements provide negation or qualification. To + /// make the use of extensions safe and manageable, there is a strict set of + /// governance applied to the definition and use of extensions. Though any + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications + /// processing a resource are required to check for modifier extensions. + /// + /// Modifier extensions SHALL NOT change the meaning of any elements on Resource + /// or DomainResource (including cannot change the meaning of modifierExtension + /// itself). + /// + /// ## Requirements + /// Modifier extensions allow for extensions that *cannot* be safely ignored to + /// be clearly distinguished from the vast majority of extensions which can be + /// safely ignored. This promotes interoperability by eliminating the need for + /// implementers to prohibit the presence of extensions. For further information, + /// see the [definition of modifier + /// extensions](extensibility.html#modifierExtension). /// /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. + /// There can be no stigma associated with the use of extensions by any + /// application, project, or standard - regardless of the institution or + /// jurisdiction that uses or defines the extensions. The use of extensions is + /// what allows the FHIR specification to retain a core level of simplicity for + /// everyone. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// - **ext-1**: Must have either extensions or value[x], not both (error) + /// Expression: `extension.exists() != value.exists()` /// - /// The base language in which the resource is written. + /// ## Aliases + /// extensions, user content, modifiers + #[fhir_serde(rename = "modifierExtension")] + pub modifier_extension: Option>, + /// Coverage to be used for adjudication + /// + /// A flag to indicate that this Coverage is to be used for adjudication of this + /// claim when set to true. + /// + /// ## Requirements + /// To identify which coverage in the list is being used to adjudicate this + /// claim. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// A patient may (will) have multiple insurance policies which provide + /// reimbursement for healthcare services and products. For example, a person may + /// also be covered by their spouse's policy and both appear in the list (and may + /// be from the same insurer). This flag will be set to true for only one of the + /// listed policies and that policy will be used for adjudicating this claim. + /// Other claims would be created to request adjudication against the other + /// listed policies. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Required (1..1) + /// + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub focal: Boolean, + /// Insurance information /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// Reference to the insurance card level information contained in the Coverage + /// resource. The coverage issuing insurer will use these details to locate the + /// patient's actual coverage within the insurer's information system. /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// ## Requirements + /// Required to allow the adjudicator to locate the correct policy and history + /// within their information system. /// - /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// ## Cardinality: Required (1..1) /// - /// ## Cardinality: Optional (0..1) + /// ## Special Semantics + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub coverage: Reference, + /// Prior authorization reference number /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources + /// Reference numbers previously provided by the insurer to the provider to be + /// quoted on subsequent claims containing services or products related to the + /// prior authorization. /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. + /// ## Requirements + /// Providers must quote previously issued authorization reference numbers in + /// order to obtain adjudication as previously advised on the Preauthorization. /// /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. + /// This value is an alphanumeric string that may be provided over the phone, via + /// text, via paper, or within a ClaimResponse resource and is not a FHIR + /// Identifier. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "preAuthRef")] + pub pre_auth_ref: Option>, +} + +/// Choice of types for the serviced\[x\] field in ExplanationOfBenefitItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "serviced")] +pub enum ExplanationOfBenefitItemServiced { + /// Variant accepting the Date type. + #[fhir_serde(rename = "servicedDate")] + Date(Date), + /// Variant accepting the Period type. + #[fhir_serde(rename = "servicedPeriod")] + Period(Period), +} + +/// Choice of types for the location\[x\] field in ExplanationOfBenefitItem +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] +#[fhir_choice_element(base_name = "location")] +pub enum ExplanationOfBenefitItemLocation { + /// Variant accepting the CodeableConcept type. + #[fhir_serde(rename = "locationCodeableConcept")] + CodeableConcept(CodeableConcept), + /// Variant accepting the Address type. + #[fhir_serde(rename = "locationAddress")] + Address(Address), + /// Variant accepting the Reference type. + #[fhir_serde(rename = "locationReference")] + Reference(Reference), +} + +/// Product or service provided +/// +/// A claim line. Either a simple (a product or service) or a 'group' of details +/// which can also be a simple items or groups of sub-details. +/// +/// ## Requirements +/// The items to be processed for adjudication. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +#[fhir_resource(choice_elements = "serviced,location")] +pub struct ExplanationOfBenefitItem { + /// Unique id for inter-element referencing + /// + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. + /// + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -66197,16 +65944,16 @@ pub struct Group { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -66231,7 +65978,8 @@ pub struct Group { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -66240,108 +65988,230 @@ pub struct Group { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Unique id + /// Item instance identifier /// - /// A unique business identifier for this group. + /// A number to uniquely identify item entries. /// /// ## Requirements - /// Allows the group to be referenced from external specifications. + /// Necessary to provide a mechanism to link to items from within the claim and + /// within the adjudication details of the ClaimResponse. + /// + /// ## Cardinality: Required (1..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Applicable care team members + /// + /// Care team members related to this service or product. + /// + /// ## Requirements + /// Need to identify the individuals and their roles in the provision of the + /// product or service. /// /// ## Cardinality: Optional, Multiple (0..*) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "careTeamSequence")] + pub care_team_sequence: Option>, + /// Applicable diagnoses + /// + /// Diagnoses applicable for this service or product. + /// + /// ## Requirements + /// Need to related the product or service to the associated diagnoses. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// Whether this group's record is in active use + #[fhir_serde(rename = "diagnosisSequence")] + pub diagnosis_sequence: Option>, + /// Applicable procedures /// - /// Indicates whether the record for the group is available for use or is merely - /// being retained for historical purposes. + /// Procedures applicable for this service or product. /// /// ## Requirements - /// Need to be able to mark a group record as not to be used because it was - /// created in error or is otherwise no longer available (e.g. a herd that no - /// longer exists). + /// Need to provide any listed specific procedures to support the product or + /// service being claimed. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "procedureSequence")] + pub procedure_sequence: Option>, + /// Applicable exception and supporting information + /// + /// Exceptions, special conditions and supporting information applicable for this + /// service or product. + /// + /// ## Requirements + /// Need to reference the supporting information items that relate directly to + /// this product or service. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "informationSequence")] + pub information_sequence: Option>, + /// Revenue or cost center code + /// + /// The type of revenue or cost center providing the product and/or service. + /// + /// ## Requirements + /// Needed in the processing of institutional claims. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// - When missing: This resource is generally assumed to be active if no value is provided for the active element + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center + pub revenue: Option, + /// Benefit classification + /// + /// Code to identify the general type of benefits under which products and + /// services are provided. + /// + /// ## Requirements + /// Needed in the processing of institutional claims as this allows the insurer + /// to determine whether a facial X-Ray is for dental, orthopedic, or facial + /// surgery purposes. + /// + /// ## Implementation Notes + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub active: Option, - /// person | animal | practitioner | device | medication | substance /// - /// Identifies the broad classification of the kind of resources the group - /// includes. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: Option, + /// Billing, service, product, or drug code + /// + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. /// /// ## Requirements - /// Identifies what type of resources the group is made up of. + /// Necessary to state what was provided or done. /// /// ## Implementation Notes - /// Group members SHALL be of the appropriate resource type (Patient for person - /// or animal; or Practitioner, Device, Medication or Substance for the other - /// types.). + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: Types of resources that are part of group. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/group-type|4.0.1 - #[fhir_serde(rename = "type")] - pub r#type: Code, - /// Descriptive or actual + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls /// - /// If true, indicates that the resource refers to a specific group of real - /// individuals. If false, the group defines a set of intended individuals. + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Product or service billing modifiers + /// + /// Item typification or modifiers codes to convey additional context for the + /// product or service. /// /// ## Requirements - /// There are use-cases for groups that define specific collections of - /// individuals, and other groups that define "types" of intended individuals. - /// The requirements for both kinds of groups are similar, so we use a single - /// resource, distinguished by this flag. + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. /// - /// ## Cardinality: Required (1..1) + /// ## Implementation Notes + /// For example, in Oral whether the treatment is cosmetic or associated with + /// TMJ, or for Medical whether the treatment was outside the clinic or out of + /// office hours. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// - /// ## Conditions - /// Used when: grp-1 - pub actual: Boolean, - /// Kind of Group members + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Program the product or service is provided under /// - /// Provides a specific type of resource the group includes; e.g. "cow", - /// "syringe", etc. + /// Identifies the program under which this may be recovered. + /// + /// ## Requirements + /// Commonly used in in the identification of publicly provided program focused + /// on population segments or disease classifications. /// /// ## Implementation Notes - /// This would generally be omitted for Person resources. + /// For example: Neonatal program, child dental program or drug users recovery + /// program. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: Program specific reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code + #[fhir_serde(rename = "programCode")] + pub program_code: Option>, + /// Date or dates of service or product delivery + /// + /// The date or dates when the service or product was supplied, performed or + /// completed. + /// + /// ## Requirements + /// Needed to determine whether the service or product was provided during the + /// term of the insurance coverage. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(flatten)] + pub serviced: Option, + /// Place of service or where product was supplied + /// + /// Where the product or service was provided. + /// + /// ## Requirements + /// The location can alter whether the item was acceptable for insurance purposes + /// or impact the determination of the benefit amount. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -66349,117 +66219,208 @@ pub struct Group { /// /// ## Binding /// - **Strength**: example - /// - **Description**: Kind of particular resource; e.g. cow, syringe, lake, etc. - pub code: Option, - /// Label for Group + /// - **Description**: Place where the service is rendered. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-place + #[fhir_serde(flatten)] + pub location: Option, + /// Count of products or services /// - /// A label assigned to the group for human identification and communication. + /// The number of repetitions of a service or product. /// /// ## Requirements - /// Used to identify the group in human communication. + /// Required when the product or service code does not convey the quantity + /// provided. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub quantity: Option, + /// Fee, charge or cost per item + /// + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. + /// + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub name: Option, - /// Number of members + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor /// - /// A count of the number of resource instances that are part of the group. + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. /// /// ## Requirements - /// Group size is a common defining characteristic. + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// /// ## Implementation Notes - /// Note that the quantity may be less than the number of members if some of the - /// members are not active. + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub quantity: Option, - /// Entity that is the custodian of the Group's definition + pub factor: Option, + /// Total item cost /// - /// Entity responsible for defining and maintaining Group characteristics and/or - /// registered members. + /// The quantity times the unit price for an additional service or product or + /// charge. + /// + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. /// /// ## Implementation Notes - /// This does not strictly align with ownership of a herd or flock, but may - /// suffice to represent that relationship in simple cases. More complex cases - /// will require an extension. + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub net: Option, + /// Unique device identifier + /// + /// Unique Device Identifiers associated with this line item. + /// + /// ## Requirements + /// The UDI code allows the insurer to obtain device level information on the + /// product supplied. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "managingEntity")] - pub managing_entity: Option, - /// Include / Exclude group members by Trait + pub udi: Option>, + /// Anatomical location /// - /// Identifies traits whose presence r absence is shared by members of the group. + /// Physical service site on the patient (limb, tooth, etc.). /// /// ## Requirements - /// Needs to be a generic mechanism for identifying what individuals can be part - /// of a group. + /// Allows insurer to validate specific procedures. /// /// ## Implementation Notes - /// All the identified characteristics must be true for an entity to a member of - /// the group. + /// For example: Providing a tooth code, allows an insurer to identify a provider + /// performing a filling on a tooth that was previously removed. + /// + /// ## Cardinality: Optional (0..1) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + /// + /// ## Binding + /// - **Strength**: example + /// - **Description**: The code for the teeth, quadrant, sextant and arch. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/tooth + #[fhir_serde(rename = "bodySite")] + pub body_site: Option, + /// Anatomical sub-location + /// + /// A region or surface of the bodySite, e.g. limb region or tooth surface(s). + /// + /// ## Requirements + /// Allows insurer to validate specific procedures. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub characteristic: Option>, - /// Who or what is in group /// - /// Identifies the resource instances that are members of the group. + /// ## Binding + /// - **Strength**: example + /// - **Description**: The code for the tooth surface and surface combinations. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/surface + #[fhir_serde(rename = "subSite")] + pub sub_site: Option>, + /// Encounters related to this billed item + /// + /// A billed item may include goods or services provided in multiple encounters. /// /// ## Requirements - /// Often the only thing of interest about a group is "who's in it". + /// Used in some jurisdictions to link clinical events to claim items. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub encounter: Option>, + /// Applicable note numbers /// - /// ## Conditions - /// Used when: grp-1 - pub member: Option>, + /// The numbers associated with notes below which apply to the adjudication of + /// this item. + /// + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Adjudication details + /// + /// If this item is a group then the values here are a summary of the + /// adjudication of the detail items. If this item is a simple product or service + /// then this is the result of the adjudication of this item. + /// + /// ## Requirements + /// The adjudication results conveys the insurer's assessment of the item + /// provided in the claim under the terms of the patient's insurance coverage. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub adjudication: Option>, + /// Additional items + /// + /// Second-tier of goods and services. + /// + /// ## Cardinality: Optional, Multiple (0..*) + /// + /// ## Constraints + /// - **ele-1**: All FHIR elements must have a @value or children (error) + /// Expression: `hasValue() or (children().count() > id.count())` + pub detail: Option>, } -/// Who or what is in group +/// Adjudication details /// -/// Identifies the resource instances that are members of the group. +/// If this item is a group then the values here are a summary of the +/// adjudication of the detail items. If this item is a simple product or service +/// then this is the result of the adjudication of this item. /// /// ## Requirements -/// Often the only thing of interest about a group is "who's in it". +/// The adjudication results conveys the insurer's assessment of the item +/// provided in the claim under the terms of the patient's insurance coverage. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` -/// -/// ## Conditions -/// Used when: grp-1 #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct GroupMember { +pub struct ExplanationOfBenefitItemAdjudication { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -66540,221 +66501,117 @@ pub struct GroupMember { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// Reference to the group member + /// Type of adjudication information /// - /// A reference to the entity that is a member of the group. Must be consistent - /// with Group.type. If the entity is another group, then the type must be the - /// same. + /// A code to indicate the information type of this adjudication record. + /// Information types may include: the value submitted, maximum values or + /// percentages allowed or payable under the plan, amounts that the patient is + /// responsible for in-aggregate or pertaining to this item, amounts paid by + /// other coverages, and the benefit payable for this item. + /// + /// ## Requirements + /// Needed to enable understanding of the context of the other information in the + /// adjudication. + /// + /// ## Implementation Notes + /// For example, codes indicating: Co-Pay, deductible, eligible, benefit, tax, + /// etc. /// /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub entity: Reference, - /// Period member belonged to the group - /// - /// The period that the member was in the group, if known. /// - /// ## Requirements - /// Need to track who was in a group at a particular time. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - When missing: The member is in the group at this time - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub period: Option, - /// If member is no longer in group + /// ## Binding + /// - **Strength**: example + /// - **Description**: The adjudication codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication + pub category: CodeableConcept, + /// Explanation of adjudication outcome /// - /// A flag to indicate that the member is no longer in the group, but previously - /// may have been a member. + /// A code supporting the understanding of the adjudication result and explaining + /// variance from expected amount. /// /// ## Requirements - /// Sometimes you don't know when someone stopped being in a group, but not when. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - When missing: Members are considered active unless explicitly specified otherwise - /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - pub inactive: Option, -} - -/// Choice of types for the module\[x\] field in GuidanceResponse -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath)] -#[fhir_choice_element(base_name = "module")] -pub enum GuidanceResponseModule { - /// Variant accepting the Uri type. - #[fhir_serde(rename = "moduleUri")] - Uri(Uri), - /// Variant accepting the Canonical type. - #[fhir_serde(rename = "moduleCanonical")] - Canonical(Canonical), - /// Variant accepting the CodeableConcept type. - #[fhir_serde(rename = "moduleCodeableConcept")] - CodeableConcept(CodeableConcept), -} - -/// FHIR GuidanceResponse type -/// -/// A guidance response is the formal response to a guidance request, including -/// any output parameters returned by the evaluation, as well as the description -/// of any proposed actions to be taken. -/// -/// ## Purpose -/// The GuidanceResponse resource supports recording the results of decision support interactions, reportability determination for public health, as well as the communication of additional data requirements for subsequent interactions. -/// -/// ## Type: Resource type -/// Base type: http://hl7.org/fhir/StructureDefinition/DomainResource -/// -/// ## Status: draft -/// FHIR Version: 4.0.1 -/// -/// See: [GuidanceResponse](http://hl7.org/fhir/StructureDefinition/GuidanceResponse) -#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -#[fhir_resource(choice_elements = "module")] -pub struct GuidanceResponse { - /// Logical id of this artifact - /// - /// The logical id of the resource, as used in the URL for the resource. Once - /// assigned, this value never changes. + /// To support understanding of variance from adjudication expectations. /// /// ## Implementation Notes - /// The only time that a resource does not have an id is when it is being - /// submitted to the server using a create operation. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Included in summary - pub id: Option, - /// Metadata about the resource - /// - /// The metadata about the resource. This is content that is maintained by the - /// infrastructure. Changes to the content might not always be associated with - /// version changes to the resource. + /// For example, may indicate that the funds for this benefit type have been + /// exhausted. /// /// ## Cardinality: Optional (0..1) /// - /// ## Special Semantics - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub meta: Option, - /// A set of rules under which this content was created - /// - /// A reference to a set of rules that were followed when the resource was - /// constructed, and which must be understood when processing the content. Often, - /// this is a reference to an implementation guide that defines the special rules - /// along with other profiles etc. /// - /// ## Implementation Notes - /// Asserting this rule set restricts the content to be only understood by a - /// limited set of trading partners. This inherently limits the usefulness of the - /// data in the long term. However, the existing health eco-system is highly - /// fractured, and not yet ready to define, collect, and exchange data in a - /// generally computable sense. Wherever possible, implementers and/or - /// specification writers should avoid using this element. Often, when used, the - /// URL is a reference to an implementation guide that defines these special - /// rules as part of it's narrative along with other profiles, value sets, etc. - /// - /// ## Cardinality: Optional (0..1) - /// - /// ## Special Semantics - /// - Modifier element - This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation - /// - Included in summary + /// ## Binding + /// - **Strength**: example + /// - **Description**: Adjudication reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/adjudication-reason + pub reason: Option, + /// Monetary amount /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "implicitRules")] - pub implicit_rules: Option, - /// Language of the resource content + /// Monetary amount associated with the category. /// - /// The base language in which the resource is written. + /// ## Requirements + /// Most adjuciation categories convey a monetary amount. /// /// ## Implementation Notes - /// Language is provided to support indexing and accessibility (typically, - /// services such as text to speech use the language tag). The html language tag - /// in the narrative applies to the narrative. The language tag on the resource - /// may be used to specify the language of other presentations generated from the - /// data in the resource. Not all the content has to be in the base language. The - /// Resource.language should not be assumed to apply to the narrative - /// automatically. If a language is specified, it should it also be specified on - /// the div element in the html (see rules in HTML5 for information about the - /// relationship between xml:lang and the html lang attribute). + /// For example, amount submitted, eligible amount, co-payment, and benefit + /// payable. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub amount: Option, + /// Non-monitary value /// - /// ## Binding - /// - **Strength**: preferred - /// - **Description**: A human language. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/languages - pub language: Option, - /// Text summary of the resource, for human interpretation + /// A non-monetary value associated with the category. Mutually exclusive to the + /// amount element above. /// - /// A human-readable narrative that contains a summary of the resource and can be - /// used to represent the content of the resource to a human. The narrative need - /// not encode all the structured data, but is required to contain sufficient - /// detail to make it "clinically safe" for a human to just read the narrative. - /// Resource definitions may define what content should be represented in the - /// narrative to ensure clinical safety. + /// ## Requirements + /// Some adjudication categories convey a percentage or a fixed value. /// /// ## Implementation Notes - /// Contained resources do not have narrative. Resources that are not contained - /// SHOULD have a narrative. In some cases, a resource may only have text with - /// little or no additional discrete data (as long as all minOccurs=1 elements - /// are satisfied). This may be necessary for data from legacy systems where - /// information is captured as a "text blob" or where text is additionally - /// entered raw or narrated and encoded information is added later. + /// For example: eligible percentage or co-payment percentage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub value: Option, +} + +/// Additional items +/// +/// Second-tier of goods and services. +/// +/// ## Cardinality: Optional, Multiple (0..*) +/// +/// ## Constraints +/// - **ele-1**: All FHIR elements must have a @value or children (error) +/// Expression: `hasValue() or (children().count() > id.count())` +#[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] +pub struct ExplanationOfBenefitItemDetail { + /// Unique id for inter-element referencing /// - /// ## Aliases - /// narrative, html, xhtml, display - pub text: Option, - /// Contained, inline Resources - /// - /// These resources do not have an independent existence apart from the resource - /// that contains them - they cannot be identified independently, and nor can - /// they have their own independent transaction scope. - /// - /// ## Implementation Notes - /// This should never be done when the content can be identified properly, as - /// once identification is lost, it is extremely difficult (and context - /// dependent) to restore it again. Contained resources may have profiles and - /// tags In their meta elements, but SHALL NOT have security labels. - /// - /// ## Cardinality: Optional, Multiple (0..*) + /// Unique id for the element within a resource (for internal references). This + /// may be any string value that does not contain spaces. /// - /// ## Aliases - /// inline resources, anonymous resources, contained resources - pub contained: Option>, + /// ## Cardinality: Optional (0..1) + pub id: Option, /// Additional content defined by implementations /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource. To make the use of extensions safe and - /// manageable, there is a strict set of governance applied to the definition and - /// use of extensions. Though any implementer can define an extension, there is a - /// set of requirements that SHALL be met as part of the definition of the - /// extension. + /// definition of the element. To make the use of extensions safe and manageable, + /// there is a strict set of governance applied to the definition and use of + /// extensions. Though any implementer can define an extension, there is a set of + /// requirements that SHALL be met as part of the definition of the extension. /// /// ## Implementation Notes /// There can be no stigma associated with the use of extensions by any @@ -66774,16 +66631,16 @@ pub struct GuidanceResponse { /// ## Aliases /// extensions, user content pub extension: Option>, - /// Extensions that cannot be ignored + /// Extensions that cannot be ignored even if unrecognized /// /// May be used to represent additional information that is not part of the basic - /// definition of the resource and that modifies the understanding of the element - /// that contains it and/or the understanding of the containing element's + /// definition of the element and that modifies the understanding of the element + /// in which it is contained and/or the understanding of the containing element's /// descendants. Usually modifier elements provide negation or qualification. To /// make the use of extensions safe and manageable, there is a strict set of /// governance applied to the definition and use of extensions. Though any - /// implementer is allowed to define an extension, there is a set of requirements - /// that SHALL be met as part of the definition of the extension. Applications + /// implementer can define an extension, there is a set of requirements that + /// SHALL be met as part of the definition of the extension. Applications /// processing a resource are required to check for modifier extensions. /// /// Modifier extensions SHALL NOT change the meaning of any elements on Resource @@ -66808,7 +66665,8 @@ pub struct GuidanceResponse { /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Special Semantics - /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them + /// - Modifier element - Modifier extensions are expected to modify the meaning or interpretation of the element that contains them + /// - Included in summary /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) @@ -66817,227 +66675,270 @@ pub struct GuidanceResponse { /// Expression: `extension.exists() != value.exists()` /// /// ## Aliases - /// extensions, user content + /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// The identifier of the request associated with this response, if any + /// Product or service provided /// - /// The identifier of the request associated with this response. If an identifier - /// was given as part of the request, it will be reproduced here to enable the - /// requester to more easily identify the response in a multi-request scenario. + /// A claim detail line. Either a simple (a product or service) or a 'group' of + /// sub-details which are simple items. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// The items to be processed for adjudication. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "requestIdentifier")] - pub request_identifier: Option, - /// Business identifier + pub sequence: PositiveInt, + /// Revenue or cost center code /// - /// Allows a service to provide unique, business identifiers for the response. + /// The type of revenue or cost center providing the product and/or service. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Needed in the processing of institutional claims. /// - /// ## Special Semantics - /// - Included in summary + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub identifier: Option>, - /// What guidance was requested /// - /// An identifier, CodeableConcept or canonical reference to the guidance that - /// was requested. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center + pub revenue: Option, + /// Benefit classification /// - /// ## Cardinality: Required (1..1) + /// Code to identify the general type of benefits under which products and + /// services are provided. /// - /// ## Special Semantics - /// - Included in summary + /// ## Requirements + /// Needed in the processing of institutional claims as this allows the insurer + /// to determine whether a facial X-Ray is for dental, orthopedic, or facial + /// surgery purposes. + /// + /// ## Implementation Notes + /// Examples include: Medical Care, Periodontics, Renal Dialysis, Vision + /// Coverage. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(flatten)] - pub module: Option, - /// success | data-requested | data-required | in-progress | failure | entered-in-error /// - /// The status of the response. If the evaluation is completed successfully, the - /// status will indicate success. However, in order to complete the evaluation, - /// the engine may require more information. In this case, the status will be - /// data-required, and the response will contain a description of the additional - /// required information. If the evaluation completed successfully, but the - /// engine determines that a potentially more accurate response could be provided - /// if more data was available, the status will be data-requested, and the - /// response will contain a description of the additional requested information. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Benefit categories such as: oral, medical, vision, oral-basic etc. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-benefitcategory + pub category: Option, + /// Billing, service, product, or drug code + /// + /// When the value is a group code then this item collects a set of related claim + /// details, otherwise this contains the product, service, drug or other billing + /// code for the item. + /// + /// ## Requirements + /// Necessary to state what was provided or done. /// /// ## Implementation Notes - /// This element is labeled as a modifier because the status contains codes that - /// mark the resource as not currently valid. + /// If this is an actual service or product line, i.e. not a Group, then use code + /// to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, + /// USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a + /// group code to indicate the type of thing being grouped e.g. 'glasses' or + /// 'compound'. /// /// ## Cardinality: Required (1..1) /// - /// ## Special Semantics - /// - Modifier element - This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid - /// - Included in summary - /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` /// /// ## Binding - /// - **Strength**: required - /// - **Description**: The status of a guidance response. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/guidance-response-status|4.0.1 - pub status: Code, - /// Patient the request was performed for + /// - **Strength**: example + /// - **Description**: Allowable service and product codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/service-uscls /// - /// The patient for which the request was processed. + /// ## Aliases + /// Drug Code, Bill Code, Service Code + #[fhir_serde(rename = "productOrService")] + pub product_or_service: CodeableConcept, + /// Service/Product billing modifiers /// - /// ## Cardinality: Optional (0..1) + /// Item typification or modifiers codes to convey additional context for the + /// product or service. + /// + /// ## Requirements + /// To support inclusion of the item for adjudication or to charge an elevated + /// fee. + /// + /// ## Implementation Notes + /// For example, in Oral whether the treatment is cosmetic or associated with + /// TMJ, or for Medical whether the treatment was outside the clinic or out of + /// office hours. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub subject: Option, - /// Encounter during which the response was returned /// - /// The encounter during which this response was created or to which the creation - /// of this record is tightly associated. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/claim-modifiers + pub modifier: Option>, + /// Program the product or service is provided under + /// + /// Identifies the program under which this may be recovered. + /// + /// ## Requirements + /// Commonly used in in the identification of publicly provided program focused + /// on population segments or disease classifications. /// /// ## Implementation Notes - /// This will typically be the encounter the event occurred within, but some - /// activities may be initiated prior to or after the official copmletion of an - /// encounter but still be tied to the context of the encounter. + /// For example: Neonatal program, child dental program or drug users recovery + /// program. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub encounter: Option, - /// When the guidance response was processed /// - /// Indicates when the guidance response was processed. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Program specific reason codes. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-program-code + #[fhir_serde(rename = "programCode")] + pub program_code: Option>, + /// Count of products or services + /// + /// The number of repetitions of a service or product. + /// + /// ## Requirements + /// Required when the product or service code does not convey the quantity + /// provided. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "occurrenceDateTime")] - pub occurrence_date_time: Option, - /// Device returning the guidance + pub quantity: Option, + /// Fee, charge or cost per item /// - /// Provides a reference to the device that performed the guidance. + /// If the item is not a group then this is the fee for the product or service, + /// otherwise this is the total of the fees for the details of the group. + /// + /// ## Requirements + /// The amount charged to the patient by the provider for a single unit. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub performer: Option, - /// Why guidance is needed - /// - /// Describes the reason for the guidance response in coded or textual form. + #[fhir_serde(rename = "unitPrice")] + pub unit_price: Option, + /// Price scaling factor /// - /// ## Cardinality: Optional, Multiple (0..*) + /// A real number that represents a multiplier used in determining the overall + /// value of services delivered and/or goods received. The concept of a Factor + /// allows for a discount or surcharge multiplier to be applied to a monetary + /// amount. /// - /// ## Constraints - /// - **ele-1**: All FHIR elements must have a @value or children (error) - /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonCode")] - pub reason_code: Option>, - /// Why guidance is needed + /// ## Requirements + /// When discounts are provided to a patient (example: Senior's discount) then + /// this must be documented for adjudication. /// - /// Indicates the reason the request was initiated. This is typically provided as - /// a parameter to the evaluation and echoed by the service, although for some - /// use cases, such as subscription- or event-based scenarios, it may provide an - /// indication of the cause for the response. + /// ## Implementation Notes + /// To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10). /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "reasonReference")] - pub reason_reference: Option>, - /// Additional notes about the response + pub factor: Option, + /// Total item cost /// - /// Provides a mechanism to communicate additional information about the - /// response. + /// The quantity times the unit price for an additional service or product or + /// charge. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// Provides the total amount claimed for the group (if a grouper) or the line + /// item. + /// + /// ## Implementation Notes + /// For example, the formula: quantity * unitPrice * factor = net. Quantity and + /// factor are assumed to be 1 if not supplied. + /// + /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub note: Option>, - /// Messages resulting from the evaluation of the artifact or artifacts + pub net: Option, + /// Unique device identifier /// - /// Messages resulting from the evaluation of the artifact or artifacts. As part - /// of evaluating the request, the engine may produce informational or warning - /// messages. These messages will be provided by this element. + /// Unique Device Identifiers associated with this line item. + /// + /// ## Requirements + /// The UDI code allows the insurer to obtain device level information on the + /// product supplied. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "evaluationMessage")] - pub evaluation_message: Option>, - /// The output parameters of the evaluation, if any + pub udi: Option>, + /// Applicable note numbers /// - /// The output parameters of the evaluation, if any. Many modules will result in - /// the return of specific resources such as procedure or communication requests - /// that are returned as part of the operation result. However, modules may - /// define specific outputs that would be returned as the result of the - /// evaluation, and these would be returned in this element. + /// The numbers associated with notes below which apply to the adjudication of + /// this item. /// - /// ## Cardinality: Optional (0..1) + /// ## Requirements + /// Provides a condensed manner for associating human readable descriptive + /// explanations for adjudications on the line item. + /// + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "outputParameters")] - pub output_parameters: Option, - /// Proposed actions, if any + #[fhir_serde(rename = "noteNumber")] + pub note_number: Option>, + /// Detail level adjudication details /// - /// The actions, if any, produced by the evaluation of the artifact. + /// The adjudication results. /// - /// ## Cardinality: Optional (0..1) + /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - pub result: Option, - /// Additional required data + pub adjudication: Option>, + /// Additional items /// - /// If the evaluation could not be completed due to lack of information, or - /// additional information would potentially result in a more accurate response, - /// this element will a description of the data required in order to proceed with - /// the evaluation. A subsequent request to the service should include this data. + /// Third-tier of goods and services. /// /// ## Cardinality: Optional, Multiple (0..*) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "dataRequirement")] - pub data_requirement: Option>, + #[fhir_serde(rename = "subDetail")] + pub sub_detail: Option>, } -/// Times the Service Site is available -/// -/// A collection of times that the Service Site is available. +/// Additional items /// -/// ## Implementation Notes -/// More detailed availability information may be provided in associated -/// Schedule/Slot resources. +/// Third-tier of goods and services. /// /// ## Cardinality: Optional, Multiple (0..*) /// @@ -67045,7 +66946,7 @@ pub struct GuidanceResponse { /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` #[derive(Debug, Clone, PartialEq, Eq, FhirSerde, FhirPath, Default)] -pub struct HealthcareServiceAvailableTime { +pub struct ExplanationOfBenefitItemDetailSubDetail { /// Unique id for inter-element referencing /// /// Unique id for the element within a resource (for internal references). This @@ -67126,215 +67027,287 @@ pub struct HealthcareServiceAvailableTime { /// extensions, user content, modifiers #[fhir_serde(rename = "modifierExtension")] pub modifier_extension: Option>, - /// mon | tue | wed | thu | fri | sat | sun + /// Product or service provided /// - /// Indicates which days of the week are available between the start and end - /// Times. + /// A claim detail line. Either a simple (a product or service) or a 'group' of + /// sub-details which are simple items. /// - /// ## Cardinality: Optional, Multiple (0..*) + /// ## Requirements + /// The items to be processed for adjudication. + /// + /// ## Cardinality: Required (1..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` + pub sequence: PositiveInt, + /// Revenue or cost center code /// - /// ## Binding - /// - **Strength**: required - /// - **Description**: The days of the week. - /// - **ValueSet**: http://hl7.org/fhir/ValueSet/days-of-week|4.0.1 - #[fhir_serde(rename = "daysOfWeek")] - pub days_of_week: Option>, - /// Always available? e.g. 24 hour service + /// The type of revenue or cost center providing the product and/or service. /// - /// Is this always available? (hence times are irrelevant) e.g. 24 hour service. + /// ## Requirements + /// Needed in the processing of institutional claims. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "allDay")] - pub all_day: Option, - /// Opening time of day (ignored if allDay = true) /// - /// The opening time of day. Note: If the AllDay flag is set, then this time is - /// ignored. + /// ## Binding + /// - **Strength**: example + /// - **Description**: Codes for the revenue or cost centers supplying the service and/or products. + /// - **ValueSet**: http://hl7.org/fhir/ValueSet/ex-revenue-center + pub revenue: Option, + /// Benefit classification + /// + /// Code to identify the general type of benefits under which products and + /// services are provided. + /// + /// ## Requirements + /// Needed in the processing of institutional claims as this allows the insurer + /// to determine whether a facial X-Ray is for dental, orthopedic, or facial + /// surgery purposes. /// /// ## Implementation Notes - /// The time zone is expected to be for where this HealthcareService is provided - /// at. + /// Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage. /// /// ## Cardinality: Optional (0..1) /// /// ## Constraints /// - **ele-1**: All FHIR elements must have a @value or children (error) /// Expression: `hasValue() or (children().count() > id.count())` - #[fhir_serde(rename = "availableStartTime")] - pub available_start_time: Option