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 = "Delete refresh token from the user for the client."]
372pub mod HasteHealthDeleteRefreshToken {
373    use super::*;
374    pub const CODE: &str = "delete-refresh-token";
375    #[derive(Debug, FromParameters, ToParameters)]
376    pub struct Input {
377        #[doc = "Client id for refresh token to delete."]
378        pub client_id: FHIRId,
379        #[doc = "User agent of the refresh token to delete."]
380        pub user_agent: Option<FHIRString>,
381    }
382    impl From<Input> for Resource {
383        fn from(value: Input) -> Self {
384            let parameters: Vec<ParametersParameter> = value.into();
385            Resource::Parameters(Parameters {
386                parameter: Some(parameters),
387                ..Default::default()
388            })
389        }
390    }
391    #[derive(Debug, FromParameters)]
392    pub struct Output {
393        #[doc = "Result of the delete operation."]
394        #[parameter_rename = "return"]
395        pub return_: OperationOutcome,
396    }
397    impl From<Output> for Resource {
398        fn from(value: Output) -> Self {
399            Resource::OperationOutcome(value.return_)
400        }
401    }
402}
403#[doc = "Show list of users refresh tokens."]
404pub mod HasteHealthListRefreshTokens {
405    use super::*;
406    pub const CODE: &str = "refresh-tokens";
407    #[derive(Debug, FromParameters, ToParameters)]
408    pub struct Input {}
409    impl From<Input> for Resource {
410        fn from(value: Input) -> Self {
411            let parameters: Vec<ParametersParameter> = value.into();
412            Resource::Parameters(Parameters {
413                parameter: Some(parameters),
414                ..Default::default()
415            })
416        }
417    }
418    #[derive(Debug, FromParameters, ToParameters)]
419    pub struct OutputRefreshTokens {
420        #[doc = "Client for refresh token."]
421        pub client_id: FHIRId,
422        #[doc = "User agent of the refresh token."]
423        pub user_agent: FHIRString,
424        #[doc = "When the refresh token was created."]
425        pub created_at: FHIRDateTime,
426    }
427    impl From<OutputRefreshTokens> for Resource {
428        fn from(value: OutputRefreshTokens) -> Self {
429            let parameters: Vec<ParametersParameter> = value.into();
430            Resource::Parameters(Parameters {
431                parameter: Some(parameters),
432                ..Default::default()
433            })
434        }
435    }
436    #[derive(Debug, FromParameters, ToParameters)]
437    pub struct Output {
438        #[doc = "The result of the operation."]
439        #[parameter_rename = "refresh-tokens"]
440        #[parameter_nested]
441        pub refresh_tokens: Option<Vec<OutputRefreshTokens>>,
442    }
443    impl From<Output> for Resource {
444        fn from(value: Output) -> Self {
445            let parameters: Vec<ParametersParameter> = value.into();
446            Resource::Parameters(Parameters {
447                parameter: Some(parameters),
448                ..Default::default()
449            })
450        }
451    }
452}
453#[doc = "Delete scope from user accepted scopes for the client."]
454pub mod HasteHealthDeleteScope {
455    use super::*;
456    pub const CODE: &str = "delete-scope";
457    #[derive(Debug, FromParameters, ToParameters)]
458    pub struct Input {
459        #[doc = "Client for which scopes are being shown."]
460        pub client_id: FHIRId,
461    }
462    impl From<Input> for Resource {
463        fn from(value: Input) -> Self {
464            let parameters: Vec<ParametersParameter> = value.into();
465            Resource::Parameters(Parameters {
466                parameter: Some(parameters),
467                ..Default::default()
468            })
469        }
470    }
471    #[derive(Debug, FromParameters)]
472    pub struct Output {
473        #[doc = "Result of the delete operation."]
474        #[parameter_rename = "return"]
475        pub return_: OperationOutcome,
476    }
477    impl From<Output> for Resource {
478        fn from(value: Output) -> Self {
479            Resource::OperationOutcome(value.return_)
480        }
481    }
482}
483#[doc = "Show list of user accepted scopes for apps."]
484pub mod HasteHealthListScopes {
485    use super::*;
486    pub const CODE: &str = "scopes";
487    #[derive(Debug, FromParameters, ToParameters)]
488    pub struct Input {}
489    impl From<Input> for Resource {
490        fn from(value: Input) -> Self {
491            let parameters: Vec<ParametersParameter> = value.into();
492            Resource::Parameters(Parameters {
493                parameter: Some(parameters),
494                ..Default::default()
495            })
496        }
497    }
498    #[derive(Debug, FromParameters, ToParameters)]
499    pub struct OutputScopes {
500        #[doc = "Client for which scopes are being shown."]
501        pub client_id: FHIRId,
502        #[doc = "Scopes user accepted."]
503        pub scopes: FHIRString,
504        #[doc = "When the scopes were accepted."]
505        pub created_at: FHIRDateTime,
506    }
507    impl From<OutputScopes> for Resource {
508        fn from(value: OutputScopes) -> Self {
509            let parameters: Vec<ParametersParameter> = value.into();
510            Resource::Parameters(Parameters {
511                parameter: Some(parameters),
512                ..Default::default()
513            })
514        }
515    }
516    #[derive(Debug, FromParameters, ToParameters)]
517    pub struct Output {
518        #[doc = "The result of the operation."]
519        #[parameter_nested]
520        pub scopes: Option<Vec<OutputScopes>>,
521    }
522    impl From<Output> for Resource {
523        fn from(value: Output) -> Self {
524            let parameters: Vec<ParametersParameter> = value.into();
525            Resource::Parameters(Parameters {
526                parameter: Some(parameters),
527                ..Default::default()
528            })
529        }
530    }
531}
532#[doc = "The apply operation applies a definition in a specific context"]
533pub mod ActivityDefinitionApply {
534    use super::*;
535    pub const CODE: &str = "apply";
536    #[derive(Debug, FromParameters, ToParameters)]
537    pub struct Input {
538        #[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"]
539        pub activityDefinition: Option<ActivityDefinition>,
540        #[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"]
541        pub subject: Vec<FHIRString>,
542        #[doc = "The encounter in context, if any"]
543        pub encounter: Option<FHIRString>,
544        #[doc = "The practitioner in context"]
545        pub practitioner: Option<FHIRString>,
546        #[doc = "The organization in context"]
547        pub organization: Option<FHIRString>,
548        #[doc = "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)"]
549        pub userType: Option<CodeableConcept>,
550        #[doc = "Preferred language of the person using the system"]
551        pub userLanguage: Option<CodeableConcept>,
552        #[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"]
553        pub userTaskContext: Option<CodeableConcept>,
554        #[doc = "The current setting of the request (inpatient, outpatient, etc.)"]
555        pub setting: Option<CodeableConcept>,
556        #[doc = "Additional detail about the setting of the request, if any"]
557        pub settingContext: Option<CodeableConcept>,
558    }
559    impl From<Input> for Resource {
560        fn from(value: Input) -> Self {
561            let parameters: Vec<ParametersParameter> = value.into();
562            Resource::Parameters(Parameters {
563                parameter: Some(parameters),
564                ..Default::default()
565            })
566        }
567    }
568    #[derive(Debug, FromParameters)]
569    pub struct Output {
570        #[doc = "The resource that is the result of applying the definition"]
571        #[parameter_rename = "return"]
572        pub return_: Resource,
573    }
574    impl From<Output> for Resource {
575        fn from(value: Output) -> Self {
576            value.return_
577        }
578    }
579}
580#[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"]
581pub mod ActivityDefinitionDataRequirements {
582    use super::*;
583    pub const CODE: &str = "data-requirements";
584    #[derive(Debug, FromParameters, ToParameters)]
585    pub struct Input {}
586    impl From<Input> for Resource {
587        fn from(value: Input) -> Self {
588            let parameters: Vec<ParametersParameter> = value.into();
589            Resource::Parameters(Parameters {
590                parameter: Some(parameters),
591                ..Default::default()
592            })
593        }
594    }
595    #[derive(Debug, FromParameters)]
596    pub struct Output {
597        #[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"]
598        #[parameter_rename = "return"]
599        pub return_: Library,
600    }
601    impl From<Output> for Resource {
602        fn from(value: Output) -> Self {
603            Resource::Library(value.return_)
604        }
605    }
606}
607#[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"]
608pub mod CapabilityStatementConforms {
609    use super::*;
610    pub const CODE: &str = "conforms";
611    #[derive(Debug, FromParameters, ToParameters)]
612    pub struct Input {
613        #[doc = "A canonical reference to the left-hand system's capability statement"]
614        pub left: Option<FHIRCanonical>,
615        #[doc = "A canonical reference to the right-hand system's capability statement"]
616        pub right: Option<FHIRCanonical>,
617        #[doc = "What kind of comparison to perform - server to server, or client to server (use the codes 'server/server' or 'client/server')"]
618        pub mode: Option<FHIRCode>,
619    }
620    impl From<Input> for Resource {
621        fn from(value: Input) -> Self {
622            let parameters: Vec<ParametersParameter> = value.into();
623            Resource::Parameters(Parameters {
624                parameter: Some(parameters),
625                ..Default::default()
626            })
627        }
628    }
629    #[derive(Debug, FromParameters, ToParameters)]
630    pub struct Output {
631        #[doc = "Outcome of the CapabilityStatement test"]
632        pub issues: OperationOutcome,
633        #[doc = "The intersection of the functionality described by the CapabilityStatement resources"]
634        #[parameter_rename = "union"]
635        pub union_: Option<CapabilityStatement>,
636        #[doc = "The union of the functionality described by the CapabilityStatement resources"]
637        pub intersection: Option<CapabilityStatement>,
638    }
639    impl From<Output> for Resource {
640        fn from(value: Output) -> Self {
641            let parameters: Vec<ParametersParameter> = value.into();
642            Resource::Parameters(Parameters {
643                parameter: Some(parameters),
644                ..Default::default()
645            })
646        }
647    }
648}
649#[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"]
650pub mod CapabilityStatementImplements {
651    use super::*;
652    pub const CODE: &str = "implements";
653    #[derive(Debug, FromParameters, ToParameters)]
654    pub struct Input {
655        #[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)"]
656        pub server: Option<FHIRCanonical>,
657        #[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)"]
658        pub client: Option<FHIRCanonical>,
659        #[doc = "The client capability statement, provided inline"]
660        pub resource: Option<CapabilityStatement>,
661    }
662    impl From<Input> for Resource {
663        fn from(value: Input) -> Self {
664            let parameters: Vec<ParametersParameter> = value.into();
665            Resource::Parameters(Parameters {
666                parameter: Some(parameters),
667                ..Default::default()
668            })
669        }
670    }
671    #[derive(Debug, FromParameters)]
672    pub struct Output {
673        #[doc = "Outcome of the CapabilityStatement test"]
674        #[parameter_rename = "return"]
675        pub return_: OperationOutcome,
676    }
677    impl From<Output> for Resource {
678        fn from(value: Output) -> Self {
679            Resource::OperationOutcome(value.return_)
680        }
681    }
682}
683#[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"]
684pub mod CapabilityStatementSubset {
685    use super::*;
686    pub const CODE: &str = "subset";
687    #[derive(Debug, FromParameters, ToParameters)]
688    pub struct Input {
689        #[doc = "The canonical URL - use this if the subset is not invoked on an instance (or on the /metadata end-point)"]
690        pub server: Option<FHIRUri>,
691        #[doc = "A resource that the client would like to include in the return"]
692        pub resource: Vec<FHIRCode>,
693    }
694    impl From<Input> for Resource {
695        fn from(value: Input) -> Self {
696            let parameters: Vec<ParametersParameter> = value.into();
697            Resource::Parameters(Parameters {
698                parameter: Some(parameters),
699                ..Default::default()
700            })
701        }
702    }
703    #[derive(Debug, FromParameters)]
704    pub struct Output {
705        #[doc = "The subsetted CapabilityStatement resource that is returned. This should be tagged with the SUBSETTED code"]
706        #[parameter_rename = "return"]
707        pub return_: CapabilityStatement,
708    }
709    impl From<Output> for Resource {
710        fn from(value: Output) -> Self {
711            Resource::CapabilityStatement(value.return_)
712        }
713    }
714}
715#[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"]
716pub mod CapabilityStatementVersions {
717    use super::*;
718    pub const CODE: &str = "versions";
719    #[derive(Debug, FromParameters, ToParameters)]
720    pub struct Input {}
721    impl From<Input> for Resource {
722        fn from(value: Input) -> Self {
723            let parameters: Vec<ParametersParameter> = value.into();
724            Resource::Parameters(Parameters {
725                parameter: Some(parameters),
726                ..Default::default()
727            })
728        }
729    }
730    #[derive(Debug, FromParameters, ToParameters)]
731    pub struct Output {
732        #[doc = "A version supported by the server. Use the major.minor version like 3.0"]
733        pub version: Vec<FHIRCode>,
734        #[doc = "The default version for the server. Use the major.minor version like 3.0"]
735        pub default: FHIRCode,
736    }
737    impl From<Output> for Resource {
738        fn from(value: Output) -> Self {
739            let parameters: Vec<ParametersParameter> = value.into();
740            Resource::Parameters(Parameters {
741                parameter: Some(parameters),
742                ..Default::default()
743            })
744        }
745    }
746}
747#[doc = "The apply operation applies a definition in a specific context"]
748pub mod ChargeItemDefinitionApply {
749    use super::*;
750    pub const CODE: &str = "apply";
751    #[derive(Debug, FromParameters, ToParameters)]
752    pub struct Input {
753        #[doc = "The ChargeItem on which the definition is to ba applies"]
754        pub chargeItem: Reference,
755        #[doc = "The account in context, if any"]
756        pub account: Option<Reference>,
757    }
758    impl From<Input> for Resource {
759        fn from(value: Input) -> Self {
760            let parameters: Vec<ParametersParameter> = value.into();
761            Resource::Parameters(Parameters {
762                parameter: Some(parameters),
763                ..Default::default()
764            })
765        }
766    }
767    #[derive(Debug, FromParameters)]
768    pub struct Output {
769        #[doc = "The resource that is the result of applying the definition"]
770        #[parameter_rename = "return"]
771        pub return_: Resource,
772    }
773    impl From<Output> for Resource {
774        fn from(value: Output) -> Self {
775            value.return_
776        }
777    }
778}
779#[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."]
780pub mod ClaimSubmit {
781    use super::*;
782    pub const CODE: &str = "submit";
783    #[derive(Debug, FromParameters, ToParameters)]
784    pub struct Input {
785        #[doc = "A Claim resource or Bundle of claims, either as individual Claim resources or as Bundles each containing a single Claim plus referenced resources."]
786        pub resource: Resource,
787    }
788    impl From<Input> for Resource {
789        fn from(value: Input) -> Self {
790            let parameters: Vec<ParametersParameter> = value.into();
791            Resource::Parameters(Parameters {
792                parameter: Some(parameters),
793                ..Default::default()
794            })
795        }
796    }
797    #[derive(Debug, FromParameters, ToParameters)]
798    pub struct Output {
799        #[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."]
800        #[parameter_rename = "return"]
801        pub return_: Resource,
802    }
803    impl From<Output> for Resource {
804        fn from(value: Output) -> Self {
805            let parameters: Vec<ParametersParameter> = value.into();
806            Resource::Parameters(Parameters {
807                parameter: Some(parameters),
808                ..Default::default()
809            })
810        }
811    }
812}
813#[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."]
814pub mod CodeSystemFindMatches {
815    use super::*;
816    pub const CODE: &str = "find-matches";
817    #[derive(Debug, FromParameters, ToParameters)]
818    pub struct InputPropertySubproperty {
819        #[doc = "Identifies the sub-property provided"]
820        pub code: FHIRCode,
821        #[doc = "The value of the sub-property provided"]
822        pub value: ParametersParameterValueTypeChoice,
823    }
824    impl From<InputPropertySubproperty> for Resource {
825        fn from(value: InputPropertySubproperty) -> 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, ToParameters)]
834    pub struct InputProperty {
835        #[doc = "Identifies the property provided"]
836        pub code: FHIRCode,
837        #[doc = "The value of the property provided"]
838        pub value: Option<ParametersParameterValueTypeChoice>,
839        #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
840        #[parameter_nested]
841        pub subproperty: Option<Vec<InputPropertySubproperty>>,
842    }
843    impl From<InputProperty> for Resource {
844        fn from(value: InputProperty) -> Self {
845            let parameters: Vec<ParametersParameter> = value.into();
846            Resource::Parameters(Parameters {
847                parameter: Some(parameters),
848                ..Default::default()
849            })
850        }
851    }
852    #[derive(Debug, FromParameters, ToParameters)]
853    pub struct Input {
854        #[doc = "The system in which composition is to be performed. This must be provided unless the operation is invoked on a code system instance"]
855        pub system: Option<FHIRUri>,
856        #[doc = "The version of the system for the inferencing to be performed"]
857        pub version: Option<FHIRString>,
858        #[doc = "One or more properties that contain information to be composed into the code"]
859        #[parameter_nested]
860        pub property: Option<Vec<InputProperty>>,
861        #[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'"]
862        pub exact: FHIRBoolean,
863        #[doc = "Post-coordinated expressions are allowed to be returned in the matching codes (mainly for SNOMED CT). Default = false"]
864        pub compositional: Option<FHIRBoolean>,
865    }
866    impl From<Input> for Resource {
867        fn from(value: Input) -> Self {
868            let parameters: Vec<ParametersParameter> = value.into();
869            Resource::Parameters(Parameters {
870                parameter: Some(parameters),
871                ..Default::default()
872            })
873        }
874    }
875    #[derive(Debug, FromParameters, ToParameters)]
876    pub struct OutputMatchUnmatchedProperty {
877        #[doc = "Identifies the sub-property provided"]
878        pub code: FHIRCode,
879        #[doc = "The value of the sub-property provided"]
880        pub value: ParametersParameterValueTypeChoice,
881    }
882    impl From<OutputMatchUnmatchedProperty> for Resource {
883        fn from(value: OutputMatchUnmatchedProperty) -> Self {
884            let parameters: Vec<ParametersParameter> = value.into();
885            Resource::Parameters(Parameters {
886                parameter: Some(parameters),
887                ..Default::default()
888            })
889        }
890    }
891    #[derive(Debug, FromParameters, ToParameters)]
892    pub struct OutputMatchUnmatched {
893        #[doc = "Identifies the property provided"]
894        pub code: FHIRCode,
895        #[doc = "The value of the property provided"]
896        pub value: ParametersParameterValueTypeChoice,
897        #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
898        #[parameter_nested]
899        pub property: Option<Vec<OutputMatchUnmatchedProperty>>,
900    }
901    impl From<OutputMatchUnmatched> for Resource {
902        fn from(value: OutputMatchUnmatched) -> Self {
903            let parameters: Vec<ParametersParameter> = value.into();
904            Resource::Parameters(Parameters {
905                parameter: Some(parameters),
906                ..Default::default()
907            })
908        }
909    }
910    #[derive(Debug, FromParameters, ToParameters)]
911    pub struct OutputMatch {
912        #[doc = "A code that matches the properties provided"]
913        pub code: Coding,
914        #[doc = "One or more properties that contain properties that could not be matched into the code"]
915        #[parameter_nested]
916        pub unmatched: Option<Vec<OutputMatchUnmatched>>,
917        #[doc = "Information about the quality of the match, if operation is for a human"]
918        pub comment: Option<FHIRString>,
919    }
920    impl From<OutputMatch> for Resource {
921        fn from(value: OutputMatch) -> Self {
922            let parameters: Vec<ParametersParameter> = value.into();
923            Resource::Parameters(Parameters {
924                parameter: Some(parameters),
925                ..Default::default()
926            })
927        }
928    }
929    #[derive(Debug, FromParameters, ToParameters)]
930    pub struct Output {
931        #[doc = "Concepts returned by the server as a result of the inferencing operation"]
932        #[parameter_rename = "match"]
933        #[parameter_nested]
934        pub match_: Option<Vec<OutputMatch>>,
935    }
936    impl From<Output> for Resource {
937        fn from(value: Output) -> Self {
938            let parameters: Vec<ParametersParameter> = value.into();
939            Resource::Parameters(Parameters {
940                parameter: Some(parameters),
941                ..Default::default()
942            })
943        }
944    }
945}
946#[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"]
947pub mod CodeSystemLookup {
948    use super::*;
949    pub const CODE: &str = "lookup";
950    #[derive(Debug, FromParameters, ToParameters)]
951    pub struct Input {
952        #[doc = "The code that is to be located. If a code is provided, a system must be provided"]
953        pub code: Option<FHIRCode>,
954        #[doc = "The system for the code that is to be located"]
955        pub system: Option<FHIRUri>,
956        #[doc = "The version of the system, if one was provided in the source data"]
957        pub version: Option<FHIRString>,
958        #[doc = "A coding to look up"]
959        pub coding: Option<Coding>,
960        #[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."]
961        pub date: Option<FHIRDateTime>,
962        #[doc = "The requested language for display (see $expand.displayLanguage)"]
963        pub displayLanguage: Option<FHIRCode>,
964        #[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"]
965        pub property: Option<Vec<FHIRCode>>,
966    }
967    impl From<Input> for Resource {
968        fn from(value: Input) -> Self {
969            let parameters: Vec<ParametersParameter> = value.into();
970            Resource::Parameters(Parameters {
971                parameter: Some(parameters),
972                ..Default::default()
973            })
974        }
975    }
976    #[derive(Debug, FromParameters, ToParameters)]
977    pub struct OutputDesignation {
978        #[doc = "The language this designation is defined for"]
979        pub language: Option<FHIRCode>,
980        #[doc = "A code that details how this designation would be used"]
981        #[parameter_rename = "use"]
982        pub use_: Option<Coding>,
983        #[doc = "The text value for this designation"]
984        pub value: FHIRString,
985    }
986    impl From<OutputDesignation> for Resource {
987        fn from(value: OutputDesignation) -> Self {
988            let parameters: Vec<ParametersParameter> = value.into();
989            Resource::Parameters(Parameters {
990                parameter: Some(parameters),
991                ..Default::default()
992            })
993        }
994    }
995    #[derive(Debug, FromParameters, ToParameters)]
996    pub struct OutputPropertySubproperty {
997        #[doc = "Identifies the sub-property returned"]
998        pub code: FHIRCode,
999        #[doc = "The value of the sub-property returned"]
1000        pub value: ParametersParameterValueTypeChoice,
1001        #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1002        pub description: Option<FHIRString>,
1003    }
1004    impl From<OutputPropertySubproperty> for Resource {
1005        fn from(value: OutputPropertySubproperty) -> Self {
1006            let parameters: Vec<ParametersParameter> = value.into();
1007            Resource::Parameters(Parameters {
1008                parameter: Some(parameters),
1009                ..Default::default()
1010            })
1011        }
1012    }
1013    #[derive(Debug, FromParameters, ToParameters)]
1014    pub struct OutputProperty {
1015        #[doc = "Identifies the property returned"]
1016        pub code: FHIRCode,
1017        #[doc = "The value of the property returned"]
1018        pub value: Option<ParametersParameterValueTypeChoice>,
1019        #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1020        pub description: Option<FHIRString>,
1021        #[doc = "Nested Properties (mainly used for SNOMED CT decomposition, for relationship Groups)"]
1022        #[parameter_nested]
1023        pub subproperty: Option<Vec<OutputPropertySubproperty>>,
1024    }
1025    impl From<OutputProperty> for Resource {
1026        fn from(value: OutputProperty) -> Self {
1027            let parameters: Vec<ParametersParameter> = value.into();
1028            Resource::Parameters(Parameters {
1029                parameter: Some(parameters),
1030                ..Default::default()
1031            })
1032        }
1033    }
1034    #[derive(Debug, FromParameters, ToParameters)]
1035    pub struct Output {
1036        #[doc = "A display name for the code system"]
1037        pub name: FHIRString,
1038        #[doc = "The version that these details are based on"]
1039        pub version: Option<FHIRString>,
1040        #[doc = "The preferred display for this concept"]
1041        pub display: FHIRString,
1042        #[doc = "Additional representations for this concept"]
1043        #[parameter_nested]
1044        pub designation: Option<Vec<OutputDesignation>>,
1045        #[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"]
1046        #[parameter_nested]
1047        pub property: Option<Vec<OutputProperty>>,
1048    }
1049    impl From<Output> for Resource {
1050        fn from(value: Output) -> Self {
1051            let parameters: Vec<ParametersParameter> = value.into();
1052            Resource::Parameters(Parameters {
1053                parameter: Some(parameters),
1054                ..Default::default()
1055            })
1056        }
1057    }
1058}
1059#[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"]
1060pub mod CodeSystemSubsumes {
1061    use super::*;
1062    pub const CODE: &str = "subsumes";
1063    #[derive(Debug, FromParameters, ToParameters)]
1064    pub struct Input {
1065        #[doc = "The \"A\" code that is to be tested. If a code is provided, a system must be provided"]
1066        pub codeA: Option<FHIRCode>,
1067        #[doc = "The \"B\" code that is to be tested. If a code is provided, a system must be provided"]
1068        pub codeB: Option<FHIRCode>,
1069        #[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"]
1070        pub system: Option<FHIRUri>,
1071        #[doc = "The version of the code system, if one was provided in the source data"]
1072        pub version: Option<FHIRString>,
1073        #[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"]
1074        pub codingA: Option<Coding>,
1075        #[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"]
1076        pub codingB: Option<Coding>,
1077    }
1078    impl From<Input> for Resource {
1079        fn from(value: Input) -> Self {
1080            let parameters: Vec<ParametersParameter> = value.into();
1081            Resource::Parameters(Parameters {
1082                parameter: Some(parameters),
1083                ..Default::default()
1084            })
1085        }
1086    }
1087    #[derive(Debug, FromParameters, ToParameters)]
1088    pub struct Output {
1089        #[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."]
1090        pub outcome: FHIRCode,
1091    }
1092    impl From<Output> for Resource {
1093        fn from(value: Output) -> Self {
1094            let parameters: Vec<ParametersParameter> = value.into();
1095            Resource::Parameters(Parameters {
1096                parameter: Some(parameters),
1097                ..Default::default()
1098            })
1099        }
1100    }
1101}
1102#[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"]
1103pub mod CodeSystemValidateCode {
1104    use super::*;
1105    pub const CODE: &str = "validate-code";
1106    #[derive(Debug, FromParameters, ToParameters)]
1107    pub struct Input {
1108        #[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"]
1109        pub url: Option<FHIRUri>,
1110        #[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"]
1111        pub codeSystem: Option<CodeSystem>,
1112        #[doc = "The code that is to be validated"]
1113        pub code: Option<FHIRCode>,
1114        #[doc = "The version of the code system, if one was provided in the source data"]
1115        pub version: Option<FHIRString>,
1116        #[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"]
1117        pub display: Option<FHIRString>,
1118        #[doc = "A coding to validate. The system must match the specified code system"]
1119        pub coding: Option<Coding>,
1120        #[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"]
1121        pub codeableConcept: Option<CodeableConcept>,
1122        #[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."]
1123        pub date: Option<FHIRDateTime>,
1124        #[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."]
1125        #[parameter_rename = "abstract"]
1126        pub abstract_: Option<FHIRBoolean>,
1127        #[doc = "Specifies the language to be used for description when validating the display property"]
1128        pub displayLanguage: Option<FHIRCode>,
1129    }
1130    impl From<Input> for Resource {
1131        fn from(value: Input) -> Self {
1132            let parameters: Vec<ParametersParameter> = value.into();
1133            Resource::Parameters(Parameters {
1134                parameter: Some(parameters),
1135                ..Default::default()
1136            })
1137        }
1138    }
1139    #[derive(Debug, FromParameters, ToParameters)]
1140    pub struct Output {
1141        #[doc = "True if the concept details supplied are valid"]
1142        pub result: FHIRBoolean,
1143        #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
1144        pub message: Option<FHIRString>,
1145        #[doc = "A valid display for the concept if the system wishes to display this to a user"]
1146        pub display: Option<FHIRString>,
1147    }
1148    impl From<Output> for Resource {
1149        fn from(value: Output) -> Self {
1150            let parameters: Vec<ParametersParameter> = value.into();
1151            Resource::Parameters(Parameters {
1152                parameter: Some(parameters),
1153                ..Default::default()
1154            })
1155        }
1156    }
1157}
1158#[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."]
1159pub mod CompositionDocument {
1160    use super::*;
1161    pub const CODE: &str = "document";
1162    #[derive(Debug, FromParameters, ToParameters)]
1163    pub struct Input {
1164        #[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"]
1165        pub id: Option<FHIRUri>,
1166        #[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"]
1167        pub persist: Option<FHIRBoolean>,
1168        #[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"]
1169        pub graph: Option<FHIRUri>,
1170    }
1171    impl From<Input> for Resource {
1172        fn from(value: Input) -> Self {
1173            let parameters: Vec<ParametersParameter> = value.into();
1174            Resource::Parameters(Parameters {
1175                parameter: Some(parameters),
1176                ..Default::default()
1177            })
1178        }
1179    }
1180    #[derive(Debug, FromParameters, ToParameters)]
1181    pub struct Output {}
1182    impl From<Output> for Resource {
1183        fn from(value: Output) -> Self {
1184            let parameters: Vec<ParametersParameter> = value.into();
1185            Resource::Parameters(Parameters {
1186                parameter: Some(parameters),
1187                ..Default::default()
1188            })
1189        }
1190    }
1191}
1192#[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)"]
1193pub mod ConceptMapClosure {
1194    use super::*;
1195    pub const CODE: &str = "closure";
1196    #[derive(Debug, FromParameters, ToParameters)]
1197    pub struct Input {
1198        #[doc = "The name that defines the particular context for the subsumption based closure table"]
1199        pub name: FHIRString,
1200        #[doc = "Concepts to add to the closure table"]
1201        pub concept: Option<Vec<Coding>>,
1202        #[doc = "A request to resynchronise - request to send all new entries since the nominated version was sent by the server"]
1203        pub version: Option<FHIRString>,
1204    }
1205    impl From<Input> for Resource {
1206        fn from(value: Input) -> Self {
1207            let parameters: Vec<ParametersParameter> = value.into();
1208            Resource::Parameters(Parameters {
1209                parameter: Some(parameters),
1210                ..Default::default()
1211            })
1212        }
1213    }
1214    #[derive(Debug, FromParameters)]
1215    pub struct Output {
1216        #[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"]
1217        #[parameter_rename = "return"]
1218        pub return_: ConceptMap,
1219    }
1220    impl From<Output> for Resource {
1221        fn from(value: Output) -> Self {
1222            Resource::ConceptMap(value.return_)
1223        }
1224    }
1225}
1226#[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"]
1227pub mod ConceptMapTranslate {
1228    use super::*;
1229    pub const CODE: &str = "translate";
1230    #[derive(Debug, FromParameters, ToParameters)]
1231    pub struct InputDependency {
1232        #[doc = "The element for this dependency"]
1233        pub element: Option<FHIRUri>,
1234        #[doc = "The value for this dependency"]
1235        pub concept: Option<CodeableConcept>,
1236    }
1237    impl From<InputDependency> for Resource {
1238        fn from(value: InputDependency) -> Self {
1239            let parameters: Vec<ParametersParameter> = value.into();
1240            Resource::Parameters(Parameters {
1241                parameter: Some(parameters),
1242                ..Default::default()
1243            })
1244        }
1245    }
1246    #[derive(Debug, FromParameters, ToParameters)]
1247    pub struct Input {
1248        #[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."]
1249        pub url: Option<FHIRUri>,
1250        #[doc = "The concept map is provided directly as part of the request. Servers may choose not to accept concept maps in this fashion."]
1251        pub conceptMap: Option<ConceptMap>,
1252        #[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."]
1253        pub conceptMapVersion: Option<FHIRString>,
1254        #[doc = "The code that is to be translated. If a code is provided, a system must be provided"]
1255        pub code: Option<FHIRCode>,
1256        #[doc = "The system for the code that is to be translated"]
1257        pub system: Option<FHIRUri>,
1258        #[doc = "The version of the system, if one was provided in the source data"]
1259        pub version: Option<FHIRString>,
1260        #[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"]
1261        pub source: Option<FHIRUri>,
1262        #[doc = "A coding to translate"]
1263        pub coding: Option<Coding>,
1264        #[doc = "A full codeableConcept to validate. The server can translate any of the coding values (e.g. existing translations) as it chooses"]
1265        pub codeableConcept: Option<CodeableConcept>,
1266        #[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"]
1267        pub target: Option<FHIRUri>,
1268        #[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"]
1269        pub targetsystem: Option<FHIRUri>,
1270        #[doc = "Another element that may help produce the correct mapping"]
1271        #[parameter_nested]
1272        pub dependency: Option<Vec<InputDependency>>,
1273        #[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"]
1274        pub reverse: Option<FHIRBoolean>,
1275    }
1276    impl From<Input> for Resource {
1277        fn from(value: Input) -> Self {
1278            let parameters: Vec<ParametersParameter> = value.into();
1279            Resource::Parameters(Parameters {
1280                parameter: Some(parameters),
1281                ..Default::default()
1282            })
1283        }
1284    }
1285    #[derive(Debug, FromParameters, ToParameters)]
1286    pub struct OutputMatchProduct {
1287        #[doc = "The element for this product"]
1288        pub element: Option<FHIRUri>,
1289        #[doc = "The value for this product"]
1290        pub concept: Option<Coding>,
1291    }
1292    impl From<OutputMatchProduct> for Resource {
1293        fn from(value: OutputMatchProduct) -> Self {
1294            let parameters: Vec<ParametersParameter> = value.into();
1295            Resource::Parameters(Parameters {
1296                parameter: Some(parameters),
1297                ..Default::default()
1298            })
1299        }
1300    }
1301    #[derive(Debug, FromParameters, ToParameters)]
1302    pub struct OutputMatch {
1303        #[doc = "A code indicating the equivalence of the translation, using values from [ConceptMapEquivalence](valueset-concept-map-equivalence.html)"]
1304        pub equivalence: Option<FHIRCode>,
1305        #[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)"]
1306        pub concept: Option<Coding>,
1307        #[doc = "Another element that is the product of this mapping"]
1308        #[parameter_nested]
1309        pub product: Option<Vec<OutputMatchProduct>>,
1310        #[doc = "The canonical reference to the concept map from which this mapping comes from"]
1311        pub source: Option<FHIRUri>,
1312    }
1313    impl From<OutputMatch> for Resource {
1314        fn from(value: OutputMatch) -> Self {
1315            let parameters: Vec<ParametersParameter> = value.into();
1316            Resource::Parameters(Parameters {
1317                parameter: Some(parameters),
1318                ..Default::default()
1319            })
1320        }
1321    }
1322    #[derive(Debug, FromParameters, ToParameters)]
1323    pub struct Output {
1324        #[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"]
1325        pub result: FHIRBoolean,
1326        #[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)"]
1327        pub message: Option<FHIRString>,
1328        #[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"]
1329        #[parameter_rename = "match"]
1330        #[parameter_nested]
1331        pub match_: Option<Vec<OutputMatch>>,
1332    }
1333    impl From<Output> for Resource {
1334        fn from(value: Output) -> Self {
1335            let parameters: Vec<ParametersParameter> = value.into();
1336            Resource::Parameters(Parameters {
1337                parameter: Some(parameters),
1338                ..Default::default()
1339            })
1340        }
1341    }
1342}
1343#[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."]
1344pub mod CoverageEligibilityRequestSubmit {
1345    use super::*;
1346    pub const CODE: &str = "submit";
1347    #[derive(Debug, FromParameters, ToParameters)]
1348    pub struct Input {
1349        #[doc = "An EligibilityRequest resource or Bundle of EligibilityRequests, either as individual EligibilityRequest resources or as Bundles each containing a single EligibilityRequest plus referenced resources."]
1350        pub resource: Resource,
1351    }
1352    impl From<Input> for Resource {
1353        fn from(value: Input) -> Self {
1354            let parameters: Vec<ParametersParameter> = value.into();
1355            Resource::Parameters(Parameters {
1356                parameter: Some(parameters),
1357                ..Default::default()
1358            })
1359        }
1360    }
1361    #[derive(Debug, FromParameters, ToParameters)]
1362    pub struct Output {
1363        #[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."]
1364        #[parameter_rename = "return"]
1365        pub return_: Resource,
1366    }
1367    impl From<Output> for Resource {
1368        fn from(value: Output) -> Self {
1369            let parameters: Vec<ParametersParameter> = value.into();
1370            Resource::Parameters(Parameters {
1371                parameter: Some(parameters),
1372                ..Default::default()
1373            })
1374        }
1375    }
1376}
1377#[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?)"]
1378pub mod EncounterEverything {
1379    use super::*;
1380    pub const CODE: &str = "everything";
1381    #[derive(Debug, FromParameters, ToParameters)]
1382    pub struct Input {
1383        #[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"]
1384        pub _since: Option<FHIRInstant>,
1385        #[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"]
1386        pub _type: Option<Vec<FHIRCode>>,
1387        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1388        pub _count: Option<FHIRInteger>,
1389    }
1390    impl From<Input> for Resource {
1391        fn from(value: Input) -> Self {
1392            let parameters: Vec<ParametersParameter> = value.into();
1393            Resource::Parameters(Parameters {
1394                parameter: Some(parameters),
1395                ..Default::default()
1396            })
1397        }
1398    }
1399    #[derive(Debug, FromParameters)]
1400    pub struct Output {
1401        #[doc = "The bundle type is \"searchset\""]
1402        #[parameter_rename = "return"]
1403        pub return_: Bundle,
1404    }
1405    impl From<Output> for Resource {
1406        fn from(value: Output) -> Self {
1407            Resource::Bundle(value.return_)
1408        }
1409    }
1410}
1411#[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."]
1412pub mod GroupEverything {
1413    use super::*;
1414    pub const CODE: &str = "everything";
1415    #[derive(Debug, FromParameters, ToParameters)]
1416    pub struct Input {
1417        #[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."]
1418        pub start: Option<FHIRDate>,
1419        #[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."]
1420        pub end: Option<FHIRDate>,
1421        #[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"]
1422        pub _since: Option<FHIRInstant>,
1423        #[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"]
1424        pub _type: Option<Vec<FHIRCode>>,
1425        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1426        pub _count: Option<FHIRInteger>,
1427    }
1428    impl From<Input> for Resource {
1429        fn from(value: Input) -> Self {
1430            let parameters: Vec<ParametersParameter> = value.into();
1431            Resource::Parameters(Parameters {
1432                parameter: Some(parameters),
1433                ..Default::default()
1434            })
1435        }
1436    }
1437    #[derive(Debug, FromParameters)]
1438    pub struct Output {
1439        #[doc = "The bundle type is \"searchset\""]
1440        #[parameter_rename = "return"]
1441        pub return_: Bundle,
1442    }
1443    impl From<Output> for Resource {
1444        fn from(value: Output) -> Self {
1445            Resource::Bundle(value.return_)
1446        }
1447    }
1448}
1449#[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"]
1450pub mod LibraryDataRequirements {
1451    use super::*;
1452    pub const CODE: &str = "data-requirements";
1453    #[derive(Debug, FromParameters, ToParameters)]
1454    pub struct Input {
1455        #[doc = "The target of the data requirements operation"]
1456        pub target: Option<FHIRString>,
1457    }
1458    impl From<Input> for Resource {
1459        fn from(value: Input) -> Self {
1460            let parameters: Vec<ParametersParameter> = value.into();
1461            Resource::Parameters(Parameters {
1462                parameter: Some(parameters),
1463                ..Default::default()
1464            })
1465        }
1466    }
1467    #[derive(Debug, FromParameters)]
1468    pub struct Output {
1469        #[doc = "The result of the requirements gathering"]
1470        #[parameter_rename = "return"]
1471        pub return_: Library,
1472    }
1473    impl From<Output> for Resource {
1474        fn from(value: Output) -> Self {
1475            Resource::Library(value.return_)
1476        }
1477    }
1478}
1479#[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)"]
1480pub mod ListFind {
1481    use super::*;
1482    pub const CODE: &str = "find";
1483    #[derive(Debug, FromParameters, ToParameters)]
1484    pub struct Input {
1485        #[doc = "The id of a patient resource located on the server on which this operation is executed"]
1486        pub patient: FHIRId,
1487        #[doc = "The code for the functional list that is being found"]
1488        pub name: FHIRCode,
1489    }
1490    impl From<Input> for Resource {
1491        fn from(value: Input) -> Self {
1492            let parameters: Vec<ParametersParameter> = value.into();
1493            Resource::Parameters(Parameters {
1494                parameter: Some(parameters),
1495                ..Default::default()
1496            })
1497        }
1498    }
1499    #[derive(Debug, FromParameters, ToParameters)]
1500    pub struct Output {}
1501    impl From<Output> for Resource {
1502        fn from(value: Output) -> Self {
1503            let parameters: Vec<ParametersParameter> = value.into();
1504            Resource::Parameters(Parameters {
1505                parameter: Some(parameters),
1506                ..Default::default()
1507            })
1508        }
1509    }
1510}
1511#[doc = "The care-gaps operation is used to determine gaps-in-care based on the results of quality measures"]
1512pub mod MeasureCareGaps {
1513    use super::*;
1514    pub const CODE: &str = "care-gaps";
1515    #[derive(Debug, FromParameters, ToParameters)]
1516    pub struct Input {
1517        #[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"]
1518        pub periodStart: FHIRDate,
1519        #[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"]
1520        pub periodEnd: FHIRDate,
1521        #[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"]
1522        pub topic: FHIRString,
1523        #[doc = "Subject for which the care gaps report will be produced"]
1524        pub subject: FHIRString,
1525    }
1526    impl From<Input> for Resource {
1527        fn from(value: Input) -> Self {
1528            let parameters: Vec<ParametersParameter> = value.into();
1529            Resource::Parameters(Parameters {
1530                parameter: Some(parameters),
1531                ..Default::default()
1532            })
1533        }
1534    }
1535    #[derive(Debug, FromParameters)]
1536    pub struct Output {
1537        #[doc = "The result of the care gaps report will be returned as a document bundle with a MeasureReport entry for each included measure"]
1538        #[parameter_rename = "return"]
1539        pub return_: Bundle,
1540    }
1541    impl From<Output> for Resource {
1542        fn from(value: Output) -> Self {
1543            Resource::Bundle(value.return_)
1544        }
1545    }
1546}
1547#[doc = "The collect-data operation is used to collect the data-of-interest for the given measure."]
1548pub mod MeasureCollectData {
1549    use super::*;
1550    pub const CODE: &str = "collect-data";
1551    #[derive(Debug, FromParameters, ToParameters)]
1552    pub struct Input {
1553        #[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"]
1554        pub periodStart: FHIRDate,
1555        #[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"]
1556        pub periodEnd: FHIRDate,
1557        #[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"]
1558        pub measure: Option<FHIRString>,
1559        #[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)"]
1560        pub subject: Option<FHIRString>,
1561        #[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"]
1562        pub practitioner: Option<FHIRString>,
1563        #[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"]
1564        pub lastReceivedOn: Option<FHIRDateTime>,
1565    }
1566    impl From<Input> for Resource {
1567        fn from(value: Input) -> Self {
1568            let parameters: Vec<ParametersParameter> = value.into();
1569            Resource::Parameters(Parameters {
1570                parameter: Some(parameters),
1571                ..Default::default()
1572            })
1573        }
1574    }
1575    #[derive(Debug, FromParameters, ToParameters)]
1576    pub struct Output {
1577        #[doc = "A MeasureReport of type data-collection detailing the results of the operation"]
1578        pub measureReport: MeasureReport,
1579        #[doc = "The result resources that make up the data-of-interest for the measure"]
1580        pub resource: Option<Vec<Resource>>,
1581    }
1582    impl From<Output> for Resource {
1583        fn from(value: Output) -> Self {
1584            let parameters: Vec<ParametersParameter> = value.into();
1585            Resource::Parameters(Parameters {
1586                parameter: Some(parameters),
1587                ..Default::default()
1588            })
1589        }
1590    }
1591}
1592#[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"]
1593pub mod MeasureDataRequirements {
1594    use super::*;
1595    pub const CODE: &str = "data-requirements";
1596    #[derive(Debug, FromParameters, ToParameters)]
1597    pub struct Input {
1598        #[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"]
1599        pub periodStart: FHIRDate,
1600        #[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"]
1601        pub periodEnd: FHIRDate,
1602    }
1603    impl From<Input> for Resource {
1604        fn from(value: Input) -> Self {
1605            let parameters: Vec<ParametersParameter> = value.into();
1606            Resource::Parameters(Parameters {
1607                parameter: Some(parameters),
1608                ..Default::default()
1609            })
1610        }
1611    }
1612    #[derive(Debug, FromParameters)]
1613    pub struct Output {
1614        #[doc = "The result of the requirements gathering is a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the measure"]
1615        #[parameter_rename = "return"]
1616        pub return_: Library,
1617    }
1618    impl From<Output> for Resource {
1619        fn from(value: Output) -> Self {
1620            Resource::Library(value.return_)
1621        }
1622    }
1623}
1624#[doc = "The evaluate-measure operation is used to calculate an eMeasure and obtain the results"]
1625pub mod MeasureEvaluateMeasure {
1626    use super::*;
1627    pub const CODE: &str = "evaluate-measure";
1628    #[derive(Debug, FromParameters, ToParameters)]
1629    pub struct Input {
1630        #[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"]
1631        pub periodStart: FHIRDate,
1632        #[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"]
1633        pub periodEnd: FHIRDate,
1634        #[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"]
1635        pub measure: Option<FHIRString>,
1636        #[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"]
1637        pub reportType: Option<FHIRCode>,
1638        #[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)"]
1639        pub subject: Option<FHIRString>,
1640        #[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"]
1641        pub practitioner: Option<FHIRString>,
1642        #[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"]
1643        pub lastReceivedOn: Option<FHIRDateTime>,
1644    }
1645    impl From<Input> for Resource {
1646        fn from(value: Input) -> Self {
1647            let parameters: Vec<ParametersParameter> = value.into();
1648            Resource::Parameters(Parameters {
1649                parameter: Some(parameters),
1650                ..Default::default()
1651            })
1652        }
1653    }
1654    #[derive(Debug, FromParameters)]
1655    pub struct Output {
1656        #[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"]
1657        #[parameter_rename = "return"]
1658        pub return_: MeasureReport,
1659    }
1660    impl From<Output> for Resource {
1661        fn from(value: Output) -> Self {
1662            Resource::MeasureReport(value.return_)
1663        }
1664    }
1665}
1666#[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"]
1667pub mod MeasureSubmitData {
1668    use super::*;
1669    pub const CODE: &str = "submit-data";
1670    #[derive(Debug, FromParameters, ToParameters)]
1671    pub struct Input {
1672        #[doc = "The measure report being submitted"]
1673        pub measureReport: MeasureReport,
1674        #[doc = "The individual resources that make up the data-of-interest being submitted"]
1675        pub resource: Option<Vec<Resource>>,
1676    }
1677    impl From<Input> for Resource {
1678        fn from(value: Input) -> Self {
1679            let parameters: Vec<ParametersParameter> = value.into();
1680            Resource::Parameters(Parameters {
1681                parameter: Some(parameters),
1682                ..Default::default()
1683            })
1684        }
1685    }
1686    #[derive(Debug, FromParameters, ToParameters)]
1687    pub struct Output {}
1688    impl From<Output> for Resource {
1689        fn from(value: Output) -> Self {
1690            let parameters: Vec<ParametersParameter> = value.into();
1691            Resource::Parameters(Parameters {
1692                parameter: Some(parameters),
1693                ..Default::default()
1694            })
1695        }
1696    }
1697}
1698#[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."]
1699pub mod MedicinalProductEverything {
1700    use super::*;
1701    pub const CODE: &str = "everything";
1702    #[derive(Debug, FromParameters, ToParameters)]
1703    pub struct Input {
1704        #[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"]
1705        pub _since: Option<FHIRInstant>,
1706        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1707        pub _count: Option<FHIRInteger>,
1708    }
1709    impl From<Input> for Resource {
1710        fn from(value: Input) -> Self {
1711            let parameters: Vec<ParametersParameter> = value.into();
1712            Resource::Parameters(Parameters {
1713                parameter: Some(parameters),
1714                ..Default::default()
1715            })
1716        }
1717    }
1718    #[derive(Debug, FromParameters)]
1719    pub struct Output {
1720        #[doc = "The bundle type is \"searchset\""]
1721        #[parameter_rename = "return"]
1722        pub return_: Bundle,
1723    }
1724    impl From<Output> for Resource {
1725        fn from(value: Output) -> Self {
1726            Resource::Bundle(value.return_)
1727        }
1728    }
1729}
1730#[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."]
1731pub mod MessageHeaderProcessMessage {
1732    use super::*;
1733    pub const CODE: &str = "process-message";
1734    #[derive(Debug, FromParameters, ToParameters)]
1735    pub struct Input {
1736        #[doc = "The message to process (or, if using asynchronous messaging, it may be a response message to accept)"]
1737        pub content: Bundle,
1738        #[doc = "If 'true' the message is processed using the asynchronous messaging pattern"]
1739        #[parameter_rename = "async"]
1740        pub async_: Option<FHIRBoolean>,
1741        #[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"]
1742        #[parameter_rename = "response-url"]
1743        pub response_url: Option<FHIRUrl>,
1744    }
1745    impl From<Input> for Resource {
1746        fn from(value: Input) -> Self {
1747            let parameters: Vec<ParametersParameter> = value.into();
1748            Resource::Parameters(Parameters {
1749                parameter: Some(parameters),
1750                ..Default::default()
1751            })
1752        }
1753    }
1754    #[derive(Debug, FromParameters)]
1755    pub struct Output {
1756        #[doc = "A response message, if synchronous messaging is being used (mandatory in this case). For asynchronous messaging, there is no return value"]
1757        #[parameter_rename = "return"]
1758        pub return_: Option<Bundle>,
1759    }
1760    impl From<Output> for Resource {
1761        fn from(value: Output) -> Self {
1762            Resource::Bundle(value.return_.unwrap_or_default())
1763        }
1764    }
1765}
1766#[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."]
1767pub mod NamingSystemPreferredId {
1768    use super::*;
1769    pub const CODE: &str = "preferred-id";
1770    #[derive(Debug, FromParameters, ToParameters)]
1771    pub struct Input {
1772        #[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"]
1773        pub id: FHIRString,
1774        #[doc = ""]
1775        #[parameter_rename = "type"]
1776        pub type_: FHIRCode,
1777    }
1778    impl From<Input> for Resource {
1779        fn from(value: Input) -> Self {
1780            let parameters: Vec<ParametersParameter> = value.into();
1781            Resource::Parameters(Parameters {
1782                parameter: Some(parameters),
1783                ..Default::default()
1784            })
1785        }
1786    }
1787    #[derive(Debug, FromParameters, ToParameters)]
1788    pub struct Output {
1789        #[doc = "OIDs are return as plain OIDs (not the URI form)."]
1790        pub result: FHIRString,
1791    }
1792    impl From<Output> for Resource {
1793        fn from(value: Output) -> Self {
1794            let parameters: Vec<ParametersParameter> = value.into();
1795            Resource::Parameters(Parameters {
1796                parameter: Some(parameters),
1797                ..Default::default()
1798            })
1799        }
1800    }
1801}
1802#[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."]
1803pub mod ObservationLastn {
1804    use super::*;
1805    pub const CODE: &str = "lastn";
1806    #[derive(Debug, FromParameters, ToParameters)]
1807    pub struct Input {
1808        #[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."]
1809        pub max: Option<FHIRPositiveInt>,
1810    }
1811    impl From<Input> for Resource {
1812        fn from(value: Input) -> Self {
1813            let parameters: Vec<ParametersParameter> = value.into();
1814            Resource::Parameters(Parameters {
1815                parameter: Some(parameters),
1816                ..Default::default()
1817            })
1818        }
1819    }
1820    #[derive(Debug, FromParameters)]
1821    pub struct Output {
1822        #[doc = "The set of most recent N Observations that match the *lastn* query search criteria."]
1823        #[parameter_rename = "return"]
1824        pub return_: Bundle,
1825    }
1826    impl From<Output> for Resource {
1827        fn from(value: Output) -> Self {
1828            Resource::Bundle(value.return_)
1829        }
1830    }
1831}
1832#[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"]
1833pub mod ObservationStats {
1834    use super::*;
1835    pub const CODE: &str = "stats";
1836    #[derive(Debug, FromParameters, ToParameters)]
1837    pub struct Input {
1838        #[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"]
1839        pub subject: FHIRUri,
1840        #[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`."]
1841        pub code: Option<Vec<FHIRString>>,
1842        #[doc = "The system for the code(s). Or provide a coding instead"]
1843        pub system: Option<FHIRUri>,
1844        #[doc = "The test code upon which the statistics are being performed, as a Coding"]
1845        pub coding: Option<Vec<Coding>>,
1846        #[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"]
1847        pub duration: Option<FHIRDecimal>,
1848        #[doc = "The time period over which the calculations to be performed, if a duration is not provided"]
1849        pub period: Option<Period>,
1850        #[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)"]
1851        pub statistic: Vec<FHIRCode>,
1852        #[doc = "Whether to return the observations on which the statistics are based"]
1853        pub include: Option<FHIRBoolean>,
1854        #[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"]
1855        pub limit: Option<FHIRPositiveInt>,
1856    }
1857    impl From<Input> for Resource {
1858        fn from(value: Input) -> Self {
1859            let parameters: Vec<ParametersParameter> = value.into();
1860            Resource::Parameters(Parameters {
1861                parameter: Some(parameters),
1862                ..Default::default()
1863            })
1864        }
1865    }
1866    #[derive(Debug, FromParameters, ToParameters)]
1867    pub struct Output {
1868        #[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`."]
1869        pub statistics: Vec<Observation>,
1870        #[doc = "Source observations on which the statistics are based"]
1871        pub source: Option<Vec<Observation>>,
1872    }
1873    impl From<Output> for Resource {
1874        fn from(value: Output) -> Self {
1875            let parameters: Vec<ParametersParameter> = value.into();
1876            Resource::Parameters(Parameters {
1877                parameter: Some(parameters),
1878                ..Default::default()
1879            })
1880        }
1881    }
1882}
1883#[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."]
1884pub mod PatientEverything {
1885    use super::*;
1886    pub const CODE: &str = "everything";
1887    #[derive(Debug, FromParameters, ToParameters)]
1888    pub struct Input {
1889        #[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."]
1890        pub start: Option<FHIRDate>,
1891        #[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."]
1892        pub end: Option<FHIRDate>,
1893        #[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"]
1894        pub _since: Option<FHIRInstant>,
1895        #[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"]
1896        pub _type: Option<Vec<FHIRCode>>,
1897        #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1898        pub _count: Option<FHIRInteger>,
1899    }
1900    impl From<Input> for Resource {
1901        fn from(value: Input) -> Self {
1902            let parameters: Vec<ParametersParameter> = value.into();
1903            Resource::Parameters(Parameters {
1904                parameter: Some(parameters),
1905                ..Default::default()
1906            })
1907        }
1908    }
1909    #[derive(Debug, FromParameters)]
1910    pub struct Output {
1911        #[doc = "The bundle type is \"searchset\""]
1912        #[parameter_rename = "return"]
1913        pub return_: Bundle,
1914    }
1915    impl From<Output> for Resource {
1916        fn from(value: Output) -> Self {
1917            Resource::Bundle(value.return_)
1918        }
1919    }
1920}
1921#[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."]
1922pub mod PatientMatch {
1923    use super::*;
1924    pub const CODE: &str = "match";
1925    #[derive(Debug, FromParameters, ToParameters)]
1926    pub struct Input {
1927        #[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)."]
1928        pub resource: Resource,
1929        #[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."]
1930        pub onlyCertainMatches: Option<FHIRBoolean>,
1931        #[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"]
1932        pub count: Option<FHIRInteger>,
1933    }
1934    impl From<Input> for Resource {
1935        fn from(value: Input) -> Self {
1936            let parameters: Vec<ParametersParameter> = value.into();
1937            Resource::Parameters(Parameters {
1938                parameter: Some(parameters),
1939                ..Default::default()
1940            })
1941        }
1942    }
1943    #[derive(Debug, FromParameters)]
1944    pub struct Output {
1945        #[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)"]
1946        #[parameter_rename = "return"]
1947        pub return_: Bundle,
1948    }
1949    impl From<Output> for Resource {
1950        fn from(value: Output) -> Self {
1951            Resource::Bundle(value.return_)
1952        }
1953    }
1954}
1955#[doc = "The apply operation applies a PlanDefinition to a given context"]
1956pub mod PlanDefinitionApply {
1957    use super::*;
1958    pub const CODE: &str = "apply";
1959    #[derive(Debug, FromParameters, ToParameters)]
1960    pub struct Input {
1961        #[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"]
1962        pub planDefinition: Option<PlanDefinition>,
1963        #[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"]
1964        pub subject: Vec<FHIRString>,
1965        #[doc = "The encounter in context, if any"]
1966        pub encounter: Option<FHIRString>,
1967        #[doc = "The practitioner applying the plan definition"]
1968        pub practitioner: Option<FHIRString>,
1969        #[doc = "The organization applying the plan definition"]
1970        pub organization: Option<FHIRString>,
1971        #[doc = "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)"]
1972        pub userType: Option<CodeableConcept>,
1973        #[doc = "Preferred language of the person using the system"]
1974        pub userLanguage: Option<CodeableConcept>,
1975        #[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"]
1976        pub userTaskContext: Option<CodeableConcept>,
1977        #[doc = "The current setting of the request (inpatient, outpatient, etc.)"]
1978        pub setting: Option<CodeableConcept>,
1979        #[doc = "Additional detail about the setting of the request, if any"]
1980        pub settingContext: Option<CodeableConcept>,
1981    }
1982    impl From<Input> for Resource {
1983        fn from(value: Input) -> Self {
1984            let parameters: Vec<ParametersParameter> = value.into();
1985            Resource::Parameters(Parameters {
1986                parameter: Some(parameters),
1987                ..Default::default()
1988            })
1989        }
1990    }
1991    #[derive(Debug, FromParameters)]
1992    pub struct Output {
1993        #[doc = "The CarePlan that is the result of applying the plan definition"]
1994        #[parameter_rename = "return"]
1995        pub return_: CarePlan,
1996    }
1997    impl From<Output> for Resource {
1998        fn from(value: Output) -> Self {
1999            Resource::CarePlan(value.return_)
2000        }
2001    }
2002}
2003#[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"]
2004pub mod PlanDefinitionDataRequirements {
2005    use super::*;
2006    pub const CODE: &str = "data-requirements";
2007    #[derive(Debug, FromParameters, ToParameters)]
2008    pub struct Input {}
2009    impl From<Input> for Resource {
2010        fn from(value: Input) -> Self {
2011            let parameters: Vec<ParametersParameter> = value.into();
2012            Resource::Parameters(Parameters {
2013                parameter: Some(parameters),
2014                ..Default::default()
2015            })
2016        }
2017    }
2018    #[derive(Debug, FromParameters)]
2019    pub struct Output {
2020        #[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"]
2021        #[parameter_rename = "return"]
2022        pub return_: Library,
2023    }
2024    impl From<Output> for Resource {
2025        fn from(value: Output) -> Self {
2026            Resource::Library(value.return_)
2027        }
2028    }
2029}
2030#[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)"]
2031pub mod ResourceConvert {
2032    use super::*;
2033    pub const CODE: &str = "convert";
2034    #[derive(Debug, FromParameters, ToParameters)]
2035    pub struct Input {
2036        #[doc = "The resource that is to be converted"]
2037        pub input: Resource,
2038    }
2039    impl From<Input> for Resource {
2040        fn from(value: Input) -> Self {
2041            let parameters: Vec<ParametersParameter> = value.into();
2042            Resource::Parameters(Parameters {
2043                parameter: Some(parameters),
2044                ..Default::default()
2045            })
2046        }
2047    }
2048    #[derive(Debug, FromParameters, ToParameters)]
2049    pub struct Output {
2050        #[doc = "The resource after conversion"]
2051        pub output: Resource,
2052    }
2053    impl From<Output> for Resource {
2054        fn from(value: Output) -> Self {
2055            let parameters: Vec<ParametersParameter> = value.into();
2056            Resource::Parameters(Parameters {
2057                parameter: Some(parameters),
2058                ..Default::default()
2059            })
2060        }
2061    }
2062}
2063#[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"]
2064pub mod ResourceGraph {
2065    use super::*;
2066    pub const CODE: &str = "graph";
2067    #[derive(Debug, FromParameters, ToParameters)]
2068    pub struct Input {
2069        #[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"]
2070        pub graph: FHIRUri,
2071    }
2072    impl From<Input> for Resource {
2073        fn from(value: Input) -> Self {
2074            let parameters: Vec<ParametersParameter> = value.into();
2075            Resource::Parameters(Parameters {
2076                parameter: Some(parameters),
2077                ..Default::default()
2078            })
2079        }
2080    }
2081    #[derive(Debug, FromParameters, ToParameters)]
2082    pub struct Output {
2083        #[doc = "The set of resources that were in the graph based on the provided definition"]
2084        pub result: Bundle,
2085    }
2086    impl From<Output> for Resource {
2087        fn from(value: Output) -> Self {
2088            let parameters: Vec<ParametersParameter> = value.into();
2089            Resource::Parameters(Parameters {
2090                parameter: Some(parameters),
2091                ..Default::default()
2092            })
2093        }
2094    }
2095}
2096#[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)"]
2097pub mod ResourceGraphql {
2098    use super::*;
2099    pub const CODE: &str = "graphql";
2100    #[derive(Debug, FromParameters, ToParameters)]
2101    pub struct Input {
2102        #[doc = ""]
2103        pub query: FHIRString,
2104    }
2105    impl From<Input> for Resource {
2106        fn from(value: Input) -> Self {
2107            let parameters: Vec<ParametersParameter> = value.into();
2108            Resource::Parameters(Parameters {
2109                parameter: Some(parameters),
2110                ..Default::default()
2111            })
2112        }
2113    }
2114    #[derive(Debug, FromParameters, ToParameters)]
2115    pub struct Output {
2116        #[doc = "The content is always returned as application/json; this SHOULD be specified in the Accept header"]
2117        pub result: Binary,
2118    }
2119    impl From<Output> for Resource {
2120        fn from(value: Output) -> Self {
2121            let parameters: Vec<ParametersParameter> = value.into();
2122            Resource::Parameters(Parameters {
2123                parameter: Some(parameters),
2124                ..Default::default()
2125            })
2126        }
2127    }
2128}
2129#[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)"]
2130pub mod ResourceMeta {
2131    use super::*;
2132    pub const CODE: &str = "meta";
2133    #[derive(Debug, FromParameters, ToParameters)]
2134    pub struct Input {}
2135    impl From<Input> for Resource {
2136        fn from(value: Input) -> Self {
2137            let parameters: Vec<ParametersParameter> = value.into();
2138            Resource::Parameters(Parameters {
2139                parameter: Some(parameters),
2140                ..Default::default()
2141            })
2142        }
2143    }
2144    #[derive(Debug, FromParameters, ToParameters)]
2145    pub struct Output {
2146        #[doc = "The meta returned by the operation"]
2147        #[parameter_rename = "return"]
2148        pub return_: Meta,
2149    }
2150    impl From<Output> for Resource {
2151        fn from(value: Output) -> Self {
2152            let parameters: Vec<ParametersParameter> = value.into();
2153            Resource::Parameters(Parameters {
2154                parameter: Some(parameters),
2155                ..Default::default()
2156            })
2157        }
2158    }
2159}
2160#[doc = "This operation takes a meta, and adds the profiles, tags, and security labels found in it to the nominated resource"]
2161pub mod ResourceMetaAdd {
2162    use super::*;
2163    pub const CODE: &str = "meta-add";
2164    #[derive(Debug, FromParameters, ToParameters)]
2165    pub struct Input {
2166        #[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"]
2167        pub meta: Meta,
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 = "Resulting meta for the resource"]
2181        #[parameter_rename = "return"]
2182        pub return_: Meta,
2183    }
2184    impl From<Output> for Resource {
2185        fn from(value: Output) -> Self {
2186            let parameters: Vec<ParametersParameter> = value.into();
2187            Resource::Parameters(Parameters {
2188                parameter: Some(parameters),
2189                ..Default::default()
2190            })
2191        }
2192    }
2193}
2194#[doc = "This operation takes a meta, and deletes the profiles, tags, and security labels found in it from the nominated resource"]
2195pub mod ResourceMetaDelete {
2196    use super::*;
2197    pub const CODE: &str = "meta-delete";
2198    #[derive(Debug, FromParameters, ToParameters)]
2199    pub struct Input {
2200        #[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"]
2201        pub meta: Meta,
2202    }
2203    impl From<Input> for Resource {
2204        fn from(value: Input) -> Self {
2205            let parameters: Vec<ParametersParameter> = value.into();
2206            Resource::Parameters(Parameters {
2207                parameter: Some(parameters),
2208                ..Default::default()
2209            })
2210        }
2211    }
2212    #[derive(Debug, FromParameters, ToParameters)]
2213    pub struct Output {
2214        #[doc = "Resulting meta for the resource"]
2215        #[parameter_rename = "return"]
2216        pub return_: Meta,
2217    }
2218    impl From<Output> for Resource {
2219        fn from(value: Output) -> Self {
2220            let parameters: Vec<ParametersParameter> = value.into();
2221            Resource::Parameters(Parameters {
2222                parameter: Some(parameters),
2223                ..Default::default()
2224            })
2225        }
2226    }
2227}
2228#[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."]
2229pub mod ResourceValidate {
2230    use super::*;
2231    pub const CODE: &str = "validate";
2232    #[derive(Debug, FromParameters, ToParameters)]
2233    pub struct Input {
2234        #[doc = "Must be present unless the mode is \"delete\""]
2235        pub resource: Option<Resource>,
2236        #[doc = "Default is 'no action'; (e.g. general validation)"]
2237        pub mode: Option<FHIRCode>,
2238        #[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"]
2239        pub profile: Option<FHIRUri>,
2240    }
2241    impl From<Input> for Resource {
2242        fn from(value: Input) -> Self {
2243            let parameters: Vec<ParametersParameter> = value.into();
2244            Resource::Parameters(Parameters {
2245                parameter: Some(parameters),
2246                ..Default::default()
2247            })
2248        }
2249    }
2250    #[derive(Debug, FromParameters)]
2251    pub struct Output {
2252        #[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)"]
2253        #[parameter_rename = "return"]
2254        pub return_: OperationOutcome,
2255    }
2256    impl From<Output> for Resource {
2257        fn from(value: Output) -> Self {
2258            Resource::OperationOutcome(value.return_)
2259        }
2260    }
2261}
2262#[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."]
2263pub mod StructureDefinitionQuestionnaire {
2264    use super::*;
2265    pub const CODE: &str = "questionnaire";
2266    #[derive(Debug, FromParameters, ToParameters)]
2267    pub struct Input {
2268        #[doc = "A logical identifier (i.e. 'StructureDefinition.identifier''). The server must know the StructureDefinition or be able to retrieve it from other known repositories."]
2269        #[parameter_rename = "identifier"]
2270        pub identifier_: Option<FHIRCanonical>,
2271        #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2272        pub profile: Option<FHIRString>,
2273        #[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."]
2274        pub url: Option<FHIRCanonical>,
2275        #[doc = "If true, the questionnaire will only include those elements marked as \"mustSupport='true'\" in the StructureDefinition."]
2276        pub supportedOnly: Option<FHIRBoolean>,
2277    }
2278    impl From<Input> for Resource {
2279        fn from(value: Input) -> Self {
2280            let parameters: Vec<ParametersParameter> = value.into();
2281            Resource::Parameters(Parameters {
2282                parameter: Some(parameters),
2283                ..Default::default()
2284            })
2285        }
2286    }
2287    #[derive(Debug, FromParameters)]
2288    pub struct Output {
2289        #[doc = "The questionnaire form generated based on the StructureDefinition."]
2290        #[parameter_rename = "return"]
2291        pub return_: Questionnaire,
2292    }
2293    impl From<Output> for Resource {
2294        fn from(value: Output) -> Self {
2295            Resource::Questionnaire(value.return_)
2296        }
2297    }
2298}
2299#[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."]
2300pub mod StructureDefinitionSnapshot {
2301    use super::*;
2302    pub const CODE: &str = "snapshot";
2303    #[derive(Debug, FromParameters, ToParameters)]
2304    pub struct Input {
2305        #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2306        pub definition: Option<StructureDefinition>,
2307        #[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."]
2308        pub url: Option<FHIRString>,
2309    }
2310    impl From<Input> for Resource {
2311        fn from(value: Input) -> Self {
2312            let parameters: Vec<ParametersParameter> = value.into();
2313            Resource::Parameters(Parameters {
2314                parameter: Some(parameters),
2315                ..Default::default()
2316            })
2317        }
2318    }
2319    #[derive(Debug, FromParameters)]
2320    pub struct Output {
2321        #[doc = "The structure definition with a snapshot"]
2322        #[parameter_rename = "return"]
2323        pub return_: StructureDefinition,
2324    }
2325    impl From<Output> for Resource {
2326        fn from(value: Output) -> Self {
2327            Resource::StructureDefinition(value.return_)
2328        }
2329    }
2330}
2331#[doc = "The transform operation takes input content, applies a structure map transform, and then returns the output."]
2332pub mod StructureMapTransform {
2333    use super::*;
2334    pub const CODE: &str = "transform";
2335    #[derive(Debug, FromParameters, ToParameters)]
2336    pub struct Input {
2337        #[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"]
2338        pub source: Option<FHIRUri>,
2339        #[doc = "The logical content to transform"]
2340        pub content: Resource,
2341    }
2342    impl From<Input> for Resource {
2343        fn from(value: Input) -> Self {
2344            let parameters: Vec<ParametersParameter> = value.into();
2345            Resource::Parameters(Parameters {
2346                parameter: Some(parameters),
2347                ..Default::default()
2348            })
2349        }
2350    }
2351    #[derive(Debug, FromParameters, ToParameters)]
2352    pub struct Output {
2353        #[doc = "The result of the transform"]
2354        #[parameter_rename = "return"]
2355        pub return_: Resource,
2356    }
2357    impl From<Output> for Resource {
2358        fn from(value: Output) -> Self {
2359            let parameters: Vec<ParametersParameter> = value.into();
2360            Resource::Parameters(Parameters {
2361                parameter: Some(parameters),
2362                ..Default::default()
2363            })
2364        }
2365    }
2366}
2367#[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."]
2368pub mod ValueSetExpand {
2369    use super::*;
2370    pub const CODE: &str = "expand";
2371    #[derive(Debug, FromParameters, ToParameters)]
2372    pub struct Input {
2373        #[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"]
2374        pub url: Option<FHIRUri>,
2375        #[doc = "The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion"]
2376        pub valueSet: Option<ValueSet>,
2377        #[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."]
2378        pub valueSetVersion: Option<FHIRString>,
2379        #[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"]
2380        pub context: Option<FHIRUri>,
2381        #[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)"]
2382        pub contextDirection: Option<FHIRCode>,
2383        #[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"]
2384        pub filter: Option<FHIRString>,
2385        #[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."]
2386        pub date: Option<FHIRDateTime>,
2387        #[doc = "Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)"]
2388        pub offset: Option<FHIRInteger>,
2389        #[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"]
2390        pub count: Option<FHIRInteger>,
2391        #[doc = "Controls whether concept designations are to be included or excluded in value set expansions"]
2392        pub includeDesignations: Option<FHIRBoolean>,
2393        #[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"]
2394        pub designation: Option<Vec<FHIRString>>,
2395        #[doc = "Controls whether the value set definition is included or excluded in value set expansions"]
2396        pub includeDefinition: Option<FHIRBoolean>,
2397        #[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"]
2398        pub activeOnly: Option<FHIRBoolean>,
2399        #[doc = "Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains)"]
2400        pub excludeNested: Option<FHIRBoolean>,
2401        #[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."]
2402        pub excludeNotForUI: Option<FHIRBoolean>,
2403        #[doc = "Controls whether or not the value set expansion includes post coordinated codes"]
2404        pub excludePostCoordinated: Option<FHIRBoolean>,
2405        #[doc = "Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display"]
2406        pub displayLanguage: Option<FHIRCode>,
2407        #[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"]
2408        #[parameter_rename = "exclude-system"]
2409        pub exclude_system: Option<Vec<FHIRCanonical>>,
2410        #[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"]
2411        #[parameter_rename = "system-version"]
2412        pub system_version: Option<Vec<FHIRCanonical>>,
2413        #[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"]
2414        #[parameter_rename = "check-system-version"]
2415        pub check_system_version: Option<Vec<FHIRCanonical>>,
2416        #[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"]
2417        #[parameter_rename = "force-system-version"]
2418        pub force_system_version: Option<Vec<FHIRCanonical>>,
2419    }
2420    impl From<Input> for Resource {
2421        fn from(value: Input) -> Self {
2422            let parameters: Vec<ParametersParameter> = value.into();
2423            Resource::Parameters(Parameters {
2424                parameter: Some(parameters),
2425                ..Default::default()
2426            })
2427        }
2428    }
2429    #[derive(Debug, FromParameters)]
2430    pub struct Output {
2431        #[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"]
2432        #[parameter_rename = "return"]
2433        pub return_: ValueSet,
2434    }
2435    impl From<Output> for Resource {
2436        fn from(value: Output) -> Self {
2437            Resource::ValueSet(value.return_)
2438        }
2439    }
2440}
2441#[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"]
2442pub mod ValueSetValidateCode {
2443    use super::*;
2444    pub const CODE: &str = "validate-code";
2445    #[derive(Debug, FromParameters, ToParameters)]
2446    pub struct Input {
2447        #[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"]
2448        pub url: Option<FHIRUri>,
2449        #[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"]
2450        pub context: Option<FHIRUri>,
2451        #[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"]
2452        pub valueSet: Option<ValueSet>,
2453        #[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."]
2454        pub valueSetVersion: Option<FHIRString>,
2455        #[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)"]
2456        pub code: Option<FHIRCode>,
2457        #[doc = "The system for the code that is to be validated"]
2458        pub system: Option<FHIRUri>,
2459        #[doc = "The version of the system, if one was provided in the source data"]
2460        pub systemVersion: Option<FHIRString>,
2461        #[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"]
2462        pub display: Option<FHIRString>,
2463        #[doc = "A coding to validate"]
2464        pub coding: Option<Coding>,
2465        #[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"]
2466        pub codeableConcept: Option<CodeableConcept>,
2467        #[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."]
2468        pub date: Option<FHIRDateTime>,
2469        #[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."]
2470        #[parameter_rename = "abstract"]
2471        pub abstract_: Option<FHIRBoolean>,
2472        #[doc = "Specifies the language to be used for description when validating the display property"]
2473        pub displayLanguage: Option<FHIRCode>,
2474    }
2475    impl From<Input> for Resource {
2476        fn from(value: Input) -> Self {
2477            let parameters: Vec<ParametersParameter> = value.into();
2478            Resource::Parameters(Parameters {
2479                parameter: Some(parameters),
2480                ..Default::default()
2481            })
2482        }
2483    }
2484    #[derive(Debug, FromParameters, ToParameters)]
2485    pub struct Output {
2486        #[doc = "True if the concept details supplied are valid"]
2487        pub result: FHIRBoolean,
2488        #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
2489        pub message: Option<FHIRString>,
2490        #[doc = "A valid display for the concept if the system wishes to display this to a user"]
2491        pub display: Option<FHIRString>,
2492    }
2493    impl From<Output> for Resource {
2494        fn from(value: Output) -> Self {
2495            let parameters: Vec<ParametersParameter> = value.into();
2496            Resource::Parameters(Parameters {
2497                parameter: Some(parameters),
2498                ..Default::default()
2499            })
2500        }
2501    }
2502}
2503#[doc = "Execute a view definition against supplied or server data."]
2504pub mod ViewDefinitionRun {
2505    use super::*;
2506    pub const CODE: &str = "viewdefinition-run";
2507    #[derive(Debug, FromParameters, ToParameters)]
2508    pub struct Input {
2509        #[doc = "Output format for the result (for example json, ndjson, csv, parquet). Optional; if omitted, the server returns ndjson by default."]
2510        pub _format: Option<FHIRCode>,
2511        #[doc = "Include CSV headers (default true). Applies only when csv output is requested."]
2512        pub header: Option<FHIRBoolean>,
2513        #[doc = "Reference to a ViewDefinition stored on the server."]
2514        pub viewReference: Option<Reference>,
2515        #[doc = "Inline ViewDefinition resource to execute."]
2516        pub viewResource: Option<ViewDefinition>,
2517        #[doc = "Restrict execution to the specified patient."]
2518        pub patient: Option<Reference>,
2519        #[doc = "Restrict execution to members of the given group(s)."]
2520        pub group: Option<Vec<Reference>>,
2521        #[doc = "External data source to use (for example a URI or bucket name)."]
2522        pub source: Option<FHIRString>,
2523        #[doc = "FHIR resources to transform instead of using server data."]
2524        pub resource: Option<Vec<Resource>>,
2525        #[doc = "Maximum number of rows to return."]
2526        pub _limit: Option<FHIRInteger>,
2527        #[doc = "Include only resources modified after this instant."]
2528        pub _since: Option<FHIRInstant>,
2529    }
2530    impl From<Input> for Resource {
2531        fn from(value: Input) -> Self {
2532            let parameters: Vec<ParametersParameter> = value.into();
2533            Resource::Parameters(Parameters {
2534                parameter: Some(parameters),
2535                ..Default::default()
2536            })
2537        }
2538    }
2539    #[derive(Debug, FromParameters)]
2540    pub struct Output {
2541        #[doc = "Transformed data encoded in the requested output format."]
2542        #[parameter_rename = "return"]
2543        pub return_: Binary,
2544    }
2545    impl From<Output> for Resource {
2546        fn from(value: Output) -> Self {
2547            Resource::Binary(value.return_)
2548        }
2549    }
2550}