fhirbolt_model/generated/r4/resources/
message_header.rs1#[doc = "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"<http://terminology.hl7.org/CodeSystem/message>-events\". Alternatively uri to the EventDefinition."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum MessageHeaderEvent {
5 Coding(Box<super::super::types::Coding>),
6 Uri(super::super::types::Uri),
7 #[default]
8 Invalid,
9}
10#[doc = "The destination application which the message is intended for."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct MessageHeaderDestination {
13 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
14 pub r#id: Option<std::string::String>,
15 #[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."]
16 pub r#extension: Vec<super::super::types::Extension>,
17 #[doc = "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
18 pub r#modifier_extension: Vec<super::super::types::Extension>,
19 #[doc = "Human-readable name for the target system."]
20 pub r#name: Option<super::super::types::String>,
21 #[doc = "Identifies the target end system in situations where the initial message transmission is to an intermediary system."]
22 pub r#target: Option<Box<super::super::types::Reference>>,
23 #[doc = "Indicates where the message should be routed to."]
24 pub r#endpoint: super::super::types::Url,
25 #[doc = "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient."]
26 pub r#receiver: Option<Box<super::super::types::Reference>>,
27}
28#[allow(clippy::derivable_impls)]
29impl Default for MessageHeaderDestination {
30 fn default() -> Self {
31 Self {
32 r#id: Default::default(),
33 r#extension: Default::default(),
34 r#modifier_extension: Default::default(),
35 r#name: Default::default(),
36 r#target: Default::default(),
37 r#endpoint: super::super::types::Url {
38 id: Some("$invalid".to_string()),
39 ..Default::default()
40 },
41 r#receiver: Default::default(),
42 }
43 }
44}
45#[doc = "The source application from which this message originated."]
46#[derive(Debug, Clone, PartialEq)]
47pub struct MessageHeaderSource {
48 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
49 pub r#id: Option<std::string::String>,
50 #[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."]
51 pub r#extension: Vec<super::super::types::Extension>,
52 #[doc = "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
53 pub r#modifier_extension: Vec<super::super::types::Extension>,
54 #[doc = "Human-readable name for the source system."]
55 pub r#name: Option<super::super::types::String>,
56 #[doc = "May include configuration or other information useful in debugging."]
57 pub r#software: Option<super::super::types::String>,
58 #[doc = "Can convey versions of multiple systems in situations where a message passes through multiple hands."]
59 pub r#version: Option<super::super::types::String>,
60 #[doc = "An e-mail, phone, website or other contact point to use to resolve issues with message communications."]
61 pub r#contact: Option<Box<super::super::types::ContactPoint>>,
62 #[doc = "Identifies the routing target to send acknowledgements to."]
63 pub r#endpoint: super::super::types::Url,
64}
65#[allow(clippy::derivable_impls)]
66impl Default for MessageHeaderSource {
67 fn default() -> Self {
68 Self {
69 r#id: Default::default(),
70 r#extension: Default::default(),
71 r#modifier_extension: Default::default(),
72 r#name: Default::default(),
73 r#software: Default::default(),
74 r#version: Default::default(),
75 r#contact: Default::default(),
76 r#endpoint: super::super::types::Url {
77 id: Some("$invalid".to_string()),
78 ..Default::default()
79 },
80 }
81 }
82}
83#[doc = "Information about the message that this message is a response to. Only present if this message is a response."]
84#[derive(Debug, Clone, PartialEq)]
85pub struct MessageHeaderResponse {
86 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
87 pub r#id: Option<std::string::String>,
88 #[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."]
89 pub r#extension: Vec<super::super::types::Extension>,
90 #[doc = "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
91 pub r#modifier_extension: Vec<super::super::types::Extension>,
92 #[doc = "The MessageHeader.id of the message to which this message is a response."]
93 pub r#identifier: super::super::types::Id,
94 #[doc = "Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not."]
95 pub r#code: super::super::types::Code,
96 #[doc = "Full details of any issues found in the message."]
97 pub r#details: Option<Box<super::super::types::Reference>>,
98}
99#[allow(clippy::derivable_impls)]
100impl Default for MessageHeaderResponse {
101 fn default() -> Self {
102 Self {
103 r#id: Default::default(),
104 r#extension: Default::default(),
105 r#modifier_extension: Default::default(),
106 r#identifier: super::super::types::Id {
107 id: Some("$invalid".to_string()),
108 ..Default::default()
109 },
110 r#code: super::super::types::Code {
111 id: Some("$invalid".to_string()),
112 ..Default::default()
113 },
114 r#details: Default::default(),
115 }
116 }
117}
118#[doc = "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.\n\nMany implementations are not prepared to use REST and need a messaging based infrastructure."]
119#[derive(Debug, Clone, PartialEq)]
120pub struct MessageHeader {
121 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
122 pub r#id: Option<super::super::types::Id>,
123 #[doc = "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."]
124 pub r#meta: Option<Box<super::super::types::Meta>>,
125 #[doc = "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."]
126 pub r#implicit_rules: Option<super::super::types::Uri>,
127 #[doc = "The base language in which the resource is written."]
128 pub r#language: Option<super::super::types::Code>,
129 #[doc = "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."]
130 pub r#text: Option<Box<super::super::types::Narrative>>,
131 #[doc = "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."]
132 pub r#contained: Vec<super::super::Resource>,
133 #[doc = "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."]
134 pub r#extension: Vec<super::super::types::Extension>,
135 #[doc = "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
136 pub r#modifier_extension: Vec<super::super::types::Extension>,
137 #[doc = "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"<http://terminology.hl7.org/CodeSystem/message>-events\". Alternatively uri to the EventDefinition."]
138 pub r#event: MessageHeaderEvent,
139 #[doc = "The destination application which the message is intended for."]
140 pub r#destination: Vec<MessageHeaderDestination>,
141 #[doc = "Identifies the sending system to allow the use of a trust relationship."]
142 pub r#sender: Option<Box<super::super::types::Reference>>,
143 #[doc = "The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions."]
144 pub r#enterer: Option<Box<super::super::types::Reference>>,
145 #[doc = "The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions."]
146 pub r#author: Option<Box<super::super::types::Reference>>,
147 #[doc = "The source application from which this message originated."]
148 pub r#source: MessageHeaderSource,
149 #[doc = "The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party."]
150 pub r#responsible: Option<Box<super::super::types::Reference>>,
151 #[doc = "Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message."]
152 pub r#reason: Option<Box<super::super::types::CodeableConcept>>,
153 #[doc = "Information about the message that this message is a response to. Only present if this message is a response."]
154 pub r#response: Option<MessageHeaderResponse>,
155 #[doc = "The actual data of the message - a reference to the root/focus class of the event."]
156 pub r#focus: Vec<super::super::types::Reference>,
157 #[doc = "Permanent link to the MessageDefinition for this message."]
158 pub r#definition: Option<super::super::types::Canonical>,
159}
160#[allow(clippy::derivable_impls)]
161impl Default for MessageHeader {
162 fn default() -> Self {
163 Self {
164 r#id: Default::default(),
165 r#meta: Default::default(),
166 r#implicit_rules: Default::default(),
167 r#language: Default::default(),
168 r#text: Default::default(),
169 r#contained: Default::default(),
170 r#extension: Default::default(),
171 r#modifier_extension: Default::default(),
172 r#event: Default::default(),
173 r#destination: Default::default(),
174 r#sender: Default::default(),
175 r#enterer: Default::default(),
176 r#author: Default::default(),
177 r#source: MessageHeaderSource {
178 id: Some("$invalid".to_string()),
179 ..Default::default()
180 },
181 r#responsible: Default::default(),
182 r#reason: Default::default(),
183 r#response: Default::default(),
184 r#focus: Default::default(),
185 r#definition: Default::default(),
186 }
187 }
188}