001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". 047 */ 048@ResourceDef(name="RequestGroup", profile="http://hl7.org/fhir/StructureDefinition/RequestGroup") 049public class RequestGroup extends DomainResource { 050 051 public enum RequestStatus { 052 /** 053 * The request has been created but is not yet complete or ready for action. 054 */ 055 DRAFT, 056 /** 057 * The request is in force and ready to be acted upon. 058 */ 059 ACTIVE, 060 /** 061 * The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future. 062 */ 063 ONHOLD, 064 /** 065 * The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur. 066 */ 067 REVOKED, 068 /** 069 * The activity described by the request has been fully performed. No further activity will occur. 070 */ 071 COMPLETED, 072 /** 073 * This request should never have existed and should be considered 'void'. (It is possible that real-world decisions were based on it. If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). 074 */ 075 ENTEREDINERROR, 076 /** 077 * The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. 078 */ 079 UNKNOWN, 080 /** 081 * added to help the parsers with the generic types 082 */ 083 NULL; 084 public static RequestStatus fromCode(String codeString) throws FHIRException { 085 if (codeString == null || "".equals(codeString)) 086 return null; 087 if ("draft".equals(codeString)) 088 return DRAFT; 089 if ("active".equals(codeString)) 090 return ACTIVE; 091 if ("on-hold".equals(codeString)) 092 return ONHOLD; 093 if ("revoked".equals(codeString)) 094 return REVOKED; 095 if ("completed".equals(codeString)) 096 return COMPLETED; 097 if ("entered-in-error".equals(codeString)) 098 return ENTEREDINERROR; 099 if ("unknown".equals(codeString)) 100 return UNKNOWN; 101 if (Configuration.isAcceptInvalidEnums()) 102 return null; 103 else 104 throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); 105 } 106 public String toCode() { 107 switch (this) { 108 case DRAFT: return "draft"; 109 case ACTIVE: return "active"; 110 case ONHOLD: return "on-hold"; 111 case REVOKED: return "revoked"; 112 case COMPLETED: return "completed"; 113 case ENTEREDINERROR: return "entered-in-error"; 114 case UNKNOWN: return "unknown"; 115 default: return "?"; 116 } 117 } 118 public String getSystem() { 119 switch (this) { 120 case DRAFT: return "http://hl7.org/fhir/request-status"; 121 case ACTIVE: return "http://hl7.org/fhir/request-status"; 122 case ONHOLD: return "http://hl7.org/fhir/request-status"; 123 case REVOKED: return "http://hl7.org/fhir/request-status"; 124 case COMPLETED: return "http://hl7.org/fhir/request-status"; 125 case ENTEREDINERROR: return "http://hl7.org/fhir/request-status"; 126 case UNKNOWN: return "http://hl7.org/fhir/request-status"; 127 default: return "?"; 128 } 129 } 130 public String getDefinition() { 131 switch (this) { 132 case DRAFT: return "The request has been created but is not yet complete or ready for action."; 133 case ACTIVE: return "The request is in force and ready to be acted upon."; 134 case ONHOLD: return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future."; 135 case REVOKED: return "The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur."; 136 case COMPLETED: return "The activity described by the request has been fully performed. No further activity will occur."; 137 case ENTEREDINERROR: return "This request should never have existed and should be considered 'void'. (It is possible that real-world decisions were based on it. If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)."; 138 case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; 139 default: return "?"; 140 } 141 } 142 public String getDisplay() { 143 switch (this) { 144 case DRAFT: return "Draft"; 145 case ACTIVE: return "Active"; 146 case ONHOLD: return "On Hold"; 147 case REVOKED: return "Revoked"; 148 case COMPLETED: return "Completed"; 149 case ENTEREDINERROR: return "Entered in Error"; 150 case UNKNOWN: return "Unknown"; 151 default: return "?"; 152 } 153 } 154 } 155 156 public static class RequestStatusEnumFactory implements EnumFactory<RequestStatus> { 157 public RequestStatus fromCode(String codeString) throws IllegalArgumentException { 158 if (codeString == null || "".equals(codeString)) 159 if (codeString == null || "".equals(codeString)) 160 return null; 161 if ("draft".equals(codeString)) 162 return RequestStatus.DRAFT; 163 if ("active".equals(codeString)) 164 return RequestStatus.ACTIVE; 165 if ("on-hold".equals(codeString)) 166 return RequestStatus.ONHOLD; 167 if ("revoked".equals(codeString)) 168 return RequestStatus.REVOKED; 169 if ("completed".equals(codeString)) 170 return RequestStatus.COMPLETED; 171 if ("entered-in-error".equals(codeString)) 172 return RequestStatus.ENTEREDINERROR; 173 if ("unknown".equals(codeString)) 174 return RequestStatus.UNKNOWN; 175 throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'"); 176 } 177 public Enumeration<RequestStatus> fromType(Base code) throws FHIRException { 178 if (code == null) 179 return null; 180 if (code.isEmpty()) 181 return new Enumeration<RequestStatus>(this); 182 String codeString = ((PrimitiveType) code).asStringValue(); 183 if (codeString == null || "".equals(codeString)) 184 return null; 185 if ("draft".equals(codeString)) 186 return new Enumeration<RequestStatus>(this, RequestStatus.DRAFT); 187 if ("active".equals(codeString)) 188 return new Enumeration<RequestStatus>(this, RequestStatus.ACTIVE); 189 if ("on-hold".equals(codeString)) 190 return new Enumeration<RequestStatus>(this, RequestStatus.ONHOLD); 191 if ("revoked".equals(codeString)) 192 return new Enumeration<RequestStatus>(this, RequestStatus.REVOKED); 193 if ("completed".equals(codeString)) 194 return new Enumeration<RequestStatus>(this, RequestStatus.COMPLETED); 195 if ("entered-in-error".equals(codeString)) 196 return new Enumeration<RequestStatus>(this, RequestStatus.ENTEREDINERROR); 197 if ("unknown".equals(codeString)) 198 return new Enumeration<RequestStatus>(this, RequestStatus.UNKNOWN); 199 throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); 200 } 201 public String toCode(RequestStatus code) { 202 if (code == RequestStatus.DRAFT) 203 return "draft"; 204 if (code == RequestStatus.ACTIVE) 205 return "active"; 206 if (code == RequestStatus.ONHOLD) 207 return "on-hold"; 208 if (code == RequestStatus.REVOKED) 209 return "revoked"; 210 if (code == RequestStatus.COMPLETED) 211 return "completed"; 212 if (code == RequestStatus.ENTEREDINERROR) 213 return "entered-in-error"; 214 if (code == RequestStatus.UNKNOWN) 215 return "unknown"; 216 return "?"; 217 } 218 public String toSystem(RequestStatus code) { 219 return code.getSystem(); 220 } 221 } 222 223 public enum RequestIntent { 224 /** 225 * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act. 226 */ 227 PROPOSAL, 228 /** 229 * The request represents an intention to ensure something occurs without providing an authorization for others to act. 230 */ 231 PLAN, 232 /** 233 * The request represents a legally binding instruction authored by a Patient or RelatedPerson. 234 */ 235 DIRECTIVE, 236 /** 237 * The request represents a request/demand and authorization for action by a Practitioner. 238 */ 239 ORDER, 240 /** 241 * The request represents an original authorization for action. 242 */ 243 ORIGINALORDER, 244 /** 245 * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization. 246 */ 247 REFLEXORDER, 248 /** 249 * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order. 250 */ 251 FILLERORDER, 252 /** 253 * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug. 254 */ 255 INSTANCEORDER, 256 /** 257 * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used. 258 */ 259 OPTION, 260 /** 261 * added to help the parsers with the generic types 262 */ 263 NULL; 264 public static RequestIntent fromCode(String codeString) throws FHIRException { 265 if (codeString == null || "".equals(codeString)) 266 return null; 267 if ("proposal".equals(codeString)) 268 return PROPOSAL; 269 if ("plan".equals(codeString)) 270 return PLAN; 271 if ("directive".equals(codeString)) 272 return DIRECTIVE; 273 if ("order".equals(codeString)) 274 return ORDER; 275 if ("original-order".equals(codeString)) 276 return ORIGINALORDER; 277 if ("reflex-order".equals(codeString)) 278 return REFLEXORDER; 279 if ("filler-order".equals(codeString)) 280 return FILLERORDER; 281 if ("instance-order".equals(codeString)) 282 return INSTANCEORDER; 283 if ("option".equals(codeString)) 284 return OPTION; 285 if (Configuration.isAcceptInvalidEnums()) 286 return null; 287 else 288 throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); 289 } 290 public String toCode() { 291 switch (this) { 292 case PROPOSAL: return "proposal"; 293 case PLAN: return "plan"; 294 case DIRECTIVE: return "directive"; 295 case ORDER: return "order"; 296 case ORIGINALORDER: return "original-order"; 297 case REFLEXORDER: return "reflex-order"; 298 case FILLERORDER: return "filler-order"; 299 case INSTANCEORDER: return "instance-order"; 300 case OPTION: return "option"; 301 default: return "?"; 302 } 303 } 304 public String getSystem() { 305 switch (this) { 306 case PROPOSAL: return "http://hl7.org/fhir/request-intent"; 307 case PLAN: return "http://hl7.org/fhir/request-intent"; 308 case DIRECTIVE: return "http://hl7.org/fhir/request-intent"; 309 case ORDER: return "http://hl7.org/fhir/request-intent"; 310 case ORIGINALORDER: return "http://hl7.org/fhir/request-intent"; 311 case REFLEXORDER: return "http://hl7.org/fhir/request-intent"; 312 case FILLERORDER: return "http://hl7.org/fhir/request-intent"; 313 case INSTANCEORDER: return "http://hl7.org/fhir/request-intent"; 314 case OPTION: return "http://hl7.org/fhir/request-intent"; 315 default: return "?"; 316 } 317 } 318 public String getDefinition() { 319 switch (this) { 320 case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act."; 321 case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act."; 322 case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson."; 323 case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner."; 324 case ORIGINALORDER: return "The request represents an original authorization for action."; 325 case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization."; 326 case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order."; 327 case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug."; 328 case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used."; 329 default: return "?"; 330 } 331 } 332 public String getDisplay() { 333 switch (this) { 334 case PROPOSAL: return "Proposal"; 335 case PLAN: return "Plan"; 336 case DIRECTIVE: return "Directive"; 337 case ORDER: return "Order"; 338 case ORIGINALORDER: return "Original Order"; 339 case REFLEXORDER: return "Reflex Order"; 340 case FILLERORDER: return "Filler Order"; 341 case INSTANCEORDER: return "Instance Order"; 342 case OPTION: return "Option"; 343 default: return "?"; 344 } 345 } 346 } 347 348 public static class RequestIntentEnumFactory implements EnumFactory<RequestIntent> { 349 public RequestIntent fromCode(String codeString) throws IllegalArgumentException { 350 if (codeString == null || "".equals(codeString)) 351 if (codeString == null || "".equals(codeString)) 352 return null; 353 if ("proposal".equals(codeString)) 354 return RequestIntent.PROPOSAL; 355 if ("plan".equals(codeString)) 356 return RequestIntent.PLAN; 357 if ("directive".equals(codeString)) 358 return RequestIntent.DIRECTIVE; 359 if ("order".equals(codeString)) 360 return RequestIntent.ORDER; 361 if ("original-order".equals(codeString)) 362 return RequestIntent.ORIGINALORDER; 363 if ("reflex-order".equals(codeString)) 364 return RequestIntent.REFLEXORDER; 365 if ("filler-order".equals(codeString)) 366 return RequestIntent.FILLERORDER; 367 if ("instance-order".equals(codeString)) 368 return RequestIntent.INSTANCEORDER; 369 if ("option".equals(codeString)) 370 return RequestIntent.OPTION; 371 throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'"); 372 } 373 public Enumeration<RequestIntent> fromType(Base code) throws FHIRException { 374 if (code == null) 375 return null; 376 if (code.isEmpty()) 377 return new Enumeration<RequestIntent>(this); 378 String codeString = ((PrimitiveType) code).asStringValue(); 379 if (codeString == null || "".equals(codeString)) 380 return null; 381 if ("proposal".equals(codeString)) 382 return new Enumeration<RequestIntent>(this, RequestIntent.PROPOSAL); 383 if ("plan".equals(codeString)) 384 return new Enumeration<RequestIntent>(this, RequestIntent.PLAN); 385 if ("directive".equals(codeString)) 386 return new Enumeration<RequestIntent>(this, RequestIntent.DIRECTIVE); 387 if ("order".equals(codeString)) 388 return new Enumeration<RequestIntent>(this, RequestIntent.ORDER); 389 if ("original-order".equals(codeString)) 390 return new Enumeration<RequestIntent>(this, RequestIntent.ORIGINALORDER); 391 if ("reflex-order".equals(codeString)) 392 return new Enumeration<RequestIntent>(this, RequestIntent.REFLEXORDER); 393 if ("filler-order".equals(codeString)) 394 return new Enumeration<RequestIntent>(this, RequestIntent.FILLERORDER); 395 if ("instance-order".equals(codeString)) 396 return new Enumeration<RequestIntent>(this, RequestIntent.INSTANCEORDER); 397 if ("option".equals(codeString)) 398 return new Enumeration<RequestIntent>(this, RequestIntent.OPTION); 399 throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); 400 } 401 public String toCode(RequestIntent code) { 402 if (code == RequestIntent.PROPOSAL) 403 return "proposal"; 404 if (code == RequestIntent.PLAN) 405 return "plan"; 406 if (code == RequestIntent.DIRECTIVE) 407 return "directive"; 408 if (code == RequestIntent.ORDER) 409 return "order"; 410 if (code == RequestIntent.ORIGINALORDER) 411 return "original-order"; 412 if (code == RequestIntent.REFLEXORDER) 413 return "reflex-order"; 414 if (code == RequestIntent.FILLERORDER) 415 return "filler-order"; 416 if (code == RequestIntent.INSTANCEORDER) 417 return "instance-order"; 418 if (code == RequestIntent.OPTION) 419 return "option"; 420 return "?"; 421 } 422 public String toSystem(RequestIntent code) { 423 return code.getSystem(); 424 } 425 } 426 427 public enum RequestPriority { 428 /** 429 * The request has normal priority. 430 */ 431 ROUTINE, 432 /** 433 * The request should be actioned promptly - higher priority than routine. 434 */ 435 URGENT, 436 /** 437 * The request should be actioned as soon as possible - higher priority than urgent. 438 */ 439 ASAP, 440 /** 441 * The request should be actioned immediately - highest possible priority. E.g. an emergency. 442 */ 443 STAT, 444 /** 445 * added to help the parsers with the generic types 446 */ 447 NULL; 448 public static RequestPriority fromCode(String codeString) throws FHIRException { 449 if (codeString == null || "".equals(codeString)) 450 return null; 451 if ("routine".equals(codeString)) 452 return ROUTINE; 453 if ("urgent".equals(codeString)) 454 return URGENT; 455 if ("asap".equals(codeString)) 456 return ASAP; 457 if ("stat".equals(codeString)) 458 return STAT; 459 if (Configuration.isAcceptInvalidEnums()) 460 return null; 461 else 462 throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); 463 } 464 public String toCode() { 465 switch (this) { 466 case ROUTINE: return "routine"; 467 case URGENT: return "urgent"; 468 case ASAP: return "asap"; 469 case STAT: return "stat"; 470 default: return "?"; 471 } 472 } 473 public String getSystem() { 474 switch (this) { 475 case ROUTINE: return "http://hl7.org/fhir/request-priority"; 476 case URGENT: return "http://hl7.org/fhir/request-priority"; 477 case ASAP: return "http://hl7.org/fhir/request-priority"; 478 case STAT: return "http://hl7.org/fhir/request-priority"; 479 default: return "?"; 480 } 481 } 482 public String getDefinition() { 483 switch (this) { 484 case ROUTINE: return "The request has normal priority."; 485 case URGENT: return "The request should be actioned promptly - higher priority than routine."; 486 case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent."; 487 case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency."; 488 default: return "?"; 489 } 490 } 491 public String getDisplay() { 492 switch (this) { 493 case ROUTINE: return "Routine"; 494 case URGENT: return "Urgent"; 495 case ASAP: return "ASAP"; 496 case STAT: return "STAT"; 497 default: return "?"; 498 } 499 } 500 } 501 502 public static class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> { 503 public RequestPriority fromCode(String codeString) throws IllegalArgumentException { 504 if (codeString == null || "".equals(codeString)) 505 if (codeString == null || "".equals(codeString)) 506 return null; 507 if ("routine".equals(codeString)) 508 return RequestPriority.ROUTINE; 509 if ("urgent".equals(codeString)) 510 return RequestPriority.URGENT; 511 if ("asap".equals(codeString)) 512 return RequestPriority.ASAP; 513 if ("stat".equals(codeString)) 514 return RequestPriority.STAT; 515 throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'"); 516 } 517 public Enumeration<RequestPriority> fromType(Base code) throws FHIRException { 518 if (code == null) 519 return null; 520 if (code.isEmpty()) 521 return new Enumeration<RequestPriority>(this); 522 String codeString = ((PrimitiveType) code).asStringValue(); 523 if (codeString == null || "".equals(codeString)) 524 return null; 525 if ("routine".equals(codeString)) 526 return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE); 527 if ("urgent".equals(codeString)) 528 return new Enumeration<RequestPriority>(this, RequestPriority.URGENT); 529 if ("asap".equals(codeString)) 530 return new Enumeration<RequestPriority>(this, RequestPriority.ASAP); 531 if ("stat".equals(codeString)) 532 return new Enumeration<RequestPriority>(this, RequestPriority.STAT); 533 throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); 534 } 535 public String toCode(RequestPriority code) { 536 if (code == RequestPriority.ROUTINE) 537 return "routine"; 538 if (code == RequestPriority.URGENT) 539 return "urgent"; 540 if (code == RequestPriority.ASAP) 541 return "asap"; 542 if (code == RequestPriority.STAT) 543 return "stat"; 544 return "?"; 545 } 546 public String toSystem(RequestPriority code) { 547 return code.getSystem(); 548 } 549 } 550 551 public enum ActionConditionKind { 552 /** 553 * The condition describes whether or not a given action is applicable. 554 */ 555 APPLICABILITY, 556 /** 557 * The condition is a starting condition for the action. 558 */ 559 START, 560 /** 561 * The condition is a stop, or exit condition for the action. 562 */ 563 STOP, 564 /** 565 * added to help the parsers with the generic types 566 */ 567 NULL; 568 public static ActionConditionKind fromCode(String codeString) throws FHIRException { 569 if (codeString == null || "".equals(codeString)) 570 return null; 571 if ("applicability".equals(codeString)) 572 return APPLICABILITY; 573 if ("start".equals(codeString)) 574 return START; 575 if ("stop".equals(codeString)) 576 return STOP; 577 if (Configuration.isAcceptInvalidEnums()) 578 return null; 579 else 580 throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); 581 } 582 public String toCode() { 583 switch (this) { 584 case APPLICABILITY: return "applicability"; 585 case START: return "start"; 586 case STOP: return "stop"; 587 default: return "?"; 588 } 589 } 590 public String getSystem() { 591 switch (this) { 592 case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind"; 593 case START: return "http://hl7.org/fhir/action-condition-kind"; 594 case STOP: return "http://hl7.org/fhir/action-condition-kind"; 595 default: return "?"; 596 } 597 } 598 public String getDefinition() { 599 switch (this) { 600 case APPLICABILITY: return "The condition describes whether or not a given action is applicable."; 601 case START: return "The condition is a starting condition for the action."; 602 case STOP: return "The condition is a stop, or exit condition for the action."; 603 default: return "?"; 604 } 605 } 606 public String getDisplay() { 607 switch (this) { 608 case APPLICABILITY: return "Applicability"; 609 case START: return "Start"; 610 case STOP: return "Stop"; 611 default: return "?"; 612 } 613 } 614 } 615 616 public static class ActionConditionKindEnumFactory implements EnumFactory<ActionConditionKind> { 617 public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException { 618 if (codeString == null || "".equals(codeString)) 619 if (codeString == null || "".equals(codeString)) 620 return null; 621 if ("applicability".equals(codeString)) 622 return ActionConditionKind.APPLICABILITY; 623 if ("start".equals(codeString)) 624 return ActionConditionKind.START; 625 if ("stop".equals(codeString)) 626 return ActionConditionKind.STOP; 627 throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'"); 628 } 629 public Enumeration<ActionConditionKind> fromType(Base code) throws FHIRException { 630 if (code == null) 631 return null; 632 if (code.isEmpty()) 633 return new Enumeration<ActionConditionKind>(this); 634 String codeString = ((PrimitiveType) code).asStringValue(); 635 if (codeString == null || "".equals(codeString)) 636 return null; 637 if ("applicability".equals(codeString)) 638 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.APPLICABILITY); 639 if ("start".equals(codeString)) 640 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.START); 641 if ("stop".equals(codeString)) 642 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.STOP); 643 throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); 644 } 645 public String toCode(ActionConditionKind code) { 646 if (code == ActionConditionKind.APPLICABILITY) 647 return "applicability"; 648 if (code == ActionConditionKind.START) 649 return "start"; 650 if (code == ActionConditionKind.STOP) 651 return "stop"; 652 return "?"; 653 } 654 public String toSystem(ActionConditionKind code) { 655 return code.getSystem(); 656 } 657 } 658 659 public enum ActionRelationshipType { 660 /** 661 * The action must be performed before the start of the related action. 662 */ 663 BEFORESTART, 664 /** 665 * The action must be performed before the related action. 666 */ 667 BEFORE, 668 /** 669 * The action must be performed before the end of the related action. 670 */ 671 BEFOREEND, 672 /** 673 * The action must be performed concurrent with the start of the related action. 674 */ 675 CONCURRENTWITHSTART, 676 /** 677 * The action must be performed concurrent with the related action. 678 */ 679 CONCURRENT, 680 /** 681 * The action must be performed concurrent with the end of the related action. 682 */ 683 CONCURRENTWITHEND, 684 /** 685 * The action must be performed after the start of the related action. 686 */ 687 AFTERSTART, 688 /** 689 * The action must be performed after the related action. 690 */ 691 AFTER, 692 /** 693 * The action must be performed after the end of the related action. 694 */ 695 AFTEREND, 696 /** 697 * added to help the parsers with the generic types 698 */ 699 NULL; 700 public static ActionRelationshipType fromCode(String codeString) throws FHIRException { 701 if (codeString == null || "".equals(codeString)) 702 return null; 703 if ("before-start".equals(codeString)) 704 return BEFORESTART; 705 if ("before".equals(codeString)) 706 return BEFORE; 707 if ("before-end".equals(codeString)) 708 return BEFOREEND; 709 if ("concurrent-with-start".equals(codeString)) 710 return CONCURRENTWITHSTART; 711 if ("concurrent".equals(codeString)) 712 return CONCURRENT; 713 if ("concurrent-with-end".equals(codeString)) 714 return CONCURRENTWITHEND; 715 if ("after-start".equals(codeString)) 716 return AFTERSTART; 717 if ("after".equals(codeString)) 718 return AFTER; 719 if ("after-end".equals(codeString)) 720 return AFTEREND; 721 if (Configuration.isAcceptInvalidEnums()) 722 return null; 723 else 724 throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); 725 } 726 public String toCode() { 727 switch (this) { 728 case BEFORESTART: return "before-start"; 729 case BEFORE: return "before"; 730 case BEFOREEND: return "before-end"; 731 case CONCURRENTWITHSTART: return "concurrent-with-start"; 732 case CONCURRENT: return "concurrent"; 733 case CONCURRENTWITHEND: return "concurrent-with-end"; 734 case AFTERSTART: return "after-start"; 735 case AFTER: return "after"; 736 case AFTEREND: return "after-end"; 737 default: return "?"; 738 } 739 } 740 public String getSystem() { 741 switch (this) { 742 case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type"; 743 case BEFORE: return "http://hl7.org/fhir/action-relationship-type"; 744 case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type"; 745 case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type"; 746 case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type"; 747 case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type"; 748 case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type"; 749 case AFTER: return "http://hl7.org/fhir/action-relationship-type"; 750 case AFTEREND: return "http://hl7.org/fhir/action-relationship-type"; 751 default: return "?"; 752 } 753 } 754 public String getDefinition() { 755 switch (this) { 756 case BEFORESTART: return "The action must be performed before the start of the related action."; 757 case BEFORE: return "The action must be performed before the related action."; 758 case BEFOREEND: return "The action must be performed before the end of the related action."; 759 case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action."; 760 case CONCURRENT: return "The action must be performed concurrent with the related action."; 761 case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action."; 762 case AFTERSTART: return "The action must be performed after the start of the related action."; 763 case AFTER: return "The action must be performed after the related action."; 764 case AFTEREND: return "The action must be performed after the end of the related action."; 765 default: return "?"; 766 } 767 } 768 public String getDisplay() { 769 switch (this) { 770 case BEFORESTART: return "Before Start"; 771 case BEFORE: return "Before"; 772 case BEFOREEND: return "Before End"; 773 case CONCURRENTWITHSTART: return "Concurrent With Start"; 774 case CONCURRENT: return "Concurrent"; 775 case CONCURRENTWITHEND: return "Concurrent With End"; 776 case AFTERSTART: return "After Start"; 777 case AFTER: return "After"; 778 case AFTEREND: return "After End"; 779 default: return "?"; 780 } 781 } 782 } 783 784 public static class ActionRelationshipTypeEnumFactory implements EnumFactory<ActionRelationshipType> { 785 public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException { 786 if (codeString == null || "".equals(codeString)) 787 if (codeString == null || "".equals(codeString)) 788 return null; 789 if ("before-start".equals(codeString)) 790 return ActionRelationshipType.BEFORESTART; 791 if ("before".equals(codeString)) 792 return ActionRelationshipType.BEFORE; 793 if ("before-end".equals(codeString)) 794 return ActionRelationshipType.BEFOREEND; 795 if ("concurrent-with-start".equals(codeString)) 796 return ActionRelationshipType.CONCURRENTWITHSTART; 797 if ("concurrent".equals(codeString)) 798 return ActionRelationshipType.CONCURRENT; 799 if ("concurrent-with-end".equals(codeString)) 800 return ActionRelationshipType.CONCURRENTWITHEND; 801 if ("after-start".equals(codeString)) 802 return ActionRelationshipType.AFTERSTART; 803 if ("after".equals(codeString)) 804 return ActionRelationshipType.AFTER; 805 if ("after-end".equals(codeString)) 806 return ActionRelationshipType.AFTEREND; 807 throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'"); 808 } 809 public Enumeration<ActionRelationshipType> fromType(Base code) throws FHIRException { 810 if (code == null) 811 return null; 812 if (code.isEmpty()) 813 return new Enumeration<ActionRelationshipType>(this); 814 String codeString = ((PrimitiveType) code).asStringValue(); 815 if (codeString == null || "".equals(codeString)) 816 return null; 817 if ("before-start".equals(codeString)) 818 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORESTART); 819 if ("before".equals(codeString)) 820 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORE); 821 if ("before-end".equals(codeString)) 822 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFOREEND); 823 if ("concurrent-with-start".equals(codeString)) 824 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHSTART); 825 if ("concurrent".equals(codeString)) 826 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENT); 827 if ("concurrent-with-end".equals(codeString)) 828 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHEND); 829 if ("after-start".equals(codeString)) 830 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTERSTART); 831 if ("after".equals(codeString)) 832 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTER); 833 if ("after-end".equals(codeString)) 834 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTEREND); 835 throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); 836 } 837 public String toCode(ActionRelationshipType code) { 838 if (code == ActionRelationshipType.BEFORESTART) 839 return "before-start"; 840 if (code == ActionRelationshipType.BEFORE) 841 return "before"; 842 if (code == ActionRelationshipType.BEFOREEND) 843 return "before-end"; 844 if (code == ActionRelationshipType.CONCURRENTWITHSTART) 845 return "concurrent-with-start"; 846 if (code == ActionRelationshipType.CONCURRENT) 847 return "concurrent"; 848 if (code == ActionRelationshipType.CONCURRENTWITHEND) 849 return "concurrent-with-end"; 850 if (code == ActionRelationshipType.AFTERSTART) 851 return "after-start"; 852 if (code == ActionRelationshipType.AFTER) 853 return "after"; 854 if (code == ActionRelationshipType.AFTEREND) 855 return "after-end"; 856 return "?"; 857 } 858 public String toSystem(ActionRelationshipType code) { 859 return code.getSystem(); 860 } 861 } 862 863 public enum ActionGroupingBehavior { 864 /** 865 * Any group marked with this behavior should be displayed as a visual group to the end user. 866 */ 867 VISUALGROUP, 868 /** 869 * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so. 870 */ 871 LOGICALGROUP, 872 /** 873 * A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne". 874 */ 875 SENTENCEGROUP, 876 /** 877 * added to help the parsers with the generic types 878 */ 879 NULL; 880 public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException { 881 if (codeString == null || "".equals(codeString)) 882 return null; 883 if ("visual-group".equals(codeString)) 884 return VISUALGROUP; 885 if ("logical-group".equals(codeString)) 886 return LOGICALGROUP; 887 if ("sentence-group".equals(codeString)) 888 return SENTENCEGROUP; 889 if (Configuration.isAcceptInvalidEnums()) 890 return null; 891 else 892 throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 893 } 894 public String toCode() { 895 switch (this) { 896 case VISUALGROUP: return "visual-group"; 897 case LOGICALGROUP: return "logical-group"; 898 case SENTENCEGROUP: return "sentence-group"; 899 default: return "?"; 900 } 901 } 902 public String getSystem() { 903 switch (this) { 904 case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 905 case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 906 case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 907 default: return "?"; 908 } 909 } 910 public String getDefinition() { 911 switch (this) { 912 case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user."; 913 case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so."; 914 case SENTENCEGROUP: return "A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required action, in which case, it would be \"ExactlyOne\"."; 915 default: return "?"; 916 } 917 } 918 public String getDisplay() { 919 switch (this) { 920 case VISUALGROUP: return "Visual Group"; 921 case LOGICALGROUP: return "Logical Group"; 922 case SENTENCEGROUP: return "Sentence Group"; 923 default: return "?"; 924 } 925 } 926 } 927 928 public static class ActionGroupingBehaviorEnumFactory implements EnumFactory<ActionGroupingBehavior> { 929 public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException { 930 if (codeString == null || "".equals(codeString)) 931 if (codeString == null || "".equals(codeString)) 932 return null; 933 if ("visual-group".equals(codeString)) 934 return ActionGroupingBehavior.VISUALGROUP; 935 if ("logical-group".equals(codeString)) 936 return ActionGroupingBehavior.LOGICALGROUP; 937 if ("sentence-group".equals(codeString)) 938 return ActionGroupingBehavior.SENTENCEGROUP; 939 throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 940 } 941 public Enumeration<ActionGroupingBehavior> fromType(Base code) throws FHIRException { 942 if (code == null) 943 return null; 944 if (code.isEmpty()) 945 return new Enumeration<ActionGroupingBehavior>(this); 946 String codeString = ((PrimitiveType) code).asStringValue(); 947 if (codeString == null || "".equals(codeString)) 948 return null; 949 if ("visual-group".equals(codeString)) 950 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.VISUALGROUP); 951 if ("logical-group".equals(codeString)) 952 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.LOGICALGROUP); 953 if ("sentence-group".equals(codeString)) 954 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.SENTENCEGROUP); 955 throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 956 } 957 public String toCode(ActionGroupingBehavior code) { 958 if (code == ActionGroupingBehavior.VISUALGROUP) 959 return "visual-group"; 960 if (code == ActionGroupingBehavior.LOGICALGROUP) 961 return "logical-group"; 962 if (code == ActionGroupingBehavior.SENTENCEGROUP) 963 return "sentence-group"; 964 return "?"; 965 } 966 public String toSystem(ActionGroupingBehavior code) { 967 return code.getSystem(); 968 } 969 } 970 971 public enum ActionSelectionBehavior { 972 /** 973 * Any number of the actions in the group may be chosen, from zero to all. 974 */ 975 ANY, 976 /** 977 * All the actions in the group must be selected as a single unit. 978 */ 979 ALL, 980 /** 981 * All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected. 982 */ 983 ALLORNONE, 984 /** 985 * The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group. 986 */ 987 EXACTLYONE, 988 /** 989 * The end user may choose zero or at most one of the actions in the group. 990 */ 991 ATMOSTONE, 992 /** 993 * The end user must choose a minimum of one, and as many additional as desired. 994 */ 995 ONEORMORE, 996 /** 997 * added to help the parsers with the generic types 998 */ 999 NULL; 1000 public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException { 1001 if (codeString == null || "".equals(codeString)) 1002 return null; 1003 if ("any".equals(codeString)) 1004 return ANY; 1005 if ("all".equals(codeString)) 1006 return ALL; 1007 if ("all-or-none".equals(codeString)) 1008 return ALLORNONE; 1009 if ("exactly-one".equals(codeString)) 1010 return EXACTLYONE; 1011 if ("at-most-one".equals(codeString)) 1012 return ATMOSTONE; 1013 if ("one-or-more".equals(codeString)) 1014 return ONEORMORE; 1015 if (Configuration.isAcceptInvalidEnums()) 1016 return null; 1017 else 1018 throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 1019 } 1020 public String toCode() { 1021 switch (this) { 1022 case ANY: return "any"; 1023 case ALL: return "all"; 1024 case ALLORNONE: return "all-or-none"; 1025 case EXACTLYONE: return "exactly-one"; 1026 case ATMOSTONE: return "at-most-one"; 1027 case ONEORMORE: return "one-or-more"; 1028 default: return "?"; 1029 } 1030 } 1031 public String getSystem() { 1032 switch (this) { 1033 case ANY: return "http://hl7.org/fhir/action-selection-behavior"; 1034 case ALL: return "http://hl7.org/fhir/action-selection-behavior"; 1035 case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior"; 1036 case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior"; 1037 case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior"; 1038 case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior"; 1039 default: return "?"; 1040 } 1041 } 1042 public String getDefinition() { 1043 switch (this) { 1044 case ANY: return "Any number of the actions in the group may be chosen, from zero to all."; 1045 case ALL: return "All the actions in the group must be selected as a single unit."; 1046 case ALLORNONE: return "All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected."; 1047 case EXACTLYONE: return "The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group."; 1048 case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group."; 1049 case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired."; 1050 default: return "?"; 1051 } 1052 } 1053 public String getDisplay() { 1054 switch (this) { 1055 case ANY: return "Any"; 1056 case ALL: return "All"; 1057 case ALLORNONE: return "All Or None"; 1058 case EXACTLYONE: return "Exactly One"; 1059 case ATMOSTONE: return "At Most One"; 1060 case ONEORMORE: return "One Or More"; 1061 default: return "?"; 1062 } 1063 } 1064 } 1065 1066 public static class ActionSelectionBehaviorEnumFactory implements EnumFactory<ActionSelectionBehavior> { 1067 public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException { 1068 if (codeString == null || "".equals(codeString)) 1069 if (codeString == null || "".equals(codeString)) 1070 return null; 1071 if ("any".equals(codeString)) 1072 return ActionSelectionBehavior.ANY; 1073 if ("all".equals(codeString)) 1074 return ActionSelectionBehavior.ALL; 1075 if ("all-or-none".equals(codeString)) 1076 return ActionSelectionBehavior.ALLORNONE; 1077 if ("exactly-one".equals(codeString)) 1078 return ActionSelectionBehavior.EXACTLYONE; 1079 if ("at-most-one".equals(codeString)) 1080 return ActionSelectionBehavior.ATMOSTONE; 1081 if ("one-or-more".equals(codeString)) 1082 return ActionSelectionBehavior.ONEORMORE; 1083 throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 1084 } 1085 public Enumeration<ActionSelectionBehavior> fromType(Base code) throws FHIRException { 1086 if (code == null) 1087 return null; 1088 if (code.isEmpty()) 1089 return new Enumeration<ActionSelectionBehavior>(this); 1090 String codeString = ((PrimitiveType) code).asStringValue(); 1091 if (codeString == null || "".equals(codeString)) 1092 return null; 1093 if ("any".equals(codeString)) 1094 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ANY); 1095 if ("all".equals(codeString)) 1096 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALL); 1097 if ("all-or-none".equals(codeString)) 1098 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALLORNONE); 1099 if ("exactly-one".equals(codeString)) 1100 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.EXACTLYONE); 1101 if ("at-most-one".equals(codeString)) 1102 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ATMOSTONE); 1103 if ("one-or-more".equals(codeString)) 1104 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ONEORMORE); 1105 throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 1106 } 1107 public String toCode(ActionSelectionBehavior code) { 1108 if (code == ActionSelectionBehavior.ANY) 1109 return "any"; 1110 if (code == ActionSelectionBehavior.ALL) 1111 return "all"; 1112 if (code == ActionSelectionBehavior.ALLORNONE) 1113 return "all-or-none"; 1114 if (code == ActionSelectionBehavior.EXACTLYONE) 1115 return "exactly-one"; 1116 if (code == ActionSelectionBehavior.ATMOSTONE) 1117 return "at-most-one"; 1118 if (code == ActionSelectionBehavior.ONEORMORE) 1119 return "one-or-more"; 1120 return "?"; 1121 } 1122 public String toSystem(ActionSelectionBehavior code) { 1123 return code.getSystem(); 1124 } 1125 } 1126 1127 public enum ActionRequiredBehavior { 1128 /** 1129 * An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action. 1130 */ 1131 MUST, 1132 /** 1133 * An action with this behavior may be included in the set of actions processed by the end user. 1134 */ 1135 COULD, 1136 /** 1137 * An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included. 1138 */ 1139 MUSTUNLESSDOCUMENTED, 1140 /** 1141 * added to help the parsers with the generic types 1142 */ 1143 NULL; 1144 public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException { 1145 if (codeString == null || "".equals(codeString)) 1146 return null; 1147 if ("must".equals(codeString)) 1148 return MUST; 1149 if ("could".equals(codeString)) 1150 return COULD; 1151 if ("must-unless-documented".equals(codeString)) 1152 return MUSTUNLESSDOCUMENTED; 1153 if (Configuration.isAcceptInvalidEnums()) 1154 return null; 1155 else 1156 throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 1157 } 1158 public String toCode() { 1159 switch (this) { 1160 case MUST: return "must"; 1161 case COULD: return "could"; 1162 case MUSTUNLESSDOCUMENTED: return "must-unless-documented"; 1163 default: return "?"; 1164 } 1165 } 1166 public String getSystem() { 1167 switch (this) { 1168 case MUST: return "http://hl7.org/fhir/action-required-behavior"; 1169 case COULD: return "http://hl7.org/fhir/action-required-behavior"; 1170 case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior"; 1171 default: return "?"; 1172 } 1173 } 1174 public String getDefinition() { 1175 switch (this) { 1176 case MUST: return "An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action."; 1177 case COULD: return "An action with this behavior may be included in the set of actions processed by the end user."; 1178 case MUSTUNLESSDOCUMENTED: return "An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included."; 1179 default: return "?"; 1180 } 1181 } 1182 public String getDisplay() { 1183 switch (this) { 1184 case MUST: return "Must"; 1185 case COULD: return "Could"; 1186 case MUSTUNLESSDOCUMENTED: return "Must Unless Documented"; 1187 default: return "?"; 1188 } 1189 } 1190 } 1191 1192 public static class ActionRequiredBehaviorEnumFactory implements EnumFactory<ActionRequiredBehavior> { 1193 public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException { 1194 if (codeString == null || "".equals(codeString)) 1195 if (codeString == null || "".equals(codeString)) 1196 return null; 1197 if ("must".equals(codeString)) 1198 return ActionRequiredBehavior.MUST; 1199 if ("could".equals(codeString)) 1200 return ActionRequiredBehavior.COULD; 1201 if ("must-unless-documented".equals(codeString)) 1202 return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; 1203 throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 1204 } 1205 public Enumeration<ActionRequiredBehavior> fromType(Base code) throws FHIRException { 1206 if (code == null) 1207 return null; 1208 if (code.isEmpty()) 1209 return new Enumeration<ActionRequiredBehavior>(this); 1210 String codeString = ((PrimitiveType) code).asStringValue(); 1211 if (codeString == null || "".equals(codeString)) 1212 return null; 1213 if ("must".equals(codeString)) 1214 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUST); 1215 if ("could".equals(codeString)) 1216 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.COULD); 1217 if ("must-unless-documented".equals(codeString)) 1218 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED); 1219 throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 1220 } 1221 public String toCode(ActionRequiredBehavior code) { 1222 if (code == ActionRequiredBehavior.MUST) 1223 return "must"; 1224 if (code == ActionRequiredBehavior.COULD) 1225 return "could"; 1226 if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) 1227 return "must-unless-documented"; 1228 return "?"; 1229 } 1230 public String toSystem(ActionRequiredBehavior code) { 1231 return code.getSystem(); 1232 } 1233 } 1234 1235 public enum ActionPrecheckBehavior { 1236 /** 1237 * An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user. 1238 */ 1239 YES, 1240 /** 1241 * An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action. 1242 */ 1243 NO, 1244 /** 1245 * added to help the parsers with the generic types 1246 */ 1247 NULL; 1248 public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException { 1249 if (codeString == null || "".equals(codeString)) 1250 return null; 1251 if ("yes".equals(codeString)) 1252 return YES; 1253 if ("no".equals(codeString)) 1254 return NO; 1255 if (Configuration.isAcceptInvalidEnums()) 1256 return null; 1257 else 1258 throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1259 } 1260 public String toCode() { 1261 switch (this) { 1262 case YES: return "yes"; 1263 case NO: return "no"; 1264 default: return "?"; 1265 } 1266 } 1267 public String getSystem() { 1268 switch (this) { 1269 case YES: return "http://hl7.org/fhir/action-precheck-behavior"; 1270 case NO: return "http://hl7.org/fhir/action-precheck-behavior"; 1271 default: return "?"; 1272 } 1273 } 1274 public String getDefinition() { 1275 switch (this) { 1276 case YES: return "An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider \"pre-checking\" such an action as a convenience for the user."; 1277 case NO: return "An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not \"pre-check\" such an action."; 1278 default: return "?"; 1279 } 1280 } 1281 public String getDisplay() { 1282 switch (this) { 1283 case YES: return "Yes"; 1284 case NO: return "No"; 1285 default: return "?"; 1286 } 1287 } 1288 } 1289 1290 public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory<ActionPrecheckBehavior> { 1291 public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException { 1292 if (codeString == null || "".equals(codeString)) 1293 if (codeString == null || "".equals(codeString)) 1294 return null; 1295 if ("yes".equals(codeString)) 1296 return ActionPrecheckBehavior.YES; 1297 if ("no".equals(codeString)) 1298 return ActionPrecheckBehavior.NO; 1299 throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1300 } 1301 public Enumeration<ActionPrecheckBehavior> fromType(Base code) throws FHIRException { 1302 if (code == null) 1303 return null; 1304 if (code.isEmpty()) 1305 return new Enumeration<ActionPrecheckBehavior>(this); 1306 String codeString = ((PrimitiveType) code).asStringValue(); 1307 if (codeString == null || "".equals(codeString)) 1308 return null; 1309 if ("yes".equals(codeString)) 1310 return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.YES); 1311 if ("no".equals(codeString)) 1312 return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.NO); 1313 throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1314 } 1315 public String toCode(ActionPrecheckBehavior code) { 1316 if (code == ActionPrecheckBehavior.YES) 1317 return "yes"; 1318 if (code == ActionPrecheckBehavior.NO) 1319 return "no"; 1320 return "?"; 1321 } 1322 public String toSystem(ActionPrecheckBehavior code) { 1323 return code.getSystem(); 1324 } 1325 } 1326 1327 public enum ActionCardinalityBehavior { 1328 /** 1329 * The action may only be selected one time. 1330 */ 1331 SINGLE, 1332 /** 1333 * The action may be selected multiple times. 1334 */ 1335 MULTIPLE, 1336 /** 1337 * added to help the parsers with the generic types 1338 */ 1339 NULL; 1340 public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException { 1341 if (codeString == null || "".equals(codeString)) 1342 return null; 1343 if ("single".equals(codeString)) 1344 return SINGLE; 1345 if ("multiple".equals(codeString)) 1346 return MULTIPLE; 1347 if (Configuration.isAcceptInvalidEnums()) 1348 return null; 1349 else 1350 throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1351 } 1352 public String toCode() { 1353 switch (this) { 1354 case SINGLE: return "single"; 1355 case MULTIPLE: return "multiple"; 1356 default: return "?"; 1357 } 1358 } 1359 public String getSystem() { 1360 switch (this) { 1361 case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior"; 1362 case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior"; 1363 default: return "?"; 1364 } 1365 } 1366 public String getDefinition() { 1367 switch (this) { 1368 case SINGLE: return "The action may only be selected one time."; 1369 case MULTIPLE: return "The action may be selected multiple times."; 1370 default: return "?"; 1371 } 1372 } 1373 public String getDisplay() { 1374 switch (this) { 1375 case SINGLE: return "Single"; 1376 case MULTIPLE: return "Multiple"; 1377 default: return "?"; 1378 } 1379 } 1380 } 1381 1382 public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory<ActionCardinalityBehavior> { 1383 public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException { 1384 if (codeString == null || "".equals(codeString)) 1385 if (codeString == null || "".equals(codeString)) 1386 return null; 1387 if ("single".equals(codeString)) 1388 return ActionCardinalityBehavior.SINGLE; 1389 if ("multiple".equals(codeString)) 1390 return ActionCardinalityBehavior.MULTIPLE; 1391 throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1392 } 1393 public Enumeration<ActionCardinalityBehavior> fromType(Base code) throws FHIRException { 1394 if (code == null) 1395 return null; 1396 if (code.isEmpty()) 1397 return new Enumeration<ActionCardinalityBehavior>(this); 1398 String codeString = ((PrimitiveType) code).asStringValue(); 1399 if (codeString == null || "".equals(codeString)) 1400 return null; 1401 if ("single".equals(codeString)) 1402 return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.SINGLE); 1403 if ("multiple".equals(codeString)) 1404 return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.MULTIPLE); 1405 throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1406 } 1407 public String toCode(ActionCardinalityBehavior code) { 1408 if (code == ActionCardinalityBehavior.SINGLE) 1409 return "single"; 1410 if (code == ActionCardinalityBehavior.MULTIPLE) 1411 return "multiple"; 1412 return "?"; 1413 } 1414 public String toSystem(ActionCardinalityBehavior code) { 1415 return code.getSystem(); 1416 } 1417 } 1418 1419 @Block() 1420 public static class RequestGroupActionComponent extends BackboneElement implements IBaseBackboneElement { 1421 /** 1422 * A user-visible prefix for the action. 1423 */ 1424 @Child(name = "prefix", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1425 @Description(shortDefinition="User-visible prefix for the action (e.g. 1. or A.)", formalDefinition="A user-visible prefix for the action." ) 1426 protected StringType prefix; 1427 1428 /** 1429 * The title of the action displayed to a user. 1430 */ 1431 @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1432 @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." ) 1433 protected StringType title; 1434 1435 /** 1436 * A short description of the action used to provide a summary to display to the user. 1437 */ 1438 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1439 @Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." ) 1440 protected StringType description; 1441 1442 /** 1443 * A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 1444 */ 1445 @Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 1446 @Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically." ) 1447 protected StringType textEquivalent; 1448 1449 /** 1450 * Indicates how quickly the action should be addressed with respect to other actions. 1451 */ 1452 @Child(name = "priority", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1453 @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the action should be addressed with respect to other actions." ) 1454 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 1455 protected Enumeration<RequestPriority> priority; 1456 1457 /** 1458 * A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template. 1459 */ 1460 @Child(name = "code", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1461 @Description(shortDefinition="Code representing the meaning of the action or sub-actions", formalDefinition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template." ) 1462 protected List<CodeableConcept> code; 1463 1464 /** 1465 * Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources. 1466 */ 1467 @Child(name = "documentation", type = {RelatedArtifact.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1468 @Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." ) 1469 protected List<RelatedArtifact> documentation; 1470 1471 /** 1472 * An expression that describes applicability criteria, or start/stop conditions for the action. 1473 */ 1474 @Child(name = "condition", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1475 @Description(shortDefinition="Whether or not the action is applicable", formalDefinition="An expression that describes applicability criteria, or start/stop conditions for the action." ) 1476 protected List<RequestGroupActionConditionComponent> condition; 1477 1478 /** 1479 * A relationship to another action such as "before" or "30-60 minutes after start of". 1480 */ 1481 @Child(name = "relatedAction", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1482 @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." ) 1483 protected List<RequestGroupActionRelatedActionComponent> relatedAction; 1484 1485 /** 1486 * An optional value describing when the action should be performed. 1487 */ 1488 @Child(name = "timing", type = {DateTimeType.class, Age.class, Period.class, Duration.class, Range.class, Timing.class}, order=10, min=0, max=1, modifier=false, summary=false) 1489 @Description(shortDefinition="When the action should take place", formalDefinition="An optional value describing when the action should be performed." ) 1490 protected Type timing; 1491 1492 /** 1493 * The participant that should perform or be responsible for this action. 1494 */ 1495 @Child(name = "participant", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1496 @Description(shortDefinition="Who should perform the action", formalDefinition="The participant that should perform or be responsible for this action." ) 1497 protected List<Reference> participant; 1498 /** 1499 * The actual objects that are the target of the reference (The participant that should perform or be responsible for this action.) 1500 */ 1501 protected List<Resource> participantTarget; 1502 1503 1504 /** 1505 * The type of action to perform (create, update, remove). 1506 */ 1507 @Child(name = "type", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) 1508 @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) 1509 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-type") 1510 protected CodeableConcept type; 1511 1512 /** 1513 * Defines the grouping behavior for the action and its children. 1514 */ 1515 @Child(name = "groupingBehavior", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) 1516 @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines the grouping behavior for the action and its children." ) 1517 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-grouping-behavior") 1518 protected Enumeration<ActionGroupingBehavior> groupingBehavior; 1519 1520 /** 1521 * Defines the selection behavior for the action and its children. 1522 */ 1523 @Child(name = "selectionBehavior", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) 1524 @Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines the selection behavior for the action and its children." ) 1525 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-selection-behavior") 1526 protected Enumeration<ActionSelectionBehavior> selectionBehavior; 1527 1528 /** 1529 * Defines expectations around whether an action is required. 1530 */ 1531 @Child(name = "requiredBehavior", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false) 1532 @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines expectations around whether an action is required." ) 1533 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-required-behavior") 1534 protected Enumeration<ActionRequiredBehavior> requiredBehavior; 1535 1536 /** 1537 * Defines whether the action should usually be preselected. 1538 */ 1539 @Child(name = "precheckBehavior", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 1540 @Description(shortDefinition="yes | no", formalDefinition="Defines whether the action should usually be preselected." ) 1541 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-precheck-behavior") 1542 protected Enumeration<ActionPrecheckBehavior> precheckBehavior; 1543 1544 /** 1545 * Defines whether the action can be selected multiple times. 1546 */ 1547 @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 1548 @Description(shortDefinition="single | multiple", formalDefinition="Defines whether the action can be selected multiple times." ) 1549 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-cardinality-behavior") 1550 protected Enumeration<ActionCardinalityBehavior> cardinalityBehavior; 1551 1552 /** 1553 * The resource that is the target of the action (e.g. CommunicationRequest). 1554 */ 1555 @Child(name = "resource", type = {Reference.class}, order=18, min=0, max=1, modifier=false, summary=false) 1556 @Description(shortDefinition="The target of the action", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) 1557 protected Reference resource; 1558 1559 /** 1560 * The actual object that is the target of the reference (The resource that is the target of the action (e.g. CommunicationRequest).) 1561 */ 1562 protected Resource resourceTarget; 1563 1564 /** 1565 * Sub actions. 1566 */ 1567 @Child(name = "action", type = {RequestGroupActionComponent.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1568 @Description(shortDefinition="Sub action", formalDefinition="Sub actions." ) 1569 protected List<RequestGroupActionComponent> action; 1570 1571 private static final long serialVersionUID = 296752321L; 1572 1573 /** 1574 * Constructor 1575 */ 1576 public RequestGroupActionComponent() { 1577 super(); 1578 } 1579 1580 /** 1581 * @return {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 1582 */ 1583 public StringType getPrefixElement() { 1584 if (this.prefix == null) 1585 if (Configuration.errorOnAutoCreate()) 1586 throw new Error("Attempt to auto-create RequestGroupActionComponent.prefix"); 1587 else if (Configuration.doAutoCreate()) 1588 this.prefix = new StringType(); // bb 1589 return this.prefix; 1590 } 1591 1592 public boolean hasPrefixElement() { 1593 return this.prefix != null && !this.prefix.isEmpty(); 1594 } 1595 1596 public boolean hasPrefix() { 1597 return this.prefix != null && !this.prefix.isEmpty(); 1598 } 1599 1600 /** 1601 * @param value {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 1602 */ 1603 public RequestGroupActionComponent setPrefixElement(StringType value) { 1604 this.prefix = value; 1605 return this; 1606 } 1607 1608 /** 1609 * @return A user-visible prefix for the action. 1610 */ 1611 public String getPrefix() { 1612 return this.prefix == null ? null : this.prefix.getValue(); 1613 } 1614 1615 /** 1616 * @param value A user-visible prefix for the action. 1617 */ 1618 public RequestGroupActionComponent setPrefix(String value) { 1619 if (Utilities.noString(value)) 1620 this.prefix = null; 1621 else { 1622 if (this.prefix == null) 1623 this.prefix = new StringType(); 1624 this.prefix.setValue(value); 1625 } 1626 return this; 1627 } 1628 1629 /** 1630 * @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1631 */ 1632 public StringType getTitleElement() { 1633 if (this.title == null) 1634 if (Configuration.errorOnAutoCreate()) 1635 throw new Error("Attempt to auto-create RequestGroupActionComponent.title"); 1636 else if (Configuration.doAutoCreate()) 1637 this.title = new StringType(); // bb 1638 return this.title; 1639 } 1640 1641 public boolean hasTitleElement() { 1642 return this.title != null && !this.title.isEmpty(); 1643 } 1644 1645 public boolean hasTitle() { 1646 return this.title != null && !this.title.isEmpty(); 1647 } 1648 1649 /** 1650 * @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1651 */ 1652 public RequestGroupActionComponent setTitleElement(StringType value) { 1653 this.title = value; 1654 return this; 1655 } 1656 1657 /** 1658 * @return The title of the action displayed to a user. 1659 */ 1660 public String getTitle() { 1661 return this.title == null ? null : this.title.getValue(); 1662 } 1663 1664 /** 1665 * @param value The title of the action displayed to a user. 1666 */ 1667 public RequestGroupActionComponent setTitle(String value) { 1668 if (Utilities.noString(value)) 1669 this.title = null; 1670 else { 1671 if (this.title == null) 1672 this.title = new StringType(); 1673 this.title.setValue(value); 1674 } 1675 return this; 1676 } 1677 1678 /** 1679 * @return {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1680 */ 1681 public StringType getDescriptionElement() { 1682 if (this.description == null) 1683 if (Configuration.errorOnAutoCreate()) 1684 throw new Error("Attempt to auto-create RequestGroupActionComponent.description"); 1685 else if (Configuration.doAutoCreate()) 1686 this.description = new StringType(); // bb 1687 return this.description; 1688 } 1689 1690 public boolean hasDescriptionElement() { 1691 return this.description != null && !this.description.isEmpty(); 1692 } 1693 1694 public boolean hasDescription() { 1695 return this.description != null && !this.description.isEmpty(); 1696 } 1697 1698 /** 1699 * @param value {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1700 */ 1701 public RequestGroupActionComponent setDescriptionElement(StringType value) { 1702 this.description = value; 1703 return this; 1704 } 1705 1706 /** 1707 * @return A short description of the action used to provide a summary to display to the user. 1708 */ 1709 public String getDescription() { 1710 return this.description == null ? null : this.description.getValue(); 1711 } 1712 1713 /** 1714 * @param value A short description of the action used to provide a summary to display to the user. 1715 */ 1716 public RequestGroupActionComponent setDescription(String value) { 1717 if (Utilities.noString(value)) 1718 this.description = null; 1719 else { 1720 if (this.description == null) 1721 this.description = new StringType(); 1722 this.description.setValue(value); 1723 } 1724 return this; 1725 } 1726 1727 /** 1728 * @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value 1729 */ 1730 public StringType getTextEquivalentElement() { 1731 if (this.textEquivalent == null) 1732 if (Configuration.errorOnAutoCreate()) 1733 throw new Error("Attempt to auto-create RequestGroupActionComponent.textEquivalent"); 1734 else if (Configuration.doAutoCreate()) 1735 this.textEquivalent = new StringType(); // bb 1736 return this.textEquivalent; 1737 } 1738 1739 public boolean hasTextEquivalentElement() { 1740 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 1741 } 1742 1743 public boolean hasTextEquivalent() { 1744 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 1745 } 1746 1747 /** 1748 * @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value 1749 */ 1750 public RequestGroupActionComponent setTextEquivalentElement(StringType value) { 1751 this.textEquivalent = value; 1752 return this; 1753 } 1754 1755 /** 1756 * @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 1757 */ 1758 public String getTextEquivalent() { 1759 return this.textEquivalent == null ? null : this.textEquivalent.getValue(); 1760 } 1761 1762 /** 1763 * @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 1764 */ 1765 public RequestGroupActionComponent setTextEquivalent(String value) { 1766 if (Utilities.noString(value)) 1767 this.textEquivalent = null; 1768 else { 1769 if (this.textEquivalent == null) 1770 this.textEquivalent = new StringType(); 1771 this.textEquivalent.setValue(value); 1772 } 1773 return this; 1774 } 1775 1776 /** 1777 * @return {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1778 */ 1779 public Enumeration<RequestPriority> getPriorityElement() { 1780 if (this.priority == null) 1781 if (Configuration.errorOnAutoCreate()) 1782 throw new Error("Attempt to auto-create RequestGroupActionComponent.priority"); 1783 else if (Configuration.doAutoCreate()) 1784 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb 1785 return this.priority; 1786 } 1787 1788 public boolean hasPriorityElement() { 1789 return this.priority != null && !this.priority.isEmpty(); 1790 } 1791 1792 public boolean hasPriority() { 1793 return this.priority != null && !this.priority.isEmpty(); 1794 } 1795 1796 /** 1797 * @param value {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1798 */ 1799 public RequestGroupActionComponent setPriorityElement(Enumeration<RequestPriority> value) { 1800 this.priority = value; 1801 return this; 1802 } 1803 1804 /** 1805 * @return Indicates how quickly the action should be addressed with respect to other actions. 1806 */ 1807 public RequestPriority getPriority() { 1808 return this.priority == null ? null : this.priority.getValue(); 1809 } 1810 1811 /** 1812 * @param value Indicates how quickly the action should be addressed with respect to other actions. 1813 */ 1814 public RequestGroupActionComponent setPriority(RequestPriority value) { 1815 if (value == null) 1816 this.priority = null; 1817 else { 1818 if (this.priority == null) 1819 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); 1820 this.priority.setValue(value); 1821 } 1822 return this; 1823 } 1824 1825 /** 1826 * @return {@link #code} (A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.) 1827 */ 1828 public List<CodeableConcept> getCode() { 1829 if (this.code == null) 1830 this.code = new ArrayList<CodeableConcept>(); 1831 return this.code; 1832 } 1833 1834 /** 1835 * @return Returns a reference to <code>this</code> for easy method chaining 1836 */ 1837 public RequestGroupActionComponent setCode(List<CodeableConcept> theCode) { 1838 this.code = theCode; 1839 return this; 1840 } 1841 1842 public boolean hasCode() { 1843 if (this.code == null) 1844 return false; 1845 for (CodeableConcept item : this.code) 1846 if (!item.isEmpty()) 1847 return true; 1848 return false; 1849 } 1850 1851 public CodeableConcept addCode() { //3 1852 CodeableConcept t = new CodeableConcept(); 1853 if (this.code == null) 1854 this.code = new ArrayList<CodeableConcept>(); 1855 this.code.add(t); 1856 return t; 1857 } 1858 1859 public RequestGroupActionComponent addCode(CodeableConcept t) { //3 1860 if (t == null) 1861 return this; 1862 if (this.code == null) 1863 this.code = new ArrayList<CodeableConcept>(); 1864 this.code.add(t); 1865 return this; 1866 } 1867 1868 /** 1869 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 1870 */ 1871 public CodeableConcept getCodeFirstRep() { 1872 if (getCode().isEmpty()) { 1873 addCode(); 1874 } 1875 return getCode().get(0); 1876 } 1877 1878 /** 1879 * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) 1880 */ 1881 public List<RelatedArtifact> getDocumentation() { 1882 if (this.documentation == null) 1883 this.documentation = new ArrayList<RelatedArtifact>(); 1884 return this.documentation; 1885 } 1886 1887 /** 1888 * @return Returns a reference to <code>this</code> for easy method chaining 1889 */ 1890 public RequestGroupActionComponent setDocumentation(List<RelatedArtifact> theDocumentation) { 1891 this.documentation = theDocumentation; 1892 return this; 1893 } 1894 1895 public boolean hasDocumentation() { 1896 if (this.documentation == null) 1897 return false; 1898 for (RelatedArtifact item : this.documentation) 1899 if (!item.isEmpty()) 1900 return true; 1901 return false; 1902 } 1903 1904 public RelatedArtifact addDocumentation() { //3 1905 RelatedArtifact t = new RelatedArtifact(); 1906 if (this.documentation == null) 1907 this.documentation = new ArrayList<RelatedArtifact>(); 1908 this.documentation.add(t); 1909 return t; 1910 } 1911 1912 public RequestGroupActionComponent addDocumentation(RelatedArtifact t) { //3 1913 if (t == null) 1914 return this; 1915 if (this.documentation == null) 1916 this.documentation = new ArrayList<RelatedArtifact>(); 1917 this.documentation.add(t); 1918 return this; 1919 } 1920 1921 /** 1922 * @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist 1923 */ 1924 public RelatedArtifact getDocumentationFirstRep() { 1925 if (getDocumentation().isEmpty()) { 1926 addDocumentation(); 1927 } 1928 return getDocumentation().get(0); 1929 } 1930 1931 /** 1932 * @return {@link #condition} (An expression that describes applicability criteria, or start/stop conditions for the action.) 1933 */ 1934 public List<RequestGroupActionConditionComponent> getCondition() { 1935 if (this.condition == null) 1936 this.condition = new ArrayList<RequestGroupActionConditionComponent>(); 1937 return this.condition; 1938 } 1939 1940 /** 1941 * @return Returns a reference to <code>this</code> for easy method chaining 1942 */ 1943 public RequestGroupActionComponent setCondition(List<RequestGroupActionConditionComponent> theCondition) { 1944 this.condition = theCondition; 1945 return this; 1946 } 1947 1948 public boolean hasCondition() { 1949 if (this.condition == null) 1950 return false; 1951 for (RequestGroupActionConditionComponent item : this.condition) 1952 if (!item.isEmpty()) 1953 return true; 1954 return false; 1955 } 1956 1957 public RequestGroupActionConditionComponent addCondition() { //3 1958 RequestGroupActionConditionComponent t = new RequestGroupActionConditionComponent(); 1959 if (this.condition == null) 1960 this.condition = new ArrayList<RequestGroupActionConditionComponent>(); 1961 this.condition.add(t); 1962 return t; 1963 } 1964 1965 public RequestGroupActionComponent addCondition(RequestGroupActionConditionComponent t) { //3 1966 if (t == null) 1967 return this; 1968 if (this.condition == null) 1969 this.condition = new ArrayList<RequestGroupActionConditionComponent>(); 1970 this.condition.add(t); 1971 return this; 1972 } 1973 1974 /** 1975 * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist 1976 */ 1977 public RequestGroupActionConditionComponent getConditionFirstRep() { 1978 if (getCondition().isEmpty()) { 1979 addCondition(); 1980 } 1981 return getCondition().get(0); 1982 } 1983 1984 /** 1985 * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) 1986 */ 1987 public List<RequestGroupActionRelatedActionComponent> getRelatedAction() { 1988 if (this.relatedAction == null) 1989 this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>(); 1990 return this.relatedAction; 1991 } 1992 1993 /** 1994 * @return Returns a reference to <code>this</code> for easy method chaining 1995 */ 1996 public RequestGroupActionComponent setRelatedAction(List<RequestGroupActionRelatedActionComponent> theRelatedAction) { 1997 this.relatedAction = theRelatedAction; 1998 return this; 1999 } 2000 2001 public boolean hasRelatedAction() { 2002 if (this.relatedAction == null) 2003 return false; 2004 for (RequestGroupActionRelatedActionComponent item : this.relatedAction) 2005 if (!item.isEmpty()) 2006 return true; 2007 return false; 2008 } 2009 2010 public RequestGroupActionRelatedActionComponent addRelatedAction() { //3 2011 RequestGroupActionRelatedActionComponent t = new RequestGroupActionRelatedActionComponent(); 2012 if (this.relatedAction == null) 2013 this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>(); 2014 this.relatedAction.add(t); 2015 return t; 2016 } 2017 2018 public RequestGroupActionComponent addRelatedAction(RequestGroupActionRelatedActionComponent t) { //3 2019 if (t == null) 2020 return this; 2021 if (this.relatedAction == null) 2022 this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>(); 2023 this.relatedAction.add(t); 2024 return this; 2025 } 2026 2027 /** 2028 * @return The first repetition of repeating field {@link #relatedAction}, creating it if it does not already exist 2029 */ 2030 public RequestGroupActionRelatedActionComponent getRelatedActionFirstRep() { 2031 if (getRelatedAction().isEmpty()) { 2032 addRelatedAction(); 2033 } 2034 return getRelatedAction().get(0); 2035 } 2036 2037 /** 2038 * @return {@link #timing} (An optional value describing when the action should be performed.) 2039 */ 2040 public Type getTiming() { 2041 return this.timing; 2042 } 2043 2044 /** 2045 * @return {@link #timing} (An optional value describing when the action should be performed.) 2046 */ 2047 public DateTimeType getTimingDateTimeType() throws FHIRException { 2048 if (this.timing == null) 2049 this.timing = new DateTimeType(); 2050 if (!(this.timing instanceof DateTimeType)) 2051 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); 2052 return (DateTimeType) this.timing; 2053 } 2054 2055 public boolean hasTimingDateTimeType() { 2056 return this != null && this.timing instanceof DateTimeType; 2057 } 2058 2059 /** 2060 * @return {@link #timing} (An optional value describing when the action should be performed.) 2061 */ 2062 public Age getTimingAge() throws FHIRException { 2063 if (this.timing == null) 2064 this.timing = new Age(); 2065 if (!(this.timing instanceof Age)) 2066 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.timing.getClass().getName()+" was encountered"); 2067 return (Age) this.timing; 2068 } 2069 2070 public boolean hasTimingAge() { 2071 return this != null && this.timing instanceof Age; 2072 } 2073 2074 /** 2075 * @return {@link #timing} (An optional value describing when the action should be performed.) 2076 */ 2077 public Period getTimingPeriod() throws FHIRException { 2078 if (this.timing == null) 2079 this.timing = new Period(); 2080 if (!(this.timing instanceof Period)) 2081 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); 2082 return (Period) this.timing; 2083 } 2084 2085 public boolean hasTimingPeriod() { 2086 return this != null && this.timing instanceof Period; 2087 } 2088 2089 /** 2090 * @return {@link #timing} (An optional value describing when the action should be performed.) 2091 */ 2092 public Duration getTimingDuration() throws FHIRException { 2093 if (this.timing == null) 2094 this.timing = new Duration(); 2095 if (!(this.timing instanceof Duration)) 2096 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered"); 2097 return (Duration) this.timing; 2098 } 2099 2100 public boolean hasTimingDuration() { 2101 return this != null && this.timing instanceof Duration; 2102 } 2103 2104 /** 2105 * @return {@link #timing} (An optional value describing when the action should be performed.) 2106 */ 2107 public Range getTimingRange() throws FHIRException { 2108 if (this.timing == null) 2109 this.timing = new Range(); 2110 if (!(this.timing instanceof Range)) 2111 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered"); 2112 return (Range) this.timing; 2113 } 2114 2115 public boolean hasTimingRange() { 2116 return this != null && this.timing instanceof Range; 2117 } 2118 2119 /** 2120 * @return {@link #timing} (An optional value describing when the action should be performed.) 2121 */ 2122 public Timing getTimingTiming() throws FHIRException { 2123 if (this.timing == null) 2124 this.timing = new Timing(); 2125 if (!(this.timing instanceof Timing)) 2126 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); 2127 return (Timing) this.timing; 2128 } 2129 2130 public boolean hasTimingTiming() { 2131 return this != null && this.timing instanceof Timing; 2132 } 2133 2134 public boolean hasTiming() { 2135 return this.timing != null && !this.timing.isEmpty(); 2136 } 2137 2138 /** 2139 * @param value {@link #timing} (An optional value describing when the action should be performed.) 2140 */ 2141 public RequestGroupActionComponent setTiming(Type value) { 2142 if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Duration || value instanceof Range || value instanceof Timing)) 2143 throw new Error("Not the right type for RequestGroup.action.timing[x]: "+value.fhirType()); 2144 this.timing = value; 2145 return this; 2146 } 2147 2148 /** 2149 * @return {@link #participant} (The participant that should perform or be responsible for this action.) 2150 */ 2151 public List<Reference> getParticipant() { 2152 if (this.participant == null) 2153 this.participant = new ArrayList<Reference>(); 2154 return this.participant; 2155 } 2156 2157 /** 2158 * @return Returns a reference to <code>this</code> for easy method chaining 2159 */ 2160 public RequestGroupActionComponent setParticipant(List<Reference> theParticipant) { 2161 this.participant = theParticipant; 2162 return this; 2163 } 2164 2165 public boolean hasParticipant() { 2166 if (this.participant == null) 2167 return false; 2168 for (Reference item : this.participant) 2169 if (!item.isEmpty()) 2170 return true; 2171 return false; 2172 } 2173 2174 public Reference addParticipant() { //3 2175 Reference t = new Reference(); 2176 if (this.participant == null) 2177 this.participant = new ArrayList<Reference>(); 2178 this.participant.add(t); 2179 return t; 2180 } 2181 2182 public RequestGroupActionComponent addParticipant(Reference t) { //3 2183 if (t == null) 2184 return this; 2185 if (this.participant == null) 2186 this.participant = new ArrayList<Reference>(); 2187 this.participant.add(t); 2188 return this; 2189 } 2190 2191 /** 2192 * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist 2193 */ 2194 public Reference getParticipantFirstRep() { 2195 if (getParticipant().isEmpty()) { 2196 addParticipant(); 2197 } 2198 return getParticipant().get(0); 2199 } 2200 2201 /** 2202 * @deprecated Use Reference#setResource(IBaseResource) instead 2203 */ 2204 @Deprecated 2205 public List<Resource> getParticipantTarget() { 2206 if (this.participantTarget == null) 2207 this.participantTarget = new ArrayList<Resource>(); 2208 return this.participantTarget; 2209 } 2210 2211 /** 2212 * @return {@link #type} (The type of action to perform (create, update, remove).) 2213 */ 2214 public CodeableConcept getType() { 2215 if (this.type == null) 2216 if (Configuration.errorOnAutoCreate()) 2217 throw new Error("Attempt to auto-create RequestGroupActionComponent.type"); 2218 else if (Configuration.doAutoCreate()) 2219 this.type = new CodeableConcept(); // cc 2220 return this.type; 2221 } 2222 2223 public boolean hasType() { 2224 return this.type != null && !this.type.isEmpty(); 2225 } 2226 2227 /** 2228 * @param value {@link #type} (The type of action to perform (create, update, remove).) 2229 */ 2230 public RequestGroupActionComponent setType(CodeableConcept value) { 2231 this.type = value; 2232 return this; 2233 } 2234 2235 /** 2236 * @return {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value 2237 */ 2238 public Enumeration<ActionGroupingBehavior> getGroupingBehaviorElement() { 2239 if (this.groupingBehavior == null) 2240 if (Configuration.errorOnAutoCreate()) 2241 throw new Error("Attempt to auto-create RequestGroupActionComponent.groupingBehavior"); 2242 else if (Configuration.doAutoCreate()) 2243 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); // bb 2244 return this.groupingBehavior; 2245 } 2246 2247 public boolean hasGroupingBehaviorElement() { 2248 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 2249 } 2250 2251 public boolean hasGroupingBehavior() { 2252 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 2253 } 2254 2255 /** 2256 * @param value {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value 2257 */ 2258 public RequestGroupActionComponent setGroupingBehaviorElement(Enumeration<ActionGroupingBehavior> value) { 2259 this.groupingBehavior = value; 2260 return this; 2261 } 2262 2263 /** 2264 * @return Defines the grouping behavior for the action and its children. 2265 */ 2266 public ActionGroupingBehavior getGroupingBehavior() { 2267 return this.groupingBehavior == null ? null : this.groupingBehavior.getValue(); 2268 } 2269 2270 /** 2271 * @param value Defines the grouping behavior for the action and its children. 2272 */ 2273 public RequestGroupActionComponent setGroupingBehavior(ActionGroupingBehavior value) { 2274 if (value == null) 2275 this.groupingBehavior = null; 2276 else { 2277 if (this.groupingBehavior == null) 2278 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); 2279 this.groupingBehavior.setValue(value); 2280 } 2281 return this; 2282 } 2283 2284 /** 2285 * @return {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value 2286 */ 2287 public Enumeration<ActionSelectionBehavior> getSelectionBehaviorElement() { 2288 if (this.selectionBehavior == null) 2289 if (Configuration.errorOnAutoCreate()) 2290 throw new Error("Attempt to auto-create RequestGroupActionComponent.selectionBehavior"); 2291 else if (Configuration.doAutoCreate()) 2292 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); // bb 2293 return this.selectionBehavior; 2294 } 2295 2296 public boolean hasSelectionBehaviorElement() { 2297 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 2298 } 2299 2300 public boolean hasSelectionBehavior() { 2301 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 2302 } 2303 2304 /** 2305 * @param value {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value 2306 */ 2307 public RequestGroupActionComponent setSelectionBehaviorElement(Enumeration<ActionSelectionBehavior> value) { 2308 this.selectionBehavior = value; 2309 return this; 2310 } 2311 2312 /** 2313 * @return Defines the selection behavior for the action and its children. 2314 */ 2315 public ActionSelectionBehavior getSelectionBehavior() { 2316 return this.selectionBehavior == null ? null : this.selectionBehavior.getValue(); 2317 } 2318 2319 /** 2320 * @param value Defines the selection behavior for the action and its children. 2321 */ 2322 public RequestGroupActionComponent setSelectionBehavior(ActionSelectionBehavior value) { 2323 if (value == null) 2324 this.selectionBehavior = null; 2325 else { 2326 if (this.selectionBehavior == null) 2327 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); 2328 this.selectionBehavior.setValue(value); 2329 } 2330 return this; 2331 } 2332 2333 /** 2334 * @return {@link #requiredBehavior} (Defines expectations around whether an action is required.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 2335 */ 2336 public Enumeration<ActionRequiredBehavior> getRequiredBehaviorElement() { 2337 if (this.requiredBehavior == null) 2338 if (Configuration.errorOnAutoCreate()) 2339 throw new Error("Attempt to auto-create RequestGroupActionComponent.requiredBehavior"); 2340 else if (Configuration.doAutoCreate()) 2341 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); // bb 2342 return this.requiredBehavior; 2343 } 2344 2345 public boolean hasRequiredBehaviorElement() { 2346 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 2347 } 2348 2349 public boolean hasRequiredBehavior() { 2350 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 2351 } 2352 2353 /** 2354 * @param value {@link #requiredBehavior} (Defines expectations around whether an action is required.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 2355 */ 2356 public RequestGroupActionComponent setRequiredBehaviorElement(Enumeration<ActionRequiredBehavior> value) { 2357 this.requiredBehavior = value; 2358 return this; 2359 } 2360 2361 /** 2362 * @return Defines expectations around whether an action is required. 2363 */ 2364 public ActionRequiredBehavior getRequiredBehavior() { 2365 return this.requiredBehavior == null ? null : this.requiredBehavior.getValue(); 2366 } 2367 2368 /** 2369 * @param value Defines expectations around whether an action is required. 2370 */ 2371 public RequestGroupActionComponent setRequiredBehavior(ActionRequiredBehavior value) { 2372 if (value == null) 2373 this.requiredBehavior = null; 2374 else { 2375 if (this.requiredBehavior == null) 2376 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); 2377 this.requiredBehavior.setValue(value); 2378 } 2379 return this; 2380 } 2381 2382 /** 2383 * @return {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value 2384 */ 2385 public Enumeration<ActionPrecheckBehavior> getPrecheckBehaviorElement() { 2386 if (this.precheckBehavior == null) 2387 if (Configuration.errorOnAutoCreate()) 2388 throw new Error("Attempt to auto-create RequestGroupActionComponent.precheckBehavior"); 2389 else if (Configuration.doAutoCreate()) 2390 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); // bb 2391 return this.precheckBehavior; 2392 } 2393 2394 public boolean hasPrecheckBehaviorElement() { 2395 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 2396 } 2397 2398 public boolean hasPrecheckBehavior() { 2399 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 2400 } 2401 2402 /** 2403 * @param value {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value 2404 */ 2405 public RequestGroupActionComponent setPrecheckBehaviorElement(Enumeration<ActionPrecheckBehavior> value) { 2406 this.precheckBehavior = value; 2407 return this; 2408 } 2409 2410 /** 2411 * @return Defines whether the action should usually be preselected. 2412 */ 2413 public ActionPrecheckBehavior getPrecheckBehavior() { 2414 return this.precheckBehavior == null ? null : this.precheckBehavior.getValue(); 2415 } 2416 2417 /** 2418 * @param value Defines whether the action should usually be preselected. 2419 */ 2420 public RequestGroupActionComponent setPrecheckBehavior(ActionPrecheckBehavior value) { 2421 if (value == null) 2422 this.precheckBehavior = null; 2423 else { 2424 if (this.precheckBehavior == null) 2425 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); 2426 this.precheckBehavior.setValue(value); 2427 } 2428 return this; 2429 } 2430 2431 /** 2432 * @return {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value 2433 */ 2434 public Enumeration<ActionCardinalityBehavior> getCardinalityBehaviorElement() { 2435 if (this.cardinalityBehavior == null) 2436 if (Configuration.errorOnAutoCreate()) 2437 throw new Error("Attempt to auto-create RequestGroupActionComponent.cardinalityBehavior"); 2438 else if (Configuration.doAutoCreate()) 2439 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); // bb 2440 return this.cardinalityBehavior; 2441 } 2442 2443 public boolean hasCardinalityBehaviorElement() { 2444 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 2445 } 2446 2447 public boolean hasCardinalityBehavior() { 2448 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 2449 } 2450 2451 /** 2452 * @param value {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value 2453 */ 2454 public RequestGroupActionComponent setCardinalityBehaviorElement(Enumeration<ActionCardinalityBehavior> value) { 2455 this.cardinalityBehavior = value; 2456 return this; 2457 } 2458 2459 /** 2460 * @return Defines whether the action can be selected multiple times. 2461 */ 2462 public ActionCardinalityBehavior getCardinalityBehavior() { 2463 return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue(); 2464 } 2465 2466 /** 2467 * @param value Defines whether the action can be selected multiple times. 2468 */ 2469 public RequestGroupActionComponent setCardinalityBehavior(ActionCardinalityBehavior value) { 2470 if (value == null) 2471 this.cardinalityBehavior = null; 2472 else { 2473 if (this.cardinalityBehavior == null) 2474 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); 2475 this.cardinalityBehavior.setValue(value); 2476 } 2477 return this; 2478 } 2479 2480 /** 2481 * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) 2482 */ 2483 public Reference getResource() { 2484 if (this.resource == null) 2485 if (Configuration.errorOnAutoCreate()) 2486 throw new Error("Attempt to auto-create RequestGroupActionComponent.resource"); 2487 else if (Configuration.doAutoCreate()) 2488 this.resource = new Reference(); // cc 2489 return this.resource; 2490 } 2491 2492 public boolean hasResource() { 2493 return this.resource != null && !this.resource.isEmpty(); 2494 } 2495 2496 /** 2497 * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) 2498 */ 2499 public RequestGroupActionComponent setResource(Reference value) { 2500 this.resource = value; 2501 return this; 2502 } 2503 2504 /** 2505 * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) 2506 */ 2507 public Resource getResourceTarget() { 2508 return this.resourceTarget; 2509 } 2510 2511 /** 2512 * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) 2513 */ 2514 public RequestGroupActionComponent setResourceTarget(Resource value) { 2515 this.resourceTarget = value; 2516 return this; 2517 } 2518 2519 /** 2520 * @return {@link #action} (Sub actions.) 2521 */ 2522 public List<RequestGroupActionComponent> getAction() { 2523 if (this.action == null) 2524 this.action = new ArrayList<RequestGroupActionComponent>(); 2525 return this.action; 2526 } 2527 2528 /** 2529 * @return Returns a reference to <code>this</code> for easy method chaining 2530 */ 2531 public RequestGroupActionComponent setAction(List<RequestGroupActionComponent> theAction) { 2532 this.action = theAction; 2533 return this; 2534 } 2535 2536 public boolean hasAction() { 2537 if (this.action == null) 2538 return false; 2539 for (RequestGroupActionComponent item : this.action) 2540 if (!item.isEmpty()) 2541 return true; 2542 return false; 2543 } 2544 2545 public RequestGroupActionComponent addAction() { //3 2546 RequestGroupActionComponent t = new RequestGroupActionComponent(); 2547 if (this.action == null) 2548 this.action = new ArrayList<RequestGroupActionComponent>(); 2549 this.action.add(t); 2550 return t; 2551 } 2552 2553 public RequestGroupActionComponent addAction(RequestGroupActionComponent t) { //3 2554 if (t == null) 2555 return this; 2556 if (this.action == null) 2557 this.action = new ArrayList<RequestGroupActionComponent>(); 2558 this.action.add(t); 2559 return this; 2560 } 2561 2562 /** 2563 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 2564 */ 2565 public RequestGroupActionComponent getActionFirstRep() { 2566 if (getAction().isEmpty()) { 2567 addAction(); 2568 } 2569 return getAction().get(0); 2570 } 2571 2572 protected void listChildren(List<Property> children) { 2573 super.listChildren(children); 2574 children.add(new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix)); 2575 children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title)); 2576 children.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description)); 2577 children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent)); 2578 children.add(new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority)); 2579 children.add(new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code)); 2580 children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation)); 2581 children.add(new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition)); 2582 children.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction)); 2583 children.add(new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing)); 2584 children.add(new Property("participant", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Device)", "The participant that should perform or be responsible for this action.", 0, java.lang.Integer.MAX_VALUE, participant)); 2585 children.add(new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type)); 2586 children.add(new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior)); 2587 children.add(new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior)); 2588 children.add(new Property("requiredBehavior", "code", "Defines expectations around whether an action is required.", 0, 1, requiredBehavior)); 2589 children.add(new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior)); 2590 children.add(new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior)); 2591 children.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, 1, resource)); 2592 children.add(new Property("action", "@RequestGroup.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, action)); 2593 } 2594 2595 @Override 2596 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2597 switch (_hash) { 2598 case -980110702: /*prefix*/ return new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix); 2599 case 110371416: /*title*/ return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title); 2600 case -1724546052: /*description*/ return new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description); 2601 case -900391049: /*textEquivalent*/ return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent); 2602 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority); 2603 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code); 2604 case 1587405498: /*documentation*/ return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation); 2605 case -861311717: /*condition*/ return new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition); 2606 case -384107967: /*relatedAction*/ return new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction); 2607 case 164632566: /*timing[x]*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2608 case -873664438: /*timing*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2609 case -1837458939: /*timingDateTime*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2610 case 164607061: /*timingAge*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2611 case -615615829: /*timingPeriod*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2612 case -1327253506: /*timingDuration*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2613 case -710871277: /*timingRange*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2614 case -497554124: /*timingTiming*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 2615 case 767422259: /*participant*/ return new Property("participant", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Device)", "The participant that should perform or be responsible for this action.", 0, java.lang.Integer.MAX_VALUE, participant); 2616 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type); 2617 case 586678389: /*groupingBehavior*/ return new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior); 2618 case 168639486: /*selectionBehavior*/ return new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior); 2619 case -1163906287: /*requiredBehavior*/ return new Property("requiredBehavior", "code", "Defines expectations around whether an action is required.", 0, 1, requiredBehavior); 2620 case -1174249033: /*precheckBehavior*/ return new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior); 2621 case -922577408: /*cardinalityBehavior*/ return new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior); 2622 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, 1, resource); 2623 case -1422950858: /*action*/ return new Property("action", "@RequestGroup.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, action); 2624 default: return super.getNamedProperty(_hash, _name, _checkValid); 2625 } 2626 2627 } 2628 2629 @Override 2630 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2631 switch (hash) { 2632 case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType 2633 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2634 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2635 case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType 2636 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority> 2637 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 2638 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact 2639 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // RequestGroupActionConditionComponent 2640 case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : this.relatedAction.toArray(new Base[this.relatedAction.size()]); // RequestGroupActionRelatedActionComponent 2641 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type 2642 case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // Reference 2643 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2644 case 586678389: /*groupingBehavior*/ return this.groupingBehavior == null ? new Base[0] : new Base[] {this.groupingBehavior}; // Enumeration<ActionGroupingBehavior> 2645 case 168639486: /*selectionBehavior*/ return this.selectionBehavior == null ? new Base[0] : new Base[] {this.selectionBehavior}; // Enumeration<ActionSelectionBehavior> 2646 case -1163906287: /*requiredBehavior*/ return this.requiredBehavior == null ? new Base[0] : new Base[] {this.requiredBehavior}; // Enumeration<ActionRequiredBehavior> 2647 case -1174249033: /*precheckBehavior*/ return this.precheckBehavior == null ? new Base[0] : new Base[] {this.precheckBehavior}; // Enumeration<ActionPrecheckBehavior> 2648 case -922577408: /*cardinalityBehavior*/ return this.cardinalityBehavior == null ? new Base[0] : new Base[] {this.cardinalityBehavior}; // Enumeration<ActionCardinalityBehavior> 2649 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2650 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // RequestGroupActionComponent 2651 default: return super.getProperty(hash, name, checkValid); 2652 } 2653 2654 } 2655 2656 @Override 2657 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2658 switch (hash) { 2659 case -980110702: // prefix 2660 this.prefix = castToString(value); // StringType 2661 return value; 2662 case 110371416: // title 2663 this.title = castToString(value); // StringType 2664 return value; 2665 case -1724546052: // description 2666 this.description = castToString(value); // StringType 2667 return value; 2668 case -900391049: // textEquivalent 2669 this.textEquivalent = castToString(value); // StringType 2670 return value; 2671 case -1165461084: // priority 2672 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 2673 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 2674 return value; 2675 case 3059181: // code 2676 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 2677 return value; 2678 case 1587405498: // documentation 2679 this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact 2680 return value; 2681 case -861311717: // condition 2682 this.getCondition().add((RequestGroupActionConditionComponent) value); // RequestGroupActionConditionComponent 2683 return value; 2684 case -384107967: // relatedAction 2685 this.getRelatedAction().add((RequestGroupActionRelatedActionComponent) value); // RequestGroupActionRelatedActionComponent 2686 return value; 2687 case -873664438: // timing 2688 this.timing = castToType(value); // Type 2689 return value; 2690 case 767422259: // participant 2691 this.getParticipant().add(castToReference(value)); // Reference 2692 return value; 2693 case 3575610: // type 2694 this.type = castToCodeableConcept(value); // CodeableConcept 2695 return value; 2696 case 586678389: // groupingBehavior 2697 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 2698 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 2699 return value; 2700 case 168639486: // selectionBehavior 2701 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 2702 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 2703 return value; 2704 case -1163906287: // requiredBehavior 2705 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 2706 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 2707 return value; 2708 case -1174249033: // precheckBehavior 2709 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 2710 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 2711 return value; 2712 case -922577408: // cardinalityBehavior 2713 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 2714 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 2715 return value; 2716 case -341064690: // resource 2717 this.resource = castToReference(value); // Reference 2718 return value; 2719 case -1422950858: // action 2720 this.getAction().add((RequestGroupActionComponent) value); // RequestGroupActionComponent 2721 return value; 2722 default: return super.setProperty(hash, name, value); 2723 } 2724 2725 } 2726 2727 @Override 2728 public Base setProperty(String name, Base value) throws FHIRException { 2729 if (name.equals("prefix")) { 2730 this.prefix = castToString(value); // StringType 2731 } else if (name.equals("title")) { 2732 this.title = castToString(value); // StringType 2733 } else if (name.equals("description")) { 2734 this.description = castToString(value); // StringType 2735 } else if (name.equals("textEquivalent")) { 2736 this.textEquivalent = castToString(value); // StringType 2737 } else if (name.equals("priority")) { 2738 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 2739 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 2740 } else if (name.equals("code")) { 2741 this.getCode().add(castToCodeableConcept(value)); 2742 } else if (name.equals("documentation")) { 2743 this.getDocumentation().add(castToRelatedArtifact(value)); 2744 } else if (name.equals("condition")) { 2745 this.getCondition().add((RequestGroupActionConditionComponent) value); 2746 } else if (name.equals("relatedAction")) { 2747 this.getRelatedAction().add((RequestGroupActionRelatedActionComponent) value); 2748 } else if (name.equals("timing[x]")) { 2749 this.timing = castToType(value); // Type 2750 } else if (name.equals("participant")) { 2751 this.getParticipant().add(castToReference(value)); 2752 } else if (name.equals("type")) { 2753 this.type = castToCodeableConcept(value); // CodeableConcept 2754 } else if (name.equals("groupingBehavior")) { 2755 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 2756 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 2757 } else if (name.equals("selectionBehavior")) { 2758 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 2759 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 2760 } else if (name.equals("requiredBehavior")) { 2761 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 2762 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 2763 } else if (name.equals("precheckBehavior")) { 2764 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 2765 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 2766 } else if (name.equals("cardinalityBehavior")) { 2767 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 2768 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 2769 } else if (name.equals("resource")) { 2770 this.resource = castToReference(value); // Reference 2771 } else if (name.equals("action")) { 2772 this.getAction().add((RequestGroupActionComponent) value); 2773 } else 2774 return super.setProperty(name, value); 2775 return value; 2776 } 2777 2778 @Override 2779 public Base makeProperty(int hash, String name) throws FHIRException { 2780 switch (hash) { 2781 case -980110702: return getPrefixElement(); 2782 case 110371416: return getTitleElement(); 2783 case -1724546052: return getDescriptionElement(); 2784 case -900391049: return getTextEquivalentElement(); 2785 case -1165461084: return getPriorityElement(); 2786 case 3059181: return addCode(); 2787 case 1587405498: return addDocumentation(); 2788 case -861311717: return addCondition(); 2789 case -384107967: return addRelatedAction(); 2790 case 164632566: return getTiming(); 2791 case -873664438: return getTiming(); 2792 case 767422259: return addParticipant(); 2793 case 3575610: return getType(); 2794 case 586678389: return getGroupingBehaviorElement(); 2795 case 168639486: return getSelectionBehaviorElement(); 2796 case -1163906287: return getRequiredBehaviorElement(); 2797 case -1174249033: return getPrecheckBehaviorElement(); 2798 case -922577408: return getCardinalityBehaviorElement(); 2799 case -341064690: return getResource(); 2800 case -1422950858: return addAction(); 2801 default: return super.makeProperty(hash, name); 2802 } 2803 2804 } 2805 2806 @Override 2807 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2808 switch (hash) { 2809 case -980110702: /*prefix*/ return new String[] {"string"}; 2810 case 110371416: /*title*/ return new String[] {"string"}; 2811 case -1724546052: /*description*/ return new String[] {"string"}; 2812 case -900391049: /*textEquivalent*/ return new String[] {"string"}; 2813 case -1165461084: /*priority*/ return new String[] {"code"}; 2814 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 2815 case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"}; 2816 case -861311717: /*condition*/ return new String[] {}; 2817 case -384107967: /*relatedAction*/ return new String[] {}; 2818 case -873664438: /*timing*/ return new String[] {"dateTime", "Age", "Period", "Duration", "Range", "Timing"}; 2819 case 767422259: /*participant*/ return new String[] {"Reference"}; 2820 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2821 case 586678389: /*groupingBehavior*/ return new String[] {"code"}; 2822 case 168639486: /*selectionBehavior*/ return new String[] {"code"}; 2823 case -1163906287: /*requiredBehavior*/ return new String[] {"code"}; 2824 case -1174249033: /*precheckBehavior*/ return new String[] {"code"}; 2825 case -922577408: /*cardinalityBehavior*/ return new String[] {"code"}; 2826 case -341064690: /*resource*/ return new String[] {"Reference"}; 2827 case -1422950858: /*action*/ return new String[] {"@RequestGroup.action"}; 2828 default: return super.getTypesForProperty(hash, name); 2829 } 2830 2831 } 2832 2833 @Override 2834 public Base addChild(String name) throws FHIRException { 2835 if (name.equals("prefix")) { 2836 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.prefix"); 2837 } 2838 else if (name.equals("title")) { 2839 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.title"); 2840 } 2841 else if (name.equals("description")) { 2842 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.description"); 2843 } 2844 else if (name.equals("textEquivalent")) { 2845 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.textEquivalent"); 2846 } 2847 else if (name.equals("priority")) { 2848 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.priority"); 2849 } 2850 else if (name.equals("code")) { 2851 return addCode(); 2852 } 2853 else if (name.equals("documentation")) { 2854 return addDocumentation(); 2855 } 2856 else if (name.equals("condition")) { 2857 return addCondition(); 2858 } 2859 else if (name.equals("relatedAction")) { 2860 return addRelatedAction(); 2861 } 2862 else if (name.equals("timingDateTime")) { 2863 this.timing = new DateTimeType(); 2864 return this.timing; 2865 } 2866 else if (name.equals("timingAge")) { 2867 this.timing = new Age(); 2868 return this.timing; 2869 } 2870 else if (name.equals("timingPeriod")) { 2871 this.timing = new Period(); 2872 return this.timing; 2873 } 2874 else if (name.equals("timingDuration")) { 2875 this.timing = new Duration(); 2876 return this.timing; 2877 } 2878 else if (name.equals("timingRange")) { 2879 this.timing = new Range(); 2880 return this.timing; 2881 } 2882 else if (name.equals("timingTiming")) { 2883 this.timing = new Timing(); 2884 return this.timing; 2885 } 2886 else if (name.equals("participant")) { 2887 return addParticipant(); 2888 } 2889 else if (name.equals("type")) { 2890 this.type = new CodeableConcept(); 2891 return this.type; 2892 } 2893 else if (name.equals("groupingBehavior")) { 2894 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.groupingBehavior"); 2895 } 2896 else if (name.equals("selectionBehavior")) { 2897 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.selectionBehavior"); 2898 } 2899 else if (name.equals("requiredBehavior")) { 2900 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.requiredBehavior"); 2901 } 2902 else if (name.equals("precheckBehavior")) { 2903 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.precheckBehavior"); 2904 } 2905 else if (name.equals("cardinalityBehavior")) { 2906 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.cardinalityBehavior"); 2907 } 2908 else if (name.equals("resource")) { 2909 this.resource = new Reference(); 2910 return this.resource; 2911 } 2912 else if (name.equals("action")) { 2913 return addAction(); 2914 } 2915 else 2916 return super.addChild(name); 2917 } 2918 2919 public RequestGroupActionComponent copy() { 2920 RequestGroupActionComponent dst = new RequestGroupActionComponent(); 2921 copyValues(dst); 2922 dst.prefix = prefix == null ? null : prefix.copy(); 2923 dst.title = title == null ? null : title.copy(); 2924 dst.description = description == null ? null : description.copy(); 2925 dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); 2926 dst.priority = priority == null ? null : priority.copy(); 2927 if (code != null) { 2928 dst.code = new ArrayList<CodeableConcept>(); 2929 for (CodeableConcept i : code) 2930 dst.code.add(i.copy()); 2931 }; 2932 if (documentation != null) { 2933 dst.documentation = new ArrayList<RelatedArtifact>(); 2934 for (RelatedArtifact i : documentation) 2935 dst.documentation.add(i.copy()); 2936 }; 2937 if (condition != null) { 2938 dst.condition = new ArrayList<RequestGroupActionConditionComponent>(); 2939 for (RequestGroupActionConditionComponent i : condition) 2940 dst.condition.add(i.copy()); 2941 }; 2942 if (relatedAction != null) { 2943 dst.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>(); 2944 for (RequestGroupActionRelatedActionComponent i : relatedAction) 2945 dst.relatedAction.add(i.copy()); 2946 }; 2947 dst.timing = timing == null ? null : timing.copy(); 2948 if (participant != null) { 2949 dst.participant = new ArrayList<Reference>(); 2950 for (Reference i : participant) 2951 dst.participant.add(i.copy()); 2952 }; 2953 dst.type = type == null ? null : type.copy(); 2954 dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy(); 2955 dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy(); 2956 dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy(); 2957 dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy(); 2958 dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy(); 2959 dst.resource = resource == null ? null : resource.copy(); 2960 if (action != null) { 2961 dst.action = new ArrayList<RequestGroupActionComponent>(); 2962 for (RequestGroupActionComponent i : action) 2963 dst.action.add(i.copy()); 2964 }; 2965 return dst; 2966 } 2967 2968 @Override 2969 public boolean equalsDeep(Base other_) { 2970 if (!super.equalsDeep(other_)) 2971 return false; 2972 if (!(other_ instanceof RequestGroupActionComponent)) 2973 return false; 2974 RequestGroupActionComponent o = (RequestGroupActionComponent) other_; 2975 return compareDeep(prefix, o.prefix, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) 2976 && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(priority, o.priority, true) 2977 && compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true) && compareDeep(condition, o.condition, true) 2978 && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true) 2979 && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true) 2980 && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true) 2981 && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(resource, o.resource, true) 2982 && compareDeep(action, o.action, true); 2983 } 2984 2985 @Override 2986 public boolean equalsShallow(Base other_) { 2987 if (!super.equalsShallow(other_)) 2988 return false; 2989 if (!(other_ instanceof RequestGroupActionComponent)) 2990 return false; 2991 RequestGroupActionComponent o = (RequestGroupActionComponent) other_; 2992 return compareValues(prefix, o.prefix, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) 2993 && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(priority, o.priority, true) 2994 && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true) 2995 && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true) 2996 && compareValues(cardinalityBehavior, o.cardinalityBehavior, true); 2997 } 2998 2999 public boolean isEmpty() { 3000 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(prefix, title, description 3001 , textEquivalent, priority, code, documentation, condition, relatedAction, timing 3002 , participant, type, groupingBehavior, selectionBehavior, requiredBehavior, precheckBehavior 3003 , cardinalityBehavior, resource, action); 3004 } 3005 3006 public String fhirType() { 3007 return "RequestGroup.action"; 3008 3009 } 3010 3011 } 3012 3013 @Block() 3014 public static class RequestGroupActionConditionComponent extends BackboneElement implements IBaseBackboneElement { 3015 /** 3016 * The kind of condition. 3017 */ 3018 @Child(name = "kind", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3019 @Description(shortDefinition="applicability | start | stop", formalDefinition="The kind of condition." ) 3020 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-condition-kind") 3021 protected Enumeration<ActionConditionKind> kind; 3022 3023 /** 3024 * An expression that returns true or false, indicating whether or not the condition is satisfied. 3025 */ 3026 @Child(name = "expression", type = {Expression.class}, order=2, min=0, max=1, modifier=false, summary=false) 3027 @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether or not the condition is satisfied." ) 3028 protected Expression expression; 3029 3030 private static final long serialVersionUID = -455150438L; 3031 3032 /** 3033 * Constructor 3034 */ 3035 public RequestGroupActionConditionComponent() { 3036 super(); 3037 } 3038 3039 /** 3040 * Constructor 3041 */ 3042 public RequestGroupActionConditionComponent(Enumeration<ActionConditionKind> kind) { 3043 super(); 3044 this.kind = kind; 3045 } 3046 3047 /** 3048 * @return {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 3049 */ 3050 public Enumeration<ActionConditionKind> getKindElement() { 3051 if (this.kind == null) 3052 if (Configuration.errorOnAutoCreate()) 3053 throw new Error("Attempt to auto-create RequestGroupActionConditionComponent.kind"); 3054 else if (Configuration.doAutoCreate()) 3055 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); // bb 3056 return this.kind; 3057 } 3058 3059 public boolean hasKindElement() { 3060 return this.kind != null && !this.kind.isEmpty(); 3061 } 3062 3063 public boolean hasKind() { 3064 return this.kind != null && !this.kind.isEmpty(); 3065 } 3066 3067 /** 3068 * @param value {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 3069 */ 3070 public RequestGroupActionConditionComponent setKindElement(Enumeration<ActionConditionKind> value) { 3071 this.kind = value; 3072 return this; 3073 } 3074 3075 /** 3076 * @return The kind of condition. 3077 */ 3078 public ActionConditionKind getKind() { 3079 return this.kind == null ? null : this.kind.getValue(); 3080 } 3081 3082 /** 3083 * @param value The kind of condition. 3084 */ 3085 public RequestGroupActionConditionComponent setKind(ActionConditionKind value) { 3086 if (this.kind == null) 3087 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); 3088 this.kind.setValue(value); 3089 return this; 3090 } 3091 3092 /** 3093 * @return {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.) 3094 */ 3095 public Expression getExpression() { 3096 if (this.expression == null) 3097 if (Configuration.errorOnAutoCreate()) 3098 throw new Error("Attempt to auto-create RequestGroupActionConditionComponent.expression"); 3099 else if (Configuration.doAutoCreate()) 3100 this.expression = new Expression(); // cc 3101 return this.expression; 3102 } 3103 3104 public boolean hasExpression() { 3105 return this.expression != null && !this.expression.isEmpty(); 3106 } 3107 3108 /** 3109 * @param value {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.) 3110 */ 3111 public RequestGroupActionConditionComponent setExpression(Expression value) { 3112 this.expression = value; 3113 return this; 3114 } 3115 3116 protected void listChildren(List<Property> children) { 3117 super.listChildren(children); 3118 children.add(new Property("kind", "code", "The kind of condition.", 0, 1, kind)); 3119 children.add(new Property("expression", "Expression", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression)); 3120 } 3121 3122 @Override 3123 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3124 switch (_hash) { 3125 case 3292052: /*kind*/ return new Property("kind", "code", "The kind of condition.", 0, 1, kind); 3126 case -1795452264: /*expression*/ return new Property("expression", "Expression", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression); 3127 default: return super.getNamedProperty(_hash, _name, _checkValid); 3128 } 3129 3130 } 3131 3132 @Override 3133 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3134 switch (hash) { 3135 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<ActionConditionKind> 3136 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // Expression 3137 default: return super.getProperty(hash, name, checkValid); 3138 } 3139 3140 } 3141 3142 @Override 3143 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3144 switch (hash) { 3145 case 3292052: // kind 3146 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 3147 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 3148 return value; 3149 case -1795452264: // expression 3150 this.expression = castToExpression(value); // Expression 3151 return value; 3152 default: return super.setProperty(hash, name, value); 3153 } 3154 3155 } 3156 3157 @Override 3158 public Base setProperty(String name, Base value) throws FHIRException { 3159 if (name.equals("kind")) { 3160 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 3161 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 3162 } else if (name.equals("expression")) { 3163 this.expression = castToExpression(value); // Expression 3164 } else 3165 return super.setProperty(name, value); 3166 return value; 3167 } 3168 3169 @Override 3170 public Base makeProperty(int hash, String name) throws FHIRException { 3171 switch (hash) { 3172 case 3292052: return getKindElement(); 3173 case -1795452264: return getExpression(); 3174 default: return super.makeProperty(hash, name); 3175 } 3176 3177 } 3178 3179 @Override 3180 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3181 switch (hash) { 3182 case 3292052: /*kind*/ return new String[] {"code"}; 3183 case -1795452264: /*expression*/ return new String[] {"Expression"}; 3184 default: return super.getTypesForProperty(hash, name); 3185 } 3186 3187 } 3188 3189 @Override 3190 public Base addChild(String name) throws FHIRException { 3191 if (name.equals("kind")) { 3192 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.kind"); 3193 } 3194 else if (name.equals("expression")) { 3195 this.expression = new Expression(); 3196 return this.expression; 3197 } 3198 else 3199 return super.addChild(name); 3200 } 3201 3202 public RequestGroupActionConditionComponent copy() { 3203 RequestGroupActionConditionComponent dst = new RequestGroupActionConditionComponent(); 3204 copyValues(dst); 3205 dst.kind = kind == null ? null : kind.copy(); 3206 dst.expression = expression == null ? null : expression.copy(); 3207 return dst; 3208 } 3209 3210 @Override 3211 public boolean equalsDeep(Base other_) { 3212 if (!super.equalsDeep(other_)) 3213 return false; 3214 if (!(other_ instanceof RequestGroupActionConditionComponent)) 3215 return false; 3216 RequestGroupActionConditionComponent o = (RequestGroupActionConditionComponent) other_; 3217 return compareDeep(kind, o.kind, true) && compareDeep(expression, o.expression, true); 3218 } 3219 3220 @Override 3221 public boolean equalsShallow(Base other_) { 3222 if (!super.equalsShallow(other_)) 3223 return false; 3224 if (!(other_ instanceof RequestGroupActionConditionComponent)) 3225 return false; 3226 RequestGroupActionConditionComponent o = (RequestGroupActionConditionComponent) other_; 3227 return compareValues(kind, o.kind, true); 3228 } 3229 3230 public boolean isEmpty() { 3231 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, expression); 3232 } 3233 3234 public String fhirType() { 3235 return "RequestGroup.action.condition"; 3236 3237 } 3238 3239 } 3240 3241 @Block() 3242 public static class RequestGroupActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement { 3243 /** 3244 * The element id of the action this is related to. 3245 */ 3246 @Child(name = "actionId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3247 @Description(shortDefinition="What action this is related to", formalDefinition="The element id of the action this is related to." ) 3248 protected IdType actionId; 3249 3250 /** 3251 * The relationship of this action to the related action. 3252 */ 3253 @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 3254 @Description(shortDefinition="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end", formalDefinition="The relationship of this action to the related action." ) 3255 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-relationship-type") 3256 protected Enumeration<ActionRelationshipType> relationship; 3257 3258 /** 3259 * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before. 3260 */ 3261 @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false) 3262 @Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." ) 3263 protected Type offset; 3264 3265 private static final long serialVersionUID = 1063306770L; 3266 3267 /** 3268 * Constructor 3269 */ 3270 public RequestGroupActionRelatedActionComponent() { 3271 super(); 3272 } 3273 3274 /** 3275 * Constructor 3276 */ 3277 public RequestGroupActionRelatedActionComponent(IdType actionId, Enumeration<ActionRelationshipType> relationship) { 3278 super(); 3279 this.actionId = actionId; 3280 this.relationship = relationship; 3281 } 3282 3283 /** 3284 * @return {@link #actionId} (The element id of the action this is related to.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value 3285 */ 3286 public IdType getActionIdElement() { 3287 if (this.actionId == null) 3288 if (Configuration.errorOnAutoCreate()) 3289 throw new Error("Attempt to auto-create RequestGroupActionRelatedActionComponent.actionId"); 3290 else if (Configuration.doAutoCreate()) 3291 this.actionId = new IdType(); // bb 3292 return this.actionId; 3293 } 3294 3295 public boolean hasActionIdElement() { 3296 return this.actionId != null && !this.actionId.isEmpty(); 3297 } 3298 3299 public boolean hasActionId() { 3300 return this.actionId != null && !this.actionId.isEmpty(); 3301 } 3302 3303 /** 3304 * @param value {@link #actionId} (The element id of the action this is related to.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value 3305 */ 3306 public RequestGroupActionRelatedActionComponent setActionIdElement(IdType value) { 3307 this.actionId = value; 3308 return this; 3309 } 3310 3311 /** 3312 * @return The element id of the action this is related to. 3313 */ 3314 public String getActionId() { 3315 return this.actionId == null ? null : this.actionId.getValue(); 3316 } 3317 3318 /** 3319 * @param value The element id of the action this is related to. 3320 */ 3321 public RequestGroupActionRelatedActionComponent setActionId(String value) { 3322 if (this.actionId == null) 3323 this.actionId = new IdType(); 3324 this.actionId.setValue(value); 3325 return this; 3326 } 3327 3328 /** 3329 * @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value 3330 */ 3331 public Enumeration<ActionRelationshipType> getRelationshipElement() { 3332 if (this.relationship == null) 3333 if (Configuration.errorOnAutoCreate()) 3334 throw new Error("Attempt to auto-create RequestGroupActionRelatedActionComponent.relationship"); 3335 else if (Configuration.doAutoCreate()) 3336 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); // bb 3337 return this.relationship; 3338 } 3339 3340 public boolean hasRelationshipElement() { 3341 return this.relationship != null && !this.relationship.isEmpty(); 3342 } 3343 3344 public boolean hasRelationship() { 3345 return this.relationship != null && !this.relationship.isEmpty(); 3346 } 3347 3348 /** 3349 * @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value 3350 */ 3351 public RequestGroupActionRelatedActionComponent setRelationshipElement(Enumeration<ActionRelationshipType> value) { 3352 this.relationship = value; 3353 return this; 3354 } 3355 3356 /** 3357 * @return The relationship of this action to the related action. 3358 */ 3359 public ActionRelationshipType getRelationship() { 3360 return this.relationship == null ? null : this.relationship.getValue(); 3361 } 3362 3363 /** 3364 * @param value The relationship of this action to the related action. 3365 */ 3366 public RequestGroupActionRelatedActionComponent setRelationship(ActionRelationshipType value) { 3367 if (this.relationship == null) 3368 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); 3369 this.relationship.setValue(value); 3370 return this; 3371 } 3372 3373 /** 3374 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 3375 */ 3376 public Type getOffset() { 3377 return this.offset; 3378 } 3379 3380 /** 3381 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 3382 */ 3383 public Duration getOffsetDuration() throws FHIRException { 3384 if (this.offset == null) 3385 this.offset = new Duration(); 3386 if (!(this.offset instanceof Duration)) 3387 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); 3388 return (Duration) this.offset; 3389 } 3390 3391 public boolean hasOffsetDuration() { 3392 return this != null && this.offset instanceof Duration; 3393 } 3394 3395 /** 3396 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 3397 */ 3398 public Range getOffsetRange() throws FHIRException { 3399 if (this.offset == null) 3400 this.offset = new Range(); 3401 if (!(this.offset instanceof Range)) 3402 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered"); 3403 return (Range) this.offset; 3404 } 3405 3406 public boolean hasOffsetRange() { 3407 return this != null && this.offset instanceof Range; 3408 } 3409 3410 public boolean hasOffset() { 3411 return this.offset != null && !this.offset.isEmpty(); 3412 } 3413 3414 /** 3415 * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 3416 */ 3417 public RequestGroupActionRelatedActionComponent setOffset(Type value) { 3418 if (value != null && !(value instanceof Duration || value instanceof Range)) 3419 throw new Error("Not the right type for RequestGroup.action.relatedAction.offset[x]: "+value.fhirType()); 3420 this.offset = value; 3421 return this; 3422 } 3423 3424 protected void listChildren(List<Property> children) { 3425 super.listChildren(children); 3426 children.add(new Property("actionId", "id", "The element id of the action this is related to.", 0, 1, actionId)); 3427 children.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship)); 3428 children.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset)); 3429 } 3430 3431 @Override 3432 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3433 switch (_hash) { 3434 case -1656172047: /*actionId*/ return new Property("actionId", "id", "The element id of the action this is related to.", 0, 1, actionId); 3435 case -261851592: /*relationship*/ return new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship); 3436 case -1960684787: /*offset[x]*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 3437 case -1019779949: /*offset*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 3438 case 134075207: /*offsetDuration*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 3439 case 1263585386: /*offsetRange*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 3440 default: return super.getNamedProperty(_hash, _name, _checkValid); 3441 } 3442 3443 } 3444 3445 @Override 3446 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3447 switch (hash) { 3448 case -1656172047: /*actionId*/ return this.actionId == null ? new Base[0] : new Base[] {this.actionId}; // IdType 3449 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType> 3450 case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type 3451 default: return super.getProperty(hash, name, checkValid); 3452 } 3453 3454 } 3455 3456 @Override 3457 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3458 switch (hash) { 3459 case -1656172047: // actionId 3460 this.actionId = castToId(value); // IdType 3461 return value; 3462 case -261851592: // relationship 3463 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 3464 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 3465 return value; 3466 case -1019779949: // offset 3467 this.offset = castToType(value); // Type 3468 return value; 3469 default: return super.setProperty(hash, name, value); 3470 } 3471 3472 } 3473 3474 @Override 3475 public Base setProperty(String name, Base value) throws FHIRException { 3476 if (name.equals("actionId")) { 3477 this.actionId = castToId(value); // IdType 3478 } else if (name.equals("relationship")) { 3479 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 3480 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 3481 } else if (name.equals("offset[x]")) { 3482 this.offset = castToType(value); // Type 3483 } else 3484 return super.setProperty(name, value); 3485 return value; 3486 } 3487 3488 @Override 3489 public Base makeProperty(int hash, String name) throws FHIRException { 3490 switch (hash) { 3491 case -1656172047: return getActionIdElement(); 3492 case -261851592: return getRelationshipElement(); 3493 case -1960684787: return getOffset(); 3494 case -1019779949: return getOffset(); 3495 default: return super.makeProperty(hash, name); 3496 } 3497 3498 } 3499 3500 @Override 3501 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3502 switch (hash) { 3503 case -1656172047: /*actionId*/ return new String[] {"id"}; 3504 case -261851592: /*relationship*/ return new String[] {"code"}; 3505 case -1019779949: /*offset*/ return new String[] {"Duration", "Range"}; 3506 default: return super.getTypesForProperty(hash, name); 3507 } 3508 3509 } 3510 3511 @Override 3512 public Base addChild(String name) throws FHIRException { 3513 if (name.equals("actionId")) { 3514 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.actionId"); 3515 } 3516 else if (name.equals("relationship")) { 3517 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.relationship"); 3518 } 3519 else if (name.equals("offsetDuration")) { 3520 this.offset = new Duration(); 3521 return this.offset; 3522 } 3523 else if (name.equals("offsetRange")) { 3524 this.offset = new Range(); 3525 return this.offset; 3526 } 3527 else 3528 return super.addChild(name); 3529 } 3530 3531 public RequestGroupActionRelatedActionComponent copy() { 3532 RequestGroupActionRelatedActionComponent dst = new RequestGroupActionRelatedActionComponent(); 3533 copyValues(dst); 3534 dst.actionId = actionId == null ? null : actionId.copy(); 3535 dst.relationship = relationship == null ? null : relationship.copy(); 3536 dst.offset = offset == null ? null : offset.copy(); 3537 return dst; 3538 } 3539 3540 @Override 3541 public boolean equalsDeep(Base other_) { 3542 if (!super.equalsDeep(other_)) 3543 return false; 3544 if (!(other_ instanceof RequestGroupActionRelatedActionComponent)) 3545 return false; 3546 RequestGroupActionRelatedActionComponent o = (RequestGroupActionRelatedActionComponent) other_; 3547 return compareDeep(actionId, o.actionId, true) && compareDeep(relationship, o.relationship, true) 3548 && compareDeep(offset, o.offset, true); 3549 } 3550 3551 @Override 3552 public boolean equalsShallow(Base other_) { 3553 if (!super.equalsShallow(other_)) 3554 return false; 3555 if (!(other_ instanceof RequestGroupActionRelatedActionComponent)) 3556 return false; 3557 RequestGroupActionRelatedActionComponent o = (RequestGroupActionRelatedActionComponent) other_; 3558 return compareValues(actionId, o.actionId, true) && compareValues(relationship, o.relationship, true) 3559 ; 3560 } 3561 3562 public boolean isEmpty() { 3563 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionId, relationship, offset 3564 ); 3565 } 3566 3567 public String fhirType() { 3568 return "RequestGroup.action.relatedAction"; 3569 3570 } 3571 3572 } 3573 3574 /** 3575 * Allows a service to provide a unique, business identifier for the request. 3576 */ 3577 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3578 @Description(shortDefinition="Business identifier", formalDefinition="Allows a service to provide a unique, business identifier for the request." ) 3579 protected List<Identifier> identifier; 3580 3581 /** 3582 * A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request. 3583 */ 3584 @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3585 @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." ) 3586 protected List<CanonicalType> instantiatesCanonical; 3587 3588 /** 3589 * A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request. 3590 */ 3591 @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3592 @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." ) 3593 protected List<UriType> instantiatesUri; 3594 3595 /** 3596 * A plan, proposal or order that is fulfilled in whole or in part by this request. 3597 */ 3598 @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3599 @Description(shortDefinition="Fulfills plan, proposal, or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this request." ) 3600 protected List<Reference> basedOn; 3601 /** 3602 * The actual objects that are the target of the reference (A plan, proposal or order that is fulfilled in whole or in part by this request.) 3603 */ 3604 protected List<Resource> basedOnTarget; 3605 3606 3607 /** 3608 * Completed or terminated request(s) whose function is taken by this new request. 3609 */ 3610 @Child(name = "replaces", type = {Reference.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3611 @Description(shortDefinition="Request(s) replaced by this request", formalDefinition="Completed or terminated request(s) whose function is taken by this new request." ) 3612 protected List<Reference> replaces; 3613 /** 3614 * The actual objects that are the target of the reference (Completed or terminated request(s) whose function is taken by this new request.) 3615 */ 3616 protected List<Resource> replacesTarget; 3617 3618 3619 /** 3620 * A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form. 3621 */ 3622 @Child(name = "groupIdentifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) 3623 @Description(shortDefinition="Composite request this is part of", formalDefinition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form." ) 3624 protected Identifier groupIdentifier; 3625 3626 /** 3627 * The current state of the request. For request groups, the status reflects the status of all the requests in the group. 3628 */ 3629 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 3630 @Description(shortDefinition="draft | active | suspended | cancelled | completed | entered-in-error | unknown", formalDefinition="The current state of the request. For request groups, the status reflects the status of all the requests in the group." ) 3631 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status") 3632 protected Enumeration<RequestStatus> status; 3633 3634 /** 3635 * Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain. 3636 */ 3637 @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true) 3638 @Description(shortDefinition="proposal | plan | order", formalDefinition="Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain." ) 3639 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent") 3640 protected Enumeration<RequestIntent> intent; 3641 3642 /** 3643 * Indicates how quickly the request should be addressed with respect to other requests. 3644 */ 3645 @Child(name = "priority", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 3646 @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the request should be addressed with respect to other requests." ) 3647 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 3648 protected Enumeration<RequestPriority> priority; 3649 3650 /** 3651 * A code that identifies what the overall request group is. 3652 */ 3653 @Child(name = "code", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) 3654 @Description(shortDefinition="What's being requested/ordered", formalDefinition="A code that identifies what the overall request group is." ) 3655 protected CodeableConcept code; 3656 3657 /** 3658 * The subject for which the request group was created. 3659 */ 3660 @Child(name = "subject", type = {Patient.class, Group.class}, order=10, min=0, max=1, modifier=false, summary=false) 3661 @Description(shortDefinition="Who the request group is about", formalDefinition="The subject for which the request group was created." ) 3662 protected Reference subject; 3663 3664 /** 3665 * The actual object that is the target of the reference (The subject for which the request group was created.) 3666 */ 3667 protected Resource subjectTarget; 3668 3669 /** 3670 * Describes the context of the request group, if any. 3671 */ 3672 @Child(name = "encounter", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=false) 3673 @Description(shortDefinition="Created as part of", formalDefinition="Describes the context of the request group, if any." ) 3674 protected Reference encounter; 3675 3676 /** 3677 * The actual object that is the target of the reference (Describes the context of the request group, if any.) 3678 */ 3679 protected Encounter encounterTarget; 3680 3681 /** 3682 * Indicates when the request group was created. 3683 */ 3684 @Child(name = "authoredOn", type = {DateTimeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 3685 @Description(shortDefinition="When the request group was authored", formalDefinition="Indicates when the request group was created." ) 3686 protected DateTimeType authoredOn; 3687 3688 /** 3689 * Provides a reference to the author of the request group. 3690 */ 3691 @Child(name = "author", type = {Device.class, Practitioner.class, PractitionerRole.class}, order=13, min=0, max=1, modifier=false, summary=false) 3692 @Description(shortDefinition="Device or practitioner that authored the request group", formalDefinition="Provides a reference to the author of the request group." ) 3693 protected Reference author; 3694 3695 /** 3696 * The actual object that is the target of the reference (Provides a reference to the author of the request group.) 3697 */ 3698 protected Resource authorTarget; 3699 3700 /** 3701 * Describes the reason for the request group in coded or textual form. 3702 */ 3703 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3704 @Description(shortDefinition="Why the request group is needed", formalDefinition="Describes the reason for the request group in coded or textual form." ) 3705 protected List<CodeableConcept> reasonCode; 3706 3707 /** 3708 * Indicates another resource whose existence justifies this request group. 3709 */ 3710 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3711 @Description(shortDefinition="Why the request group is needed", formalDefinition="Indicates another resource whose existence justifies this request group." ) 3712 protected List<Reference> reasonReference; 3713 /** 3714 * The actual objects that are the target of the reference (Indicates another resource whose existence justifies this request group.) 3715 */ 3716 protected List<Resource> reasonReferenceTarget; 3717 3718 3719 /** 3720 * Provides a mechanism to communicate additional information about the response. 3721 */ 3722 @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3723 @Description(shortDefinition="Additional notes about the response", formalDefinition="Provides a mechanism to communicate additional information about the response." ) 3724 protected List<Annotation> note; 3725 3726 /** 3727 * The actions, if any, produced by the evaluation of the artifact. 3728 */ 3729 @Child(name = "action", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3730 @Description(shortDefinition="Proposed actions, if any", formalDefinition="The actions, if any, produced by the evaluation of the artifact." ) 3731 protected List<RequestGroupActionComponent> action; 3732 3733 private static final long serialVersionUID = -2053492070L; 3734 3735 /** 3736 * Constructor 3737 */ 3738 public RequestGroup() { 3739 super(); 3740 } 3741 3742 /** 3743 * Constructor 3744 */ 3745 public RequestGroup(Enumeration<RequestStatus> status, Enumeration<RequestIntent> intent) { 3746 super(); 3747 this.status = status; 3748 this.intent = intent; 3749 } 3750 3751 /** 3752 * @return {@link #identifier} (Allows a service to provide a unique, business identifier for the request.) 3753 */ 3754 public List<Identifier> getIdentifier() { 3755 if (this.identifier == null) 3756 this.identifier = new ArrayList<Identifier>(); 3757 return this.identifier; 3758 } 3759 3760 /** 3761 * @return Returns a reference to <code>this</code> for easy method chaining 3762 */ 3763 public RequestGroup setIdentifier(List<Identifier> theIdentifier) { 3764 this.identifier = theIdentifier; 3765 return this; 3766 } 3767 3768 public boolean hasIdentifier() { 3769 if (this.identifier == null) 3770 return false; 3771 for (Identifier item : this.identifier) 3772 if (!item.isEmpty()) 3773 return true; 3774 return false; 3775 } 3776 3777 public Identifier addIdentifier() { //3 3778 Identifier t = new Identifier(); 3779 if (this.identifier == null) 3780 this.identifier = new ArrayList<Identifier>(); 3781 this.identifier.add(t); 3782 return t; 3783 } 3784 3785 public RequestGroup addIdentifier(Identifier t) { //3 3786 if (t == null) 3787 return this; 3788 if (this.identifier == null) 3789 this.identifier = new ArrayList<Identifier>(); 3790 this.identifier.add(t); 3791 return this; 3792 } 3793 3794 /** 3795 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 3796 */ 3797 public Identifier getIdentifierFirstRep() { 3798 if (getIdentifier().isEmpty()) { 3799 addIdentifier(); 3800 } 3801 return getIdentifier().get(0); 3802 } 3803 3804 /** 3805 * @return {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3806 */ 3807 public List<CanonicalType> getInstantiatesCanonical() { 3808 if (this.instantiatesCanonical == null) 3809 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3810 return this.instantiatesCanonical; 3811 } 3812 3813 /** 3814 * @return Returns a reference to <code>this</code> for easy method chaining 3815 */ 3816 public RequestGroup setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 3817 this.instantiatesCanonical = theInstantiatesCanonical; 3818 return this; 3819 } 3820 3821 public boolean hasInstantiatesCanonical() { 3822 if (this.instantiatesCanonical == null) 3823 return false; 3824 for (CanonicalType item : this.instantiatesCanonical) 3825 if (!item.isEmpty()) 3826 return true; 3827 return false; 3828 } 3829 3830 /** 3831 * @return {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3832 */ 3833 public CanonicalType addInstantiatesCanonicalElement() {//2 3834 CanonicalType t = new CanonicalType(); 3835 if (this.instantiatesCanonical == null) 3836 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3837 this.instantiatesCanonical.add(t); 3838 return t; 3839 } 3840 3841 /** 3842 * @param value {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3843 */ 3844 public RequestGroup addInstantiatesCanonical(String value) { //1 3845 CanonicalType t = new CanonicalType(); 3846 t.setValue(value); 3847 if (this.instantiatesCanonical == null) 3848 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3849 this.instantiatesCanonical.add(t); 3850 return this; 3851 } 3852 3853 /** 3854 * @param value {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3855 */ 3856 public boolean hasInstantiatesCanonical(String value) { 3857 if (this.instantiatesCanonical == null) 3858 return false; 3859 for (CanonicalType v : this.instantiatesCanonical) 3860 if (v.getValue().equals(value)) // canonical 3861 return true; 3862 return false; 3863 } 3864 3865 /** 3866 * @return {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3867 */ 3868 public List<UriType> getInstantiatesUri() { 3869 if (this.instantiatesUri == null) 3870 this.instantiatesUri = new ArrayList<UriType>(); 3871 return this.instantiatesUri; 3872 } 3873 3874 /** 3875 * @return Returns a reference to <code>this</code> for easy method chaining 3876 */ 3877 public RequestGroup setInstantiatesUri(List<UriType> theInstantiatesUri) { 3878 this.instantiatesUri = theInstantiatesUri; 3879 return this; 3880 } 3881 3882 public boolean hasInstantiatesUri() { 3883 if (this.instantiatesUri == null) 3884 return false; 3885 for (UriType item : this.instantiatesUri) 3886 if (!item.isEmpty()) 3887 return true; 3888 return false; 3889 } 3890 3891 /** 3892 * @return {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3893 */ 3894 public UriType addInstantiatesUriElement() {//2 3895 UriType t = new UriType(); 3896 if (this.instantiatesUri == null) 3897 this.instantiatesUri = new ArrayList<UriType>(); 3898 this.instantiatesUri.add(t); 3899 return t; 3900 } 3901 3902 /** 3903 * @param value {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3904 */ 3905 public RequestGroup addInstantiatesUri(String value) { //1 3906 UriType t = new UriType(); 3907 t.setValue(value); 3908 if (this.instantiatesUri == null) 3909 this.instantiatesUri = new ArrayList<UriType>(); 3910 this.instantiatesUri.add(t); 3911 return this; 3912 } 3913 3914 /** 3915 * @param value {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.) 3916 */ 3917 public boolean hasInstantiatesUri(String value) { 3918 if (this.instantiatesUri == null) 3919 return false; 3920 for (UriType v : this.instantiatesUri) 3921 if (v.getValue().equals(value)) // uri 3922 return true; 3923 return false; 3924 } 3925 3926 /** 3927 * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this request.) 3928 */ 3929 public List<Reference> getBasedOn() { 3930 if (this.basedOn == null) 3931 this.basedOn = new ArrayList<Reference>(); 3932 return this.basedOn; 3933 } 3934 3935 /** 3936 * @return Returns a reference to <code>this</code> for easy method chaining 3937 */ 3938 public RequestGroup setBasedOn(List<Reference> theBasedOn) { 3939 this.basedOn = theBasedOn; 3940 return this; 3941 } 3942 3943 public boolean hasBasedOn() { 3944 if (this.basedOn == null) 3945 return false; 3946 for (Reference item : this.basedOn) 3947 if (!item.isEmpty()) 3948 return true; 3949 return false; 3950 } 3951 3952 public Reference addBasedOn() { //3 3953 Reference t = new Reference(); 3954 if (this.basedOn == null) 3955 this.basedOn = new ArrayList<Reference>(); 3956 this.basedOn.add(t); 3957 return t; 3958 } 3959 3960 public RequestGroup addBasedOn(Reference t) { //3 3961 if (t == null) 3962 return this; 3963 if (this.basedOn == null) 3964 this.basedOn = new ArrayList<Reference>(); 3965 this.basedOn.add(t); 3966 return this; 3967 } 3968 3969 /** 3970 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 3971 */ 3972 public Reference getBasedOnFirstRep() { 3973 if (getBasedOn().isEmpty()) { 3974 addBasedOn(); 3975 } 3976 return getBasedOn().get(0); 3977 } 3978 3979 /** 3980 * @deprecated Use Reference#setResource(IBaseResource) instead 3981 */ 3982 @Deprecated 3983 public List<Resource> getBasedOnTarget() { 3984 if (this.basedOnTarget == null) 3985 this.basedOnTarget = new ArrayList<Resource>(); 3986 return this.basedOnTarget; 3987 } 3988 3989 /** 3990 * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) 3991 */ 3992 public List<Reference> getReplaces() { 3993 if (this.replaces == null) 3994 this.replaces = new ArrayList<Reference>(); 3995 return this.replaces; 3996 } 3997 3998 /** 3999 * @return Returns a reference to <code>this</code> for easy method chaining 4000 */ 4001 public RequestGroup setReplaces(List<Reference> theReplaces) { 4002 this.replaces = theReplaces; 4003 return this; 4004 } 4005 4006 public boolean hasReplaces() { 4007 if (this.replaces == null) 4008 return false; 4009 for (Reference item : this.replaces) 4010 if (!item.isEmpty()) 4011 return true; 4012 return false; 4013 } 4014 4015 public Reference addReplaces() { //3 4016 Reference t = new Reference(); 4017 if (this.replaces == null) 4018 this.replaces = new ArrayList<Reference>(); 4019 this.replaces.add(t); 4020 return t; 4021 } 4022 4023 public RequestGroup addReplaces(Reference t) { //3 4024 if (t == null) 4025 return this; 4026 if (this.replaces == null) 4027 this.replaces = new ArrayList<Reference>(); 4028 this.replaces.add(t); 4029 return this; 4030 } 4031 4032 /** 4033 * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist 4034 */ 4035 public Reference getReplacesFirstRep() { 4036 if (getReplaces().isEmpty()) { 4037 addReplaces(); 4038 } 4039 return getReplaces().get(0); 4040 } 4041 4042 /** 4043 * @deprecated Use Reference#setResource(IBaseResource) instead 4044 */ 4045 @Deprecated 4046 public List<Resource> getReplacesTarget() { 4047 if (this.replacesTarget == null) 4048 this.replacesTarget = new ArrayList<Resource>(); 4049 return this.replacesTarget; 4050 } 4051 4052 /** 4053 * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) 4054 */ 4055 public Identifier getGroupIdentifier() { 4056 if (this.groupIdentifier == null) 4057 if (Configuration.errorOnAutoCreate()) 4058 throw new Error("Attempt to auto-create RequestGroup.groupIdentifier"); 4059 else if (Configuration.doAutoCreate()) 4060 this.groupIdentifier = new Identifier(); // cc 4061 return this.groupIdentifier; 4062 } 4063 4064 public boolean hasGroupIdentifier() { 4065 return this.groupIdentifier != null && !this.groupIdentifier.isEmpty(); 4066 } 4067 4068 /** 4069 * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) 4070 */ 4071 public RequestGroup setGroupIdentifier(Identifier value) { 4072 this.groupIdentifier = value; 4073 return this; 4074 } 4075 4076 /** 4077 * @return {@link #status} (The current state of the request. For request groups, the status reflects the status of all the requests in the group.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4078 */ 4079 public Enumeration<RequestStatus> getStatusElement() { 4080 if (this.status == null) 4081 if (Configuration.errorOnAutoCreate()) 4082 throw new Error("Attempt to auto-create RequestGroup.status"); 4083 else if (Configuration.doAutoCreate()) 4084 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb 4085 return this.status; 4086 } 4087 4088 public boolean hasStatusElement() { 4089 return this.status != null && !this.status.isEmpty(); 4090 } 4091 4092 public boolean hasStatus() { 4093 return this.status != null && !this.status.isEmpty(); 4094 } 4095 4096 /** 4097 * @param value {@link #status} (The current state of the request. For request groups, the status reflects the status of all the requests in the group.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4098 */ 4099 public RequestGroup setStatusElement(Enumeration<RequestStatus> value) { 4100 this.status = value; 4101 return this; 4102 } 4103 4104 /** 4105 * @return The current state of the request. For request groups, the status reflects the status of all the requests in the group. 4106 */ 4107 public RequestStatus getStatus() { 4108 return this.status == null ? null : this.status.getValue(); 4109 } 4110 4111 /** 4112 * @param value The current state of the request. For request groups, the status reflects the status of all the requests in the group. 4113 */ 4114 public RequestGroup setStatus(RequestStatus value) { 4115 if (this.status == null) 4116 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); 4117 this.status.setValue(value); 4118 return this; 4119 } 4120 4121 /** 4122 * @return {@link #intent} (Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 4123 */ 4124 public Enumeration<RequestIntent> getIntentElement() { 4125 if (this.intent == null) 4126 if (Configuration.errorOnAutoCreate()) 4127 throw new Error("Attempt to auto-create RequestGroup.intent"); 4128 else if (Configuration.doAutoCreate()) 4129 this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb 4130 return this.intent; 4131 } 4132 4133 public boolean hasIntentElement() { 4134 return this.intent != null && !this.intent.isEmpty(); 4135 } 4136 4137 public boolean hasIntent() { 4138 return this.intent != null && !this.intent.isEmpty(); 4139 } 4140 4141 /** 4142 * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 4143 */ 4144 public RequestGroup setIntentElement(Enumeration<RequestIntent> value) { 4145 this.intent = value; 4146 return this; 4147 } 4148 4149 /** 4150 * @return Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain. 4151 */ 4152 public RequestIntent getIntent() { 4153 return this.intent == null ? null : this.intent.getValue(); 4154 } 4155 4156 /** 4157 * @param value Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain. 4158 */ 4159 public RequestGroup setIntent(RequestIntent value) { 4160 if (this.intent == null) 4161 this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); 4162 this.intent.setValue(value); 4163 return this; 4164 } 4165 4166 /** 4167 * @return {@link #priority} (Indicates how quickly the request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 4168 */ 4169 public Enumeration<RequestPriority> getPriorityElement() { 4170 if (this.priority == null) 4171 if (Configuration.errorOnAutoCreate()) 4172 throw new Error("Attempt to auto-create RequestGroup.priority"); 4173 else if (Configuration.doAutoCreate()) 4174 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb 4175 return this.priority; 4176 } 4177 4178 public boolean hasPriorityElement() { 4179 return this.priority != null && !this.priority.isEmpty(); 4180 } 4181 4182 public boolean hasPriority() { 4183 return this.priority != null && !this.priority.isEmpty(); 4184 } 4185 4186 /** 4187 * @param value {@link #priority} (Indicates how quickly the request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 4188 */ 4189 public RequestGroup setPriorityElement(Enumeration<RequestPriority> value) { 4190 this.priority = value; 4191 return this; 4192 } 4193 4194 /** 4195 * @return Indicates how quickly the request should be addressed with respect to other requests. 4196 */ 4197 public RequestPriority getPriority() { 4198 return this.priority == null ? null : this.priority.getValue(); 4199 } 4200 4201 /** 4202 * @param value Indicates how quickly the request should be addressed with respect to other requests. 4203 */ 4204 public RequestGroup setPriority(RequestPriority value) { 4205 if (value == null) 4206 this.priority = null; 4207 else { 4208 if (this.priority == null) 4209 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); 4210 this.priority.setValue(value); 4211 } 4212 return this; 4213 } 4214 4215 /** 4216 * @return {@link #code} (A code that identifies what the overall request group is.) 4217 */ 4218 public CodeableConcept getCode() { 4219 if (this.code == null) 4220 if (Configuration.errorOnAutoCreate()) 4221 throw new Error("Attempt to auto-create RequestGroup.code"); 4222 else if (Configuration.doAutoCreate()) 4223 this.code = new CodeableConcept(); // cc 4224 return this.code; 4225 } 4226 4227 public boolean hasCode() { 4228 return this.code != null && !this.code.isEmpty(); 4229 } 4230 4231 /** 4232 * @param value {@link #code} (A code that identifies what the overall request group is.) 4233 */ 4234 public RequestGroup setCode(CodeableConcept value) { 4235 this.code = value; 4236 return this; 4237 } 4238 4239 /** 4240 * @return {@link #subject} (The subject for which the request group was created.) 4241 */ 4242 public Reference getSubject() { 4243 if (this.subject == null) 4244 if (Configuration.errorOnAutoCreate()) 4245 throw new Error("Attempt to auto-create RequestGroup.subject"); 4246 else if (Configuration.doAutoCreate()) 4247 this.subject = new Reference(); // cc 4248 return this.subject; 4249 } 4250 4251 public boolean hasSubject() { 4252 return this.subject != null && !this.subject.isEmpty(); 4253 } 4254 4255 /** 4256 * @param value {@link #subject} (The subject for which the request group was created.) 4257 */ 4258 public RequestGroup setSubject(Reference value) { 4259 this.subject = value; 4260 return this; 4261 } 4262 4263 /** 4264 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject for which the request group was created.) 4265 */ 4266 public Resource getSubjectTarget() { 4267 return this.subjectTarget; 4268 } 4269 4270 /** 4271 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject for which the request group was created.) 4272 */ 4273 public RequestGroup setSubjectTarget(Resource value) { 4274 this.subjectTarget = value; 4275 return this; 4276 } 4277 4278 /** 4279 * @return {@link #encounter} (Describes the context of the request group, if any.) 4280 */ 4281 public Reference getEncounter() { 4282 if (this.encounter == null) 4283 if (Configuration.errorOnAutoCreate()) 4284 throw new Error("Attempt to auto-create RequestGroup.encounter"); 4285 else if (Configuration.doAutoCreate()) 4286 this.encounter = new Reference(); // cc 4287 return this.encounter; 4288 } 4289 4290 public boolean hasEncounter() { 4291 return this.encounter != null && !this.encounter.isEmpty(); 4292 } 4293 4294 /** 4295 * @param value {@link #encounter} (Describes the context of the request group, if any.) 4296 */ 4297 public RequestGroup setEncounter(Reference value) { 4298 this.encounter = value; 4299 return this; 4300 } 4301 4302 /** 4303 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the context of the request group, if any.) 4304 */ 4305 public Encounter getEncounterTarget() { 4306 if (this.encounterTarget == null) 4307 if (Configuration.errorOnAutoCreate()) 4308 throw new Error("Attempt to auto-create RequestGroup.encounter"); 4309 else if (Configuration.doAutoCreate()) 4310 this.encounterTarget = new Encounter(); // aa 4311 return this.encounterTarget; 4312 } 4313 4314 /** 4315 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the context of the request group, if any.) 4316 */ 4317 public RequestGroup setEncounterTarget(Encounter value) { 4318 this.encounterTarget = value; 4319 return this; 4320 } 4321 4322 /** 4323 * @return {@link #authoredOn} (Indicates when the request group was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 4324 */ 4325 public DateTimeType getAuthoredOnElement() { 4326 if (this.authoredOn == null) 4327 if (Configuration.errorOnAutoCreate()) 4328 throw new Error("Attempt to auto-create RequestGroup.authoredOn"); 4329 else if (Configuration.doAutoCreate()) 4330 this.authoredOn = new DateTimeType(); // bb 4331 return this.authoredOn; 4332 } 4333 4334 public boolean hasAuthoredOnElement() { 4335 return this.authoredOn != null && !this.authoredOn.isEmpty(); 4336 } 4337 4338 public boolean hasAuthoredOn() { 4339 return this.authoredOn != null && !this.authoredOn.isEmpty(); 4340 } 4341 4342 /** 4343 * @param value {@link #authoredOn} (Indicates when the request group was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 4344 */ 4345 public RequestGroup setAuthoredOnElement(DateTimeType value) { 4346 this.authoredOn = value; 4347 return this; 4348 } 4349 4350 /** 4351 * @return Indicates when the request group was created. 4352 */ 4353 public Date getAuthoredOn() { 4354 return this.authoredOn == null ? null : this.authoredOn.getValue(); 4355 } 4356 4357 /** 4358 * @param value Indicates when the request group was created. 4359 */ 4360 public RequestGroup setAuthoredOn(Date value) { 4361 if (value == null) 4362 this.authoredOn = null; 4363 else { 4364 if (this.authoredOn == null) 4365 this.authoredOn = new DateTimeType(); 4366 this.authoredOn.setValue(value); 4367 } 4368 return this; 4369 } 4370 4371 /** 4372 * @return {@link #author} (Provides a reference to the author of the request group.) 4373 */ 4374 public Reference getAuthor() { 4375 if (this.author == null) 4376 if (Configuration.errorOnAutoCreate()) 4377 throw new Error("Attempt to auto-create RequestGroup.author"); 4378 else if (Configuration.doAutoCreate()) 4379 this.author = new Reference(); // cc 4380 return this.author; 4381 } 4382 4383 public boolean hasAuthor() { 4384 return this.author != null && !this.author.isEmpty(); 4385 } 4386 4387 /** 4388 * @param value {@link #author} (Provides a reference to the author of the request group.) 4389 */ 4390 public RequestGroup setAuthor(Reference value) { 4391 this.author = value; 4392 return this; 4393 } 4394 4395 /** 4396 * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Provides a reference to the author of the request group.) 4397 */ 4398 public Resource getAuthorTarget() { 4399 return this.authorTarget; 4400 } 4401 4402 /** 4403 * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Provides a reference to the author of the request group.) 4404 */ 4405 public RequestGroup setAuthorTarget(Resource value) { 4406 this.authorTarget = value; 4407 return this; 4408 } 4409 4410 /** 4411 * @return {@link #reasonCode} (Describes the reason for the request group in coded or textual form.) 4412 */ 4413 public List<CodeableConcept> getReasonCode() { 4414 if (this.reasonCode == null) 4415 this.reasonCode = new ArrayList<CodeableConcept>(); 4416 return this.reasonCode; 4417 } 4418 4419 /** 4420 * @return Returns a reference to <code>this</code> for easy method chaining 4421 */ 4422 public RequestGroup setReasonCode(List<CodeableConcept> theReasonCode) { 4423 this.reasonCode = theReasonCode; 4424 return this; 4425 } 4426 4427 public boolean hasReasonCode() { 4428 if (this.reasonCode == null) 4429 return false; 4430 for (CodeableConcept item : this.reasonCode) 4431 if (!item.isEmpty()) 4432 return true; 4433 return false; 4434 } 4435 4436 public CodeableConcept addReasonCode() { //3 4437 CodeableConcept t = new CodeableConcept(); 4438 if (this.reasonCode == null) 4439 this.reasonCode = new ArrayList<CodeableConcept>(); 4440 this.reasonCode.add(t); 4441 return t; 4442 } 4443 4444 public RequestGroup addReasonCode(CodeableConcept t) { //3 4445 if (t == null) 4446 return this; 4447 if (this.reasonCode == null) 4448 this.reasonCode = new ArrayList<CodeableConcept>(); 4449 this.reasonCode.add(t); 4450 return this; 4451 } 4452 4453 /** 4454 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 4455 */ 4456 public CodeableConcept getReasonCodeFirstRep() { 4457 if (getReasonCode().isEmpty()) { 4458 addReasonCode(); 4459 } 4460 return getReasonCode().get(0); 4461 } 4462 4463 /** 4464 * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request group.) 4465 */ 4466 public List<Reference> getReasonReference() { 4467 if (this.reasonReference == null) 4468 this.reasonReference = new ArrayList<Reference>(); 4469 return this.reasonReference; 4470 } 4471 4472 /** 4473 * @return Returns a reference to <code>this</code> for easy method chaining 4474 */ 4475 public RequestGroup setReasonReference(List<Reference> theReasonReference) { 4476 this.reasonReference = theReasonReference; 4477 return this; 4478 } 4479 4480 public boolean hasReasonReference() { 4481 if (this.reasonReference == null) 4482 return false; 4483 for (Reference item : this.reasonReference) 4484 if (!item.isEmpty()) 4485 return true; 4486 return false; 4487 } 4488 4489 public Reference addReasonReference() { //3 4490 Reference t = new Reference(); 4491 if (this.reasonReference == null) 4492 this.reasonReference = new ArrayList<Reference>(); 4493 this.reasonReference.add(t); 4494 return t; 4495 } 4496 4497 public RequestGroup addReasonReference(Reference t) { //3 4498 if (t == null) 4499 return this; 4500 if (this.reasonReference == null) 4501 this.reasonReference = new ArrayList<Reference>(); 4502 this.reasonReference.add(t); 4503 return this; 4504 } 4505 4506 /** 4507 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 4508 */ 4509 public Reference getReasonReferenceFirstRep() { 4510 if (getReasonReference().isEmpty()) { 4511 addReasonReference(); 4512 } 4513 return getReasonReference().get(0); 4514 } 4515 4516 /** 4517 * @deprecated Use Reference#setResource(IBaseResource) instead 4518 */ 4519 @Deprecated 4520 public List<Resource> getReasonReferenceTarget() { 4521 if (this.reasonReferenceTarget == null) 4522 this.reasonReferenceTarget = new ArrayList<Resource>(); 4523 return this.reasonReferenceTarget; 4524 } 4525 4526 /** 4527 * @return {@link #note} (Provides a mechanism to communicate additional information about the response.) 4528 */ 4529 public List<Annotation> getNote() { 4530 if (this.note == null) 4531 this.note = new ArrayList<Annotation>(); 4532 return this.note; 4533 } 4534 4535 /** 4536 * @return Returns a reference to <code>this</code> for easy method chaining 4537 */ 4538 public RequestGroup setNote(List<Annotation> theNote) { 4539 this.note = theNote; 4540 return this; 4541 } 4542 4543 public boolean hasNote() { 4544 if (this.note == null) 4545 return false; 4546 for (Annotation item : this.note) 4547 if (!item.isEmpty()) 4548 return true; 4549 return false; 4550 } 4551 4552 public Annotation addNote() { //3 4553 Annotation t = new Annotation(); 4554 if (this.note == null) 4555 this.note = new ArrayList<Annotation>(); 4556 this.note.add(t); 4557 return t; 4558 } 4559 4560 public RequestGroup addNote(Annotation t) { //3 4561 if (t == null) 4562 return this; 4563 if (this.note == null) 4564 this.note = new ArrayList<Annotation>(); 4565 this.note.add(t); 4566 return this; 4567 } 4568 4569 /** 4570 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 4571 */ 4572 public Annotation getNoteFirstRep() { 4573 if (getNote().isEmpty()) { 4574 addNote(); 4575 } 4576 return getNote().get(0); 4577 } 4578 4579 /** 4580 * @return {@link #action} (The actions, if any, produced by the evaluation of the artifact.) 4581 */ 4582 public List<RequestGroupActionComponent> getAction() { 4583 if (this.action == null) 4584 this.action = new ArrayList<RequestGroupActionComponent>(); 4585 return this.action; 4586 } 4587 4588 /** 4589 * @return Returns a reference to <code>this</code> for easy method chaining 4590 */ 4591 public RequestGroup setAction(List<RequestGroupActionComponent> theAction) { 4592 this.action = theAction; 4593 return this; 4594 } 4595 4596 public boolean hasAction() { 4597 if (this.action == null) 4598 return false; 4599 for (RequestGroupActionComponent item : this.action) 4600 if (!item.isEmpty()) 4601 return true; 4602 return false; 4603 } 4604 4605 public RequestGroupActionComponent addAction() { //3 4606 RequestGroupActionComponent t = new RequestGroupActionComponent(); 4607 if (this.action == null) 4608 this.action = new ArrayList<RequestGroupActionComponent>(); 4609 this.action.add(t); 4610 return t; 4611 } 4612 4613 public RequestGroup addAction(RequestGroupActionComponent t) { //3 4614 if (t == null) 4615 return this; 4616 if (this.action == null) 4617 this.action = new ArrayList<RequestGroupActionComponent>(); 4618 this.action.add(t); 4619 return this; 4620 } 4621 4622 /** 4623 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 4624 */ 4625 public RequestGroupActionComponent getActionFirstRep() { 4626 if (getAction().isEmpty()) { 4627 addAction(); 4628 } 4629 return getAction().get(0); 4630 } 4631 4632 protected void listChildren(List<Property> children) { 4633 super.listChildren(children); 4634 children.add(new Property("identifier", "Identifier", "Allows a service to provide a unique, business identifier for the request.", 0, java.lang.Integer.MAX_VALUE, identifier)); 4635 children.add(new Property("instantiatesCanonical", "canonical", "A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 4636 children.add(new Property("instantiatesUri", "uri", "A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 4637 children.add(new Property("basedOn", "Reference(Any)", "A plan, proposal or order that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 4638 children.add(new Property("replaces", "Reference(Any)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces)); 4639 children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier)); 4640 children.add(new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status)); 4641 children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent)); 4642 children.add(new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority)); 4643 children.add(new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code)); 4644 children.add(new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject)); 4645 children.add(new Property("encounter", "Reference(Encounter)", "Describes the context of the request group, if any.", 0, 1, encounter)); 4646 children.add(new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn)); 4647 children.add(new Property("author", "Reference(Device|Practitioner|PractitionerRole)", "Provides a reference to the author of the request group.", 0, 1, author)); 4648 children.add(new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 4649 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 4650 children.add(new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note)); 4651 children.add(new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); 4652 } 4653 4654 @Override 4655 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4656 switch (_hash) { 4657 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Allows a service to provide a unique, business identifier for the request.", 0, java.lang.Integer.MAX_VALUE, identifier); 4658 case 8911915: /*instantiatesCanonical*/ return new Property("instantiatesCanonical", "canonical", "A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 4659 case -1926393373: /*instantiatesUri*/ return new Property("instantiatesUri", "uri", "A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 4660 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(Any)", "A plan, proposal or order that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn); 4661 case -430332865: /*replaces*/ return new Property("replaces", "Reference(Any)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces); 4662 case -445338488: /*groupIdentifier*/ return new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier); 4663 case -892481550: /*status*/ return new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status); 4664 case -1183762788: /*intent*/ return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent); 4665 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority); 4666 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code); 4667 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject); 4668 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Describes the context of the request group, if any.", 0, 1, encounter); 4669 case -1500852503: /*authoredOn*/ return new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn); 4670 case -1406328437: /*author*/ return new Property("author", "Reference(Device|Practitioner|PractitionerRole)", "Provides a reference to the author of the request group.", 0, 1, author); 4671 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 4672 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 4673 case 3387378: /*note*/ return new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note); 4674 case -1422950858: /*action*/ return new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action); 4675 default: return super.getNamedProperty(_hash, _name, _checkValid); 4676 } 4677 4678 } 4679 4680 @Override 4681 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4682 switch (hash) { 4683 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4684 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 4685 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 4686 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 4687 case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference 4688 case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier 4689 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus> 4690 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<RequestIntent> 4691 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority> 4692 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 4693 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 4694 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 4695 case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType 4696 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 4697 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 4698 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 4699 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4700 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // RequestGroupActionComponent 4701 default: return super.getProperty(hash, name, checkValid); 4702 } 4703 4704 } 4705 4706 @Override 4707 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4708 switch (hash) { 4709 case -1618432855: // identifier 4710 this.getIdentifier().add(castToIdentifier(value)); // Identifier 4711 return value; 4712 case 8911915: // instantiatesCanonical 4713 this.getInstantiatesCanonical().add(castToCanonical(value)); // CanonicalType 4714 return value; 4715 case -1926393373: // instantiatesUri 4716 this.getInstantiatesUri().add(castToUri(value)); // UriType 4717 return value; 4718 case -332612366: // basedOn 4719 this.getBasedOn().add(castToReference(value)); // Reference 4720 return value; 4721 case -430332865: // replaces 4722 this.getReplaces().add(castToReference(value)); // Reference 4723 return value; 4724 case -445338488: // groupIdentifier 4725 this.groupIdentifier = castToIdentifier(value); // Identifier 4726 return value; 4727 case -892481550: // status 4728 value = new RequestStatusEnumFactory().fromType(castToCode(value)); 4729 this.status = (Enumeration) value; // Enumeration<RequestStatus> 4730 return value; 4731 case -1183762788: // intent 4732 value = new RequestIntentEnumFactory().fromType(castToCode(value)); 4733 this.intent = (Enumeration) value; // Enumeration<RequestIntent> 4734 return value; 4735 case -1165461084: // priority 4736 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 4737 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 4738 return value; 4739 case 3059181: // code 4740 this.code = castToCodeableConcept(value); // CodeableConcept 4741 return value; 4742 case -1867885268: // subject 4743 this.subject = castToReference(value); // Reference 4744 return value; 4745 case 1524132147: // encounter 4746 this.encounter = castToReference(value); // Reference 4747 return value; 4748 case -1500852503: // authoredOn 4749 this.authoredOn = castToDateTime(value); // DateTimeType 4750 return value; 4751 case -1406328437: // author 4752 this.author = castToReference(value); // Reference 4753 return value; 4754 case 722137681: // reasonCode 4755 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 4756 return value; 4757 case -1146218137: // reasonReference 4758 this.getReasonReference().add(castToReference(value)); // Reference 4759 return value; 4760 case 3387378: // note 4761 this.getNote().add(castToAnnotation(value)); // Annotation 4762 return value; 4763 case -1422950858: // action 4764 this.getAction().add((RequestGroupActionComponent) value); // RequestGroupActionComponent 4765 return value; 4766 default: return super.setProperty(hash, name, value); 4767 } 4768 4769 } 4770 4771 @Override 4772 public Base setProperty(String name, Base value) throws FHIRException { 4773 if (name.equals("identifier")) { 4774 this.getIdentifier().add(castToIdentifier(value)); 4775 } else if (name.equals("instantiatesCanonical")) { 4776 this.getInstantiatesCanonical().add(castToCanonical(value)); 4777 } else if (name.equals("instantiatesUri")) { 4778 this.getInstantiatesUri().add(castToUri(value)); 4779 } else if (name.equals("basedOn")) { 4780 this.getBasedOn().add(castToReference(value)); 4781 } else if (name.equals("replaces")) { 4782 this.getReplaces().add(castToReference(value)); 4783 } else if (name.equals("groupIdentifier")) { 4784 this.groupIdentifier = castToIdentifier(value); // Identifier 4785 } else if (name.equals("status")) { 4786 value = new RequestStatusEnumFactory().fromType(castToCode(value)); 4787 this.status = (Enumeration) value; // Enumeration<RequestStatus> 4788 } else if (name.equals("intent")) { 4789 value = new RequestIntentEnumFactory().fromType(castToCode(value)); 4790 this.intent = (Enumeration) value; // Enumeration<RequestIntent> 4791 } else if (name.equals("priority")) { 4792 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 4793 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 4794 } else if (name.equals("code")) { 4795 this.code = castToCodeableConcept(value); // CodeableConcept 4796 } else if (name.equals("subject")) { 4797 this.subject = castToReference(value); // Reference 4798 } else if (name.equals("encounter")) { 4799 this.encounter = castToReference(value); // Reference 4800 } else if (name.equals("authoredOn")) { 4801 this.authoredOn = castToDateTime(value); // DateTimeType 4802 } else if (name.equals("author")) { 4803 this.author = castToReference(value); // Reference 4804 } else if (name.equals("reasonCode")) { 4805 this.getReasonCode().add(castToCodeableConcept(value)); 4806 } else if (name.equals("reasonReference")) { 4807 this.getReasonReference().add(castToReference(value)); 4808 } else if (name.equals("note")) { 4809 this.getNote().add(castToAnnotation(value)); 4810 } else if (name.equals("action")) { 4811 this.getAction().add((RequestGroupActionComponent) value); 4812 } else 4813 return super.setProperty(name, value); 4814 return value; 4815 } 4816 4817 @Override 4818 public Base makeProperty(int hash, String name) throws FHIRException { 4819 switch (hash) { 4820 case -1618432855: return addIdentifier(); 4821 case 8911915: return addInstantiatesCanonicalElement(); 4822 case -1926393373: return addInstantiatesUriElement(); 4823 case -332612366: return addBasedOn(); 4824 case -430332865: return addReplaces(); 4825 case -445338488: return getGroupIdentifier(); 4826 case -892481550: return getStatusElement(); 4827 case -1183762788: return getIntentElement(); 4828 case -1165461084: return getPriorityElement(); 4829 case 3059181: return getCode(); 4830 case -1867885268: return getSubject(); 4831 case 1524132147: return getEncounter(); 4832 case -1500852503: return getAuthoredOnElement(); 4833 case -1406328437: return getAuthor(); 4834 case 722137681: return addReasonCode(); 4835 case -1146218137: return addReasonReference(); 4836 case 3387378: return addNote(); 4837 case -1422950858: return addAction(); 4838 default: return super.makeProperty(hash, name); 4839 } 4840 4841 } 4842 4843 @Override 4844 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4845 switch (hash) { 4846 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 4847 case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"}; 4848 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 4849 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 4850 case -430332865: /*replaces*/ return new String[] {"Reference"}; 4851 case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"}; 4852 case -892481550: /*status*/ return new String[] {"code"}; 4853 case -1183762788: /*intent*/ return new String[] {"code"}; 4854 case -1165461084: /*priority*/ return new String[] {"code"}; 4855 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 4856 case -1867885268: /*subject*/ return new String[] {"Reference"}; 4857 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 4858 case -1500852503: /*authoredOn*/ return new String[] {"dateTime"}; 4859 case -1406328437: /*author*/ return new String[] {"Reference"}; 4860 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 4861 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 4862 case 3387378: /*note*/ return new String[] {"Annotation"}; 4863 case -1422950858: /*action*/ return new String[] {}; 4864 default: return super.getTypesForProperty(hash, name); 4865 } 4866 4867 } 4868 4869 @Override 4870 public Base addChild(String name) throws FHIRException { 4871 if (name.equals("identifier")) { 4872 return addIdentifier(); 4873 } 4874 else if (name.equals("instantiatesCanonical")) { 4875 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.instantiatesCanonical"); 4876 } 4877 else if (name.equals("instantiatesUri")) { 4878 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.instantiatesUri"); 4879 } 4880 else if (name.equals("basedOn")) { 4881 return addBasedOn(); 4882 } 4883 else if (name.equals("replaces")) { 4884 return addReplaces(); 4885 } 4886 else if (name.equals("groupIdentifier")) { 4887 this.groupIdentifier = new Identifier(); 4888 return this.groupIdentifier; 4889 } 4890 else if (name.equals("status")) { 4891 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.status"); 4892 } 4893 else if (name.equals("intent")) { 4894 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.intent"); 4895 } 4896 else if (name.equals("priority")) { 4897 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.priority"); 4898 } 4899 else if (name.equals("code")) { 4900 this.code = new CodeableConcept(); 4901 return this.code; 4902 } 4903 else if (name.equals("subject")) { 4904 this.subject = new Reference(); 4905 return this.subject; 4906 } 4907 else if (name.equals("encounter")) { 4908 this.encounter = new Reference(); 4909 return this.encounter; 4910 } 4911 else if (name.equals("authoredOn")) { 4912 throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.authoredOn"); 4913 } 4914 else if (name.equals("author")) { 4915 this.author = new Reference(); 4916 return this.author; 4917 } 4918 else if (name.equals("reasonCode")) { 4919 return addReasonCode(); 4920 } 4921 else if (name.equals("reasonReference")) { 4922 return addReasonReference(); 4923 } 4924 else if (name.equals("note")) { 4925 return addNote(); 4926 } 4927 else if (name.equals("action")) { 4928 return addAction(); 4929 } 4930 else 4931 return super.addChild(name); 4932 } 4933 4934 public String fhirType() { 4935 return "RequestGroup"; 4936 4937 } 4938 4939 public RequestGroup copy() { 4940 RequestGroup dst = new RequestGroup(); 4941 copyValues(dst); 4942 if (identifier != null) { 4943 dst.identifier = new ArrayList<Identifier>(); 4944 for (Identifier i : identifier) 4945 dst.identifier.add(i.copy()); 4946 }; 4947 if (instantiatesCanonical != null) { 4948 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 4949 for (CanonicalType i : instantiatesCanonical) 4950 dst.instantiatesCanonical.add(i.copy()); 4951 }; 4952 if (instantiatesUri != null) { 4953 dst.instantiatesUri = new ArrayList<UriType>(); 4954 for (UriType i : instantiatesUri) 4955 dst.instantiatesUri.add(i.copy()); 4956 }; 4957 if (basedOn != null) { 4958 dst.basedOn = new ArrayList<Reference>(); 4959 for (Reference i : basedOn) 4960 dst.basedOn.add(i.copy()); 4961 }; 4962 if (replaces != null) { 4963 dst.replaces = new ArrayList<Reference>(); 4964 for (Reference i : replaces) 4965 dst.replaces.add(i.copy()); 4966 }; 4967 dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); 4968 dst.status = status == null ? null : status.copy(); 4969 dst.intent = intent == null ? null : intent.copy(); 4970 dst.priority = priority == null ? null : priority.copy(); 4971 dst.code = code == null ? null : code.copy(); 4972 dst.subject = subject == null ? null : subject.copy(); 4973 dst.encounter = encounter == null ? null : encounter.copy(); 4974 dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); 4975 dst.author = author == null ? null : author.copy(); 4976 if (reasonCode != null) { 4977 dst.reasonCode = new ArrayList<CodeableConcept>(); 4978 for (CodeableConcept i : reasonCode) 4979 dst.reasonCode.add(i.copy()); 4980 }; 4981 if (reasonReference != null) { 4982 dst.reasonReference = new ArrayList<Reference>(); 4983 for (Reference i : reasonReference) 4984 dst.reasonReference.add(i.copy()); 4985 }; 4986 if (note != null) { 4987 dst.note = new ArrayList<Annotation>(); 4988 for (Annotation i : note) 4989 dst.note.add(i.copy()); 4990 }; 4991 if (action != null) { 4992 dst.action = new ArrayList<RequestGroupActionComponent>(); 4993 for (RequestGroupActionComponent i : action) 4994 dst.action.add(i.copy()); 4995 }; 4996 return dst; 4997 } 4998 4999 protected RequestGroup typedCopy() { 5000 return copy(); 5001 } 5002 5003 @Override 5004 public boolean equalsDeep(Base other_) { 5005 if (!super.equalsDeep(other_)) 5006 return false; 5007 if (!(other_ instanceof RequestGroup)) 5008 return false; 5009 RequestGroup o = (RequestGroup) other_; 5010 return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 5011 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true) 5012 && compareDeep(replaces, o.replaces, true) && compareDeep(groupIdentifier, o.groupIdentifier, true) 5013 && compareDeep(status, o.status, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) 5014 && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) 5015 && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(author, o.author, true) && compareDeep(reasonCode, o.reasonCode, true) 5016 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(note, o.note, true) && compareDeep(action, o.action, true) 5017 ; 5018 } 5019 5020 @Override 5021 public boolean equalsShallow(Base other_) { 5022 if (!super.equalsShallow(other_)) 5023 return false; 5024 if (!(other_ instanceof RequestGroup)) 5025 return false; 5026 RequestGroup o = (RequestGroup) other_; 5027 return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true) 5028 && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true) 5029 && compareValues(authoredOn, o.authoredOn, true); 5030 } 5031 5032 public boolean isEmpty() { 5033 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical 5034 , instantiatesUri, basedOn, replaces, groupIdentifier, status, intent, priority 5035 , code, subject, encounter, authoredOn, author, reasonCode, reasonReference, note 5036 , action); 5037 } 5038 5039 @Override 5040 public ResourceType getResourceType() { 5041 return ResourceType.RequestGroup; 5042 } 5043 5044 /** 5045 * Search parameter: <b>authored</b> 5046 * <p> 5047 * Description: <b>The date the request group was authored</b><br> 5048 * Type: <b>date</b><br> 5049 * Path: <b>RequestGroup.authoredOn</b><br> 5050 * </p> 5051 */ 5052 @SearchParamDefinition(name="authored", path="RequestGroup.authoredOn", description="The date the request group was authored", type="date" ) 5053 public static final String SP_AUTHORED = "authored"; 5054 /** 5055 * <b>Fluent Client</b> search parameter constant for <b>authored</b> 5056 * <p> 5057 * Description: <b>The date the request group was authored</b><br> 5058 * Type: <b>date</b><br> 5059 * Path: <b>RequestGroup.authoredOn</b><br> 5060 * </p> 5061 */ 5062 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED); 5063 5064 /** 5065 * Search parameter: <b>identifier</b> 5066 * <p> 5067 * Description: <b>External identifiers for the request group</b><br> 5068 * Type: <b>token</b><br> 5069 * Path: <b>RequestGroup.identifier</b><br> 5070 * </p> 5071 */ 5072 @SearchParamDefinition(name="identifier", path="RequestGroup.identifier", description="External identifiers for the request group", type="token" ) 5073 public static final String SP_IDENTIFIER = "identifier"; 5074 /** 5075 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5076 * <p> 5077 * Description: <b>External identifiers for the request group</b><br> 5078 * Type: <b>token</b><br> 5079 * Path: <b>RequestGroup.identifier</b><br> 5080 * </p> 5081 */ 5082 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5083 5084 /** 5085 * Search parameter: <b>code</b> 5086 * <p> 5087 * Description: <b>The code of the request group</b><br> 5088 * Type: <b>token</b><br> 5089 * Path: <b>RequestGroup.code</b><br> 5090 * </p> 5091 */ 5092 @SearchParamDefinition(name="code", path="RequestGroup.code", description="The code of the request group", type="token" ) 5093 public static final String SP_CODE = "code"; 5094 /** 5095 * <b>Fluent Client</b> search parameter constant for <b>code</b> 5096 * <p> 5097 * Description: <b>The code of the request group</b><br> 5098 * Type: <b>token</b><br> 5099 * Path: <b>RequestGroup.code</b><br> 5100 * </p> 5101 */ 5102 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 5103 5104 /** 5105 * Search parameter: <b>subject</b> 5106 * <p> 5107 * Description: <b>The subject that the request group is about</b><br> 5108 * Type: <b>reference</b><br> 5109 * Path: <b>RequestGroup.subject</b><br> 5110 * </p> 5111 */ 5112 @SearchParamDefinition(name="subject", path="RequestGroup.subject", description="The subject that the request group is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Group.class, Patient.class } ) 5113 public static final String SP_SUBJECT = "subject"; 5114 /** 5115 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 5116 * <p> 5117 * Description: <b>The subject that the request group is about</b><br> 5118 * Type: <b>reference</b><br> 5119 * Path: <b>RequestGroup.subject</b><br> 5120 * </p> 5121 */ 5122 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 5123 5124/** 5125 * Constant for fluent queries to be used to add include statements. Specifies 5126 * the path value of "<b>RequestGroup:subject</b>". 5127 */ 5128 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("RequestGroup:subject").toLocked(); 5129 5130 /** 5131 * Search parameter: <b>author</b> 5132 * <p> 5133 * Description: <b>The author of the request group</b><br> 5134 * Type: <b>reference</b><br> 5135 * Path: <b>RequestGroup.author</b><br> 5136 * </p> 5137 */ 5138 @SearchParamDefinition(name="author", path="RequestGroup.author", description="The author of the request group", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Practitioner.class, PractitionerRole.class } ) 5139 public static final String SP_AUTHOR = "author"; 5140 /** 5141 * <b>Fluent Client</b> search parameter constant for <b>author</b> 5142 * <p> 5143 * Description: <b>The author of the request group</b><br> 5144 * Type: <b>reference</b><br> 5145 * Path: <b>RequestGroup.author</b><br> 5146 * </p> 5147 */ 5148 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 5149 5150/** 5151 * Constant for fluent queries to be used to add include statements. Specifies 5152 * the path value of "<b>RequestGroup:author</b>". 5153 */ 5154 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("RequestGroup:author").toLocked(); 5155 5156 /** 5157 * Search parameter: <b>instantiates-canonical</b> 5158 * <p> 5159 * Description: <b>The FHIR-based definition from which the request group is realized</b><br> 5160 * Type: <b>reference</b><br> 5161 * Path: <b>RequestGroup.instantiatesCanonical</b><br> 5162 * </p> 5163 */ 5164 @SearchParamDefinition(name="instantiates-canonical", path="RequestGroup.instantiatesCanonical", description="The FHIR-based definition from which the request group is realized", type="reference" ) 5165 public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical"; 5166 /** 5167 * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b> 5168 * <p> 5169 * Description: <b>The FHIR-based definition from which the request group is realized</b><br> 5170 * Type: <b>reference</b><br> 5171 * Path: <b>RequestGroup.instantiatesCanonical</b><br> 5172 * </p> 5173 */ 5174 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL); 5175 5176/** 5177 * Constant for fluent queries to be used to add include statements. Specifies 5178 * the path value of "<b>RequestGroup:instantiates-canonical</b>". 5179 */ 5180 public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("RequestGroup:instantiates-canonical").toLocked(); 5181 5182 /** 5183 * Search parameter: <b>encounter</b> 5184 * <p> 5185 * Description: <b>The encounter the request group applies to</b><br> 5186 * Type: <b>reference</b><br> 5187 * Path: <b>RequestGroup.encounter</b><br> 5188 * </p> 5189 */ 5190 @SearchParamDefinition(name="encounter", path="RequestGroup.encounter", description="The encounter the request group applies to", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 5191 public static final String SP_ENCOUNTER = "encounter"; 5192 /** 5193 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 5194 * <p> 5195 * Description: <b>The encounter the request group applies to</b><br> 5196 * Type: <b>reference</b><br> 5197 * Path: <b>RequestGroup.encounter</b><br> 5198 * </p> 5199 */ 5200 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 5201 5202/** 5203 * Constant for fluent queries to be used to add include statements. Specifies 5204 * the path value of "<b>RequestGroup:encounter</b>". 5205 */ 5206 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("RequestGroup:encounter").toLocked(); 5207 5208 /** 5209 * Search parameter: <b>priority</b> 5210 * <p> 5211 * Description: <b>The priority of the request group</b><br> 5212 * Type: <b>token</b><br> 5213 * Path: <b>RequestGroup.priority</b><br> 5214 * </p> 5215 */ 5216 @SearchParamDefinition(name="priority", path="RequestGroup.priority", description="The priority of the request group", type="token" ) 5217 public static final String SP_PRIORITY = "priority"; 5218 /** 5219 * <b>Fluent Client</b> search parameter constant for <b>priority</b> 5220 * <p> 5221 * Description: <b>The priority of the request group</b><br> 5222 * Type: <b>token</b><br> 5223 * Path: <b>RequestGroup.priority</b><br> 5224 * </p> 5225 */ 5226 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); 5227 5228 /** 5229 * Search parameter: <b>intent</b> 5230 * <p> 5231 * Description: <b>The intent of the request group</b><br> 5232 * Type: <b>token</b><br> 5233 * Path: <b>RequestGroup.intent</b><br> 5234 * </p> 5235 */ 5236 @SearchParamDefinition(name="intent", path="RequestGroup.intent", description="The intent of the request group", type="token" ) 5237 public static final String SP_INTENT = "intent"; 5238 /** 5239 * <b>Fluent Client</b> search parameter constant for <b>intent</b> 5240 * <p> 5241 * Description: <b>The intent of the request group</b><br> 5242 * Type: <b>token</b><br> 5243 * Path: <b>RequestGroup.intent</b><br> 5244 * </p> 5245 */ 5246 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT); 5247 5248 /** 5249 * Search parameter: <b>participant</b> 5250 * <p> 5251 * Description: <b>The participant in the requests in the group</b><br> 5252 * Type: <b>reference</b><br> 5253 * Path: <b>RequestGroup.action.participant</b><br> 5254 * </p> 5255 */ 5256 @SearchParamDefinition(name="participant", path="RequestGroup.action.participant", description="The participant in the requests in the group", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 5257 public static final String SP_PARTICIPANT = "participant"; 5258 /** 5259 * <b>Fluent Client</b> search parameter constant for <b>participant</b> 5260 * <p> 5261 * Description: <b>The participant in the requests in the group</b><br> 5262 * Type: <b>reference</b><br> 5263 * Path: <b>RequestGroup.action.participant</b><br> 5264 * </p> 5265 */ 5266 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT); 5267 5268/** 5269 * Constant for fluent queries to be used to add include statements. Specifies 5270 * the path value of "<b>RequestGroup:participant</b>". 5271 */ 5272 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("RequestGroup:participant").toLocked(); 5273 5274 /** 5275 * Search parameter: <b>group-identifier</b> 5276 * <p> 5277 * Description: <b>The group identifier for the request group</b><br> 5278 * Type: <b>token</b><br> 5279 * Path: <b>RequestGroup.groupIdentifier</b><br> 5280 * </p> 5281 */ 5282 @SearchParamDefinition(name="group-identifier", path="RequestGroup.groupIdentifier", description="The group identifier for the request group", type="token" ) 5283 public static final String SP_GROUP_IDENTIFIER = "group-identifier"; 5284 /** 5285 * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b> 5286 * <p> 5287 * Description: <b>The group identifier for the request group</b><br> 5288 * Type: <b>token</b><br> 5289 * Path: <b>RequestGroup.groupIdentifier</b><br> 5290 * </p> 5291 */ 5292 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER); 5293 5294 /** 5295 * Search parameter: <b>patient</b> 5296 * <p> 5297 * Description: <b>The identity of a patient to search for request groups</b><br> 5298 * Type: <b>reference</b><br> 5299 * Path: <b>RequestGroup.subject</b><br> 5300 * </p> 5301 */ 5302 @SearchParamDefinition(name="patient", path="RequestGroup.subject.where(resolve() is Patient)", description="The identity of a patient to search for request groups", type="reference", target={Patient.class } ) 5303 public static final String SP_PATIENT = "patient"; 5304 /** 5305 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 5306 * <p> 5307 * Description: <b>The identity of a patient to search for request groups</b><br> 5308 * Type: <b>reference</b><br> 5309 * Path: <b>RequestGroup.subject</b><br> 5310 * </p> 5311 */ 5312 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 5313 5314/** 5315 * Constant for fluent queries to be used to add include statements. Specifies 5316 * the path value of "<b>RequestGroup:patient</b>". 5317 */ 5318 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("RequestGroup:patient").toLocked(); 5319 5320 /** 5321 * Search parameter: <b>instantiates-uri</b> 5322 * <p> 5323 * Description: <b>The external definition from which the request group is realized</b><br> 5324 * Type: <b>uri</b><br> 5325 * Path: <b>RequestGroup.instantiatesUri</b><br> 5326 * </p> 5327 */ 5328 @SearchParamDefinition(name="instantiates-uri", path="RequestGroup.instantiatesUri", description="The external definition from which the request group is realized", type="uri" ) 5329 public static final String SP_INSTANTIATES_URI = "instantiates-uri"; 5330 /** 5331 * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b> 5332 * <p> 5333 * Description: <b>The external definition from which the request group is realized</b><br> 5334 * Type: <b>uri</b><br> 5335 * Path: <b>RequestGroup.instantiatesUri</b><br> 5336 * </p> 5337 */ 5338 public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI); 5339 5340 /** 5341 * Search parameter: <b>status</b> 5342 * <p> 5343 * Description: <b>The status of the request group</b><br> 5344 * Type: <b>token</b><br> 5345 * Path: <b>RequestGroup.status</b><br> 5346 * </p> 5347 */ 5348 @SearchParamDefinition(name="status", path="RequestGroup.status", description="The status of the request group", type="token" ) 5349 public static final String SP_STATUS = "status"; 5350 /** 5351 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5352 * <p> 5353 * Description: <b>The status of the request group</b><br> 5354 * Type: <b>token</b><br> 5355 * Path: <b>RequestGroup.status</b><br> 5356 * </p> 5357 */ 5358 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 5359 5360 5361} 5362