fhirbolt_model/generated/r4/resources/
procedure.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Estimated or actual date, date-time, period, or age when the procedure was performed.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum ProcedurePerformed {
5    DateTime(super::super::types::DateTime),
6    Period(Box<super::super::types::Period>),
7    String(super::super::types::String),
8    Age(Box<super::super::types::Age>),
9    Range(Box<super::super::types::Range>),
10    #[default]
11    Invalid,
12}
13#[doc = "Limited to \"real\" people rather than equipment."]
14#[derive(Debug, Clone, PartialEq)]
15pub struct ProcedurePerformer {
16    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
17    pub r#id: Option<std::string::String>,
18    #[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."]
19    pub r#extension: Vec<super::super::types::Extension>,
20    #[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)."]
21    pub r#modifier_extension: Vec<super::super::types::Extension>,
22    #[doc = "Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist."]
23    pub r#function: Option<Box<super::super::types::CodeableConcept>>,
24    #[doc = "The practitioner who was involved in the procedure."]
25    pub r#actor: Box<super::super::types::Reference>,
26    #[doc = "The organization the device or practitioner was acting on behalf of."]
27    pub r#on_behalf_of: Option<Box<super::super::types::Reference>>,
28}
29#[allow(clippy::derivable_impls)]
30impl Default for ProcedurePerformer {
31    fn default() -> Self {
32        Self {
33            r#id: Default::default(),
34            r#extension: Default::default(),
35            r#modifier_extension: Default::default(),
36            r#function: Default::default(),
37            r#actor: Box::new(super::super::types::Reference {
38                id: Some("$invalid".to_string()),
39                ..Default::default()
40            }),
41            r#on_behalf_of: Default::default(),
42        }
43    }
44}
45#[doc = "A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure."]
46#[derive(Debug, Clone, PartialEq)]
47pub struct ProcedureFocalDevice {
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 = "The kind of change that happened to the device during the procedure."]
55    pub r#action: Option<Box<super::super::types::CodeableConcept>>,
56    #[doc = "The device that was manipulated (changed) during the procedure."]
57    pub r#manipulated: Box<super::super::types::Reference>,
58}
59#[allow(clippy::derivable_impls)]
60impl Default for ProcedureFocalDevice {
61    fn default() -> Self {
62        Self {
63            r#id: Default::default(),
64            r#extension: Default::default(),
65            r#modifier_extension: Default::default(),
66            r#action: Default::default(),
67            r#manipulated: Box::new(super::super::types::Reference {
68                id: Some("$invalid".to_string()),
69                ..Default::default()
70            }),
71        }
72    }
73}
74#[doc = "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy."]
75#[derive(Debug, Clone, PartialEq)]
76pub struct Procedure {
77    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
78    pub r#id: Option<super::super::types::Id>,
79    #[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."]
80    pub r#meta: Option<Box<super::super::types::Meta>>,
81    #[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."]
82    pub r#implicit_rules: Option<super::super::types::Uri>,
83    #[doc = "The base language in which the resource is written."]
84    pub r#language: Option<super::super::types::Code>,
85    #[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."]
86    pub r#text: Option<Box<super::super::types::Narrative>>,
87    #[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."]
88    pub r#contained: Vec<super::super::Resource>,
89    #[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."]
90    pub r#extension: Vec<super::super::types::Extension>,
91    #[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)."]
92    pub r#modifier_extension: Vec<super::super::types::Extension>,
93    #[doc = "Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server."]
94    pub r#identifier: Vec<super::super::types::Identifier>,
95    #[doc = "The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure."]
96    pub r#instantiates_canonical: Vec<super::super::types::Canonical>,
97    #[doc = "The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure."]
98    pub r#instantiates_uri: Vec<super::super::types::Uri>,
99    #[doc = "A reference to a resource that contains details of the request for this procedure."]
100    pub r#based_on: Vec<super::super::types::Reference>,
101    #[doc = "A larger event of which this particular procedure is a component or step."]
102    pub r#part_of: Vec<super::super::types::Reference>,
103    #[doc = "A code specifying the state of the procedure. Generally, this will be the in-progress or completed state."]
104    pub r#status: super::super::types::Code,
105    #[doc = "Captures the reason for the current state of the procedure."]
106    pub r#status_reason: Option<Box<super::super::types::CodeableConcept>>,
107    #[doc = "A code that classifies the procedure for searching, sorting and display purposes (e.g. \"Surgical Procedure\")."]
108    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
109    #[doc = "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \"Laparoscopic Appendectomy\")."]
110    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
111    #[doc = "The person, animal or group on which the procedure was performed."]
112    pub r#subject: Box<super::super::types::Reference>,
113    #[doc = "The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated."]
114    pub r#encounter: Option<Box<super::super::types::Reference>>,
115    #[doc = "Estimated or actual date, date-time, period, or age when the procedure was performed.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured."]
116    pub r#performed: Option<ProcedurePerformed>,
117    #[doc = "Individual who recorded the record and takes responsibility for its content."]
118    pub r#recorder: Option<Box<super::super::types::Reference>>,
119    #[doc = "Individual who is making the procedure statement."]
120    pub r#asserter: Option<Box<super::super::types::Reference>>,
121    #[doc = "Limited to \"real\" people rather than equipment."]
122    pub r#performer: Vec<ProcedurePerformer>,
123    #[doc = "The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant."]
124    pub r#location: Option<Box<super::super::types::Reference>>,
125    #[doc = "The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text."]
126    pub r#reason_code: Vec<super::super::types::CodeableConcept>,
127    #[doc = "The justification of why the procedure was performed."]
128    pub r#reason_reference: Vec<super::super::types::Reference>,
129    #[doc = "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion."]
130    pub r#body_site: Vec<super::super::types::CodeableConcept>,
131    #[doc = "The outcome of the procedure - did it resolve the reasons for the procedure being performed?"]
132    pub r#outcome: Option<Box<super::super::types::CodeableConcept>>,
133    #[doc = "This could be a histology result, pathology report, surgical report, etc."]
134    pub r#report: Vec<super::super::types::Reference>,
135    #[doc = "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues."]
136    pub r#complication: Vec<super::super::types::CodeableConcept>,
137    #[doc = "Any complications that occurred during the procedure, or in the immediate post-performance period."]
138    pub r#complication_detail: Vec<super::super::types::Reference>,
139    #[doc = "If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used."]
140    pub r#follow_up: Vec<super::super::types::CodeableConcept>,
141    #[doc = "Any other notes and comments about the procedure."]
142    pub r#note: Vec<super::super::types::Annotation>,
143    #[doc = "A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure."]
144    pub r#focal_device: Vec<ProcedureFocalDevice>,
145    #[doc = "Identifies medications, devices and any other substance used as part of the procedure."]
146    pub r#used_reference: Vec<super::super::types::Reference>,
147    #[doc = "Identifies coded items that were used as part of the procedure."]
148    pub r#used_code: Vec<super::super::types::CodeableConcept>,
149}
150#[allow(clippy::derivable_impls)]
151impl Default for Procedure {
152    fn default() -> Self {
153        Self {
154            r#id: Default::default(),
155            r#meta: Default::default(),
156            r#implicit_rules: Default::default(),
157            r#language: Default::default(),
158            r#text: Default::default(),
159            r#contained: Default::default(),
160            r#extension: Default::default(),
161            r#modifier_extension: Default::default(),
162            r#identifier: Default::default(),
163            r#instantiates_canonical: Default::default(),
164            r#instantiates_uri: Default::default(),
165            r#based_on: Default::default(),
166            r#part_of: Default::default(),
167            r#status: super::super::types::Code {
168                id: Some("$invalid".to_string()),
169                ..Default::default()
170            },
171            r#status_reason: Default::default(),
172            r#category: Default::default(),
173            r#code: Default::default(),
174            r#subject: Box::new(super::super::types::Reference {
175                id: Some("$invalid".to_string()),
176                ..Default::default()
177            }),
178            r#encounter: Default::default(),
179            r#performed: Default::default(),
180            r#recorder: Default::default(),
181            r#asserter: Default::default(),
182            r#performer: Default::default(),
183            r#location: Default::default(),
184            r#reason_code: Default::default(),
185            r#reason_reference: Default::default(),
186            r#body_site: Default::default(),
187            r#outcome: Default::default(),
188            r#report: Default::default(),
189            r#complication: Default::default(),
190            r#complication_detail: Default::default(),
191            r#follow_up: Default::default(),
192            r#note: Default::default(),
193            r#focal_device: Default::default(),
194            r#used_reference: Default::default(),
195            r#used_code: Default::default(),
196        }
197    }
198}