fhirbolt_model/generated/r4/types/
usage_context.rs1#[doc = "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum UsageContextValue {
5 CodeableConcept(Box<super::super::types::CodeableConcept>),
6 Quantity(Box<super::super::types::Quantity>),
7 Range(Box<super::super::types::Range>),
8 Reference(Box<super::super::types::Reference>),
9 #[default]
10 Invalid,
11}
12#[doc = "Base StructureDefinition for UsageContext Type: Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).\n\nConsumers of the resource must be able to determine the intended applicability for the resource. Ideally, this information would be used programmatically to determine when and how it should be incorporated or exposed."]
13#[derive(Debug, Clone, PartialEq)]
14pub struct UsageContext {
15 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
16 pub r#id: Option<std::string::String>,
17 #[doc = "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."]
18 pub r#extension: Vec<super::super::types::Extension>,
19 #[doc = "A code that identifies the type of context being specified by this usage context."]
20 pub r#code: Box<super::super::types::Coding>,
21 #[doc = "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code."]
22 pub r#value: UsageContextValue,
23}
24#[allow(clippy::derivable_impls)]
25impl Default for UsageContext {
26 fn default() -> Self {
27 Self {
28 r#id: Default::default(),
29 r#extension: Default::default(),
30 r#code: Box::new(super::super::types::Coding {
31 id: Some("$invalid".to_string()),
32 ..Default::default()
33 }),
34 r#value: Default::default(),
35 }
36 }
37}