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