Skip to main content

haste_fhir_generated_ops/
generated.rs

1#![allow(non_snake_case)]
2use haste_fhir_model::r4::generated::resources::*;
3use haste_fhir_model::r4::generated::types::*;
4use haste_fhir_operation_error::*;
5use haste_fhir_ops::derive::{FromParameters, ToParameters};
6#[doc = "This operation is used to search for and return notifications that have been previously triggered by a topic-based Subscription in R4."]
7pub mod BackportSubscriptionEvents {
8    use super::*;
9    pub const CODE: &str = "events";
10    #[derive(Debug, FromParameters, ToParameters)]
11    pub struct Input {
12        #[doc = "The starting event number, inclusive of this event (lower bound)."]
13        pub eventsSinceNumber: Option<FHIRString>,
14        #[doc = "The ending event number, inclusive of this event (upper bound)."]
15        pub eventsUntilNumber: Option<FHIRString>,
16        #[doc = "Requested content style of returned data. Codes from backport-content-value-set (e.g., empty, id-only, full-resource). This is a hint to the server what a client would prefer, and MAY be ignored."]
17        pub content: Option<FHIRCode>,
18    }
19    impl From<Input> for Resource {
20        fn from(value: Input) -> Self {
21            let parameters: Vec<ParametersParameter> = value.into();
22            Resource::Parameters(Parameters {
23                parameter: Some(parameters),
24                ..Default::default()
25            })
26        }
27    }
28    #[derive(Debug, FromParameters)]
29    pub struct Output {
30        #[doc = "The operation returns a valid notification bundle, with the first entry being the subscription status information resource. The bundle type is \"history\"."]
31        #[parameter_rename = "return"]
32        pub return_: Bundle,
33    }
34    impl From<Output> for Resource {
35        fn from(value: Output) -> Self {
36            Resource::Bundle(value.return_)
37        }
38    }
39}
40#[doc = "This operation is used to get a token for a websocket client to use in order to bind to one or more subscriptions."]
41pub mod BackportSubscriptionGetWsBindingToken {
42    use super::*;
43    pub const CODE: &str = "get-ws-binding-token";
44    #[derive(Debug, FromParameters, ToParameters)]
45    pub struct Input {
46        #[doc = "At the Instance level, this parameter is ignored. At the Resource level, one or more parameters containing a FHIR id for a Subscription to get a token for. In the absense of any specified ids, the server may either return a token for all Subscriptions available to the caller with a channel-type of websocket or fail the request."]
47        pub id: Option<Vec<FHIRId>>,
48    }
49    impl From<Input> for Resource {
50        fn from(value: Input) -> Self {
51            let parameters: Vec<ParametersParameter> = value.into();
52            Resource::Parameters(Parameters {
53                parameter: Some(parameters),
54                ..Default::default()
55            })
56        }
57    }
58    #[derive(Debug, FromParameters, ToParameters)]
59    pub struct Output {
60        #[doc = "An access token that a client may use to show authorization during a websocket connection."]
61        pub token: FHIRString,
62        #[doc = "The date and time this token is valid until."]
63        pub expiration: FHIRDateTime,
64        #[doc = "The subscriptions this token is valid for."]
65        pub subscription: Option<Vec<FHIRString>>,
66        #[doc = "The URL the client should use to connect to Websockets."]
67        #[parameter_rename = "websocket-url"]
68        pub websocket_url: FHIRUrl,
69    }
70    impl From<Output> for Resource {
71        fn from(value: Output) -> Self {
72            let parameters: Vec<ParametersParameter> = value.into();
73            Resource::Parameters(Parameters {
74                parameter: Some(parameters),
75                ..Default::default()
76            })
77        }
78    }
79}
80#[doc = "This operation is used to resend notifications that have been previously triggered by a topic-based Subscription in R4."]
81pub mod BackportSubscriptionResend {
82    use super::*;
83    pub const CODE: &str = "resend";
84    #[derive(Debug, FromParameters, ToParameters)]
85    pub struct Input {
86        #[doc = "The starting event number, inclusive of this event (lower bound)."]
87        pub eventsSinceNumber: Option<FHIRString>,
88        #[doc = "The ending event number, inclusive of this event (upper bound)."]
89        pub eventsUntilNumber: Option<FHIRString>,
90        #[doc = "The starting event date/time, inclusive of this instant (lower bound)."]
91        pub eventsSinceInstant: Option<FHIRInstant>,
92        #[doc = "The ending event date/time, inclusive of this instant (upper bound)."]
93        pub eventsUntilInstant: Option<FHIRInstant>,
94    }
95    impl From<Input> for Resource {
96        fn from(value: Input) -> Self {
97            let parameters: Vec<ParametersParameter> = value.into();
98            Resource::Parameters(Parameters {
99                parameter: Some(parameters),
100                ..Default::default()
101            })
102        }
103    }
104    #[derive(Debug, FromParameters)]
105    pub struct Output {
106        #[doc = "Outcome of this request."]
107        #[parameter_rename = "return"]
108        pub return_: OperationOutcome,
109    }
110    impl From<Output> for Resource {
111        fn from(value: Output) -> Self {
112            Resource::OperationOutcome(value.return_)
113        }
114    }
115}
116#[doc = "This operation is used to return the current status information about one or more topic-based Subscriptions in R4."]
117pub mod BackportSubscriptionStatus {
118    use super::*;
119    pub const CODE: &str = "status";
120    #[derive(Debug, FromParameters, ToParameters)]
121    pub struct Input {
122        #[doc = "At the Instance level, this parameter is ignored.  At the Resource level, one or more parameters containing a FHIR id for a Subscription to get status information for. In the absence of any specified ids, the server returns the status for all Subscriptions available to the caller. Multiple values are joined via OR (e.g., \"id1\" OR \"id2\")."]
123        pub id: Option<Vec<FHIRId>>,
124        #[doc = "At the Instance level, this parameter is ignored. At the Resource level, a Subscription status to filter by (e.g., \"active\"). In the absence of any specified status values, the server does not filter contents based on the status. Multiple values are joined via OR (e.g., \"error\" OR \"off\")."]
125        pub status: Option<Vec<FHIRCode>>,
126    }
127    impl From<Input> for Resource {
128        fn from(value: Input) -> Self {
129            let parameters: Vec<ParametersParameter> = value.into();
130            Resource::Parameters(Parameters {
131                parameter: Some(parameters),
132                ..Default::default()
133            })
134        }
135    }
136    #[derive(Debug, FromParameters)]
137    pub struct Output {
138        #[doc = "The operation returns a bundle containing one or more subscription status resources, one per Subscription being queried. The Bundle type is \"searchset\"."]
139        #[parameter_rename = "return"]
140        pub return_: Bundle,
141    }
142    impl From<Output> for Resource {
143        fn from(value: Output) -> Self {
144            Resource::Bundle(value.return_)
145        }
146    }
147}
148#[doc = "Get Project resource for the current project."]
149pub mod ProjectInformation {
150    use super::*;
151    pub const CODE: &str = "current-project";
152    #[derive(Debug, FromParameters, ToParameters)]
153    pub struct Input {}
154    impl From<Input> for Resource {
155        fn from(value: Input) -> Self {
156            let parameters: Vec<ParametersParameter> = value.into();
157            Resource::Parameters(Parameters {
158                parameter: Some(parameters),
159                ..Default::default()
160            })
161        }
162    }
163    #[derive(Debug, FromParameters, ToParameters)]
164    pub struct Output {
165        #[doc = "Users current project."]
166        pub project: Project,
167    }
168    impl From<Output> for Resource {
169        fn from(value: Output) -> Self {
170            let parameters: Vec<ParametersParameter> = value.into();
171            Resource::Parameters(Parameters {
172                parameter: Some(parameters),
173                ..Default::default()
174            })
175        }
176    }
177}
178#[doc = "Get tenant information for the current tenant."]
179pub mod TenantInformation {
180    use super::*;
181    pub const CODE: &str = "current-tenant";
182    #[derive(Debug, FromParameters, ToParameters)]
183    pub struct Input {}
184    impl From<Input> for Resource {
185        fn from(value: Input) -> Self {
186            let parameters: Vec<ParametersParameter> = value.into();
187            Resource::Parameters(Parameters {
188                parameter: Some(parameters),
189                ..Default::default()
190            })
191        }
192    }
193    #[derive(Debug, FromParameters, ToParameters)]
194    pub struct Output {
195        #[doc = "tenant id"]
196        pub id: FHIRString,
197        #[doc = "tenant subscription level"]
198        pub subscription: FHIRCode,
199    }
200    impl From<Output> for Resource {
201        fn from(value: Output) -> Self {
202            let parameters: Vec<ParametersParameter> = value.into();
203            Resource::Parameters(Parameters {
204                parameter: Some(parameters),
205                ..Default::default()
206            })
207        }
208    }
209}
210#[doc = "Get tenant endpoint information for the current tenant."]
211pub mod TenantEndpointInformation {
212    use super::*;
213    pub const CODE: &str = "endpoints";
214    #[derive(Debug, FromParameters, ToParameters)]
215    pub struct Input {}
216    impl From<Input> for Resource {
217        fn from(value: Input) -> Self {
218            let parameters: Vec<ParametersParameter> = value.into();
219            Resource::Parameters(Parameters {
220                parameter: Some(parameters),
221                ..Default::default()
222            })
223        }
224    }
225    #[derive(Debug, FromParameters, ToParameters)]
226    pub struct Output {
227        #[doc = "FHIR R4 Endpoint URL."]
228        #[parameter_rename = "fhir-r4-base-url"]
229        pub fhir_r4_base_url: FHIRUri,
230        #[doc = "FHIR R4 Capabilities URL."]
231        #[parameter_rename = "fhir-r4-capabilities-url"]
232        pub fhir_r4_capabilities_url: FHIRUri,
233        #[doc = "OIDC Discovery URL."]
234        #[parameter_rename = "oidc-discovery-url"]
235        pub oidc_discovery_url: FHIRUri,
236        #[doc = "OIDC Token Endpoint."]
237        #[parameter_rename = "oidc-token-endpoint"]
238        pub oidc_token_endpoint: FHIRUri,
239        #[doc = "OIDC Authorize Endpoint."]
240        #[parameter_rename = "oidc-authorize-endpoint"]
241        pub oidc_authorize_endpoint: FHIRUri,
242        #[doc = "OIDC JWKS Endpoint."]
243        #[parameter_rename = "oidc-jwks-endpoint"]
244        pub oidc_jwks_endpoint: FHIRUri,
245        #[doc = "Model context protocol endpoint."]
246        #[parameter_rename = "mcp-endpoint"]
247        pub mcp_endpoint: FHIRUri,
248    }
249    impl From<Output> for Resource {
250        fn from(value: Output) -> Self {
251            let parameters: Vec<ParametersParameter> = value.into();
252            Resource::Parameters(Parameters {
253                parameter: Some(parameters),
254                ..Default::default()
255            })
256        }
257    }
258}
259#[doc = "Evaluate an Access Policy."]
260pub mod HasteHealthEvaluatePolicy {
261    use super::*;
262    pub const CODE: &str = "evaluate-policy";
263    #[derive(Debug, FromParameters, ToParameters)]
264    pub struct Input {
265        #[doc = "The user to evaluate the policy against. Defaults to logged in user if not present."]
266        pub user: Option<Reference>,
267        #[doc = "The requests to evaluate against the policy."]
268        pub request: Bundle,
269    }
270    impl From<Input> for Resource {
271        fn from(value: Input) -> Self {
272            let parameters: Vec<ParametersParameter> = value.into();
273            Resource::Parameters(Parameters {
274                parameter: Some(parameters),
275                ..Default::default()
276            })
277        }
278    }
279    #[derive(Debug, FromParameters)]
280    pub struct Output {
281        #[doc = "The result of the policy evaluation."]
282        #[parameter_rename = "return"]
283        pub return_: OperationOutcome,
284    }
285    impl From<Output> for Resource {
286        fn from(value: Output) -> Self {
287            Resource::OperationOutcome(value.return_)
288        }
289    }
290}
291#[doc = "Parse HL7v2 messages."]
292pub mod Hl7v2Parse {
293    use super::*;
294    pub const CODE: &str = "hl7v2-parse";
295    #[derive(Debug, FromParameters, ToParameters)]
296    pub struct Input {
297        #[doc = "HL7v2 message to be parsed."]
298        pub hl7v2: FHIRString,
299    }
300    impl From<Input> for Resource {
301        fn from(value: Input) -> Self {
302            let parameters: Vec<ParametersParameter> = value.into();
303            Resource::Parameters(Parameters {
304                parameter: Some(parameters),
305                ..Default::default()
306            })
307        }
308    }
309    #[derive(Debug, FromParameters, ToParameters)]
310    pub struct Output {
311        #[doc = "Parsed HL7v2 message."]
312        pub hl7v2: HL7V2,
313    }
314    impl From<Output> for Resource {
315        fn from(value: Output) -> Self {
316            let parameters: Vec<ParametersParameter> = value.into();
317            Resource::Parameters(Parameters {
318                parameter: Some(parameters),
319                ..Default::default()
320            })
321        }
322    }
323}
324#[doc = "Get the registration information for an identity provider."]
325pub mod HasteHealthIdpRegistrationInfo {
326    use super::*;
327    pub const CODE: &str = "registration-info";
328    #[derive(Debug, FromParameters, ToParameters)]
329    pub struct Input {}
330    impl From<Input> for Resource {
331        fn from(value: Input) -> Self {
332            let parameters: Vec<ParametersParameter> = value.into();
333            Resource::Parameters(Parameters {
334                parameter: Some(parameters),
335                ..Default::default()
336            })
337        }
338    }
339    #[derive(Debug, FromParameters, ToParameters)]
340    pub struct OutputInformation {
341        #[doc = "The name of the property."]
342        pub name: FHIRString,
343        #[doc = "the value of the property."]
344        pub value: FHIRString,
345    }
346    impl From<OutputInformation> for Resource {
347        fn from(value: OutputInformation) -> Self {
348            let parameters: Vec<ParametersParameter> = value.into();
349            Resource::Parameters(Parameters {
350                parameter: Some(parameters),
351                ..Default::default()
352            })
353        }
354    }
355    #[derive(Debug, FromParameters, ToParameters)]
356    pub struct Output {
357        #[doc = "IdentityProviders registration information."]
358        #[parameter_nested]
359        pub information: Option<Vec<OutputInformation>>,
360    }
361    impl From<Output> for Resource {
362        fn from(value: Output) -> Self {
363            let parameters: Vec<ParametersParameter> = value.into();
364            Resource::Parameters(Parameters {
365                parameter: Some(parameters),
366                ..Default::default()
367            })
368        }
369    }
370}
371#[doc = "Show resources that failed search indexing for the current tenant and project."]
372pub mod HasteHealthIndexingErrors {
373    use super::*;
374    pub const CODE: &str = "indexing-errors";
375    #[derive(Debug, FromParameters, ToParameters)]
376    pub struct Input {
377        #[doc = "If true, mark the indexing errors as resolved."]
378        pub resolve: Option<FHIRBoolean>,
379    }
380    impl From<Input> for Resource {
381        fn from(value: Input) -> Self {
382            let parameters: Vec<ParametersParameter> = value.into();
383            Resource::Parameters(Parameters {
384                parameter: Some(parameters),
385                ..Default::default()
386            })
387        }
388    }
389    #[derive(Debug, FromParameters, ToParameters)]
390    pub struct OutputErrors {
391        #[doc = "Version id of the resource that failed to index."]
392        pub id: FHIRId,
393        #[doc = "Version id of the resource that failed to index."]
394        pub version_id: FHIRId,
395        #[doc = "FHIR resource type of the resource that failed to index."]
396        pub resource_type: FHIRCode,
397        #[doc = "The operation (create, update or delete) that failed to index."]
398        pub fhir_method: FHIRCode,
399        #[doc = "Sequence position of the resource in the indexing stream."]
400        pub sequence: FHIRInteger,
401        #[doc = "Number of times indexing has been attempted for this resource."]
402        pub attempt_count: FHIRInteger,
403        #[doc = "The error that occurred while indexing."]
404        pub error_message: FHIRString,
405        #[doc = "When this resource first failed indexing."]
406        pub first_failed_at: FHIRDateTime,
407        #[doc = "When this resource most recently failed indexing."]
408        pub last_failed_at: FHIRDateTime,
409        #[doc = "When this failure was marked resolved, if it has been."]
410        pub resolved_at: Option<FHIRDateTime>,
411    }
412    impl From<OutputErrors> for Resource {
413        fn from(value: OutputErrors) -> Self {
414            let parameters: Vec<ParametersParameter> = value.into();
415            Resource::Parameters(Parameters {
416                parameter: Some(parameters),
417                ..Default::default()
418            })
419        }
420    }
421    #[derive(Debug, FromParameters, ToParameters)]
422    pub struct Output {
423        #[doc = "The resources that failed search indexing."]
424        #[parameter_nested]
425        pub errors: Option<Vec<OutputErrors>>,
426    }
427    impl From<Output> for Resource {
428        fn from(value: Output) -> Self {
429            let parameters: Vec<ParametersParameter> = value.into();
430            Resource::Parameters(Parameters {
431                parameter: Some(parameters),
432                ..Default::default()
433            })
434        }
435    }
436}
437#[doc = "Delete refresh token from the user for the client."]
438pub mod HasteHealthDeleteRefreshToken {
439    use super::*;
440    pub const CODE: &str = "delete-refresh-token";
441    #[derive(Debug, FromParameters, ToParameters)]
442    pub struct Input {
443        #[doc = "Client id for refresh token to delete."]
444        pub client_id: FHIRId,
445        #[doc = "User agent of the refresh token to delete."]
446        pub user_agent: Option<FHIRString>,
447    }
448    impl From<Input> for Resource {
449        fn from(value: Input) -> Self {
450            let parameters: Vec<ParametersParameter> = value.into();
451            Resource::Parameters(Parameters {
452                parameter: Some(parameters),
453                ..Default::default()
454            })
455        }
456    }
457    #[derive(Debug, FromParameters)]
458    pub struct Output {
459        #[doc = "Result of the delete operation."]
460        #[parameter_rename = "return"]
461        pub return_: OperationOutcome,
462    }
463    impl From<Output> for Resource {
464        fn from(value: Output) -> Self {
465            Resource::OperationOutcome(value.return_)
466        }
467    }
468}
469#[doc = "Show list of users refresh tokens."]
470pub mod HasteHealthListRefreshTokens {
471    use super::*;
472    pub const CODE: &str = "refresh-tokens";
473    #[derive(Debug, FromParameters, ToParameters)]
474    pub struct Input {}
475    impl From<Input> for Resource {
476        fn from(value: Input) -> Self {
477            let parameters: Vec<ParametersParameter> = value.into();
478            Resource::Parameters(Parameters {
479                parameter: Some(parameters),
480                ..Default::default()
481            })
482        }
483    }
484    #[derive(Debug, FromParameters, ToParameters)]
485    pub struct OutputRefreshTokens {
486        #[doc = "Client for refresh token."]
487        pub client_id: FHIRId,
488        #[doc = "User agent of the refresh token."]
489        pub user_agent: FHIRString,
490        #[doc = "When the refresh token was created."]
491        pub created_at: FHIRDateTime,
492    }
493    impl From<OutputRefreshTokens> for Resource {
494        fn from(value: OutputRefreshTokens) -> Self {
495            let parameters: Vec<ParametersParameter> = value.into();
496            Resource::Parameters(Parameters {
497                parameter: Some(parameters),
498                ..Default::default()
499            })
500        }
501    }
502    #[derive(Debug, FromParameters, ToParameters)]
503    pub struct Output {
504        #[doc = "The result of the operation."]
505        #[parameter_rename = "refresh-tokens"]
506        #[parameter_nested]
507        pub refresh_tokens: Option<Vec<OutputRefreshTokens>>,
508    }
509    impl From<Output> for Resource {
510        fn from(value: Output) -> Self {
511            let parameters: Vec<ParametersParameter> = value.into();
512            Resource::Parameters(Parameters {
513                parameter: Some(parameters),
514                ..Default::default()
515            })
516        }
517    }
518}
519#[doc = "Delete scope from user accepted scopes for the client."]
520pub mod HasteHealthDeleteScope {
521    use super::*;
522    pub const CODE: &str = "delete-scope";
523    #[derive(Debug, FromParameters, ToParameters)]
524    pub struct Input {
525        #[doc = "Client for which scopes are being shown."]
526        pub client_id: FHIRId,
527    }
528    impl From<Input> for Resource {
529        fn from(value: Input) -> Self {
530            let parameters: Vec<ParametersParameter> = value.into();
531            Resource::Parameters(Parameters {
532                parameter: Some(parameters),
533                ..Default::default()
534            })
535        }
536    }
537    #[derive(Debug, FromParameters)]
538    pub struct Output {
539        #[doc = "Result of the delete operation."]
540        #[parameter_rename = "return"]
541        pub return_: OperationOutcome,
542    }
543    impl From<Output> for Resource {
544        fn from(value: Output) -> Self {
545            Resource::OperationOutcome(value.return_)
546        }
547    }
548}
549#[doc = "Show list of user accepted scopes for apps."]
550pub mod HasteHealthListScopes {
551    use super::*;
552    pub const CODE: &str = "scopes";
553    #[derive(Debug, FromParameters, ToParameters)]
554    pub struct Input {}
555    impl From<Input> for Resource {
556        fn from(value: Input) -> Self {
557            let parameters: Vec<ParametersParameter> = value.into();
558            Resource::Parameters(Parameters {
559                parameter: Some(parameters),
560                ..Default::default()
561            })
562        }
563    }
564    #[derive(Debug, FromParameters, ToParameters)]
565    pub struct OutputScopes {
566        #[doc = "Client for which scopes are being shown."]
567        pub client_id: FHIRId,
568        #[doc = "Scopes user accepted."]
569        pub scopes: FHIRString,
570        #[doc = "When the scopes were accepted."]
571        pub created_at: FHIRDateTime,
572    }
573    impl From<OutputScopes> for Resource {
574        fn from(value: OutputScopes) -> Self {
575            let parameters: Vec<ParametersParameter> = value.into();
576            Resource::Parameters(Parameters {
577                parameter: Some(parameters),
578                ..Default::default()
579            })
580        }
581    }
582    #[derive(Debug, FromParameters, ToParameters)]
583    pub struct Output {
584        #[doc = "The result of the operation."]
585        #[parameter_nested]
586        pub scopes: Option<Vec<OutputScopes>>,
587    }
588    impl From<Output> for Resource {
589        fn from(value: Output) -> Self {
590            let parameters: Vec<ParametersParameter> = value.into();
591            Resource::Parameters(Parameters {
592                parameter: Some(parameters),
593                ..Default::default()
594            })
595        }
596    }
597}
598#[doc = "Set display customization for the current tenant, such as its display name and logo."]
599pub mod HasteHealthTenantCustomization {
600    use super::*;
601    pub const CODE: &str = "tenant-customization";
602    #[derive(Debug, FromParameters, ToParameters)]
603    pub struct Input {
604        #[doc = "Display name for the tenant. Omit to clear the tenant's display name."]
605        pub name: Option<FHIRString>,
606        #[doc = "Logo for the tenant. Omit to clear the tenant's logo."]
607        pub logo: Option<Attachment>,
608    }
609    impl From<Input> for Resource {
610        fn from(value: Input) -> Self {
611            let parameters: Vec<ParametersParameter> = value.into();
612            Resource::Parameters(Parameters {
613                parameter: Some(parameters),
614                ..Default::default()
615            })
616        }
617    }
618    #[derive(Debug, FromParameters, ToParameters)]
619    pub struct Output {}
620    impl From<Output> for Resource {
621        fn from(value: Output) -> Self {
622            let parameters: Vec<ParametersParameter> = value.into();
623            Resource::Parameters(Parameters {
624                parameter: Some(parameters),
625                ..Default::default()
626            })
627        }
628    }
629}
630#[doc = "Get the current tenant's display name and logo, if set."]
631pub mod HasteHealthTenantBranding {
632    use super::*;
633    pub const CODE: &str = "tenant-branding";
634    #[derive(Debug, FromParameters, ToParameters)]
635    pub struct Input {}
636    impl From<Input> for Resource {
637        fn from(value: Input) -> Self {
638            let parameters: Vec<ParametersParameter> = value.into();
639            Resource::Parameters(Parameters {
640                parameter: Some(parameters),
641                ..Default::default()
642            })
643        }
644    }
645    #[derive(Debug, FromParameters, ToParameters)]
646    pub struct Output {
647        #[doc = "Display name for the tenant, if one has been set."]
648        pub name: Option<FHIRString>,
649        #[doc = "Logo for the tenant, if one has been set."]
650        pub logo: Option<Attachment>,
651    }
652    impl From<Output> for Resource {
653        fn from(value: Output) -> Self {
654            let parameters: Vec<ParametersParameter> = value.into();
655            Resource::Parameters(Parameters {
656                parameter: Some(parameters),
657                ..Default::default()
658            })
659        }
660    }
661}
662#[doc = "The apply operation applies a definition in a specific context"]
663pub mod ActivityDefinitionApply {
664    use super::*;
665    pub const CODE: &str = "apply";
666    #[derive(Debug, FromParameters, ToParameters)]
667    pub struct Input {
668        #[doc = "The activity definition to apply. If the operation is invoked on an instance, this parameter is not allowed. If the operation is invoked at the type level, this parameter is required"]
669        pub activityDefinition: Option<ActivityDefinition>,
670        #[doc = "The subject(s) that is/are the target of the activity definition to be applied. The subject may be a Patient, Practitioner, Organization, Location, Device, or Group. Subjects provided in this parameter will be resolved as the subject of the PlanDefinition based on the type of the subject. If multiple subjects of the same type are provided, the behavior is implementation-defined"]
671        pub subject: Vec<FHIRString>,
672        #[doc = "The encounter in context, if any"]
673        pub encounter: Option<FHIRString>,
674        #[doc = "The practitioner in context"]
675        pub practitioner: Option<FHIRString>,
676        #[doc = "The organization in context"]
677        pub organization: Option<FHIRString>,
678        #[doc = "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)"]
679        pub userType: Option<CodeableConcept>,
680        #[doc = "Preferred language of the person using the system"]
681        pub userLanguage: Option<CodeableConcept>,
682        #[doc = "The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources"]
683        pub userTaskContext: Option<CodeableConcept>,
684        #[doc = "The current setting of the request (inpatient, outpatient, etc.)"]
685        pub setting: Option<CodeableConcept>,
686        #[doc = "Additional detail about the setting of the request, if any"]
687        pub settingContext: Option<CodeableConcept>,
688    }
689    impl From<Input> for Resource {
690        fn from(value: Input) -> Self {
691            let parameters: Vec<ParametersParameter> = value.into();
692            Resource::Parameters(Parameters {
693                parameter: Some(parameters),
694                ..Default::default()
695            })
696        }
697    }
698    #[derive(Debug, FromParameters)]
699    pub struct Output {
700        #[doc = "The resource that is the result of applying the definition"]
701        #[parameter_rename = "return"]
702        pub return_: Resource,
703    }
704    impl From<Output> for Resource {
705        fn from(value: Output) -> Self {
706            value.return_
707        }
708    }
709}
710#[doc = "The data-requirements operation aggregates and returns the parameters and data requirements for the activity definition and all its dependencies as a single module definition library"]
711pub mod ActivityDefinitionDataRequirements {
712    use super::*;
713    pub const CODE: &str = "data-requirements";
714    #[derive(Debug, FromParameters, ToParameters)]
715    pub struct Input {}
716    impl From<Input> for Resource {
717        fn from(value: Input) -> Self {
718            let parameters: Vec<ParametersParameter> = value.into();
719            Resource::Parameters(Parameters {
720                parameter: Some(parameters),
721                ..Default::default()
722            })
723        }
724    }
725    #[derive(Debug, FromParameters)]
726    pub struct Output {
727        #[doc = "The result of the requirements gathering represented as a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the activity definition"]
728        #[parameter_rename = "return"]
729        pub return_: Library,
730    }
731    impl From<Output> for Resource {
732        fn from(value: Output) -> Self {
733            Resource::Library(value.return_)
734        }
735    }
736}
737#[doc = "This operation asks the server to check that it implements all the resources, interactions, search parameters, and operations that the client provides in its capability statement. The client provides both capability statements by reference, and must ensure that all the referenced resources are available to the conformance server"]
738pub mod CapabilityStatementConforms {
739    use super::*;
740    pub const CODE: &str = "conforms";
741    #[derive(Debug, FromParameters, ToParameters)]
742    pub struct Input {
743        #[doc = "A canonical reference to the left-hand system's capability statement"]
744        pub left: Option<FHIRCanonical>,
745        #[doc = "A canonical reference to the right-hand system's capability statement"]
746        pub right: Option<FHIRCanonical>,
747        #[doc = "What kind of comparison to perform - server to server, or client to server (use the codes 'server/server' or 'client/server')"]
748        pub mode: Option<FHIRCode>,
749    }
750    impl From<Input> for Resource {
751        fn from(value: Input) -> Self {
752            let parameters: Vec<ParametersParameter> = value.into();
753            Resource::Parameters(Parameters {
754                parameter: Some(parameters),
755                ..Default::default()
756            })
757        }
758    }
759    #[derive(Debug, FromParameters, ToParameters)]
760    pub struct Output {
761        #[doc = "Outcome of the CapabilityStatement test"]
762        pub issues: OperationOutcome,
763        #[doc = "The intersection of the functionality described by the CapabilityStatement resources"]
764        #[parameter_rename = "union"]
765        pub union_: Option<CapabilityStatement>,
766        #[doc = "The union of the functionality described by the CapabilityStatement resources"]
767        pub intersection: Option<CapabilityStatement>,
768    }
769    impl From<Output> for Resource {
770        fn from(value: Output) -> Self {
771            let parameters: Vec<ParametersParameter> = value.into();
772            Resource::Parameters(Parameters {
773                parameter: Some(parameters),
774                ..Default::default()
775            })
776        }
777    }
778}
779#[doc = "This operation asks the server to check that it implements all the resources, interactions, search parameters, and operations that the client provides in its capability statement. The client provides its capability statement inline, or by referring the server to the canonical URL of its capability statement"]
780pub mod CapabilityStatementImplements {
781    use super::*;
782    pub const CODE: &str = "implements";
783    #[derive(Debug, FromParameters, ToParameters)]
784    pub struct Input {
785        #[doc = "A canonical reference to the server capability statement - use this if the implements is not invoked on an instance (or on the /metadata end-point)"]
786        pub server: Option<FHIRCanonical>,
787        #[doc = "A canonical reference to the client capability statement - use this if the implements is not invoked on an instance (or on the /metadata end-point)"]
788        pub client: Option<FHIRCanonical>,
789        #[doc = "The client capability statement, provided inline"]
790        pub resource: Option<CapabilityStatement>,
791    }
792    impl From<Input> for Resource {
793        fn from(value: Input) -> Self {
794            let parameters: Vec<ParametersParameter> = value.into();
795            Resource::Parameters(Parameters {
796                parameter: Some(parameters),
797                ..Default::default()
798            })
799        }
800    }
801    #[derive(Debug, FromParameters)]
802    pub struct Output {
803        #[doc = "Outcome of the CapabilityStatement test"]
804        #[parameter_rename = "return"]
805        pub return_: OperationOutcome,
806    }
807    impl From<Output> for Resource {
808        fn from(value: Output) -> Self {
809            Resource::OperationOutcome(value.return_)
810        }
811    }
812}
813#[doc = "This operation asks the server to return a subset of the CapabilityStatement resource - just the REST parts that relate to a set of nominated resources - the resources that the client is interested in"]
814pub mod CapabilityStatementSubset {
815    use super::*;
816    pub const CODE: &str = "subset";
817    #[derive(Debug, FromParameters, ToParameters)]
818    pub struct Input {
819        #[doc = "The canonical URL - use this if the subset is not invoked on an instance (or on the /metadata end-point)"]
820        pub server: Option<FHIRUri>,
821        #[doc = "A resource that the client would like to include in the return"]
822        pub resource: Vec<FHIRCode>,
823    }
824    impl From<Input> for Resource {
825        fn from(value: Input) -> Self {
826            let parameters: Vec<ParametersParameter> = value.into();
827            Resource::Parameters(Parameters {
828                parameter: Some(parameters),
829                ..Default::default()
830            })
831        }
832    }
833    #[derive(Debug, FromParameters)]
834    pub struct Output {
835        #[doc = "The subsetted CapabilityStatement resource that is returned. This should be tagged with the SUBSETTED code"]
836        #[parameter_rename = "return"]
837        pub return_: CapabilityStatement,
838    }
839    impl From<Output> for Resource {
840        fn from(value: Output) -> Self {
841            Resource::CapabilityStatement(value.return_)
842        }
843    }
844}
845#[doc = "Using the [FHIR Version Mime Type Parameter](http.html#version-parameter), a server can support [multiple versions on the same end-point](versioning.html#mt-version). The only way for client to find out what versions a server supports in this fashion is the $versions operation. The client invokes the operation with no parameters. and the server returns the list of supported versions, along with the default version it will use if no fhirVersion parameter is present"]
846pub mod CapabilityStatementVersions {
847    use super::*;
848    pub const CODE: &str = "versions";
849    #[derive(Debug, FromParameters, ToParameters)]
850    pub struct Input {}
851    impl From<Input> for Resource {
852        fn from(value: Input) -> Self {
853            let parameters: Vec<ParametersParameter> = value.into();
854            Resource::Parameters(Parameters {
855                parameter: Some(parameters),
856                ..Default::default()
857            })
858        }
859    }
860    #[derive(Debug, FromParameters, ToParameters)]
861    pub struct Output {
862        #[doc = "A version supported by the server. Use the major.minor version like 3.0"]
863        pub version: Vec<FHIRCode>,
864        #[doc = "The default version for the server. Use the major.minor version like 3.0"]
865        pub default: FHIRCode,
866    }
867    impl From<Output> for Resource {
868        fn from(value: Output) -> Self {
869            let parameters: Vec<ParametersParameter> = value.into();
870            Resource::Parameters(Parameters {
871                parameter: Some(parameters),
872                ..Default::default()
873            })
874        }
875    }
876}
877#[doc = "The apply operation applies a definition in a specific context"]
878pub mod ChargeItemDefinitionApply {
879    use super::*;
880    pub const CODE: &str = "apply";
881    #[derive(Debug, FromParameters, ToParameters)]
882    pub struct Input {
883        #[doc = "The ChargeItem on which the definition is to ba applies"]
884        pub chargeItem: Reference,
885        #[doc = "The account in context, if any"]
886        pub account: Option<Reference>,
887    }
888    impl From<Input> for Resource {
889        fn from(value: Input) -> Self {
890            let parameters: Vec<ParametersParameter> = value.into();
891            Resource::Parameters(Parameters {
892                parameter: Some(parameters),
893                ..Default::default()
894            })
895        }
896    }
897    #[derive(Debug, FromParameters)]
898    pub struct Output {
899        #[doc = "The resource that is the result of applying the definition"]
900        #[parameter_rename = "return"]
901        pub return_: Resource,
902    }
903    impl From<Output> for Resource {
904        fn from(value: Output) -> Self {
905            value.return_
906        }
907    }
908}
909#[doc = "This operation is used to submit a Claim, Pre-Authorization or Pre-Determination (all instances of Claim resources) for adjudication either as a single Claim resource instance or as a Bundle containing the Claim and other referenced resources, or Bundle containing a batch of Claim resources, either as single Claims resources or Bundle resources, for processing. The only input parameter is the single Claim or Bundle resource and the only output is a single ClaimResponse, Bundle of ClaimResponses or an OperationOutcome resource."]
910pub mod ClaimSubmit {
911    use super::*;
912    pub const CODE: &str = "submit";
913    #[derive(Debug, FromParameters, ToParameters)]
914    pub struct Input {
915        #[doc = "A Claim resource or Bundle of claims, either as individual Claim resources or as Bundles each containing a single Claim plus referenced resources."]
916        pub resource: Resource,
917    }
918    impl From<Input> for Resource {
919        fn from(value: Input) -> Self {
920            let parameters: Vec<ParametersParameter> = value.into();
921            Resource::Parameters(Parameters {
922                parameter: Some(parameters),
923                ..Default::default()
924            })
925        }
926    }
927    #[derive(Debug, FromParameters, ToParameters)]
928    pub struct Output {
929        #[doc = "A ClaimResponse resource or Bundle of claim responses, either as individual ClaimResponse resources or as Bundles each containing a single ClaimResponse plus referenced resources."]
930        #[parameter_rename = "return"]
931        pub return_: Resource,
932    }
933    impl From<Output> for Resource {
934        fn from(value: Output) -> Self {
935            let parameters: Vec<ParametersParameter> = value.into();
936            Resource::Parameters(Parameters {
937                parameter: Some(parameters),
938                ..Default::default()
939            })
940        }
941    }
942}
943#[doc = "Given a set of properties (and text), return one or more possible matching codes\n\nThis operation takes a set of properties, and examines the code system looking for codes in the code system that match a set of known properties. \n\nWhen looking for matches, there are 3 possible types of match:\n* a complete match - a code that represents all the provided properties correctly\n* a partial match - a code that represents some of the provided properties correctly, and not others \n* a possible match - a code that may represent the provided properties closely, but may capture less or more precise information for some of the properties\n\nThe $find-matches operation can be called in one of 2 modes:\n* By a human, looking for the best match for a set of properties. In this mode, the server returns a list of complete, possible or partial matches (possibly with comments), so that the user can choose (or not) the most appropriate code\n* By a machine (typically in a system interface performing a transformation). In this mode, the server returns only a list of complete and partial matches, but no possible matches. The machine can choose a code from the list (or not) based on what properties are not coded\n\nThese modes are differentiated by the 'exact' parameter, so the client can indicate whether it only wants exact matches (including partial matches) or whether potential matches based on text matching are desired\n \nThe find-matches operation is still preliminary. The interface can be expected to change as more experience is gained from implementations."]
944pub mod CodeSystemFindMatches {
945    use super::*;
946    pub const CODE: &str = "find-matches";
947    #[derive(Debug, FromParameters, ToParameters)]
948    pub struct InputPropertySubproperty {
949        #[doc = "Identifies the sub-property provided"]
950        pub code: FHIRCode,
951        #[doc = "The value of the sub-property provided"]
952        pub value: ParametersParameterValueTypeChoice,
953    }
954    impl From<InputPropertySubproperty> for Resource {
955        fn from(value: InputPropertySubproperty) -> Self {
956            let parameters: Vec<ParametersParameter> = value.into();
957            Resource::Parameters(Parameters {
958                parameter: Some(parameters),
959                ..Default::default()
960            })
961        }
962    }
963    #[derive(Debug, FromParameters, ToParameters)]
964    pub struct InputProperty {
965        #[doc = "Identifies the property provided"]
966        pub code: FHIRCode,
967        #[doc = "The value of the property provided"]
968        pub value: Option<ParametersParameterValueTypeChoice>,
969        #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
970        #[parameter_nested]
971        pub subproperty: Option<Vec<InputPropertySubproperty>>,
972    }
973    impl From<InputProperty> for Resource {
974        fn from(value: InputProperty) -> Self {
975            let parameters: Vec<ParametersParameter> = value.into();
976            Resource::Parameters(Parameters {
977                parameter: Some(parameters),
978                ..Default::default()
979            })
980        }
981    }
982    #[derive(Debug, FromParameters, ToParameters)]
983    pub struct Input {
984        #[doc = "The system in which composition is to be performed. This must be provided unless the operation is invoked on a code system instance"]
985        pub system: Option<FHIRUri>,
986        #[doc = "The version of the system for the inferencing to be performed"]
987        pub version: Option<FHIRString>,
988        #[doc = "One or more properties that contain information to be composed into the code"]
989        #[parameter_nested]
990        pub property: Option<Vec<InputProperty>>,
991        #[doc = "Whether the operation is being used by a human ('false'), or a machine ('true'). If the operation is being used by a human, the terminology server can return a list of possible matches, with commentary. For a machine, the server returns complete or partial matches, not possible matches. The default value is 'false'"]
992        pub exact: FHIRBoolean,
993        #[doc = "Post-coordinated expressions are allowed to be returned in the matching codes (mainly for SNOMED CT). Default = false"]
994        pub compositional: Option<FHIRBoolean>,
995    }
996    impl From<Input> for Resource {
997        fn from(value: Input) -> Self {
998            let parameters: Vec<ParametersParameter> = value.into();
999            Resource::Parameters(Parameters {
1000                parameter: Some(parameters),
1001                ..Default::default()
1002            })
1003        }
1004    }
1005    #[derive(Debug, FromParameters, ToParameters)]
1006    pub struct OutputMatchUnmatchedProperty {
1007        #[doc = "Identifies the sub-property provided"]
1008        pub code: FHIRCode,
1009        #[doc = "The value of the sub-property provided"]
1010        pub value: ParametersParameterValueTypeChoice,
1011    }
1012    impl From<OutputMatchUnmatchedProperty> for Resource {
1013        fn from(value: OutputMatchUnmatchedProperty) -> Self {
1014            let parameters: Vec<ParametersParameter> = value.into();
1015            Resource::Parameters(Parameters {
1016                parameter: Some(parameters),
1017                ..Default::default()
1018            })
1019        }
1020    }
1021    #[derive(Debug, FromParameters, ToParameters)]
1022    pub struct OutputMatchUnmatched {
1023        #[doc = "Identifies the property provided"]
1024        pub code: FHIRCode,
1025        #[doc = "The value of the property provided"]
1026        pub value: ParametersParameterValueTypeChoice,
1027        #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
1028        #[parameter_nested]
1029        pub property: Option<Vec<OutputMatchUnmatchedProperty>>,
1030    }
1031    impl From<OutputMatchUnmatched> for Resource {
1032        fn from(value: OutputMatchUnmatched) -> Self {
1033            let parameters: Vec<ParametersParameter> = value.into();
1034            Resource::Parameters(Parameters {
1035                parameter: Some(parameters),
1036                ..Default::default()
1037            })
1038        }
1039    }
1040    #[derive(Debug, FromParameters, ToParameters)]
1041    pub struct OutputMatch {
1042        #[doc = "A code that matches the properties provided"]
1043        pub code: Coding,
1044        #[doc = "One or more properties that contain properties that could not be matched into the code"]
1045        #[parameter_nested]
1046        pub unmatched: Option<Vec<OutputMatchUnmatched>>,
1047        #[doc = "Information about the quality of the match, if operation is for a human"]
1048        pub comment: Option<FHIRString>,
1049    }
1050    impl From<OutputMatch> for Resource {
1051        fn from(value: OutputMatch) -> Self {
1052            let parameters: Vec<ParametersParameter> = value.into();
1053            Resource::Parameters(Parameters {
1054                parameter: Some(parameters),
1055                ..Default::default()
1056            })
1057        }
1058    }
1059    #[derive(Debug, FromParameters, ToParameters)]
1060    pub struct Output {
1061        #[doc = "Concepts returned by the server as a result of the inferencing operation"]
1062        #[parameter_rename = "match"]
1063        #[parameter_nested]
1064        pub match_: Option<Vec<OutputMatch>>,
1065    }
1066    impl From<Output> for Resource {
1067        fn from(value: Output) -> Self {
1068            let parameters: Vec<ParametersParameter> = value.into();
1069            Resource::Parameters(Parameters {
1070                parameter: Some(parameters),
1071                ..Default::default()
1072            })
1073        }
1074    }
1075}
1076#[doc = "Given a code/system, or a Coding, get additional details about the concept, including definition, status, designations, and properties. One of the products of this operation is a full decomposition of a code from a structured terminology.\n\nWhen invoking this operation, a client SHALL provide both a system and a code, either using the system+code parameters, or in the coding parameter. Other parameters are optional"]
1077pub mod CodeSystemLookup {
1078    use super::*;
1079    pub const CODE: &str = "lookup";
1080    #[derive(Debug, FromParameters, ToParameters)]
1081    pub struct Input {
1082        #[doc = "The code that is to be located. If a code is provided, a system must be provided"]
1083        pub code: Option<FHIRCode>,
1084        #[doc = "The system for the code that is to be located"]
1085        pub system: Option<FHIRUri>,
1086        #[doc = "The version of the system, if one was provided in the source data"]
1087        pub version: Option<FHIRString>,
1088        #[doc = "A coding to look up"]
1089        pub coding: Option<Coding>,
1090        #[doc = "The date for which the information should be returned. Normally, this is the current conditions (which is the default value) but under some circumstances, systems need to acccess this information as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy."]
1091        pub date: Option<FHIRDateTime>,
1092        #[doc = "The requested language for display (see $expand.displayLanguage)"]
1093        pub displayLanguage: Option<FHIRCode>,
1094        #[doc = "A property that the client wishes to be returned in the output. If no properties are specified, the server chooses what to return. The following properties are defined for all code systems: url, name, version (code system info) and code information: display, definition, designation, parent and child, and for designations, lang.X where X is a designation language code. Some of the properties are returned explicit in named parameters (when the names match), and the rest (except for lang.X) in the property parameter group"]
1095        pub property: Option<Vec<FHIRCode>>,
1096    }
1097    impl From<Input> for Resource {
1098        fn from(value: Input) -> Self {
1099            let parameters: Vec<ParametersParameter> = value.into();
1100            Resource::Parameters(Parameters {
1101                parameter: Some(parameters),
1102                ..Default::default()
1103            })
1104        }
1105    }
1106    #[derive(Debug, FromParameters, ToParameters)]
1107    pub struct OutputDesignation {
1108        #[doc = "The language this designation is defined for"]
1109        pub language: Option<FHIRCode>,
1110        #[doc = "A code that details how this designation would be used"]
1111        #[parameter_rename = "use"]
1112        pub use_: Option<Coding>,
1113        #[doc = "The text value for this designation"]
1114        pub value: FHIRString,
1115    }
1116    impl From<OutputDesignation> for Resource {
1117        fn from(value: OutputDesignation) -> Self {
1118            let parameters: Vec<ParametersParameter> = value.into();
1119            Resource::Parameters(Parameters {
1120                parameter: Some(parameters),
1121                ..Default::default()
1122            })
1123        }
1124    }
1125    #[derive(Debug, FromParameters, ToParameters)]
1126    pub struct OutputPropertySubproperty {
1127        #[doc = "Identifies the sub-property returned"]
1128        pub code: FHIRCode,
1129        #[doc = "The value of the sub-property returned"]
1130        pub value: ParametersParameterValueTypeChoice,
1131        #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1132        pub description: Option<FHIRString>,
1133    }
1134    impl From<OutputPropertySubproperty> for Resource {
1135        fn from(value: OutputPropertySubproperty) -> Self {
1136            let parameters: Vec<ParametersParameter> = value.into();
1137            Resource::Parameters(Parameters {
1138                parameter: Some(parameters),
1139                ..Default::default()
1140            })
1141        }
1142    }
1143    #[derive(Debug, FromParameters, ToParameters)]
1144    pub struct OutputProperty {
1145        #[doc = "Identifies the property returned"]
1146        pub code: FHIRCode,
1147        #[doc = "The value of the property returned"]
1148        pub value: Option<ParametersParameterValueTypeChoice>,
1149        #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1150        pub description: Option<FHIRString>,
1151        #[doc = "Nested Properties (mainly used for SNOMED CT decomposition, for relationship Groups)"]
1152        #[parameter_nested]
1153        pub subproperty: Option<Vec<OutputPropertySubproperty>>,
1154    }
1155    impl From<OutputProperty> for Resource {
1156        fn from(value: OutputProperty) -> Self {
1157            let parameters: Vec<ParametersParameter> = value.into();
1158            Resource::Parameters(Parameters {
1159                parameter: Some(parameters),
1160                ..Default::default()
1161            })
1162        }
1163    }
1164    #[derive(Debug, FromParameters, ToParameters)]
1165    pub struct Output {
1166        #[doc = "A display name for the code system"]
1167        pub name: FHIRString,
1168        #[doc = "The version that these details are based on"]
1169        pub version: Option<FHIRString>,
1170        #[doc = "The preferred display for this concept"]
1171        pub display: FHIRString,
1172        #[doc = "Additional representations for this concept"]
1173        #[parameter_nested]
1174        pub designation: Option<Vec<OutputDesignation>>,
1175        #[doc = "One or more properties that contain additional information about the code, including status. For complex terminologies (e.g. SNOMED CT, LOINC, medications), these properties serve to decompose the code"]
1176        #[parameter_nested]
1177        pub property: Option<Vec<OutputProperty>>,
1178    }
1179    impl From<Output> for Resource {
1180        fn from(value: Output) -> Self {
1181            let parameters: Vec<ParametersParameter> = value.into();
1182            Resource::Parameters(Parameters {
1183                parameter: Some(parameters),
1184                ..Default::default()
1185            })
1186        }
1187    }
1188}
1189#[doc = "Test the subsumption relationship between code/Coding A and code/Coding B given the semantics of subsumption in the underlying code system (see [hierarchyMeaning](codesystem-definitions.html#CodeSystem.hierarchyMeaning)).\n\nWhen invoking this operation, a client SHALL provide both a and codes, either as code or Coding parameters. The system parameter is required unless the operation is invoked on an instance of a code system resource. Other parameters are optional"]
1190pub mod CodeSystemSubsumes {
1191    use super::*;
1192    pub const CODE: &str = "subsumes";
1193    #[derive(Debug, FromParameters, ToParameters)]
1194    pub struct Input {
1195        #[doc = "The \"A\" code that is to be tested. If a code is provided, a system must be provided"]
1196        pub codeA: Option<FHIRCode>,
1197        #[doc = "The \"B\" code that is to be tested. If a code is provided, a system must be provided"]
1198        pub codeB: Option<FHIRCode>,
1199        #[doc = "The code system in which subsumption testing is to be performed. This must be provided unless the operation is invoked on a code system instance"]
1200        pub system: Option<FHIRUri>,
1201        #[doc = "The version of the code system, if one was provided in the source data"]
1202        pub version: Option<FHIRString>,
1203        #[doc = "The \"A\" Coding that is to be tested. The code system does not have to match the specified subsumption code system, but the relationships between the code systems must be well established"]
1204        pub codingA: Option<Coding>,
1205        #[doc = "The \"B\" Coding that is to be tested. The code system does not have to match the specified subsumption code system, but the relationships between the code systems must be well established"]
1206        pub codingB: Option<Coding>,
1207    }
1208    impl From<Input> for Resource {
1209        fn from(value: Input) -> Self {
1210            let parameters: Vec<ParametersParameter> = value.into();
1211            Resource::Parameters(Parameters {
1212                parameter: Some(parameters),
1213                ..Default::default()
1214            })
1215        }
1216    }
1217    #[derive(Debug, FromParameters, ToParameters)]
1218    pub struct Output {
1219        #[doc = "The subsumption relationship between code/Coding \"A\" and code/Coding \"B\". There are 4 possible codes to be returned (equivalent, subsumes, subsumed-by, and not-subsumed) as defined in the concept-subsumption-outcome value set.  If the server is unable to determine the relationship between the codes/Codings, then it returns an error response with an OperationOutcome."]
1220        pub outcome: FHIRCode,
1221    }
1222    impl From<Output> for Resource {
1223        fn from(value: Output) -> Self {
1224            let parameters: Vec<ParametersParameter> = value.into();
1225            Resource::Parameters(Parameters {
1226                parameter: Some(parameters),
1227                ..Default::default()
1228            })
1229        }
1230    }
1231}
1232#[doc = "Validate that a coded value is in the code system. If the operation is not called at the instance level, one of the parameters \"url\" or \"codeSystem\" must be provided. The operation returns a result (true / false), an error message, and the recommended display for the code.\n\nWhen invoking this operation, a client SHALL provide one (and only one) of the parameters (code+system, coding, or codeableConcept). Other parameters (including version and display) are optional"]
1233pub mod CodeSystemValidateCode {
1234    use super::*;
1235    pub const CODE: &str = "validate-code";
1236    #[derive(Debug, FromParameters, ToParameters)]
1237    pub struct Input {
1238        #[doc = "CodeSystem URL. The server must know the code system (e.g. it is defined explicitly in the server'scode systems, or it is known implicitly by the server"]
1239        pub url: Option<FHIRUri>,
1240        #[doc = "The codeSystem is provided directly as part of the request. Servers may choose not to accept code systems in this fashion. This parameter is used when the client wants the server to check against a code system that is not stored on the server"]
1241        pub codeSystem: Option<CodeSystem>,
1242        #[doc = "The code that is to be validated"]
1243        pub code: Option<FHIRCode>,
1244        #[doc = "The version of the code system, if one was provided in the source data"]
1245        pub version: Option<FHIRString>,
1246        #[doc = "The display associated with the code, if provided. If a display is provided a code must be provided. If no display is provided, the server cannot validate the display value, but may choose to return a recommended display name in an extension in the outcome. Whether displays are case sensitive is code system dependent"]
1247        pub display: Option<FHIRString>,
1248        #[doc = "A coding to validate. The system must match the specified code system"]
1249        pub coding: Option<Coding>,
1250        #[doc = "A full codeableConcept to validate. The server returns true if one of the coding values is in the code system, and may also validate that the codings are not in conflict with each other if more than one is present"]
1251        pub codeableConcept: Option<CodeableConcept>,
1252        #[doc = "The date for which the validation should be checked. Normally, this is the current conditions (which is the default values) but under some circumstances, systems need to validate that a correct code was used at some point in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy."]
1253        pub date: Option<FHIRDateTime>,
1254        #[doc = "If this parameter has a value of true, the client is stating that the validation is being performed in a context where a concept designated as 'abstract' is appropriate/allowed to be used, and the server should regard abstract codes as valid. If this parameter is false, abstract codes are not considered to be valid.\n\nNote that. 'abstract' is a property defined by many HL7 code systems that indicates that the concept is a logical grouping concept that is not intended to be used asa 'concrete' concept to in an actual patient/care/process record. This language is borrowed from Object Orienated theory where 'asbtract' objects are never instantiated. However in the general record and terminology eco-system, there are many contexts where it is appropraite to use these codes e.g. as decision making criterion, or when editing value sets themselves. This parameter allows a client to indicate to the server that it is working in such a context."]
1255        #[parameter_rename = "abstract"]
1256        pub abstract_: Option<FHIRBoolean>,
1257        #[doc = "Specifies the language to be used for description when validating the display property"]
1258        pub displayLanguage: Option<FHIRCode>,
1259    }
1260    impl From<Input> for Resource {
1261        fn from(value: Input) -> Self {
1262            let parameters: Vec<ParametersParameter> = value.into();
1263            Resource::Parameters(Parameters {
1264                parameter: Some(parameters),
1265                ..Default::default()
1266            })
1267        }
1268    }
1269    #[derive(Debug, FromParameters, ToParameters)]
1270    pub struct Output {
1271        #[doc = "True if the concept details supplied are valid"]
1272        pub result: FHIRBoolean,
1273        #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
1274        pub message: Option<FHIRString>,
1275        #[doc = "A valid display for the concept if the system wishes to display this to a user"]
1276        pub display: Option<FHIRString>,
1277    }
1278    impl From<Output> for Resource {
1279        fn from(value: Output) -> Self {
1280            let parameters: Vec<ParametersParameter> = value.into();
1281            Resource::Parameters(Parameters {
1282                parameter: Some(parameters),
1283                ..Default::default()
1284            })
1285        }
1286    }
1287}
1288#[doc = "A client can ask a server to generate a fully bundled document from a composition resource. The server takes the composition resource, locates all the referenced resources and other additional resources as configured or requested and either returns a full document bundle, or returns an error. Note that since this is a search operation, the document bundle is  wrapped inside the search bundle.  If some of the resources are located on other servers, it is at the discretion of the  server whether to retrieve them or return an error. If the correct version of the document  that would be generated already exists, then the server can return the existing one."]
1289pub mod CompositionDocument {
1290    use super::*;
1291    pub const CODE: &str = "document";
1292    #[derive(Debug, FromParameters, ToParameters)]
1293    pub struct Input {
1294        #[doc = "Identifies the composition to use. This can either be a simple id, which identifies a composition, or it can be a full URL, which identifies a composition on another server. \n\nNotes: \n\n* GET [base]/Composition/[id]/$document is identical in meaning to GET [base]/Composition/$document?id=[id]\n* the id parameter SHALL NOT be used if the operation is requested on a particular composition (e.g.  GET [base]/Composition/[id]/$document?id=[id] is not allowed)\n* Servers are not required to support generating documents on Compositions located on another server"]
1295        pub id: Option<FHIRUri>,
1296        #[doc = "Whether to store the document at the bundle end-point (/Bundle) or not once it is generated. Value = true or false (default is for the server to decide). If the document is stored, it's location can be inferred from the Bundle.id, but it SHOULD be provided explicitly in the HTTP Location header in the response"]
1297        pub persist: Option<FHIRBoolean>,
1298        #[doc = "Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources"]
1299        pub graph: Option<FHIRUri>,
1300    }
1301    impl From<Input> for Resource {
1302        fn from(value: Input) -> Self {
1303            let parameters: Vec<ParametersParameter> = value.into();
1304            Resource::Parameters(Parameters {
1305                parameter: Some(parameters),
1306                ..Default::default()
1307            })
1308        }
1309    }
1310    #[derive(Debug, FromParameters, ToParameters)]
1311    pub struct Output {}
1312    impl From<Output> for Resource {
1313        fn from(value: Output) -> Self {
1314            let parameters: Vec<ParametersParameter> = value.into();
1315            Resource::Parameters(Parameters {
1316                parameter: Some(parameters),
1317                ..Default::default()
1318            })
1319        }
1320    }
1321}
1322#[doc = "This operation provides support for ongoing maintenance of a client-side [transitive closure table](https://en.wikipedia.org/wiki/Transitive_closure#In_graph_theory) based on server-side terminological logic. For details of how this is used, see [Maintaining a Closure Table](terminology-service.html#closure)"]
1323pub mod ConceptMapClosure {
1324    use super::*;
1325    pub const CODE: &str = "closure";
1326    #[derive(Debug, FromParameters, ToParameters)]
1327    pub struct Input {
1328        #[doc = "The name that defines the particular context for the subsumption based closure table"]
1329        pub name: FHIRString,
1330        #[doc = "Concepts to add to the closure table"]
1331        pub concept: Option<Vec<Coding>>,
1332        #[doc = "A request to resynchronise - request to send all new entries since the nominated version was sent by the server"]
1333        pub version: Option<FHIRString>,
1334    }
1335    impl From<Input> for Resource {
1336        fn from(value: Input) -> Self {
1337            let parameters: Vec<ParametersParameter> = value.into();
1338            Resource::Parameters(Parameters {
1339                parameter: Some(parameters),
1340                ..Default::default()
1341            })
1342        }
1343    }
1344    #[derive(Debug, FromParameters)]
1345    pub struct Output {
1346        #[doc = "A list of new entries (code / system --> code/system) that the client should add to its closure table. The only kind of entry mapping equivalences that can be returned are equal, specializes, subsumes and unmatched"]
1347        #[parameter_rename = "return"]
1348        pub return_: ConceptMap,
1349    }
1350    impl From<Output> for Resource {
1351        fn from(value: Output) -> Self {
1352            Resource::ConceptMap(value.return_)
1353        }
1354    }
1355}
1356#[doc = "Translate a code from one value set to another, based on the existing value set and concept maps resources, and/or other additional knowledge available to the server. \r\n\r\n One (and only one) of the in parameters (code, coding, codeableConcept) must be provided, to identify the code that is to be translated.  \r\n\r\n The operation returns a set of parameters including a 'result' for whether there is an acceptable match, and a list of possible matches. Note that the list of matches may include notes of codes for which mapping is specifically excluded, so implementers have to check the match.equivalence for each match"]
1357pub mod ConceptMapTranslate {
1358    use super::*;
1359    pub const CODE: &str = "translate";
1360    #[derive(Debug, FromParameters, ToParameters)]
1361    pub struct InputDependency {
1362        #[doc = "The element for this dependency"]
1363        pub element: Option<FHIRUri>,
1364        #[doc = "The value for this dependency"]
1365        pub concept: Option<CodeableConcept>,
1366    }
1367    impl From<InputDependency> for Resource {
1368        fn from(value: InputDependency) -> Self {
1369            let parameters: Vec<ParametersParameter> = value.into();
1370            Resource::Parameters(Parameters {
1371                parameter: Some(parameters),
1372                ..Default::default()
1373            })
1374        }
1375    }
1376    #[derive(Debug, FromParameters, ToParameters)]
1377    pub struct Input {
1378        #[doc = "A canonical URL for a concept map. The server must know the concept map (e.g. it is defined explicitly in the server's concept maps, or it is defined implicitly by some code system known to the server."]
1379        pub url: Option<FHIRUri>,
1380        #[doc = "The concept map is provided directly as part of the request. Servers may choose not to accept concept maps in this fashion."]
1381        pub conceptMap: Option<ConceptMap>,
1382        #[doc = "The identifier that is used to identify a specific version of the concept map to be used for the translation. This is an arbitrary value managed by the concept map 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."]
1383        pub conceptMapVersion: Option<FHIRString>,
1384        #[doc = "The code that is to be translated. If a code is provided, a system must be provided"]
1385        pub code: Option<FHIRCode>,
1386        #[doc = "The system for the code that is to be translated"]
1387        pub system: Option<FHIRUri>,
1388        #[doc = "The version of the system, if one was provided in the source data"]
1389        pub version: Option<FHIRString>,
1390        #[doc = "Identifies the value set used when the concept (system/code pair) was chosen. May be a logical id, or an absolute or relative location. The source value set is an optional parameter because in some cases, the client cannot know what the source value set is. However, without a source value set, the server may be unable to safely identify an applicable concept map, and would return an error. For this reason, a source value set SHOULD always be provided. Note that servers may be able to identify an appropriate concept map without a source value set if there is a full mapping for the entire code system in the concept map, or by manual intervention"]
1391        pub source: Option<FHIRUri>,
1392        #[doc = "A coding to translate"]
1393        pub coding: Option<Coding>,
1394        #[doc = "A full codeableConcept to validate. The server can translate any of the coding values (e.g. existing translations) as it chooses"]
1395        pub codeableConcept: Option<CodeableConcept>,
1396        #[doc = "Identifies the value set in which a translation is sought. May be a logical id, or an absolute or relative location. If there's no target specified, the server should return all known translations, along with their source"]
1397        pub target: Option<FHIRUri>,
1398        #[doc = "identifies a target code system in which a mapping is sought. This parameter is an alternative to the target parameter - only one is required. Searching for any translation to a target code system irrespective of the context (e.g. target valueset) may lead to unsafe results, and it is at the discretion of the server to decide when to support this operation"]
1399        pub targetsystem: Option<FHIRUri>,
1400        #[doc = "Another element that may help produce the correct mapping"]
1401        #[parameter_nested]
1402        pub dependency: Option<Vec<InputDependency>>,
1403        #[doc = "if this is true, then the operation should return all the codes that might be mapped to this code. This parameter reverses the meaning of the source and target parameters"]
1404        pub reverse: Option<FHIRBoolean>,
1405    }
1406    impl From<Input> for Resource {
1407        fn from(value: Input) -> Self {
1408            let parameters: Vec<ParametersParameter> = value.into();
1409            Resource::Parameters(Parameters {
1410                parameter: Some(parameters),
1411                ..Default::default()
1412            })
1413        }
1414    }
1415    #[derive(Debug, FromParameters, ToParameters)]
1416    pub struct OutputMatchProduct {
1417        #[doc = "The element for this product"]
1418        pub element: Option<FHIRUri>,
1419        #[doc = "The value for this product"]
1420        pub concept: Option<Coding>,
1421    }
1422    impl From<OutputMatchProduct> for Resource {
1423        fn from(value: OutputMatchProduct) -> Self {
1424            let parameters: Vec<ParametersParameter> = value.into();
1425            Resource::Parameters(Parameters {
1426                parameter: Some(parameters),
1427                ..Default::default()
1428            })
1429        }
1430    }
1431    #[derive(Debug, FromParameters, ToParameters)]
1432    pub struct OutputMatch {
1433        #[doc = "A code indicating the equivalence of the translation, using values from [ConceptMapEquivalence](valueset-concept-map-equivalence.html)"]
1434        pub equivalence: Option<FHIRCode>,
1435        #[doc = "The translation outcome. Note that this would never have userSelected = true, since the process of translations implies that the user is not selecting the code (and only the client could know differently)"]
1436        pub concept: Option<Coding>,
1437        #[doc = "Another element that is the product of this mapping"]
1438        #[parameter_nested]
1439        pub product: Option<Vec<OutputMatchProduct>>,
1440        #[doc = "The canonical reference to the concept map from which this mapping comes from"]
1441        pub source: Option<FHIRUri>,
1442    }
1443    impl From<OutputMatch> for Resource {
1444        fn from(value: OutputMatch) -> Self {
1445            let parameters: Vec<ParametersParameter> = value.into();
1446            Resource::Parameters(Parameters {
1447                parameter: Some(parameters),
1448                ..Default::default()
1449            })
1450        }
1451    }
1452    #[derive(Debug, FromParameters, ToParameters)]
1453    pub struct Output {
1454        #[doc = "True if the concept could be translated successfully. The value can only be true if at least one returned match has an equivalence which is not  unmatched or disjoint"]
1455        pub result: FHIRBoolean,
1456        #[doc = "Error details, for display to a human. If this is provided when result = true, the message carries hints and warnings (e.g. a note that the matches could be improved by providing additional detail)"]
1457        pub message: Option<FHIRString>,
1458        #[doc = "A concept in the target value set with an equivalence. Note that there may be multiple matches of equal or differing equivalence, and the matches may include equivalence values that mean that there is no match"]
1459        #[parameter_rename = "match"]
1460        #[parameter_nested]
1461        pub match_: Option<Vec<OutputMatch>>,
1462    }
1463    impl From<Output> for Resource {
1464        fn from(value: Output) -> Self {
1465            let parameters: Vec<ParametersParameter> = value.into();
1466            Resource::Parameters(Parameters {
1467                parameter: Some(parameters),
1468                ..Default::default()
1469            })
1470        }
1471    }
1472}
1473#[doc = "This operation is used to submit an EligibilityRequest for assessment either as a single EligibilityRequest resource instance or as a Bundle containing the EligibilityRequest and other referenced resources, or Bundle containing a batch of EligibilityRequest resources, either as single EligibilityRequests resources or Bundle resources, for processing. The only input parameter is the single EligibilityRequest or Bundle resource and the only output is a single EligibilityResponse, Bundle of EligibilityResponses or an OperationOutcome resource."]
1474pub mod CoverageEligibilityRequestSubmit {
1475    use super::*;
1476    pub const CODE: &str = "submit";
1477    #[derive(Debug, FromParameters, ToParameters)]
1478    pub struct Input {
1479        #[doc = "An EligibilityRequest resource or Bundle of EligibilityRequests, either as individual EligibilityRequest resources or as Bundles each containing a single EligibilityRequest plus referenced resources."]
1480        pub resource: Resource,
1481    }
1482    impl From<Input> for Resource {
1483        fn from(value: Input) -> Self {
1484            let parameters: Vec<ParametersParameter> = value.into();
1485            Resource::Parameters(Parameters {
1486                parameter: Some(parameters),
1487                ..Default::default()
1488            })
1489        }
1490    }
1491    #[derive(Debug, FromParameters, ToParameters)]
1492    pub struct Output {
1493        #[doc = "An EligibilityResponse resource or Bundle of EligibilityResponse responses, either as individual EligibilityResponse resources or as Bundles each containing a single EligibilityResponse plus referenced resources."]
1494        #[parameter_rename = "return"]
1495        pub return_: Resource,
1496    }
1497    impl From<Output> for Resource {
1498        fn from(value: Output) -> Self {
1499            let parameters: Vec<ParametersParameter> = value.into();
1500            Resource::Parameters(Parameters {
1501                parameter: Some(parameters),
1502                ..Default::default()
1503            })
1504        }
1505    }
1506}
1507#[doc = "This operation is used to return all the information related to an encounter described in the resource on which this operation is invoked. The response is a bundle of type \"searchset\". At a minimum, the encounter resource itself is returned, along with any other resources that the server has available for the given encounter for the user. The server also returns whatever resources are needed to support the records - e.g. linked practitioners, locations, organizations etc. The principle intended use for this operation is to provide a patient with access to their record, or to allow a client to retrieve everything for an encounter for efficient display).\r\rThe server SHOULD return all resources it has that:\r\r* are included in the encounter compartment for the identified encounter (have a reference to the encounter)\r* are referenced by the standard extenstion for associating an encounter (where no reference element exists) http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter\r* the server believes are relevant to the context of the encounter for any other reason (internally defined/decided)\r* any resource referenced by the above, including binaries and attachments (to make a more complete package)\r\rIn the US Realm, at a mimimum, the resources returned SHALL include all the data covered by the meaningful use common data elements (see [DAF](http://hl7.org/fhir/us/daf) for further guidance). Other applicable implementation guides may make additional rules about the information that is returned.   Note that for many resources, the exact nature of the link to encounter can be ambiguous (e.g. for a DiagnosticReport, is it the encounter when it was initiated, or when it was reported?)"]
1508pub mod EncounterEverything {
1509    use super::*;
1510    pub const CODE: &str = "everything";
1511    #[derive(Debug, FromParameters, ToParameters)]
1512    pub struct Input {
1513        #[doc = "Resources updated after this period will be included in the response. The intent of this parameter is to allow a client to request only records that have changed since the last request, based on either the return header time, or or (for asynchronous use), the transaction time"]
1514        pub _since: Option<FHIRInstant>,
1515        #[doc = "One or more parameters, each containing one or more comma-delimited FHIR resource types to include in the return resources. In the absense of any specified types, the server returns all resource types"]
1516        pub _type: Option<Vec<FHIRCode>>,
1517        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1518        pub _count: Option<FHIRInteger>,
1519    }
1520    impl From<Input> for Resource {
1521        fn from(value: Input) -> Self {
1522            let parameters: Vec<ParametersParameter> = value.into();
1523            Resource::Parameters(Parameters {
1524                parameter: Some(parameters),
1525                ..Default::default()
1526            })
1527        }
1528    }
1529    #[derive(Debug, FromParameters)]
1530    pub struct Output {
1531        #[doc = "The bundle type is \"searchset\""]
1532        #[parameter_rename = "return"]
1533        pub return_: Bundle,
1534    }
1535    impl From<Output> for Resource {
1536        fn from(value: Output) -> Self {
1537            Resource::Bundle(value.return_)
1538        }
1539    }
1540}
1541#[doc = "This operation is used to return all the information related to one or more patients that are part of the group on which this operation is invoked. The response is a bundle of type \"searchset\". At a minimum, the patient resource(s) itself is returned, along with any other resources that the server has that are related to the patient(s), and that are available for the given user. The server also returns whatever resources are needed to support the records - e.g. linked practitioners, medications, locations, organizations etc.   The intended use for this operation is for a provider or other user to perform a bulk data download.  The server SHOULD return at least all resources that it has that are in the patient compartment for the identified patient(s), and any resource referenced from those, including binaries and attachments. In the US Realm, at a mimimum, the resources returned SHALL include all the data covered by the meaningful use common data elements as defined in [US-Core](http://hl7.org/fhir/us/coref). Other applicable implementation guides may make additional rules about how much information that is returned."]
1542pub mod GroupEverything {
1543    use super::*;
1544    pub const CODE: &str = "everything";
1545    #[derive(Debug, FromParameters, ToParameters)]
1546    pub struct Input {
1547        #[doc = "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no start date is provided, all records prior to the end date are in scope."]
1548        pub start: Option<FHIRDate>,
1549        #[doc = "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no end date is provided, all records subsequent to the start date are in scope."]
1550        pub end: Option<FHIRDate>,
1551        #[doc = "Resources updated after this period will be included in the response. The intent of this parameter is to allow a client to request only records that have changed since the last request, based on either the return header time, or or (for asynchronous use), the transaction time"]
1552        pub _since: Option<FHIRInstant>,
1553        #[doc = "One or more parameters, each containing one or more comma-delimited FHIR resource types to include in the return resources. In the absense of any specified types, the server returns all resource types"]
1554        pub _type: Option<Vec<FHIRCode>>,
1555        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1556        pub _count: Option<FHIRInteger>,
1557    }
1558    impl From<Input> for Resource {
1559        fn from(value: Input) -> Self {
1560            let parameters: Vec<ParametersParameter> = value.into();
1561            Resource::Parameters(Parameters {
1562                parameter: Some(parameters),
1563                ..Default::default()
1564            })
1565        }
1566    }
1567    #[derive(Debug, FromParameters)]
1568    pub struct Output {
1569        #[doc = "The bundle type is \"searchset\""]
1570        #[parameter_rename = "return"]
1571        pub return_: Bundle,
1572    }
1573    impl From<Output> for Resource {
1574        fn from(value: Output) -> Self {
1575            Resource::Bundle(value.return_)
1576        }
1577    }
1578}
1579#[doc = "The data-requirements operation aggregates and returns the parameters and data requirements for a resource and all its dependencies as a single module definition"]
1580pub mod LibraryDataRequirements {
1581    use super::*;
1582    pub const CODE: &str = "data-requirements";
1583    #[derive(Debug, FromParameters, ToParameters)]
1584    pub struct Input {
1585        #[doc = "The target of the data requirements operation"]
1586        pub target: Option<FHIRString>,
1587    }
1588    impl From<Input> for Resource {
1589        fn from(value: Input) -> Self {
1590            let parameters: Vec<ParametersParameter> = value.into();
1591            Resource::Parameters(Parameters {
1592                parameter: Some(parameters),
1593                ..Default::default()
1594            })
1595        }
1596    }
1597    #[derive(Debug, FromParameters)]
1598    pub struct Output {
1599        #[doc = "The result of the requirements gathering"]
1600        #[parameter_rename = "return"]
1601        pub return_: Library,
1602    }
1603    impl From<Output> for Resource {
1604        fn from(value: Output) -> Self {
1605            Resource::Library(value.return_)
1606        }
1607    }
1608}
1609#[doc = "This operation allows a client to find an identified list for a particular function by its function. The operation takes two parameters, the identity of a patient, and the name of a functional list.     The list of defined functional lists can be found at [Current Resource Lists](lifecycle.html#lists). Applications are not required to support all the lists, and may define additional lists of their own.   If the system is able to locate a list that serves the identified purpose, it returns it as the body of the response with a 200 OK status. If the resource cannot be located, the server returns a 404 not found (optionally with an OperationOutcome resource)"]
1610pub mod ListFind {
1611    use super::*;
1612    pub const CODE: &str = "find";
1613    #[derive(Debug, FromParameters, ToParameters)]
1614    pub struct Input {
1615        #[doc = "The id of a patient resource located on the server on which this operation is executed"]
1616        pub patient: FHIRId,
1617        #[doc = "The code for the functional list that is being found"]
1618        pub name: FHIRCode,
1619    }
1620    impl From<Input> for Resource {
1621        fn from(value: Input) -> Self {
1622            let parameters: Vec<ParametersParameter> = value.into();
1623            Resource::Parameters(Parameters {
1624                parameter: Some(parameters),
1625                ..Default::default()
1626            })
1627        }
1628    }
1629    #[derive(Debug, FromParameters, ToParameters)]
1630    pub struct Output {}
1631    impl From<Output> for Resource {
1632        fn from(value: Output) -> Self {
1633            let parameters: Vec<ParametersParameter> = value.into();
1634            Resource::Parameters(Parameters {
1635                parameter: Some(parameters),
1636                ..Default::default()
1637            })
1638        }
1639    }
1640}
1641#[doc = "The care-gaps operation is used to determine gaps-in-care based on the results of quality measures"]
1642pub mod MeasureCareGaps {
1643    use super::*;
1644    pub const CODE: &str = "care-gaps";
1645    #[derive(Debug, FromParameters, ToParameters)]
1646    pub struct Input {
1647        #[doc = "The start of the measurement period. In keeping with the semantics of the date parameter used in the FHIR search operation, the period will start at the beginning of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period s"]
1648        pub periodStart: FHIRDate,
1649        #[doc = "The end of the measurement period. The period will end at the end of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period end to be 2014-12-31T23:59:59 inclusive"]
1650        pub periodEnd: FHIRDate,
1651        #[doc = "The topic to be used to determine which measures are considered for the care gaps report. Any measure with the given topic will be included in the report"]
1652        pub topic: FHIRString,
1653        #[doc = "Subject for which the care gaps report will be produced"]
1654        pub subject: FHIRString,
1655    }
1656    impl From<Input> for Resource {
1657        fn from(value: Input) -> Self {
1658            let parameters: Vec<ParametersParameter> = value.into();
1659            Resource::Parameters(Parameters {
1660                parameter: Some(parameters),
1661                ..Default::default()
1662            })
1663        }
1664    }
1665    #[derive(Debug, FromParameters)]
1666    pub struct Output {
1667        #[doc = "The result of the care gaps report will be returned as a document bundle with a MeasureReport entry for each included measure"]
1668        #[parameter_rename = "return"]
1669        pub return_: Bundle,
1670    }
1671    impl From<Output> for Resource {
1672        fn from(value: Output) -> Self {
1673            Resource::Bundle(value.return_)
1674        }
1675    }
1676}
1677#[doc = "The collect-data operation is used to collect the data-of-interest for the given measure."]
1678pub mod MeasureCollectData {
1679    use super::*;
1680    pub const CODE: &str = "collect-data";
1681    #[derive(Debug, FromParameters, ToParameters)]
1682    pub struct Input {
1683        #[doc = "The start of the measurement period. In keeping with the semantics of the date parameter used in the FHIR search operation, the period will start at the beginning of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period s"]
1684        pub periodStart: FHIRDate,
1685        #[doc = "The end of the measurement period. The period will end at the end of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period end to be 2014-12-31T23:59:59 inclusive"]
1686        pub periodEnd: FHIRDate,
1687        #[doc = "The measure to evaluate. This parameter is only required when the operation is invoked on the resource type, it is not used when invoking the operation on a Measure instance"]
1688        pub measure: Option<FHIRString>,
1689        #[doc = "Subject for which the measure will be collected. If not specified, measure data will be collected for all subjects that meet the requirements of the measure. If specified, the measure will only be calculated for the referenced subject(s)"]
1690        pub subject: Option<FHIRString>,
1691        #[doc = "Practitioner for which the measure will be collected. If specified, measure data will be collected only for subjects that have a primary relationship to the identified practitioner"]
1692        pub practitioner: Option<FHIRString>,
1693        #[doc = "The date the results of this measure were last received. This parameter used to indicate when the last time data for this measure was collected. This information is used to support incremental data collection scenarios"]
1694        pub lastReceivedOn: Option<FHIRDateTime>,
1695    }
1696    impl From<Input> for Resource {
1697        fn from(value: Input) -> Self {
1698            let parameters: Vec<ParametersParameter> = value.into();
1699            Resource::Parameters(Parameters {
1700                parameter: Some(parameters),
1701                ..Default::default()
1702            })
1703        }
1704    }
1705    #[derive(Debug, FromParameters, ToParameters)]
1706    pub struct Output {
1707        #[doc = "A MeasureReport of type data-collection detailing the results of the operation"]
1708        pub measureReport: MeasureReport,
1709        #[doc = "The result resources that make up the data-of-interest for the measure"]
1710        pub resource: Option<Vec<Resource>>,
1711    }
1712    impl From<Output> for Resource {
1713        fn from(value: Output) -> Self {
1714            let parameters: Vec<ParametersParameter> = value.into();
1715            Resource::Parameters(Parameters {
1716                parameter: Some(parameters),
1717                ..Default::default()
1718            })
1719        }
1720    }
1721}
1722#[doc = "The data-requirements operation aggregates and returns the parameters and data requirements for the measure and all its dependencies as a single module definition"]
1723pub mod MeasureDataRequirements {
1724    use super::*;
1725    pub const CODE: &str = "data-requirements";
1726    #[derive(Debug, FromParameters, ToParameters)]
1727    pub struct Input {
1728        #[doc = "The start of the measurement period. In keeping with the semantics of the date parameter used in the FHIR search operation, the period will start at the beginning of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period start to be 2014-01-01T00:00:00 inclusive"]
1729        pub periodStart: FHIRDate,
1730        #[doc = "The end of the measurement period. The period will end at the end of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period end to be 2014-12-31T23:59:59 inclusive"]
1731        pub periodEnd: FHIRDate,
1732    }
1733    impl From<Input> for Resource {
1734        fn from(value: Input) -> Self {
1735            let parameters: Vec<ParametersParameter> = value.into();
1736            Resource::Parameters(Parameters {
1737                parameter: Some(parameters),
1738                ..Default::default()
1739            })
1740        }
1741    }
1742    #[derive(Debug, FromParameters)]
1743    pub struct Output {
1744        #[doc = "The result of the requirements gathering is a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the measure"]
1745        #[parameter_rename = "return"]
1746        pub return_: Library,
1747    }
1748    impl From<Output> for Resource {
1749        fn from(value: Output) -> Self {
1750            Resource::Library(value.return_)
1751        }
1752    }
1753}
1754#[doc = "The evaluate-measure operation is used to calculate an eMeasure and obtain the results"]
1755pub mod MeasureEvaluateMeasure {
1756    use super::*;
1757    pub const CODE: &str = "evaluate-measure";
1758    #[derive(Debug, FromParameters, ToParameters)]
1759    pub struct Input {
1760        #[doc = "The start of the measurement period. In keeping with the semantics of the date parameter used in the FHIR search operation, the period will start at the beginning of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period start to be 2014-01-01T00:00:00 inclusive"]
1761        pub periodStart: FHIRDate,
1762        #[doc = "The end of the measurement period. The period will end at the end of the period implied by the supplied timestamp. E.g. a value of 2014 would set the period end to be 2014-12-31T23:59:59 inclusive"]
1763        pub periodEnd: FHIRDate,
1764        #[doc = "The measure to evaluate. This parameter is only required when the operation is invoked on the resource type, it is not used when invoking the operation on a Measure instance"]
1765        pub measure: Option<FHIRString>,
1766        #[doc = "The type of measure report: subject, subject-list, or population. If not specified, a default value of subject will be used if the subject parameter is supplied, otherwise, population will be used"]
1767        pub reportType: Option<FHIRCode>,
1768        #[doc = "Subject for which the measure will be calculated. If not specified, the measure will be calculated for all subjects that meet the requirements of the measure. If specified, the measure will only be calculated for the referenced subject(s)"]
1769        pub subject: Option<FHIRString>,
1770        #[doc = "Practitioner for which the measure will be calculated. If specified, the measure will be calculated only for subjects that have a primary relationship to the identified practitioner"]
1771        pub practitioner: Option<FHIRString>,
1772        #[doc = "The date the results of this measure were last received. This parameter is only valid for patient-level reports and is used to indicate when the last time a result for this patient was received. This information can be used to limit the set of resources returned for a patient-level report"]
1773        pub lastReceivedOn: Option<FHIRDateTime>,
1774    }
1775    impl From<Input> for Resource {
1776        fn from(value: Input) -> Self {
1777            let parameters: Vec<ParametersParameter> = value.into();
1778            Resource::Parameters(Parameters {
1779                parameter: Some(parameters),
1780                ..Default::default()
1781            })
1782        }
1783    }
1784    #[derive(Debug, FromParameters)]
1785    pub struct Output {
1786        #[doc = "The results of the measure calculation. See the MeasureReport resource for a complete description of the output of this operation. Note that implementations may choose to return a MeasureReport with a status of pending to indicate that the report is still being generated. In this case, the client can use a polling method to continually request the MeasureReport until the status is updated to complete"]
1787        #[parameter_rename = "return"]
1788        pub return_: MeasureReport,
1789    }
1790    impl From<Output> for Resource {
1791        fn from(value: Output) -> Self {
1792            Resource::MeasureReport(value.return_)
1793        }
1794    }
1795}
1796#[doc = "The submit-data operation is used to submit data-of-interest for a measure. There is no expectation that the submitted data represents all the data-of-interest, only that all the data submitted is relevant to the calculation of the measure for a particular subject or population"]
1797pub mod MeasureSubmitData {
1798    use super::*;
1799    pub const CODE: &str = "submit-data";
1800    #[derive(Debug, FromParameters, ToParameters)]
1801    pub struct Input {
1802        #[doc = "The measure report being submitted"]
1803        pub measureReport: MeasureReport,
1804        #[doc = "The individual resources that make up the data-of-interest being submitted"]
1805        pub resource: Option<Vec<Resource>>,
1806    }
1807    impl From<Input> for Resource {
1808        fn from(value: Input) -> Self {
1809            let parameters: Vec<ParametersParameter> = value.into();
1810            Resource::Parameters(Parameters {
1811                parameter: Some(parameters),
1812                ..Default::default()
1813            })
1814        }
1815    }
1816    #[derive(Debug, FromParameters, ToParameters)]
1817    pub struct Output {}
1818    impl From<Output> for Resource {
1819        fn from(value: Output) -> Self {
1820            let parameters: Vec<ParametersParameter> = value.into();
1821            Resource::Parameters(Parameters {
1822                parameter: Some(parameters),
1823                ..Default::default()
1824            })
1825        }
1826    }
1827}
1828#[doc = "This operation is used to return all the information related to one or more products described in the resource or context on which this operation is invoked. The response is a bundle of type \"searchset\". At a minimum, the product resource(s) itself is returned, along with any other resources that the server has that are related to the products(s), and that are available for the given user. This is typically the marketing authorisations, ingredients, packages, therapeutic indications and so on. The server also returns whatever resources are needed to support the records - e.g. linked organizations, document references etc."]
1829pub mod MedicinalProductEverything {
1830    use super::*;
1831    pub const CODE: &str = "everything";
1832    #[derive(Debug, FromParameters, ToParameters)]
1833    pub struct Input {
1834        #[doc = "Resources updated after this period will be included in the response. The intent of this parameter is to allow a client to request only records that have changed since the last request, based on either the return header time, or or (for asynchronous use), the transaction time"]
1835        pub _since: Option<FHIRInstant>,
1836        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1837        pub _count: Option<FHIRInteger>,
1838    }
1839    impl From<Input> for Resource {
1840        fn from(value: Input) -> Self {
1841            let parameters: Vec<ParametersParameter> = value.into();
1842            Resource::Parameters(Parameters {
1843                parameter: Some(parameters),
1844                ..Default::default()
1845            })
1846        }
1847    }
1848    #[derive(Debug, FromParameters)]
1849    pub struct Output {
1850        #[doc = "The bundle type is \"searchset\""]
1851        #[parameter_rename = "return"]
1852        pub return_: Bundle,
1853    }
1854    impl From<Output> for Resource {
1855        fn from(value: Output) -> Self {
1856            Resource::Bundle(value.return_)
1857        }
1858    }
1859}
1860#[doc = "This operation accepts a message, processes it according to the definition of the event in the message header, and returns one or more response messages.  \n\nIn addition to processing the message event, a server may choose to retain all or some the resources and make them available on a RESTful interface, but is not required to do so."]
1861pub mod MessageHeaderProcessMessage {
1862    use super::*;
1863    pub const CODE: &str = "process-message";
1864    #[derive(Debug, FromParameters, ToParameters)]
1865    pub struct Input {
1866        #[doc = "The message to process (or, if using asynchronous messaging, it may be a response message to accept)"]
1867        pub content: Bundle,
1868        #[doc = "If 'true' the message is processed using the asynchronous messaging pattern"]
1869        #[parameter_rename = "async"]
1870        pub async_: Option<FHIRBoolean>,
1871        #[doc = "A URL to submit response messages to, if asynchronous messaging is being used, and if the MessageHeader.source.endpoint is not the appropriate place to submit responses"]
1872        #[parameter_rename = "response-url"]
1873        pub response_url: Option<FHIRUrl>,
1874    }
1875    impl From<Input> for Resource {
1876        fn from(value: Input) -> Self {
1877            let parameters: Vec<ParametersParameter> = value.into();
1878            Resource::Parameters(Parameters {
1879                parameter: Some(parameters),
1880                ..Default::default()
1881            })
1882        }
1883    }
1884    #[derive(Debug, FromParameters)]
1885    pub struct Output {
1886        #[doc = "A response message, if synchronous messaging is being used (mandatory in this case). For asynchronous messaging, there is no return value"]
1887        #[parameter_rename = "return"]
1888        pub return_: Option<Bundle>,
1889    }
1890    impl From<Output> for Resource {
1891        fn from(value: Output) -> Self {
1892            Resource::Bundle(value.return_.unwrap_or_default())
1893        }
1894    }
1895}
1896#[doc = "This operation returns the preferred identifiers for identifiers, and terminologies. The operation takes 2 parameters:     \n\n* a system identifier - either a URI, an OID, or a v2 table 0396 (other) code  \n* a code for what kind of identifier is desired (URI, OID, v2 table 0396 identifier)    \n\nand returns either the requested identifier, or an HTTP errors response with an OperationOutcome because either the provided identifier was not recognized, or the requested identiifer type is not known.    \n\nThe principle use of this operation is when converting between v2, CDA and FHIR Identifier/CX/II and CodeableConcepts/C(N/W)E/CD but the operation may also find use when converting metadata such as profiles."]
1897pub mod NamingSystemPreferredId {
1898    use super::*;
1899    pub const CODE: &str = "preferred-id";
1900    #[derive(Debug, FromParameters, ToParameters)]
1901    pub struct Input {
1902        #[doc = "The server parses the provided id to see what type it is (mary a URI, an OID as a URI, a plain OID, or a v2 table 0396 code). If the server can't tell what type of identifier it is, it can try it as multiple types. It is an error if more than one system matches the provided identifier"]
1903        pub id: FHIRString,
1904        #[doc = ""]
1905        #[parameter_rename = "type"]
1906        pub type_: FHIRCode,
1907    }
1908    impl From<Input> for Resource {
1909        fn from(value: Input) -> Self {
1910            let parameters: Vec<ParametersParameter> = value.into();
1911            Resource::Parameters(Parameters {
1912                parameter: Some(parameters),
1913                ..Default::default()
1914            })
1915        }
1916    }
1917    #[derive(Debug, FromParameters, ToParameters)]
1918    pub struct Output {
1919        #[doc = "OIDs are return as plain OIDs (not the URI form)."]
1920        pub result: FHIRString,
1921    }
1922    impl From<Output> for Resource {
1923        fn from(value: Output) -> Self {
1924            let parameters: Vec<ParametersParameter> = value.into();
1925            Resource::Parameters(Parameters {
1926                parameter: Some(parameters),
1927                ..Default::default()
1928            })
1929        }
1930    }
1931}
1932#[doc = "The *lastn query* meets the common need for searching for the most recent or last n=number of observations for a subject. For example, retrieving the last 5 temperatures for a patient to view trends or fetching the most recent laboratory results or vitals signs. To ask a server to return the last n=number of observations, the *lastn* query uses the [normal search parameters](observation.html#search) defined for the Observation resource.  However, rather than their normal use, they are interpreted as inputs - i.e.. instead of requiring that the resources literally contain the search parameters, they are passed to a server algorithm of some kind that uses them to determine the most appropriate matches.\n\nThe request for a lastn query SHALL include:\n\n* A `$lastn` operation parameter\n*  A subject using either the `patient` or `subject`  search parameter\n*  A `category` parameter and/or a search parameter that contains a code element in its FHIRpath expression.  ( e.g., `code` or `code-value-concept`)\n\nThe request for a lastn query MAY include:\n\n* Other Observation search parameters and modifiers\n\nThe response from a lastn query is a set of observations:\n\n*  Filtered by additional parameters\n   * If not explicitly filtered by status then will include statuses of 'entered-in-error'\n* 'GROUP BY' `Observation.code`\n   * Codes SHALL be considered equivalent if the `coding.value` *and* `coding.system` are the same.\n   * Text only codes SHALL be treated and grouped based on the text.\n   * For codes with translations (multiple codings), the code translations are assumed to be equal and the grouping by code SHALL follow the transitive property of equality.\n\nfor example:\n\n|Observation.code for observation a|Observation.code for observation b|Observation.code for observation c|number of groups [codes/text in each group]|    \n|---|---|---|---|     \n|a|b|c | 3 [a],[b],[c]|    \n|a|b|a,c | 2 [a.c],[b]|     \n|a|b|a,b | 1 [a,b]|    \n|'textM'|'Text'|'t e x t'|3 ['text'],['Text'],['t e x t']|\n\n* Sorted from most recent to the oldest\n* Limited to the number of requested responses per group specified by the optional *max* query parameter\n  * In case of a tie - when the effective times for >1 Observations are equal - both will be returned.  Therefore, more Observations may be returned than is specified in *max*.  For example, 4 Observations instead of 3 if the 3rd and 4th most recent observation had the same effective time.\n* If no maximum number is given then only the most recent Observation in each group is returned.\n\nThe set of returned observations should represent distinct real world observations and not the same observation with changes in status or versions. If there are no matches, the *lastn* query SHALL return an empty search set with no error, but may include an operation outcome with further advice."]
1933pub mod ObservationLastn {
1934    use super::*;
1935    pub const CODE: &str = "lastn";
1936    #[derive(Debug, FromParameters, ToParameters)]
1937    pub struct Input {
1938        #[doc = "`max` is  an optional input parameter to the *lastn* query operation.  It is used to specify the maximum number of Observations to return from each group. For example for the query \"Fetch the last 3 results for all vitals for a patient\" `max` = 3."]
1939        pub max: Option<FHIRPositiveInt>,
1940    }
1941    impl From<Input> for Resource {
1942        fn from(value: Input) -> Self {
1943            let parameters: Vec<ParametersParameter> = value.into();
1944            Resource::Parameters(Parameters {
1945                parameter: Some(parameters),
1946                ..Default::default()
1947            })
1948        }
1949    }
1950    #[derive(Debug, FromParameters)]
1951    pub struct Output {
1952        #[doc = "The set of most recent N Observations that match the *lastn* query search criteria."]
1953        #[parameter_rename = "return"]
1954        pub return_: Bundle,
1955    }
1956    impl From<Output> for Resource {
1957        fn from(value: Output) -> Self {
1958            Resource::Bundle(value.return_)
1959        }
1960    }
1961}
1962#[doc = "The Statistics operation performs a set of statistical calculations on a set of clinical measurements such as a blood pressure as stored on the server.  This operation evaluates [Observation](observation.html) resources having valueQuantity elements that have UCUM unit codes. Observations with a status of 'entered-in-error' will be excluded from the calculations.  \r\rThe set of Observations is defined by 4 parameters:\r\r*  the subject of the observations for which the statistics are being generated (`subject`)\r* which observations to generate statistics for (`code` and `system`, or `coding`)\r* the time period over which to generate statistics 'duration` or `period`)\r* the set of statistical analyses to return (`statistic`)\r\rPossible statistical analyses (see [StatisticsCode](valueset-observation-statistics.html)):\r\r - **average** (\"Average\"): The [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) of N measurements over the stated period.\r\n - **maximum** (\"Maximum\"): The [maximum](https://en.wikipedia.org/wiki/Maximal_element) value of N measurements over the stated period.\r\n - **minimum** (\"Minimum\"): The [minimum](https://en.wikipedia.org/wiki/Minimal_element) value of N measurements over the stated period.\r\n - **count** (\"Count\"): The [number] of valid measurements over the stated period that contributed to the other statistical outputs.\r\n - **total-count** (\"Total Count\"): The total [number] of valid measurements over the stated period, including observations that were ignored because they did not contain valid result values.\r\n - **median** (\"Median\"): The [median](https://en.wikipedia.org/wiki/Median) of N measurements over the stated period.\r\n - **std-dev** (\"Standard Deviation\"): The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation) of N measurements over the stated period.\r\n - **sum** (\"Sum\"): The [sum](https://en.wikipedia.org/wiki/Summation) of N measurements over the stated period.\r\n - **variance** (\"Variance\"): The [variance](https://en.wikipedia.org/wiki/Variance) of N measurements over the stated period.\r\n - **20-percent** (\"20th Percentile\"): The 20th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period.\r\n - **80-percent** (\"80th Percentile\"): The 80th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period.\r\n - **4-lower** (\"Lower Quartile\"): The lower [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period.\r\n - **4-upper** (\"Upper Quartile\"): The upper [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period.\r\n - **4-dev** (\"Quartile Deviation\"): The difference between the upper and lower [Quartiles](https://en.wikipedia.org/wiki/Quartile) is called the Interquartile range. (IQR = Q3-Q1) Quartile deviation or Semi-interquartile range is one-half the difference between the first and the third quartiles.\r\n - **5-1** (\"1st Quintile\"): The lowest of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population.\r\n - **5-2** (\"2nd Quintile\"): The second of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population.\r\n - **5-3** (\"3rd Quintile\"): The third of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population.\r\n - **5-4** (\"4th Quintile\"): The fourth of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population.\r\n - **skew** (\"Skew\"): Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or even undefined.  Source: [Wikipedia](https://en.wikipedia.org/wiki/Skewness).\r\n - **kurtosis** (\"Kurtosis\"): Kurtosis  is a measure of the \"tailedness\" of the probability distribution of a real-valued random variable.   Source: [Wikipedia](https://en.wikipedia.org/wiki/Kurtosis).\r\n - **regression** (\"Regression\"): Linear regression is an approach for modeling two-dimensional sample points with one independent variable and one dependent variable (conventionally, the x and y coordinates in a Cartesian coordinate system) and finds a linear function (a non-vertical straight line) that, as accurately as possible, predicts the dependent variable values as a function of the independent variables. Source: [Wikipedia](https://en.wikipedia.org/wiki/Simple_linear_regression)  This Statistic code will return both a gradient and an intercept value.\r\n\r\rIf successful, the operation returns an Observation resource for each code with the results of the statistical calculations as component value pairs where the component code = the statistical code. The Observation also contains the input parameters `patient`,`code` and `duration` parameters. If unsuccessful, an [OperationOutcome](operationoutcome.html) with an error message will be returned.\r\rThe client can request that all the observations on which the statistics are based be returned as well, using the include parameter. If an include parameter is specified, a limit may also be specified; the sources observations are subsetted at the server's discretion if count > limit. This functionality is included with the intent of supporting graphical presentation"]
1963pub mod ObservationStats {
1964    use super::*;
1965    pub const CODE: &str = "stats";
1966    #[derive(Debug, FromParameters, ToParameters)]
1967    pub struct Input {
1968        #[doc = "The subject of the relevant Observations, which has the value of the Observation.subject.reference. E.g. 'Patient/123'. Reference can be to an absolute URL, but servers only perform stats on their own observations"]
1969        pub subject: FHIRUri,
1970        #[doc = "The test code(s) upon which the statistics are being performed. Provide along with a system, or as a coding. For example, the LOINC code  = \r2339-0 (Glucose [Mass/\u{200b}volume] in Blood) will evaluate all relevant Observations with this code in `Observation.code` and `Observation.component.code`. For LOINC codes that are panels, e.g., 85354-9(Blood pressure panel with all children optional), the stats operation returns statistics for each of the individual panel measurements.  That means it will include and evaluate all values grouped by code for all the individual observations that are: 1) referenced in   `.related` for `.related.type` = 'has-member'  and 2) component observations in `Observation.component`."]
1971        pub code: Option<Vec<FHIRString>>,
1972        #[doc = "The system for the code(s). Or provide a coding instead"]
1973        pub system: Option<FHIRUri>,
1974        #[doc = "The test code upon which the statistics are being performed, as a Coding"]
1975        pub coding: Option<Vec<Coding>>,
1976        #[doc = "The time period of interest given as hours.  For example, the duration = \"1\" represents the last hour - the time period from on hour ago to now"]
1977        pub duration: Option<FHIRDecimal>,
1978        #[doc = "The time period over which the calculations to be performed, if a duration is not provided"]
1979        pub period: Option<Period>,
1980        #[doc = "average|max|min|count  The statistical operations to be performed on the relevant operations. Multiple statistics operations can be specified. These codes are defined [here](valueset-observation-statistics.html)"]
1981        pub statistic: Vec<FHIRCode>,
1982        #[doc = "Whether to return the observations on which the statistics are based"]
1983        pub include: Option<FHIRBoolean>,
1984        #[doc = "If an include parameter is specified, a limit may also be specified to limit the number of source Observations returned.  If the include paramter is absent or equal to \"false\" the limit parameter SHALL be ignored by the server"]
1985        pub limit: Option<FHIRPositiveInt>,
1986    }
1987    impl From<Input> for Resource {
1988        fn from(value: Input) -> Self {
1989            let parameters: Vec<ParametersParameter> = value.into();
1990            Resource::Parameters(Parameters {
1991                parameter: Some(parameters),
1992                ..Default::default()
1993            })
1994        }
1995    }
1996    #[derive(Debug, FromParameters, ToParameters)]
1997    pub struct Output {
1998        #[doc = "A set of observations, one observation for each code, each containing one component for each statistic. The Observation.component.code contains the statistic, and is relative to the Observation.code and cannot be interpreted independently.  The Observation will also contain a subject, effectivePeriod, and code reflecting the input parameters.  The status is fixed to `final`."]
1999        pub statistics: Vec<Observation>,
2000        #[doc = "Source observations on which the statistics are based"]
2001        pub source: Option<Vec<Observation>>,
2002    }
2003    impl From<Output> for Resource {
2004        fn from(value: Output) -> Self {
2005            let parameters: Vec<ParametersParameter> = value.into();
2006            Resource::Parameters(Parameters {
2007                parameter: Some(parameters),
2008                ..Default::default()
2009            })
2010        }
2011    }
2012}
2013#[doc = "This operation is used to return all the information related to one or more patients described in the resource or context on which this operation is invoked. The response is a bundle of type \"searchset\". At a minimum, the patient resource(s) itself is returned, along with any other resources that the server has that are related to the patient(s), and that are available for the given user. The server also returns whatever resources are needed to support the records - e.g. linked practitioners, medications, locations, organizations etc.   \n\nThe intended use for this operation is to provide a patient with access to their entire record (e.g. \"Blue Button\"), or for provider or other user to perform a bulk data download.  The server SHOULD return at least all resources that it has that are in the patient compartment for the identified patient(s), and any resource referenced from those, including binaries and attachments. In the US Realm, at a minimum, the resources returned SHALL include all the data covered by the meaningful use common data elements as defined in the US Core Implementation Guide. Other applicable implementation guides may make additional rules about how much information that is returned."]
2014pub mod PatientEverything {
2015    use super::*;
2016    pub const CODE: &str = "everything";
2017    #[derive(Debug, FromParameters, ToParameters)]
2018    pub struct Input {
2019        #[doc = "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no start date is provided, all records prior to the end date are in scope."]
2020        pub start: Option<FHIRDate>,
2021        #[doc = "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no end date is provided, all records subsequent to the start date are in scope."]
2022        pub end: Option<FHIRDate>,
2023        #[doc = "Resources updated after this period will be included in the response. The intent of this parameter is to allow a client to request only records that have changed since the last request, based on either the return header time, or or (for asynchronous use), the transaction time"]
2024        pub _since: Option<FHIRInstant>,
2025        #[doc = "One or more parameters, each containing one or more comma-delimited FHIR resource types to include in the return resources. In the absence of any specified types, the server returns all resource types"]
2026        pub _type: Option<Vec<FHIRCode>>,
2027        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
2028        pub _count: Option<FHIRInteger>,
2029    }
2030    impl From<Input> for Resource {
2031        fn from(value: Input) -> Self {
2032            let parameters: Vec<ParametersParameter> = value.into();
2033            Resource::Parameters(Parameters {
2034                parameter: Some(parameters),
2035                ..Default::default()
2036            })
2037        }
2038    }
2039    #[derive(Debug, FromParameters)]
2040    pub struct Output {
2041        #[doc = "The bundle type is \"searchset\""]
2042        #[parameter_rename = "return"]
2043        pub return_: Bundle,
2044    }
2045    impl From<Output> for Resource {
2046        fn from(value: Output) -> Self {
2047            Resource::Bundle(value.return_)
2048        }
2049    }
2050}
2051#[doc = "A Master Patient Index ([MPI](http://en.wikipedia.org/wiki/Enterprise_master_patient_index) ) is a service used to manage patient identification in a context where multiple patient databases exist. Healthcare applications and middleware use the MPI to match patients between the databases, and to store new patient details as they are encountered. MPIs are highly specialized applications, often tailored extensively to the institution's particular mix of patients. MPIs can also be run on a regional and national basis.  \n\nTo ask an MPI to match a patient, clients use the \"$match\" operation, which accepts a patient resource which may be only partially complete. The data provided is interpreted as an MPI input and processed by an algorithm of some kind that uses the data to determine the most appropriate matches in the patient set.  Note that different MPI matching algorithms have different required inputs. The generic $match operation does not specify any particular algorithm, nor a minimum set of information that must be provided when asking for an MPI match operation to be performed, but many implementations will have a set of minimum information, which may be declared in their definition of the $match operation by specifying a profile on the resource parameter, indicating which properties are required in the search.  The patient resource submitted to the operation does not have to be complete, nor does it need to pass validation (i.e. mandatory fields don't need to be populated), but it does have to be a valid instance, as it is used as the reference data to match against."]
2052pub mod PatientMatch {
2053    use super::*;
2054    pub const CODE: &str = "match";
2055    #[derive(Debug, FromParameters, ToParameters)]
2056    pub struct Input {
2057        #[doc = "Use this to provide an entire set of patient details for the MPI to match against (e.g. POST a patient record to Patient/$match)."]
2058        pub resource: Resource,
2059        #[doc = "If there are multiple potential matches, then the match should not return the results with this flag set to true.  When false, the server may return multiple results with each result graded accordingly."]
2060        pub onlyCertainMatches: Option<FHIRBoolean>,
2061        #[doc = "The maximum number of records to return. If no value is provided, the server decides how many matches to return. Note that clients should be careful when using this, as it may prevent probable - and valid - matches from being returned"]
2062        pub count: Option<FHIRInteger>,
2063    }
2064    impl From<Input> for Resource {
2065        fn from(value: Input) -> Self {
2066            let parameters: Vec<ParametersParameter> = value.into();
2067            Resource::Parameters(Parameters {
2068                parameter: Some(parameters),
2069                ..Default::default()
2070            })
2071        }
2072    }
2073    #[derive(Debug, FromParameters)]
2074    pub struct Output {
2075        #[doc = "A bundle contain a set of Patient records that represent possible matches, optionally it may also contain an OperationOutcome with further information about the search results (such as warnings or information messages, such as a count of records that were close but eliminated)  If the operation was unsuccessful, then an OperationOutcome may be returned along with a BadRequest status Code (e.g. security issue, or insufficient properties in patient fragment - check against profile)"]
2076        #[parameter_rename = "return"]
2077        pub return_: Bundle,
2078    }
2079    impl From<Output> for Resource {
2080        fn from(value: Output) -> Self {
2081            Resource::Bundle(value.return_)
2082        }
2083    }
2084}
2085#[doc = "The apply operation applies a PlanDefinition to a given context"]
2086pub mod PlanDefinitionApply {
2087    use super::*;
2088    pub const CODE: &str = "apply";
2089    #[derive(Debug, FromParameters, ToParameters)]
2090    pub struct Input {
2091        #[doc = "The plan definition to be applied. If the operation is invoked at the instance level, this parameter is not allowed; if the operation is invoked at the type level, this parameter is required"]
2092        pub planDefinition: Option<PlanDefinition>,
2093        #[doc = "The subject(s) that is/are the target of the plan to be applied. The subject may be a Patient, Practitioner, Organization, Location, Device, or Group. Subjects provided in this parameter will be resolved as the subject of the PlanDefinition based on the type of the subject. If multiple subjects of the same type are provided, the behavior is implementation-defined"]
2094        pub subject: Vec<FHIRString>,
2095        #[doc = "The encounter in context, if any"]
2096        pub encounter: Option<FHIRString>,
2097        #[doc = "The practitioner applying the plan definition"]
2098        pub practitioner: Option<FHIRString>,
2099        #[doc = "The organization applying the plan definition"]
2100        pub organization: Option<FHIRString>,
2101        #[doc = "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)"]
2102        pub userType: Option<CodeableConcept>,
2103        #[doc = "Preferred language of the person using the system"]
2104        pub userLanguage: Option<CodeableConcept>,
2105        #[doc = "The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources"]
2106        pub userTaskContext: Option<CodeableConcept>,
2107        #[doc = "The current setting of the request (inpatient, outpatient, etc.)"]
2108        pub setting: Option<CodeableConcept>,
2109        #[doc = "Additional detail about the setting of the request, if any"]
2110        pub settingContext: Option<CodeableConcept>,
2111    }
2112    impl From<Input> for Resource {
2113        fn from(value: Input) -> Self {
2114            let parameters: Vec<ParametersParameter> = value.into();
2115            Resource::Parameters(Parameters {
2116                parameter: Some(parameters),
2117                ..Default::default()
2118            })
2119        }
2120    }
2121    #[derive(Debug, FromParameters)]
2122    pub struct Output {
2123        #[doc = "The CarePlan that is the result of applying the plan definition"]
2124        #[parameter_rename = "return"]
2125        pub return_: CarePlan,
2126    }
2127    impl From<Output> for Resource {
2128        fn from(value: Output) -> Self {
2129            Resource::CarePlan(value.return_)
2130        }
2131    }
2132}
2133#[doc = "The data-requirements operation aggregates and returns the parameters and data requirements for the plan definition and all its dependencies as a single module definition library"]
2134pub mod PlanDefinitionDataRequirements {
2135    use super::*;
2136    pub const CODE: &str = "data-requirements";
2137    #[derive(Debug, FromParameters, ToParameters)]
2138    pub struct Input {}
2139    impl From<Input> for Resource {
2140        fn from(value: Input) -> Self {
2141            let parameters: Vec<ParametersParameter> = value.into();
2142            Resource::Parameters(Parameters {
2143                parameter: Some(parameters),
2144                ..Default::default()
2145            })
2146        }
2147    }
2148    #[derive(Debug, FromParameters)]
2149    pub struct Output {
2150        #[doc = "The result of the requirements gathering is a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the plan definition"]
2151        #[parameter_rename = "return"]
2152        pub return_: Library,
2153    }
2154    impl From<Output> for Resource {
2155        fn from(value: Output) -> Self {
2156            Resource::Library(value.return_)
2157        }
2158    }
2159}
2160#[doc = "This operation takes a resource in one form, and returns to in another form. Both input and output are a single resource. The primary use of this operation is to convert between formats (e.g. (XML -> JSON or vice versa)"]
2161pub mod ResourceConvert {
2162    use super::*;
2163    pub const CODE: &str = "convert";
2164    #[derive(Debug, FromParameters, ToParameters)]
2165    pub struct Input {
2166        #[doc = "The resource that is to be converted"]
2167        pub input: Resource,
2168    }
2169    impl From<Input> for Resource {
2170        fn from(value: Input) -> Self {
2171            let parameters: Vec<ParametersParameter> = value.into();
2172            Resource::Parameters(Parameters {
2173                parameter: Some(parameters),
2174                ..Default::default()
2175            })
2176        }
2177    }
2178    #[derive(Debug, FromParameters, ToParameters)]
2179    pub struct Output {
2180        #[doc = "The resource after conversion"]
2181        pub output: Resource,
2182    }
2183    impl From<Output> for Resource {
2184        fn from(value: Output) -> Self {
2185            let parameters: Vec<ParametersParameter> = value.into();
2186            Resource::Parameters(Parameters {
2187                parameter: Some(parameters),
2188                ..Default::default()
2189            })
2190        }
2191    }
2192}
2193#[doc = "Return an entire graph of resources based on a [GraphDefinition](graphdefinition.html). The operation is invoked on a specific instance of a resource, and the graph definition tells the server what other resources to return in the same packaage"]
2194pub mod ResourceGraph {
2195    use super::*;
2196    pub const CODE: &str = "graph";
2197    #[derive(Debug, FromParameters, ToParameters)]
2198    pub struct Input {
2199        #[doc = "Servers MAY choose to allow any graph definition to be specified, but MAY require that the client choose a graph definition from a specific list of known supported definitions. The server is not required to support a formal definition of the graph on the end point"]
2200        pub graph: FHIRUri,
2201    }
2202    impl From<Input> for Resource {
2203        fn from(value: Input) -> Self {
2204            let parameters: Vec<ParametersParameter> = value.into();
2205            Resource::Parameters(Parameters {
2206                parameter: Some(parameters),
2207                ..Default::default()
2208            })
2209        }
2210    }
2211    #[derive(Debug, FromParameters, ToParameters)]
2212    pub struct Output {
2213        #[doc = "The set of resources that were in the graph based on the provided definition"]
2214        pub result: Bundle,
2215    }
2216    impl From<Output> for Resource {
2217        fn from(value: Output) -> Self {
2218            let parameters: Vec<ParametersParameter> = value.into();
2219            Resource::Parameters(Parameters {
2220                parameter: Some(parameters),
2221                ..Default::default()
2222            })
2223        }
2224    }
2225}
2226#[doc = "Execute a graphql statement on a since resource or against the entire system. See the [Using GraphQL with FHIR](graphql.html) page for further details.\n\nFor the purposes of graphQL compatibility, this operation can also be invoked using a POST with the graphQL as the body, or a JSON body (see [graphQL spec](http://graphql.org/) for details)"]
2227pub mod ResourceGraphql {
2228    use super::*;
2229    pub const CODE: &str = "graphql";
2230    #[derive(Debug, FromParameters, ToParameters)]
2231    pub struct Input {
2232        #[doc = ""]
2233        pub query: FHIRString,
2234    }
2235    impl From<Input> for Resource {
2236        fn from(value: Input) -> Self {
2237            let parameters: Vec<ParametersParameter> = value.into();
2238            Resource::Parameters(Parameters {
2239                parameter: Some(parameters),
2240                ..Default::default()
2241            })
2242        }
2243    }
2244    #[derive(Debug, FromParameters, ToParameters)]
2245    pub struct Output {
2246        #[doc = "The content is always returned as application/json; this SHOULD be specified in the Accept header"]
2247        pub result: Binary,
2248    }
2249    impl From<Output> for Resource {
2250        fn from(value: Output) -> Self {
2251            let parameters: Vec<ParametersParameter> = value.into();
2252            Resource::Parameters(Parameters {
2253                parameter: Some(parameters),
2254                ..Default::default()
2255            })
2256        }
2257    }
2258}
2259#[doc = "This operation retrieves a summary of the profiles, tags, and security labels for the given scope; e.g. for each scope:  \n\n* system-wide: a list of all profiles, tags and security labels in use by the system \n* resource-type level: A list of all profiles, tags, and security labels for the resource type \n* individual resource level: A list of all profiles, tags, and security labels for the current version of the resource.  Also, as a special case, this operation (and other meta operations) can be performed on a historical version of a resource)"]
2260pub mod ResourceMeta {
2261    use super::*;
2262    pub const CODE: &str = "meta";
2263    #[derive(Debug, FromParameters, ToParameters)]
2264    pub struct Input {}
2265    impl From<Input> for Resource {
2266        fn from(value: Input) -> Self {
2267            let parameters: Vec<ParametersParameter> = value.into();
2268            Resource::Parameters(Parameters {
2269                parameter: Some(parameters),
2270                ..Default::default()
2271            })
2272        }
2273    }
2274    #[derive(Debug, FromParameters, ToParameters)]
2275    pub struct Output {
2276        #[doc = "The meta returned by the operation"]
2277        #[parameter_rename = "return"]
2278        pub return_: Meta,
2279    }
2280    impl From<Output> for Resource {
2281        fn from(value: Output) -> Self {
2282            let parameters: Vec<ParametersParameter> = value.into();
2283            Resource::Parameters(Parameters {
2284                parameter: Some(parameters),
2285                ..Default::default()
2286            })
2287        }
2288    }
2289}
2290#[doc = "This operation takes a meta, and adds the profiles, tags, and security labels found in it to the nominated resource"]
2291pub mod ResourceMetaAdd {
2292    use super::*;
2293    pub const CODE: &str = "meta-add";
2294    #[derive(Debug, FromParameters, ToParameters)]
2295    pub struct Input {
2296        #[doc = "Profiles, tags, and security labels to add to the existing resource. Note that profiles, tags, and security labels are sets, and duplicates are not created.  The identity of a tag or security label is the system+code. When matching existing tags during adding, version and display are ignored. For profiles, matching is based on the full URL"]
2297        pub meta: Meta,
2298    }
2299    impl From<Input> for Resource {
2300        fn from(value: Input) -> Self {
2301            let parameters: Vec<ParametersParameter> = value.into();
2302            Resource::Parameters(Parameters {
2303                parameter: Some(parameters),
2304                ..Default::default()
2305            })
2306        }
2307    }
2308    #[derive(Debug, FromParameters, ToParameters)]
2309    pub struct Output {
2310        #[doc = "Resulting meta for the resource"]
2311        #[parameter_rename = "return"]
2312        pub return_: Meta,
2313    }
2314    impl From<Output> for Resource {
2315        fn from(value: Output) -> Self {
2316            let parameters: Vec<ParametersParameter> = value.into();
2317            Resource::Parameters(Parameters {
2318                parameter: Some(parameters),
2319                ..Default::default()
2320            })
2321        }
2322    }
2323}
2324#[doc = "This operation takes a meta, and deletes the profiles, tags, and security labels found in it from the nominated resource"]
2325pub mod ResourceMetaDelete {
2326    use super::*;
2327    pub const CODE: &str = "meta-delete";
2328    #[derive(Debug, FromParameters, ToParameters)]
2329    pub struct Input {
2330        #[doc = "Profiles, tags, and security labels to delete from the existing resource. It is not an error if these tags, profiles, and labels do not exist.  The identity of a tag or security label is the system+code. When matching existing tags during deletion, version and display are ignored. For profiles, matching is based on the full URL"]
2331        pub meta: Meta,
2332    }
2333    impl From<Input> for Resource {
2334        fn from(value: Input) -> Self {
2335            let parameters: Vec<ParametersParameter> = value.into();
2336            Resource::Parameters(Parameters {
2337                parameter: Some(parameters),
2338                ..Default::default()
2339            })
2340        }
2341    }
2342    #[derive(Debug, FromParameters, ToParameters)]
2343    pub struct Output {
2344        #[doc = "Resulting meta for the resource"]
2345        #[parameter_rename = "return"]
2346        pub return_: Meta,
2347    }
2348    impl From<Output> for Resource {
2349        fn from(value: Output) -> Self {
2350            let parameters: Vec<ParametersParameter> = value.into();
2351            Resource::Parameters(Parameters {
2352                parameter: Some(parameters),
2353                ..Default::default()
2354            })
2355        }
2356    }
2357}
2358#[doc = "The validate operation checks whether the attached content would be acceptable either generally, as a create, an update or as a delete to an existing resource.  The action the server takes depends on the mode parameter:  \n\n* [mode not provided]: The server checks the content of the resource against any schema, constraint rules, and other general terminology rules \n* create: The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints) \n* update: The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change, and checking version integrity if appropriate) \n* delete: The server ignores the content, and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules)  \n\nModes update and delete can only be used when the operation is invoked at the resource instance level.   The return from this operation is an [OperationOutcome](operationoutcome.html)\n\nNote that this operation is not the only way to validate resources - see [Validating Resources](validation.html) for further information."]
2359pub mod ResourceValidate {
2360    use super::*;
2361    pub const CODE: &str = "validate";
2362    #[derive(Debug, FromParameters, ToParameters)]
2363    pub struct Input {
2364        #[doc = "Must be present unless the mode is \"delete\""]
2365        pub resource: Option<Resource>,
2366        #[doc = "Default is 'no action'; (e.g. general validation)"]
2367        pub mode: Option<FHIRCode>,
2368        #[doc = "If this is nominated, then the resource is validated against this specific profile. If a profile is nominated, and the server cannot validate against the nominated profile, it SHALL return an error"]
2369        pub profile: Option<FHIRUri>,
2370    }
2371    impl From<Input> for Resource {
2372        fn from(value: Input) -> Self {
2373            let parameters: Vec<ParametersParameter> = value.into();
2374            Resource::Parameters(Parameters {
2375                parameter: Some(parameters),
2376                ..Default::default()
2377            })
2378        }
2379    }
2380    #[derive(Debug, FromParameters)]
2381    pub struct Output {
2382        #[doc = "If the operation outcome does not list any errors, and a mode was specified, then this is an indication that the operation would be expected to succeed (excepting for transactional integrity issues, see below)"]
2383        #[parameter_rename = "return"]
2384        pub return_: OperationOutcome,
2385    }
2386    impl From<Output> for Resource {
2387        fn from(value: Output) -> Self {
2388            Resource::OperationOutcome(value.return_)
2389        }
2390    }
2391}
2392#[doc = "Generates a [Questionnaire](questionnaire.html) instance  based on a specified [StructureDefinition](structuredefinition.html), creating questions for each core element or extension element found in the [StructureDefinition](structuredefinition.html).    \n\nIf the operation is not called at the instance level, one of the *identifier*, *profile* or *url* 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored. The response will contain a [Questionnaire](questionnaire.html) instance based on the specified [StructureDefinition](structuredefinition.html) and/or an [OperationOutcome](operationoutcome.html) resource with errors or warnings.  Nested groups are used to handle complex structures and data types.  If the 'supportedOnly' parameter is set to true, only those elements marked as \"must support\" will be included.  \n\nThis operation is intended to enable auto-generation of simple interfaces for arbitrary profiles.  The 'questionnaire' approach to data entry has limitations that will make it less optimal than custom-defined interfaces.  However, this function may be useful for simple applications or for systems that wish to support \"non-core\" resources with minimal development effort."]
2393pub mod StructureDefinitionQuestionnaire {
2394    use super::*;
2395    pub const CODE: &str = "questionnaire";
2396    #[derive(Debug, FromParameters, ToParameters)]
2397    pub struct Input {
2398        #[doc = "A logical identifier (i.e. 'StructureDefinition.identifier''). The server must know the StructureDefinition or be able to retrieve it from other known repositories."]
2399        #[parameter_rename = "identifier"]
2400        pub identifier_: Option<FHIRCanonical>,
2401        #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2402        pub profile: Option<FHIRString>,
2403        #[doc = "The StructureDefinition's official URL (i.e. 'StructureDefinition.url'). The server must know the StructureDefinition or be able to retrieve it from other known repositories."]
2404        pub url: Option<FHIRCanonical>,
2405        #[doc = "If true, the questionnaire will only include those elements marked as \"mustSupport='true'\" in the StructureDefinition."]
2406        pub supportedOnly: Option<FHIRBoolean>,
2407    }
2408    impl From<Input> for Resource {
2409        fn from(value: Input) -> Self {
2410            let parameters: Vec<ParametersParameter> = value.into();
2411            Resource::Parameters(Parameters {
2412                parameter: Some(parameters),
2413                ..Default::default()
2414            })
2415        }
2416    }
2417    #[derive(Debug, FromParameters)]
2418    pub struct Output {
2419        #[doc = "The questionnaire form generated based on the StructureDefinition."]
2420        #[parameter_rename = "return"]
2421        pub return_: Questionnaire,
2422    }
2423    impl From<Output> for Resource {
2424        fn from(value: Output) -> Self {
2425            Resource::Questionnaire(value.return_)
2426        }
2427    }
2428}
2429#[doc = "Generates a [StructureDefinition](structuredefinition.html) instance  with  a snapshot, based on a differential in a specified [StructureDefinition](structuredefinition.html).   \n\nIf the operation is not called at the instance level, either *definition* or *url* 'in' parameters must be provided. If more than one is specified, servers may raise an error or may resolve with the parameter of their choice. If called at the instance level, these parameters will be ignored."]
2430pub mod StructureDefinitionSnapshot {
2431    use super::*;
2432    pub const CODE: &str = "snapshot";
2433    #[derive(Debug, FromParameters, ToParameters)]
2434    pub struct Input {
2435        #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2436        pub definition: Option<StructureDefinition>,
2437        #[doc = "The StructureDefinition's canonical URL (i.e. 'StructureDefinition.url'). The server must know the structure definition, or be able to retrieve it from other known repositories."]
2438        pub url: Option<FHIRString>,
2439    }
2440    impl From<Input> for Resource {
2441        fn from(value: Input) -> Self {
2442            let parameters: Vec<ParametersParameter> = value.into();
2443            Resource::Parameters(Parameters {
2444                parameter: Some(parameters),
2445                ..Default::default()
2446            })
2447        }
2448    }
2449    #[derive(Debug, FromParameters)]
2450    pub struct Output {
2451        #[doc = "The structure definition with a snapshot"]
2452        #[parameter_rename = "return"]
2453        pub return_: StructureDefinition,
2454    }
2455    impl From<Output> for Resource {
2456        fn from(value: Output) -> Self {
2457            Resource::StructureDefinition(value.return_)
2458        }
2459    }
2460}
2461#[doc = "The transform operation takes input content, applies a structure map transform, and then returns the output."]
2462pub mod StructureMapTransform {
2463    use super::*;
2464    pub const CODE: &str = "transform";
2465    #[derive(Debug, FromParameters, ToParameters)]
2466    pub struct Input {
2467        #[doc = "The structure map to apply. This is only needed if the operation is invoked at the resource level. If the $transform operation is invoked on a particular structure map, this will be ignored by the server"]
2468        pub source: Option<FHIRUri>,
2469        #[doc = "The logical content to transform"]
2470        pub content: Resource,
2471    }
2472    impl From<Input> for Resource {
2473        fn from(value: Input) -> Self {
2474            let parameters: Vec<ParametersParameter> = value.into();
2475            Resource::Parameters(Parameters {
2476                parameter: Some(parameters),
2477                ..Default::default()
2478            })
2479        }
2480    }
2481    #[derive(Debug, FromParameters, ToParameters)]
2482    pub struct Output {
2483        #[doc = "The result of the transform"]
2484        #[parameter_rename = "return"]
2485        pub return_: Resource,
2486    }
2487    impl From<Output> for Resource {
2488        fn from(value: Output) -> Self {
2489            let parameters: Vec<ParametersParameter> = value.into();
2490            Resource::Parameters(Parameters {
2491                parameter: Some(parameters),
2492                ..Default::default()
2493            })
2494        }
2495    }
2496}
2497#[doc = "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. \n\nIf the operation is not called at the instance level, one of the in parameters url, context or valueSet must be provided.  An expanded value set will be returned, or an OperationOutcome with an error message."]
2498pub mod ValueSetExpand {
2499    use super::*;
2500    pub const CODE: &str = "expand";
2501    #[derive(Debug, FromParameters, ToParameters)]
2502    pub struct Input {
2503        #[doc = "A canonical reference to a value set. The server must know the value set (e.g. it is defined explicitly in the server's value sets, or it is defined implicitly by some code system known to the server"]
2504        pub url: Option<FHIRUri>,
2505        #[doc = "The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion"]
2506        pub valueSet: Option<ValueSet>,
2507        #[doc = "The identifier that is used to identify a specific version of the value set to be used when generating the expansion. This is an arbitrary value managed by the value set 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."]
2508        pub valueSetVersion: Option<FHIRString>,
2509        #[doc = "The context of the value set, so that the server can resolve this to a value set to expand. The recommended format for this URI is [Structure Definition URL]#[name or path into structure definition] e.g. http://hl7.org/fhir/StructureDefinition/observation-hspc-height-hspcheight#Observation.interpretation. Other forms may be used but are not defined. This form is only usable if the terminology server also has access to the conformance registry that the server is using, but can be used to delegate the mapping from an application context to a binding at run-time"]
2510        pub context: Option<FHIRUri>,
2511        #[doc = "If a context is provided, a context direction may also be provided. Valid values are: \n\n* 'incoming': the codes a client can use for PUT/POST operations,  and \n* 'outgoing', the codes a client might receive from the server.\n\nThe purpose is to inform the server whether to use the value set associated with the context for reading or writing purposes (note: for most elements, this is the same value set, but there are a few elements where the reading and writing value sets are different)"]
2512        pub contextDirection: Option<FHIRCode>,
2513        #[doc = "A text filter that is applied to restrict the codes that are returned (this is useful in a UI context). The interpretation of this is delegated to the server in order to allow to determine the most optimal search approach for the context. The server can document the way this parameter works in [TerminologyCapabilities](terminologycapabilities.html)..expansion.textFilter. Typical usage of this parameter includes functionality like:\n\n* using left matching e.g. \"acut ast\"\n* allowing for wild cards such as %, &, ?\n* searching on definition as well as display(s)\n* allowing for search conditions (and / or / exclusions)\n\nText Search engines such as Lucene or Solr, long with their considerable functionality, might also be used. The optional text search might also be code system specific, and servers might have different implementations for different code systems"]
2514        pub filter: Option<FHIRString>,
2515        #[doc = "The date for which the expansion should be generated.  if a date is provided, it means that the server should use the value set / code system definitions as they were on the given date, or return an error if this is not possible.  Normally, the date is the current conditions (which is the default value) but under some circumstances, systems need to generate an expansion as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy."]
2516        pub date: Option<FHIRDateTime>,
2517        #[doc = "Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)"]
2518        pub offset: Option<FHIRInteger>,
2519        #[doc = "Paging support - how many codes should be provided in a partial page view. Paging only applies to flat expansions - servers ignore paging if the expansion is not flat.  If count = 0, the client is asking how large the expansion is. Servers SHOULD honor this request for hierarchical expansions as well, and simply return the overall count"]
2520        pub count: Option<FHIRInteger>,
2521        #[doc = "Controls whether concept designations are to be included or excluded in value set expansions"]
2522        pub includeDesignations: Option<FHIRBoolean>,
2523        #[doc = "A [token](search.html#token) that specifies a system+code that is either a use or a language. Designations that match by language or use are included in the expansion. If no designation is specified, it is at the server discretion which designations to return"]
2524        pub designation: Option<Vec<FHIRString>>,
2525        #[doc = "Controls whether the value set definition is included or excluded in value set expansions"]
2526        pub includeDefinition: Option<FHIRBoolean>,
2527        #[doc = "Controls whether inactive concepts are included or excluded in value set expansions. Note that if the value set explicitly specifies that inactive codes are included, this parameter can still remove them from a specific expansion, but this parameter cannot include them if the value set excludes them"]
2528        pub activeOnly: Option<FHIRBoolean>,
2529        #[doc = "Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains)"]
2530        pub excludeNested: Option<FHIRBoolean>,
2531        #[doc = "Controls whether or not the value set expansion is assembled for a user interface use or not. Value sets intended for User Interface might include ['abstract' codes](codesystem.html#status) or have nested contains with items with no code or abstract = true, with the sole purpose of helping a user navigate through the list efficiently, where as a value set not generated for UI use might be flat, and only contain the selectable codes in the value set. The exact implications of 'for UI' depend on the code system, and what properties it exposes for a terminology server to use. In the FHIR Specification itself, the value set expansions are generated with excludeNotForUI = false, and the expansions used when generated schema / code etc, or performing validation, are all excludeNotForUI = true."]
2532        pub excludeNotForUI: Option<FHIRBoolean>,
2533        #[doc = "Controls whether or not the value set expansion includes post coordinated codes"]
2534        pub excludePostCoordinated: Option<FHIRBoolean>,
2535        #[doc = "Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display"]
2536        pub displayLanguage: Option<FHIRCode>,
2537        #[doc = "Code system, or a particular version of a code system to be excluded from the value set expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56"]
2538        #[parameter_rename = "exclude-system"]
2539        pub exclude_system: Option<Vec<FHIRCanonical>>,
2540        #[doc = "Specifies a version to use for a system, if the value set does not specify which one to use. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56"]
2541        #[parameter_rename = "system-version"]
2542        pub system_version: Option<Vec<FHIRCanonical>>,
2543        #[doc = "Edge Case: Specifies a version to use for a system. If a value set specifies a different version, an error is returned instead of the expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56"]
2544        #[parameter_rename = "check-system-version"]
2545        pub check_system_version: Option<Vec<FHIRCanonical>>,
2546        #[doc = "Edge Case: Specifies a version to use for a system. This parameter overrides any specified version in the value set (and any it depends on). The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If the value is override, the version used SHALL explicitly be represented in the expansion parameters"]
2547        #[parameter_rename = "force-system-version"]
2548        pub force_system_version: Option<Vec<FHIRCanonical>>,
2549    }
2550    impl From<Input> for Resource {
2551        fn from(value: Input) -> Self {
2552            let parameters: Vec<ParametersParameter> = value.into();
2553            Resource::Parameters(Parameters {
2554                parameter: Some(parameters),
2555                ..Default::default()
2556            })
2557        }
2558    }
2559    #[derive(Debug, FromParameters)]
2560    pub struct Output {
2561        #[doc = "The result of the expansion. Servers generating expansions SHOULD ensure that all the parameters that affect the contents of the expansion are recorded in the ValueSet.expansion.parameter list"]
2562        #[parameter_rename = "return"]
2563        pub return_: ValueSet,
2564    }
2565    impl From<Output> for Resource {
2566        fn from(value: Output) -> Self {
2567            Resource::ValueSet(value.return_)
2568        }
2569    }
2570}
2571#[doc = "Validate that a coded value is in the set of codes allowed by a value set.\n\nIf the operation is not called at the instance level, one of the in parameters url, context or  valueSet must be provided.  One (and only one) of the in parameters code, coding, or codeableConcept must be provided.  The operation returns a result (true / false), an error message, and the recommended display for the code"]
2572pub mod ValueSetValidateCode {
2573    use super::*;
2574    pub const CODE: &str = "validate-code";
2575    #[derive(Debug, FromParameters, ToParameters)]
2576    pub struct Input {
2577        #[doc = "Value set Canonical URL. The server must know the value set (e.g. it is defined explicitly in the server's value sets, or it is defined implicitly by some code system known to the server"]
2578        pub url: Option<FHIRUri>,
2579        #[doc = "The context of the value set, so that the server can resolve this to a value set to validate against. The recommended format for this URI is [Structure Definition URL]#[name or path into structure definition] e.g. http://hl7.org/fhir/StructureDefinition/observation-hspc-height-hspcheight#Observation.interpretation. Other forms may be used but are not defined. This form is only usable if the terminology server also has access to the conformance registry that the server is using, but can be used to delegate the mapping from an application context to a binding at run-time"]
2580        pub context: Option<FHIRUri>,
2581        #[doc = "The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion. This parameter is used when the client wants the server to expand a value set that is not stored on the server"]
2582        pub valueSet: Option<ValueSet>,
2583        #[doc = "The identifier that is used to identify a specific version of the value set to be used when validating the code. This is an arbitrary value managed by the value set 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."]
2584        pub valueSetVersion: Option<FHIRString>,
2585        #[doc = "The code that is to be validated. If a code is provided, a system or a context must be provided (if a context is provided, then the server SHALL ensure that the code is not ambiguous without a system)"]
2586        pub code: Option<FHIRCode>,
2587        #[doc = "The system for the code that is to be validated"]
2588        pub system: Option<FHIRUri>,
2589        #[doc = "The version of the system, if one was provided in the source data"]
2590        pub systemVersion: Option<FHIRString>,
2591        #[doc = "The display associated with the code, if provided. If a display is provided a code must be provided. If no display is provided, the server cannot validate the display value, but may choose to return a recommended display name using the display parameter in the outcome. Whether displays are case sensitive is code system dependent"]
2592        pub display: Option<FHIRString>,
2593        #[doc = "A coding to validate"]
2594        pub coding: Option<Coding>,
2595        #[doc = "A full codeableConcept to validate. The server returns true if one of the coding values is in the value set, and may also validate that the codings are not in conflict with each other if more than one is present"]
2596        pub codeableConcept: Option<CodeableConcept>,
2597        #[doc = "The date for which the validation should be checked. Normally, this is the current conditions (which is the default values) but under some circumstances, systems need to validate that a correct code was used at some point in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy."]
2598        pub date: Option<FHIRDateTime>,
2599        #[doc = "If this parameter has a value of true, the client is stating that the validation is being performed in a context where a concept designated as 'abstract' is appropriate/allowed to be used, and the server should regard abstract codes as valid. If this parameter is false, abstract codes are not considered to be valid.\n\nNote that. 'abstract' is a property defined by many HL7 code systems that indicates that the concept is a logical grouping concept that is not intended to be used asa 'concrete' concept to in an actual patient/care/process record. This language is borrowed from Object Orienated theory where 'asbtract' objects are never instantiated. However in the general record and terminology eco-system, there are many contexts where it is appropraite to use these codes e.g. as decision making criterion, or when editing value sets themselves. This parameter allows a client to indicate to the server that it is working in such a context."]
2600        #[parameter_rename = "abstract"]
2601        pub abstract_: Option<FHIRBoolean>,
2602        #[doc = "Specifies the language to be used for description when validating the display property"]
2603        pub displayLanguage: Option<FHIRCode>,
2604    }
2605    impl From<Input> for Resource {
2606        fn from(value: Input) -> Self {
2607            let parameters: Vec<ParametersParameter> = value.into();
2608            Resource::Parameters(Parameters {
2609                parameter: Some(parameters),
2610                ..Default::default()
2611            })
2612        }
2613    }
2614    #[derive(Debug, FromParameters, ToParameters)]
2615    pub struct Output {
2616        #[doc = "True if the concept details supplied are valid"]
2617        pub result: FHIRBoolean,
2618        #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
2619        pub message: Option<FHIRString>,
2620        #[doc = "A valid display for the concept if the system wishes to display this to a user"]
2621        pub display: Option<FHIRString>,
2622    }
2623    impl From<Output> for Resource {
2624        fn from(value: Output) -> Self {
2625            let parameters: Vec<ParametersParameter> = value.into();
2626            Resource::Parameters(Parameters {
2627                parameter: Some(parameters),
2628                ..Default::default()
2629            })
2630        }
2631    }
2632}
2633#[doc = "Execute a view definition against supplied or server data."]
2634pub mod ViewDefinitionRun {
2635    use super::*;
2636    pub const CODE: &str = "viewdefinition-run";
2637    #[derive(Debug, FromParameters, ToParameters)]
2638    pub struct Input {
2639        #[doc = "Output format for the result (for example json, ndjson, csv, parquet). Optional; if omitted, the server returns ndjson by default."]
2640        pub _format: Option<FHIRCode>,
2641        #[doc = "Include CSV headers (default true). Applies only when csv output is requested."]
2642        pub header: Option<FHIRBoolean>,
2643        #[doc = "Reference to a ViewDefinition stored on the server."]
2644        pub viewReference: Option<Reference>,
2645        #[doc = "Inline ViewDefinition resource to execute."]
2646        pub viewResource: Option<ViewDefinition>,
2647        #[doc = "Restrict execution to the specified patient."]
2648        pub patient: Option<Reference>,
2649        #[doc = "Restrict execution to members of the given group(s)."]
2650        pub group: Option<Vec<Reference>>,
2651        #[doc = "External data source to use (for example a URI or bucket name)."]
2652        pub source: Option<FHIRString>,
2653        #[doc = "FHIR resources to transform instead of using server data."]
2654        pub resource: Option<Vec<Resource>>,
2655        #[doc = "Maximum number of rows to return."]
2656        pub _limit: Option<FHIRInteger>,
2657        #[doc = "Include only resources modified after this instant."]
2658        pub _since: Option<FHIRInstant>,
2659    }
2660    impl From<Input> for Resource {
2661        fn from(value: Input) -> Self {
2662            let parameters: Vec<ParametersParameter> = value.into();
2663            Resource::Parameters(Parameters {
2664                parameter: Some(parameters),
2665                ..Default::default()
2666            })
2667        }
2668    }
2669    #[derive(Debug, FromParameters)]
2670    pub struct Output {
2671        #[doc = "Transformed data encoded in the requested output format."]
2672        #[parameter_rename = "return"]
2673        pub return_: Binary,
2674    }
2675    impl From<Output> for Resource {
2676        fn from(value: Output) -> Self {
2677            Resource::Binary(value.return_)
2678        }
2679    }
2680}