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 Base makeProperty(int hash, String name) throws FHIRException { 1065 switch (hash) { 1066 case 984367650: 1067 return getRepetitionsElement(); 1068 case -991726143: 1069 return getPeriod(); 1070 case 820081177: 1071 return addRecipient(); 1072 default: 1073 return super.makeProperty(hash, name); 1074 } 1075 1076 } 1077 1078 @Override 1079 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1080 switch (hash) { 1081 case 984367650: 1082 /* repetitions */ return new String[] { "positiveInt" }; 1083 case -991726143: 1084 /* period */ return new String[] { "Period" }; 1085 case 820081177: 1086 /* recipient */ return new String[] { "Reference" }; 1087 default: 1088 return super.getTypesForProperty(hash, name); 1089 } 1090 1091 } 1092 1093 @Override 1094 public Base addChild(String name) throws FHIRException { 1095 if (name.equals("repetitions")) { 1096 throw new FHIRException("Cannot call addChild on a singleton property Task.repetitions"); 1097 } else if (name.equals("period")) { 1098 this.period = new Period(); 1099 return this.period; 1100 } else if (name.equals("recipient")) { 1101 return addRecipient(); 1102 } else 1103 return super.addChild(name); 1104 } 1105 1106 public TaskRestrictionComponent copy() { 1107 TaskRestrictionComponent dst = new TaskRestrictionComponent(); 1108 copyValues(dst); 1109 return dst; 1110 } 1111 1112 public void copyValues(TaskRestrictionComponent dst) { 1113 super.copyValues(dst); 1114 dst.repetitions = repetitions == null ? null : repetitions.copy(); 1115 dst.period = period == null ? null : period.copy(); 1116 if (recipient != null) { 1117 dst.recipient = new ArrayList<Reference>(); 1118 for (Reference i : recipient) 1119 dst.recipient.add(i.copy()); 1120 } 1121 ; 1122 } 1123 1124 @Override 1125 public boolean equalsDeep(Base other_) { 1126 if (!super.equalsDeep(other_)) 1127 return false; 1128 if (!(other_ instanceof TaskRestrictionComponent)) 1129 return false; 1130 TaskRestrictionComponent o = (TaskRestrictionComponent) other_; 1131 return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) 1132 && compareDeep(recipient, o.recipient, true); 1133 } 1134 1135 @Override 1136 public boolean equalsShallow(Base other_) { 1137 if (!super.equalsShallow(other_)) 1138 return false; 1139 if (!(other_ instanceof TaskRestrictionComponent)) 1140 return false; 1141 TaskRestrictionComponent o = (TaskRestrictionComponent) other_; 1142 return compareValues(repetitions, o.repetitions, true); 1143 } 1144 1145 public boolean isEmpty() { 1146 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient); 1147 } 1148 1149 public String fhirType() { 1150 return "Task.restriction"; 1151 1152 } 1153 1154 } 1155 1156 @Block() 1157 public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement { 1158 /** 1159 * A code or description indicating how the input is intended to be used as part 1160 * of the task execution. 1161 */ 1162 @Child(name = "type", type = { 1163 CodeableConcept.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1164 @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.") 1165 protected CodeableConcept type; 1166 1167 /** 1168 * The value of the input parameter as a basic type. 1169 */ 1170 @Child(name = "value", type = {}, order = 2, min = 1, max = 1, modifier = false, summary = false) 1171 @Description(shortDefinition = "Content to use in performing the task", formalDefinition = "The value of the input parameter as a basic type.") 1172 protected org.hl7.fhir.r4.model.Type value; 1173 1174 private static final long serialVersionUID = -850267045L; 1175 1176 /** 1177 * Constructor 1178 */ 1179 public ParameterComponent() { 1180 super(); 1181 } 1182 1183 /** 1184 * Constructor 1185 */ 1186 public ParameterComponent(CodeableConcept type, org.hl7.fhir.r4.model.Type value) { 1187 super(); 1188 this.type = type; 1189 this.value = value; 1190 } 1191 1192 /** 1193 * @return {@link #type} (A code or description indicating how the input is 1194 * intended to be used as part of the task execution.) 1195 */ 1196 public CodeableConcept getType() { 1197 if (this.type == null) 1198 if (Configuration.errorOnAutoCreate()) 1199 throw new Error("Attempt to auto-create ParameterComponent.type"); 1200 else if (Configuration.doAutoCreate()) 1201 this.type = new CodeableConcept(); // cc 1202 return this.type; 1203 } 1204 1205 public boolean hasType() { 1206 return this.type != null && !this.type.isEmpty(); 1207 } 1208 1209 /** 1210 * @param value {@link #type} (A code or description indicating how the input is 1211 * intended to be used as part of the task execution.) 1212 */ 1213 public ParameterComponent setType(CodeableConcept value) { 1214 this.type = value; 1215 return this; 1216 } 1217 1218 /** 1219 * @return {@link #value} (The value of the input parameter as a basic type.) 1220 */ 1221 public org.hl7.fhir.r4.model.Type getValue() { 1222 return this.value; 1223 } 1224 1225 public boolean hasValue() { 1226 return this.value != null && !this.value.isEmpty(); 1227 } 1228 1229 /** 1230 * @param value {@link #value} (The value of the input parameter as a basic 1231 * type.) 1232 */ 1233 public ParameterComponent setValue(org.hl7.fhir.r4.model.Type value) { 1234 this.value = value; 1235 return this; 1236 } 1237 1238 protected void listChildren(List<Property> children) { 1239 super.listChildren(children); 1240 children.add(new Property("type", "CodeableConcept", 1241 "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1, 1242 type)); 1243 children.add(new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value)); 1244 } 1245 1246 @Override 1247 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1248 switch (_hash) { 1249 case 3575610: 1250 /* type */ return new Property("type", "CodeableConcept", 1251 "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1252 1, type); 1253 case -1410166417: 1254 /* value[x] */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1255 value); 1256 case 111972721: 1257 /* value */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1258 value); 1259 case -1535024575: 1260 /* valueBase64Binary */ return new Property("value[x]", "*", 1261 "The value of the input parameter as a basic type.", 0, 1, value); 1262 case 733421943: 1263 /* valueBoolean */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1264 1, value); 1265 case -786218365: 1266 /* valueCanonical */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1267 0, 1, value); 1268 case -766209282: 1269 /* valueCode */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1270 value); 1271 case -766192449: 1272 /* valueDate */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1273 value); 1274 case 1047929900: 1275 /* valueDateTime */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1276 1, value); 1277 case -2083993440: 1278 /* valueDecimal */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1279 1, value); 1280 case 231604844: 1281 /* valueId */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1282 value); 1283 case -1668687056: 1284 /* valueInstant */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1285 1, value); 1286 case -1668204915: 1287 /* valueInteger */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1288 1, value); 1289 case -497880704: 1290 /* valueMarkdown */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1291 1, value); 1292 case -1410178407: 1293 /* valueOid */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1294 value); 1295 case -1249932027: 1296 /* valuePositiveInt */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1297 0, 1, value); 1298 case -1424603934: 1299 /* valueString */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1300 1, value); 1301 case -765708322: 1302 /* valueTime */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1303 value); 1304 case 26529417: 1305 /* valueUnsignedInt */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1306 0, 1, value); 1307 case -1410172357: 1308 /* valueUri */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1309 value); 1310 case -1410172354: 1311 /* valueUrl */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1312 value); 1313 case -765667124: 1314 /* valueUuid */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1315 value); 1316 case -478981821: 1317 /* valueAddress */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1318 1, value); 1319 case -67108992: 1320 /* valueAnnotation */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1321 0, 1, value); 1322 case -475566732: 1323 /* valueAttachment */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1324 0, 1, value); 1325 case 924902896: 1326 /* valueCodeableConcept */ return new Property("value[x]", "*", 1327 "The value of the input parameter as a basic type.", 0, 1, value); 1328 case -1887705029: 1329 /* valueCoding */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1330 1, value); 1331 case 944904545: 1332 /* valueContactPoint */ return new Property("value[x]", "*", 1333 "The value of the input parameter as a basic type.", 0, 1, value); 1334 case -2026205465: 1335 /* valueHumanName */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1336 0, 1, value); 1337 case -130498310: 1338 /* valueIdentifier */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1339 0, 1, value); 1340 case -1524344174: 1341 /* valuePeriod */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1342 1, value); 1343 case -2029823716: 1344 /* valueQuantity */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1345 1, value); 1346 case 2030761548: 1347 /* valueRange */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1348 value); 1349 case 2030767386: 1350 /* valueRatio */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, 1351 value); 1352 case 1755241690: 1353 /* valueReference */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1354 0, 1, value); 1355 case -962229101: 1356 /* valueSampledData */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1357 0, 1, value); 1358 case -540985785: 1359 /* valueSignature */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 1360 0, 1, value); 1361 case -1406282469: 1362 /* valueTiming */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1363 1, value); 1364 case -1858636920: 1365 /* valueDosage */ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1366 1, value); 1367 default: 1368 return super.getNamedProperty(_hash, _name, _checkValid); 1369 } 1370 1371 } 1372 1373 @Override 1374 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1375 switch (hash) { 1376 case 3575610: 1377 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 1378 case 111972721: 1379 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // org.hl7.fhir.r4.model.Type 1380 default: 1381 return super.getProperty(hash, name, checkValid); 1382 } 1383 1384 } 1385 1386 @Override 1387 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1388 switch (hash) { 1389 case 3575610: // type 1390 this.type = castToCodeableConcept(value); // CodeableConcept 1391 return value; 1392 case 111972721: // value 1393 this.value = castToType(value); // org.hl7.fhir.r4.model.Type 1394 return value; 1395 default: 1396 return super.setProperty(hash, name, value); 1397 } 1398 1399 } 1400 1401 @Override 1402 public Base setProperty(String name, Base value) throws FHIRException { 1403 if (name.equals("type")) { 1404 this.type = castToCodeableConcept(value); // CodeableConcept 1405 } else if (name.equals("value[x]")) { 1406 this.value = castToType(value); // org.hl7.fhir.r4.model.Type 1407 } else 1408 return super.setProperty(name, value); 1409 return value; 1410 } 1411 1412 @Override 1413 public Base makeProperty(int hash, String name) throws FHIRException { 1414 switch (hash) { 1415 case 3575610: 1416 return getType(); 1417 case -1410166417: 1418 return getValue(); 1419 case 111972721: 1420 return getValue(); 1421 default: 1422 return super.makeProperty(hash, name); 1423 } 1424 1425 } 1426 1427 @Override 1428 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1429 switch (hash) { 1430 case 3575610: 1431 /* type */ return new String[] { "CodeableConcept" }; 1432 case 111972721: 1433 /* value */ return new String[] { "*" }; 1434 default: 1435 return super.getTypesForProperty(hash, name); 1436 } 1437 1438 } 1439 1440 @Override 1441 public Base addChild(String name) throws FHIRException { 1442 if (name.equals("type")) { 1443 this.type = new CodeableConcept(); 1444 return this.type; 1445 } else if (name.equals("valueBase64Binary")) { 1446 this.value = new Base64BinaryType(); 1447 return this.value; 1448 } else if (name.equals("valueBoolean")) { 1449 this.value = new BooleanType(); 1450 return this.value; 1451 } else if (name.equals("valueCanonical")) { 1452 this.value = new CanonicalType(); 1453 return this.value; 1454 } else if (name.equals("valueCode")) { 1455 this.value = new CodeType(); 1456 return this.value; 1457 } else if (name.equals("valueDate")) { 1458 this.value = new DateType(); 1459 return this.value; 1460 } else if (name.equals("valueDateTime")) { 1461 this.value = new DateTimeType(); 1462 return this.value; 1463 } else if (name.equals("valueDecimal")) { 1464 this.value = new DecimalType(); 1465 return this.value; 1466 } else if (name.equals("valueId")) { 1467 this.value = new IdType(); 1468 return this.value; 1469 } else if (name.equals("valueInstant")) { 1470 this.value = new InstantType(); 1471 return this.value; 1472 } else if (name.equals("valueInteger")) { 1473 this.value = new IntegerType(); 1474 return this.value; 1475 } else if (name.equals("valueMarkdown")) { 1476 this.value = new MarkdownType(); 1477 return this.value; 1478 } else if (name.equals("valueOid")) { 1479 this.value = new OidType(); 1480 return this.value; 1481 } else if (name.equals("valuePositiveInt")) { 1482 this.value = new PositiveIntType(); 1483 return this.value; 1484 } else if (name.equals("valueString")) { 1485 this.value = new StringType(); 1486 return this.value; 1487 } else if (name.equals("valueTime")) { 1488 this.value = new TimeType(); 1489 return this.value; 1490 } else if (name.equals("valueUnsignedInt")) { 1491 this.value = new UnsignedIntType(); 1492 return this.value; 1493 } else if (name.equals("valueUri")) { 1494 this.value = new UriType(); 1495 return this.value; 1496 } else if (name.equals("valueUrl")) { 1497 this.value = new UrlType(); 1498 return this.value; 1499 } else if (name.equals("valueUuid")) { 1500 this.value = new UuidType(); 1501 return this.value; 1502 } else if (name.equals("valueAddress")) { 1503 this.value = new Address(); 1504 return this.value; 1505 } else if (name.equals("valueAge")) { 1506 this.value = new Age(); 1507 return this.value; 1508 } else if (name.equals("valueAnnotation")) { 1509 this.value = new Annotation(); 1510 return this.value; 1511 } else if (name.equals("valueAttachment")) { 1512 this.value = new Attachment(); 1513 return this.value; 1514 } else if (name.equals("valueCodeableConcept")) { 1515 this.value = new CodeableConcept(); 1516 return this.value; 1517 } else if (name.equals("valueCoding")) { 1518 this.value = new Coding(); 1519 return this.value; 1520 } else if (name.equals("valueContactPoint")) { 1521 this.value = new ContactPoint(); 1522 return this.value; 1523 } else if (name.equals("valueCount")) { 1524 this.value = new Count(); 1525 return this.value; 1526 } else if (name.equals("valueDistance")) { 1527 this.value = new Distance(); 1528 return this.value; 1529 } else if (name.equals("valueDuration")) { 1530 this.value = new Duration(); 1531 return this.value; 1532 } else if (name.equals("valueHumanName")) { 1533 this.value = new HumanName(); 1534 return this.value; 1535 } else if (name.equals("valueIdentifier")) { 1536 this.value = new Identifier(); 1537 return this.value; 1538 } else if (name.equals("valueMoney")) { 1539 this.value = new Money(); 1540 return this.value; 1541 } else if (name.equals("valuePeriod")) { 1542 this.value = new Period(); 1543 return this.value; 1544 } else if (name.equals("valueQuantity")) { 1545 this.value = new Quantity(); 1546 return this.value; 1547 } else if (name.equals("valueRange")) { 1548 this.value = new Range(); 1549 return this.value; 1550 } else if (name.equals("valueRatio")) { 1551 this.value = new Ratio(); 1552 return this.value; 1553 } else if (name.equals("valueReference")) { 1554 this.value = new Reference(); 1555 return this.value; 1556 } else if (name.equals("valueSampledData")) { 1557 this.value = new SampledData(); 1558 return this.value; 1559 } else if (name.equals("valueSignature")) { 1560 this.value = new Signature(); 1561 return this.value; 1562 } else if (name.equals("valueTiming")) { 1563 this.value = new Timing(); 1564 return this.value; 1565 } else if (name.equals("valueContactDetail")) { 1566 this.value = new ContactDetail(); 1567 return this.value; 1568 } else if (name.equals("valueContributor")) { 1569 this.value = new Contributor(); 1570 return this.value; 1571 } else if (name.equals("valueDataRequirement")) { 1572 this.value = new DataRequirement(); 1573 return this.value; 1574 } else if (name.equals("valueExpression")) { 1575 this.value = new Expression(); 1576 return this.value; 1577 } else if (name.equals("valueParameterDefinition")) { 1578 this.value = new ParameterDefinition(); 1579 return this.value; 1580 } else if (name.equals("valueRelatedArtifact")) { 1581 this.value = new RelatedArtifact(); 1582 return this.value; 1583 } else if (name.equals("valueTriggerDefinition")) { 1584 this.value = new TriggerDefinition(); 1585 return this.value; 1586 } else if (name.equals("valueUsageContext")) { 1587 this.value = new UsageContext(); 1588 return this.value; 1589 } else if (name.equals("valueDosage")) { 1590 this.value = new Dosage(); 1591 return this.value; 1592 } else if (name.equals("valueMeta")) { 1593 this.value = new Meta(); 1594 return this.value; 1595 } else 1596 return super.addChild(name); 1597 } 1598 1599 public ParameterComponent copy() { 1600 ParameterComponent dst = new ParameterComponent(); 1601 copyValues(dst); 1602 return dst; 1603 } 1604 1605 public void copyValues(ParameterComponent dst) { 1606 super.copyValues(dst); 1607 dst.type = type == null ? null : type.copy(); 1608 dst.value = value == null ? null : value.copy(); 1609 } 1610 1611 @Override 1612 public boolean equalsDeep(Base other_) { 1613 if (!super.equalsDeep(other_)) 1614 return false; 1615 if (!(other_ instanceof ParameterComponent)) 1616 return false; 1617 ParameterComponent o = (ParameterComponent) other_; 1618 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 1619 } 1620 1621 @Override 1622 public boolean equalsShallow(Base other_) { 1623 if (!super.equalsShallow(other_)) 1624 return false; 1625 if (!(other_ instanceof ParameterComponent)) 1626 return false; 1627 ParameterComponent o = (ParameterComponent) other_; 1628 return true; 1629 } 1630 1631 public boolean isEmpty() { 1632 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 1633 } 1634 1635 public String fhirType() { 1636 return "Task.input"; 1637 1638 } 1639 1640 } 1641 1642 @Block() 1643 public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement { 1644 /** 1645 * The name of the Output parameter. 1646 */ 1647 @Child(name = "type", type = { 1648 CodeableConcept.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1649 @Description(shortDefinition = "Label for output", formalDefinition = "The name of the Output parameter.") 1650 protected CodeableConcept type; 1651 1652 /** 1653 * The value of the Output parameter as a basic type. 1654 */ 1655 @Child(name = "value", type = {}, order = 2, min = 1, max = 1, modifier = false, summary = false) 1656 @Description(shortDefinition = "Result of output", formalDefinition = "The value of the Output parameter as a basic type.") 1657 protected org.hl7.fhir.r4.model.Type value; 1658 1659 private static final long serialVersionUID = -850267045L; 1660 1661 /** 1662 * Constructor 1663 */ 1664 public TaskOutputComponent() { 1665 super(); 1666 } 1667 1668 /** 1669 * Constructor 1670 */ 1671 public TaskOutputComponent(CodeableConcept type, org.hl7.fhir.r4.model.Type value) { 1672 super(); 1673 this.type = type; 1674 this.value = value; 1675 } 1676 1677 /** 1678 * @return {@link #type} (The name of the Output parameter.) 1679 */ 1680 public CodeableConcept getType() { 1681 if (this.type == null) 1682 if (Configuration.errorOnAutoCreate()) 1683 throw new Error("Attempt to auto-create TaskOutputComponent.type"); 1684 else if (Configuration.doAutoCreate()) 1685 this.type = new CodeableConcept(); // cc 1686 return this.type; 1687 } 1688 1689 public boolean hasType() { 1690 return this.type != null && !this.type.isEmpty(); 1691 } 1692 1693 /** 1694 * @param value {@link #type} (The name of the Output parameter.) 1695 */ 1696 public TaskOutputComponent setType(CodeableConcept value) { 1697 this.type = value; 1698 return this; 1699 } 1700 1701 /** 1702 * @return {@link #value} (The value of the Output parameter as a basic type.) 1703 */ 1704 public org.hl7.fhir.r4.model.Type getValue() { 1705 return this.value; 1706 } 1707 1708 public boolean hasValue() { 1709 return this.value != null && !this.value.isEmpty(); 1710 } 1711 1712 /** 1713 * @param value {@link #value} (The value of the Output parameter as a basic 1714 * type.) 1715 */ 1716 public TaskOutputComponent setValue(org.hl7.fhir.r4.model.Type value) { 1717 this.value = value; 1718 return this; 1719 } 1720 1721 protected void listChildren(List<Property> children) { 1722 super.listChildren(children); 1723 children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type)); 1724 children.add(new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value)); 1725 } 1726 1727 @Override 1728 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1729 switch (_hash) { 1730 case 3575610: 1731 /* type */ return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type); 1732 case -1410166417: 1733 /* value[x] */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1734 value); 1735 case 111972721: 1736 /* value */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1737 value); 1738 case -1535024575: 1739 /* valueBase64Binary */ return new Property("value[x]", "*", 1740 "The value of the Output parameter as a basic type.", 0, 1, value); 1741 case 733421943: 1742 /* valueBoolean */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1743 1, value); 1744 case -786218365: 1745 /* valueCanonical */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1746 0, 1, value); 1747 case -766209282: 1748 /* valueCode */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1749 value); 1750 case -766192449: 1751 /* valueDate */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1752 value); 1753 case 1047929900: 1754 /* valueDateTime */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1755 0, 1, value); 1756 case -2083993440: 1757 /* valueDecimal */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1758 1, value); 1759 case 231604844: 1760 /* valueId */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1761 value); 1762 case -1668687056: 1763 /* valueInstant */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1764 1, value); 1765 case -1668204915: 1766 /* valueInteger */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1767 1, value); 1768 case -497880704: 1769 /* valueMarkdown */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1770 0, 1, value); 1771 case -1410178407: 1772 /* valueOid */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1773 value); 1774 case -1249932027: 1775 /* valuePositiveInt */ return new Property("value[x]", "*", 1776 "The value of the Output parameter as a basic type.", 0, 1, value); 1777 case -1424603934: 1778 /* valueString */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1779 1, value); 1780 case -765708322: 1781 /* valueTime */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1782 value); 1783 case 26529417: 1784 /* valueUnsignedInt */ return new Property("value[x]", "*", 1785 "The value of the Output parameter as a basic type.", 0, 1, value); 1786 case -1410172357: 1787 /* valueUri */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1788 value); 1789 case -1410172354: 1790 /* valueUrl */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1791 value); 1792 case -765667124: 1793 /* valueUuid */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, 1794 value); 1795 case -478981821: 1796 /* valueAddress */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1797 1, value); 1798 case -67108992: 1799 /* valueAnnotation */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1800 0, 1, value); 1801 case -475566732: 1802 /* valueAttachment */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1803 0, 1, value); 1804 case 924902896: 1805 /* valueCodeableConcept */ return new Property("value[x]", "*", 1806 "The value of the Output parameter as a basic type.", 0, 1, value); 1807 case -1887705029: 1808 /* valueCoding */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1809 1, value); 1810 case 944904545: 1811 /* valueContactPoint */ return new Property("value[x]", "*", 1812 "The value of the Output parameter as a basic type.", 0, 1, value); 1813 case -2026205465: 1814 /* valueHumanName */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1815 0, 1, value); 1816 case -130498310: 1817 /* valueIdentifier */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1818 0, 1, value); 1819 case -1524344174: 1820 /* valuePeriod */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1821 1, value); 1822 case -2029823716: 1823 /* valueQuantity */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1824 0, 1, value); 1825 case 2030761548: 1826 /* valueRange */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1827 1, value); 1828 case 2030767386: 1829 /* valueRatio */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1830 1, value); 1831 case 1755241690: 1832 /* valueReference */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1833 0, 1, value); 1834 case -962229101: 1835 /* valueSampledData */ return new Property("value[x]", "*", 1836 "The value of the Output parameter as a basic type.", 0, 1, value); 1837 case -540985785: 1838 /* valueSignature */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 1839 0, 1, value); 1840 case -1406282469: 1841 /* valueTiming */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1842 1, value); 1843 case -1858636920: 1844 /* valueDosage */ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1845 1, value); 1846 default: 1847 return super.getNamedProperty(_hash, _name, _checkValid); 1848 } 1849 1850 } 1851 1852 @Override 1853 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1854 switch (hash) { 1855 case 3575610: 1856 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 1857 case 111972721: 1858 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // org.hl7.fhir.r4.model.Type 1859 default: 1860 return super.getProperty(hash, name, checkValid); 1861 } 1862 1863 } 1864 1865 @Override 1866 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1867 switch (hash) { 1868 case 3575610: // type 1869 this.type = castToCodeableConcept(value); // CodeableConcept 1870 return value; 1871 case 111972721: // value 1872 this.value = castToType(value); // org.hl7.fhir.r4.model.Type 1873 return value; 1874 default: 1875 return super.setProperty(hash, name, value); 1876 } 1877 1878 } 1879 1880 @Override 1881 public Base setProperty(String name, Base value) throws FHIRException { 1882 if (name.equals("type")) { 1883 this.type = castToCodeableConcept(value); // CodeableConcept 1884 } else if (name.equals("value[x]")) { 1885 this.value = castToType(value); // org.hl7.fhir.r4.model.Type 1886 } else 1887 return super.setProperty(name, value); 1888 return value; 1889 } 1890 1891 @Override 1892 public Base makeProperty(int hash, String name) throws FHIRException { 1893 switch (hash) { 1894 case 3575610: 1895 return getType(); 1896 case -1410166417: 1897 return getValue(); 1898 case 111972721: 1899 return getValue(); 1900 default: 1901 return super.makeProperty(hash, name); 1902 } 1903 1904 } 1905 1906 @Override 1907 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1908 switch (hash) { 1909 case 3575610: 1910 /* type */ return new String[] { "CodeableConcept" }; 1911 case 111972721: 1912 /* value */ return new String[] { "*" }; 1913 default: 1914 return super.getTypesForProperty(hash, name); 1915 } 1916 1917 } 1918 1919 @Override 1920 public Base addChild(String name) throws FHIRException { 1921 if (name.equals("type")) { 1922 this.type = new CodeableConcept(); 1923 return this.type; 1924 } else if (name.equals("valueBase64Binary")) { 1925 this.value = new Base64BinaryType(); 1926 return this.value; 1927 } else if (name.equals("valueBoolean")) { 1928 this.value = new BooleanType(); 1929 return this.value; 1930 } else if (name.equals("valueCanonical")) { 1931 this.value = new CanonicalType(); 1932 return this.value; 1933 } else if (name.equals("valueCode")) { 1934 this.value = new CodeType(); 1935 return this.value; 1936 } else if (name.equals("valueDate")) { 1937 this.value = new DateType(); 1938 return this.value; 1939 } else if (name.equals("valueDateTime")) { 1940 this.value = new DateTimeType(); 1941 return this.value; 1942 } else if (name.equals("valueDecimal")) { 1943 this.value = new DecimalType(); 1944 return this.value; 1945 } else if (name.equals("valueId")) { 1946 this.value = new IdType(); 1947 return this.value; 1948 } else if (name.equals("valueInstant")) { 1949 this.value = new InstantType(); 1950 return this.value; 1951 } else if (name.equals("valueInteger")) { 1952 this.value = new IntegerType(); 1953 return this.value; 1954 } else if (name.equals("valueMarkdown")) { 1955 this.value = new MarkdownType(); 1956 return this.value; 1957 } else if (name.equals("valueOid")) { 1958 this.value = new OidType(); 1959 return this.value; 1960 } else if (name.equals("valuePositiveInt")) { 1961 this.value = new PositiveIntType(); 1962 return this.value; 1963 } else if (name.equals("valueString")) { 1964 this.value = new StringType(); 1965 return this.value; 1966 } else if (name.equals("valueTime")) { 1967 this.value = new TimeType(); 1968 return this.value; 1969 } else if (name.equals("valueUnsignedInt")) { 1970 this.value = new UnsignedIntType(); 1971 return this.value; 1972 } else if (name.equals("valueUri")) { 1973 this.value = new UriType(); 1974 return this.value; 1975 } else if (name.equals("valueUrl")) { 1976 this.value = new UrlType(); 1977 return this.value; 1978 } else if (name.equals("valueUuid")) { 1979 this.value = new UuidType(); 1980 return this.value; 1981 } else if (name.equals("valueAddress")) { 1982 this.value = new Address(); 1983 return this.value; 1984 } else if (name.equals("valueAge")) { 1985 this.value = new Age(); 1986 return this.value; 1987 } else if (name.equals("valueAnnotation")) { 1988 this.value = new Annotation(); 1989 return this.value; 1990 } else if (name.equals("valueAttachment")) { 1991 this.value = new Attachment(); 1992 return this.value; 1993 } else if (name.equals("valueCodeableConcept")) { 1994 this.value = new CodeableConcept(); 1995 return this.value; 1996 } else if (name.equals("valueCoding")) { 1997 this.value = new Coding(); 1998 return this.value; 1999 } else if (name.equals("valueContactPoint")) { 2000 this.value = new ContactPoint(); 2001 return this.value; 2002 } else if (name.equals("valueCount")) { 2003 this.value = new Count(); 2004 return this.value; 2005 } else if (name.equals("valueDistance")) { 2006 this.value = new Distance(); 2007 return this.value; 2008 } else if (name.equals("valueDuration")) { 2009 this.value = new Duration(); 2010 return this.value; 2011 } else if (name.equals("valueHumanName")) { 2012 this.value = new HumanName(); 2013 return this.value; 2014 } else if (name.equals("valueIdentifier")) { 2015 this.value = new Identifier(); 2016 return this.value; 2017 } else if (name.equals("valueMoney")) { 2018 this.value = new Money(); 2019 return this.value; 2020 } else if (name.equals("valuePeriod")) { 2021 this.value = new Period(); 2022 return this.value; 2023 } else if (name.equals("valueQuantity")) { 2024 this.value = new Quantity(); 2025 return this.value; 2026 } else if (name.equals("valueRange")) { 2027 this.value = new Range(); 2028 return this.value; 2029 } else if (name.equals("valueRatio")) { 2030 this.value = new Ratio(); 2031 return this.value; 2032 } else if (name.equals("valueReference")) { 2033 this.value = new Reference(); 2034 return this.value; 2035 } else if (name.equals("valueSampledData")) { 2036 this.value = new SampledData(); 2037 return this.value; 2038 } else if (name.equals("valueSignature")) { 2039 this.value = new Signature(); 2040 return this.value; 2041 } else if (name.equals("valueTiming")) { 2042 this.value = new Timing(); 2043 return this.value; 2044 } else if (name.equals("valueContactDetail")) { 2045 this.value = new ContactDetail(); 2046 return this.value; 2047 } else if (name.equals("valueContributor")) { 2048 this.value = new Contributor(); 2049 return this.value; 2050 } else if (name.equals("valueDataRequirement")) { 2051 this.value = new DataRequirement(); 2052 return this.value; 2053 } else if (name.equals("valueExpression")) { 2054 this.value = new Expression(); 2055 return this.value; 2056 } else if (name.equals("valueParameterDefinition")) { 2057 this.value = new ParameterDefinition(); 2058 return this.value; 2059 } else if (name.equals("valueRelatedArtifact")) { 2060 this.value = new RelatedArtifact(); 2061 return this.value; 2062 } else if (name.equals("valueTriggerDefinition")) { 2063 this.value = new TriggerDefinition(); 2064 return this.value; 2065 } else if (name.equals("valueUsageContext")) { 2066 this.value = new UsageContext(); 2067 return this.value; 2068 } else if (name.equals("valueDosage")) { 2069 this.value = new Dosage(); 2070 return this.value; 2071 } else if (name.equals("valueMeta")) { 2072 this.value = new Meta(); 2073 return this.value; 2074 } else 2075 return super.addChild(name); 2076 } 2077 2078 public TaskOutputComponent copy() { 2079 TaskOutputComponent dst = new TaskOutputComponent(); 2080 copyValues(dst); 2081 return dst; 2082 } 2083 2084 public void copyValues(TaskOutputComponent dst) { 2085 super.copyValues(dst); 2086 dst.type = type == null ? null : type.copy(); 2087 dst.value = value == null ? null : value.copy(); 2088 } 2089 2090 @Override 2091 public boolean equalsDeep(Base other_) { 2092 if (!super.equalsDeep(other_)) 2093 return false; 2094 if (!(other_ instanceof TaskOutputComponent)) 2095 return false; 2096 TaskOutputComponent o = (TaskOutputComponent) other_; 2097 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 2098 } 2099 2100 @Override 2101 public boolean equalsShallow(Base other_) { 2102 if (!super.equalsShallow(other_)) 2103 return false; 2104 if (!(other_ instanceof TaskOutputComponent)) 2105 return false; 2106 TaskOutputComponent o = (TaskOutputComponent) other_; 2107 return true; 2108 } 2109 2110 public boolean isEmpty() { 2111 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 2112 } 2113 2114 public String fhirType() { 2115 return "Task.output"; 2116 2117 } 2118 2119 } 2120 2121 /** 2122 * The business identifier for this task. 2123 */ 2124 @Child(name = "identifier", type = { 2125 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2126 @Description(shortDefinition = "Task Instance Identifier", formalDefinition = "The business identifier for this task.") 2127 protected List<Identifier> identifier; 2128 2129 /** 2130 * The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other 2131 * definition that is adhered to in whole or in part by this Task. 2132 */ 2133 @Child(name = "instantiatesCanonical", type = { 2134 CanonicalType.class }, order = 1, min = 0, max = 1, modifier = false, summary = true) 2135 @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.") 2136 protected CanonicalType instantiatesCanonical; 2137 2138 /** 2139 * The URL pointing to an *externally* maintained protocol, guideline, orderset 2140 * or other definition that is adhered to in whole or in part by this Task. 2141 */ 2142 @Child(name = "instantiatesUri", type = { 2143 UriType.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 2144 @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.") 2145 protected UriType instantiatesUri; 2146 2147 /** 2148 * BasedOn refers to a higher-level authorization that triggered the creation of 2149 * the task. It references a "request" resource such as a ServiceRequest, 2150 * MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the 2151 * "request" resource the task is seeking to fulfill. This latter resource is 2152 * referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a 2153 * task is created to fulfill a procedureRequest ( = FocusOn ) to collect a 2154 * specimen from a patient. 2155 */ 2156 @Child(name = "basedOn", type = { 2157 Reference.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2158 @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.") 2159 protected List<Reference> basedOn; 2160 /** 2161 * The actual objects that are the target of the reference (BasedOn refers to a 2162 * higher-level authorization that triggered the creation of the task. It 2163 * references a "request" resource such as a ServiceRequest, MedicationRequest, 2164 * ServiceRequest, CarePlan, etc. which is distinct from the "request" resource 2165 * the task is seeking to fulfill. This latter resource is referenced by 2166 * FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is 2167 * created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen 2168 * from a patient.) 2169 */ 2170 protected List<Resource> basedOnTarget; 2171 2172 /** 2173 * An identifier that links together multiple tasks and other requests that were 2174 * created in the same context. 2175 */ 2176 @Child(name = "groupIdentifier", type = { 2177 Identifier.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 2178 @Description(shortDefinition = "Requisition or grouper id", formalDefinition = "An identifier that links together multiple tasks and other requests that were created in the same context.") 2179 protected Identifier groupIdentifier; 2180 2181 /** 2182 * Task that this particular task is part of. 2183 */ 2184 @Child(name = "partOf", type = { 2185 Task.class }, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2186 @Description(shortDefinition = "Composite task", formalDefinition = "Task that this particular task is part of.") 2187 protected List<Reference> partOf; 2188 /** 2189 * The actual objects that are the target of the reference (Task that this 2190 * particular task is part of.) 2191 */ 2192 protected List<Task> partOfTarget; 2193 2194 /** 2195 * The current status of the task. 2196 */ 2197 @Child(name = "status", type = { CodeType.class }, order = 6, min = 1, max = 1, modifier = true, summary = true) 2198 @Description(shortDefinition = "draft | requested | received | accepted | +", formalDefinition = "The current status of the task.") 2199 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/task-status") 2200 protected Enumeration<TaskStatus> status; 2201 2202 /** 2203 * An explanation as to why this task is held, failed, was refused, etc. 2204 */ 2205 @Child(name = "statusReason", type = { 2206 CodeableConcept.class }, order = 7, min = 0, max = 1, modifier = false, summary = true) 2207 @Description(shortDefinition = "Reason for current status", formalDefinition = "An explanation as to why this task is held, failed, was refused, etc.") 2208 protected CodeableConcept statusReason; 2209 2210 /** 2211 * Contains business-specific nuances of the business state. 2212 */ 2213 @Child(name = "businessStatus", type = { 2214 CodeableConcept.class }, order = 8, min = 0, max = 1, modifier = false, summary = true) 2215 @Description(shortDefinition = "E.g. \"Specimen collected\", \"IV prepped\"", formalDefinition = "Contains business-specific nuances of the business state.") 2216 protected CodeableConcept businessStatus; 2217 2218 /** 2219 * Indicates the "level" of actionability associated with the Task, i.e. 2220 * i+R[9]Cs this a proposed task, a planned task, an actionable task, etc. 2221 */ 2222 @Child(name = "intent", type = { CodeType.class }, order = 9, min = 1, max = 1, modifier = false, summary = true) 2223 @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.") 2224 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/task-intent") 2225 protected Enumeration<TaskIntent> intent; 2226 2227 /** 2228 * Indicates how quickly the Task should be addressed with respect to other 2229 * requests. 2230 */ 2231 @Child(name = "priority", type = { CodeType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false) 2232 @Description(shortDefinition = "routine | urgent | asap | stat", formalDefinition = "Indicates how quickly the Task should be addressed with respect to other requests.") 2233 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-priority") 2234 protected Enumeration<TaskPriority> priority; 2235 2236 /** 2237 * A name or code (or both) briefly describing what the task involves. 2238 */ 2239 @Child(name = "code", type = { 2240 CodeableConcept.class }, order = 11, min = 0, max = 1, modifier = false, summary = true) 2241 @Description(shortDefinition = "Task Type", formalDefinition = "A name or code (or both) briefly describing what the task involves.") 2242 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/task-code") 2243 protected CodeableConcept code; 2244 2245 /** 2246 * A free-text description of what is to be performed. 2247 */ 2248 @Child(name = "description", type = { 2249 StringType.class }, order = 12, min = 0, max = 1, modifier = false, summary = true) 2250 @Description(shortDefinition = "Human-readable explanation of task", formalDefinition = "A free-text description of what is to be performed.") 2251 protected StringType description; 2252 2253 /** 2254 * The request being actioned or the resource being manipulated by this task. 2255 */ 2256 @Child(name = "focus", type = { Reference.class }, order = 13, min = 0, max = 1, modifier = false, summary = true) 2257 @Description(shortDefinition = "What task is acting on", formalDefinition = "The request being actioned or the resource being manipulated by this task.") 2258 protected Reference focus; 2259 2260 /** 2261 * The actual object that is the target of the reference (The request being 2262 * actioned or the resource being manipulated by this task.) 2263 */ 2264 protected Resource focusTarget; 2265 2266 /** 2267 * The entity who benefits from the performance of the service specified in the 2268 * task (e.g., the patient). 2269 */ 2270 @Child(name = "for", type = { Reference.class }, order = 14, min = 0, max = 1, modifier = false, summary = true) 2271 @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).") 2272 protected Reference for_; 2273 2274 /** 2275 * The actual object that is the target of the reference (The entity who 2276 * benefits from the performance of the service specified in the task (e.g., the 2277 * patient).) 2278 */ 2279 protected Resource for_Target; 2280 2281 /** 2282 * The healthcare event (e.g. a patient and healthcare provider interaction) 2283 * during which this task was created. 2284 */ 2285 @Child(name = "encounter", type = { Encounter.class }, order = 15, min = 0, max = 1, modifier = false, summary = true) 2286 @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.") 2287 protected Reference encounter; 2288 2289 /** 2290 * The actual object that is the target of the reference (The healthcare event 2291 * (e.g. a patient and healthcare provider interaction) during which this task 2292 * was created.) 2293 */ 2294 protected Encounter encounterTarget; 2295 2296 /** 2297 * Identifies the time action was first taken against the task (start) and/or 2298 * the time final action was taken against the task prior to marking it as 2299 * completed (end). 2300 */ 2301 @Child(name = "executionPeriod", type = { 2302 Period.class }, order = 16, min = 0, max = 1, modifier = false, summary = true) 2303 @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).") 2304 protected Period executionPeriod; 2305 2306 /** 2307 * The date and time this task was created. 2308 */ 2309 @Child(name = "authoredOn", type = { 2310 DateTimeType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false) 2311 @Description(shortDefinition = "Task Creation Date", formalDefinition = "The date and time this task was created.") 2312 protected DateTimeType authoredOn; 2313 2314 /** 2315 * The date and time of last modification to this task. 2316 */ 2317 @Child(name = "lastModified", type = { 2318 DateTimeType.class }, order = 18, min = 0, max = 1, modifier = false, summary = true) 2319 @Description(shortDefinition = "Task Last Modified Date", formalDefinition = "The date and time of last modification to this task.") 2320 protected DateTimeType lastModified; 2321 2322 /** 2323 * The creator of the task. 2324 */ 2325 @Child(name = "requester", type = { Device.class, Organization.class, Patient.class, Practitioner.class, 2326 PractitionerRole.class, RelatedPerson.class }, order = 19, min = 0, max = 1, modifier = false, summary = true) 2327 @Description(shortDefinition = "Who is asking for task to be done", formalDefinition = "The creator of the task.") 2328 protected Reference requester; 2329 2330 /** 2331 * The actual object that is the target of the reference (The creator of the 2332 * task.) 2333 */ 2334 protected Resource requesterTarget; 2335 2336 /** 2337 * The kind of participant that should perform the task. 2338 */ 2339 @Child(name = "performerType", type = { 2340 CodeableConcept.class }, order = 20, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2341 @Description(shortDefinition = "Requested performer", formalDefinition = "The kind of participant that should perform the task.") 2342 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/performer-role") 2343 protected List<CodeableConcept> performerType; 2344 2345 /** 2346 * Individual organization or Device currently responsible for task execution. 2347 */ 2348 @Child(name = "owner", type = { Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, 2349 HealthcareService.class, Patient.class, Device.class, 2350 RelatedPerson.class }, order = 21, min = 0, max = 1, modifier = false, summary = true) 2351 @Description(shortDefinition = "Responsible individual", formalDefinition = "Individual organization or Device currently responsible for task execution.") 2352 protected Reference owner; 2353 2354 /** 2355 * The actual object that is the target of the reference (Individual 2356 * organization or Device currently responsible for task execution.) 2357 */ 2358 protected Resource ownerTarget; 2359 2360 /** 2361 * Principal physical location where the this task is performed. 2362 */ 2363 @Child(name = "location", type = { Location.class }, order = 22, min = 0, max = 1, modifier = false, summary = true) 2364 @Description(shortDefinition = "Where task occurs", formalDefinition = "Principal physical location where the this task is performed.") 2365 protected Reference location; 2366 2367 /** 2368 * The actual object that is the target of the reference (Principal physical 2369 * location where the this task is performed.) 2370 */ 2371 protected Location locationTarget; 2372 2373 /** 2374 * A description or code indicating why this task needs to be performed. 2375 */ 2376 @Child(name = "reasonCode", type = { 2377 CodeableConcept.class }, order = 23, min = 0, max = 1, modifier = false, summary = false) 2378 @Description(shortDefinition = "Why task is needed", formalDefinition = "A description or code indicating why this task needs to be performed.") 2379 protected CodeableConcept reasonCode; 2380 2381 /** 2382 * A resource reference indicating why this task needs to be performed. 2383 */ 2384 @Child(name = "reasonReference", type = { 2385 Reference.class }, order = 24, min = 0, max = 1, modifier = false, summary = false) 2386 @Description(shortDefinition = "Why task is needed", formalDefinition = "A resource reference indicating why this task needs to be performed.") 2387 protected Reference reasonReference; 2388 2389 /** 2390 * The actual object that is the target of the reference (A resource reference 2391 * indicating why this task needs to be performed.) 2392 */ 2393 protected Resource reasonReferenceTarget; 2394 2395 /** 2396 * Insurance plans, coverage extensions, pre-authorizations and/or 2397 * pre-determinations that may be relevant to the Task. 2398 */ 2399 @Child(name = "insurance", type = { Coverage.class, 2400 ClaimResponse.class }, order = 25, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2401 @Description(shortDefinition = "Associated insurance coverage", formalDefinition = "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.") 2402 protected List<Reference> insurance; 2403 /** 2404 * The actual objects that are the target of the reference (Insurance plans, 2405 * coverage extensions, pre-authorizations and/or pre-determinations that may be 2406 * relevant to the Task.) 2407 */ 2408 protected List<Resource> insuranceTarget; 2409 2410 /** 2411 * Free-text information captured about the task as it progresses. 2412 */ 2413 @Child(name = "note", type = { 2414 Annotation.class }, order = 26, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2415 @Description(shortDefinition = "Comments made about the task", formalDefinition = "Free-text information captured about the task as it progresses.") 2416 protected List<Annotation> note; 2417 2418 /** 2419 * Links to Provenance records for past versions of this Task that identify key 2420 * state transitions or updates that are likely to be relevant to a user looking 2421 * at the current version of the task. 2422 */ 2423 @Child(name = "relevantHistory", type = { 2424 Provenance.class }, order = 27, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2425 @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.") 2426 protected List<Reference> relevantHistory; 2427 /** 2428 * The actual objects that are the target of the reference (Links to Provenance 2429 * records for past versions of this Task that identify key state transitions or 2430 * updates that are likely to be relevant to a user looking at the current 2431 * version of the task.) 2432 */ 2433 protected List<Provenance> relevantHistoryTarget; 2434 2435 /** 2436 * If the Task.focus is a request resource and the task is seeking fulfillment 2437 * (i.e. is asking for the request to be actioned), this element identifies any 2438 * limitations on what parts of the referenced request should be actioned. 2439 */ 2440 @Child(name = "restriction", type = {}, order = 28, min = 0, max = 1, modifier = false, summary = false) 2441 @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.") 2442 protected TaskRestrictionComponent restriction; 2443 2444 /** 2445 * Additional information that may be needed in the execution of the task. 2446 */ 2447 @Child(name = "input", type = {}, order = 29, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2448 @Description(shortDefinition = "Information used to perform task", formalDefinition = "Additional information that may be needed in the execution of the task.") 2449 protected List<ParameterComponent> input; 2450 2451 /** 2452 * Outputs produced by the Task. 2453 */ 2454 @Child(name = "output", type = {}, order = 30, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2455 @Description(shortDefinition = "Information produced as part of task", formalDefinition = "Outputs produced by the Task.") 2456 protected List<TaskOutputComponent> output; 2457 2458 private static final long serialVersionUID = -765029272L; 2459 2460 /** 2461 * Constructor 2462 */ 2463 public Task() { 2464 super(); 2465 } 2466 2467 /** 2468 * Constructor 2469 */ 2470 public Task(Enumeration<TaskStatus> status, Enumeration<TaskIntent> intent) { 2471 super(); 2472 this.status = status; 2473 this.intent = intent; 2474 } 2475 2476 /** 2477 * @return {@link #identifier} (The business identifier for this task.) 2478 */ 2479 public List<Identifier> getIdentifier() { 2480 if (this.identifier == null) 2481 this.identifier = new ArrayList<Identifier>(); 2482 return this.identifier; 2483 } 2484 2485 /** 2486 * @return Returns a reference to <code>this</code> for easy method chaining 2487 */ 2488 public Task setIdentifier(List<Identifier> theIdentifier) { 2489 this.identifier = theIdentifier; 2490 return this; 2491 } 2492 2493 public boolean hasIdentifier() { 2494 if (this.identifier == null) 2495 return false; 2496 for (Identifier item : this.identifier) 2497 if (!item.isEmpty()) 2498 return true; 2499 return false; 2500 } 2501 2502 public Identifier addIdentifier() { // 3 2503 Identifier t = new Identifier(); 2504 if (this.identifier == null) 2505 this.identifier = new ArrayList<Identifier>(); 2506 this.identifier.add(t); 2507 return t; 2508 } 2509 2510 public Task addIdentifier(Identifier t) { // 3 2511 if (t == null) 2512 return this; 2513 if (this.identifier == null) 2514 this.identifier = new ArrayList<Identifier>(); 2515 this.identifier.add(t); 2516 return this; 2517 } 2518 2519 /** 2520 * @return The first repetition of repeating field {@link #identifier}, creating 2521 * it if it does not already exist 2522 */ 2523 public Identifier getIdentifierFirstRep() { 2524 if (getIdentifier().isEmpty()) { 2525 addIdentifier(); 2526 } 2527 return getIdentifier().get(0); 2528 } 2529 2530 /** 2531 * @return {@link #instantiatesCanonical} (The URL pointing to a *FHIR*-defined 2532 * protocol, guideline, orderset or other definition that is adhered to 2533 * in whole or in part by this Task.). This is the underlying object 2534 * with id, value and extensions. The accessor 2535 * "getInstantiatesCanonical" gives direct access to the value 2536 */ 2537 public CanonicalType getInstantiatesCanonicalElement() { 2538 if (this.instantiatesCanonical == null) 2539 if (Configuration.errorOnAutoCreate()) 2540 throw new Error("Attempt to auto-create Task.instantiatesCanonical"); 2541 else if (Configuration.doAutoCreate()) 2542 this.instantiatesCanonical = new CanonicalType(); // bb 2543 return this.instantiatesCanonical; 2544 } 2545 2546 public boolean hasInstantiatesCanonicalElement() { 2547 return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty(); 2548 } 2549 2550 public boolean hasInstantiatesCanonical() { 2551 return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty(); 2552 } 2553 2554 /** 2555 * @param value {@link #instantiatesCanonical} (The URL pointing to a 2556 * *FHIR*-defined protocol, guideline, orderset or other definition 2557 * that is adhered to in whole or in part by this Task.). This is 2558 * the underlying object with id, value and extensions. The 2559 * accessor "getInstantiatesCanonical" gives direct access to the 2560 * value 2561 */ 2562 public Task setInstantiatesCanonicalElement(CanonicalType value) { 2563 this.instantiatesCanonical = value; 2564 return this; 2565 } 2566 2567 /** 2568 * @return The URL pointing to a *FHIR*-defined protocol, guideline, orderset or 2569 * other definition that is adhered to in whole or in part by this Task. 2570 */ 2571 public String getInstantiatesCanonical() { 2572 return this.instantiatesCanonical == null ? null : this.instantiatesCanonical.getValue(); 2573 } 2574 2575 /** 2576 * @param value The URL pointing to a *FHIR*-defined protocol, guideline, 2577 * orderset or other definition that is adhered to in whole or in 2578 * part by this Task. 2579 */ 2580 public Task setInstantiatesCanonical(String value) { 2581 if (Utilities.noString(value)) 2582 this.instantiatesCanonical = null; 2583 else { 2584 if (this.instantiatesCanonical == null) 2585 this.instantiatesCanonical = new CanonicalType(); 2586 this.instantiatesCanonical.setValue(value); 2587 } 2588 return this; 2589 } 2590 2591 /** 2592 * @return {@link #instantiatesUri} (The URL pointing to an *externally* 2593 * maintained protocol, guideline, orderset or other definition that is 2594 * adhered to in whole or in part by this Task.). This is the underlying 2595 * object with id, value and extensions. The accessor 2596 * "getInstantiatesUri" gives direct access to the value 2597 */ 2598 public UriType getInstantiatesUriElement() { 2599 if (this.instantiatesUri == null) 2600 if (Configuration.errorOnAutoCreate()) 2601 throw new Error("Attempt to auto-create Task.instantiatesUri"); 2602 else if (Configuration.doAutoCreate()) 2603 this.instantiatesUri = new UriType(); // bb 2604 return this.instantiatesUri; 2605 } 2606 2607 public boolean hasInstantiatesUriElement() { 2608 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 2609 } 2610 2611 public boolean hasInstantiatesUri() { 2612 return this.instantiatesUri != null && !this.instantiatesUri.isEmpty(); 2613 } 2614 2615 /** 2616 * @param value {@link #instantiatesUri} (The URL pointing to an *externally* 2617 * maintained protocol, guideline, orderset or other definition 2618 * that is adhered to in whole or in part by this Task.). This is 2619 * the underlying object with id, value and extensions. The 2620 * accessor "getInstantiatesUri" gives direct access to the value 2621 */ 2622 public Task setInstantiatesUriElement(UriType value) { 2623 this.instantiatesUri = value; 2624 return this; 2625 } 2626 2627 /** 2628 * @return The URL pointing to an *externally* maintained protocol, guideline, 2629 * orderset or other definition that is adhered to in whole or in part 2630 * by this Task. 2631 */ 2632 public String getInstantiatesUri() { 2633 return this.instantiatesUri == null ? null : this.instantiatesUri.getValue(); 2634 } 2635 2636 /** 2637 * @param value The URL pointing to an *externally* maintained protocol, 2638 * guideline, orderset or other definition that is adhered to in 2639 * whole or in part by this Task. 2640 */ 2641 public Task setInstantiatesUri(String value) { 2642 if (Utilities.noString(value)) 2643 this.instantiatesUri = null; 2644 else { 2645 if (this.instantiatesUri == null) 2646 this.instantiatesUri = new UriType(); 2647 this.instantiatesUri.setValue(value); 2648 } 2649 return this; 2650 } 2651 2652 /** 2653 * @return {@link #basedOn} (BasedOn refers to a higher-level authorization that 2654 * triggered the creation of the task. It references a "request" 2655 * resource such as a ServiceRequest, MedicationRequest, ServiceRequest, 2656 * CarePlan, etc. which is distinct from the "request" resource the task 2657 * is seeking to fulfill. This latter resource is referenced by FocusOn. 2658 * For example, based on a ServiceRequest (= BasedOn), a task is created 2659 * to fulfill a procedureRequest ( = FocusOn ) to collect a specimen 2660 * from a patient.) 2661 */ 2662 public List<Reference> getBasedOn() { 2663 if (this.basedOn == null) 2664 this.basedOn = new ArrayList<Reference>(); 2665 return this.basedOn; 2666 } 2667 2668 /** 2669 * @return Returns a reference to <code>this</code> for easy method chaining 2670 */ 2671 public Task setBasedOn(List<Reference> theBasedOn) { 2672 this.basedOn = theBasedOn; 2673 return this; 2674 } 2675 2676 public boolean hasBasedOn() { 2677 if (this.basedOn == null) 2678 return false; 2679 for (Reference item : this.basedOn) 2680 if (!item.isEmpty()) 2681 return true; 2682 return false; 2683 } 2684 2685 public Reference addBasedOn() { // 3 2686 Reference t = new Reference(); 2687 if (this.basedOn == null) 2688 this.basedOn = new ArrayList<Reference>(); 2689 this.basedOn.add(t); 2690 return t; 2691 } 2692 2693 public Task addBasedOn(Reference t) { // 3 2694 if (t == null) 2695 return this; 2696 if (this.basedOn == null) 2697 this.basedOn = new ArrayList<Reference>(); 2698 this.basedOn.add(t); 2699 return this; 2700 } 2701 2702 /** 2703 * @return The first repetition of repeating field {@link #basedOn}, creating it 2704 * if it does not already exist 2705 */ 2706 public Reference getBasedOnFirstRep() { 2707 if (getBasedOn().isEmpty()) { 2708 addBasedOn(); 2709 } 2710 return getBasedOn().get(0); 2711 } 2712 2713 /** 2714 * @deprecated Use Reference#setResource(IBaseResource) instead 2715 */ 2716 @Deprecated 2717 public List<Resource> getBasedOnTarget() { 2718 if (this.basedOnTarget == null) 2719 this.basedOnTarget = new ArrayList<Resource>(); 2720 return this.basedOnTarget; 2721 } 2722 2723 /** 2724 * @return {@link #groupIdentifier} (An identifier that links together multiple 2725 * tasks and other requests that were created in the same context.) 2726 */ 2727 public Identifier getGroupIdentifier() { 2728 if (this.groupIdentifier == null) 2729 if (Configuration.errorOnAutoCreate()) 2730 throw new Error("Attempt to auto-create Task.groupIdentifier"); 2731 else if (Configuration.doAutoCreate()) 2732 this.groupIdentifier = new Identifier(); // cc 2733 return this.groupIdentifier; 2734 } 2735 2736 public boolean hasGroupIdentifier() { 2737 return this.groupIdentifier != null && !this.groupIdentifier.isEmpty(); 2738 } 2739 2740 /** 2741 * @param value {@link #groupIdentifier} (An identifier that links together 2742 * multiple tasks and other requests that were created in the same 2743 * context.) 2744 */ 2745 public Task setGroupIdentifier(Identifier value) { 2746 this.groupIdentifier = value; 2747 return this; 2748 } 2749 2750 /** 2751 * @return {@link #partOf} (Task that this particular task is part of.) 2752 */ 2753 public List<Reference> getPartOf() { 2754 if (this.partOf == null) 2755 this.partOf = new ArrayList<Reference>(); 2756 return this.partOf; 2757 } 2758 2759 /** 2760 * @return Returns a reference to <code>this</code> for easy method chaining 2761 */ 2762 public Task setPartOf(List<Reference> thePartOf) { 2763 this.partOf = thePartOf; 2764 return this; 2765 } 2766 2767 public boolean hasPartOf() { 2768 if (this.partOf == null) 2769 return false; 2770 for (Reference item : this.partOf) 2771 if (!item.isEmpty()) 2772 return true; 2773 return false; 2774 } 2775 2776 public Reference addPartOf() { // 3 2777 Reference t = new Reference(); 2778 if (this.partOf == null) 2779 this.partOf = new ArrayList<Reference>(); 2780 this.partOf.add(t); 2781 return t; 2782 } 2783 2784 public Task addPartOf(Reference t) { // 3 2785 if (t == null) 2786 return this; 2787 if (this.partOf == null) 2788 this.partOf = new ArrayList<Reference>(); 2789 this.partOf.add(t); 2790 return this; 2791 } 2792 2793 /** 2794 * @return The first repetition of repeating field {@link #partOf}, creating it 2795 * if it does not already exist 2796 */ 2797 public Reference getPartOfFirstRep() { 2798 if (getPartOf().isEmpty()) { 2799 addPartOf(); 2800 } 2801 return getPartOf().get(0); 2802 } 2803 2804 /** 2805 * @deprecated Use Reference#setResource(IBaseResource) instead 2806 */ 2807 @Deprecated 2808 public List<Task> getPartOfTarget() { 2809 if (this.partOfTarget == null) 2810 this.partOfTarget = new ArrayList<Task>(); 2811 return this.partOfTarget; 2812 } 2813 2814 /** 2815 * @deprecated Use Reference#setResource(IBaseResource) instead 2816 */ 2817 @Deprecated 2818 public Task addPartOfTarget() { 2819 Task r = new Task(); 2820 if (this.partOfTarget == null) 2821 this.partOfTarget = new ArrayList<Task>(); 2822 this.partOfTarget.add(r); 2823 return r; 2824 } 2825 2826 /** 2827 * @return {@link #status} (The current status of the task.). This is the 2828 * underlying object with id, value and extensions. The accessor 2829 * "getStatus" gives direct access to the value 2830 */ 2831 public Enumeration<TaskStatus> getStatusElement() { 2832 if (this.status == null) 2833 if (Configuration.errorOnAutoCreate()) 2834 throw new Error("Attempt to auto-create Task.status"); 2835 else if (Configuration.doAutoCreate()) 2836 this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); // bb 2837 return this.status; 2838 } 2839 2840 public boolean hasStatusElement() { 2841 return this.status != null && !this.status.isEmpty(); 2842 } 2843 2844 public boolean hasStatus() { 2845 return this.status != null && !this.status.isEmpty(); 2846 } 2847 2848 /** 2849 * @param value {@link #status} (The current status of the task.). This is the 2850 * underlying object with id, value and extensions. The accessor 2851 * "getStatus" gives direct access to the value 2852 */ 2853 public Task setStatusElement(Enumeration<TaskStatus> value) { 2854 this.status = value; 2855 return this; 2856 } 2857 2858 /** 2859 * @return The current status of the task. 2860 */ 2861 public TaskStatus getStatus() { 2862 return this.status == null ? null : this.status.getValue(); 2863 } 2864 2865 /** 2866 * @param value The current status of the task. 2867 */ 2868 public Task setStatus(TaskStatus value) { 2869 if (this.status == null) 2870 this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); 2871 this.status.setValue(value); 2872 return this; 2873 } 2874 2875 /** 2876 * @return {@link #statusReason} (An explanation as to why this task is held, 2877 * failed, was refused, etc.) 2878 */ 2879 public CodeableConcept getStatusReason() { 2880 if (this.statusReason == null) 2881 if (Configuration.errorOnAutoCreate()) 2882 throw new Error("Attempt to auto-create Task.statusReason"); 2883 else if (Configuration.doAutoCreate()) 2884 this.statusReason = new CodeableConcept(); // cc 2885 return this.statusReason; 2886 } 2887 2888 public boolean hasStatusReason() { 2889 return this.statusReason != null && !this.statusReason.isEmpty(); 2890 } 2891 2892 /** 2893 * @param value {@link #statusReason} (An explanation as to why this task is 2894 * held, failed, was refused, etc.) 2895 */ 2896 public Task setStatusReason(CodeableConcept value) { 2897 this.statusReason = value; 2898 return this; 2899 } 2900 2901 /** 2902 * @return {@link #businessStatus} (Contains business-specific nuances of the 2903 * business state.) 2904 */ 2905 public CodeableConcept getBusinessStatus() { 2906 if (this.businessStatus == null) 2907 if (Configuration.errorOnAutoCreate()) 2908 throw new Error("Attempt to auto-create Task.businessStatus"); 2909 else if (Configuration.doAutoCreate()) 2910 this.businessStatus = new CodeableConcept(); // cc 2911 return this.businessStatus; 2912 } 2913 2914 public boolean hasBusinessStatus() { 2915 return this.businessStatus != null && !this.businessStatus.isEmpty(); 2916 } 2917 2918 /** 2919 * @param value {@link #businessStatus} (Contains business-specific nuances of 2920 * the business state.) 2921 */ 2922 public Task setBusinessStatus(CodeableConcept value) { 2923 this.businessStatus = value; 2924 return this; 2925 } 2926 2927 /** 2928 * @return {@link #intent} (Indicates the "level" of actionability associated 2929 * with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an 2930 * actionable task, etc.). This is the underlying object with id, value 2931 * and extensions. The accessor "getIntent" gives direct access to the 2932 * value 2933 */ 2934 public Enumeration<TaskIntent> getIntentElement() { 2935 if (this.intent == null) 2936 if (Configuration.errorOnAutoCreate()) 2937 throw new Error("Attempt to auto-create Task.intent"); 2938 else if (Configuration.doAutoCreate()) 2939 this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); // bb 2940 return this.intent; 2941 } 2942 2943 public boolean hasIntentElement() { 2944 return this.intent != null && !this.intent.isEmpty(); 2945 } 2946 2947 public boolean hasIntent() { 2948 return this.intent != null && !this.intent.isEmpty(); 2949 } 2950 2951 /** 2952 * @param value {@link #intent} (Indicates the "level" of actionability 2953 * associated with the Task, i.e. i+R[9]Cs this a proposed task, a 2954 * planned task, an actionable task, etc.). This is the underlying 2955 * object with id, value and extensions. The accessor "getIntent" 2956 * gives direct access to the value 2957 */ 2958 public Task setIntentElement(Enumeration<TaskIntent> value) { 2959 this.intent = value; 2960 return this; 2961 } 2962 2963 /** 2964 * @return Indicates the "level" of actionability associated with the Task, i.e. 2965 * i+R[9]Cs this a proposed task, a planned task, an actionable task, 2966 * etc. 2967 */ 2968 public TaskIntent getIntent() { 2969 return this.intent == null ? null : this.intent.getValue(); 2970 } 2971 2972 /** 2973 * @param value Indicates the "level" of actionability associated with the Task, 2974 * i.e. i+R[9]Cs this a proposed task, a planned task, an 2975 * actionable task, etc. 2976 */ 2977 public Task setIntent(TaskIntent value) { 2978 if (this.intent == null) 2979 this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); 2980 this.intent.setValue(value); 2981 return this; 2982 } 2983 2984 /** 2985 * @return {@link #priority} (Indicates how quickly the Task should be addressed 2986 * with respect to other requests.). This is the underlying object with 2987 * id, value and extensions. The accessor "getPriority" gives direct 2988 * access to the value 2989 */ 2990 public Enumeration<TaskPriority> getPriorityElement() { 2991 if (this.priority == null) 2992 if (Configuration.errorOnAutoCreate()) 2993 throw new Error("Attempt to auto-create Task.priority"); 2994 else if (Configuration.doAutoCreate()) 2995 this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory()); // bb 2996 return this.priority; 2997 } 2998 2999 public boolean hasPriorityElement() { 3000 return this.priority != null && !this.priority.isEmpty(); 3001 } 3002 3003 public boolean hasPriority() { 3004 return this.priority != null && !this.priority.isEmpty(); 3005 } 3006 3007 /** 3008 * @param value {@link #priority} (Indicates how quickly the Task should be 3009 * addressed with respect to other requests.). This is the 3010 * underlying object with id, value and extensions. The accessor 3011 * "getPriority" gives direct access to the value 3012 */ 3013 public Task setPriorityElement(Enumeration<TaskPriority> value) { 3014 this.priority = value; 3015 return this; 3016 } 3017 3018 /** 3019 * @return Indicates how quickly the Task should be addressed with respect to 3020 * other requests. 3021 */ 3022 public TaskPriority getPriority() { 3023 return this.priority == null ? null : this.priority.getValue(); 3024 } 3025 3026 /** 3027 * @param value Indicates how quickly the Task should be addressed with respect 3028 * to other requests. 3029 */ 3030 public Task setPriority(TaskPriority value) { 3031 if (value == null) 3032 this.priority = null; 3033 else { 3034 if (this.priority == null) 3035 this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory()); 3036 this.priority.setValue(value); 3037 } 3038 return this; 3039 } 3040 3041 /** 3042 * @return {@link #code} (A name or code (or both) briefly describing what the 3043 * task involves.) 3044 */ 3045 public CodeableConcept getCode() { 3046 if (this.code == null) 3047 if (Configuration.errorOnAutoCreate()) 3048 throw new Error("Attempt to auto-create Task.code"); 3049 else if (Configuration.doAutoCreate()) 3050 this.code = new CodeableConcept(); // cc 3051 return this.code; 3052 } 3053 3054 public boolean hasCode() { 3055 return this.code != null && !this.code.isEmpty(); 3056 } 3057 3058 /** 3059 * @param value {@link #code} (A name or code (or both) briefly describing what 3060 * the task involves.) 3061 */ 3062 public Task setCode(CodeableConcept value) { 3063 this.code = value; 3064 return this; 3065 } 3066 3067 /** 3068 * @return {@link #description} (A free-text description of what is to be 3069 * performed.). This is the underlying object with id, value and 3070 * extensions. The accessor "getDescription" gives direct access to the 3071 * value 3072 */ 3073 public StringType getDescriptionElement() { 3074 if (this.description == null) 3075 if (Configuration.errorOnAutoCreate()) 3076 throw new Error("Attempt to auto-create Task.description"); 3077 else if (Configuration.doAutoCreate()) 3078 this.description = new StringType(); // bb 3079 return this.description; 3080 } 3081 3082 public boolean hasDescriptionElement() { 3083 return this.description != null && !this.description.isEmpty(); 3084 } 3085 3086 public boolean hasDescription() { 3087 return this.description != null && !this.description.isEmpty(); 3088 } 3089 3090 /** 3091 * @param value {@link #description} (A free-text description of what is to be 3092 * performed.). This is the underlying object with id, value and 3093 * extensions. The accessor "getDescription" gives direct access to 3094 * the value 3095 */ 3096 public Task setDescriptionElement(StringType value) { 3097 this.description = value; 3098 return this; 3099 } 3100 3101 /** 3102 * @return A free-text description of what is to be performed. 3103 */ 3104 public String getDescription() { 3105 return this.description == null ? null : this.description.getValue(); 3106 } 3107 3108 /** 3109 * @param value A free-text description of what is to be performed. 3110 */ 3111 public Task setDescription(String value) { 3112 if (Utilities.noString(value)) 3113 this.description = null; 3114 else { 3115 if (this.description == null) 3116 this.description = new StringType(); 3117 this.description.setValue(value); 3118 } 3119 return this; 3120 } 3121 3122 /** 3123 * @return {@link #focus} (The request being actioned or the resource being 3124 * manipulated by this task.) 3125 */ 3126 public Reference getFocus() { 3127 if (this.focus == null) 3128 if (Configuration.errorOnAutoCreate()) 3129 throw new Error("Attempt to auto-create Task.focus"); 3130 else if (Configuration.doAutoCreate()) 3131 this.focus = new Reference(); // cc 3132 return this.focus; 3133 } 3134 3135 public boolean hasFocus() { 3136 return this.focus != null && !this.focus.isEmpty(); 3137 } 3138 3139 /** 3140 * @param value {@link #focus} (The request being actioned or the resource being 3141 * manipulated by this task.) 3142 */ 3143 public Task setFocus(Reference value) { 3144 this.focus = value; 3145 return this; 3146 } 3147 3148 /** 3149 * @return {@link #focus} The actual object that is the target of the reference. 3150 * The reference library doesn't populate this, but you can use it to 3151 * hold the resource if you resolve it. (The request being actioned or 3152 * the resource being manipulated by this task.) 3153 */ 3154 public Resource getFocusTarget() { 3155 return this.focusTarget; 3156 } 3157 3158 /** 3159 * @param value {@link #focus} The actual object that is the target of the 3160 * reference. The reference library doesn't use these, but you can 3161 * use it to hold the resource if you resolve it. (The request 3162 * being actioned or the resource being manipulated by this task.) 3163 */ 3164 public Task setFocusTarget(Resource value) { 3165 this.focusTarget = value; 3166 return this; 3167 } 3168 3169 /** 3170 * @return {@link #for_} (The entity who benefits from the performance of the 3171 * service specified in the task (e.g., the patient).) 3172 */ 3173 public Reference getFor() { 3174 if (this.for_ == null) 3175 if (Configuration.errorOnAutoCreate()) 3176 throw new Error("Attempt to auto-create Task.for_"); 3177 else if (Configuration.doAutoCreate()) 3178 this.for_ = new Reference(); // cc 3179 return this.for_; 3180 } 3181 3182 public boolean hasFor() { 3183 return this.for_ != null && !this.for_.isEmpty(); 3184 } 3185 3186 /** 3187 * @param value {@link #for_} (The entity who benefits from the performance of 3188 * the service specified in the task (e.g., the patient).) 3189 */ 3190 public Task setFor(Reference value) { 3191 this.for_ = value; 3192 return this; 3193 } 3194 3195 /** 3196 * @return {@link #for_} The actual object that is the target of the reference. 3197 * The reference library doesn't populate this, but you can use it to 3198 * hold the resource if you resolve it. (The entity who benefits from 3199 * the performance of the service specified in the task (e.g., the 3200 * patient).) 3201 */ 3202 public Resource getForTarget() { 3203 return this.for_Target; 3204 } 3205 3206 /** 3207 * @param value {@link #for_} The actual object that is the target of the 3208 * reference. The reference library doesn't use these, but you can 3209 * use it to hold the resource if you resolve it. (The entity who 3210 * benefits from the performance of the service specified in the 3211 * task (e.g., the patient).) 3212 */ 3213 public Task setForTarget(Resource value) { 3214 this.for_Target = value; 3215 return this; 3216 } 3217 3218 /** 3219 * @return {@link #encounter} (The healthcare event (e.g. a patient and 3220 * healthcare provider interaction) during which this task was created.) 3221 */ 3222 public Reference getEncounter() { 3223 if (this.encounter == null) 3224 if (Configuration.errorOnAutoCreate()) 3225 throw new Error("Attempt to auto-create Task.encounter"); 3226 else if (Configuration.doAutoCreate()) 3227 this.encounter = new Reference(); // cc 3228 return this.encounter; 3229 } 3230 3231 public boolean hasEncounter() { 3232 return this.encounter != null && !this.encounter.isEmpty(); 3233 } 3234 3235 /** 3236 * @param value {@link #encounter} (The healthcare event (e.g. a patient and 3237 * healthcare provider interaction) during which this task was 3238 * created.) 3239 */ 3240 public Task setEncounter(Reference value) { 3241 this.encounter = value; 3242 return this; 3243 } 3244 3245 /** 3246 * @return {@link #encounter} The actual object that is the target of the 3247 * reference. The reference library doesn't populate this, but you can 3248 * use it to hold the resource if you resolve it. (The healthcare event 3249 * (e.g. a patient and healthcare provider interaction) during which 3250 * this task was created.) 3251 */ 3252 public Encounter getEncounterTarget() { 3253 if (this.encounterTarget == null) 3254 if (Configuration.errorOnAutoCreate()) 3255 throw new Error("Attempt to auto-create Task.encounter"); 3256 else if (Configuration.doAutoCreate()) 3257 this.encounterTarget = new Encounter(); // aa 3258 return this.encounterTarget; 3259 } 3260 3261 /** 3262 * @param value {@link #encounter} The actual object that is the target of the 3263 * reference. The reference library doesn't use these, but you can 3264 * use it to hold the resource if you resolve it. (The healthcare 3265 * event (e.g. a patient and healthcare provider interaction) 3266 * during which this task was created.) 3267 */ 3268 public Task setEncounterTarget(Encounter value) { 3269 this.encounterTarget = value; 3270 return this; 3271 } 3272 3273 /** 3274 * @return {@link #executionPeriod} (Identifies the time action was first taken 3275 * against the task (start) and/or the time final action was taken 3276 * against the task prior to marking it as completed (end).) 3277 */ 3278 public Period getExecutionPeriod() { 3279 if (this.executionPeriod == null) 3280 if (Configuration.errorOnAutoCreate()) 3281 throw new Error("Attempt to auto-create Task.executionPeriod"); 3282 else if (Configuration.doAutoCreate()) 3283 this.executionPeriod = new Period(); // cc 3284 return this.executionPeriod; 3285 } 3286 3287 public boolean hasExecutionPeriod() { 3288 return this.executionPeriod != null && !this.executionPeriod.isEmpty(); 3289 } 3290 3291 /** 3292 * @param value {@link #executionPeriod} (Identifies the time action was first 3293 * taken against the task (start) and/or the time final action was 3294 * taken against the task prior to marking it as completed (end).) 3295 */ 3296 public Task setExecutionPeriod(Period value) { 3297 this.executionPeriod = value; 3298 return this; 3299 } 3300 3301 /** 3302 * @return {@link #authoredOn} (The date and time this task was created.). This 3303 * is the underlying object with id, value and extensions. The accessor 3304 * "getAuthoredOn" gives direct access to the value 3305 */ 3306 public DateTimeType getAuthoredOnElement() { 3307 if (this.authoredOn == null) 3308 if (Configuration.errorOnAutoCreate()) 3309 throw new Error("Attempt to auto-create Task.authoredOn"); 3310 else if (Configuration.doAutoCreate()) 3311 this.authoredOn = new DateTimeType(); // bb 3312 return this.authoredOn; 3313 } 3314 3315 public boolean hasAuthoredOnElement() { 3316 return this.authoredOn != null && !this.authoredOn.isEmpty(); 3317 } 3318 3319 public boolean hasAuthoredOn() { 3320 return this.authoredOn != null && !this.authoredOn.isEmpty(); 3321 } 3322 3323 /** 3324 * @param value {@link #authoredOn} (The date and time this task was created.). 3325 * This is the underlying object with id, value and extensions. The 3326 * accessor "getAuthoredOn" gives direct access to the value 3327 */ 3328 public Task setAuthoredOnElement(DateTimeType value) { 3329 this.authoredOn = value; 3330 return this; 3331 } 3332 3333 /** 3334 * @return The date and time this task was created. 3335 */ 3336 public Date getAuthoredOn() { 3337 return this.authoredOn == null ? null : this.authoredOn.getValue(); 3338 } 3339 3340 /** 3341 * @param value The date and time this task was created. 3342 */ 3343 public Task setAuthoredOn(Date value) { 3344 if (value == null) 3345 this.authoredOn = null; 3346 else { 3347 if (this.authoredOn == null) 3348 this.authoredOn = new DateTimeType(); 3349 this.authoredOn.setValue(value); 3350 } 3351 return this; 3352 } 3353 3354 /** 3355 * @return {@link #lastModified} (The date and time of last modification to this 3356 * task.). This is the underlying object with id, value and extensions. 3357 * The accessor "getLastModified" gives direct access to the value 3358 */ 3359 public DateTimeType getLastModifiedElement() { 3360 if (this.lastModified == null) 3361 if (Configuration.errorOnAutoCreate()) 3362 throw new Error("Attempt to auto-create Task.lastModified"); 3363 else if (Configuration.doAutoCreate()) 3364 this.lastModified = new DateTimeType(); // bb 3365 return this.lastModified; 3366 } 3367 3368 public boolean hasLastModifiedElement() { 3369 return this.lastModified != null && !this.lastModified.isEmpty(); 3370 } 3371 3372 public boolean hasLastModified() { 3373 return this.lastModified != null && !this.lastModified.isEmpty(); 3374 } 3375 3376 /** 3377 * @param value {@link #lastModified} (The date and time of last modification to 3378 * this task.). This is the underlying object with id, value and 3379 * extensions. The accessor "getLastModified" gives direct access 3380 * to the value 3381 */ 3382 public Task setLastModifiedElement(DateTimeType value) { 3383 this.lastModified = value; 3384 return this; 3385 } 3386 3387 /** 3388 * @return The date and time of last modification to this task. 3389 */ 3390 public Date getLastModified() { 3391 return this.lastModified == null ? null : this.lastModified.getValue(); 3392 } 3393 3394 /** 3395 * @param value The date and time of last modification to this task. 3396 */ 3397 public Task setLastModified(Date value) { 3398 if (value == null) 3399 this.lastModified = null; 3400 else { 3401 if (this.lastModified == null) 3402 this.lastModified = new DateTimeType(); 3403 this.lastModified.setValue(value); 3404 } 3405 return this; 3406 } 3407 3408 /** 3409 * @return {@link #requester} (The creator of the task.) 3410 */ 3411 public Reference getRequester() { 3412 if (this.requester == null) 3413 if (Configuration.errorOnAutoCreate()) 3414 throw new Error("Attempt to auto-create Task.requester"); 3415 else if (Configuration.doAutoCreate()) 3416 this.requester = new Reference(); // cc 3417 return this.requester; 3418 } 3419 3420 public boolean hasRequester() { 3421 return this.requester != null && !this.requester.isEmpty(); 3422 } 3423 3424 /** 3425 * @param value {@link #requester} (The creator of the task.) 3426 */ 3427 public Task setRequester(Reference value) { 3428 this.requester = value; 3429 return this; 3430 } 3431 3432 /** 3433 * @return {@link #requester} The actual object that is the target of the 3434 * reference. The reference library doesn't populate this, but you can 3435 * use it to hold the resource if you resolve it. (The creator of the 3436 * task.) 3437 */ 3438 public Resource getRequesterTarget() { 3439 return this.requesterTarget; 3440 } 3441 3442 /** 3443 * @param value {@link #requester} The actual object that is the target of the 3444 * reference. The reference library doesn't use these, but you can 3445 * use it to hold the resource if you resolve it. (The creator of 3446 * the task.) 3447 */ 3448 public Task setRequesterTarget(Resource value) { 3449 this.requesterTarget = value; 3450 return this; 3451 } 3452 3453 /** 3454 * @return {@link #performerType} (The kind of participant that should perform 3455 * the task.) 3456 */ 3457 public List<CodeableConcept> getPerformerType() { 3458 if (this.performerType == null) 3459 this.performerType = new ArrayList<CodeableConcept>(); 3460 return this.performerType; 3461 } 3462 3463 /** 3464 * @return Returns a reference to <code>this</code> for easy method chaining 3465 */ 3466 public Task setPerformerType(List<CodeableConcept> thePerformerType) { 3467 this.performerType = thePerformerType; 3468 return this; 3469 } 3470 3471 public boolean hasPerformerType() { 3472 if (this.performerType == null) 3473 return false; 3474 for (CodeableConcept item : this.performerType) 3475 if (!item.isEmpty()) 3476 return true; 3477 return false; 3478 } 3479 3480 public CodeableConcept addPerformerType() { // 3 3481 CodeableConcept t = new CodeableConcept(); 3482 if (this.performerType == null) 3483 this.performerType = new ArrayList<CodeableConcept>(); 3484 this.performerType.add(t); 3485 return t; 3486 } 3487 3488 public Task addPerformerType(CodeableConcept t) { // 3 3489 if (t == null) 3490 return this; 3491 if (this.performerType == null) 3492 this.performerType = new ArrayList<CodeableConcept>(); 3493 this.performerType.add(t); 3494 return this; 3495 } 3496 3497 /** 3498 * @return The first repetition of repeating field {@link #performerType}, 3499 * creating it if it does not already exist 3500 */ 3501 public CodeableConcept getPerformerTypeFirstRep() { 3502 if (getPerformerType().isEmpty()) { 3503 addPerformerType(); 3504 } 3505 return getPerformerType().get(0); 3506 } 3507 3508 /** 3509 * @return {@link #owner} (Individual organization or Device currently 3510 * responsible for task execution.) 3511 */ 3512 public Reference getOwner() { 3513 if (this.owner == null) 3514 if (Configuration.errorOnAutoCreate()) 3515 throw new Error("Attempt to auto-create Task.owner"); 3516 else if (Configuration.doAutoCreate()) 3517 this.owner = new Reference(); // cc 3518 return this.owner; 3519 } 3520 3521 public boolean hasOwner() { 3522 return this.owner != null && !this.owner.isEmpty(); 3523 } 3524 3525 /** 3526 * @param value {@link #owner} (Individual organization or Device currently 3527 * responsible for task execution.) 3528 */ 3529 public Task setOwner(Reference value) { 3530 this.owner = value; 3531 return this; 3532 } 3533 3534 /** 3535 * @return {@link #owner} The actual object that is the target of the reference. 3536 * The reference library doesn't populate this, but you can use it to 3537 * hold the resource if you resolve it. (Individual organization or 3538 * Device currently responsible for task execution.) 3539 */ 3540 public Resource getOwnerTarget() { 3541 return this.ownerTarget; 3542 } 3543 3544 /** 3545 * @param value {@link #owner} The actual object that is the target of the 3546 * reference. The reference library doesn't use these, but you can 3547 * use it to hold the resource if you resolve it. (Individual 3548 * organization or Device currently responsible for task 3549 * execution.) 3550 */ 3551 public Task setOwnerTarget(Resource value) { 3552 this.ownerTarget = value; 3553 return this; 3554 } 3555 3556 /** 3557 * @return {@link #location} (Principal physical location where the this task is 3558 * performed.) 3559 */ 3560 public Reference getLocation() { 3561 if (this.location == null) 3562 if (Configuration.errorOnAutoCreate()) 3563 throw new Error("Attempt to auto-create Task.location"); 3564 else if (Configuration.doAutoCreate()) 3565 this.location = new Reference(); // cc 3566 return this.location; 3567 } 3568 3569 public boolean hasLocation() { 3570 return this.location != null && !this.location.isEmpty(); 3571 } 3572 3573 /** 3574 * @param value {@link #location} (Principal physical location where the this 3575 * task is performed.) 3576 */ 3577 public Task setLocation(Reference value) { 3578 this.location = value; 3579 return this; 3580 } 3581 3582 /** 3583 * @return {@link #location} The actual object that is the target of the 3584 * reference. The reference library doesn't populate this, but you can 3585 * use it to hold the resource if you resolve it. (Principal physical 3586 * location where the this task is performed.) 3587 */ 3588 public Location getLocationTarget() { 3589 if (this.locationTarget == null) 3590 if (Configuration.errorOnAutoCreate()) 3591 throw new Error("Attempt to auto-create Task.location"); 3592 else if (Configuration.doAutoCreate()) 3593 this.locationTarget = new Location(); // aa 3594 return this.locationTarget; 3595 } 3596 3597 /** 3598 * @param value {@link #location} The actual object that is the target of the 3599 * reference. The reference library doesn't use these, but you can 3600 * use it to hold the resource if you resolve it. (Principal 3601 * physical location where the this task is performed.) 3602 */ 3603 public Task setLocationTarget(Location value) { 3604 this.locationTarget = value; 3605 return this; 3606 } 3607 3608 /** 3609 * @return {@link #reasonCode} (A description or code indicating why this task 3610 * needs to be performed.) 3611 */ 3612 public CodeableConcept getReasonCode() { 3613 if (this.reasonCode == null) 3614 if (Configuration.errorOnAutoCreate()) 3615 throw new Error("Attempt to auto-create Task.reasonCode"); 3616 else if (Configuration.doAutoCreate()) 3617 this.reasonCode = new CodeableConcept(); // cc 3618 return this.reasonCode; 3619 } 3620 3621 public boolean hasReasonCode() { 3622 return this.reasonCode != null && !this.reasonCode.isEmpty(); 3623 } 3624 3625 /** 3626 * @param value {@link #reasonCode} (A description or code indicating why this 3627 * task needs to be performed.) 3628 */ 3629 public Task setReasonCode(CodeableConcept value) { 3630 this.reasonCode = value; 3631 return this; 3632 } 3633 3634 /** 3635 * @return {@link #reasonReference} (A resource reference indicating why this 3636 * task needs to be performed.) 3637 */ 3638 public Reference getReasonReference() { 3639 if (this.reasonReference == null) 3640 if (Configuration.errorOnAutoCreate()) 3641 throw new Error("Attempt to auto-create Task.reasonReference"); 3642 else if (Configuration.doAutoCreate()) 3643 this.reasonReference = new Reference(); // cc 3644 return this.reasonReference; 3645 } 3646 3647 public boolean hasReasonReference() { 3648 return this.reasonReference != null && !this.reasonReference.isEmpty(); 3649 } 3650 3651 /** 3652 * @param value {@link #reasonReference} (A resource reference indicating why 3653 * this task needs to be performed.) 3654 */ 3655 public Task setReasonReference(Reference value) { 3656 this.reasonReference = value; 3657 return this; 3658 } 3659 3660 /** 3661 * @return {@link #reasonReference} The actual object that is the target of the 3662 * reference. The reference library doesn't populate this, but you can 3663 * use it to hold the resource if you resolve it. (A resource reference 3664 * indicating why this task needs to be performed.) 3665 */ 3666 public Resource getReasonReferenceTarget() { 3667 return this.reasonReferenceTarget; 3668 } 3669 3670 /** 3671 * @param value {@link #reasonReference} The actual object that is the target of 3672 * the reference. The reference library doesn't use these, but you 3673 * can use it to hold the resource if you resolve it. (A resource 3674 * reference indicating why this task needs to be performed.) 3675 */ 3676 public Task setReasonReferenceTarget(Resource value) { 3677 this.reasonReferenceTarget = value; 3678 return this; 3679 } 3680 3681 /** 3682 * @return {@link #insurance} (Insurance plans, coverage extensions, 3683 * pre-authorizations and/or pre-determinations that may be relevant to 3684 * the Task.) 3685 */ 3686 public List<Reference> getInsurance() { 3687 if (this.insurance == null) 3688 this.insurance = new ArrayList<Reference>(); 3689 return this.insurance; 3690 } 3691 3692 /** 3693 * @return Returns a reference to <code>this</code> for easy method chaining 3694 */ 3695 public Task setInsurance(List<Reference> theInsurance) { 3696 this.insurance = theInsurance; 3697 return this; 3698 } 3699 3700 public boolean hasInsurance() { 3701 if (this.insurance == null) 3702 return false; 3703 for (Reference item : this.insurance) 3704 if (!item.isEmpty()) 3705 return true; 3706 return false; 3707 } 3708 3709 public Reference addInsurance() { // 3 3710 Reference t = new Reference(); 3711 if (this.insurance == null) 3712 this.insurance = new ArrayList<Reference>(); 3713 this.insurance.add(t); 3714 return t; 3715 } 3716 3717 public Task addInsurance(Reference t) { // 3 3718 if (t == null) 3719 return this; 3720 if (this.insurance == null) 3721 this.insurance = new ArrayList<Reference>(); 3722 this.insurance.add(t); 3723 return this; 3724 } 3725 3726 /** 3727 * @return The first repetition of repeating field {@link #insurance}, creating 3728 * it if it does not already exist 3729 */ 3730 public Reference getInsuranceFirstRep() { 3731 if (getInsurance().isEmpty()) { 3732 addInsurance(); 3733 } 3734 return getInsurance().get(0); 3735 } 3736 3737 /** 3738 * @deprecated Use Reference#setResource(IBaseResource) instead 3739 */ 3740 @Deprecated 3741 public List<Resource> getInsuranceTarget() { 3742 if (this.insuranceTarget == null) 3743 this.insuranceTarget = new ArrayList<Resource>(); 3744 return this.insuranceTarget; 3745 } 3746 3747 /** 3748 * @return {@link #note} (Free-text information captured about the task as it 3749 * progresses.) 3750 */ 3751 public List<Annotation> getNote() { 3752 if (this.note == null) 3753 this.note = new ArrayList<Annotation>(); 3754 return this.note; 3755 } 3756 3757 /** 3758 * @return Returns a reference to <code>this</code> for easy method chaining 3759 */ 3760 public Task setNote(List<Annotation> theNote) { 3761 this.note = theNote; 3762 return this; 3763 } 3764 3765 public boolean hasNote() { 3766 if (this.note == null) 3767 return false; 3768 for (Annotation item : this.note) 3769 if (!item.isEmpty()) 3770 return true; 3771 return false; 3772 } 3773 3774 public Annotation addNote() { // 3 3775 Annotation t = new Annotation(); 3776 if (this.note == null) 3777 this.note = new ArrayList<Annotation>(); 3778 this.note.add(t); 3779 return t; 3780 } 3781 3782 public Task addNote(Annotation t) { // 3 3783 if (t == null) 3784 return this; 3785 if (this.note == null) 3786 this.note = new ArrayList<Annotation>(); 3787 this.note.add(t); 3788 return this; 3789 } 3790 3791 /** 3792 * @return The first repetition of repeating field {@link #note}, creating it if 3793 * it does not already exist 3794 */ 3795 public Annotation getNoteFirstRep() { 3796 if (getNote().isEmpty()) { 3797 addNote(); 3798 } 3799 return getNote().get(0); 3800 } 3801 3802 /** 3803 * @return {@link #relevantHistory} (Links to Provenance records for past 3804 * versions of this Task that identify key state transitions or updates 3805 * that are likely to be relevant to a user looking at the current 3806 * version of the task.) 3807 */ 3808 public List<Reference> getRelevantHistory() { 3809 if (this.relevantHistory == null) 3810 this.relevantHistory = new ArrayList<Reference>(); 3811 return this.relevantHistory; 3812 } 3813 3814 /** 3815 * @return Returns a reference to <code>this</code> for easy method chaining 3816 */ 3817 public Task setRelevantHistory(List<Reference> theRelevantHistory) { 3818 this.relevantHistory = theRelevantHistory; 3819 return this; 3820 } 3821 3822 public boolean hasRelevantHistory() { 3823 if (this.relevantHistory == null) 3824 return false; 3825 for (Reference item : this.relevantHistory) 3826 if (!item.isEmpty()) 3827 return true; 3828 return false; 3829 } 3830 3831 public Reference addRelevantHistory() { // 3 3832 Reference t = new Reference(); 3833 if (this.relevantHistory == null) 3834 this.relevantHistory = new ArrayList<Reference>(); 3835 this.relevantHistory.add(t); 3836 return t; 3837 } 3838 3839 public Task addRelevantHistory(Reference t) { // 3 3840 if (t == null) 3841 return this; 3842 if (this.relevantHistory == null) 3843 this.relevantHistory = new ArrayList<Reference>(); 3844 this.relevantHistory.add(t); 3845 return this; 3846 } 3847 3848 /** 3849 * @return The first repetition of repeating field {@link #relevantHistory}, 3850 * creating it if it does not already exist 3851 */ 3852 public Reference getRelevantHistoryFirstRep() { 3853 if (getRelevantHistory().isEmpty()) { 3854 addRelevantHistory(); 3855 } 3856 return getRelevantHistory().get(0); 3857 } 3858 3859 /** 3860 * @deprecated Use Reference#setResource(IBaseResource) instead 3861 */ 3862 @Deprecated 3863 public List<Provenance> getRelevantHistoryTarget() { 3864 if (this.relevantHistoryTarget == null) 3865 this.relevantHistoryTarget = new ArrayList<Provenance>(); 3866 return this.relevantHistoryTarget; 3867 } 3868 3869 /** 3870 * @deprecated Use Reference#setResource(IBaseResource) instead 3871 */ 3872 @Deprecated 3873 public Provenance addRelevantHistoryTarget() { 3874 Provenance r = new Provenance(); 3875 if (this.relevantHistoryTarget == null) 3876 this.relevantHistoryTarget = new ArrayList<Provenance>(); 3877 this.relevantHistoryTarget.add(r); 3878 return r; 3879 } 3880 3881 /** 3882 * @return {@link #restriction} (If the Task.focus is a request resource and the 3883 * task is seeking fulfillment (i.e. is asking for the request to be 3884 * actioned), this element identifies any limitations on what parts of 3885 * the referenced request should be actioned.) 3886 */ 3887 public TaskRestrictionComponent getRestriction() { 3888 if (this.restriction == null) 3889 if (Configuration.errorOnAutoCreate()) 3890 throw new Error("Attempt to auto-create Task.restriction"); 3891 else if (Configuration.doAutoCreate()) 3892 this.restriction = new TaskRestrictionComponent(); // cc 3893 return this.restriction; 3894 } 3895 3896 public boolean hasRestriction() { 3897 return this.restriction != null && !this.restriction.isEmpty(); 3898 } 3899 3900 /** 3901 * @param value {@link #restriction} (If the Task.focus is a request resource 3902 * and the task is seeking fulfillment (i.e. is asking for the 3903 * request to be actioned), this element identifies any limitations 3904 * on what parts of the referenced request should be actioned.) 3905 */ 3906 public Task setRestriction(TaskRestrictionComponent value) { 3907 this.restriction = value; 3908 return this; 3909 } 3910 3911 /** 3912 * @return {@link #input} (Additional information that may be needed in the 3913 * execution of the task.) 3914 */ 3915 public List<ParameterComponent> getInput() { 3916 if (this.input == null) 3917 this.input = new ArrayList<ParameterComponent>(); 3918 return this.input; 3919 } 3920 3921 /** 3922 * @return Returns a reference to <code>this</code> for easy method chaining 3923 */ 3924 public Task setInput(List<ParameterComponent> theInput) { 3925 this.input = theInput; 3926 return this; 3927 } 3928 3929 public boolean hasInput() { 3930 if (this.input == null) 3931 return false; 3932 for (ParameterComponent item : this.input) 3933 if (!item.isEmpty()) 3934 return true; 3935 return false; 3936 } 3937 3938 public ParameterComponent addInput() { // 3 3939 ParameterComponent t = new ParameterComponent(); 3940 if (this.input == null) 3941 this.input = new ArrayList<ParameterComponent>(); 3942 this.input.add(t); 3943 return t; 3944 } 3945 3946 public Task addInput(ParameterComponent t) { // 3 3947 if (t == null) 3948 return this; 3949 if (this.input == null) 3950 this.input = new ArrayList<ParameterComponent>(); 3951 this.input.add(t); 3952 return this; 3953 } 3954 3955 /** 3956 * @return The first repetition of repeating field {@link #input}, creating it 3957 * if it does not already exist 3958 */ 3959 public ParameterComponent getInputFirstRep() { 3960 if (getInput().isEmpty()) { 3961 addInput(); 3962 } 3963 return getInput().get(0); 3964 } 3965 3966 /** 3967 * @return {@link #output} (Outputs produced by the Task.) 3968 */ 3969 public List<TaskOutputComponent> getOutput() { 3970 if (this.output == null) 3971 this.output = new ArrayList<TaskOutputComponent>(); 3972 return this.output; 3973 } 3974 3975 /** 3976 * @return Returns a reference to <code>this</code> for easy method chaining 3977 */ 3978 public Task setOutput(List<TaskOutputComponent> theOutput) { 3979 this.output = theOutput; 3980 return this; 3981 } 3982 3983 public boolean hasOutput() { 3984 if (this.output == null) 3985 return false; 3986 for (TaskOutputComponent item : this.output) 3987 if (!item.isEmpty()) 3988 return true; 3989 return false; 3990 } 3991 3992 public TaskOutputComponent addOutput() { // 3 3993 TaskOutputComponent t = new TaskOutputComponent(); 3994 if (this.output == null) 3995 this.output = new ArrayList<TaskOutputComponent>(); 3996 this.output.add(t); 3997 return t; 3998 } 3999 4000 public Task addOutput(TaskOutputComponent t) { // 3 4001 if (t == null) 4002 return this; 4003 if (this.output == null) 4004 this.output = new ArrayList<TaskOutputComponent>(); 4005 this.output.add(t); 4006 return this; 4007 } 4008 4009 /** 4010 * @return The first repetition of repeating field {@link #output}, creating it 4011 * if it does not already exist 4012 */ 4013 public TaskOutputComponent getOutputFirstRep() { 4014 if (getOutput().isEmpty()) { 4015 addOutput(); 4016 } 4017 return getOutput().get(0); 4018 } 4019 4020 protected void listChildren(List<Property> children) { 4021 super.listChildren(children); 4022 children.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, 4023 java.lang.Integer.MAX_VALUE, identifier)); 4024 children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition)", 4025 "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.", 4026 0, 1, instantiatesCanonical)); 4027 children.add(new Property("instantiatesUri", "uri", 4028 "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.", 4029 0, 1, instantiatesUri)); 4030 children.add(new Property("basedOn", "Reference(Any)", 4031 "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.", 4032 0, java.lang.Integer.MAX_VALUE, basedOn)); 4033 children.add(new Property("groupIdentifier", "Identifier", 4034 "An identifier that links together multiple tasks and other requests that were created in the same context.", 0, 4035 1, groupIdentifier)); 4036 children.add(new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, 4037 java.lang.Integer.MAX_VALUE, partOf)); 4038 children.add(new Property("status", "code", "The current status of the task.", 0, 1, status)); 4039 children.add(new Property("statusReason", "CodeableConcept", 4040 "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason)); 4041 children.add(new Property("businessStatus", "CodeableConcept", 4042 "Contains business-specific nuances of the business state.", 0, 1, businessStatus)); 4043 children.add(new Property("intent", "code", 4044 "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.", 4045 0, 1, intent)); 4046 children.add(new Property("priority", "code", 4047 "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority)); 4048 children.add(new Property("code", "CodeableConcept", 4049 "A name or code (or both) briefly describing what the task involves.", 0, 1, code)); 4050 children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, 4051 description)); 4052 children.add(new Property("focus", "Reference(Any)", 4053 "The request being actioned or the resource being manipulated by this task.", 0, 1, focus)); 4054 children.add(new Property("for", "Reference(Any)", 4055 "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 1, 4056 for_)); 4057 children.add(new Property("encounter", "Reference(Encounter)", 4058 "The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.", 4059 0, 1, encounter)); 4060 children.add(new Property("executionPeriod", "Period", 4061 "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).", 4062 0, 1, executionPeriod)); 4063 children.add(new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn)); 4064 children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, 4065 lastModified)); 4066 children.add( 4067 new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", 4068 "The creator of the task.", 0, 1, requester)); 4069 children.add(new Property("performerType", "CodeableConcept", 4070 "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType)); 4071 children.add(new Property("owner", 4072 "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", 4073 "Individual organization or Device currently responsible for task execution.", 0, 1, owner)); 4074 children.add(new Property("location", "Reference(Location)", 4075 "Principal physical location where the this task is performed.", 0, 1, location)); 4076 children.add(new Property("reasonCode", "CodeableConcept", 4077 "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode)); 4078 children.add(new Property("reasonReference", "Reference(Any)", 4079 "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference)); 4080 children.add(new Property("insurance", "Reference(Coverage|ClaimResponse)", 4081 "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.", 4082 0, java.lang.Integer.MAX_VALUE, insurance)); 4083 children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 4084 0, java.lang.Integer.MAX_VALUE, note)); 4085 children.add(new Property("relevantHistory", "Reference(Provenance)", 4086 "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.", 4087 0, java.lang.Integer.MAX_VALUE, relevantHistory)); 4088 children.add(new Property("restriction", "", 4089 "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.", 4090 0, 1, restriction)); 4091 children.add(new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, 4092 java.lang.Integer.MAX_VALUE, input)); 4093 children.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output)); 4094 } 4095 4096 @Override 4097 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4098 switch (_hash) { 4099 case -1618432855: 4100 /* identifier */ return new Property("identifier", "Identifier", "The business identifier for this task.", 0, 4101 java.lang.Integer.MAX_VALUE, identifier); 4102 case 8911915: 4103 /* instantiatesCanonical */ return new Property("instantiatesCanonical", "canonical(ActivityDefinition)", 4104 "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.", 4105 0, 1, instantiatesCanonical); 4106 case -1926393373: 4107 /* instantiatesUri */ return new Property("instantiatesUri", "uri", 4108 "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.", 4109 0, 1, instantiatesUri); 4110 case -332612366: 4111 /* basedOn */ return new Property("basedOn", "Reference(Any)", 4112 "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.", 4113 0, java.lang.Integer.MAX_VALUE, basedOn); 4114 case -445338488: 4115 /* groupIdentifier */ return new Property("groupIdentifier", "Identifier", 4116 "An identifier that links together multiple tasks and other requests that were created in the same context.", 4117 0, 1, groupIdentifier); 4118 case -995410646: 4119 /* partOf */ return new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, 4120 java.lang.Integer.MAX_VALUE, partOf); 4121 case -892481550: 4122 /* status */ return new Property("status", "code", "The current status of the task.", 0, 1, status); 4123 case 2051346646: 4124 /* statusReason */ return new Property("statusReason", "CodeableConcept", 4125 "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason); 4126 case 2008591314: 4127 /* businessStatus */ return new Property("businessStatus", "CodeableConcept", 4128 "Contains business-specific nuances of the business state.", 0, 1, businessStatus); 4129 case -1183762788: 4130 /* intent */ return new Property("intent", "code", 4131 "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.", 4132 0, 1, intent); 4133 case -1165461084: 4134 /* priority */ return new Property("priority", "code", 4135 "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority); 4136 case 3059181: 4137 /* code */ return new Property("code", "CodeableConcept", 4138 "A name or code (or both) briefly describing what the task involves.", 0, 1, code); 4139 case -1724546052: 4140 /* description */ return new Property("description", "string", 4141 "A free-text description of what is to be performed.", 0, 1, description); 4142 case 97604824: 4143 /* focus */ return new Property("focus", "Reference(Any)", 4144 "The request being actioned or the resource being manipulated by this task.", 0, 1, focus); 4145 case 101577: 4146 /* for */ return new Property("for", "Reference(Any)", 4147 "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 4148 1, for_); 4149 case 1524132147: 4150 /* encounter */ return new Property("encounter", "Reference(Encounter)", 4151 "The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.", 4152 0, 1, encounter); 4153 case 1218624249: 4154 /* executionPeriod */ return new Property("executionPeriod", "Period", 4155 "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).", 4156 0, 1, executionPeriod); 4157 case -1500852503: 4158 /* authoredOn */ return new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, 4159 authoredOn); 4160 case 1959003007: 4161 /* lastModified */ return new Property("lastModified", "dateTime", 4162 "The date and time of last modification to this task.", 0, 1, lastModified); 4163 case 693933948: 4164 /* requester */ return new Property("requester", 4165 "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", 4166 "The creator of the task.", 0, 1, requester); 4167 case -901444568: 4168 /* performerType */ return new Property("performerType", "CodeableConcept", 4169 "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType); 4170 case 106164915: 4171 /* owner */ return new Property("owner", 4172 "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", 4173 "Individual organization or Device currently responsible for task execution.", 0, 1, owner); 4174 case 1901043637: 4175 /* location */ return new Property("location", "Reference(Location)", 4176 "Principal physical location where the this task is performed.", 0, 1, location); 4177 case 722137681: 4178 /* reasonCode */ return new Property("reasonCode", "CodeableConcept", 4179 "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode); 4180 case -1146218137: 4181 /* reasonReference */ return new Property("reasonReference", "Reference(Any)", 4182 "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference); 4183 case 73049818: 4184 /* insurance */ return new Property("insurance", "Reference(Coverage|ClaimResponse)", 4185 "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.", 4186 0, java.lang.Integer.MAX_VALUE, insurance); 4187 case 3387378: 4188 /* note */ return new Property("note", "Annotation", 4189 "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note); 4190 case 1538891575: 4191 /* relevantHistory */ return new Property("relevantHistory", "Reference(Provenance)", 4192 "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.", 4193 0, java.lang.Integer.MAX_VALUE, relevantHistory); 4194 case -1561062452: 4195 /* restriction */ return new Property("restriction", "", 4196 "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.", 4197 0, 1, restriction); 4198 case 100358090: 4199 /* input */ return new Property("input", "", 4200 "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, 4201 input); 4202 case -1005512447: 4203 /* output */ return new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, 4204 output); 4205 default: 4206 return super.getNamedProperty(_hash, _name, _checkValid); 4207 } 4208 4209 } 4210 4211 @Override 4212 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4213 switch (hash) { 4214 case -1618432855: 4215 /* identifier */ return this.identifier == null ? new Base[0] 4216 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4217 case 8911915: 4218 /* instantiatesCanonical */ return this.instantiatesCanonical == null ? new Base[0] 4219 : new Base[] { this.instantiatesCanonical }; // CanonicalType 4220 case -1926393373: 4221 /* instantiatesUri */ return this.instantiatesUri == null ? new Base[0] : new Base[] { this.instantiatesUri }; // UriType 4222 case -332612366: 4223 /* basedOn */ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 4224 case -445338488: 4225 /* groupIdentifier */ return this.groupIdentifier == null ? new Base[0] : new Base[] { this.groupIdentifier }; // Identifier 4226 case -995410646: 4227 /* partOf */ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 4228 case -892481550: 4229 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<TaskStatus> 4230 case 2051346646: 4231 /* statusReason */ return this.statusReason == null ? new Base[0] : new Base[] { this.statusReason }; // CodeableConcept 4232 case 2008591314: 4233 /* businessStatus */ return this.businessStatus == null ? new Base[0] : new Base[] { this.businessStatus }; // CodeableConcept 4234 case -1183762788: 4235 /* intent */ return this.intent == null ? new Base[0] : new Base[] { this.intent }; // Enumeration<TaskIntent> 4236 case -1165461084: 4237 /* priority */ return this.priority == null ? new Base[0] : new Base[] { this.priority }; // Enumeration<TaskPriority> 4238 case 3059181: 4239 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeableConcept 4240 case -1724546052: 4241 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 4242 case 97604824: 4243 /* focus */ return this.focus == null ? new Base[0] : new Base[] { this.focus }; // Reference 4244 case 101577: 4245 /* for */ return this.for_ == null ? new Base[0] : new Base[] { this.for_ }; // Reference 4246 case 1524132147: 4247 /* encounter */ return this.encounter == null ? new Base[0] : new Base[] { this.encounter }; // Reference 4248 case 1218624249: 4249 /* executionPeriod */ return this.executionPeriod == null ? new Base[0] : new Base[] { this.executionPeriod }; // Period 4250 case -1500852503: 4251 /* authoredOn */ return this.authoredOn == null ? new Base[0] : new Base[] { this.authoredOn }; // DateTimeType 4252 case 1959003007: 4253 /* lastModified */ return this.lastModified == null ? new Base[0] : new Base[] { this.lastModified }; // DateTimeType 4254 case 693933948: 4255 /* requester */ return this.requester == null ? new Base[0] : new Base[] { this.requester }; // Reference 4256 case -901444568: 4257 /* performerType */ return this.performerType == null ? new Base[0] 4258 : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept 4259 case 106164915: 4260 /* owner */ return this.owner == null ? new Base[0] : new Base[] { this.owner }; // Reference 4261 case 1901043637: 4262 /* location */ return this.location == null ? new Base[0] : new Base[] { this.location }; // Reference 4263 case 722137681: 4264 /* reasonCode */ return this.reasonCode == null ? new Base[0] : new Base[] { this.reasonCode }; // CodeableConcept 4265 case -1146218137: 4266 /* reasonReference */ return this.reasonReference == null ? new Base[0] : new Base[] { this.reasonReference }; // Reference 4267 case 73049818: 4268 /* insurance */ return this.insurance == null ? new Base[0] 4269 : this.insurance.toArray(new Base[this.insurance.size()]); // Reference 4270 case 3387378: 4271 /* note */ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4272 case 1538891575: 4273 /* relevantHistory */ return this.relevantHistory == null ? new Base[0] 4274 : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference 4275 case -1561062452: 4276 /* restriction */ return this.restriction == null ? new Base[0] : new Base[] { this.restriction }; // TaskRestrictionComponent 4277 case 100358090: 4278 /* input */ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // ParameterComponent 4279 case -1005512447: 4280 /* output */ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TaskOutputComponent 4281 default: 4282 return super.getProperty(hash, name, checkValid); 4283 } 4284 4285 } 4286 4287 @Override 4288 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4289 switch (hash) { 4290 case -1618432855: // identifier 4291 this.getIdentifier().add(castToIdentifier(value)); // Identifier 4292 return value; 4293 case 8911915: // instantiatesCanonical 4294 this.instantiatesCanonical = castToCanonical(value); // CanonicalType 4295 return value; 4296 case -1926393373: // instantiatesUri 4297 this.instantiatesUri = castToUri(value); // UriType 4298 return value; 4299 case -332612366: // basedOn 4300 this.getBasedOn().add(castToReference(value)); // Reference 4301 return value; 4302 case -445338488: // groupIdentifier 4303 this.groupIdentifier = castToIdentifier(value); // Identifier 4304 return value; 4305 case -995410646: // partOf 4306 this.getPartOf().add(castToReference(value)); // Reference 4307 return value; 4308 case -892481550: // status 4309 value = new TaskStatusEnumFactory().fromType(castToCode(value)); 4310 this.status = (Enumeration) value; // Enumeration<TaskStatus> 4311 return value; 4312 case 2051346646: // statusReason 4313 this.statusReason = castToCodeableConcept(value); // CodeableConcept 4314 return value; 4315 case 2008591314: // businessStatus 4316 this.businessStatus = castToCodeableConcept(value); // CodeableConcept 4317 return value; 4318 case -1183762788: // intent 4319 value = new TaskIntentEnumFactory().fromType(castToCode(value)); 4320 this.intent = (Enumeration) value; // Enumeration<TaskIntent> 4321 return value; 4322 case -1165461084: // priority 4323 value = new TaskPriorityEnumFactory().fromType(castToCode(value)); 4324 this.priority = (Enumeration) value; // Enumeration<TaskPriority> 4325 return value; 4326 case 3059181: // code 4327 this.code = castToCodeableConcept(value); // CodeableConcept 4328 return value; 4329 case -1724546052: // description 4330 this.description = castToString(value); // StringType 4331 return value; 4332 case 97604824: // focus 4333 this.focus = castToReference(value); // Reference 4334 return value; 4335 case 101577: // for 4336 this.for_ = castToReference(value); // Reference 4337 return value; 4338 case 1524132147: // encounter 4339 this.encounter = castToReference(value); // Reference 4340 return value; 4341 case 1218624249: // executionPeriod 4342 this.executionPeriod = castToPeriod(value); // Period 4343 return value; 4344 case -1500852503: // authoredOn 4345 this.authoredOn = castToDateTime(value); // DateTimeType 4346 return value; 4347 case 1959003007: // lastModified 4348 this.lastModified = castToDateTime(value); // DateTimeType 4349 return value; 4350 case 693933948: // requester 4351 this.requester = castToReference(value); // Reference 4352 return value; 4353 case -901444568: // performerType 4354 this.getPerformerType().add(castToCodeableConcept(value)); // CodeableConcept 4355 return value; 4356 case 106164915: // owner 4357 this.owner = castToReference(value); // Reference 4358 return value; 4359 case 1901043637: // location 4360 this.location = castToReference(value); // Reference 4361 return value; 4362 case 722137681: // reasonCode 4363 this.reasonCode = castToCodeableConcept(value); // CodeableConcept 4364 return value; 4365 case -1146218137: // reasonReference 4366 this.reasonReference = castToReference(value); // Reference 4367 return value; 4368 case 73049818: // insurance 4369 this.getInsurance().add(castToReference(value)); // Reference 4370 return value; 4371 case 3387378: // note 4372 this.getNote().add(castToAnnotation(value)); // Annotation 4373 return value; 4374 case 1538891575: // relevantHistory 4375 this.getRelevantHistory().add(castToReference(value)); // Reference 4376 return value; 4377 case -1561062452: // restriction 4378 this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent 4379 return value; 4380 case 100358090: // input 4381 this.getInput().add((ParameterComponent) value); // ParameterComponent 4382 return value; 4383 case -1005512447: // output 4384 this.getOutput().add((TaskOutputComponent) value); // TaskOutputComponent 4385 return value; 4386 default: 4387 return super.setProperty(hash, name, value); 4388 } 4389 4390 } 4391 4392 @Override 4393 public Base setProperty(String name, Base value) throws FHIRException { 4394 if (name.equals("identifier")) { 4395 this.getIdentifier().add(castToIdentifier(value)); 4396 } else if (name.equals("instantiatesCanonical")) { 4397 this.instantiatesCanonical = castToCanonical(value); // CanonicalType 4398 } else if (name.equals("instantiatesUri")) { 4399 this.instantiatesUri = castToUri(value); // UriType 4400 } else if (name.equals("basedOn")) { 4401 this.getBasedOn().add(castToReference(value)); 4402 } else if (name.equals("groupIdentifier")) { 4403 this.groupIdentifier = castToIdentifier(value); // Identifier 4404 } else if (name.equals("partOf")) { 4405 this.getPartOf().add(castToReference(value)); 4406 } else if (name.equals("status")) { 4407 value = new TaskStatusEnumFactory().fromType(castToCode(value)); 4408 this.status = (Enumeration) value; // Enumeration<TaskStatus> 4409 } else if (name.equals("statusReason")) { 4410 this.statusReason = castToCodeableConcept(value); // CodeableConcept 4411 } else if (name.equals("businessStatus")) { 4412 this.businessStatus = castToCodeableConcept(value); // CodeableConcept 4413 } else if (name.equals("intent")) { 4414 value = new TaskIntentEnumFactory().fromType(castToCode(value)); 4415 this.intent = (Enumeration) value; // Enumeration<TaskIntent> 4416 } else if (name.equals("priority")) { 4417 value = new TaskPriorityEnumFactory().fromType(castToCode(value)); 4418 this.priority = (Enumeration) value; // Enumeration<TaskPriority> 4419 } else if (name.equals("code")) { 4420 this.code = castToCodeableConcept(value); // CodeableConcept 4421 } else if (name.equals("description")) { 4422 this.description = castToString(value); // StringType 4423 } else if (name.equals("focus")) { 4424 this.focus = castToReference(value); // Reference 4425 } else if (name.equals("for")) { 4426 this.for_ = castToReference(value); // Reference 4427 } else if (name.equals("encounter")) { 4428 this.encounter = castToReference(value); // Reference 4429 } else if (name.equals("executionPeriod")) { 4430 this.executionPeriod = castToPeriod(value); // Period 4431 } else if (name.equals("authoredOn")) { 4432 this.authoredOn = castToDateTime(value); // DateTimeType 4433 } else if (name.equals("lastModified")) { 4434 this.lastModified = castToDateTime(value); // DateTimeType 4435 } else if (name.equals("requester")) { 4436 this.requester = castToReference(value); // Reference 4437 } else if (name.equals("performerType")) { 4438 this.getPerformerType().add(castToCodeableConcept(value)); 4439 } else if (name.equals("owner")) { 4440 this.owner = castToReference(value); // Reference 4441 } else if (name.equals("location")) { 4442 this.location = castToReference(value); // Reference 4443 } else if (name.equals("reasonCode")) { 4444 this.reasonCode = castToCodeableConcept(value); // CodeableConcept 4445 } else if (name.equals("reasonReference")) { 4446 this.reasonReference = castToReference(value); // Reference 4447 } else if (name.equals("insurance")) { 4448 this.getInsurance().add(castToReference(value)); 4449 } else if (name.equals("note")) { 4450 this.getNote().add(castToAnnotation(value)); 4451 } else if (name.equals("relevantHistory")) { 4452 this.getRelevantHistory().add(castToReference(value)); 4453 } else if (name.equals("restriction")) { 4454 this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent 4455 } else if (name.equals("input")) { 4456 this.getInput().add((ParameterComponent) value); 4457 } else if (name.equals("output")) { 4458 this.getOutput().add((TaskOutputComponent) value); 4459 } else 4460 return super.setProperty(name, value); 4461 return value; 4462 } 4463 4464 @Override 4465 public Base makeProperty(int hash, String name) throws FHIRException { 4466 switch (hash) { 4467 case -1618432855: 4468 return addIdentifier(); 4469 case 8911915: 4470 return getInstantiatesCanonicalElement(); 4471 case -1926393373: 4472 return getInstantiatesUriElement(); 4473 case -332612366: 4474 return addBasedOn(); 4475 case -445338488: 4476 return getGroupIdentifier(); 4477 case -995410646: 4478 return addPartOf(); 4479 case -892481550: 4480 return getStatusElement(); 4481 case 2051346646: 4482 return getStatusReason(); 4483 case 2008591314: 4484 return getBusinessStatus(); 4485 case -1183762788: 4486 return getIntentElement(); 4487 case -1165461084: 4488 return getPriorityElement(); 4489 case 3059181: 4490 return getCode(); 4491 case -1724546052: 4492 return getDescriptionElement(); 4493 case 97604824: 4494 return getFocus(); 4495 case 101577: 4496 return getFor(); 4497 case 1524132147: 4498 return getEncounter(); 4499 case 1218624249: 4500 return getExecutionPeriod(); 4501 case -1500852503: 4502 return getAuthoredOnElement(); 4503 case 1959003007: 4504 return getLastModifiedElement(); 4505 case 693933948: 4506 return getRequester(); 4507 case -901444568: 4508 return addPerformerType(); 4509 case 106164915: 4510 return getOwner(); 4511 case 1901043637: 4512 return getLocation(); 4513 case 722137681: 4514 return getReasonCode(); 4515 case -1146218137: 4516 return getReasonReference(); 4517 case 73049818: 4518 return addInsurance(); 4519 case 3387378: 4520 return addNote(); 4521 case 1538891575: 4522 return addRelevantHistory(); 4523 case -1561062452: 4524 return getRestriction(); 4525 case 100358090: 4526 return addInput(); 4527 case -1005512447: 4528 return addOutput(); 4529 default: 4530 return super.makeProperty(hash, name); 4531 } 4532 4533 } 4534 4535 @Override 4536 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4537 switch (hash) { 4538 case -1618432855: 4539 /* identifier */ return new String[] { "Identifier" }; 4540 case 8911915: 4541 /* instantiatesCanonical */ return new String[] { "canonical" }; 4542 case -1926393373: 4543 /* instantiatesUri */ return new String[] { "uri" }; 4544 case -332612366: 4545 /* basedOn */ return new String[] { "Reference" }; 4546 case -445338488: 4547 /* groupIdentifier */ return new String[] { "Identifier" }; 4548 case -995410646: 4549 /* partOf */ return new String[] { "Reference" }; 4550 case -892481550: 4551 /* status */ return new String[] { "code" }; 4552 case 2051346646: 4553 /* statusReason */ return new String[] { "CodeableConcept" }; 4554 case 2008591314: 4555 /* businessStatus */ return new String[] { "CodeableConcept" }; 4556 case -1183762788: 4557 /* intent */ return new String[] { "code" }; 4558 case -1165461084: 4559 /* priority */ return new String[] { "code" }; 4560 case 3059181: 4561 /* code */ return new String[] { "CodeableConcept" }; 4562 case -1724546052: 4563 /* description */ return new String[] { "string" }; 4564 case 97604824: 4565 /* focus */ return new String[] { "Reference" }; 4566 case 101577: 4567 /* for */ return new String[] { "Reference" }; 4568 case 1524132147: 4569 /* encounter */ return new String[] { "Reference" }; 4570 case 1218624249: 4571 /* executionPeriod */ return new String[] { "Period" }; 4572 case -1500852503: 4573 /* authoredOn */ return new String[] { "dateTime" }; 4574 case 1959003007: 4575 /* lastModified */ return new String[] { "dateTime" }; 4576 case 693933948: 4577 /* requester */ return new String[] { "Reference" }; 4578 case -901444568: 4579 /* performerType */ return new String[] { "CodeableConcept" }; 4580 case 106164915: 4581 /* owner */ return new String[] { "Reference" }; 4582 case 1901043637: 4583 /* location */ return new String[] { "Reference" }; 4584 case 722137681: 4585 /* reasonCode */ return new String[] { "CodeableConcept" }; 4586 case -1146218137: 4587 /* reasonReference */ return new String[] { "Reference" }; 4588 case 73049818: 4589 /* insurance */ return new String[] { "Reference" }; 4590 case 3387378: 4591 /* note */ return new String[] { "Annotation" }; 4592 case 1538891575: 4593 /* relevantHistory */ return new String[] { "Reference" }; 4594 case -1561062452: 4595 /* restriction */ return new String[] {}; 4596 case 100358090: 4597 /* input */ return new String[] {}; 4598 case -1005512447: 4599 /* output */ return new String[] {}; 4600 default: 4601 return super.getTypesForProperty(hash, name); 4602 } 4603 4604 } 4605 4606 @Override 4607 public Base addChild(String name) throws FHIRException { 4608 if (name.equals("identifier")) { 4609 return addIdentifier(); 4610 } else if (name.equals("instantiatesCanonical")) { 4611 throw new FHIRException("Cannot call addChild on a singleton property Task.instantiatesCanonical"); 4612 } else if (name.equals("instantiatesUri")) { 4613 throw new FHIRException("Cannot call addChild on a singleton property Task.instantiatesUri"); 4614 } else if (name.equals("basedOn")) { 4615 return addBasedOn(); 4616 } else if (name.equals("groupIdentifier")) { 4617 this.groupIdentifier = new Identifier(); 4618 return this.groupIdentifier; 4619 } else if (name.equals("partOf")) { 4620 return addPartOf(); 4621 } else if (name.equals("status")) { 4622 throw new FHIRException("Cannot call addChild on a singleton property Task.status"); 4623 } else if (name.equals("statusReason")) { 4624 this.statusReason = new CodeableConcept(); 4625 return this.statusReason; 4626 } else if (name.equals("businessStatus")) { 4627 this.businessStatus = new CodeableConcept(); 4628 return this.businessStatus; 4629 } else if (name.equals("intent")) { 4630 throw new FHIRException("Cannot call addChild on a singleton property Task.intent"); 4631 } else if (name.equals("priority")) { 4632 throw new FHIRException("Cannot call addChild on a singleton property Task.priority"); 4633 } else if (name.equals("code")) { 4634 this.code = new CodeableConcept(); 4635 return this.code; 4636 } else if (name.equals("description")) { 4637 throw new FHIRException("Cannot call addChild on a singleton property Task.description"); 4638 } else if (name.equals("focus")) { 4639 this.focus = new Reference(); 4640 return this.focus; 4641 } else if (name.equals("for")) { 4642 this.for_ = new Reference(); 4643 return this.for_; 4644 } else if (name.equals("encounter")) { 4645 this.encounter = new Reference(); 4646 return this.encounter; 4647 } else if (name.equals("executionPeriod")) { 4648 this.executionPeriod = new Period(); 4649 return this.executionPeriod; 4650 } else if (name.equals("authoredOn")) { 4651 throw new FHIRException("Cannot call addChild on a singleton property Task.authoredOn"); 4652 } else if (name.equals("lastModified")) { 4653 throw new FHIRException("Cannot call addChild on a singleton property Task.lastModified"); 4654 } else if (name.equals("requester")) { 4655 this.requester = new Reference(); 4656 return this.requester; 4657 } else if (name.equals("performerType")) { 4658 return addPerformerType(); 4659 } else if (name.equals("owner")) { 4660 this.owner = new Reference(); 4661 return this.owner; 4662 } else if (name.equals("location")) { 4663 this.location = new Reference(); 4664 return this.location; 4665 } else if (name.equals("reasonCode")) { 4666 this.reasonCode = new CodeableConcept(); 4667 return this.reasonCode; 4668 } else if (name.equals("reasonReference")) { 4669 this.reasonReference = new Reference(); 4670 return this.reasonReference; 4671 } else if (name.equals("insurance")) { 4672 return addInsurance(); 4673 } else if (name.equals("note")) { 4674 return addNote(); 4675 } else if (name.equals("relevantHistory")) { 4676 return addRelevantHistory(); 4677 } else if (name.equals("restriction")) { 4678 this.restriction = new TaskRestrictionComponent(); 4679 return this.restriction; 4680 } else if (name.equals("input")) { 4681 return addInput(); 4682 } else if (name.equals("output")) { 4683 return addOutput(); 4684 } else 4685 return super.addChild(name); 4686 } 4687 4688 public String fhirType() { 4689 return "Task"; 4690 4691 } 4692 4693 public Task copy() { 4694 Task dst = new Task(); 4695 copyValues(dst); 4696 return dst; 4697 } 4698 4699 public void copyValues(Task dst) { 4700 super.copyValues(dst); 4701 if (identifier != null) { 4702 dst.identifier = new ArrayList<Identifier>(); 4703 for (Identifier i : identifier) 4704 dst.identifier.add(i.copy()); 4705 } 4706 ; 4707 dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy(); 4708 dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy(); 4709 if (basedOn != null) { 4710 dst.basedOn = new ArrayList<Reference>(); 4711 for (Reference i : basedOn) 4712 dst.basedOn.add(i.copy()); 4713 } 4714 ; 4715 dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); 4716 if (partOf != null) { 4717 dst.partOf = new ArrayList<Reference>(); 4718 for (Reference i : partOf) 4719 dst.partOf.add(i.copy()); 4720 } 4721 ; 4722 dst.status = status == null ? null : status.copy(); 4723 dst.statusReason = statusReason == null ? null : statusReason.copy(); 4724 dst.businessStatus = businessStatus == null ? null : businessStatus.copy(); 4725 dst.intent = intent == null ? null : intent.copy(); 4726 dst.priority = priority == null ? null : priority.copy(); 4727 dst.code = code == null ? null : code.copy(); 4728 dst.description = description == null ? null : description.copy(); 4729 dst.focus = focus == null ? null : focus.copy(); 4730 dst.for_ = for_ == null ? null : for_.copy(); 4731 dst.encounter = encounter == null ? null : encounter.copy(); 4732 dst.executionPeriod = executionPeriod == null ? null : executionPeriod.copy(); 4733 dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); 4734 dst.lastModified = lastModified == null ? null : lastModified.copy(); 4735 dst.requester = requester == null ? null : requester.copy(); 4736 if (performerType != null) { 4737 dst.performerType = new ArrayList<CodeableConcept>(); 4738 for (CodeableConcept i : performerType) 4739 dst.performerType.add(i.copy()); 4740 } 4741 ; 4742 dst.owner = owner == null ? null : owner.copy(); 4743 dst.location = location == null ? null : location.copy(); 4744 dst.reasonCode = reasonCode == null ? null : reasonCode.copy(); 4745 dst.reasonReference = reasonReference == null ? null : reasonReference.copy(); 4746 if (insurance != null) { 4747 dst.insurance = new ArrayList<Reference>(); 4748 for (Reference i : insurance) 4749 dst.insurance.add(i.copy()); 4750 } 4751 ; 4752 if (note != null) { 4753 dst.note = new ArrayList<Annotation>(); 4754 for (Annotation i : note) 4755 dst.note.add(i.copy()); 4756 } 4757 ; 4758 if (relevantHistory != null) { 4759 dst.relevantHistory = new ArrayList<Reference>(); 4760 for (Reference i : relevantHistory) 4761 dst.relevantHistory.add(i.copy()); 4762 } 4763 ; 4764 dst.restriction = restriction == null ? null : restriction.copy(); 4765 if (input != null) { 4766 dst.input = new ArrayList<ParameterComponent>(); 4767 for (ParameterComponent i : input) 4768 dst.input.add(i.copy()); 4769 } 4770 ; 4771 if (output != null) { 4772 dst.output = new ArrayList<TaskOutputComponent>(); 4773 for (TaskOutputComponent i : output) 4774 dst.output.add(i.copy()); 4775 } 4776 ; 4777 } 4778 4779 protected Task typedCopy() { 4780 return copy(); 4781 } 4782 4783 @Override 4784 public boolean equalsDeep(Base other_) { 4785 if (!super.equalsDeep(other_)) 4786 return false; 4787 if (!(other_ instanceof Task)) 4788 return false; 4789 Task o = (Task) other_; 4790 return compareDeep(identifier, o.identifier, true) 4791 && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 4792 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true) 4793 && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(partOf, o.partOf, true) 4794 && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) 4795 && compareDeep(businessStatus, o.businessStatus, true) && compareDeep(intent, o.intent, true) 4796 && compareDeep(priority, o.priority, true) && compareDeep(code, o.code, true) 4797 && compareDeep(description, o.description, true) && compareDeep(focus, o.focus, true) 4798 && compareDeep(for_, o.for_, true) && compareDeep(encounter, o.encounter, true) 4799 && compareDeep(executionPeriod, o.executionPeriod, true) && compareDeep(authoredOn, o.authoredOn, true) 4800 && compareDeep(lastModified, o.lastModified, true) && compareDeep(requester, o.requester, true) 4801 && compareDeep(performerType, o.performerType, true) && compareDeep(owner, o.owner, true) 4802 && compareDeep(location, o.location, true) && compareDeep(reasonCode, o.reasonCode, true) 4803 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(insurance, o.insurance, true) 4804 && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true) 4805 && compareDeep(restriction, o.restriction, true) && compareDeep(input, o.input, true) 4806 && compareDeep(output, o.output, true); 4807 } 4808 4809 @Override 4810 public boolean equalsShallow(Base other_) { 4811 if (!super.equalsShallow(other_)) 4812 return false; 4813 if (!(other_ instanceof Task)) 4814 return false; 4815 Task o = (Task) other_; 4816 return compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(status, o.status, true) 4817 && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true) 4818 && compareValues(description, o.description, true) && compareValues(authoredOn, o.authoredOn, true) 4819 && compareValues(lastModified, o.lastModified, true); 4820 } 4821 4822 public boolean isEmpty() { 4823 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical, instantiatesUri, 4824 basedOn, groupIdentifier, partOf, status, statusReason, businessStatus, intent, priority, code, description, 4825 focus, for_, encounter, executionPeriod, authoredOn, lastModified, requester, performerType, owner, location, 4826 reasonCode, reasonReference, insurance, note, relevantHistory, restriction, input, output); 4827 } 4828 4829 @Override 4830 public ResourceType getResourceType() { 4831 return ResourceType.Task; 4832 } 4833 4834 /** 4835 * Search parameter: <b>owner</b> 4836 * <p> 4837 * Description: <b>Search by task owner</b><br> 4838 * Type: <b>reference</b><br> 4839 * Path: <b>Task.owner</b><br> 4840 * </p> 4841 */ 4842 @SearchParamDefinition(name = "owner", path = "Task.owner", description = "Search by task owner", type = "reference", target = { 4843 CareTeam.class, Device.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, 4844 PractitionerRole.class, RelatedPerson.class }) 4845 public static final String SP_OWNER = "owner"; 4846 /** 4847 * <b>Fluent Client</b> search parameter constant for <b>owner</b> 4848 * <p> 4849 * Description: <b>Search by task owner</b><br> 4850 * Type: <b>reference</b><br> 4851 * Path: <b>Task.owner</b><br> 4852 * </p> 4853 */ 4854 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4855 SP_OWNER); 4856 4857 /** 4858 * Constant for fluent queries to be used to add include statements. Specifies 4859 * the path value of "<b>Task:owner</b>". 4860 */ 4861 public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner") 4862 .toLocked(); 4863 4864 /** 4865 * Search parameter: <b>requester</b> 4866 * <p> 4867 * Description: <b>Search by task requester</b><br> 4868 * Type: <b>reference</b><br> 4869 * Path: <b>Task.requester</b><br> 4870 * </p> 4871 */ 4872 @SearchParamDefinition(name = "requester", path = "Task.requester", description = "Search by task requester", type = "reference", target = { 4873 Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, 4874 RelatedPerson.class }) 4875 public static final String SP_REQUESTER = "requester"; 4876 /** 4877 * <b>Fluent Client</b> search parameter constant for <b>requester</b> 4878 * <p> 4879 * Description: <b>Search by task requester</b><br> 4880 * Type: <b>reference</b><br> 4881 * Path: <b>Task.requester</b><br> 4882 * </p> 4883 */ 4884 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4885 SP_REQUESTER); 4886 4887 /** 4888 * Constant for fluent queries to be used to add include statements. Specifies 4889 * the path value of "<b>Task:requester</b>". 4890 */ 4891 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include( 4892 "Task:requester").toLocked(); 4893 4894 /** 4895 * Search parameter: <b>identifier</b> 4896 * <p> 4897 * Description: <b>Search for a task instance by its business identifier</b><br> 4898 * Type: <b>token</b><br> 4899 * Path: <b>Task.identifier</b><br> 4900 * </p> 4901 */ 4902 @SearchParamDefinition(name = "identifier", path = "Task.identifier", description = "Search for a task instance by its business identifier", type = "token") 4903 public static final String SP_IDENTIFIER = "identifier"; 4904 /** 4905 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4906 * <p> 4907 * Description: <b>Search for a task instance by its business identifier</b><br> 4908 * Type: <b>token</b><br> 4909 * Path: <b>Task.identifier</b><br> 4910 * </p> 4911 */ 4912 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4913 SP_IDENTIFIER); 4914 4915 /** 4916 * Search parameter: <b>business-status</b> 4917 * <p> 4918 * Description: <b>Search by business status</b><br> 4919 * Type: <b>token</b><br> 4920 * Path: <b>Task.businessStatus</b><br> 4921 * </p> 4922 */ 4923 @SearchParamDefinition(name = "business-status", path = "Task.businessStatus", description = "Search by business status", type = "token") 4924 public static final String SP_BUSINESS_STATUS = "business-status"; 4925 /** 4926 * <b>Fluent Client</b> search parameter constant for <b>business-status</b> 4927 * <p> 4928 * Description: <b>Search by business status</b><br> 4929 * Type: <b>token</b><br> 4930 * Path: <b>Task.businessStatus</b><br> 4931 * </p> 4932 */ 4933 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BUSINESS_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4934 SP_BUSINESS_STATUS); 4935 4936 /** 4937 * Search parameter: <b>period</b> 4938 * <p> 4939 * Description: <b>Search by period Task is/was underway</b><br> 4940 * Type: <b>date</b><br> 4941 * Path: <b>Task.executionPeriod</b><br> 4942 * </p> 4943 */ 4944 @SearchParamDefinition(name = "period", path = "Task.executionPeriod", description = "Search by period Task is/was underway", type = "date") 4945 public static final String SP_PERIOD = "period"; 4946 /** 4947 * <b>Fluent Client</b> search parameter constant for <b>period</b> 4948 * <p> 4949 * Description: <b>Search by period Task is/was underway</b><br> 4950 * Type: <b>date</b><br> 4951 * Path: <b>Task.executionPeriod</b><br> 4952 * </p> 4953 */ 4954 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam( 4955 SP_PERIOD); 4956 4957 /** 4958 * Search parameter: <b>code</b> 4959 * <p> 4960 * Description: <b>Search by task code</b><br> 4961 * Type: <b>token</b><br> 4962 * Path: <b>Task.code</b><br> 4963 * </p> 4964 */ 4965 @SearchParamDefinition(name = "code", path = "Task.code", description = "Search by task code", type = "token") 4966 public static final String SP_CODE = "code"; 4967 /** 4968 * <b>Fluent Client</b> search parameter constant for <b>code</b> 4969 * <p> 4970 * Description: <b>Search by task code</b><br> 4971 * Type: <b>token</b><br> 4972 * Path: <b>Task.code</b><br> 4973 * </p> 4974 */ 4975 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4976 SP_CODE); 4977 4978 /** 4979 * Search parameter: <b>performer</b> 4980 * <p> 4981 * Description: <b>Search by recommended type of performer (e.g., Requester, 4982 * Performer, Scheduler).</b><br> 4983 * Type: <b>token</b><br> 4984 * Path: <b>Task.performerType</b><br> 4985 * </p> 4986 */ 4987 @SearchParamDefinition(name = "performer", path = "Task.performerType", description = "Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type = "token") 4988 public static final String SP_PERFORMER = "performer"; 4989 /** 4990 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 4991 * <p> 4992 * Description: <b>Search by recommended type of performer (e.g., Requester, 4993 * Performer, Scheduler).</b><br> 4994 * Type: <b>token</b><br> 4995 * Path: <b>Task.performerType</b><br> 4996 * </p> 4997 */ 4998 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4999 SP_PERFORMER); 5000 5001 /** 5002 * Search parameter: <b>subject</b> 5003 * <p> 5004 * Description: <b>Search by subject</b><br> 5005 * Type: <b>reference</b><br> 5006 * Path: <b>Task.for</b><br> 5007 * </p> 5008 */ 5009 @SearchParamDefinition(name = "subject", path = "Task.for", description = "Search by subject", type = "reference") 5010 public static final String SP_SUBJECT = "subject"; 5011 /** 5012 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 5013 * <p> 5014 * Description: <b>Search by subject</b><br> 5015 * Type: <b>reference</b><br> 5016 * Path: <b>Task.for</b><br> 5017 * </p> 5018 */ 5019 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5020 SP_SUBJECT); 5021 5022 /** 5023 * Constant for fluent queries to be used to add include statements. Specifies 5024 * the path value of "<b>Task:subject</b>". 5025 */ 5026 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject") 5027 .toLocked(); 5028 5029 /** 5030 * Search parameter: <b>focus</b> 5031 * <p> 5032 * Description: <b>Search by task focus</b><br> 5033 * Type: <b>reference</b><br> 5034 * Path: <b>Task.focus</b><br> 5035 * </p> 5036 */ 5037 @SearchParamDefinition(name = "focus", path = "Task.focus", description = "Search by task focus", type = "reference") 5038 public static final String SP_FOCUS = "focus"; 5039 /** 5040 * <b>Fluent Client</b> search parameter constant for <b>focus</b> 5041 * <p> 5042 * Description: <b>Search by task focus</b><br> 5043 * Type: <b>reference</b><br> 5044 * Path: <b>Task.focus</b><br> 5045 * </p> 5046 */ 5047 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5048 SP_FOCUS); 5049 5050 /** 5051 * Constant for fluent queries to be used to add include statements. Specifies 5052 * the path value of "<b>Task:focus</b>". 5053 */ 5054 public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Task:focus") 5055 .toLocked(); 5056 5057 /** 5058 * Search parameter: <b>part-of</b> 5059 * <p> 5060 * Description: <b>Search by task this task is part of</b><br> 5061 * Type: <b>reference</b><br> 5062 * Path: <b>Task.partOf</b><br> 5063 * </p> 5064 */ 5065 @SearchParamDefinition(name = "part-of", path = "Task.partOf", description = "Search by task this task is part of", type = "reference", target = { 5066 Task.class }) 5067 public static final String SP_PART_OF = "part-of"; 5068 /** 5069 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 5070 * <p> 5071 * Description: <b>Search by task this task is part of</b><br> 5072 * Type: <b>reference</b><br> 5073 * Path: <b>Task.partOf</b><br> 5074 * </p> 5075 */ 5076 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5077 SP_PART_OF); 5078 5079 /** 5080 * Constant for fluent queries to be used to add include statements. Specifies 5081 * the path value of "<b>Task:part-of</b>". 5082 */ 5083 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Task:part-of") 5084 .toLocked(); 5085 5086 /** 5087 * Search parameter: <b>encounter</b> 5088 * <p> 5089 * Description: <b>Search by encounter</b><br> 5090 * Type: <b>reference</b><br> 5091 * Path: <b>Task.encounter</b><br> 5092 * </p> 5093 */ 5094 @SearchParamDefinition(name = "encounter", path = "Task.encounter", description = "Search by encounter", type = "reference", target = { 5095 Encounter.class }) 5096 public static final String SP_ENCOUNTER = "encounter"; 5097 /** 5098 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 5099 * <p> 5100 * Description: <b>Search by encounter</b><br> 5101 * Type: <b>reference</b><br> 5102 * Path: <b>Task.encounter</b><br> 5103 * </p> 5104 */ 5105 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5106 SP_ENCOUNTER); 5107 5108 /** 5109 * Constant for fluent queries to be used to add include statements. Specifies 5110 * the path value of "<b>Task:encounter</b>". 5111 */ 5112 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include( 5113 "Task:encounter").toLocked(); 5114 5115 /** 5116 * Search parameter: <b>priority</b> 5117 * <p> 5118 * Description: <b>Search by task priority</b><br> 5119 * Type: <b>token</b><br> 5120 * Path: <b>Task.priority</b><br> 5121 * </p> 5122 */ 5123 @SearchParamDefinition(name = "priority", path = "Task.priority", description = "Search by task priority", type = "token") 5124 public static final String SP_PRIORITY = "priority"; 5125 /** 5126 * <b>Fluent Client</b> search parameter constant for <b>priority</b> 5127 * <p> 5128 * Description: <b>Search by task priority</b><br> 5129 * Type: <b>token</b><br> 5130 * Path: <b>Task.priority</b><br> 5131 * </p> 5132 */ 5133 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5134 SP_PRIORITY); 5135 5136 /** 5137 * Search parameter: <b>authored-on</b> 5138 * <p> 5139 * Description: <b>Search by creation date</b><br> 5140 * Type: <b>date</b><br> 5141 * Path: <b>Task.authoredOn</b><br> 5142 * </p> 5143 */ 5144 @SearchParamDefinition(name = "authored-on", path = "Task.authoredOn", description = "Search by creation date", type = "date") 5145 public static final String SP_AUTHORED_ON = "authored-on"; 5146 /** 5147 * <b>Fluent Client</b> search parameter constant for <b>authored-on</b> 5148 * <p> 5149 * Description: <b>Search by creation date</b><br> 5150 * Type: <b>date</b><br> 5151 * Path: <b>Task.authoredOn</b><br> 5152 * </p> 5153 */ 5154 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED_ON = new ca.uhn.fhir.rest.gclient.DateClientParam( 5155 SP_AUTHORED_ON); 5156 5157 /** 5158 * Search parameter: <b>intent</b> 5159 * <p> 5160 * Description: <b>Search by task intent</b><br> 5161 * Type: <b>token</b><br> 5162 * Path: <b>Task.intent</b><br> 5163 * </p> 5164 */ 5165 @SearchParamDefinition(name = "intent", path = "Task.intent", description = "Search by task intent", type = "token") 5166 public static final String SP_INTENT = "intent"; 5167 /** 5168 * <b>Fluent Client</b> search parameter constant for <b>intent</b> 5169 * <p> 5170 * Description: <b>Search by task intent</b><br> 5171 * Type: <b>token</b><br> 5172 * Path: <b>Task.intent</b><br> 5173 * </p> 5174 */ 5175 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5176 SP_INTENT); 5177 5178 /** 5179 * Search parameter: <b>group-identifier</b> 5180 * <p> 5181 * Description: <b>Search by group identifier</b><br> 5182 * Type: <b>token</b><br> 5183 * Path: <b>Task.groupIdentifier</b><br> 5184 * </p> 5185 */ 5186 @SearchParamDefinition(name = "group-identifier", path = "Task.groupIdentifier", description = "Search by group identifier", type = "token") 5187 public static final String SP_GROUP_IDENTIFIER = "group-identifier"; 5188 /** 5189 * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b> 5190 * <p> 5191 * Description: <b>Search by group identifier</b><br> 5192 * Type: <b>token</b><br> 5193 * Path: <b>Task.groupIdentifier</b><br> 5194 * </p> 5195 */ 5196 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5197 SP_GROUP_IDENTIFIER); 5198 5199 /** 5200 * Search parameter: <b>based-on</b> 5201 * <p> 5202 * Description: <b>Search by requests this task is based on</b><br> 5203 * Type: <b>reference</b><br> 5204 * Path: <b>Task.basedOn</b><br> 5205 * </p> 5206 */ 5207 @SearchParamDefinition(name = "based-on", path = "Task.basedOn", description = "Search by requests this task is based on", type = "reference") 5208 public static final String SP_BASED_ON = "based-on"; 5209 /** 5210 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 5211 * <p> 5212 * Description: <b>Search by requests this task is based on</b><br> 5213 * Type: <b>reference</b><br> 5214 * Path: <b>Task.basedOn</b><br> 5215 * </p> 5216 */ 5217 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5218 SP_BASED_ON); 5219 5220 /** 5221 * Constant for fluent queries to be used to add include statements. Specifies 5222 * the path value of "<b>Task:based-on</b>". 5223 */ 5224 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include( 5225 "Task:based-on").toLocked(); 5226 5227 /** 5228 * Search parameter: <b>patient</b> 5229 * <p> 5230 * Description: <b>Search by patient</b><br> 5231 * Type: <b>reference</b><br> 5232 * Path: <b>Task.for</b><br> 5233 * </p> 5234 */ 5235 @SearchParamDefinition(name = "patient", path = "Task.for.where(resolve() is Patient)", description = "Search by patient", type = "reference", target = { 5236 Patient.class }) 5237 public static final String SP_PATIENT = "patient"; 5238 /** 5239 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 5240 * <p> 5241 * Description: <b>Search by patient</b><br> 5242 * Type: <b>reference</b><br> 5243 * Path: <b>Task.for</b><br> 5244 * </p> 5245 */ 5246 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5247 SP_PATIENT); 5248 5249 /** 5250 * Constant for fluent queries to be used to add include statements. Specifies 5251 * the path value of "<b>Task:patient</b>". 5252 */ 5253 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Task:patient") 5254 .toLocked(); 5255 5256 /** 5257 * Search parameter: <b>modified</b> 5258 * <p> 5259 * Description: <b>Search by last modification date</b><br> 5260 * Type: <b>date</b><br> 5261 * Path: <b>Task.lastModified</b><br> 5262 * </p> 5263 */ 5264 @SearchParamDefinition(name = "modified", path = "Task.lastModified", description = "Search by last modification date", type = "date") 5265 public static final String SP_MODIFIED = "modified"; 5266 /** 5267 * <b>Fluent Client</b> search parameter constant for <b>modified</b> 5268 * <p> 5269 * Description: <b>Search by last modification date</b><br> 5270 * Type: <b>date</b><br> 5271 * Path: <b>Task.lastModified</b><br> 5272 * </p> 5273 */ 5274 public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam( 5275 SP_MODIFIED); 5276 5277 /** 5278 * Search parameter: <b>status</b> 5279 * <p> 5280 * Description: <b>Search by task status</b><br> 5281 * Type: <b>token</b><br> 5282 * Path: <b>Task.status</b><br> 5283 * </p> 5284 */ 5285 @SearchParamDefinition(name = "status", path = "Task.status", description = "Search by task status", type = "token") 5286 public static final String SP_STATUS = "status"; 5287 /** 5288 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5289 * <p> 5290 * Description: <b>Search by task status</b><br> 5291 * Type: <b>token</b><br> 5292 * Path: <b>Task.status</b><br> 5293 * </p> 5294 */ 5295 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5296 SP_STATUS); 5297 5298}