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 return the current status information about one or more topic-based Subscriptions in R4."]
7pub mod BackportSubscriptionStatus {
8 use super::*;
9 pub const CODE: &str = "status";
10 #[derive(Debug, FromParameters, ToParameters)]
11 pub struct Input {
12 #[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\")."]
13 pub id: Option<Vec<FHIRId>>,
14 #[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\")."]
15 pub status: Option<Vec<FHIRCode>>,
16 }
17 impl From<Input> for Resource {
18 fn from(value: Input) -> Self {
19 let parameters: Vec<ParametersParameter> = value.into();
20 Resource::Parameters(Parameters {
21 parameter: Some(parameters),
22 ..Default::default()
23 })
24 }
25 }
26 #[derive(Debug, FromParameters)]
27 pub struct Output {
28 #[doc = "The operation returns a bundle containing one or more subscription status resources, one per Subscription being queried. The Bundle type is \"searchset\"."]
29 #[parameter_rename = "return"]
30 pub return_: Bundle,
31 }
32 impl From<Output> for Resource {
33 fn from(value: Output) -> Self {
34 Resource::Bundle(value.return_)
35 }
36 }
37}
38#[doc = "This operation is used to get a token for a websocket client to use in order to bind to one or more subscriptions."]
39pub mod BackportSubscriptionGetWsBindingToken {
40 use super::*;
41 pub const CODE: &str = "get-ws-binding-token";
42 #[derive(Debug, FromParameters, ToParameters)]
43 pub struct Input {
44 #[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."]
45 pub id: Option<Vec<FHIRId>>,
46 }
47 impl From<Input> for Resource {
48 fn from(value: Input) -> Self {
49 let parameters: Vec<ParametersParameter> = value.into();
50 Resource::Parameters(Parameters {
51 parameter: Some(parameters),
52 ..Default::default()
53 })
54 }
55 }
56 #[derive(Debug, FromParameters, ToParameters)]
57 pub struct Output {
58 #[doc = "An access token that a client may use to show authorization during a websocket connection."]
59 pub token: FHIRString,
60 #[doc = "The date and time this token is valid until."]
61 pub expiration: FHIRDateTime,
62 #[doc = "The subscriptions this token is valid for."]
63 pub subscription: Option<Vec<FHIRString>>,
64 #[doc = "The URL the client should use to connect to Websockets."]
65 #[parameter_rename = "websocket-url"]
66 pub websocket_url: FHIRUrl,
67 }
68 impl From<Output> for Resource {
69 fn from(value: Output) -> Self {
70 let parameters: Vec<ParametersParameter> = value.into();
71 Resource::Parameters(Parameters {
72 parameter: Some(parameters),
73 ..Default::default()
74 })
75 }
76 }
77}
78#[doc = "This operation is used to resend notifications that have been previously triggered by a topic-based Subscription in R4."]
79pub mod BackportSubscriptionResend {
80 use super::*;
81 pub const CODE: &str = "resend";
82 #[derive(Debug, FromParameters, ToParameters)]
83 pub struct Input {
84 #[doc = "The starting event number, inclusive of this event (lower bound)."]
85 pub eventsSinceNumber: Option<FHIRString>,
86 #[doc = "The ending event number, inclusive of this event (upper bound)."]
87 pub eventsUntilNumber: Option<FHIRString>,
88 #[doc = "The starting event date/time, inclusive of this instant (lower bound)."]
89 pub eventsSinceInstant: Option<FHIRInstant>,
90 #[doc = "The ending event date/time, inclusive of this instant (upper bound)."]
91 pub eventsUntilInstant: Option<FHIRInstant>,
92 }
93 impl From<Input> for Resource {
94 fn from(value: Input) -> Self {
95 let parameters: Vec<ParametersParameter> = value.into();
96 Resource::Parameters(Parameters {
97 parameter: Some(parameters),
98 ..Default::default()
99 })
100 }
101 }
102 #[derive(Debug, FromParameters)]
103 pub struct Output {
104 #[doc = "Outcome of this request."]
105 #[parameter_rename = "return"]
106 pub return_: OperationOutcome,
107 }
108 impl From<Output> for Resource {
109 fn from(value: Output) -> Self {
110 Resource::OperationOutcome(value.return_)
111 }
112 }
113}
114#[doc = "This operation is used to search for and return notifications that have been previously triggered by a topic-based Subscription in R4."]
115pub mod BackportSubscriptionEvents {
116 use super::*;
117 pub const CODE: &str = "events";
118 #[derive(Debug, FromParameters, ToParameters)]
119 pub struct Input {
120 #[doc = "The starting event number, inclusive of this event (lower bound)."]
121 pub eventsSinceNumber: Option<FHIRString>,
122 #[doc = "The ending event number, inclusive of this event (upper bound)."]
123 pub eventsUntilNumber: Option<FHIRString>,
124 #[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."]
125 pub content: Option<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 valid notification bundle, with the first entry being the subscription status information resource. The bundle type is \"history\"."]
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 = "Delete refresh token from the user for the client."]
149pub mod HasteHealthDeleteRefreshToken {
150 use super::*;
151 pub const CODE: &str = "delete-refresh-token";
152 #[derive(Debug, FromParameters, ToParameters)]
153 pub struct Input {
154 #[doc = "Client id for refresh token to delete."]
155 pub client_id: FHIRId,
156 #[doc = "User agent of the refresh token to delete."]
157 pub user_agent: Option<FHIRString>,
158 }
159 impl From<Input> for Resource {
160 fn from(value: Input) -> Self {
161 let parameters: Vec<ParametersParameter> = value.into();
162 Resource::Parameters(Parameters {
163 parameter: Some(parameters),
164 ..Default::default()
165 })
166 }
167 }
168 #[derive(Debug, FromParameters)]
169 pub struct Output {
170 #[doc = "Result of the delete operation."]
171 #[parameter_rename = "return"]
172 pub return_: OperationOutcome,
173 }
174 impl From<Output> for Resource {
175 fn from(value: Output) -> Self {
176 Resource::OperationOutcome(value.return_)
177 }
178 }
179}
180#[doc = "Show list of users refresh tokens."]
181pub mod HasteHealthListRefreshTokens {
182 use super::*;
183 pub const CODE: &str = "refresh-tokens";
184 #[derive(Debug, FromParameters, ToParameters)]
185 pub struct Input {}
186 impl From<Input> for Resource {
187 fn from(value: Input) -> Self {
188 let parameters: Vec<ParametersParameter> = value.into();
189 Resource::Parameters(Parameters {
190 parameter: Some(parameters),
191 ..Default::default()
192 })
193 }
194 }
195 #[derive(Debug, FromParameters, ToParameters)]
196 pub struct OutputRefreshTokens {
197 #[doc = "Client for refresh token."]
198 pub client_id: FHIRId,
199 #[doc = "User agent of the refresh token."]
200 pub user_agent: FHIRString,
201 #[doc = "When the refresh token was created."]
202 pub created_at: FHIRDateTime,
203 }
204 impl From<OutputRefreshTokens> for Resource {
205 fn from(value: OutputRefreshTokens) -> Self {
206 let parameters: Vec<ParametersParameter> = value.into();
207 Resource::Parameters(Parameters {
208 parameter: Some(parameters),
209 ..Default::default()
210 })
211 }
212 }
213 #[derive(Debug, FromParameters, ToParameters)]
214 pub struct Output {
215 #[doc = "The result of the operation."]
216 #[parameter_rename = "refresh-tokens"]
217 #[parameter_nested]
218 pub refresh_tokens: Option<Vec<OutputRefreshTokens>>,
219 }
220 impl From<Output> for Resource {
221 fn from(value: Output) -> Self {
222 let parameters: Vec<ParametersParameter> = value.into();
223 Resource::Parameters(Parameters {
224 parameter: Some(parameters),
225 ..Default::default()
226 })
227 }
228 }
229}
230#[doc = "Parse HL7v2 messages."]
231pub mod Hl7v2Parse {
232 use super::*;
233 pub const CODE: &str = "hl7v2-parse";
234 #[derive(Debug, FromParameters, ToParameters)]
235 pub struct Input {
236 #[doc = "HL7v2 message to be parsed."]
237 pub hl7v2: FHIRString,
238 }
239 impl From<Input> for Resource {
240 fn from(value: Input) -> Self {
241 let parameters: Vec<ParametersParameter> = value.into();
242 Resource::Parameters(Parameters {
243 parameter: Some(parameters),
244 ..Default::default()
245 })
246 }
247 }
248 #[derive(Debug, FromParameters, ToParameters)]
249 pub struct Output {
250 #[doc = "Parsed HL7v2 message."]
251 pub hl7v2: HL7V2,
252 }
253 impl From<Output> for Resource {
254 fn from(value: Output) -> Self {
255 let parameters: Vec<ParametersParameter> = value.into();
256 Resource::Parameters(Parameters {
257 parameter: Some(parameters),
258 ..Default::default()
259 })
260 }
261 }
262}
263#[doc = "Get tenant endpoint information for the current tenant."]
264pub mod TenantEndpointInformation {
265 use super::*;
266 pub const CODE: &str = "endpoints";
267 #[derive(Debug, FromParameters, ToParameters)]
268 pub struct Input {}
269 impl From<Input> for Resource {
270 fn from(value: Input) -> Self {
271 let parameters: Vec<ParametersParameter> = value.into();
272 Resource::Parameters(Parameters {
273 parameter: Some(parameters),
274 ..Default::default()
275 })
276 }
277 }
278 #[derive(Debug, FromParameters, ToParameters)]
279 pub struct Output {
280 #[doc = "FHIR R4 Endpoint URL."]
281 #[parameter_rename = "fhir-r4-base-url"]
282 pub fhir_r4_base_url: FHIRUri,
283 #[doc = "FHIR R4 Capabilities URL."]
284 #[parameter_rename = "fhir-r4-capabilities-url"]
285 pub fhir_r4_capabilities_url: FHIRUri,
286 #[doc = "OIDC Discovery URL."]
287 #[parameter_rename = "oidc-discovery-url"]
288 pub oidc_discovery_url: FHIRUri,
289 #[doc = "OIDC Token Endpoint."]
290 #[parameter_rename = "oidc-token-endpoint"]
291 pub oidc_token_endpoint: FHIRUri,
292 #[doc = "OIDC Authorize Endpoint."]
293 #[parameter_rename = "oidc-authorize-endpoint"]
294 pub oidc_authorize_endpoint: FHIRUri,
295 #[doc = "OIDC JWKS Endpoint."]
296 #[parameter_rename = "oidc-jwks-endpoint"]
297 pub oidc_jwks_endpoint: FHIRUri,
298 #[doc = "Model context protocol endpoint."]
299 #[parameter_rename = "mcp-endpoint"]
300 pub mcp_endpoint: FHIRUri,
301 }
302 impl From<Output> for Resource {
303 fn from(value: Output) -> Self {
304 let parameters: Vec<ParametersParameter> = value.into();
305 Resource::Parameters(Parameters {
306 parameter: Some(parameters),
307 ..Default::default()
308 })
309 }
310 }
311}
312#[doc = "Get the registration information for an identity provider."]
313pub mod HasteHealthIdpRegistrationInfo {
314 use super::*;
315 pub const CODE: &str = "registration-info";
316 #[derive(Debug, FromParameters, ToParameters)]
317 pub struct Input {}
318 impl From<Input> for Resource {
319 fn from(value: Input) -> Self {
320 let parameters: Vec<ParametersParameter> = value.into();
321 Resource::Parameters(Parameters {
322 parameter: Some(parameters),
323 ..Default::default()
324 })
325 }
326 }
327 #[derive(Debug, FromParameters, ToParameters)]
328 pub struct OutputInformation {
329 #[doc = "The name of the property."]
330 pub name: FHIRString,
331 #[doc = "the value of the property."]
332 pub value: FHIRString,
333 }
334 impl From<OutputInformation> for Resource {
335 fn from(value: OutputInformation) -> Self {
336 let parameters: Vec<ParametersParameter> = value.into();
337 Resource::Parameters(Parameters {
338 parameter: Some(parameters),
339 ..Default::default()
340 })
341 }
342 }
343 #[derive(Debug, FromParameters, ToParameters)]
344 pub struct Output {
345 #[doc = "IdentityProviders registration information."]
346 #[parameter_nested]
347 pub information: Option<Vec<OutputInformation>>,
348 }
349 impl From<Output> for Resource {
350 fn from(value: Output) -> Self {
351 let parameters: Vec<ParametersParameter> = value.into();
352 Resource::Parameters(Parameters {
353 parameter: Some(parameters),
354 ..Default::default()
355 })
356 }
357 }
358}
359#[doc = "Evaluate an Access Policy."]
360pub mod HasteHealthEvaluatePolicy {
361 use super::*;
362 pub const CODE: &str = "evaluate-policy";
363 #[derive(Debug, FromParameters, ToParameters)]
364 pub struct Input {
365 #[doc = "The user to evaluate the policy against. Defaults to logged in user if not present."]
366 pub user: Option<Reference>,
367 #[doc = "The requests to evaluate against the policy."]
368 pub request: Bundle,
369 }
370 impl From<Input> for Resource {
371 fn from(value: Input) -> Self {
372 let parameters: Vec<ParametersParameter> = value.into();
373 Resource::Parameters(Parameters {
374 parameter: Some(parameters),
375 ..Default::default()
376 })
377 }
378 }
379 #[derive(Debug, FromParameters)]
380 pub struct Output {
381 #[doc = "The result of the policy evaluation."]
382 #[parameter_rename = "return"]
383 pub return_: OperationOutcome,
384 }
385 impl From<Output> for Resource {
386 fn from(value: Output) -> Self {
387 Resource::OperationOutcome(value.return_)
388 }
389 }
390}
391#[doc = "Delete scope from user accepted scopes for the client."]
392pub mod HasteHealthDeleteScope {
393 use super::*;
394 pub const CODE: &str = "delete-scope";
395 #[derive(Debug, FromParameters, ToParameters)]
396 pub struct Input {
397 #[doc = "Client for which scopes are being shown."]
398 pub client_id: FHIRId,
399 }
400 impl From<Input> for Resource {
401 fn from(value: Input) -> Self {
402 let parameters: Vec<ParametersParameter> = value.into();
403 Resource::Parameters(Parameters {
404 parameter: Some(parameters),
405 ..Default::default()
406 })
407 }
408 }
409 #[derive(Debug, FromParameters)]
410 pub struct Output {
411 #[doc = "Result of the delete operation."]
412 #[parameter_rename = "return"]
413 pub return_: OperationOutcome,
414 }
415 impl From<Output> for Resource {
416 fn from(value: Output) -> Self {
417 Resource::OperationOutcome(value.return_)
418 }
419 }
420}
421#[doc = "Show list of user accepted scopes for apps."]
422pub mod HasteHealthListScopes {
423 use super::*;
424 pub const CODE: &str = "scopes";
425 #[derive(Debug, FromParameters, ToParameters)]
426 pub struct Input {}
427 impl From<Input> for Resource {
428 fn from(value: Input) -> 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 OutputScopes {
438 #[doc = "Client for which scopes are being shown."]
439 pub client_id: FHIRId,
440 #[doc = "Scopes user accepted."]
441 pub scopes: FHIRString,
442 #[doc = "When the scopes were accepted."]
443 pub created_at: FHIRDateTime,
444 }
445 impl From<OutputScopes> for Resource {
446 fn from(value: OutputScopes) -> Self {
447 let parameters: Vec<ParametersParameter> = value.into();
448 Resource::Parameters(Parameters {
449 parameter: Some(parameters),
450 ..Default::default()
451 })
452 }
453 }
454 #[derive(Debug, FromParameters, ToParameters)]
455 pub struct Output {
456 #[doc = "The result of the operation."]
457 #[parameter_nested]
458 pub scopes: Option<Vec<OutputScopes>>,
459 }
460 impl From<Output> for Resource {
461 fn from(value: Output) -> Self {
462 let parameters: Vec<ParametersParameter> = value.into();
463 Resource::Parameters(Parameters {
464 parameter: Some(parameters),
465 ..Default::default()
466 })
467 }
468 }
469}
470#[doc = "Get Project resource for the current project."]
471pub mod ProjectInformation {
472 use super::*;
473 pub const CODE: &str = "current-project";
474 #[derive(Debug, FromParameters, ToParameters)]
475 pub struct Input {}
476 impl From<Input> for Resource {
477 fn from(value: Input) -> Self {
478 let parameters: Vec<ParametersParameter> = value.into();
479 Resource::Parameters(Parameters {
480 parameter: Some(parameters),
481 ..Default::default()
482 })
483 }
484 }
485 #[derive(Debug, FromParameters, ToParameters)]
486 pub struct Output {
487 #[doc = "Users current project."]
488 pub project: Project,
489 }
490 impl From<Output> for Resource {
491 fn from(value: Output) -> Self {
492 let parameters: Vec<ParametersParameter> = value.into();
493 Resource::Parameters(Parameters {
494 parameter: Some(parameters),
495 ..Default::default()
496 })
497 }
498 }
499}
500#[doc = "Get tenant information for the current tenant."]
501pub mod TenantInformation {
502 use super::*;
503 pub const CODE: &str = "current-tenant";
504 #[derive(Debug, FromParameters, ToParameters)]
505 pub struct Input {}
506 impl From<Input> for Resource {
507 fn from(value: Input) -> Self {
508 let parameters: Vec<ParametersParameter> = value.into();
509 Resource::Parameters(Parameters {
510 parameter: Some(parameters),
511 ..Default::default()
512 })
513 }
514 }
515 #[derive(Debug, FromParameters, ToParameters)]
516 pub struct Output {
517 #[doc = "tenant id"]
518 pub id: FHIRString,
519 #[doc = "tenant subscription level"]
520 pub subscription: FHIRCode,
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 pub union: Option<CapabilityStatement>,
635 #[doc = "The union of the functionality described by the CapabilityStatement resources"]
636 pub intersection: Option<CapabilityStatement>,
637 }
638 impl From<Output> for Resource {
639 fn from(value: Output) -> Self {
640 let parameters: Vec<ParametersParameter> = value.into();
641 Resource::Parameters(Parameters {
642 parameter: Some(parameters),
643 ..Default::default()
644 })
645 }
646 }
647}
648#[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"]
649pub mod CapabilityStatementImplements {
650 use super::*;
651 pub const CODE: &str = "implements";
652 #[derive(Debug, FromParameters, ToParameters)]
653 pub struct Input {
654 #[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)"]
655 pub server: Option<FHIRCanonical>,
656 #[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)"]
657 pub client: Option<FHIRCanonical>,
658 #[doc = "The client capability statement, provided inline"]
659 pub resource: Option<CapabilityStatement>,
660 }
661 impl From<Input> for Resource {
662 fn from(value: Input) -> Self {
663 let parameters: Vec<ParametersParameter> = value.into();
664 Resource::Parameters(Parameters {
665 parameter: Some(parameters),
666 ..Default::default()
667 })
668 }
669 }
670 #[derive(Debug, FromParameters)]
671 pub struct Output {
672 #[doc = "Outcome of the CapabilityStatement test"]
673 #[parameter_rename = "return"]
674 pub return_: OperationOutcome,
675 }
676 impl From<Output> for Resource {
677 fn from(value: Output) -> Self {
678 Resource::OperationOutcome(value.return_)
679 }
680 }
681}
682#[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"]
683pub mod CapabilityStatementSubset {
684 use super::*;
685 pub const CODE: &str = "subset";
686 #[derive(Debug, FromParameters, ToParameters)]
687 pub struct Input {
688 #[doc = "The canonical URL - use this if the subset is not invoked on an instance (or on the /metadata end-point)"]
689 pub server: Option<FHIRUri>,
690 #[doc = "A resource that the client would like to include in the return"]
691 pub resource: Vec<FHIRCode>,
692 }
693 impl From<Input> for Resource {
694 fn from(value: Input) -> Self {
695 let parameters: Vec<ParametersParameter> = value.into();
696 Resource::Parameters(Parameters {
697 parameter: Some(parameters),
698 ..Default::default()
699 })
700 }
701 }
702 #[derive(Debug, FromParameters)]
703 pub struct Output {
704 #[doc = "The subsetted CapabilityStatement resource that is returned. This should be tagged with the SUBSETTED code"]
705 #[parameter_rename = "return"]
706 pub return_: CapabilityStatement,
707 }
708 impl From<Output> for Resource {
709 fn from(value: Output) -> Self {
710 Resource::CapabilityStatement(value.return_)
711 }
712 }
713}
714#[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"]
715pub mod CapabilityStatementVersions {
716 use super::*;
717 pub const CODE: &str = "versions";
718 #[derive(Debug, FromParameters, ToParameters)]
719 pub struct Input {}
720 impl From<Input> for Resource {
721 fn from(value: Input) -> Self {
722 let parameters: Vec<ParametersParameter> = value.into();
723 Resource::Parameters(Parameters {
724 parameter: Some(parameters),
725 ..Default::default()
726 })
727 }
728 }
729 #[derive(Debug, FromParameters, ToParameters)]
730 pub struct Output {
731 #[doc = "A version supported by the server. Use the major.minor version like 3.0"]
732 pub version: Vec<FHIRCode>,
733 #[doc = "The default version for the server. Use the major.minor version like 3.0"]
734 pub default: FHIRCode,
735 }
736 impl From<Output> for Resource {
737 fn from(value: Output) -> Self {
738 let parameters: Vec<ParametersParameter> = value.into();
739 Resource::Parameters(Parameters {
740 parameter: Some(parameters),
741 ..Default::default()
742 })
743 }
744 }
745}
746#[doc = "The apply operation applies a definition in a specific context"]
747pub mod ChargeItemDefinitionApply {
748 use super::*;
749 pub const CODE: &str = "apply";
750 #[derive(Debug, FromParameters, ToParameters)]
751 pub struct Input {
752 #[doc = "The ChargeItem on which the definition is to ba applies"]
753 pub chargeItem: Reference,
754 #[doc = "The account in context, if any"]
755 pub account: Option<Reference>,
756 }
757 impl From<Input> for Resource {
758 fn from(value: Input) -> Self {
759 let parameters: Vec<ParametersParameter> = value.into();
760 Resource::Parameters(Parameters {
761 parameter: Some(parameters),
762 ..Default::default()
763 })
764 }
765 }
766 #[derive(Debug, FromParameters)]
767 pub struct Output {
768 #[doc = "The resource that is the result of applying the definition"]
769 #[parameter_rename = "return"]
770 pub return_: Resource,
771 }
772 impl From<Output> for Resource {
773 fn from(value: Output) -> Self {
774 value.return_
775 }
776 }
777}
778#[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."]
779pub mod ClaimSubmit {
780 use super::*;
781 pub const CODE: &str = "submit";
782 #[derive(Debug, FromParameters, ToParameters)]
783 pub struct Input {
784 #[doc = "A Claim resource or Bundle of claims, either as individual Claim resources or as Bundles each containing a single Claim plus referenced resources."]
785 pub resource: Resource,
786 }
787 impl From<Input> for Resource {
788 fn from(value: Input) -> Self {
789 let parameters: Vec<ParametersParameter> = value.into();
790 Resource::Parameters(Parameters {
791 parameter: Some(parameters),
792 ..Default::default()
793 })
794 }
795 }
796 #[derive(Debug, FromParameters, ToParameters)]
797 pub struct Output {
798 #[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."]
799 #[parameter_rename = "return"]
800 pub return_: Resource,
801 }
802 impl From<Output> for Resource {
803 fn from(value: Output) -> Self {
804 let parameters: Vec<ParametersParameter> = value.into();
805 Resource::Parameters(Parameters {
806 parameter: Some(parameters),
807 ..Default::default()
808 })
809 }
810 }
811}
812#[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."]
813pub mod CodeSystemFindMatches {
814 use super::*;
815 pub const CODE: &str = "find-matches";
816 #[derive(Debug, FromParameters, ToParameters)]
817 pub struct InputPropertySubproperty {
818 #[doc = "Identifies the sub-property provided"]
819 pub code: FHIRCode,
820 #[doc = "The value of the sub-property provided"]
821 pub value: ParametersParameterValueTypeChoice,
822 }
823 impl From<InputPropertySubproperty> for Resource {
824 fn from(value: InputPropertySubproperty) -> Self {
825 let parameters: Vec<ParametersParameter> = value.into();
826 Resource::Parameters(Parameters {
827 parameter: Some(parameters),
828 ..Default::default()
829 })
830 }
831 }
832 #[derive(Debug, FromParameters, ToParameters)]
833 pub struct InputProperty {
834 #[doc = "Identifies the property provided"]
835 pub code: FHIRCode,
836 #[doc = "The value of the property provided"]
837 pub value: Option<ParametersParameterValueTypeChoice>,
838 #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
839 #[parameter_nested]
840 pub subproperty: Option<Vec<InputPropertySubproperty>>,
841 }
842 impl From<InputProperty> for Resource {
843 fn from(value: InputProperty) -> Self {
844 let parameters: Vec<ParametersParameter> = value.into();
845 Resource::Parameters(Parameters {
846 parameter: Some(parameters),
847 ..Default::default()
848 })
849 }
850 }
851 #[derive(Debug, FromParameters, ToParameters)]
852 pub struct Input {
853 #[doc = "The system in which composition is to be performed. This must be provided unless the operation is invoked on a code system instance"]
854 pub system: Option<FHIRUri>,
855 #[doc = "The version of the system for the inferencing to be performed"]
856 pub version: Option<FHIRString>,
857 #[doc = "One or more properties that contain information to be composed into the code"]
858 #[parameter_nested]
859 pub property: Option<Vec<InputProperty>>,
860 #[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'"]
861 pub exact: FHIRBoolean,
862 #[doc = "Post-coordinated expressions are allowed to be returned in the matching codes (mainly for SNOMED CT). Default = false"]
863 pub compositional: Option<FHIRBoolean>,
864 }
865 impl From<Input> for Resource {
866 fn from(value: Input) -> Self {
867 let parameters: Vec<ParametersParameter> = value.into();
868 Resource::Parameters(Parameters {
869 parameter: Some(parameters),
870 ..Default::default()
871 })
872 }
873 }
874 #[derive(Debug, FromParameters, ToParameters)]
875 pub struct OutputMatchUnmatchedProperty {
876 #[doc = "Identifies the sub-property provided"]
877 pub code: FHIRCode,
878 #[doc = "The value of the sub-property provided"]
879 pub value: ParametersParameterValueTypeChoice,
880 }
881 impl From<OutputMatchUnmatchedProperty> for Resource {
882 fn from(value: OutputMatchUnmatchedProperty) -> Self {
883 let parameters: Vec<ParametersParameter> = value.into();
884 Resource::Parameters(Parameters {
885 parameter: Some(parameters),
886 ..Default::default()
887 })
888 }
889 }
890 #[derive(Debug, FromParameters, ToParameters)]
891 pub struct OutputMatchUnmatched {
892 #[doc = "Identifies the property provided"]
893 pub code: FHIRCode,
894 #[doc = "The value of the property provided"]
895 pub value: ParametersParameterValueTypeChoice,
896 #[doc = "Nested Properties (mainly used for SNOMED CT composition, for relationship Groups)"]
897 #[parameter_nested]
898 pub property: Option<Vec<OutputMatchUnmatchedProperty>>,
899 }
900 impl From<OutputMatchUnmatched> for Resource {
901 fn from(value: OutputMatchUnmatched) -> Self {
902 let parameters: Vec<ParametersParameter> = value.into();
903 Resource::Parameters(Parameters {
904 parameter: Some(parameters),
905 ..Default::default()
906 })
907 }
908 }
909 #[derive(Debug, FromParameters, ToParameters)]
910 pub struct OutputMatch {
911 #[doc = "A code that matches the properties provided"]
912 pub code: Coding,
913 #[doc = "One or more properties that contain properties that could not be matched into the code"]
914 #[parameter_nested]
915 pub unmatched: Option<Vec<OutputMatchUnmatched>>,
916 #[doc = "Information about the quality of the match, if operation is for a human"]
917 pub comment: Option<FHIRString>,
918 }
919 impl From<OutputMatch> for Resource {
920 fn from(value: OutputMatch) -> Self {
921 let parameters: Vec<ParametersParameter> = value.into();
922 Resource::Parameters(Parameters {
923 parameter: Some(parameters),
924 ..Default::default()
925 })
926 }
927 }
928 #[derive(Debug, FromParameters, ToParameters)]
929 pub struct Output {
930 #[doc = "Concepts returned by the server as a result of the inferencing operation"]
931 #[parameter_rename = "match"]
932 #[parameter_nested]
933 pub match_: Option<Vec<OutputMatch>>,
934 }
935 impl From<Output> for Resource {
936 fn from(value: Output) -> Self {
937 let parameters: Vec<ParametersParameter> = value.into();
938 Resource::Parameters(Parameters {
939 parameter: Some(parameters),
940 ..Default::default()
941 })
942 }
943 }
944}
945#[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"]
946pub mod CodeSystemLookup {
947 use super::*;
948 pub const CODE: &str = "lookup";
949 #[derive(Debug, FromParameters, ToParameters)]
950 pub struct Input {
951 #[doc = "The code that is to be located. If a code is provided, a system must be provided"]
952 pub code: Option<FHIRCode>,
953 #[doc = "The system for the code that is to be located"]
954 pub system: Option<FHIRUri>,
955 #[doc = "The version of the system, if one was provided in the source data"]
956 pub version: Option<FHIRString>,
957 #[doc = "A coding to look up"]
958 pub coding: Option<Coding>,
959 #[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."]
960 pub date: Option<FHIRDateTime>,
961 #[doc = "The requested language for display (see $expand.displayLanguage)"]
962 pub displayLanguage: Option<FHIRCode>,
963 #[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"]
964 pub property: Option<Vec<FHIRCode>>,
965 }
966 impl From<Input> for Resource {
967 fn from(value: Input) -> Self {
968 let parameters: Vec<ParametersParameter> = value.into();
969 Resource::Parameters(Parameters {
970 parameter: Some(parameters),
971 ..Default::default()
972 })
973 }
974 }
975 #[derive(Debug, FromParameters, ToParameters)]
976 pub struct OutputDesignation {
977 #[doc = "The language this designation is defined for"]
978 pub language: Option<FHIRCode>,
979 #[doc = "A code that details how this designation would be used"]
980 #[parameter_rename = "use"]
981 pub use_: Option<Coding>,
982 #[doc = "The text value for this designation"]
983 pub value: FHIRString,
984 }
985 impl From<OutputDesignation> for Resource {
986 fn from(value: OutputDesignation) -> Self {
987 let parameters: Vec<ParametersParameter> = value.into();
988 Resource::Parameters(Parameters {
989 parameter: Some(parameters),
990 ..Default::default()
991 })
992 }
993 }
994 #[derive(Debug, FromParameters, ToParameters)]
995 pub struct OutputPropertySubproperty {
996 #[doc = "Identifies the sub-property returned"]
997 pub code: FHIRCode,
998 #[doc = "The value of the sub-property returned"]
999 pub value: ParametersParameterValueTypeChoice,
1000 #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1001 pub description: Option<FHIRString>,
1002 }
1003 impl From<OutputPropertySubproperty> for Resource {
1004 fn from(value: OutputPropertySubproperty) -> Self {
1005 let parameters: Vec<ParametersParameter> = value.into();
1006 Resource::Parameters(Parameters {
1007 parameter: Some(parameters),
1008 ..Default::default()
1009 })
1010 }
1011 }
1012 #[derive(Debug, FromParameters, ToParameters)]
1013 pub struct OutputProperty {
1014 #[doc = "Identifies the property returned"]
1015 pub code: FHIRCode,
1016 #[doc = "The value of the property returned"]
1017 pub value: Option<ParametersParameterValueTypeChoice>,
1018 #[doc = "Human Readable representation of the property value (e.g. display for a code)"]
1019 pub description: Option<FHIRString>,
1020 #[doc = "Nested Properties (mainly used for SNOMED CT decomposition, for relationship Groups)"]
1021 #[parameter_nested]
1022 pub subproperty: Option<Vec<OutputPropertySubproperty>>,
1023 }
1024 impl From<OutputProperty> for Resource {
1025 fn from(value: OutputProperty) -> Self {
1026 let parameters: Vec<ParametersParameter> = value.into();
1027 Resource::Parameters(Parameters {
1028 parameter: Some(parameters),
1029 ..Default::default()
1030 })
1031 }
1032 }
1033 #[derive(Debug, FromParameters, ToParameters)]
1034 pub struct Output {
1035 #[doc = "A display name for the code system"]
1036 pub name: FHIRString,
1037 #[doc = "The version that these details are based on"]
1038 pub version: Option<FHIRString>,
1039 #[doc = "The preferred display for this concept"]
1040 pub display: FHIRString,
1041 #[doc = "Additional representations for this concept"]
1042 #[parameter_nested]
1043 pub designation: Option<Vec<OutputDesignation>>,
1044 #[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"]
1045 #[parameter_nested]
1046 pub property: Option<Vec<OutputProperty>>,
1047 }
1048 impl From<Output> for Resource {
1049 fn from(value: Output) -> Self {
1050 let parameters: Vec<ParametersParameter> = value.into();
1051 Resource::Parameters(Parameters {
1052 parameter: Some(parameters),
1053 ..Default::default()
1054 })
1055 }
1056 }
1057}
1058#[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"]
1059pub mod CodeSystemSubsumes {
1060 use super::*;
1061 pub const CODE: &str = "subsumes";
1062 #[derive(Debug, FromParameters, ToParameters)]
1063 pub struct Input {
1064 #[doc = "The \"A\" code that is to be tested. If a code is provided, a system must be provided"]
1065 pub codeA: Option<FHIRCode>,
1066 #[doc = "The \"B\" code that is to be tested. If a code is provided, a system must be provided"]
1067 pub codeB: Option<FHIRCode>,
1068 #[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"]
1069 pub system: Option<FHIRUri>,
1070 #[doc = "The version of the code system, if one was provided in the source data"]
1071 pub version: Option<FHIRString>,
1072 #[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"]
1073 pub codingA: Option<Coding>,
1074 #[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"]
1075 pub codingB: Option<Coding>,
1076 }
1077 impl From<Input> for Resource {
1078 fn from(value: Input) -> Self {
1079 let parameters: Vec<ParametersParameter> = value.into();
1080 Resource::Parameters(Parameters {
1081 parameter: Some(parameters),
1082 ..Default::default()
1083 })
1084 }
1085 }
1086 #[derive(Debug, FromParameters, ToParameters)]
1087 pub struct Output {
1088 #[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."]
1089 pub outcome: FHIRCode,
1090 }
1091 impl From<Output> for Resource {
1092 fn from(value: Output) -> Self {
1093 let parameters: Vec<ParametersParameter> = value.into();
1094 Resource::Parameters(Parameters {
1095 parameter: Some(parameters),
1096 ..Default::default()
1097 })
1098 }
1099 }
1100}
1101#[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"]
1102pub mod CodeSystemValidateCode {
1103 use super::*;
1104 pub const CODE: &str = "validate-code";
1105 #[derive(Debug, FromParameters, ToParameters)]
1106 pub struct Input {
1107 #[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"]
1108 pub url: Option<FHIRUri>,
1109 #[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"]
1110 pub codeSystem: Option<CodeSystem>,
1111 #[doc = "The code that is to be validated"]
1112 pub code: Option<FHIRCode>,
1113 #[doc = "The version of the code system, if one was provided in the source data"]
1114 pub version: Option<FHIRString>,
1115 #[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"]
1116 pub display: Option<FHIRString>,
1117 #[doc = "A coding to validate. The system must match the specified code system"]
1118 pub coding: Option<Coding>,
1119 #[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"]
1120 pub codeableConcept: Option<CodeableConcept>,
1121 #[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."]
1122 pub date: Option<FHIRDateTime>,
1123 #[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."]
1124 #[parameter_rename = "abstract"]
1125 pub abstract_: Option<FHIRBoolean>,
1126 #[doc = "Specifies the language to be used for description when validating the display property"]
1127 pub displayLanguage: Option<FHIRCode>,
1128 }
1129 impl From<Input> for Resource {
1130 fn from(value: Input) -> Self {
1131 let parameters: Vec<ParametersParameter> = value.into();
1132 Resource::Parameters(Parameters {
1133 parameter: Some(parameters),
1134 ..Default::default()
1135 })
1136 }
1137 }
1138 #[derive(Debug, FromParameters, ToParameters)]
1139 pub struct Output {
1140 #[doc = "True if the concept details supplied are valid"]
1141 pub result: FHIRBoolean,
1142 #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
1143 pub message: Option<FHIRString>,
1144 #[doc = "A valid display for the concept if the system wishes to display this to a user"]
1145 pub display: Option<FHIRString>,
1146 }
1147 impl From<Output> for Resource {
1148 fn from(value: Output) -> Self {
1149 let parameters: Vec<ParametersParameter> = value.into();
1150 Resource::Parameters(Parameters {
1151 parameter: Some(parameters),
1152 ..Default::default()
1153 })
1154 }
1155 }
1156}
1157#[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."]
1158pub mod CompositionDocument {
1159 use super::*;
1160 pub const CODE: &str = "document";
1161 #[derive(Debug, FromParameters, ToParameters)]
1162 pub struct Input {
1163 #[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"]
1164 pub id: Option<FHIRUri>,
1165 #[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"]
1166 pub persist: Option<FHIRBoolean>,
1167 #[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"]
1168 pub graph: Option<FHIRUri>,
1169 }
1170 impl From<Input> for Resource {
1171 fn from(value: Input) -> Self {
1172 let parameters: Vec<ParametersParameter> = value.into();
1173 Resource::Parameters(Parameters {
1174 parameter: Some(parameters),
1175 ..Default::default()
1176 })
1177 }
1178 }
1179 #[derive(Debug, FromParameters, ToParameters)]
1180 pub struct Output {}
1181 impl From<Output> for Resource {
1182 fn from(value: Output) -> Self {
1183 let parameters: Vec<ParametersParameter> = value.into();
1184 Resource::Parameters(Parameters {
1185 parameter: Some(parameters),
1186 ..Default::default()
1187 })
1188 }
1189 }
1190}
1191#[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)"]
1192pub mod ConceptMapClosure {
1193 use super::*;
1194 pub const CODE: &str = "closure";
1195 #[derive(Debug, FromParameters, ToParameters)]
1196 pub struct Input {
1197 #[doc = "The name that defines the particular context for the subsumption based closure table"]
1198 pub name: FHIRString,
1199 #[doc = "Concepts to add to the closure table"]
1200 pub concept: Option<Vec<Coding>>,
1201 #[doc = "A request to resynchronise - request to send all new entries since the nominated version was sent by the server"]
1202 pub version: Option<FHIRString>,
1203 }
1204 impl From<Input> for Resource {
1205 fn from(value: Input) -> Self {
1206 let parameters: Vec<ParametersParameter> = value.into();
1207 Resource::Parameters(Parameters {
1208 parameter: Some(parameters),
1209 ..Default::default()
1210 })
1211 }
1212 }
1213 #[derive(Debug, FromParameters)]
1214 pub struct Output {
1215 #[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"]
1216 #[parameter_rename = "return"]
1217 pub return_: ConceptMap,
1218 }
1219 impl From<Output> for Resource {
1220 fn from(value: Output) -> Self {
1221 Resource::ConceptMap(value.return_)
1222 }
1223 }
1224}
1225#[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"]
1226pub mod ConceptMapTranslate {
1227 use super::*;
1228 pub const CODE: &str = "translate";
1229 #[derive(Debug, FromParameters, ToParameters)]
1230 pub struct InputDependency {
1231 #[doc = "The element for this dependency"]
1232 pub element: Option<FHIRUri>,
1233 #[doc = "The value for this dependency"]
1234 pub concept: Option<CodeableConcept>,
1235 }
1236 impl From<InputDependency> for Resource {
1237 fn from(value: InputDependency) -> Self {
1238 let parameters: Vec<ParametersParameter> = value.into();
1239 Resource::Parameters(Parameters {
1240 parameter: Some(parameters),
1241 ..Default::default()
1242 })
1243 }
1244 }
1245 #[derive(Debug, FromParameters, ToParameters)]
1246 pub struct Input {
1247 #[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."]
1248 pub url: Option<FHIRUri>,
1249 #[doc = "The concept map is provided directly as part of the request. Servers may choose not to accept concept maps in this fashion."]
1250 pub conceptMap: Option<ConceptMap>,
1251 #[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."]
1252 pub conceptMapVersion: Option<FHIRString>,
1253 #[doc = "The code that is to be translated. If a code is provided, a system must be provided"]
1254 pub code: Option<FHIRCode>,
1255 #[doc = "The system for the code that is to be translated"]
1256 pub system: Option<FHIRUri>,
1257 #[doc = "The version of the system, if one was provided in the source data"]
1258 pub version: Option<FHIRString>,
1259 #[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"]
1260 pub source: Option<FHIRUri>,
1261 #[doc = "A coding to translate"]
1262 pub coding: Option<Coding>,
1263 #[doc = "A full codeableConcept to validate. The server can translate any of the coding values (e.g. existing translations) as it chooses"]
1264 pub codeableConcept: Option<CodeableConcept>,
1265 #[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"]
1266 pub target: Option<FHIRUri>,
1267 #[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"]
1268 pub targetsystem: Option<FHIRUri>,
1269 #[doc = "Another element that may help produce the correct mapping"]
1270 #[parameter_nested]
1271 pub dependency: Option<Vec<InputDependency>>,
1272 #[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"]
1273 pub reverse: Option<FHIRBoolean>,
1274 }
1275 impl From<Input> for Resource {
1276 fn from(value: Input) -> Self {
1277 let parameters: Vec<ParametersParameter> = value.into();
1278 Resource::Parameters(Parameters {
1279 parameter: Some(parameters),
1280 ..Default::default()
1281 })
1282 }
1283 }
1284 #[derive(Debug, FromParameters, ToParameters)]
1285 pub struct OutputMatchProduct {
1286 #[doc = "The element for this product"]
1287 pub element: Option<FHIRUri>,
1288 #[doc = "The value for this product"]
1289 pub concept: Option<Coding>,
1290 }
1291 impl From<OutputMatchProduct> for Resource {
1292 fn from(value: OutputMatchProduct) -> Self {
1293 let parameters: Vec<ParametersParameter> = value.into();
1294 Resource::Parameters(Parameters {
1295 parameter: Some(parameters),
1296 ..Default::default()
1297 })
1298 }
1299 }
1300 #[derive(Debug, FromParameters, ToParameters)]
1301 pub struct OutputMatch {
1302 #[doc = "A code indicating the equivalence of the translation, using values from [ConceptMapEquivalence](valueset-concept-map-equivalence.html)"]
1303 pub equivalence: Option<FHIRCode>,
1304 #[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)"]
1305 pub concept: Option<Coding>,
1306 #[doc = "Another element that is the product of this mapping"]
1307 #[parameter_nested]
1308 pub product: Option<Vec<OutputMatchProduct>>,
1309 #[doc = "The canonical reference to the concept map from which this mapping comes from"]
1310 pub source: Option<FHIRUri>,
1311 }
1312 impl From<OutputMatch> for Resource {
1313 fn from(value: OutputMatch) -> Self {
1314 let parameters: Vec<ParametersParameter> = value.into();
1315 Resource::Parameters(Parameters {
1316 parameter: Some(parameters),
1317 ..Default::default()
1318 })
1319 }
1320 }
1321 #[derive(Debug, FromParameters, ToParameters)]
1322 pub struct Output {
1323 #[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"]
1324 pub result: FHIRBoolean,
1325 #[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)"]
1326 pub message: Option<FHIRString>,
1327 #[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"]
1328 #[parameter_rename = "match"]
1329 #[parameter_nested]
1330 pub match_: Option<Vec<OutputMatch>>,
1331 }
1332 impl From<Output> for Resource {
1333 fn from(value: Output) -> Self {
1334 let parameters: Vec<ParametersParameter> = value.into();
1335 Resource::Parameters(Parameters {
1336 parameter: Some(parameters),
1337 ..Default::default()
1338 })
1339 }
1340 }
1341}
1342#[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."]
1343pub mod CoverageEligibilityRequestSubmit {
1344 use super::*;
1345 pub const CODE: &str = "submit";
1346 #[derive(Debug, FromParameters, ToParameters)]
1347 pub struct Input {
1348 #[doc = "An EligibilityRequest resource or Bundle of EligibilityRequests, either as individual EligibilityRequest resources or as Bundles each containing a single EligibilityRequest plus referenced resources."]
1349 pub resource: Resource,
1350 }
1351 impl From<Input> for Resource {
1352 fn from(value: Input) -> Self {
1353 let parameters: Vec<ParametersParameter> = value.into();
1354 Resource::Parameters(Parameters {
1355 parameter: Some(parameters),
1356 ..Default::default()
1357 })
1358 }
1359 }
1360 #[derive(Debug, FromParameters, ToParameters)]
1361 pub struct Output {
1362 #[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."]
1363 #[parameter_rename = "return"]
1364 pub return_: Resource,
1365 }
1366 impl From<Output> for Resource {
1367 fn from(value: Output) -> Self {
1368 let parameters: Vec<ParametersParameter> = value.into();
1369 Resource::Parameters(Parameters {
1370 parameter: Some(parameters),
1371 ..Default::default()
1372 })
1373 }
1374 }
1375}
1376#[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?)"]
1377pub mod EncounterEverything {
1378 use super::*;
1379 pub const CODE: &str = "everything";
1380 #[derive(Debug, FromParameters, ToParameters)]
1381 pub struct Input {
1382 #[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"]
1383 pub _since: Option<FHIRInstant>,
1384 #[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"]
1385 pub _type: Option<Vec<FHIRCode>>,
1386 #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1387 pub _count: Option<FHIRInteger>,
1388 }
1389 impl From<Input> for Resource {
1390 fn from(value: Input) -> Self {
1391 let parameters: Vec<ParametersParameter> = value.into();
1392 Resource::Parameters(Parameters {
1393 parameter: Some(parameters),
1394 ..Default::default()
1395 })
1396 }
1397 }
1398 #[derive(Debug, FromParameters)]
1399 pub struct Output {
1400 #[doc = "The bundle type is \"searchset\""]
1401 #[parameter_rename = "return"]
1402 pub return_: Bundle,
1403 }
1404 impl From<Output> for Resource {
1405 fn from(value: Output) -> Self {
1406 Resource::Bundle(value.return_)
1407 }
1408 }
1409}
1410#[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."]
1411pub mod GroupEverything {
1412 use super::*;
1413 pub const CODE: &str = "everything";
1414 #[derive(Debug, FromParameters, ToParameters)]
1415 pub struct Input {
1416 #[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."]
1417 pub start: Option<FHIRDate>,
1418 #[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."]
1419 pub end: Option<FHIRDate>,
1420 #[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"]
1421 pub _since: Option<FHIRInstant>,
1422 #[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"]
1423 pub _type: Option<Vec<FHIRCode>>,
1424 #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1425 pub _count: Option<FHIRInteger>,
1426 }
1427 impl From<Input> for Resource {
1428 fn from(value: Input) -> Self {
1429 let parameters: Vec<ParametersParameter> = value.into();
1430 Resource::Parameters(Parameters {
1431 parameter: Some(parameters),
1432 ..Default::default()
1433 })
1434 }
1435 }
1436 #[derive(Debug, FromParameters)]
1437 pub struct Output {
1438 #[doc = "The bundle type is \"searchset\""]
1439 #[parameter_rename = "return"]
1440 pub return_: Bundle,
1441 }
1442 impl From<Output> for Resource {
1443 fn from(value: Output) -> Self {
1444 Resource::Bundle(value.return_)
1445 }
1446 }
1447}
1448#[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"]
1449pub mod LibraryDataRequirements {
1450 use super::*;
1451 pub const CODE: &str = "data-requirements";
1452 #[derive(Debug, FromParameters, ToParameters)]
1453 pub struct Input {
1454 #[doc = "The target of the data requirements operation"]
1455 pub target: Option<FHIRString>,
1456 }
1457 impl From<Input> for Resource {
1458 fn from(value: Input) -> Self {
1459 let parameters: Vec<ParametersParameter> = value.into();
1460 Resource::Parameters(Parameters {
1461 parameter: Some(parameters),
1462 ..Default::default()
1463 })
1464 }
1465 }
1466 #[derive(Debug, FromParameters)]
1467 pub struct Output {
1468 #[doc = "The result of the requirements gathering"]
1469 #[parameter_rename = "return"]
1470 pub return_: Library,
1471 }
1472 impl From<Output> for Resource {
1473 fn from(value: Output) -> Self {
1474 Resource::Library(value.return_)
1475 }
1476 }
1477}
1478#[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)"]
1479pub mod ListFind {
1480 use super::*;
1481 pub const CODE: &str = "find";
1482 #[derive(Debug, FromParameters, ToParameters)]
1483 pub struct Input {
1484 #[doc = "The id of a patient resource located on the server on which this operation is executed"]
1485 pub patient: FHIRId,
1486 #[doc = "The code for the functional list that is being found"]
1487 pub name: FHIRCode,
1488 }
1489 impl From<Input> for Resource {
1490 fn from(value: Input) -> Self {
1491 let parameters: Vec<ParametersParameter> = value.into();
1492 Resource::Parameters(Parameters {
1493 parameter: Some(parameters),
1494 ..Default::default()
1495 })
1496 }
1497 }
1498 #[derive(Debug, FromParameters, ToParameters)]
1499 pub struct Output {}
1500 impl From<Output> for Resource {
1501 fn from(value: Output) -> Self {
1502 let parameters: Vec<ParametersParameter> = value.into();
1503 Resource::Parameters(Parameters {
1504 parameter: Some(parameters),
1505 ..Default::default()
1506 })
1507 }
1508 }
1509}
1510#[doc = "The care-gaps operation is used to determine gaps-in-care based on the results of quality measures"]
1511pub mod MeasureCareGaps {
1512 use super::*;
1513 pub const CODE: &str = "care-gaps";
1514 #[derive(Debug, FromParameters, ToParameters)]
1515 pub struct Input {
1516 #[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"]
1517 pub periodStart: FHIRDate,
1518 #[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"]
1519 pub periodEnd: FHIRDate,
1520 #[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"]
1521 pub topic: FHIRString,
1522 #[doc = "Subject for which the care gaps report will be produced"]
1523 pub subject: FHIRString,
1524 }
1525 impl From<Input> for Resource {
1526 fn from(value: Input) -> Self {
1527 let parameters: Vec<ParametersParameter> = value.into();
1528 Resource::Parameters(Parameters {
1529 parameter: Some(parameters),
1530 ..Default::default()
1531 })
1532 }
1533 }
1534 #[derive(Debug, FromParameters)]
1535 pub struct Output {
1536 #[doc = "The result of the care gaps report will be returned as a document bundle with a MeasureReport entry for each included measure"]
1537 #[parameter_rename = "return"]
1538 pub return_: Bundle,
1539 }
1540 impl From<Output> for Resource {
1541 fn from(value: Output) -> Self {
1542 Resource::Bundle(value.return_)
1543 }
1544 }
1545}
1546#[doc = "The collect-data operation is used to collect the data-of-interest for the given measure."]
1547pub mod MeasureCollectData {
1548 use super::*;
1549 pub const CODE: &str = "collect-data";
1550 #[derive(Debug, FromParameters, ToParameters)]
1551 pub struct Input {
1552 #[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"]
1553 pub periodStart: FHIRDate,
1554 #[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"]
1555 pub periodEnd: FHIRDate,
1556 #[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"]
1557 pub measure: Option<FHIRString>,
1558 #[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)"]
1559 pub subject: Option<FHIRString>,
1560 #[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"]
1561 pub practitioner: Option<FHIRString>,
1562 #[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"]
1563 pub lastReceivedOn: Option<FHIRDateTime>,
1564 }
1565 impl From<Input> for Resource {
1566 fn from(value: Input) -> Self {
1567 let parameters: Vec<ParametersParameter> = value.into();
1568 Resource::Parameters(Parameters {
1569 parameter: Some(parameters),
1570 ..Default::default()
1571 })
1572 }
1573 }
1574 #[derive(Debug, FromParameters, ToParameters)]
1575 pub struct Output {
1576 #[doc = "A MeasureReport of type data-collection detailing the results of the operation"]
1577 pub measureReport: MeasureReport,
1578 #[doc = "The result resources that make up the data-of-interest for the measure"]
1579 pub resource: Option<Vec<Resource>>,
1580 }
1581 impl From<Output> for Resource {
1582 fn from(value: Output) -> Self {
1583 let parameters: Vec<ParametersParameter> = value.into();
1584 Resource::Parameters(Parameters {
1585 parameter: Some(parameters),
1586 ..Default::default()
1587 })
1588 }
1589 }
1590}
1591#[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"]
1592pub mod MeasureDataRequirements {
1593 use super::*;
1594 pub const CODE: &str = "data-requirements";
1595 #[derive(Debug, FromParameters, ToParameters)]
1596 pub struct Input {
1597 #[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"]
1598 pub periodStart: FHIRDate,
1599 #[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"]
1600 pub periodEnd: FHIRDate,
1601 }
1602 impl From<Input> for Resource {
1603 fn from(value: Input) -> Self {
1604 let parameters: Vec<ParametersParameter> = value.into();
1605 Resource::Parameters(Parameters {
1606 parameter: Some(parameters),
1607 ..Default::default()
1608 })
1609 }
1610 }
1611 #[derive(Debug, FromParameters)]
1612 pub struct Output {
1613 #[doc = "The result of the requirements gathering is a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the measure"]
1614 #[parameter_rename = "return"]
1615 pub return_: Library,
1616 }
1617 impl From<Output> for Resource {
1618 fn from(value: Output) -> Self {
1619 Resource::Library(value.return_)
1620 }
1621 }
1622}
1623#[doc = "The evaluate-measure operation is used to calculate an eMeasure and obtain the results"]
1624pub mod MeasureEvaluateMeasure {
1625 use super::*;
1626 pub const CODE: &str = "evaluate-measure";
1627 #[derive(Debug, FromParameters, ToParameters)]
1628 pub struct Input {
1629 #[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"]
1630 pub periodStart: FHIRDate,
1631 #[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"]
1632 pub periodEnd: FHIRDate,
1633 #[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"]
1634 pub measure: Option<FHIRString>,
1635 #[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"]
1636 pub reportType: Option<FHIRCode>,
1637 #[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)"]
1638 pub subject: Option<FHIRString>,
1639 #[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"]
1640 pub practitioner: Option<FHIRString>,
1641 #[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"]
1642 pub lastReceivedOn: Option<FHIRDateTime>,
1643 }
1644 impl From<Input> for Resource {
1645 fn from(value: Input) -> Self {
1646 let parameters: Vec<ParametersParameter> = value.into();
1647 Resource::Parameters(Parameters {
1648 parameter: Some(parameters),
1649 ..Default::default()
1650 })
1651 }
1652 }
1653 #[derive(Debug, FromParameters)]
1654 pub struct Output {
1655 #[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"]
1656 #[parameter_rename = "return"]
1657 pub return_: MeasureReport,
1658 }
1659 impl From<Output> for Resource {
1660 fn from(value: Output) -> Self {
1661 Resource::MeasureReport(value.return_)
1662 }
1663 }
1664}
1665#[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"]
1666pub mod MeasureSubmitData {
1667 use super::*;
1668 pub const CODE: &str = "submit-data";
1669 #[derive(Debug, FromParameters, ToParameters)]
1670 pub struct Input {
1671 #[doc = "The measure report being submitted"]
1672 pub measureReport: MeasureReport,
1673 #[doc = "The individual resources that make up the data-of-interest being submitted"]
1674 pub resource: Option<Vec<Resource>>,
1675 }
1676 impl From<Input> for Resource {
1677 fn from(value: Input) -> Self {
1678 let parameters: Vec<ParametersParameter> = value.into();
1679 Resource::Parameters(Parameters {
1680 parameter: Some(parameters),
1681 ..Default::default()
1682 })
1683 }
1684 }
1685 #[derive(Debug, FromParameters, ToParameters)]
1686 pub struct Output {}
1687 impl From<Output> for Resource {
1688 fn from(value: Output) -> Self {
1689 let parameters: Vec<ParametersParameter> = value.into();
1690 Resource::Parameters(Parameters {
1691 parameter: Some(parameters),
1692 ..Default::default()
1693 })
1694 }
1695 }
1696}
1697#[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."]
1698pub mod MedicinalProductEverything {
1699 use super::*;
1700 pub const CODE: &str = "everything";
1701 #[derive(Debug, FromParameters, ToParameters)]
1702 pub struct Input {
1703 #[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"]
1704 pub _since: Option<FHIRInstant>,
1705 #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1706 pub _count: Option<FHIRInteger>,
1707 }
1708 impl From<Input> for Resource {
1709 fn from(value: Input) -> Self {
1710 let parameters: Vec<ParametersParameter> = value.into();
1711 Resource::Parameters(Parameters {
1712 parameter: Some(parameters),
1713 ..Default::default()
1714 })
1715 }
1716 }
1717 #[derive(Debug, FromParameters)]
1718 pub struct Output {
1719 #[doc = "The bundle type is \"searchset\""]
1720 #[parameter_rename = "return"]
1721 pub return_: Bundle,
1722 }
1723 impl From<Output> for Resource {
1724 fn from(value: Output) -> Self {
1725 Resource::Bundle(value.return_)
1726 }
1727 }
1728}
1729#[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."]
1730pub mod MessageHeaderProcessMessage {
1731 use super::*;
1732 pub const CODE: &str = "process-message";
1733 #[derive(Debug, FromParameters, ToParameters)]
1734 pub struct Input {
1735 #[doc = "The message to process (or, if using asynchronous messaging, it may be a response message to accept)"]
1736 pub content: Bundle,
1737 #[doc = "If 'true' the message is processed using the asynchronous messaging pattern"]
1738 #[parameter_rename = "async"]
1739 pub async_: Option<FHIRBoolean>,
1740 #[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"]
1741 #[parameter_rename = "response-url"]
1742 pub response_url: Option<FHIRUrl>,
1743 }
1744 impl From<Input> for Resource {
1745 fn from(value: Input) -> Self {
1746 let parameters: Vec<ParametersParameter> = value.into();
1747 Resource::Parameters(Parameters {
1748 parameter: Some(parameters),
1749 ..Default::default()
1750 })
1751 }
1752 }
1753 #[derive(Debug, FromParameters)]
1754 pub struct Output {
1755 #[doc = "A response message, if synchronous messaging is being used (mandatory in this case). For asynchronous messaging, there is no return value"]
1756 #[parameter_rename = "return"]
1757 pub return_: Option<Bundle>,
1758 }
1759 impl From<Output> for Resource {
1760 fn from(value: Output) -> Self {
1761 Resource::Bundle(value.return_.unwrap_or_default())
1762 }
1763 }
1764}
1765#[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."]
1766pub mod NamingSystemPreferredId {
1767 use super::*;
1768 pub const CODE: &str = "preferred-id";
1769 #[derive(Debug, FromParameters, ToParameters)]
1770 pub struct Input {
1771 #[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"]
1772 pub id: FHIRString,
1773 #[doc = ""]
1774 #[parameter_rename = "type"]
1775 pub type_: FHIRCode,
1776 }
1777 impl From<Input> for Resource {
1778 fn from(value: Input) -> Self {
1779 let parameters: Vec<ParametersParameter> = value.into();
1780 Resource::Parameters(Parameters {
1781 parameter: Some(parameters),
1782 ..Default::default()
1783 })
1784 }
1785 }
1786 #[derive(Debug, FromParameters, ToParameters)]
1787 pub struct Output {
1788 #[doc = "OIDs are return as plain OIDs (not the URI form)."]
1789 pub result: FHIRString,
1790 }
1791 impl From<Output> for Resource {
1792 fn from(value: Output) -> Self {
1793 let parameters: Vec<ParametersParameter> = value.into();
1794 Resource::Parameters(Parameters {
1795 parameter: Some(parameters),
1796 ..Default::default()
1797 })
1798 }
1799 }
1800}
1801#[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."]
1802pub mod ObservationLastn {
1803 use super::*;
1804 pub const CODE: &str = "lastn";
1805 #[derive(Debug, FromParameters, ToParameters)]
1806 pub struct Input {
1807 #[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."]
1808 pub max: Option<FHIRPositiveInt>,
1809 }
1810 impl From<Input> for Resource {
1811 fn from(value: Input) -> Self {
1812 let parameters: Vec<ParametersParameter> = value.into();
1813 Resource::Parameters(Parameters {
1814 parameter: Some(parameters),
1815 ..Default::default()
1816 })
1817 }
1818 }
1819 #[derive(Debug, FromParameters)]
1820 pub struct Output {
1821 #[doc = "The set of most recent N Observations that match the *lastn* query search criteria."]
1822 #[parameter_rename = "return"]
1823 pub return_: Bundle,
1824 }
1825 impl From<Output> for Resource {
1826 fn from(value: Output) -> Self {
1827 Resource::Bundle(value.return_)
1828 }
1829 }
1830}
1831#[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"]
1832pub mod ObservationStats {
1833 use super::*;
1834 pub const CODE: &str = "stats";
1835 #[derive(Debug, FromParameters, ToParameters)]
1836 pub struct Input {
1837 #[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"]
1838 pub subject: FHIRUri,
1839 #[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`."]
1840 pub code: Option<Vec<FHIRString>>,
1841 #[doc = "The system for the code(s). Or provide a coding instead"]
1842 pub system: Option<FHIRUri>,
1843 #[doc = "The test code upon which the statistics are being performed, as a Coding"]
1844 pub coding: Option<Vec<Coding>>,
1845 #[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"]
1846 pub duration: Option<FHIRDecimal>,
1847 #[doc = "The time period over which the calculations to be performed, if a duration is not provided"]
1848 pub period: Option<Period>,
1849 #[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)"]
1850 pub statistic: Vec<FHIRCode>,
1851 #[doc = "Whether to return the observations on which the statistics are based"]
1852 pub include: Option<FHIRBoolean>,
1853 #[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"]
1854 pub limit: Option<FHIRPositiveInt>,
1855 }
1856 impl From<Input> for Resource {
1857 fn from(value: Input) -> Self {
1858 let parameters: Vec<ParametersParameter> = value.into();
1859 Resource::Parameters(Parameters {
1860 parameter: Some(parameters),
1861 ..Default::default()
1862 })
1863 }
1864 }
1865 #[derive(Debug, FromParameters, ToParameters)]
1866 pub struct Output {
1867 #[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`."]
1868 pub statistics: Vec<Observation>,
1869 #[doc = "Source observations on which the statistics are based"]
1870 pub source: Option<Vec<Observation>>,
1871 }
1872 impl From<Output> for Resource {
1873 fn from(value: Output) -> Self {
1874 let parameters: Vec<ParametersParameter> = value.into();
1875 Resource::Parameters(Parameters {
1876 parameter: Some(parameters),
1877 ..Default::default()
1878 })
1879 }
1880 }
1881}
1882#[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."]
1883pub mod PatientEverything {
1884 use super::*;
1885 pub const CODE: &str = "everything";
1886 #[derive(Debug, FromParameters, ToParameters)]
1887 pub struct Input {
1888 #[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."]
1889 pub start: Option<FHIRDate>,
1890 #[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."]
1891 pub end: Option<FHIRDate>,
1892 #[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"]
1893 pub _since: Option<FHIRInstant>,
1894 #[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"]
1895 pub _type: Option<Vec<FHIRCode>>,
1896 #[doc = "See discussion below on the utility of paging through the results of the $everything operation"]
1897 pub _count: Option<FHIRInteger>,
1898 }
1899 impl From<Input> for Resource {
1900 fn from(value: Input) -> Self {
1901 let parameters: Vec<ParametersParameter> = value.into();
1902 Resource::Parameters(Parameters {
1903 parameter: Some(parameters),
1904 ..Default::default()
1905 })
1906 }
1907 }
1908 #[derive(Debug, FromParameters)]
1909 pub struct Output {
1910 #[doc = "The bundle type is \"searchset\""]
1911 #[parameter_rename = "return"]
1912 pub return_: Bundle,
1913 }
1914 impl From<Output> for Resource {
1915 fn from(value: Output) -> Self {
1916 Resource::Bundle(value.return_)
1917 }
1918 }
1919}
1920#[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."]
1921pub mod PatientMatch {
1922 use super::*;
1923 pub const CODE: &str = "match";
1924 #[derive(Debug, FromParameters, ToParameters)]
1925 pub struct Input {
1926 #[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)."]
1927 pub resource: Resource,
1928 #[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."]
1929 pub onlyCertainMatches: Option<FHIRBoolean>,
1930 #[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"]
1931 pub count: Option<FHIRInteger>,
1932 }
1933 impl From<Input> for Resource {
1934 fn from(value: Input) -> Self {
1935 let parameters: Vec<ParametersParameter> = value.into();
1936 Resource::Parameters(Parameters {
1937 parameter: Some(parameters),
1938 ..Default::default()
1939 })
1940 }
1941 }
1942 #[derive(Debug, FromParameters)]
1943 pub struct Output {
1944 #[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)"]
1945 #[parameter_rename = "return"]
1946 pub return_: Bundle,
1947 }
1948 impl From<Output> for Resource {
1949 fn from(value: Output) -> Self {
1950 Resource::Bundle(value.return_)
1951 }
1952 }
1953}
1954#[doc = "The apply operation applies a PlanDefinition to a given context"]
1955pub mod PlanDefinitionApply {
1956 use super::*;
1957 pub const CODE: &str = "apply";
1958 #[derive(Debug, FromParameters, ToParameters)]
1959 pub struct Input {
1960 #[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"]
1961 pub planDefinition: Option<PlanDefinition>,
1962 #[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"]
1963 pub subject: Vec<FHIRString>,
1964 #[doc = "The encounter in context, if any"]
1965 pub encounter: Option<FHIRString>,
1966 #[doc = "The practitioner applying the plan definition"]
1967 pub practitioner: Option<FHIRString>,
1968 #[doc = "The organization applying the plan definition"]
1969 pub organization: Option<FHIRString>,
1970 #[doc = "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)"]
1971 pub userType: Option<CodeableConcept>,
1972 #[doc = "Preferred language of the person using the system"]
1973 pub userLanguage: Option<CodeableConcept>,
1974 #[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"]
1975 pub userTaskContext: Option<CodeableConcept>,
1976 #[doc = "The current setting of the request (inpatient, outpatient, etc.)"]
1977 pub setting: Option<CodeableConcept>,
1978 #[doc = "Additional detail about the setting of the request, if any"]
1979 pub settingContext: Option<CodeableConcept>,
1980 }
1981 impl From<Input> for Resource {
1982 fn from(value: Input) -> Self {
1983 let parameters: Vec<ParametersParameter> = value.into();
1984 Resource::Parameters(Parameters {
1985 parameter: Some(parameters),
1986 ..Default::default()
1987 })
1988 }
1989 }
1990 #[derive(Debug, FromParameters)]
1991 pub struct Output {
1992 #[doc = "The CarePlan that is the result of applying the plan definition"]
1993 #[parameter_rename = "return"]
1994 pub return_: CarePlan,
1995 }
1996 impl From<Output> for Resource {
1997 fn from(value: Output) -> Self {
1998 Resource::CarePlan(value.return_)
1999 }
2000 }
2001}
2002#[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"]
2003pub mod PlanDefinitionDataRequirements {
2004 use super::*;
2005 pub const CODE: &str = "data-requirements";
2006 #[derive(Debug, FromParameters, ToParameters)]
2007 pub struct Input {}
2008 impl From<Input> for Resource {
2009 fn from(value: Input) -> Self {
2010 let parameters: Vec<ParametersParameter> = value.into();
2011 Resource::Parameters(Parameters {
2012 parameter: Some(parameters),
2013 ..Default::default()
2014 })
2015 }
2016 }
2017 #[derive(Debug, FromParameters)]
2018 pub struct Output {
2019 #[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"]
2020 #[parameter_rename = "return"]
2021 pub return_: Library,
2022 }
2023 impl From<Output> for Resource {
2024 fn from(value: Output) -> Self {
2025 Resource::Library(value.return_)
2026 }
2027 }
2028}
2029#[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)"]
2030pub mod ResourceConvert {
2031 use super::*;
2032 pub const CODE: &str = "convert";
2033 #[derive(Debug, FromParameters, ToParameters)]
2034 pub struct Input {
2035 #[doc = "The resource that is to be converted"]
2036 pub input: Resource,
2037 }
2038 impl From<Input> for Resource {
2039 fn from(value: Input) -> Self {
2040 let parameters: Vec<ParametersParameter> = value.into();
2041 Resource::Parameters(Parameters {
2042 parameter: Some(parameters),
2043 ..Default::default()
2044 })
2045 }
2046 }
2047 #[derive(Debug, FromParameters, ToParameters)]
2048 pub struct Output {
2049 #[doc = "The resource after conversion"]
2050 pub output: Resource,
2051 }
2052 impl From<Output> for Resource {
2053 fn from(value: Output) -> Self {
2054 let parameters: Vec<ParametersParameter> = value.into();
2055 Resource::Parameters(Parameters {
2056 parameter: Some(parameters),
2057 ..Default::default()
2058 })
2059 }
2060 }
2061}
2062#[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"]
2063pub mod ResourceGraph {
2064 use super::*;
2065 pub const CODE: &str = "graph";
2066 #[derive(Debug, FromParameters, ToParameters)]
2067 pub struct Input {
2068 #[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"]
2069 pub graph: FHIRUri,
2070 }
2071 impl From<Input> for Resource {
2072 fn from(value: Input) -> Self {
2073 let parameters: Vec<ParametersParameter> = value.into();
2074 Resource::Parameters(Parameters {
2075 parameter: Some(parameters),
2076 ..Default::default()
2077 })
2078 }
2079 }
2080 #[derive(Debug, FromParameters, ToParameters)]
2081 pub struct Output {
2082 #[doc = "The set of resources that were in the graph based on the provided definition"]
2083 pub result: Bundle,
2084 }
2085 impl From<Output> for Resource {
2086 fn from(value: Output) -> Self {
2087 let parameters: Vec<ParametersParameter> = value.into();
2088 Resource::Parameters(Parameters {
2089 parameter: Some(parameters),
2090 ..Default::default()
2091 })
2092 }
2093 }
2094}
2095#[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)"]
2096pub mod ResourceGraphql {
2097 use super::*;
2098 pub const CODE: &str = "graphql";
2099 #[derive(Debug, FromParameters, ToParameters)]
2100 pub struct Input {
2101 #[doc = ""]
2102 pub query: FHIRString,
2103 }
2104 impl From<Input> for Resource {
2105 fn from(value: Input) -> Self {
2106 let parameters: Vec<ParametersParameter> = value.into();
2107 Resource::Parameters(Parameters {
2108 parameter: Some(parameters),
2109 ..Default::default()
2110 })
2111 }
2112 }
2113 #[derive(Debug, FromParameters, ToParameters)]
2114 pub struct Output {
2115 #[doc = "The content is always returned as application/json; this SHOULD be specified in the Accept header"]
2116 pub result: Binary,
2117 }
2118 impl From<Output> for Resource {
2119 fn from(value: Output) -> Self {
2120 let parameters: Vec<ParametersParameter> = value.into();
2121 Resource::Parameters(Parameters {
2122 parameter: Some(parameters),
2123 ..Default::default()
2124 })
2125 }
2126 }
2127}
2128#[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)"]
2129pub mod ResourceMeta {
2130 use super::*;
2131 pub const CODE: &str = "meta";
2132 #[derive(Debug, FromParameters, ToParameters)]
2133 pub struct Input {}
2134 impl From<Input> for Resource {
2135 fn from(value: Input) -> Self {
2136 let parameters: Vec<ParametersParameter> = value.into();
2137 Resource::Parameters(Parameters {
2138 parameter: Some(parameters),
2139 ..Default::default()
2140 })
2141 }
2142 }
2143 #[derive(Debug, FromParameters, ToParameters)]
2144 pub struct Output {
2145 #[doc = "The meta returned by the operation"]
2146 #[parameter_rename = "return"]
2147 pub return_: Meta,
2148 }
2149 impl From<Output> for Resource {
2150 fn from(value: Output) -> Self {
2151 let parameters: Vec<ParametersParameter> = value.into();
2152 Resource::Parameters(Parameters {
2153 parameter: Some(parameters),
2154 ..Default::default()
2155 })
2156 }
2157 }
2158}
2159#[doc = "This operation takes a meta, and adds the profiles, tags, and security labels found in it to the nominated resource"]
2160pub mod ResourceMetaAdd {
2161 use super::*;
2162 pub const CODE: &str = "meta-add";
2163 #[derive(Debug, FromParameters, ToParameters)]
2164 pub struct Input {
2165 #[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"]
2166 pub meta: Meta,
2167 }
2168 impl From<Input> for Resource {
2169 fn from(value: Input) -> Self {
2170 let parameters: Vec<ParametersParameter> = value.into();
2171 Resource::Parameters(Parameters {
2172 parameter: Some(parameters),
2173 ..Default::default()
2174 })
2175 }
2176 }
2177 #[derive(Debug, FromParameters, ToParameters)]
2178 pub struct Output {
2179 #[doc = "Resulting meta for the resource"]
2180 #[parameter_rename = "return"]
2181 pub return_: Meta,
2182 }
2183 impl From<Output> for Resource {
2184 fn from(value: Output) -> Self {
2185 let parameters: Vec<ParametersParameter> = value.into();
2186 Resource::Parameters(Parameters {
2187 parameter: Some(parameters),
2188 ..Default::default()
2189 })
2190 }
2191 }
2192}
2193#[doc = "This operation takes a meta, and deletes the profiles, tags, and security labels found in it from the nominated resource"]
2194pub mod ResourceMetaDelete {
2195 use super::*;
2196 pub const CODE: &str = "meta-delete";
2197 #[derive(Debug, FromParameters, ToParameters)]
2198 pub struct Input {
2199 #[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"]
2200 pub meta: Meta,
2201 }
2202 impl From<Input> for Resource {
2203 fn from(value: Input) -> Self {
2204 let parameters: Vec<ParametersParameter> = value.into();
2205 Resource::Parameters(Parameters {
2206 parameter: Some(parameters),
2207 ..Default::default()
2208 })
2209 }
2210 }
2211 #[derive(Debug, FromParameters, ToParameters)]
2212 pub struct Output {
2213 #[doc = "Resulting meta for the resource"]
2214 #[parameter_rename = "return"]
2215 pub return_: Meta,
2216 }
2217 impl From<Output> for Resource {
2218 fn from(value: Output) -> Self {
2219 let parameters: Vec<ParametersParameter> = value.into();
2220 Resource::Parameters(Parameters {
2221 parameter: Some(parameters),
2222 ..Default::default()
2223 })
2224 }
2225 }
2226}
2227#[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."]
2228pub mod ResourceValidate {
2229 use super::*;
2230 pub const CODE: &str = "validate";
2231 #[derive(Debug, FromParameters, ToParameters)]
2232 pub struct Input {
2233 #[doc = "Must be present unless the mode is \"delete\""]
2234 pub resource: Option<Resource>,
2235 #[doc = "Default is 'no action'; (e.g. general validation)"]
2236 pub mode: Option<FHIRCode>,
2237 #[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"]
2238 pub profile: Option<FHIRUri>,
2239 }
2240 impl From<Input> for Resource {
2241 fn from(value: Input) -> Self {
2242 let parameters: Vec<ParametersParameter> = value.into();
2243 Resource::Parameters(Parameters {
2244 parameter: Some(parameters),
2245 ..Default::default()
2246 })
2247 }
2248 }
2249 #[derive(Debug, FromParameters)]
2250 pub struct Output {
2251 #[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)"]
2252 #[parameter_rename = "return"]
2253 pub return_: OperationOutcome,
2254 }
2255 impl From<Output> for Resource {
2256 fn from(value: Output) -> Self {
2257 Resource::OperationOutcome(value.return_)
2258 }
2259 }
2260}
2261#[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."]
2262pub mod StructureDefinitionQuestionnaire {
2263 use super::*;
2264 pub const CODE: &str = "questionnaire";
2265 #[derive(Debug, FromParameters, ToParameters)]
2266 pub struct Input {
2267 #[doc = "A logical identifier (i.e. 'StructureDefinition.identifier''). The server must know the StructureDefinition or be able to retrieve it from other known repositories."]
2268 #[parameter_rename = "identifier"]
2269 pub identifier_: Option<FHIRCanonical>,
2270 #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2271 pub profile: Option<FHIRString>,
2272 #[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."]
2273 pub url: Option<FHIRCanonical>,
2274 #[doc = "If true, the questionnaire will only include those elements marked as \"mustSupport='true'\" in the StructureDefinition."]
2275 pub supportedOnly: Option<FHIRBoolean>,
2276 }
2277 impl From<Input> for Resource {
2278 fn from(value: Input) -> Self {
2279 let parameters: Vec<ParametersParameter> = value.into();
2280 Resource::Parameters(Parameters {
2281 parameter: Some(parameters),
2282 ..Default::default()
2283 })
2284 }
2285 }
2286 #[derive(Debug, FromParameters)]
2287 pub struct Output {
2288 #[doc = "The questionnaire form generated based on the StructureDefinition."]
2289 #[parameter_rename = "return"]
2290 pub return_: Questionnaire,
2291 }
2292 impl From<Output> for Resource {
2293 fn from(value: Output) -> Self {
2294 Resource::Questionnaire(value.return_)
2295 }
2296 }
2297}
2298#[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."]
2299pub mod StructureDefinitionSnapshot {
2300 use super::*;
2301 pub const CODE: &str = "snapshot";
2302 #[derive(Debug, FromParameters, ToParameters)]
2303 pub struct Input {
2304 #[doc = "The [StructureDefinition](structuredefinition.html) is provided directly as part of the request. Servers may choose not to accept profiles in this fashion"]
2305 pub definition: Option<StructureDefinition>,
2306 #[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."]
2307 pub url: Option<FHIRString>,
2308 }
2309 impl From<Input> for Resource {
2310 fn from(value: Input) -> Self {
2311 let parameters: Vec<ParametersParameter> = value.into();
2312 Resource::Parameters(Parameters {
2313 parameter: Some(parameters),
2314 ..Default::default()
2315 })
2316 }
2317 }
2318 #[derive(Debug, FromParameters)]
2319 pub struct Output {
2320 #[doc = "The structure definition with a snapshot"]
2321 #[parameter_rename = "return"]
2322 pub return_: StructureDefinition,
2323 }
2324 impl From<Output> for Resource {
2325 fn from(value: Output) -> Self {
2326 Resource::StructureDefinition(value.return_)
2327 }
2328 }
2329}
2330#[doc = "The transform operation takes input content, applies a structure map transform, and then returns the output."]
2331pub mod StructureMapTransform {
2332 use super::*;
2333 pub const CODE: &str = "transform";
2334 #[derive(Debug, FromParameters, ToParameters)]
2335 pub struct Input {
2336 #[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"]
2337 pub source: Option<FHIRUri>,
2338 #[doc = "The logical content to transform"]
2339 pub content: Resource,
2340 }
2341 impl From<Input> for Resource {
2342 fn from(value: Input) -> Self {
2343 let parameters: Vec<ParametersParameter> = value.into();
2344 Resource::Parameters(Parameters {
2345 parameter: Some(parameters),
2346 ..Default::default()
2347 })
2348 }
2349 }
2350 #[derive(Debug, FromParameters, ToParameters)]
2351 pub struct Output {
2352 #[doc = "The result of the transform"]
2353 #[parameter_rename = "return"]
2354 pub return_: Resource,
2355 }
2356 impl From<Output> for Resource {
2357 fn from(value: Output) -> Self {
2358 let parameters: Vec<ParametersParameter> = value.into();
2359 Resource::Parameters(Parameters {
2360 parameter: Some(parameters),
2361 ..Default::default()
2362 })
2363 }
2364 }
2365}
2366#[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."]
2367pub mod ValueSetExpand {
2368 use super::*;
2369 pub const CODE: &str = "expand";
2370 #[derive(Debug, FromParameters, ToParameters)]
2371 pub struct Input {
2372 #[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"]
2373 pub url: Option<FHIRUri>,
2374 #[doc = "The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion"]
2375 pub valueSet: Option<ValueSet>,
2376 #[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."]
2377 pub valueSetVersion: Option<FHIRString>,
2378 #[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"]
2379 pub context: Option<FHIRUri>,
2380 #[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)"]
2381 pub contextDirection: Option<FHIRCode>,
2382 #[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"]
2383 pub filter: Option<FHIRString>,
2384 #[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."]
2385 pub date: Option<FHIRDateTime>,
2386 #[doc = "Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)"]
2387 pub offset: Option<FHIRInteger>,
2388 #[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"]
2389 pub count: Option<FHIRInteger>,
2390 #[doc = "Controls whether concept designations are to be included or excluded in value set expansions"]
2391 pub includeDesignations: Option<FHIRBoolean>,
2392 #[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"]
2393 pub designation: Option<Vec<FHIRString>>,
2394 #[doc = "Controls whether the value set definition is included or excluded in value set expansions"]
2395 pub includeDefinition: Option<FHIRBoolean>,
2396 #[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"]
2397 pub activeOnly: Option<FHIRBoolean>,
2398 #[doc = "Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains)"]
2399 pub excludeNested: Option<FHIRBoolean>,
2400 #[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."]
2401 pub excludeNotForUI: Option<FHIRBoolean>,
2402 #[doc = "Controls whether or not the value set expansion includes post coordinated codes"]
2403 pub excludePostCoordinated: Option<FHIRBoolean>,
2404 #[doc = "Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display"]
2405 pub displayLanguage: Option<FHIRCode>,
2406 #[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"]
2407 #[parameter_rename = "exclude-system"]
2408 pub exclude_system: Option<Vec<FHIRCanonical>>,
2409 #[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"]
2410 #[parameter_rename = "system-version"]
2411 pub system_version: Option<Vec<FHIRCanonical>>,
2412 #[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"]
2413 #[parameter_rename = "check-system-version"]
2414 pub check_system_version: Option<Vec<FHIRCanonical>>,
2415 #[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"]
2416 #[parameter_rename = "force-system-version"]
2417 pub force_system_version: Option<Vec<FHIRCanonical>>,
2418 }
2419 impl From<Input> for Resource {
2420 fn from(value: Input) -> Self {
2421 let parameters: Vec<ParametersParameter> = value.into();
2422 Resource::Parameters(Parameters {
2423 parameter: Some(parameters),
2424 ..Default::default()
2425 })
2426 }
2427 }
2428 #[derive(Debug, FromParameters)]
2429 pub struct Output {
2430 #[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"]
2431 #[parameter_rename = "return"]
2432 pub return_: ValueSet,
2433 }
2434 impl From<Output> for Resource {
2435 fn from(value: Output) -> Self {
2436 Resource::ValueSet(value.return_)
2437 }
2438 }
2439}
2440#[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"]
2441pub mod ValueSetValidateCode {
2442 use super::*;
2443 pub const CODE: &str = "validate-code";
2444 #[derive(Debug, FromParameters, ToParameters)]
2445 pub struct Input {
2446 #[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"]
2447 pub url: Option<FHIRUri>,
2448 #[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"]
2449 pub context: Option<FHIRUri>,
2450 #[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"]
2451 pub valueSet: Option<ValueSet>,
2452 #[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."]
2453 pub valueSetVersion: Option<FHIRString>,
2454 #[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)"]
2455 pub code: Option<FHIRCode>,
2456 #[doc = "The system for the code that is to be validated"]
2457 pub system: Option<FHIRUri>,
2458 #[doc = "The version of the system, if one was provided in the source data"]
2459 pub systemVersion: Option<FHIRString>,
2460 #[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"]
2461 pub display: Option<FHIRString>,
2462 #[doc = "A coding to validate"]
2463 pub coding: Option<Coding>,
2464 #[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"]
2465 pub codeableConcept: Option<CodeableConcept>,
2466 #[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."]
2467 pub date: Option<FHIRDateTime>,
2468 #[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."]
2469 #[parameter_rename = "abstract"]
2470 pub abstract_: Option<FHIRBoolean>,
2471 #[doc = "Specifies the language to be used for description when validating the display property"]
2472 pub displayLanguage: Option<FHIRCode>,
2473 }
2474 impl From<Input> for Resource {
2475 fn from(value: Input) -> Self {
2476 let parameters: Vec<ParametersParameter> = value.into();
2477 Resource::Parameters(Parameters {
2478 parameter: Some(parameters),
2479 ..Default::default()
2480 })
2481 }
2482 }
2483 #[derive(Debug, FromParameters, ToParameters)]
2484 pub struct Output {
2485 #[doc = "True if the concept details supplied are valid"]
2486 pub result: FHIRBoolean,
2487 #[doc = "Error details, if result = false. If this is provided when result = true, the message carries hints and warnings"]
2488 pub message: Option<FHIRString>,
2489 #[doc = "A valid display for the concept if the system wishes to display this to a user"]
2490 pub display: Option<FHIRString>,
2491 }
2492 impl From<Output> for Resource {
2493 fn from(value: Output) -> Self {
2494 let parameters: Vec<ParametersParameter> = value.into();
2495 Resource::Parameters(Parameters {
2496 parameter: Some(parameters),
2497 ..Default::default()
2498 })
2499 }
2500 }
2501}