001package org.hl7.fhir.dstu3.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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * A task to be performed. 048 */ 049@ResourceDef(name="Task", profile="http://hl7.org/fhir/StructureDefinition/Task") 050public class Task extends DomainResource { 051 052 public enum TaskStatus { 053 /** 054 * The task is not yet ready to be acted upon. 055 */ 056 DRAFT, 057 /** 058 * The task is ready to be acted upon and action is sought. 059 */ 060 REQUESTED, 061 /** 062 * A potential performer has claimed ownership of the task and is evaluating whether to perform it. 063 */ 064 RECEIVED, 065 /** 066 * The potential performer has agreed to execute the task but has not yet started work. 067 */ 068 ACCEPTED, 069 /** 070 * The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action. 071 */ 072 REJECTED, 073 /** 074 * 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. 075 */ 076 READY, 077 /** 078 * The task was not completed. 079 */ 080 CANCELLED, 081 /** 082 * Task has been started but is not yet complete. 083 */ 084 INPROGRESS, 085 /** 086 * Task has been started but work has been paused. 087 */ 088 ONHOLD, 089 /** 090 * The task was attempted but could not be completed due to some error. 091 */ 092 FAILED, 093 /** 094 * The task has been completed. 095 */ 096 COMPLETED, 097 /** 098 * The task should never have existed and is retained only because of the possibility it may have used. 099 */ 100 ENTEREDINERROR, 101 /** 102 * added to help the parsers with the generic types 103 */ 104 NULL; 105 public static TaskStatus fromCode(String codeString) throws FHIRException { 106 if (codeString == null || "".equals(codeString)) 107 return null; 108 if ("draft".equals(codeString)) 109 return DRAFT; 110 if ("requested".equals(codeString)) 111 return REQUESTED; 112 if ("received".equals(codeString)) 113 return RECEIVED; 114 if ("accepted".equals(codeString)) 115 return ACCEPTED; 116 if ("rejected".equals(codeString)) 117 return REJECTED; 118 if ("ready".equals(codeString)) 119 return READY; 120 if ("cancelled".equals(codeString)) 121 return CANCELLED; 122 if ("in-progress".equals(codeString)) 123 return INPROGRESS; 124 if ("on-hold".equals(codeString)) 125 return ONHOLD; 126 if ("failed".equals(codeString)) 127 return FAILED; 128 if ("completed".equals(codeString)) 129 return COMPLETED; 130 if ("entered-in-error".equals(codeString)) 131 return ENTEREDINERROR; 132 if (Configuration.isAcceptInvalidEnums()) 133 return null; 134 else 135 throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); 136 } 137 public String toCode() { 138 switch (this) { 139 case DRAFT: return "draft"; 140 case REQUESTED: return "requested"; 141 case RECEIVED: return "received"; 142 case ACCEPTED: return "accepted"; 143 case REJECTED: return "rejected"; 144 case READY: return "ready"; 145 case CANCELLED: return "cancelled"; 146 case INPROGRESS: return "in-progress"; 147 case ONHOLD: return "on-hold"; 148 case FAILED: return "failed"; 149 case COMPLETED: return "completed"; 150 case ENTEREDINERROR: return "entered-in-error"; 151 default: return "?"; 152 } 153 } 154 public String getSystem() { 155 switch (this) { 156 case DRAFT: return "http://hl7.org/fhir/task-status"; 157 case REQUESTED: return "http://hl7.org/fhir/task-status"; 158 case RECEIVED: return "http://hl7.org/fhir/task-status"; 159 case ACCEPTED: return "http://hl7.org/fhir/task-status"; 160 case REJECTED: return "http://hl7.org/fhir/task-status"; 161 case READY: return "http://hl7.org/fhir/task-status"; 162 case CANCELLED: return "http://hl7.org/fhir/task-status"; 163 case INPROGRESS: return "http://hl7.org/fhir/task-status"; 164 case ONHOLD: return "http://hl7.org/fhir/task-status"; 165 case FAILED: return "http://hl7.org/fhir/task-status"; 166 case COMPLETED: return "http://hl7.org/fhir/task-status"; 167 case ENTEREDINERROR: return "http://hl7.org/fhir/task-status"; 168 default: return "?"; 169 } 170 } 171 public String getDefinition() { 172 switch (this) { 173 case DRAFT: return "The task is not yet ready to be acted upon."; 174 case REQUESTED: return "The task is ready to be acted upon and action is sought."; 175 case RECEIVED: return "A potential performer has claimed ownership of the task and is evaluating whether to perform it."; 176 case ACCEPTED: return "The potential performer has agreed to execute the task but has not yet started work."; 177 case REJECTED: return "The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action."; 178 case READY: return "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."; 179 case CANCELLED: return "The task was not completed."; 180 case INPROGRESS: return "Task has been started but is not yet complete."; 181 case ONHOLD: return "Task has been started but work has been paused."; 182 case FAILED: return "The task was attempted but could not be completed due to some error."; 183 case COMPLETED: return "The task has been completed."; 184 case ENTEREDINERROR: return "The task should never have existed and is retained only because of the possibility it may have used."; 185 default: return "?"; 186 } 187 } 188 public String getDisplay() { 189 switch (this) { 190 case DRAFT: return "Draft"; 191 case REQUESTED: return "Requested"; 192 case RECEIVED: return "Received"; 193 case ACCEPTED: return "Accepted"; 194 case REJECTED: return "Rejected"; 195 case READY: return "Ready"; 196 case CANCELLED: return "Cancelled"; 197 case INPROGRESS: return "In Progress"; 198 case ONHOLD: return "On Hold"; 199 case FAILED: return "Failed"; 200 case COMPLETED: return "Completed"; 201 case ENTEREDINERROR: return "Entered in Error"; 202 default: return "?"; 203 } 204 } 205 } 206 207 public static class TaskStatusEnumFactory implements EnumFactory<TaskStatus> { 208 public TaskStatus fromCode(String codeString) throws IllegalArgumentException { 209 if (codeString == null || "".equals(codeString)) 210 if (codeString == null || "".equals(codeString)) 211 return null; 212 if ("draft".equals(codeString)) 213 return TaskStatus.DRAFT; 214 if ("requested".equals(codeString)) 215 return TaskStatus.REQUESTED; 216 if ("received".equals(codeString)) 217 return TaskStatus.RECEIVED; 218 if ("accepted".equals(codeString)) 219 return TaskStatus.ACCEPTED; 220 if ("rejected".equals(codeString)) 221 return TaskStatus.REJECTED; 222 if ("ready".equals(codeString)) 223 return TaskStatus.READY; 224 if ("cancelled".equals(codeString)) 225 return TaskStatus.CANCELLED; 226 if ("in-progress".equals(codeString)) 227 return TaskStatus.INPROGRESS; 228 if ("on-hold".equals(codeString)) 229 return TaskStatus.ONHOLD; 230 if ("failed".equals(codeString)) 231 return TaskStatus.FAILED; 232 if ("completed".equals(codeString)) 233 return TaskStatus.COMPLETED; 234 if ("entered-in-error".equals(codeString)) 235 return TaskStatus.ENTEREDINERROR; 236 throw new IllegalArgumentException("Unknown TaskStatus code '"+codeString+"'"); 237 } 238 public Enumeration<TaskStatus> fromType(Base code) throws FHIRException { 239 if (code == null) 240 return null; 241 if (code.isEmpty()) 242 return new Enumeration<TaskStatus>(this); 243 String codeString = ((PrimitiveType) code).asStringValue(); 244 if (codeString == null || "".equals(codeString)) 245 return null; 246 if ("draft".equals(codeString)) 247 return new Enumeration<TaskStatus>(this, TaskStatus.DRAFT); 248 if ("requested".equals(codeString)) 249 return new Enumeration<TaskStatus>(this, TaskStatus.REQUESTED); 250 if ("received".equals(codeString)) 251 return new Enumeration<TaskStatus>(this, TaskStatus.RECEIVED); 252 if ("accepted".equals(codeString)) 253 return new Enumeration<TaskStatus>(this, TaskStatus.ACCEPTED); 254 if ("rejected".equals(codeString)) 255 return new Enumeration<TaskStatus>(this, TaskStatus.REJECTED); 256 if ("ready".equals(codeString)) 257 return new Enumeration<TaskStatus>(this, TaskStatus.READY); 258 if ("cancelled".equals(codeString)) 259 return new Enumeration<TaskStatus>(this, TaskStatus.CANCELLED); 260 if ("in-progress".equals(codeString)) 261 return new Enumeration<TaskStatus>(this, TaskStatus.INPROGRESS); 262 if ("on-hold".equals(codeString)) 263 return new Enumeration<TaskStatus>(this, TaskStatus.ONHOLD); 264 if ("failed".equals(codeString)) 265 return new Enumeration<TaskStatus>(this, TaskStatus.FAILED); 266 if ("completed".equals(codeString)) 267 return new Enumeration<TaskStatus>(this, TaskStatus.COMPLETED); 268 if ("entered-in-error".equals(codeString)) 269 return new Enumeration<TaskStatus>(this, TaskStatus.ENTEREDINERROR); 270 throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); 271 } 272 public String toCode(TaskStatus code) { 273 if (code == TaskStatus.DRAFT) 274 return "draft"; 275 if (code == TaskStatus.REQUESTED) 276 return "requested"; 277 if (code == TaskStatus.RECEIVED) 278 return "received"; 279 if (code == TaskStatus.ACCEPTED) 280 return "accepted"; 281 if (code == TaskStatus.REJECTED) 282 return "rejected"; 283 if (code == TaskStatus.READY) 284 return "ready"; 285 if (code == TaskStatus.CANCELLED) 286 return "cancelled"; 287 if (code == TaskStatus.INPROGRESS) 288 return "in-progress"; 289 if (code == TaskStatus.ONHOLD) 290 return "on-hold"; 291 if (code == TaskStatus.FAILED) 292 return "failed"; 293 if (code == TaskStatus.COMPLETED) 294 return "completed"; 295 if (code == TaskStatus.ENTEREDINERROR) 296 return "entered-in-error"; 297 return "?"; 298 } 299 public String toSystem(TaskStatus code) { 300 return code.getSystem(); 301 } 302 } 303 304 public enum TaskIntent { 305 /** 306 * The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act 307 */ 308 PROPOSAL, 309 /** 310 * The request represents an intension to ensure something occurs without providing an authorization for others to act 311 */ 312 PLAN, 313 /** 314 * The request represents a request/demand and authorization for action 315 */ 316 ORDER, 317 /** 318 * The request represents an original authorization for action 319 */ 320 ORIGINALORDER, 321 /** 322 * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization 323 */ 324 REFLEXORDER, 325 /** 326 * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order 327 */ 328 FILLERORDER, 329 /** 330 * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug. 331 */ 332 INSTANCEORDER, 333 /** 334 * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. 335 336Refer to [[[RequestGroup]]] for additional information on how this status is used 337 */ 338 OPTION, 339 /** 340 * added to help the parsers with the generic types 341 */ 342 NULL; 343 public static TaskIntent fromCode(String codeString) throws FHIRException { 344 if (codeString == null || "".equals(codeString)) 345 return null; 346 if ("proposal".equals(codeString)) 347 return PROPOSAL; 348 if ("plan".equals(codeString)) 349 return PLAN; 350 if ("order".equals(codeString)) 351 return ORDER; 352 if ("original-order".equals(codeString)) 353 return ORIGINALORDER; 354 if ("reflex-order".equals(codeString)) 355 return REFLEXORDER; 356 if ("filler-order".equals(codeString)) 357 return FILLERORDER; 358 if ("instance-order".equals(codeString)) 359 return INSTANCEORDER; 360 if ("option".equals(codeString)) 361 return OPTION; 362 if (Configuration.isAcceptInvalidEnums()) 363 return null; 364 else 365 throw new FHIRException("Unknown TaskIntent code '"+codeString+"'"); 366 } 367 public String toCode() { 368 switch (this) { 369 case PROPOSAL: return "proposal"; 370 case PLAN: return "plan"; 371 case ORDER: return "order"; 372 case ORIGINALORDER: return "original-order"; 373 case REFLEXORDER: return "reflex-order"; 374 case FILLERORDER: return "filler-order"; 375 case INSTANCEORDER: return "instance-order"; 376 case OPTION: return "option"; 377 default: return "?"; 378 } 379 } 380 public String getSystem() { 381 switch (this) { 382 case PROPOSAL: return "http://hl7.org/fhir/request-intent"; 383 case PLAN: return "http://hl7.org/fhir/request-intent"; 384 case ORDER: return "http://hl7.org/fhir/request-intent"; 385 case ORIGINALORDER: return "http://hl7.org/fhir/request-intent"; 386 case REFLEXORDER: return "http://hl7.org/fhir/request-intent"; 387 case FILLERORDER: return "http://hl7.org/fhir/request-intent"; 388 case INSTANCEORDER: return "http://hl7.org/fhir/request-intent"; 389 case OPTION: return "http://hl7.org/fhir/request-intent"; 390 default: return "?"; 391 } 392 } 393 public String getDefinition() { 394 switch (this) { 395 case PROPOSAL: return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act"; 396 case PLAN: return "The request represents an intension to ensure something occurs without providing an authorization for others to act"; 397 case ORDER: return "The request represents a request/demand and authorization for action"; 398 case ORIGINALORDER: return "The request represents an original authorization for action"; 399 case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization"; 400 case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order"; 401 case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug."; 402 case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.\n\nRefer to [[[RequestGroup]]] for additional information on how this status is used"; 403 default: return "?"; 404 } 405 } 406 public String getDisplay() { 407 switch (this) { 408 case PROPOSAL: return "Proposal"; 409 case PLAN: return "Plan"; 410 case ORDER: return "Order"; 411 case ORIGINALORDER: return "Original Order"; 412 case REFLEXORDER: return "Reflex Order"; 413 case FILLERORDER: return "Filler Order"; 414 case INSTANCEORDER: return "Instance Order"; 415 case OPTION: return "Option"; 416 default: return "?"; 417 } 418 } 419 } 420 421 public static class TaskIntentEnumFactory implements EnumFactory<TaskIntent> { 422 public TaskIntent fromCode(String codeString) throws IllegalArgumentException { 423 if (codeString == null || "".equals(codeString)) 424 if (codeString == null || "".equals(codeString)) 425 return null; 426 if ("proposal".equals(codeString)) 427 return TaskIntent.PROPOSAL; 428 if ("plan".equals(codeString)) 429 return TaskIntent.PLAN; 430 if ("order".equals(codeString)) 431 return TaskIntent.ORDER; 432 if ("original-order".equals(codeString)) 433 return TaskIntent.ORIGINALORDER; 434 if ("reflex-order".equals(codeString)) 435 return TaskIntent.REFLEXORDER; 436 if ("filler-order".equals(codeString)) 437 return TaskIntent.FILLERORDER; 438 if ("instance-order".equals(codeString)) 439 return TaskIntent.INSTANCEORDER; 440 if ("option".equals(codeString)) 441 return TaskIntent.OPTION; 442 throw new IllegalArgumentException("Unknown TaskIntent code '"+codeString+"'"); 443 } 444 public Enumeration<TaskIntent> fromType(Base code) throws FHIRException { 445 if (code == null) 446 return null; 447 if (code.isEmpty()) 448 return new Enumeration<TaskIntent>(this); 449 String codeString = ((PrimitiveType) code).asStringValue(); 450 if (codeString == null || "".equals(codeString)) 451 return null; 452 if ("proposal".equals(codeString)) 453 return new Enumeration<TaskIntent>(this, TaskIntent.PROPOSAL); 454 if ("plan".equals(codeString)) 455 return new Enumeration<TaskIntent>(this, TaskIntent.PLAN); 456 if ("order".equals(codeString)) 457 return new Enumeration<TaskIntent>(this, TaskIntent.ORDER); 458 if ("original-order".equals(codeString)) 459 return new Enumeration<TaskIntent>(this, TaskIntent.ORIGINALORDER); 460 if ("reflex-order".equals(codeString)) 461 return new Enumeration<TaskIntent>(this, TaskIntent.REFLEXORDER); 462 if ("filler-order".equals(codeString)) 463 return new Enumeration<TaskIntent>(this, TaskIntent.FILLERORDER); 464 if ("instance-order".equals(codeString)) 465 return new Enumeration<TaskIntent>(this, TaskIntent.INSTANCEORDER); 466 if ("option".equals(codeString)) 467 return new Enumeration<TaskIntent>(this, TaskIntent.OPTION); 468 throw new FHIRException("Unknown TaskIntent code '"+codeString+"'"); 469 } 470 public String toCode(TaskIntent code) { 471 if (code == TaskIntent.PROPOSAL) 472 return "proposal"; 473 if (code == TaskIntent.PLAN) 474 return "plan"; 475 if (code == TaskIntent.ORDER) 476 return "order"; 477 if (code == TaskIntent.ORIGINALORDER) 478 return "original-order"; 479 if (code == TaskIntent.REFLEXORDER) 480 return "reflex-order"; 481 if (code == TaskIntent.FILLERORDER) 482 return "filler-order"; 483 if (code == TaskIntent.INSTANCEORDER) 484 return "instance-order"; 485 if (code == TaskIntent.OPTION) 486 return "option"; 487 return "?"; 488 } 489 public String toSystem(TaskIntent code) { 490 return code.getSystem(); 491 } 492 } 493 494 public enum TaskPriority { 495 /** 496 * The request has normal priority 497 */ 498 ROUTINE, 499 /** 500 * The request should be actioned promptly - higher priority than routine 501 */ 502 URGENT, 503 /** 504 * The request should be actioned as soon as possible - higher priority than urgent 505 */ 506 ASAP, 507 /** 508 * The request should be actioned immediately - highest possible priority. E.g. an emergency 509 */ 510 STAT, 511 /** 512 * added to help the parsers with the generic types 513 */ 514 NULL; 515 public static TaskPriority fromCode(String codeString) throws FHIRException { 516 if (codeString == null || "".equals(codeString)) 517 return null; 518 if ("routine".equals(codeString)) 519 return ROUTINE; 520 if ("urgent".equals(codeString)) 521 return URGENT; 522 if ("asap".equals(codeString)) 523 return ASAP; 524 if ("stat".equals(codeString)) 525 return STAT; 526 if (Configuration.isAcceptInvalidEnums()) 527 return null; 528 else 529 throw new FHIRException("Unknown TaskPriority code '"+codeString+"'"); 530 } 531 public String toCode() { 532 switch (this) { 533 case ROUTINE: return "routine"; 534 case URGENT: return "urgent"; 535 case ASAP: return "asap"; 536 case STAT: return "stat"; 537 default: return "?"; 538 } 539 } 540 public String getSystem() { 541 switch (this) { 542 case ROUTINE: return "http://hl7.org/fhir/request-priority"; 543 case URGENT: return "http://hl7.org/fhir/request-priority"; 544 case ASAP: return "http://hl7.org/fhir/request-priority"; 545 case STAT: return "http://hl7.org/fhir/request-priority"; 546 default: return "?"; 547 } 548 } 549 public String getDefinition() { 550 switch (this) { 551 case ROUTINE: return "The request has normal priority"; 552 case URGENT: return "The request should be actioned promptly - higher priority than routine"; 553 case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent"; 554 case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency"; 555 default: return "?"; 556 } 557 } 558 public String getDisplay() { 559 switch (this) { 560 case ROUTINE: return "Routine"; 561 case URGENT: return "Urgent"; 562 case ASAP: return "ASAP"; 563 case STAT: return "STAT"; 564 default: return "?"; 565 } 566 } 567 } 568 569 public static class TaskPriorityEnumFactory implements EnumFactory<TaskPriority> { 570 public TaskPriority fromCode(String codeString) throws IllegalArgumentException { 571 if (codeString == null || "".equals(codeString)) 572 if (codeString == null || "".equals(codeString)) 573 return null; 574 if ("routine".equals(codeString)) 575 return TaskPriority.ROUTINE; 576 if ("urgent".equals(codeString)) 577 return TaskPriority.URGENT; 578 if ("asap".equals(codeString)) 579 return TaskPriority.ASAP; 580 if ("stat".equals(codeString)) 581 return TaskPriority.STAT; 582 throw new IllegalArgumentException("Unknown TaskPriority code '"+codeString+"'"); 583 } 584 public Enumeration<TaskPriority> fromType(Base code) throws FHIRException { 585 if (code == null) 586 return null; 587 if (code.isEmpty()) 588 return new Enumeration<TaskPriority>(this); 589 String codeString = ((PrimitiveType) code).asStringValue(); 590 if (codeString == null || "".equals(codeString)) 591 return null; 592 if ("routine".equals(codeString)) 593 return new Enumeration<TaskPriority>(this, TaskPriority.ROUTINE); 594 if ("urgent".equals(codeString)) 595 return new Enumeration<TaskPriority>(this, TaskPriority.URGENT); 596 if ("asap".equals(codeString)) 597 return new Enumeration<TaskPriority>(this, TaskPriority.ASAP); 598 if ("stat".equals(codeString)) 599 return new Enumeration<TaskPriority>(this, TaskPriority.STAT); 600 throw new FHIRException("Unknown TaskPriority code '"+codeString+"'"); 601 } 602 public String toCode(TaskPriority code) { 603 if (code == TaskPriority.ROUTINE) 604 return "routine"; 605 if (code == TaskPriority.URGENT) 606 return "urgent"; 607 if (code == TaskPriority.ASAP) 608 return "asap"; 609 if (code == TaskPriority.STAT) 610 return "stat"; 611 return "?"; 612 } 613 public String toSystem(TaskPriority code) { 614 return code.getSystem(); 615 } 616 } 617 618 @Block() 619 public static class TaskRequesterComponent extends BackboneElement implements IBaseBackboneElement { 620 /** 621 * The device, practitioner, etc. who initiated the task. 622 */ 623 @Child(name = "agent", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=1, min=1, max=1, modifier=false, summary=true) 624 @Description(shortDefinition="Individual asking for task", formalDefinition="The device, practitioner, etc. who initiated the task." ) 625 protected Reference agent; 626 627 /** 628 * The actual object that is the target of the reference (The device, practitioner, etc. who initiated the task.) 629 */ 630 protected Resource agentTarget; 631 632 /** 633 * The organization the device or practitioner was acting on behalf of when they initiated the task. 634 */ 635 @Child(name = "onBehalfOf", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=false) 636 @Description(shortDefinition="Organization individual is acting for", formalDefinition="The organization the device or practitioner was acting on behalf of when they initiated the task." ) 637 protected Reference onBehalfOf; 638 639 /** 640 * The actual object that is the target of the reference (The organization the device or practitioner was acting on behalf of when they initiated the task.) 641 */ 642 protected Organization onBehalfOfTarget; 643 644 private static final long serialVersionUID = -71453027L; 645 646 /** 647 * Constructor 648 */ 649 public TaskRequesterComponent() { 650 super(); 651 } 652 653 /** 654 * Constructor 655 */ 656 public TaskRequesterComponent(Reference agent) { 657 super(); 658 this.agent = agent; 659 } 660 661 /** 662 * @return {@link #agent} (The device, practitioner, etc. who initiated the task.) 663 */ 664 public Reference getAgent() { 665 if (this.agent == null) 666 if (Configuration.errorOnAutoCreate()) 667 throw new Error("Attempt to auto-create TaskRequesterComponent.agent"); 668 else if (Configuration.doAutoCreate()) 669 this.agent = new Reference(); // cc 670 return this.agent; 671 } 672 673 public boolean hasAgent() { 674 return this.agent != null && !this.agent.isEmpty(); 675 } 676 677 /** 678 * @param value {@link #agent} (The device, practitioner, etc. who initiated the task.) 679 */ 680 public TaskRequesterComponent setAgent(Reference value) { 681 this.agent = value; 682 return this; 683 } 684 685 /** 686 * @return {@link #agent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device, practitioner, etc. who initiated the task.) 687 */ 688 public Resource getAgentTarget() { 689 return this.agentTarget; 690 } 691 692 /** 693 * @param value {@link #agent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device, practitioner, etc. who initiated the task.) 694 */ 695 public TaskRequesterComponent setAgentTarget(Resource value) { 696 this.agentTarget = value; 697 return this; 698 } 699 700 /** 701 * @return {@link #onBehalfOf} (The organization the device or practitioner was acting on behalf of when they initiated the task.) 702 */ 703 public Reference getOnBehalfOf() { 704 if (this.onBehalfOf == null) 705 if (Configuration.errorOnAutoCreate()) 706 throw new Error("Attempt to auto-create TaskRequesterComponent.onBehalfOf"); 707 else if (Configuration.doAutoCreate()) 708 this.onBehalfOf = new Reference(); // cc 709 return this.onBehalfOf; 710 } 711 712 public boolean hasOnBehalfOf() { 713 return this.onBehalfOf != null && !this.onBehalfOf.isEmpty(); 714 } 715 716 /** 717 * @param value {@link #onBehalfOf} (The organization the device or practitioner was acting on behalf of when they initiated the task.) 718 */ 719 public TaskRequesterComponent setOnBehalfOf(Reference value) { 720 this.onBehalfOf = value; 721 return this; 722 } 723 724 /** 725 * @return {@link #onBehalfOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization the device or practitioner was acting on behalf of when they initiated the task.) 726 */ 727 public Organization getOnBehalfOfTarget() { 728 if (this.onBehalfOfTarget == null) 729 if (Configuration.errorOnAutoCreate()) 730 throw new Error("Attempt to auto-create TaskRequesterComponent.onBehalfOf"); 731 else if (Configuration.doAutoCreate()) 732 this.onBehalfOfTarget = new Organization(); // aa 733 return this.onBehalfOfTarget; 734 } 735 736 /** 737 * @param value {@link #onBehalfOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization the device or practitioner was acting on behalf of when they initiated the task.) 738 */ 739 public TaskRequesterComponent setOnBehalfOfTarget(Organization value) { 740 this.onBehalfOfTarget = value; 741 return this; 742 } 743 744 protected void listChildren(List<Property> children) { 745 super.listChildren(children); 746 children.add(new Property("agent", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The device, practitioner, etc. who initiated the task.", 0, 1, agent)); 747 children.add(new Property("onBehalfOf", "Reference(Organization)", "The organization the device or practitioner was acting on behalf of when they initiated the task.", 0, 1, onBehalfOf)); 748 } 749 750 @Override 751 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 752 switch (_hash) { 753 case 92750597: /*agent*/ return new Property("agent", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The device, practitioner, etc. who initiated the task.", 0, 1, agent); 754 case -14402964: /*onBehalfOf*/ return new Property("onBehalfOf", "Reference(Organization)", "The organization the device or practitioner was acting on behalf of when they initiated the task.", 0, 1, onBehalfOf); 755 default: return super.getNamedProperty(_hash, _name, _checkValid); 756 } 757 758 } 759 760 @Override 761 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 762 switch (hash) { 763 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : new Base[] {this.agent}; // Reference 764 case -14402964: /*onBehalfOf*/ return this.onBehalfOf == null ? new Base[0] : new Base[] {this.onBehalfOf}; // Reference 765 default: return super.getProperty(hash, name, checkValid); 766 } 767 768 } 769 770 @Override 771 public Base setProperty(int hash, String name, Base value) throws FHIRException { 772 switch (hash) { 773 case 92750597: // agent 774 this.agent = castToReference(value); // Reference 775 return value; 776 case -14402964: // onBehalfOf 777 this.onBehalfOf = castToReference(value); // Reference 778 return value; 779 default: return super.setProperty(hash, name, value); 780 } 781 782 } 783 784 @Override 785 public Base setProperty(String name, Base value) throws FHIRException { 786 if (name.equals("agent")) { 787 this.agent = castToReference(value); // Reference 788 } else if (name.equals("onBehalfOf")) { 789 this.onBehalfOf = castToReference(value); // Reference 790 } else 791 return super.setProperty(name, value); 792 return value; 793 } 794 795 @Override 796 public Base makeProperty(int hash, String name) throws FHIRException { 797 switch (hash) { 798 case 92750597: return getAgent(); 799 case -14402964: return getOnBehalfOf(); 800 default: return super.makeProperty(hash, name); 801 } 802 803 } 804 805 @Override 806 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 807 switch (hash) { 808 case 92750597: /*agent*/ return new String[] {"Reference"}; 809 case -14402964: /*onBehalfOf*/ return new String[] {"Reference"}; 810 default: return super.getTypesForProperty(hash, name); 811 } 812 813 } 814 815 @Override 816 public Base addChild(String name) throws FHIRException { 817 if (name.equals("agent")) { 818 this.agent = new Reference(); 819 return this.agent; 820 } 821 else if (name.equals("onBehalfOf")) { 822 this.onBehalfOf = new Reference(); 823 return this.onBehalfOf; 824 } 825 else 826 return super.addChild(name); 827 } 828 829 public TaskRequesterComponent copy() { 830 TaskRequesterComponent dst = new TaskRequesterComponent(); 831 copyValues(dst); 832 dst.agent = agent == null ? null : agent.copy(); 833 dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy(); 834 return dst; 835 } 836 837 @Override 838 public boolean equalsDeep(Base other_) { 839 if (!super.equalsDeep(other_)) 840 return false; 841 if (!(other_ instanceof TaskRequesterComponent)) 842 return false; 843 TaskRequesterComponent o = (TaskRequesterComponent) other_; 844 return compareDeep(agent, o.agent, true) && compareDeep(onBehalfOf, o.onBehalfOf, true); 845 } 846 847 @Override 848 public boolean equalsShallow(Base other_) { 849 if (!super.equalsShallow(other_)) 850 return false; 851 if (!(other_ instanceof TaskRequesterComponent)) 852 return false; 853 TaskRequesterComponent o = (TaskRequesterComponent) other_; 854 return true; 855 } 856 857 public boolean isEmpty() { 858 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(agent, onBehalfOf); 859 } 860 861 public String fhirType() { 862 return "Task.requester"; 863 864 } 865 866 } 867 868 @Block() 869 public static class TaskRestrictionComponent extends BackboneElement implements IBaseBackboneElement { 870 /** 871 * Indicates the number of times the requested action should occur. 872 */ 873 @Child(name = "repetitions", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 874 @Description(shortDefinition="How many times to repeat", formalDefinition="Indicates the number of times the requested action should occur." ) 875 protected PositiveIntType repetitions; 876 877 /** 878 * Over what time-period is fulfillment sought. 879 */ 880 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) 881 @Description(shortDefinition="When fulfillment sought", formalDefinition="Over what time-period is fulfillment sought." ) 882 protected Period period; 883 884 /** 885 * For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought? 886 */ 887 @Child(name = "recipient", type = {Patient.class, Practitioner.class, RelatedPerson.class, Group.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 888 @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?" ) 889 protected List<Reference> recipient; 890 /** 891 * The actual objects that are the target of the reference (For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?) 892 */ 893 protected List<Resource> recipientTarget; 894 895 896 private static final long serialVersionUID = 1503908360L; 897 898 /** 899 * Constructor 900 */ 901 public TaskRestrictionComponent() { 902 super(); 903 } 904 905 /** 906 * @return {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value 907 */ 908 public PositiveIntType getRepetitionsElement() { 909 if (this.repetitions == null) 910 if (Configuration.errorOnAutoCreate()) 911 throw new Error("Attempt to auto-create TaskRestrictionComponent.repetitions"); 912 else if (Configuration.doAutoCreate()) 913 this.repetitions = new PositiveIntType(); // bb 914 return this.repetitions; 915 } 916 917 public boolean hasRepetitionsElement() { 918 return this.repetitions != null && !this.repetitions.isEmpty(); 919 } 920 921 public boolean hasRepetitions() { 922 return this.repetitions != null && !this.repetitions.isEmpty(); 923 } 924 925 /** 926 * @param value {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value 927 */ 928 public TaskRestrictionComponent setRepetitionsElement(PositiveIntType value) { 929 this.repetitions = value; 930 return this; 931 } 932 933 /** 934 * @return Indicates the number of times the requested action should occur. 935 */ 936 public int getRepetitions() { 937 return this.repetitions == null || this.repetitions.isEmpty() ? 0 : this.repetitions.getValue(); 938 } 939 940 /** 941 * @param value Indicates the number of times the requested action should occur. 942 */ 943 public TaskRestrictionComponent setRepetitions(int value) { 944 if (this.repetitions == null) 945 this.repetitions = new PositiveIntType(); 946 this.repetitions.setValue(value); 947 return this; 948 } 949 950 /** 951 * @return {@link #period} (Over what time-period is fulfillment sought.) 952 */ 953 public Period getPeriod() { 954 if (this.period == null) 955 if (Configuration.errorOnAutoCreate()) 956 throw new Error("Attempt to auto-create TaskRestrictionComponent.period"); 957 else if (Configuration.doAutoCreate()) 958 this.period = new Period(); // cc 959 return this.period; 960 } 961 962 public boolean hasPeriod() { 963 return this.period != null && !this.period.isEmpty(); 964 } 965 966 /** 967 * @param value {@link #period} (Over what time-period is fulfillment sought.) 968 */ 969 public TaskRestrictionComponent setPeriod(Period value) { 970 this.period = value; 971 return this; 972 } 973 974 /** 975 * @return {@link #recipient} (For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?) 976 */ 977 public List<Reference> getRecipient() { 978 if (this.recipient == null) 979 this.recipient = new ArrayList<Reference>(); 980 return this.recipient; 981 } 982 983 /** 984 * @return Returns a reference to <code>this</code> for easy method chaining 985 */ 986 public TaskRestrictionComponent setRecipient(List<Reference> theRecipient) { 987 this.recipient = theRecipient; 988 return this; 989 } 990 991 public boolean hasRecipient() { 992 if (this.recipient == null) 993 return false; 994 for (Reference item : this.recipient) 995 if (!item.isEmpty()) 996 return true; 997 return false; 998 } 999 1000 public Reference addRecipient() { //3 1001 Reference t = new Reference(); 1002 if (this.recipient == null) 1003 this.recipient = new ArrayList<Reference>(); 1004 this.recipient.add(t); 1005 return t; 1006 } 1007 1008 public TaskRestrictionComponent addRecipient(Reference t) { //3 1009 if (t == null) 1010 return this; 1011 if (this.recipient == null) 1012 this.recipient = new ArrayList<Reference>(); 1013 this.recipient.add(t); 1014 return this; 1015 } 1016 1017 /** 1018 * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist 1019 */ 1020 public Reference getRecipientFirstRep() { 1021 if (getRecipient().isEmpty()) { 1022 addRecipient(); 1023 } 1024 return getRecipient().get(0); 1025 } 1026 1027 /** 1028 * @deprecated Use Reference#setResource(IBaseResource) instead 1029 */ 1030 @Deprecated 1031 public List<Resource> getRecipientTarget() { 1032 if (this.recipientTarget == null) 1033 this.recipientTarget = new ArrayList<Resource>(); 1034 return this.recipientTarget; 1035 } 1036 1037 protected void listChildren(List<Property> children) { 1038 super.listChildren(children); 1039 children.add(new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions)); 1040 children.add(new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period)); 1041 children.add(new Property("recipient", "Reference(Patient|Practitioner|RelatedPerson|Group|Organization)", "For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?", 0, java.lang.Integer.MAX_VALUE, recipient)); 1042 } 1043 1044 @Override 1045 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1046 switch (_hash) { 1047 case 984367650: /*repetitions*/ return new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions); 1048 case -991726143: /*period*/ return new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period); 1049 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Patient|Practitioner|RelatedPerson|Group|Organization)", "For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?", 0, java.lang.Integer.MAX_VALUE, recipient); 1050 default: return super.getNamedProperty(_hash, _name, _checkValid); 1051 } 1052 1053 } 1054 1055 @Override 1056 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1057 switch (hash) { 1058 case 984367650: /*repetitions*/ return this.repetitions == null ? new Base[0] : new Base[] {this.repetitions}; // PositiveIntType 1059 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1060 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference 1061 default: return super.getProperty(hash, name, checkValid); 1062 } 1063 1064 } 1065 1066 @Override 1067 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1068 switch (hash) { 1069 case 984367650: // repetitions 1070 this.repetitions = castToPositiveInt(value); // PositiveIntType 1071 return value; 1072 case -991726143: // period 1073 this.period = castToPeriod(value); // Period 1074 return value; 1075 case 820081177: // recipient 1076 this.getRecipient().add(castToReference(value)); // Reference 1077 return value; 1078 default: return super.setProperty(hash, name, value); 1079 } 1080 1081 } 1082 1083 @Override 1084 public Base setProperty(String name, Base value) throws FHIRException { 1085 if (name.equals("repetitions")) { 1086 this.repetitions = castToPositiveInt(value); // PositiveIntType 1087 } else if (name.equals("period")) { 1088 this.period = castToPeriod(value); // Period 1089 } else if (name.equals("recipient")) { 1090 this.getRecipient().add(castToReference(value)); 1091 } else 1092 return super.setProperty(name, value); 1093 return value; 1094 } 1095 1096 @Override 1097 public Base makeProperty(int hash, String name) throws FHIRException { 1098 switch (hash) { 1099 case 984367650: return getRepetitionsElement(); 1100 case -991726143: return getPeriod(); 1101 case 820081177: return addRecipient(); 1102 default: return super.makeProperty(hash, name); 1103 } 1104 1105 } 1106 1107 @Override 1108 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1109 switch (hash) { 1110 case 984367650: /*repetitions*/ return new String[] {"positiveInt"}; 1111 case -991726143: /*period*/ return new String[] {"Period"}; 1112 case 820081177: /*recipient*/ return new String[] {"Reference"}; 1113 default: return super.getTypesForProperty(hash, name); 1114 } 1115 1116 } 1117 1118 @Override 1119 public Base addChild(String name) throws FHIRException { 1120 if (name.equals("repetitions")) { 1121 throw new FHIRException("Cannot call addChild on a primitive type Task.repetitions"); 1122 } 1123 else if (name.equals("period")) { 1124 this.period = new Period(); 1125 return this.period; 1126 } 1127 else if (name.equals("recipient")) { 1128 return addRecipient(); 1129 } 1130 else 1131 return super.addChild(name); 1132 } 1133 1134 public TaskRestrictionComponent copy() { 1135 TaskRestrictionComponent dst = new TaskRestrictionComponent(); 1136 copyValues(dst); 1137 dst.repetitions = repetitions == null ? null : repetitions.copy(); 1138 dst.period = period == null ? null : period.copy(); 1139 if (recipient != null) { 1140 dst.recipient = new ArrayList<Reference>(); 1141 for (Reference i : recipient) 1142 dst.recipient.add(i.copy()); 1143 }; 1144 return dst; 1145 } 1146 1147 @Override 1148 public boolean equalsDeep(Base other_) { 1149 if (!super.equalsDeep(other_)) 1150 return false; 1151 if (!(other_ instanceof TaskRestrictionComponent)) 1152 return false; 1153 TaskRestrictionComponent o = (TaskRestrictionComponent) other_; 1154 return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) && compareDeep(recipient, o.recipient, true) 1155 ; 1156 } 1157 1158 @Override 1159 public boolean equalsShallow(Base other_) { 1160 if (!super.equalsShallow(other_)) 1161 return false; 1162 if (!(other_ instanceof TaskRestrictionComponent)) 1163 return false; 1164 TaskRestrictionComponent o = (TaskRestrictionComponent) other_; 1165 return compareValues(repetitions, o.repetitions, true); 1166 } 1167 1168 public boolean isEmpty() { 1169 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient 1170 ); 1171 } 1172 1173 public String fhirType() { 1174 return "Task.restriction"; 1175 1176 } 1177 1178 } 1179 1180 @Block() 1181 public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement { 1182 /** 1183 * A code or description indicating how the input is intended to be used as part of the task execution. 1184 */ 1185 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1186 @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." ) 1187 protected CodeableConcept type; 1188 1189 /** 1190 * The value of the input parameter as a basic type. 1191 */ 1192 @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false) 1193 @Description(shortDefinition="Content to use in performing the task", formalDefinition="The value of the input parameter as a basic type." ) 1194 protected org.hl7.fhir.dstu3.model.Type value; 1195 1196 private static final long serialVersionUID = -852629026L; 1197 1198 /** 1199 * Constructor 1200 */ 1201 public ParameterComponent() { 1202 super(); 1203 } 1204 1205 /** 1206 * Constructor 1207 */ 1208 public ParameterComponent(CodeableConcept type, org.hl7.fhir.dstu3.model.Type value) { 1209 super(); 1210 this.type = type; 1211 this.value = value; 1212 } 1213 1214 /** 1215 * @return {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.) 1216 */ 1217 public CodeableConcept getType() { 1218 if (this.type == null) 1219 if (Configuration.errorOnAutoCreate()) 1220 throw new Error("Attempt to auto-create ParameterComponent.type"); 1221 else if (Configuration.doAutoCreate()) 1222 this.type = new CodeableConcept(); // cc 1223 return this.type; 1224 } 1225 1226 public boolean hasType() { 1227 return this.type != null && !this.type.isEmpty(); 1228 } 1229 1230 /** 1231 * @param value {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.) 1232 */ 1233 public ParameterComponent setType(CodeableConcept value) { 1234 this.type = value; 1235 return this; 1236 } 1237 1238 /** 1239 * @return {@link #value} (The value of the input parameter as a basic type.) 1240 */ 1241 public org.hl7.fhir.dstu3.model.Type getValue() { 1242 return this.value; 1243 } 1244 1245 public boolean hasValue() { 1246 return this.value != null && !this.value.isEmpty(); 1247 } 1248 1249 /** 1250 * @param value {@link #value} (The value of the input parameter as a basic type.) 1251 */ 1252 public ParameterComponent setValue(org.hl7.fhir.dstu3.model.Type value) { 1253 this.value = value; 1254 return this; 1255 } 1256 1257 protected void listChildren(List<Property> children) { 1258 super.listChildren(children); 1259 children.add(new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1, type)); 1260 children.add(new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value)); 1261 } 1262 1263 @Override 1264 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1265 switch (_hash) { 1266 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1, type); 1267 case -1410166417: /*value[x]*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1268 case 111972721: /*value*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1269 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1270 case 733421943: /*valueBoolean*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1271 case -786218365: /*valueCanonical*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1272 case -766209282: /*valueCode*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1273 case -766192449: /*valueDate*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1274 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1275 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1276 case 231604844: /*valueId*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1277 case -1668687056: /*valueInstant*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1278 case -1668204915: /*valueInteger*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1279 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1280 case -1410178407: /*valueOid*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1281 case -1249932027: /*valuePositiveInt*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1282 case -1424603934: /*valueString*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1283 case -765708322: /*valueTime*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1284 case 26529417: /*valueUnsignedInt*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1285 case -1410172357: /*valueUri*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1286 case -1410172354: /*valueUrl*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1287 case -765667124: /*valueUuid*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1288 case -478981821: /*valueAddress*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1289 case -67108992: /*valueAnnotation*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1290 case -475566732: /*valueAttachment*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1291 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1292 case -1887705029: /*valueCoding*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1293 case 944904545: /*valueContactPoint*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1294 case -2026205465: /*valueHumanName*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1295 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1296 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1297 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1298 case 2030761548: /*valueRange*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1299 case 2030767386: /*valueRatio*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1300 case 1755241690: /*valueReference*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1301 case -962229101: /*valueSampledData*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1302 case -540985785: /*valueSignature*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1303 case -1406282469: /*valueTiming*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1304 case -1858636920: /*valueDosage*/ return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value); 1305 default: return super.getNamedProperty(_hash, _name, _checkValid); 1306 } 1307 1308 } 1309 1310 @Override 1311 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1312 switch (hash) { 1313 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1314 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.dstu3.model.Type 1315 default: return super.getProperty(hash, name, checkValid); 1316 } 1317 1318 } 1319 1320 @Override 1321 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1322 switch (hash) { 1323 case 3575610: // type 1324 this.type = castToCodeableConcept(value); // CodeableConcept 1325 return value; 1326 case 111972721: // value 1327 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 1328 return value; 1329 default: return super.setProperty(hash, name, value); 1330 } 1331 1332 } 1333 1334 @Override 1335 public Base setProperty(String name, Base value) throws FHIRException { 1336 if (name.equals("type")) { 1337 this.type = castToCodeableConcept(value); // CodeableConcept 1338 } else if (name.equals("value[x]")) { 1339 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 1340 } else 1341 return super.setProperty(name, value); 1342 return value; 1343 } 1344 1345 @Override 1346 public Base makeProperty(int hash, String name) throws FHIRException { 1347 switch (hash) { 1348 case 3575610: return getType(); 1349 case -1410166417: return getValue(); 1350 case 111972721: return getValue(); 1351 default: return super.makeProperty(hash, name); 1352 } 1353 1354 } 1355 1356 @Override 1357 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1358 switch (hash) { 1359 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1360 case 111972721: /*value*/ return new String[] {"*"}; 1361 default: return super.getTypesForProperty(hash, name); 1362 } 1363 1364 } 1365 1366 @Override 1367 public Base addChild(String name) throws FHIRException { 1368 if (name.equals("type")) { 1369 this.type = new CodeableConcept(); 1370 return this.type; 1371 } 1372 else if (name.equals("valueBoolean")) { 1373 this.value = new BooleanType(); 1374 return this.value; 1375 } 1376 else if (name.equals("valueInteger")) { 1377 this.value = new IntegerType(); 1378 return this.value; 1379 } 1380 else if (name.equals("valueDecimal")) { 1381 this.value = new DecimalType(); 1382 return this.value; 1383 } 1384 else if (name.equals("valueBase64Binary")) { 1385 this.value = new Base64BinaryType(); 1386 return this.value; 1387 } 1388 else if (name.equals("valueInstant")) { 1389 this.value = new InstantType(); 1390 return this.value; 1391 } 1392 else if (name.equals("valueString")) { 1393 this.value = new StringType(); 1394 return this.value; 1395 } 1396 else if (name.equals("valueUri")) { 1397 this.value = new UriType(); 1398 return this.value; 1399 } 1400 else if (name.equals("valueDate")) { 1401 this.value = new DateType(); 1402 return this.value; 1403 } 1404 else if (name.equals("valueDateTime")) { 1405 this.value = new DateTimeType(); 1406 return this.value; 1407 } 1408 else if (name.equals("valueTime")) { 1409 this.value = new TimeType(); 1410 return this.value; 1411 } 1412 else if (name.equals("valueCode")) { 1413 this.value = new CodeType(); 1414 return this.value; 1415 } 1416 else if (name.equals("valueOid")) { 1417 this.value = new OidType(); 1418 return this.value; 1419 } 1420 else if (name.equals("valueId")) { 1421 this.value = new IdType(); 1422 return this.value; 1423 } 1424 else if (name.equals("valueUnsignedInt")) { 1425 this.value = new UnsignedIntType(); 1426 return this.value; 1427 } 1428 else if (name.equals("valuePositiveInt")) { 1429 this.value = new PositiveIntType(); 1430 return this.value; 1431 } 1432 else if (name.equals("valueMarkdown")) { 1433 this.value = new MarkdownType(); 1434 return this.value; 1435 } 1436 else if (name.equals("valueAnnotation")) { 1437 this.value = new Annotation(); 1438 return this.value; 1439 } 1440 else if (name.equals("valueAttachment")) { 1441 this.value = new Attachment(); 1442 return this.value; 1443 } 1444 else if (name.equals("valueIdentifier")) { 1445 this.value = new Identifier(); 1446 return this.value; 1447 } 1448 else if (name.equals("valueCodeableConcept")) { 1449 this.value = new CodeableConcept(); 1450 return this.value; 1451 } 1452 else if (name.equals("valueCoding")) { 1453 this.value = new Coding(); 1454 return this.value; 1455 } 1456 else if (name.equals("valueQuantity")) { 1457 this.value = new Quantity(); 1458 return this.value; 1459 } 1460 else if (name.equals("valueRange")) { 1461 this.value = new Range(); 1462 return this.value; 1463 } 1464 else if (name.equals("valuePeriod")) { 1465 this.value = new Period(); 1466 return this.value; 1467 } 1468 else if (name.equals("valueRatio")) { 1469 this.value = new Ratio(); 1470 return this.value; 1471 } 1472 else if (name.equals("valueSampledData")) { 1473 this.value = new SampledData(); 1474 return this.value; 1475 } 1476 else if (name.equals("valueSignature")) { 1477 this.value = new Signature(); 1478 return this.value; 1479 } 1480 else if (name.equals("valueHumanName")) { 1481 this.value = new HumanName(); 1482 return this.value; 1483 } 1484 else if (name.equals("valueAddress")) { 1485 this.value = new Address(); 1486 return this.value; 1487 } 1488 else if (name.equals("valueContactPoint")) { 1489 this.value = new ContactPoint(); 1490 return this.value; 1491 } 1492 else if (name.equals("valueTiming")) { 1493 this.value = new Timing(); 1494 return this.value; 1495 } 1496 else if (name.equals("valueReference")) { 1497 this.value = new Reference(); 1498 return this.value; 1499 } 1500 else if (name.equals("valueMeta")) { 1501 this.value = new Meta(); 1502 return this.value; 1503 } 1504 else 1505 return super.addChild(name); 1506 } 1507 1508 public ParameterComponent copy() { 1509 ParameterComponent dst = new ParameterComponent(); 1510 copyValues(dst); 1511 dst.type = type == null ? null : type.copy(); 1512 dst.value = value == null ? null : value.copy(); 1513 return dst; 1514 } 1515 1516 @Override 1517 public boolean equalsDeep(Base other_) { 1518 if (!super.equalsDeep(other_)) 1519 return false; 1520 if (!(other_ instanceof ParameterComponent)) 1521 return false; 1522 ParameterComponent o = (ParameterComponent) other_; 1523 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 1524 } 1525 1526 @Override 1527 public boolean equalsShallow(Base other_) { 1528 if (!super.equalsShallow(other_)) 1529 return false; 1530 if (!(other_ instanceof ParameterComponent)) 1531 return false; 1532 ParameterComponent o = (ParameterComponent) other_; 1533 return true; 1534 } 1535 1536 public boolean isEmpty() { 1537 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 1538 } 1539 1540 public String fhirType() { 1541 return "Task.input"; 1542 1543 } 1544 1545 } 1546 1547 @Block() 1548 public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement { 1549 /** 1550 * The name of the Output parameter. 1551 */ 1552 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1553 @Description(shortDefinition="Label for output", formalDefinition="The name of the Output parameter." ) 1554 protected CodeableConcept type; 1555 1556 /** 1557 * The value of the Output parameter as a basic type. 1558 */ 1559 @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false) 1560 @Description(shortDefinition="Result of output", formalDefinition="The value of the Output parameter as a basic type." ) 1561 protected org.hl7.fhir.dstu3.model.Type value; 1562 1563 private static final long serialVersionUID = -852629026L; 1564 1565 /** 1566 * Constructor 1567 */ 1568 public TaskOutputComponent() { 1569 super(); 1570 } 1571 1572 /** 1573 * Constructor 1574 */ 1575 public TaskOutputComponent(CodeableConcept type, org.hl7.fhir.dstu3.model.Type value) { 1576 super(); 1577 this.type = type; 1578 this.value = value; 1579 } 1580 1581 /** 1582 * @return {@link #type} (The name of the Output parameter.) 1583 */ 1584 public CodeableConcept getType() { 1585 if (this.type == null) 1586 if (Configuration.errorOnAutoCreate()) 1587 throw new Error("Attempt to auto-create TaskOutputComponent.type"); 1588 else if (Configuration.doAutoCreate()) 1589 this.type = new CodeableConcept(); // cc 1590 return this.type; 1591 } 1592 1593 public boolean hasType() { 1594 return this.type != null && !this.type.isEmpty(); 1595 } 1596 1597 /** 1598 * @param value {@link #type} (The name of the Output parameter.) 1599 */ 1600 public TaskOutputComponent setType(CodeableConcept value) { 1601 this.type = value; 1602 return this; 1603 } 1604 1605 /** 1606 * @return {@link #value} (The value of the Output parameter as a basic type.) 1607 */ 1608 public org.hl7.fhir.dstu3.model.Type getValue() { 1609 return this.value; 1610 } 1611 1612 public boolean hasValue() { 1613 return this.value != null && !this.value.isEmpty(); 1614 } 1615 1616 /** 1617 * @param value {@link #value} (The value of the Output parameter as a basic type.) 1618 */ 1619 public TaskOutputComponent setValue(org.hl7.fhir.dstu3.model.Type value) { 1620 this.value = value; 1621 return this; 1622 } 1623 1624 protected void listChildren(List<Property> children) { 1625 super.listChildren(children); 1626 children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type)); 1627 children.add(new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value)); 1628 } 1629 1630 @Override 1631 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1632 switch (_hash) { 1633 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type); 1634 case -1410166417: /*value[x]*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1635 case 111972721: /*value*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1636 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1637 case 733421943: /*valueBoolean*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1638 case -786218365: /*valueCanonical*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1639 case -766209282: /*valueCode*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1640 case -766192449: /*valueDate*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1641 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1642 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1643 case 231604844: /*valueId*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1644 case -1668687056: /*valueInstant*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1645 case -1668204915: /*valueInteger*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1646 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1647 case -1410178407: /*valueOid*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1648 case -1249932027: /*valuePositiveInt*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1649 case -1424603934: /*valueString*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1650 case -765708322: /*valueTime*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1651 case 26529417: /*valueUnsignedInt*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1652 case -1410172357: /*valueUri*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1653 case -1410172354: /*valueUrl*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1654 case -765667124: /*valueUuid*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1655 case -478981821: /*valueAddress*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1656 case -67108992: /*valueAnnotation*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1657 case -475566732: /*valueAttachment*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1658 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1659 case -1887705029: /*valueCoding*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1660 case 944904545: /*valueContactPoint*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1661 case -2026205465: /*valueHumanName*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1662 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1663 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1664 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1665 case 2030761548: /*valueRange*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1666 case 2030767386: /*valueRatio*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1667 case 1755241690: /*valueReference*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1668 case -962229101: /*valueSampledData*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1669 case -540985785: /*valueSignature*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1670 case -1406282469: /*valueTiming*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1671 case -1858636920: /*valueDosage*/ return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value); 1672 default: return super.getNamedProperty(_hash, _name, _checkValid); 1673 } 1674 1675 } 1676 1677 @Override 1678 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1679 switch (hash) { 1680 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1681 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.dstu3.model.Type 1682 default: return super.getProperty(hash, name, checkValid); 1683 } 1684 1685 } 1686 1687 @Override 1688 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1689 switch (hash) { 1690 case 3575610: // type 1691 this.type = castToCodeableConcept(value); // CodeableConcept 1692 return value; 1693 case 111972721: // value 1694 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 1695 return value; 1696 default: return super.setProperty(hash, name, value); 1697 } 1698 1699 } 1700 1701 @Override 1702 public Base setProperty(String name, Base value) throws FHIRException { 1703 if (name.equals("type")) { 1704 this.type = castToCodeableConcept(value); // CodeableConcept 1705 } else if (name.equals("value[x]")) { 1706 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 1707 } else 1708 return super.setProperty(name, value); 1709 return value; 1710 } 1711 1712 @Override 1713 public Base makeProperty(int hash, String name) throws FHIRException { 1714 switch (hash) { 1715 case 3575610: return getType(); 1716 case -1410166417: return getValue(); 1717 case 111972721: return getValue(); 1718 default: return super.makeProperty(hash, name); 1719 } 1720 1721 } 1722 1723 @Override 1724 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1725 switch (hash) { 1726 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1727 case 111972721: /*value*/ return new String[] {"*"}; 1728 default: return super.getTypesForProperty(hash, name); 1729 } 1730 1731 } 1732 1733 @Override 1734 public Base addChild(String name) throws FHIRException { 1735 if (name.equals("type")) { 1736 this.type = new CodeableConcept(); 1737 return this.type; 1738 } 1739 else if (name.equals("valueBoolean")) { 1740 this.value = new BooleanType(); 1741 return this.value; 1742 } 1743 else if (name.equals("valueInteger")) { 1744 this.value = new IntegerType(); 1745 return this.value; 1746 } 1747 else if (name.equals("valueDecimal")) { 1748 this.value = new DecimalType(); 1749 return this.value; 1750 } 1751 else if (name.equals("valueBase64Binary")) { 1752 this.value = new Base64BinaryType(); 1753 return this.value; 1754 } 1755 else if (name.equals("valueInstant")) { 1756 this.value = new InstantType(); 1757 return this.value; 1758 } 1759 else if (name.equals("valueString")) { 1760 this.value = new StringType(); 1761 return this.value; 1762 } 1763 else if (name.equals("valueUri")) { 1764 this.value = new UriType(); 1765 return this.value; 1766 } 1767 else if (name.equals("valueDate")) { 1768 this.value = new DateType(); 1769 return this.value; 1770 } 1771 else if (name.equals("valueDateTime")) { 1772 this.value = new DateTimeType(); 1773 return this.value; 1774 } 1775 else if (name.equals("valueTime")) { 1776 this.value = new TimeType(); 1777 return this.value; 1778 } 1779 else if (name.equals("valueCode")) { 1780 this.value = new CodeType(); 1781 return this.value; 1782 } 1783 else if (name.equals("valueOid")) { 1784 this.value = new OidType(); 1785 return this.value; 1786 } 1787 else if (name.equals("valueId")) { 1788 this.value = new IdType(); 1789 return this.value; 1790 } 1791 else if (name.equals("valueUnsignedInt")) { 1792 this.value = new UnsignedIntType(); 1793 return this.value; 1794 } 1795 else if (name.equals("valuePositiveInt")) { 1796 this.value = new PositiveIntType(); 1797 return this.value; 1798 } 1799 else if (name.equals("valueMarkdown")) { 1800 this.value = new MarkdownType(); 1801 return this.value; 1802 } 1803 else if (name.equals("valueAnnotation")) { 1804 this.value = new Annotation(); 1805 return this.value; 1806 } 1807 else if (name.equals("valueAttachment")) { 1808 this.value = new Attachment(); 1809 return this.value; 1810 } 1811 else if (name.equals("valueIdentifier")) { 1812 this.value = new Identifier(); 1813 return this.value; 1814 } 1815 else if (name.equals("valueCodeableConcept")) { 1816 this.value = new CodeableConcept(); 1817 return this.value; 1818 } 1819 else if (name.equals("valueCoding")) { 1820 this.value = new Coding(); 1821 return this.value; 1822 } 1823 else if (name.equals("valueQuantity")) { 1824 this.value = new Quantity(); 1825 return this.value; 1826 } 1827 else if (name.equals("valueRange")) { 1828 this.value = new Range(); 1829 return this.value; 1830 } 1831 else if (name.equals("valuePeriod")) { 1832 this.value = new Period(); 1833 return this.value; 1834 } 1835 else if (name.equals("valueRatio")) { 1836 this.value = new Ratio(); 1837 return this.value; 1838 } 1839 else if (name.equals("valueSampledData")) { 1840 this.value = new SampledData(); 1841 return this.value; 1842 } 1843 else if (name.equals("valueSignature")) { 1844 this.value = new Signature(); 1845 return this.value; 1846 } 1847 else if (name.equals("valueHumanName")) { 1848 this.value = new HumanName(); 1849 return this.value; 1850 } 1851 else if (name.equals("valueAddress")) { 1852 this.value = new Address(); 1853 return this.value; 1854 } 1855 else if (name.equals("valueContactPoint")) { 1856 this.value = new ContactPoint(); 1857 return this.value; 1858 } 1859 else if (name.equals("valueTiming")) { 1860 this.value = new Timing(); 1861 return this.value; 1862 } 1863 else if (name.equals("valueReference")) { 1864 this.value = new Reference(); 1865 return this.value; 1866 } 1867 else if (name.equals("valueMeta")) { 1868 this.value = new Meta(); 1869 return this.value; 1870 } 1871 else 1872 return super.addChild(name); 1873 } 1874 1875 public TaskOutputComponent copy() { 1876 TaskOutputComponent dst = new TaskOutputComponent(); 1877 copyValues(dst); 1878 dst.type = type == null ? null : type.copy(); 1879 dst.value = value == null ? null : value.copy(); 1880 return dst; 1881 } 1882 1883 @Override 1884 public boolean equalsDeep(Base other_) { 1885 if (!super.equalsDeep(other_)) 1886 return false; 1887 if (!(other_ instanceof TaskOutputComponent)) 1888 return false; 1889 TaskOutputComponent o = (TaskOutputComponent) other_; 1890 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 1891 } 1892 1893 @Override 1894 public boolean equalsShallow(Base other_) { 1895 if (!super.equalsShallow(other_)) 1896 return false; 1897 if (!(other_ instanceof TaskOutputComponent)) 1898 return false; 1899 TaskOutputComponent o = (TaskOutputComponent) other_; 1900 return true; 1901 } 1902 1903 public boolean isEmpty() { 1904 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 1905 } 1906 1907 public String fhirType() { 1908 return "Task.output"; 1909 1910 } 1911 1912 } 1913 1914 /** 1915 * The business identifier for this task. 1916 */ 1917 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1918 @Description(shortDefinition="Task Instance Identifier", formalDefinition="The business identifier for this task." ) 1919 protected List<Identifier> identifier; 1920 1921 /** 1922 * A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc. 1923 */ 1924 @Child(name = "definition", type = {UriType.class, ActivityDefinition.class}, order=1, min=0, max=1, modifier=false, summary=true) 1925 @Description(shortDefinition="Formal definition of task", formalDefinition="A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc." ) 1926 protected Type definition; 1927 1928 /** 1929 * BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient. 1930 */ 1931 @Child(name = "basedOn", type = {Reference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1932 @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 ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient." ) 1933 protected List<Reference> basedOn; 1934 /** 1935 * The actual objects that are the target of the reference (BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.) 1936 */ 1937 protected List<Resource> basedOnTarget; 1938 1939 1940 /** 1941 * An identifier that links together multiple tasks and other requests that were created in the same context. 1942 */ 1943 @Child(name = "groupIdentifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 1944 @Description(shortDefinition="Requisition or grouper id", formalDefinition="An identifier that links together multiple tasks and other requests that were created in the same context." ) 1945 protected Identifier groupIdentifier; 1946 1947 /** 1948 * Task that this particular task is part of. 1949 */ 1950 @Child(name = "partOf", type = {Task.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1951 @Description(shortDefinition="Composite task", formalDefinition="Task that this particular task is part of." ) 1952 protected List<Reference> partOf; 1953 /** 1954 * The actual objects that are the target of the reference (Task that this particular task is part of.) 1955 */ 1956 protected List<Task> partOfTarget; 1957 1958 1959 /** 1960 * The current status of the task. 1961 */ 1962 @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) 1963 @Description(shortDefinition="draft | requested | received | accepted | +", formalDefinition="The current status of the task." ) 1964 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-status") 1965 protected Enumeration<TaskStatus> status; 1966 1967 /** 1968 * An explanation as to why this task is held, failed, was refused, etc. 1969 */ 1970 @Child(name = "statusReason", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) 1971 @Description(shortDefinition="Reason for current status", formalDefinition="An explanation as to why this task is held, failed, was refused, etc." ) 1972 protected CodeableConcept statusReason; 1973 1974 /** 1975 * Contains business-specific nuances of the business state. 1976 */ 1977 @Child(name = "businessStatus", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) 1978 @Description(shortDefinition="E.g. \"Specimen collected\", \"IV prepped\"", formalDefinition="Contains business-specific nuances of the business state." ) 1979 protected CodeableConcept businessStatus; 1980 1981 /** 1982 * Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc. 1983 */ 1984 @Child(name = "intent", type = {CodeType.class}, order=8, min=1, max=1, modifier=false, summary=true) 1985 @Description(shortDefinition="proposal | plan | order +", formalDefinition="Indicates the \"level\" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc." ) 1986 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent") 1987 protected Enumeration<TaskIntent> intent; 1988 1989 /** 1990 * Indicates how quickly the Task should be addressed with respect to other requests. 1991 */ 1992 @Child(name = "priority", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false) 1993 @Description(shortDefinition="normal | urgent | asap | stat", formalDefinition="Indicates how quickly the Task should be addressed with respect to other requests." ) 1994 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 1995 protected Enumeration<TaskPriority> priority; 1996 1997 /** 1998 * A name or code (or both) briefly describing what the task involves. 1999 */ 2000 @Child(name = "code", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) 2001 @Description(shortDefinition="Task Type", formalDefinition="A name or code (or both) briefly describing what the task involves." ) 2002 protected CodeableConcept code; 2003 2004 /** 2005 * A free-text description of what is to be performed. 2006 */ 2007 @Child(name = "description", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true) 2008 @Description(shortDefinition="Human-readable explanation of task", formalDefinition="A free-text description of what is to be performed." ) 2009 protected StringType description; 2010 2011 /** 2012 * The request being actioned or the resource being manipulated by this task. 2013 */ 2014 @Child(name = "focus", type = {Reference.class}, order=12, min=0, max=1, modifier=false, summary=true) 2015 @Description(shortDefinition="What task is acting on", formalDefinition="The request being actioned or the resource being manipulated by this task." ) 2016 protected Reference focus; 2017 2018 /** 2019 * The actual object that is the target of the reference (The request being actioned or the resource being manipulated by this task.) 2020 */ 2021 protected Resource focusTarget; 2022 2023 /** 2024 * The entity who benefits from the performance of the service specified in the task (e.g., the patient). 2025 */ 2026 @Child(name = "for", type = {Reference.class}, order=13, min=0, max=1, modifier=false, summary=true) 2027 @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)." ) 2028 protected Reference for_; 2029 2030 /** 2031 * The actual object that is the target of the reference (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) 2032 */ 2033 protected Resource for_Target; 2034 2035 /** 2036 * The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created. 2037 */ 2038 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=14, min=0, max=1, modifier=false, summary=true) 2039 @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." ) 2040 protected Reference context; 2041 2042 /** 2043 * The actual object that is the target of the reference (The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.) 2044 */ 2045 protected Resource contextTarget; 2046 2047 /** 2048 * 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). 2049 */ 2050 @Child(name = "executionPeriod", type = {Period.class}, order=15, min=0, max=1, modifier=false, summary=true) 2051 @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)." ) 2052 protected Period executionPeriod; 2053 2054 /** 2055 * The date and time this task was created. 2056 */ 2057 @Child(name = "authoredOn", type = {DateTimeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 2058 @Description(shortDefinition="Task Creation Date", formalDefinition="The date and time this task was created." ) 2059 protected DateTimeType authoredOn; 2060 2061 /** 2062 * The date and time of last modification to this task. 2063 */ 2064 @Child(name = "lastModified", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=true) 2065 @Description(shortDefinition="Task Last Modified Date", formalDefinition="The date and time of last modification to this task." ) 2066 protected DateTimeType lastModified; 2067 2068 /** 2069 * The creator of the task. 2070 */ 2071 @Child(name = "requester", type = {}, order=18, min=0, max=1, modifier=false, summary=true) 2072 @Description(shortDefinition="Who is asking for task to be done", formalDefinition="The creator of the task." ) 2073 protected TaskRequesterComponent requester; 2074 2075 /** 2076 * The type of participant that can execute the task. 2077 */ 2078 @Child(name = "performerType", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2079 @Description(shortDefinition="requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer", formalDefinition="The type of participant that can execute the task." ) 2080 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-performer-type") 2081 protected List<CodeableConcept> performerType; 2082 2083 /** 2084 * Individual organization or Device currently responsible for task execution. 2085 */ 2086 @Child(name = "owner", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=20, min=0, max=1, modifier=false, summary=true) 2087 @Description(shortDefinition="Responsible individual", formalDefinition="Individual organization or Device currently responsible for task execution." ) 2088 protected Reference owner; 2089 2090 /** 2091 * The actual object that is the target of the reference (Individual organization or Device currently responsible for task execution.) 2092 */ 2093 protected Resource ownerTarget; 2094 2095 /** 2096 * A description or code indicating why this task needs to be performed. 2097 */ 2098 @Child(name = "reason", type = {CodeableConcept.class}, order=21, min=0, max=1, modifier=false, summary=false) 2099 @Description(shortDefinition="Why task is needed", formalDefinition="A description or code indicating why this task needs to be performed." ) 2100 protected CodeableConcept reason; 2101 2102 /** 2103 * Free-text information captured about the task as it progresses. 2104 */ 2105 @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2106 @Description(shortDefinition="Comments made about the task", formalDefinition="Free-text information captured about the task as it progresses." ) 2107 protected List<Annotation> note; 2108 2109 /** 2110 * 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. 2111 */ 2112 @Child(name = "relevantHistory", type = {Provenance.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2113 @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." ) 2114 protected List<Reference> relevantHistory; 2115 /** 2116 * The actual objects that are the target of the reference (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.) 2117 */ 2118 protected List<Provenance> relevantHistoryTarget; 2119 2120 2121 /** 2122 * 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. 2123 */ 2124 @Child(name = "restriction", type = {}, order=24, min=0, max=1, modifier=false, summary=false) 2125 @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." ) 2126 protected TaskRestrictionComponent restriction; 2127 2128 /** 2129 * Additional information that may be needed in the execution of the task. 2130 */ 2131 @Child(name = "input", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2132 @Description(shortDefinition="Information used to perform task", formalDefinition="Additional information that may be needed in the execution of the task." ) 2133 protected List<ParameterComponent> input; 2134 2135 /** 2136 * Outputs produced by the Task. 2137 */ 2138 @Child(name = "output", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2139 @Description(shortDefinition="Information produced as part of task", formalDefinition="Outputs produced by the Task." ) 2140 protected List<TaskOutputComponent> output; 2141 2142 private static final long serialVersionUID = 2060755798L; 2143 2144 /** 2145 * Constructor 2146 */ 2147 public Task() { 2148 super(); 2149 } 2150 2151 /** 2152 * Constructor 2153 */ 2154 public Task(Enumeration<TaskStatus> status, Enumeration<TaskIntent> intent) { 2155 super(); 2156 this.status = status; 2157 this.intent = intent; 2158 } 2159 2160 /** 2161 * @return {@link #identifier} (The business identifier for this task.) 2162 */ 2163 public List<Identifier> getIdentifier() { 2164 if (this.identifier == null) 2165 this.identifier = new ArrayList<Identifier>(); 2166 return this.identifier; 2167 } 2168 2169 /** 2170 * @return Returns a reference to <code>this</code> for easy method chaining 2171 */ 2172 public Task setIdentifier(List<Identifier> theIdentifier) { 2173 this.identifier = theIdentifier; 2174 return this; 2175 } 2176 2177 public boolean hasIdentifier() { 2178 if (this.identifier == null) 2179 return false; 2180 for (Identifier item : this.identifier) 2181 if (!item.isEmpty()) 2182 return true; 2183 return false; 2184 } 2185 2186 public Identifier addIdentifier() { //3 2187 Identifier t = new Identifier(); 2188 if (this.identifier == null) 2189 this.identifier = new ArrayList<Identifier>(); 2190 this.identifier.add(t); 2191 return t; 2192 } 2193 2194 public Task addIdentifier(Identifier t) { //3 2195 if (t == null) 2196 return this; 2197 if (this.identifier == null) 2198 this.identifier = new ArrayList<Identifier>(); 2199 this.identifier.add(t); 2200 return this; 2201 } 2202 2203 /** 2204 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2205 */ 2206 public Identifier getIdentifierFirstRep() { 2207 if (getIdentifier().isEmpty()) { 2208 addIdentifier(); 2209 } 2210 return getIdentifier().get(0); 2211 } 2212 2213 /** 2214 * @return {@link #definition} (A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.) 2215 */ 2216 public Type getDefinition() { 2217 return this.definition; 2218 } 2219 2220 /** 2221 * @return {@link #definition} (A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.) 2222 */ 2223 public UriType getDefinitionUriType() throws FHIRException { 2224 if (this.definition == null) 2225 return null; 2226 if (!(this.definition instanceof UriType)) 2227 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.definition.getClass().getName()+" was encountered"); 2228 return (UriType) this.definition; 2229 } 2230 2231 public boolean hasDefinitionUriType() { 2232 return this != null && this.definition instanceof UriType; 2233 } 2234 2235 /** 2236 * @return {@link #definition} (A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.) 2237 */ 2238 public Reference getDefinitionReference() throws FHIRException { 2239 if (this.definition == null) 2240 return null; 2241 if (!(this.definition instanceof Reference)) 2242 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.definition.getClass().getName()+" was encountered"); 2243 return (Reference) this.definition; 2244 } 2245 2246 public boolean hasDefinitionReference() { 2247 return this != null && this.definition instanceof Reference; 2248 } 2249 2250 public boolean hasDefinition() { 2251 return this.definition != null && !this.definition.isEmpty(); 2252 } 2253 2254 /** 2255 * @param value {@link #definition} (A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.) 2256 */ 2257 public Task setDefinition(Type value) throws FHIRFormatError { 2258 if (value != null && !(value instanceof UriType || value instanceof Reference)) 2259 throw new FHIRFormatError("Not the right type for Task.definition[x]: "+value.fhirType()); 2260 this.definition = value; 2261 return this; 2262 } 2263 2264 /** 2265 * @return {@link #basedOn} (BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.) 2266 */ 2267 public List<Reference> getBasedOn() { 2268 if (this.basedOn == null) 2269 this.basedOn = new ArrayList<Reference>(); 2270 return this.basedOn; 2271 } 2272 2273 /** 2274 * @return Returns a reference to <code>this</code> for easy method chaining 2275 */ 2276 public Task setBasedOn(List<Reference> theBasedOn) { 2277 this.basedOn = theBasedOn; 2278 return this; 2279 } 2280 2281 public boolean hasBasedOn() { 2282 if (this.basedOn == null) 2283 return false; 2284 for (Reference item : this.basedOn) 2285 if (!item.isEmpty()) 2286 return true; 2287 return false; 2288 } 2289 2290 public Reference addBasedOn() { //3 2291 Reference t = new Reference(); 2292 if (this.basedOn == null) 2293 this.basedOn = new ArrayList<Reference>(); 2294 this.basedOn.add(t); 2295 return t; 2296 } 2297 2298 public Task addBasedOn(Reference t) { //3 2299 if (t == null) 2300 return this; 2301 if (this.basedOn == null) 2302 this.basedOn = new ArrayList<Reference>(); 2303 this.basedOn.add(t); 2304 return this; 2305 } 2306 2307 /** 2308 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 2309 */ 2310 public Reference getBasedOnFirstRep() { 2311 if (getBasedOn().isEmpty()) { 2312 addBasedOn(); 2313 } 2314 return getBasedOn().get(0); 2315 } 2316 2317 /** 2318 * @deprecated Use Reference#setResource(IBaseResource) instead 2319 */ 2320 @Deprecated 2321 public List<Resource> getBasedOnTarget() { 2322 if (this.basedOnTarget == null) 2323 this.basedOnTarget = new ArrayList<Resource>(); 2324 return this.basedOnTarget; 2325 } 2326 2327 /** 2328 * @return {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.) 2329 */ 2330 public Identifier getGroupIdentifier() { 2331 if (this.groupIdentifier == null) 2332 if (Configuration.errorOnAutoCreate()) 2333 throw new Error("Attempt to auto-create Task.groupIdentifier"); 2334 else if (Configuration.doAutoCreate()) 2335 this.groupIdentifier = new Identifier(); // cc 2336 return this.groupIdentifier; 2337 } 2338 2339 public boolean hasGroupIdentifier() { 2340 return this.groupIdentifier != null && !this.groupIdentifier.isEmpty(); 2341 } 2342 2343 /** 2344 * @param value {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.) 2345 */ 2346 public Task setGroupIdentifier(Identifier value) { 2347 this.groupIdentifier = value; 2348 return this; 2349 } 2350 2351 /** 2352 * @return {@link #partOf} (Task that this particular task is part of.) 2353 */ 2354 public List<Reference> getPartOf() { 2355 if (this.partOf == null) 2356 this.partOf = new ArrayList<Reference>(); 2357 return this.partOf; 2358 } 2359 2360 /** 2361 * @return Returns a reference to <code>this</code> for easy method chaining 2362 */ 2363 public Task setPartOf(List<Reference> thePartOf) { 2364 this.partOf = thePartOf; 2365 return this; 2366 } 2367 2368 public boolean hasPartOf() { 2369 if (this.partOf == null) 2370 return false; 2371 for (Reference item : this.partOf) 2372 if (!item.isEmpty()) 2373 return true; 2374 return false; 2375 } 2376 2377 public Reference addPartOf() { //3 2378 Reference t = new Reference(); 2379 if (this.partOf == null) 2380 this.partOf = new ArrayList<Reference>(); 2381 this.partOf.add(t); 2382 return t; 2383 } 2384 2385 public Task addPartOf(Reference t) { //3 2386 if (t == null) 2387 return this; 2388 if (this.partOf == null) 2389 this.partOf = new ArrayList<Reference>(); 2390 this.partOf.add(t); 2391 return this; 2392 } 2393 2394 /** 2395 * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist 2396 */ 2397 public Reference getPartOfFirstRep() { 2398 if (getPartOf().isEmpty()) { 2399 addPartOf(); 2400 } 2401 return getPartOf().get(0); 2402 } 2403 2404 /** 2405 * @deprecated Use Reference#setResource(IBaseResource) instead 2406 */ 2407 @Deprecated 2408 public List<Task> getPartOfTarget() { 2409 if (this.partOfTarget == null) 2410 this.partOfTarget = new ArrayList<Task>(); 2411 return this.partOfTarget; 2412 } 2413 2414 /** 2415 * @deprecated Use Reference#setResource(IBaseResource) instead 2416 */ 2417 @Deprecated 2418 public Task addPartOfTarget() { 2419 Task r = new Task(); 2420 if (this.partOfTarget == null) 2421 this.partOfTarget = new ArrayList<Task>(); 2422 this.partOfTarget.add(r); 2423 return r; 2424 } 2425 2426 /** 2427 * @return {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2428 */ 2429 public Enumeration<TaskStatus> getStatusElement() { 2430 if (this.status == null) 2431 if (Configuration.errorOnAutoCreate()) 2432 throw new Error("Attempt to auto-create Task.status"); 2433 else if (Configuration.doAutoCreate()) 2434 this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); // bb 2435 return this.status; 2436 } 2437 2438 public boolean hasStatusElement() { 2439 return this.status != null && !this.status.isEmpty(); 2440 } 2441 2442 public boolean hasStatus() { 2443 return this.status != null && !this.status.isEmpty(); 2444 } 2445 2446 /** 2447 * @param value {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2448 */ 2449 public Task setStatusElement(Enumeration<TaskStatus> value) { 2450 this.status = value; 2451 return this; 2452 } 2453 2454 /** 2455 * @return The current status of the task. 2456 */ 2457 public TaskStatus getStatus() { 2458 return this.status == null ? null : this.status.getValue(); 2459 } 2460 2461 /** 2462 * @param value The current status of the task. 2463 */ 2464 public Task setStatus(TaskStatus value) { 2465 if (this.status == null) 2466 this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); 2467 this.status.setValue(value); 2468 return this; 2469 } 2470 2471 /** 2472 * @return {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.) 2473 */ 2474 public CodeableConcept getStatusReason() { 2475 if (this.statusReason == null) 2476 if (Configuration.errorOnAutoCreate()) 2477 throw new Error("Attempt to auto-create Task.statusReason"); 2478 else if (Configuration.doAutoCreate()) 2479 this.statusReason = new CodeableConcept(); // cc 2480 return this.statusReason; 2481 } 2482 2483 public boolean hasStatusReason() { 2484 return this.statusReason != null && !this.statusReason.isEmpty(); 2485 } 2486 2487 /** 2488 * @param value {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.) 2489 */ 2490 public Task setStatusReason(CodeableConcept value) { 2491 this.statusReason = value; 2492 return this; 2493 } 2494 2495 /** 2496 * @return {@link #businessStatus} (Contains business-specific nuances of the business state.) 2497 */ 2498 public CodeableConcept getBusinessStatus() { 2499 if (this.businessStatus == null) 2500 if (Configuration.errorOnAutoCreate()) 2501 throw new Error("Attempt to auto-create Task.businessStatus"); 2502 else if (Configuration.doAutoCreate()) 2503 this.businessStatus = new CodeableConcept(); // cc 2504 return this.businessStatus; 2505 } 2506 2507 public boolean hasBusinessStatus() { 2508 return this.businessStatus != null && !this.businessStatus.isEmpty(); 2509 } 2510 2511 /** 2512 * @param value {@link #businessStatus} (Contains business-specific nuances of the business state.) 2513 */ 2514 public Task setBusinessStatus(CodeableConcept value) { 2515 this.businessStatus = value; 2516 return this; 2517 } 2518 2519 /** 2520 * @return {@link #intent} (Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 2521 */ 2522 public Enumeration<TaskIntent> getIntentElement() { 2523 if (this.intent == null) 2524 if (Configuration.errorOnAutoCreate()) 2525 throw new Error("Attempt to auto-create Task.intent"); 2526 else if (Configuration.doAutoCreate()) 2527 this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); // bb 2528 return this.intent; 2529 } 2530 2531 public boolean hasIntentElement() { 2532 return this.intent != null && !this.intent.isEmpty(); 2533 } 2534 2535 public boolean hasIntent() { 2536 return this.intent != null && !this.intent.isEmpty(); 2537 } 2538 2539 /** 2540 * @param value {@link #intent} (Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 2541 */ 2542 public Task setIntentElement(Enumeration<TaskIntent> value) { 2543 this.intent = value; 2544 return this; 2545 } 2546 2547 /** 2548 * @return Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc. 2549 */ 2550 public TaskIntent getIntent() { 2551 return this.intent == null ? null : this.intent.getValue(); 2552 } 2553 2554 /** 2555 * @param value Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc. 2556 */ 2557 public Task setIntent(TaskIntent value) { 2558 if (this.intent == null) 2559 this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); 2560 this.intent.setValue(value); 2561 return this; 2562 } 2563 2564 /** 2565 * @return {@link #priority} (Indicates how quickly the Task should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 2566 */ 2567 public Enumeration<TaskPriority> getPriorityElement() { 2568 if (this.priority == null) 2569 if (Configuration.errorOnAutoCreate()) 2570 throw new Error("Attempt to auto-create Task.priority"); 2571 else if (Configuration.doAutoCreate()) 2572 this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory()); // bb 2573 return this.priority; 2574 } 2575 2576 public boolean hasPriorityElement() { 2577 return this.priority != null && !this.priority.isEmpty(); 2578 } 2579 2580 public boolean hasPriority() { 2581 return this.priority != null && !this.priority.isEmpty(); 2582 } 2583 2584 /** 2585 * @param value {@link #priority} (Indicates how quickly the Task should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 2586 */ 2587 public Task setPriorityElement(Enumeration<TaskPriority> value) { 2588 this.priority = value; 2589 return this; 2590 } 2591 2592 /** 2593 * @return Indicates how quickly the Task should be addressed with respect to other requests. 2594 */ 2595 public TaskPriority getPriority() { 2596 return this.priority == null ? null : this.priority.getValue(); 2597 } 2598 2599 /** 2600 * @param value Indicates how quickly the Task should be addressed with respect to other requests. 2601 */ 2602 public Task setPriority(TaskPriority value) { 2603 if (value == null) 2604 this.priority = null; 2605 else { 2606 if (this.priority == null) 2607 this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory()); 2608 this.priority.setValue(value); 2609 } 2610 return this; 2611 } 2612 2613 /** 2614 * @return {@link #code} (A name or code (or both) briefly describing what the task involves.) 2615 */ 2616 public CodeableConcept getCode() { 2617 if (this.code == null) 2618 if (Configuration.errorOnAutoCreate()) 2619 throw new Error("Attempt to auto-create Task.code"); 2620 else if (Configuration.doAutoCreate()) 2621 this.code = new CodeableConcept(); // cc 2622 return this.code; 2623 } 2624 2625 public boolean hasCode() { 2626 return this.code != null && !this.code.isEmpty(); 2627 } 2628 2629 /** 2630 * @param value {@link #code} (A name or code (or both) briefly describing what the task involves.) 2631 */ 2632 public Task setCode(CodeableConcept value) { 2633 this.code = value; 2634 return this; 2635 } 2636 2637 /** 2638 * @return {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2639 */ 2640 public StringType getDescriptionElement() { 2641 if (this.description == null) 2642 if (Configuration.errorOnAutoCreate()) 2643 throw new Error("Attempt to auto-create Task.description"); 2644 else if (Configuration.doAutoCreate()) 2645 this.description = new StringType(); // bb 2646 return this.description; 2647 } 2648 2649 public boolean hasDescriptionElement() { 2650 return this.description != null && !this.description.isEmpty(); 2651 } 2652 2653 public boolean hasDescription() { 2654 return this.description != null && !this.description.isEmpty(); 2655 } 2656 2657 /** 2658 * @param value {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2659 */ 2660 public Task setDescriptionElement(StringType value) { 2661 this.description = value; 2662 return this; 2663 } 2664 2665 /** 2666 * @return A free-text description of what is to be performed. 2667 */ 2668 public String getDescription() { 2669 return this.description == null ? null : this.description.getValue(); 2670 } 2671 2672 /** 2673 * @param value A free-text description of what is to be performed. 2674 */ 2675 public Task setDescription(String value) { 2676 if (Utilities.noString(value)) 2677 this.description = null; 2678 else { 2679 if (this.description == null) 2680 this.description = new StringType(); 2681 this.description.setValue(value); 2682 } 2683 return this; 2684 } 2685 2686 /** 2687 * @return {@link #focus} (The request being actioned or the resource being manipulated by this task.) 2688 */ 2689 public Reference getFocus() { 2690 if (this.focus == null) 2691 if (Configuration.errorOnAutoCreate()) 2692 throw new Error("Attempt to auto-create Task.focus"); 2693 else if (Configuration.doAutoCreate()) 2694 this.focus = new Reference(); // cc 2695 return this.focus; 2696 } 2697 2698 public boolean hasFocus() { 2699 return this.focus != null && !this.focus.isEmpty(); 2700 } 2701 2702 /** 2703 * @param value {@link #focus} (The request being actioned or the resource being manipulated by this task.) 2704 */ 2705 public Task setFocus(Reference value) { 2706 this.focus = value; 2707 return this; 2708 } 2709 2710 /** 2711 * @return {@link #focus} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The request being actioned or the resource being manipulated by this task.) 2712 */ 2713 public Resource getFocusTarget() { 2714 return this.focusTarget; 2715 } 2716 2717 /** 2718 * @param value {@link #focus} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The request being actioned or the resource being manipulated by this task.) 2719 */ 2720 public Task setFocusTarget(Resource value) { 2721 this.focusTarget = value; 2722 return this; 2723 } 2724 2725 /** 2726 * @return {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) 2727 */ 2728 public Reference getFor() { 2729 if (this.for_ == null) 2730 if (Configuration.errorOnAutoCreate()) 2731 throw new Error("Attempt to auto-create Task.for_"); 2732 else if (Configuration.doAutoCreate()) 2733 this.for_ = new Reference(); // cc 2734 return this.for_; 2735 } 2736 2737 public boolean hasFor() { 2738 return this.for_ != null && !this.for_.isEmpty(); 2739 } 2740 2741 /** 2742 * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) 2743 */ 2744 public Task setFor(Reference value) { 2745 this.for_ = value; 2746 return this; 2747 } 2748 2749 /** 2750 * @return {@link #for_} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) 2751 */ 2752 public Resource getForTarget() { 2753 return this.for_Target; 2754 } 2755 2756 /** 2757 * @param value {@link #for_} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) 2758 */ 2759 public Task setForTarget(Resource value) { 2760 this.for_Target = value; 2761 return this; 2762 } 2763 2764 /** 2765 * @return {@link #context} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.) 2766 */ 2767 public Reference getContext() { 2768 if (this.context == null) 2769 if (Configuration.errorOnAutoCreate()) 2770 throw new Error("Attempt to auto-create Task.context"); 2771 else if (Configuration.doAutoCreate()) 2772 this.context = new Reference(); // cc 2773 return this.context; 2774 } 2775 2776 public boolean hasContext() { 2777 return this.context != null && !this.context.isEmpty(); 2778 } 2779 2780 /** 2781 * @param value {@link #context} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.) 2782 */ 2783 public Task setContext(Reference value) { 2784 this.context = value; 2785 return this; 2786 } 2787 2788 /** 2789 * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.) 2790 */ 2791 public Resource getContextTarget() { 2792 return this.contextTarget; 2793 } 2794 2795 /** 2796 * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.) 2797 */ 2798 public Task setContextTarget(Resource value) { 2799 this.contextTarget = value; 2800 return this; 2801 } 2802 2803 /** 2804 * @return {@link #executionPeriod} (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).) 2805 */ 2806 public Period getExecutionPeriod() { 2807 if (this.executionPeriod == null) 2808 if (Configuration.errorOnAutoCreate()) 2809 throw new Error("Attempt to auto-create Task.executionPeriod"); 2810 else if (Configuration.doAutoCreate()) 2811 this.executionPeriod = new Period(); // cc 2812 return this.executionPeriod; 2813 } 2814 2815 public boolean hasExecutionPeriod() { 2816 return this.executionPeriod != null && !this.executionPeriod.isEmpty(); 2817 } 2818 2819 /** 2820 * @param value {@link #executionPeriod} (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).) 2821 */ 2822 public Task setExecutionPeriod(Period value) { 2823 this.executionPeriod = value; 2824 return this; 2825 } 2826 2827 /** 2828 * @return {@link #authoredOn} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 2829 */ 2830 public DateTimeType getAuthoredOnElement() { 2831 if (this.authoredOn == null) 2832 if (Configuration.errorOnAutoCreate()) 2833 throw new Error("Attempt to auto-create Task.authoredOn"); 2834 else if (Configuration.doAutoCreate()) 2835 this.authoredOn = new DateTimeType(); // bb 2836 return this.authoredOn; 2837 } 2838 2839 public boolean hasAuthoredOnElement() { 2840 return this.authoredOn != null && !this.authoredOn.isEmpty(); 2841 } 2842 2843 public boolean hasAuthoredOn() { 2844 return this.authoredOn != null && !this.authoredOn.isEmpty(); 2845 } 2846 2847 /** 2848 * @param value {@link #authoredOn} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 2849 */ 2850 public Task setAuthoredOnElement(DateTimeType value) { 2851 this.authoredOn = value; 2852 return this; 2853 } 2854 2855 /** 2856 * @return The date and time this task was created. 2857 */ 2858 public Date getAuthoredOn() { 2859 return this.authoredOn == null ? null : this.authoredOn.getValue(); 2860 } 2861 2862 /** 2863 * @param value The date and time this task was created. 2864 */ 2865 public Task setAuthoredOn(Date value) { 2866 if (value == null) 2867 this.authoredOn = null; 2868 else { 2869 if (this.authoredOn == null) 2870 this.authoredOn = new DateTimeType(); 2871 this.authoredOn.setValue(value); 2872 } 2873 return this; 2874 } 2875 2876 /** 2877 * @return {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value 2878 */ 2879 public DateTimeType getLastModifiedElement() { 2880 if (this.lastModified == null) 2881 if (Configuration.errorOnAutoCreate()) 2882 throw new Error("Attempt to auto-create Task.lastModified"); 2883 else if (Configuration.doAutoCreate()) 2884 this.lastModified = new DateTimeType(); // bb 2885 return this.lastModified; 2886 } 2887 2888 public boolean hasLastModifiedElement() { 2889 return this.lastModified != null && !this.lastModified.isEmpty(); 2890 } 2891 2892 public boolean hasLastModified() { 2893 return this.lastModified != null && !this.lastModified.isEmpty(); 2894 } 2895 2896 /** 2897 * @param value {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value 2898 */ 2899 public Task setLastModifiedElement(DateTimeType value) { 2900 this.lastModified = value; 2901 return this; 2902 } 2903 2904 /** 2905 * @return The date and time of last modification to this task. 2906 */ 2907 public Date getLastModified() { 2908 return this.lastModified == null ? null : this.lastModified.getValue(); 2909 } 2910 2911 /** 2912 * @param value The date and time of last modification to this task. 2913 */ 2914 public Task setLastModified(Date value) { 2915 if (value == null) 2916 this.lastModified = null; 2917 else { 2918 if (this.lastModified == null) 2919 this.lastModified = new DateTimeType(); 2920 this.lastModified.setValue(value); 2921 } 2922 return this; 2923 } 2924 2925 /** 2926 * @return {@link #requester} (The creator of the task.) 2927 */ 2928 public TaskRequesterComponent getRequester() { 2929 if (this.requester == null) 2930 if (Configuration.errorOnAutoCreate()) 2931 throw new Error("Attempt to auto-create Task.requester"); 2932 else if (Configuration.doAutoCreate()) 2933 this.requester = new TaskRequesterComponent(); // cc 2934 return this.requester; 2935 } 2936 2937 public boolean hasRequester() { 2938 return this.requester != null && !this.requester.isEmpty(); 2939 } 2940 2941 /** 2942 * @param value {@link #requester} (The creator of the task.) 2943 */ 2944 public Task setRequester(TaskRequesterComponent value) { 2945 this.requester = value; 2946 return this; 2947 } 2948 2949 /** 2950 * @return {@link #performerType} (The type of participant that can execute the task.) 2951 */ 2952 public List<CodeableConcept> getPerformerType() { 2953 if (this.performerType == null) 2954 this.performerType = new ArrayList<CodeableConcept>(); 2955 return this.performerType; 2956 } 2957 2958 /** 2959 * @return Returns a reference to <code>this</code> for easy method chaining 2960 */ 2961 public Task setPerformerType(List<CodeableConcept> thePerformerType) { 2962 this.performerType = thePerformerType; 2963 return this; 2964 } 2965 2966 public boolean hasPerformerType() { 2967 if (this.performerType == null) 2968 return false; 2969 for (CodeableConcept item : this.performerType) 2970 if (!item.isEmpty()) 2971 return true; 2972 return false; 2973 } 2974 2975 public CodeableConcept addPerformerType() { //3 2976 CodeableConcept t = new CodeableConcept(); 2977 if (this.performerType == null) 2978 this.performerType = new ArrayList<CodeableConcept>(); 2979 this.performerType.add(t); 2980 return t; 2981 } 2982 2983 public Task addPerformerType(CodeableConcept t) { //3 2984 if (t == null) 2985 return this; 2986 if (this.performerType == null) 2987 this.performerType = new ArrayList<CodeableConcept>(); 2988 this.performerType.add(t); 2989 return this; 2990 } 2991 2992 /** 2993 * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist 2994 */ 2995 public CodeableConcept getPerformerTypeFirstRep() { 2996 if (getPerformerType().isEmpty()) { 2997 addPerformerType(); 2998 } 2999 return getPerformerType().get(0); 3000 } 3001 3002 /** 3003 * @return {@link #owner} (Individual organization or Device currently responsible for task execution.) 3004 */ 3005 public Reference getOwner() { 3006 if (this.owner == null) 3007 if (Configuration.errorOnAutoCreate()) 3008 throw new Error("Attempt to auto-create Task.owner"); 3009 else if (Configuration.doAutoCreate()) 3010 this.owner = new Reference(); // cc 3011 return this.owner; 3012 } 3013 3014 public boolean hasOwner() { 3015 return this.owner != null && !this.owner.isEmpty(); 3016 } 3017 3018 /** 3019 * @param value {@link #owner} (Individual organization or Device currently responsible for task execution.) 3020 */ 3021 public Task setOwner(Reference value) { 3022 this.owner = value; 3023 return this; 3024 } 3025 3026 /** 3027 * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual organization or Device currently responsible for task execution.) 3028 */ 3029 public Resource getOwnerTarget() { 3030 return this.ownerTarget; 3031 } 3032 3033 /** 3034 * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual organization or Device currently responsible for task execution.) 3035 */ 3036 public Task setOwnerTarget(Resource value) { 3037 this.ownerTarget = value; 3038 return this; 3039 } 3040 3041 /** 3042 * @return {@link #reason} (A description or code indicating why this task needs to be performed.) 3043 */ 3044 public CodeableConcept getReason() { 3045 if (this.reason == null) 3046 if (Configuration.errorOnAutoCreate()) 3047 throw new Error("Attempt to auto-create Task.reason"); 3048 else if (Configuration.doAutoCreate()) 3049 this.reason = new CodeableConcept(); // cc 3050 return this.reason; 3051 } 3052 3053 public boolean hasReason() { 3054 return this.reason != null && !this.reason.isEmpty(); 3055 } 3056 3057 /** 3058 * @param value {@link #reason} (A description or code indicating why this task needs to be performed.) 3059 */ 3060 public Task setReason(CodeableConcept value) { 3061 this.reason = value; 3062 return this; 3063 } 3064 3065 /** 3066 * @return {@link #note} (Free-text information captured about the task as it progresses.) 3067 */ 3068 public List<Annotation> getNote() { 3069 if (this.note == null) 3070 this.note = new ArrayList<Annotation>(); 3071 return this.note; 3072 } 3073 3074 /** 3075 * @return Returns a reference to <code>this</code> for easy method chaining 3076 */ 3077 public Task setNote(List<Annotation> theNote) { 3078 this.note = theNote; 3079 return this; 3080 } 3081 3082 public boolean hasNote() { 3083 if (this.note == null) 3084 return false; 3085 for (Annotation item : this.note) 3086 if (!item.isEmpty()) 3087 return true; 3088 return false; 3089 } 3090 3091 public Annotation addNote() { //3 3092 Annotation t = new Annotation(); 3093 if (this.note == null) 3094 this.note = new ArrayList<Annotation>(); 3095 this.note.add(t); 3096 return t; 3097 } 3098 3099 public Task addNote(Annotation t) { //3 3100 if (t == null) 3101 return this; 3102 if (this.note == null) 3103 this.note = new ArrayList<Annotation>(); 3104 this.note.add(t); 3105 return this; 3106 } 3107 3108 /** 3109 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 3110 */ 3111 public Annotation getNoteFirstRep() { 3112 if (getNote().isEmpty()) { 3113 addNote(); 3114 } 3115 return getNote().get(0); 3116 } 3117 3118 /** 3119 * @return {@link #relevantHistory} (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.) 3120 */ 3121 public List<Reference> getRelevantHistory() { 3122 if (this.relevantHistory == null) 3123 this.relevantHistory = new ArrayList<Reference>(); 3124 return this.relevantHistory; 3125 } 3126 3127 /** 3128 * @return Returns a reference to <code>this</code> for easy method chaining 3129 */ 3130 public Task setRelevantHistory(List<Reference> theRelevantHistory) { 3131 this.relevantHistory = theRelevantHistory; 3132 return this; 3133 } 3134 3135 public boolean hasRelevantHistory() { 3136 if (this.relevantHistory == null) 3137 return false; 3138 for (Reference item : this.relevantHistory) 3139 if (!item.isEmpty()) 3140 return true; 3141 return false; 3142 } 3143 3144 public Reference addRelevantHistory() { //3 3145 Reference t = new Reference(); 3146 if (this.relevantHistory == null) 3147 this.relevantHistory = new ArrayList<Reference>(); 3148 this.relevantHistory.add(t); 3149 return t; 3150 } 3151 3152 public Task addRelevantHistory(Reference t) { //3 3153 if (t == null) 3154 return this; 3155 if (this.relevantHistory == null) 3156 this.relevantHistory = new ArrayList<Reference>(); 3157 this.relevantHistory.add(t); 3158 return this; 3159 } 3160 3161 /** 3162 * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist 3163 */ 3164 public Reference getRelevantHistoryFirstRep() { 3165 if (getRelevantHistory().isEmpty()) { 3166 addRelevantHistory(); 3167 } 3168 return getRelevantHistory().get(0); 3169 } 3170 3171 /** 3172 * @deprecated Use Reference#setResource(IBaseResource) instead 3173 */ 3174 @Deprecated 3175 public List<Provenance> getRelevantHistoryTarget() { 3176 if (this.relevantHistoryTarget == null) 3177 this.relevantHistoryTarget = new ArrayList<Provenance>(); 3178 return this.relevantHistoryTarget; 3179 } 3180 3181 /** 3182 * @deprecated Use Reference#setResource(IBaseResource) instead 3183 */ 3184 @Deprecated 3185 public Provenance addRelevantHistoryTarget() { 3186 Provenance r = new Provenance(); 3187 if (this.relevantHistoryTarget == null) 3188 this.relevantHistoryTarget = new ArrayList<Provenance>(); 3189 this.relevantHistoryTarget.add(r); 3190 return r; 3191 } 3192 3193 /** 3194 * @return {@link #restriction} (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.) 3195 */ 3196 public TaskRestrictionComponent getRestriction() { 3197 if (this.restriction == null) 3198 if (Configuration.errorOnAutoCreate()) 3199 throw new Error("Attempt to auto-create Task.restriction"); 3200 else if (Configuration.doAutoCreate()) 3201 this.restriction = new TaskRestrictionComponent(); // cc 3202 return this.restriction; 3203 } 3204 3205 public boolean hasRestriction() { 3206 return this.restriction != null && !this.restriction.isEmpty(); 3207 } 3208 3209 /** 3210 * @param value {@link #restriction} (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.) 3211 */ 3212 public Task setRestriction(TaskRestrictionComponent value) { 3213 this.restriction = value; 3214 return this; 3215 } 3216 3217 /** 3218 * @return {@link #input} (Additional information that may be needed in the execution of the task.) 3219 */ 3220 public List<ParameterComponent> getInput() { 3221 if (this.input == null) 3222 this.input = new ArrayList<ParameterComponent>(); 3223 return this.input; 3224 } 3225 3226 /** 3227 * @return Returns a reference to <code>this</code> for easy method chaining 3228 */ 3229 public Task setInput(List<ParameterComponent> theInput) { 3230 this.input = theInput; 3231 return this; 3232 } 3233 3234 public boolean hasInput() { 3235 if (this.input == null) 3236 return false; 3237 for (ParameterComponent item : this.input) 3238 if (!item.isEmpty()) 3239 return true; 3240 return false; 3241 } 3242 3243 public ParameterComponent addInput() { //3 3244 ParameterComponent t = new ParameterComponent(); 3245 if (this.input == null) 3246 this.input = new ArrayList<ParameterComponent>(); 3247 this.input.add(t); 3248 return t; 3249 } 3250 3251 public Task addInput(ParameterComponent t) { //3 3252 if (t == null) 3253 return this; 3254 if (this.input == null) 3255 this.input = new ArrayList<ParameterComponent>(); 3256 this.input.add(t); 3257 return this; 3258 } 3259 3260 /** 3261 * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist 3262 */ 3263 public ParameterComponent getInputFirstRep() { 3264 if (getInput().isEmpty()) { 3265 addInput(); 3266 } 3267 return getInput().get(0); 3268 } 3269 3270 /** 3271 * @return {@link #output} (Outputs produced by the Task.) 3272 */ 3273 public List<TaskOutputComponent> getOutput() { 3274 if (this.output == null) 3275 this.output = new ArrayList<TaskOutputComponent>(); 3276 return this.output; 3277 } 3278 3279 /** 3280 * @return Returns a reference to <code>this</code> for easy method chaining 3281 */ 3282 public Task setOutput(List<TaskOutputComponent> theOutput) { 3283 this.output = theOutput; 3284 return this; 3285 } 3286 3287 public boolean hasOutput() { 3288 if (this.output == null) 3289 return false; 3290 for (TaskOutputComponent item : this.output) 3291 if (!item.isEmpty()) 3292 return true; 3293 return false; 3294 } 3295 3296 public TaskOutputComponent addOutput() { //3 3297 TaskOutputComponent t = new TaskOutputComponent(); 3298 if (this.output == null) 3299 this.output = new ArrayList<TaskOutputComponent>(); 3300 this.output.add(t); 3301 return t; 3302 } 3303 3304 public Task addOutput(TaskOutputComponent t) { //3 3305 if (t == null) 3306 return this; 3307 if (this.output == null) 3308 this.output = new ArrayList<TaskOutputComponent>(); 3309 this.output.add(t); 3310 return this; 3311 } 3312 3313 /** 3314 * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist 3315 */ 3316 public TaskOutputComponent getOutputFirstRep() { 3317 if (getOutput().isEmpty()) { 3318 addOutput(); 3319 } 3320 return getOutput().get(0); 3321 } 3322 3323 protected void listChildren(List<Property> children) { 3324 super.listChildren(children); 3325 children.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3326 children.add(new Property("definition[x]", "uri|Reference(ActivityDefinition)", "A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.", 0, 1, definition)); 3327 children.add(new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a \"request\" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 3328 children.add(new Property("groupIdentifier", "Identifier", "An identifier that links together multiple tasks and other requests that were created in the same context.", 0, 1, groupIdentifier)); 3329 children.add(new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf)); 3330 children.add(new Property("status", "code", "The current status of the task.", 0, 1, status)); 3331 children.add(new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason)); 3332 children.add(new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus)); 3333 children.add(new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", 0, 1, intent)); 3334 children.add(new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority)); 3335 children.add(new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code)); 3336 children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description)); 3337 children.add(new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus)); 3338 children.add(new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 1, for_)); 3339 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.", 0, 1, context)); 3340 children.add(new Property("executionPeriod", "Period", "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).", 0, 1, executionPeriod)); 3341 children.add(new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn)); 3342 children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified)); 3343 children.add(new Property("requester", "", "The creator of the task.", 0, 1, requester)); 3344 children.add(new Property("performerType", "CodeableConcept", "The type of participant that can execute the task.", 0, java.lang.Integer.MAX_VALUE, performerType)); 3345 children.add(new Property("owner", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner)); 3346 children.add(new Property("reason", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reason)); 3347 children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note)); 3348 children.add(new Property("relevantHistory", "Reference(Provenance)", "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.", 0, java.lang.Integer.MAX_VALUE, relevantHistory)); 3349 children.add(new Property("restriction", "", "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.", 0, 1, restriction)); 3350 children.add(new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input)); 3351 children.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output)); 3352 } 3353 3354 @Override 3355 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3356 switch (_hash) { 3357 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier); 3358 case -1139422643: /*definition[x]*/ return new Property("definition[x]", "uri|Reference(ActivityDefinition)", "A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.", 0, 1, definition); 3359 case -1014418093: /*definition*/ return new Property("definition[x]", "uri|Reference(ActivityDefinition)", "A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.", 0, 1, definition); 3360 case -1139428583: /*definitionUri*/ return new Property("definition[x]", "uri|Reference(ActivityDefinition)", "A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.", 0, 1, definition); 3361 case -820021448: /*definitionReference*/ return new Property("definition[x]", "uri|Reference(ActivityDefinition)", "A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.", 0, 1, definition); 3362 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a \"request\" resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn); 3363 case -445338488: /*groupIdentifier*/ return new Property("groupIdentifier", "Identifier", "An identifier that links together multiple tasks and other requests that were created in the same context.", 0, 1, groupIdentifier); 3364 case -995410646: /*partOf*/ return new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf); 3365 case -892481550: /*status*/ return new Property("status", "code", "The current status of the task.", 0, 1, status); 3366 case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason); 3367 case 2008591314: /*businessStatus*/ return new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus); 3368 case -1183762788: /*intent*/ return new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", 0, 1, intent); 3369 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority); 3370 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code); 3371 case -1724546052: /*description*/ return new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description); 3372 case 97604824: /*focus*/ return new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus); 3373 case 101577: /*for*/ return new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 1, for_); 3374 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.", 0, 1, context); 3375 case 1218624249: /*executionPeriod*/ return new Property("executionPeriod", "Period", "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).", 0, 1, executionPeriod); 3376 case -1500852503: /*authoredOn*/ return new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn); 3377 case 1959003007: /*lastModified*/ return new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified); 3378 case 693933948: /*requester*/ return new Property("requester", "", "The creator of the task.", 0, 1, requester); 3379 case -901444568: /*performerType*/ return new Property("performerType", "CodeableConcept", "The type of participant that can execute the task.", 0, java.lang.Integer.MAX_VALUE, performerType); 3380 case 106164915: /*owner*/ return new Property("owner", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner); 3381 case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reason); 3382 case 3387378: /*note*/ return new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note); 3383 case 1538891575: /*relevantHistory*/ return new Property("relevantHistory", "Reference(Provenance)", "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.", 0, java.lang.Integer.MAX_VALUE, relevantHistory); 3384 case -1561062452: /*restriction*/ return new Property("restriction", "", "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.", 0, 1, restriction); 3385 case 100358090: /*input*/ return new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input); 3386 case -1005512447: /*output*/ return new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output); 3387 default: return super.getNamedProperty(_hash, _name, _checkValid); 3388 } 3389 3390 } 3391 3392 @Override 3393 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3394 switch (hash) { 3395 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3396 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Type 3397 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 3398 case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier 3399 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 3400 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<TaskStatus> 3401 case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept 3402 case 2008591314: /*businessStatus*/ return this.businessStatus == null ? new Base[0] : new Base[] {this.businessStatus}; // CodeableConcept 3403 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<TaskIntent> 3404 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<TaskPriority> 3405 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 3406 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3407 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference 3408 case 101577: /*for*/ return this.for_ == null ? new Base[0] : new Base[] {this.for_}; // Reference 3409 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 3410 case 1218624249: /*executionPeriod*/ return this.executionPeriod == null ? new Base[0] : new Base[] {this.executionPeriod}; // Period 3411 case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType 3412 case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // DateTimeType 3413 case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // TaskRequesterComponent 3414 case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept 3415 case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference 3416 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept 3417 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3418 case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference 3419 case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TaskRestrictionComponent 3420 case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // ParameterComponent 3421 case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TaskOutputComponent 3422 default: return super.getProperty(hash, name, checkValid); 3423 } 3424 3425 } 3426 3427 @Override 3428 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3429 switch (hash) { 3430 case -1618432855: // identifier 3431 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3432 return value; 3433 case -1014418093: // definition 3434 this.definition = castToType(value); // Type 3435 return value; 3436 case -332612366: // basedOn 3437 this.getBasedOn().add(castToReference(value)); // Reference 3438 return value; 3439 case -445338488: // groupIdentifier 3440 this.groupIdentifier = castToIdentifier(value); // Identifier 3441 return value; 3442 case -995410646: // partOf 3443 this.getPartOf().add(castToReference(value)); // Reference 3444 return value; 3445 case -892481550: // status 3446 value = new TaskStatusEnumFactory().fromType(castToCode(value)); 3447 this.status = (Enumeration) value; // Enumeration<TaskStatus> 3448 return value; 3449 case 2051346646: // statusReason 3450 this.statusReason = castToCodeableConcept(value); // CodeableConcept 3451 return value; 3452 case 2008591314: // businessStatus 3453 this.businessStatus = castToCodeableConcept(value); // CodeableConcept 3454 return value; 3455 case -1183762788: // intent 3456 value = new TaskIntentEnumFactory().fromType(castToCode(value)); 3457 this.intent = (Enumeration) value; // Enumeration<TaskIntent> 3458 return value; 3459 case -1165461084: // priority 3460 value = new TaskPriorityEnumFactory().fromType(castToCode(value)); 3461 this.priority = (Enumeration) value; // Enumeration<TaskPriority> 3462 return value; 3463 case 3059181: // code 3464 this.code = castToCodeableConcept(value); // CodeableConcept 3465 return value; 3466 case -1724546052: // description 3467 this.description = castToString(value); // StringType 3468 return value; 3469 case 97604824: // focus 3470 this.focus = castToReference(value); // Reference 3471 return value; 3472 case 101577: // for 3473 this.for_ = castToReference(value); // Reference 3474 return value; 3475 case 951530927: // context 3476 this.context = castToReference(value); // Reference 3477 return value; 3478 case 1218624249: // executionPeriod 3479 this.executionPeriod = castToPeriod(value); // Period 3480 return value; 3481 case -1500852503: // authoredOn 3482 this.authoredOn = castToDateTime(value); // DateTimeType 3483 return value; 3484 case 1959003007: // lastModified 3485 this.lastModified = castToDateTime(value); // DateTimeType 3486 return value; 3487 case 693933948: // requester 3488 this.requester = (TaskRequesterComponent) value; // TaskRequesterComponent 3489 return value; 3490 case -901444568: // performerType 3491 this.getPerformerType().add(castToCodeableConcept(value)); // CodeableConcept 3492 return value; 3493 case 106164915: // owner 3494 this.owner = castToReference(value); // Reference 3495 return value; 3496 case -934964668: // reason 3497 this.reason = castToCodeableConcept(value); // CodeableConcept 3498 return value; 3499 case 3387378: // note 3500 this.getNote().add(castToAnnotation(value)); // Annotation 3501 return value; 3502 case 1538891575: // relevantHistory 3503 this.getRelevantHistory().add(castToReference(value)); // Reference 3504 return value; 3505 case -1561062452: // restriction 3506 this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent 3507 return value; 3508 case 100358090: // input 3509 this.getInput().add((ParameterComponent) value); // ParameterComponent 3510 return value; 3511 case -1005512447: // output 3512 this.getOutput().add((TaskOutputComponent) value); // TaskOutputComponent 3513 return value; 3514 default: return super.setProperty(hash, name, value); 3515 } 3516 3517 } 3518 3519 @Override 3520 public Base setProperty(String name, Base value) throws FHIRException { 3521 if (name.equals("identifier")) { 3522 this.getIdentifier().add(castToIdentifier(value)); 3523 } else if (name.equals("definition[x]")) { 3524 this.definition = castToType(value); // Type 3525 } else if (name.equals("basedOn")) { 3526 this.getBasedOn().add(castToReference(value)); 3527 } else if (name.equals("groupIdentifier")) { 3528 this.groupIdentifier = castToIdentifier(value); // Identifier 3529 } else if (name.equals("partOf")) { 3530 this.getPartOf().add(castToReference(value)); 3531 } else if (name.equals("status")) { 3532 value = new TaskStatusEnumFactory().fromType(castToCode(value)); 3533 this.status = (Enumeration) value; // Enumeration<TaskStatus> 3534 } else if (name.equals("statusReason")) { 3535 this.statusReason = castToCodeableConcept(value); // CodeableConcept 3536 } else if (name.equals("businessStatus")) { 3537 this.businessStatus = castToCodeableConcept(value); // CodeableConcept 3538 } else if (name.equals("intent")) { 3539 value = new TaskIntentEnumFactory().fromType(castToCode(value)); 3540 this.intent = (Enumeration) value; // Enumeration<TaskIntent> 3541 } else if (name.equals("priority")) { 3542 value = new TaskPriorityEnumFactory().fromType(castToCode(value)); 3543 this.priority = (Enumeration) value; // Enumeration<TaskPriority> 3544 } else if (name.equals("code")) { 3545 this.code = castToCodeableConcept(value); // CodeableConcept 3546 } else if (name.equals("description")) { 3547 this.description = castToString(value); // StringType 3548 } else if (name.equals("focus")) { 3549 this.focus = castToReference(value); // Reference 3550 } else if (name.equals("for")) { 3551 this.for_ = castToReference(value); // Reference 3552 } else if (name.equals("context")) { 3553 this.context = castToReference(value); // Reference 3554 } else if (name.equals("executionPeriod")) { 3555 this.executionPeriod = castToPeriod(value); // Period 3556 } else if (name.equals("authoredOn")) { 3557 this.authoredOn = castToDateTime(value); // DateTimeType 3558 } else if (name.equals("lastModified")) { 3559 this.lastModified = castToDateTime(value); // DateTimeType 3560 } else if (name.equals("requester")) { 3561 this.requester = (TaskRequesterComponent) value; // TaskRequesterComponent 3562 } else if (name.equals("performerType")) { 3563 this.getPerformerType().add(castToCodeableConcept(value)); 3564 } else if (name.equals("owner")) { 3565 this.owner = castToReference(value); // Reference 3566 } else if (name.equals("reason")) { 3567 this.reason = castToCodeableConcept(value); // CodeableConcept 3568 } else if (name.equals("note")) { 3569 this.getNote().add(castToAnnotation(value)); 3570 } else if (name.equals("relevantHistory")) { 3571 this.getRelevantHistory().add(castToReference(value)); 3572 } else if (name.equals("restriction")) { 3573 this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent 3574 } else if (name.equals("input")) { 3575 this.getInput().add((ParameterComponent) value); 3576 } else if (name.equals("output")) { 3577 this.getOutput().add((TaskOutputComponent) value); 3578 } else 3579 return super.setProperty(name, value); 3580 return value; 3581 } 3582 3583 @Override 3584 public Base makeProperty(int hash, String name) throws FHIRException { 3585 switch (hash) { 3586 case -1618432855: return addIdentifier(); 3587 case -1139422643: return getDefinition(); 3588 case -1014418093: return getDefinition(); 3589 case -332612366: return addBasedOn(); 3590 case -445338488: return getGroupIdentifier(); 3591 case -995410646: return addPartOf(); 3592 case -892481550: return getStatusElement(); 3593 case 2051346646: return getStatusReason(); 3594 case 2008591314: return getBusinessStatus(); 3595 case -1183762788: return getIntentElement(); 3596 case -1165461084: return getPriorityElement(); 3597 case 3059181: return getCode(); 3598 case -1724546052: return getDescriptionElement(); 3599 case 97604824: return getFocus(); 3600 case 101577: return getFor(); 3601 case 951530927: return getContext(); 3602 case 1218624249: return getExecutionPeriod(); 3603 case -1500852503: return getAuthoredOnElement(); 3604 case 1959003007: return getLastModifiedElement(); 3605 case 693933948: return getRequester(); 3606 case -901444568: return addPerformerType(); 3607 case 106164915: return getOwner(); 3608 case -934964668: return getReason(); 3609 case 3387378: return addNote(); 3610 case 1538891575: return addRelevantHistory(); 3611 case -1561062452: return getRestriction(); 3612 case 100358090: return addInput(); 3613 case -1005512447: return addOutput(); 3614 default: return super.makeProperty(hash, name); 3615 } 3616 3617 } 3618 3619 @Override 3620 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3621 switch (hash) { 3622 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3623 case -1014418093: /*definition*/ return new String[] {"uri", "Reference"}; 3624 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 3625 case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"}; 3626 case -995410646: /*partOf*/ return new String[] {"Reference"}; 3627 case -892481550: /*status*/ return new String[] {"code"}; 3628 case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; 3629 case 2008591314: /*businessStatus*/ return new String[] {"CodeableConcept"}; 3630 case -1183762788: /*intent*/ return new String[] {"code"}; 3631 case -1165461084: /*priority*/ return new String[] {"code"}; 3632 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 3633 case -1724546052: /*description*/ return new String[] {"string"}; 3634 case 97604824: /*focus*/ return new String[] {"Reference"}; 3635 case 101577: /*for*/ return new String[] {"Reference"}; 3636 case 951530927: /*context*/ return new String[] {"Reference"}; 3637 case 1218624249: /*executionPeriod*/ return new String[] {"Period"}; 3638 case -1500852503: /*authoredOn*/ return new String[] {"dateTime"}; 3639 case 1959003007: /*lastModified*/ return new String[] {"dateTime"}; 3640 case 693933948: /*requester*/ return new String[] {}; 3641 case -901444568: /*performerType*/ return new String[] {"CodeableConcept"}; 3642 case 106164915: /*owner*/ return new String[] {"Reference"}; 3643 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 3644 case 3387378: /*note*/ return new String[] {"Annotation"}; 3645 case 1538891575: /*relevantHistory*/ return new String[] {"Reference"}; 3646 case -1561062452: /*restriction*/ return new String[] {}; 3647 case 100358090: /*input*/ return new String[] {}; 3648 case -1005512447: /*output*/ return new String[] {}; 3649 default: return super.getTypesForProperty(hash, name); 3650 } 3651 3652 } 3653 3654 @Override 3655 public Base addChild(String name) throws FHIRException { 3656 if (name.equals("identifier")) { 3657 return addIdentifier(); 3658 } 3659 else if (name.equals("definitionUri")) { 3660 this.definition = new UriType(); 3661 return this.definition; 3662 } 3663 else if (name.equals("definitionReference")) { 3664 this.definition = new Reference(); 3665 return this.definition; 3666 } 3667 else if (name.equals("basedOn")) { 3668 return addBasedOn(); 3669 } 3670 else if (name.equals("groupIdentifier")) { 3671 this.groupIdentifier = new Identifier(); 3672 return this.groupIdentifier; 3673 } 3674 else if (name.equals("partOf")) { 3675 return addPartOf(); 3676 } 3677 else if (name.equals("status")) { 3678 throw new FHIRException("Cannot call addChild on a primitive type Task.status"); 3679 } 3680 else if (name.equals("statusReason")) { 3681 this.statusReason = new CodeableConcept(); 3682 return this.statusReason; 3683 } 3684 else if (name.equals("businessStatus")) { 3685 this.businessStatus = new CodeableConcept(); 3686 return this.businessStatus; 3687 } 3688 else if (name.equals("intent")) { 3689 throw new FHIRException("Cannot call addChild on a primitive type Task.intent"); 3690 } 3691 else if (name.equals("priority")) { 3692 throw new FHIRException("Cannot call addChild on a primitive type Task.priority"); 3693 } 3694 else if (name.equals("code")) { 3695 this.code = new CodeableConcept(); 3696 return this.code; 3697 } 3698 else if (name.equals("description")) { 3699 throw new FHIRException("Cannot call addChild on a primitive type Task.description"); 3700 } 3701 else if (name.equals("focus")) { 3702 this.focus = new Reference(); 3703 return this.focus; 3704 } 3705 else if (name.equals("for")) { 3706 this.for_ = new Reference(); 3707 return this.for_; 3708 } 3709 else if (name.equals("context")) { 3710 this.context = new Reference(); 3711 return this.context; 3712 } 3713 else if (name.equals("executionPeriod")) { 3714 this.executionPeriod = new Period(); 3715 return this.executionPeriod; 3716 } 3717 else if (name.equals("authoredOn")) { 3718 throw new FHIRException("Cannot call addChild on a primitive type Task.authoredOn"); 3719 } 3720 else if (name.equals("lastModified")) { 3721 throw new FHIRException("Cannot call addChild on a primitive type Task.lastModified"); 3722 } 3723 else if (name.equals("requester")) { 3724 this.requester = new TaskRequesterComponent(); 3725 return this.requester; 3726 } 3727 else if (name.equals("performerType")) { 3728 return addPerformerType(); 3729 } 3730 else if (name.equals("owner")) { 3731 this.owner = new Reference(); 3732 return this.owner; 3733 } 3734 else if (name.equals("reason")) { 3735 this.reason = new CodeableConcept(); 3736 return this.reason; 3737 } 3738 else if (name.equals("note")) { 3739 return addNote(); 3740 } 3741 else if (name.equals("relevantHistory")) { 3742 return addRelevantHistory(); 3743 } 3744 else if (name.equals("restriction")) { 3745 this.restriction = new TaskRestrictionComponent(); 3746 return this.restriction; 3747 } 3748 else if (name.equals("input")) { 3749 return addInput(); 3750 } 3751 else if (name.equals("output")) { 3752 return addOutput(); 3753 } 3754 else 3755 return super.addChild(name); 3756 } 3757 3758 public String fhirType() { 3759 return "Task"; 3760 3761 } 3762 3763 public Task copy() { 3764 Task dst = new Task(); 3765 copyValues(dst); 3766 if (identifier != null) { 3767 dst.identifier = new ArrayList<Identifier>(); 3768 for (Identifier i : identifier) 3769 dst.identifier.add(i.copy()); 3770 }; 3771 dst.definition = definition == null ? null : definition.copy(); 3772 if (basedOn != null) { 3773 dst.basedOn = new ArrayList<Reference>(); 3774 for (Reference i : basedOn) 3775 dst.basedOn.add(i.copy()); 3776 }; 3777 dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); 3778 if (partOf != null) { 3779 dst.partOf = new ArrayList<Reference>(); 3780 for (Reference i : partOf) 3781 dst.partOf.add(i.copy()); 3782 }; 3783 dst.status = status == null ? null : status.copy(); 3784 dst.statusReason = statusReason == null ? null : statusReason.copy(); 3785 dst.businessStatus = businessStatus == null ? null : businessStatus.copy(); 3786 dst.intent = intent == null ? null : intent.copy(); 3787 dst.priority = priority == null ? null : priority.copy(); 3788 dst.code = code == null ? null : code.copy(); 3789 dst.description = description == null ? null : description.copy(); 3790 dst.focus = focus == null ? null : focus.copy(); 3791 dst.for_ = for_ == null ? null : for_.copy(); 3792 dst.context = context == null ? null : context.copy(); 3793 dst.executionPeriod = executionPeriod == null ? null : executionPeriod.copy(); 3794 dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); 3795 dst.lastModified = lastModified == null ? null : lastModified.copy(); 3796 dst.requester = requester == null ? null : requester.copy(); 3797 if (performerType != null) { 3798 dst.performerType = new ArrayList<CodeableConcept>(); 3799 for (CodeableConcept i : performerType) 3800 dst.performerType.add(i.copy()); 3801 }; 3802 dst.owner = owner == null ? null : owner.copy(); 3803 dst.reason = reason == null ? null : reason.copy(); 3804 if (note != null) { 3805 dst.note = new ArrayList<Annotation>(); 3806 for (Annotation i : note) 3807 dst.note.add(i.copy()); 3808 }; 3809 if (relevantHistory != null) { 3810 dst.relevantHistory = new ArrayList<Reference>(); 3811 for (Reference i : relevantHistory) 3812 dst.relevantHistory.add(i.copy()); 3813 }; 3814 dst.restriction = restriction == null ? null : restriction.copy(); 3815 if (input != null) { 3816 dst.input = new ArrayList<ParameterComponent>(); 3817 for (ParameterComponent i : input) 3818 dst.input.add(i.copy()); 3819 }; 3820 if (output != null) { 3821 dst.output = new ArrayList<TaskOutputComponent>(); 3822 for (TaskOutputComponent i : output) 3823 dst.output.add(i.copy()); 3824 }; 3825 return dst; 3826 } 3827 3828 protected Task typedCopy() { 3829 return copy(); 3830 } 3831 3832 @Override 3833 public boolean equalsDeep(Base other_) { 3834 if (!super.equalsDeep(other_)) 3835 return false; 3836 if (!(other_ instanceof Task)) 3837 return false; 3838 Task o = (Task) other_; 3839 return compareDeep(identifier, o.identifier, true) && compareDeep(definition, o.definition, true) 3840 && compareDeep(basedOn, o.basedOn, true) && compareDeep(groupIdentifier, o.groupIdentifier, true) 3841 && compareDeep(partOf, o.partOf, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) 3842 && compareDeep(businessStatus, o.businessStatus, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) 3843 && compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(focus, o.focus, true) 3844 && compareDeep(for_, o.for_, true) && compareDeep(context, o.context, true) && compareDeep(executionPeriod, o.executionPeriod, true) 3845 && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(lastModified, o.lastModified, true) 3846 && compareDeep(requester, o.requester, true) && compareDeep(performerType, o.performerType, true) 3847 && compareDeep(owner, o.owner, true) && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true) 3848 && compareDeep(relevantHistory, o.relevantHistory, true) && compareDeep(restriction, o.restriction, true) 3849 && compareDeep(input, o.input, true) && compareDeep(output, o.output, true); 3850 } 3851 3852 @Override 3853 public boolean equalsShallow(Base other_) { 3854 if (!super.equalsShallow(other_)) 3855 return false; 3856 if (!(other_ instanceof Task)) 3857 return false; 3858 Task o = (Task) other_; 3859 return compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true) 3860 && compareValues(description, o.description, true) && compareValues(authoredOn, o.authoredOn, true) 3861 && compareValues(lastModified, o.lastModified, true); 3862 } 3863 3864 public boolean isEmpty() { 3865 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, basedOn 3866 , groupIdentifier, partOf, status, statusReason, businessStatus, intent, priority 3867 , code, description, focus, for_, context, executionPeriod, authoredOn, lastModified 3868 , requester, performerType, owner, reason, note, relevantHistory, restriction 3869 , input, output); 3870 } 3871 3872 @Override 3873 public ResourceType getResourceType() { 3874 return ResourceType.Task; 3875 } 3876 3877 /** 3878 * Search parameter: <b>owner</b> 3879 * <p> 3880 * Description: <b>Search by task owner</b><br> 3881 * Type: <b>reference</b><br> 3882 * Path: <b>Task.owner</b><br> 3883 * </p> 3884 */ 3885 @SearchParamDefinition(name="owner", path="Task.owner", description="Search by task owner", type="reference", target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 3886 public static final String SP_OWNER = "owner"; 3887 /** 3888 * <b>Fluent Client</b> search parameter constant for <b>owner</b> 3889 * <p> 3890 * Description: <b>Search by task owner</b><br> 3891 * Type: <b>reference</b><br> 3892 * Path: <b>Task.owner</b><br> 3893 * </p> 3894 */ 3895 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER); 3896 3897/** 3898 * Constant for fluent queries to be used to add include statements. Specifies 3899 * the path value of "<b>Task:owner</b>". 3900 */ 3901 public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner").toLocked(); 3902 3903 /** 3904 * Search parameter: <b>requester</b> 3905 * <p> 3906 * Description: <b>Search by task requester</b><br> 3907 * Type: <b>reference</b><br> 3908 * Path: <b>Task.requester.agent</b><br> 3909 * </p> 3910 */ 3911 @SearchParamDefinition(name="requester", path="Task.requester.agent", description="Search by task requester", type="reference", target={Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 3912 public static final String SP_REQUESTER = "requester"; 3913 /** 3914 * <b>Fluent Client</b> search parameter constant for <b>requester</b> 3915 * <p> 3916 * Description: <b>Search by task requester</b><br> 3917 * Type: <b>reference</b><br> 3918 * Path: <b>Task.requester.agent</b><br> 3919 * </p> 3920 */ 3921 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER); 3922 3923/** 3924 * Constant for fluent queries to be used to add include statements. Specifies 3925 * the path value of "<b>Task:requester</b>". 3926 */ 3927 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("Task:requester").toLocked(); 3928 3929 /** 3930 * Search parameter: <b>identifier</b> 3931 * <p> 3932 * Description: <b>Search for a task instance by its business identifier</b><br> 3933 * Type: <b>token</b><br> 3934 * Path: <b>Task.identifier</b><br> 3935 * </p> 3936 */ 3937 @SearchParamDefinition(name="identifier", path="Task.identifier", description="Search for a task instance by its business identifier", type="token" ) 3938 public static final String SP_IDENTIFIER = "identifier"; 3939 /** 3940 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3941 * <p> 3942 * Description: <b>Search for a task instance by its business identifier</b><br> 3943 * Type: <b>token</b><br> 3944 * Path: <b>Task.identifier</b><br> 3945 * </p> 3946 */ 3947 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3948 3949 /** 3950 * Search parameter: <b>business-status</b> 3951 * <p> 3952 * Description: <b>Search by business status</b><br> 3953 * Type: <b>token</b><br> 3954 * Path: <b>Task.businessStatus</b><br> 3955 * </p> 3956 */ 3957 @SearchParamDefinition(name="business-status", path="Task.businessStatus", description="Search by business status", type="token" ) 3958 public static final String SP_BUSINESS_STATUS = "business-status"; 3959 /** 3960 * <b>Fluent Client</b> search parameter constant for <b>business-status</b> 3961 * <p> 3962 * Description: <b>Search by business status</b><br> 3963 * Type: <b>token</b><br> 3964 * Path: <b>Task.businessStatus</b><br> 3965 * </p> 3966 */ 3967 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BUSINESS_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BUSINESS_STATUS); 3968 3969 /** 3970 * Search parameter: <b>period</b> 3971 * <p> 3972 * Description: <b>Search by period Task is/was underway</b><br> 3973 * Type: <b>date</b><br> 3974 * Path: <b>Task.executionPeriod</b><br> 3975 * </p> 3976 */ 3977 @SearchParamDefinition(name="period", path="Task.executionPeriod", description="Search by period Task is/was underway", type="date" ) 3978 public static final String SP_PERIOD = "period"; 3979 /** 3980 * <b>Fluent Client</b> search parameter constant for <b>period</b> 3981 * <p> 3982 * Description: <b>Search by period Task is/was underway</b><br> 3983 * Type: <b>date</b><br> 3984 * Path: <b>Task.executionPeriod</b><br> 3985 * </p> 3986 */ 3987 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); 3988 3989 /** 3990 * Search parameter: <b>code</b> 3991 * <p> 3992 * Description: <b>Search by task code</b><br> 3993 * Type: <b>token</b><br> 3994 * Path: <b>Task.code</b><br> 3995 * </p> 3996 */ 3997 @SearchParamDefinition(name="code", path="Task.code", description="Search by task code", type="token" ) 3998 public static final String SP_CODE = "code"; 3999 /** 4000 * <b>Fluent Client</b> search parameter constant for <b>code</b> 4001 * <p> 4002 * Description: <b>Search by task code</b><br> 4003 * Type: <b>token</b><br> 4004 * Path: <b>Task.code</b><br> 4005 * </p> 4006 */ 4007 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 4008 4009 /** 4010 * Search parameter: <b>performer</b> 4011 * <p> 4012 * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br> 4013 * Type: <b>token</b><br> 4014 * Path: <b>Task.performerType</b><br> 4015 * </p> 4016 */ 4017 @SearchParamDefinition(name="performer", path="Task.performerType", description="Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type="token" ) 4018 public static final String SP_PERFORMER = "performer"; 4019 /** 4020 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 4021 * <p> 4022 * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br> 4023 * Type: <b>token</b><br> 4024 * Path: <b>Task.performerType</b><br> 4025 * </p> 4026 */ 4027 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER); 4028 4029 /** 4030 * Search parameter: <b>subject</b> 4031 * <p> 4032 * Description: <b>Search by subject</b><br> 4033 * Type: <b>reference</b><br> 4034 * Path: <b>Task.for</b><br> 4035 * </p> 4036 */ 4037 @SearchParamDefinition(name="subject", path="Task.for", description="Search by subject", type="reference" ) 4038 public static final String SP_SUBJECT = "subject"; 4039 /** 4040 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 4041 * <p> 4042 * Description: <b>Search by subject</b><br> 4043 * Type: <b>reference</b><br> 4044 * Path: <b>Task.for</b><br> 4045 * </p> 4046 */ 4047 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 4048 4049/** 4050 * Constant for fluent queries to be used to add include statements. Specifies 4051 * the path value of "<b>Task:subject</b>". 4052 */ 4053 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject").toLocked(); 4054 4055 /** 4056 * Search parameter: <b>focus</b> 4057 * <p> 4058 * Description: <b>Search by task focus</b><br> 4059 * Type: <b>reference</b><br> 4060 * Path: <b>Task.focus</b><br> 4061 * </p> 4062 */ 4063 @SearchParamDefinition(name="focus", path="Task.focus", description="Search by task focus", type="reference" ) 4064 public static final String SP_FOCUS = "focus"; 4065 /** 4066 * <b>Fluent Client</b> search parameter constant for <b>focus</b> 4067 * <p> 4068 * Description: <b>Search by task focus</b><br> 4069 * Type: <b>reference</b><br> 4070 * Path: <b>Task.focus</b><br> 4071 * </p> 4072 */ 4073 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS); 4074 4075/** 4076 * Constant for fluent queries to be used to add include statements. Specifies 4077 * the path value of "<b>Task:focus</b>". 4078 */ 4079 public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Task:focus").toLocked(); 4080 4081 /** 4082 * Search parameter: <b>part-of</b> 4083 * <p> 4084 * Description: <b>Search by task this task is part of</b><br> 4085 * Type: <b>reference</b><br> 4086 * Path: <b>Task.partOf</b><br> 4087 * </p> 4088 */ 4089 @SearchParamDefinition(name="part-of", path="Task.partOf", description="Search by task this task is part of", type="reference", target={Task.class } ) 4090 public static final String SP_PART_OF = "part-of"; 4091 /** 4092 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 4093 * <p> 4094 * Description: <b>Search by task this task is part of</b><br> 4095 * Type: <b>reference</b><br> 4096 * Path: <b>Task.partOf</b><br> 4097 * </p> 4098 */ 4099 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); 4100 4101/** 4102 * Constant for fluent queries to be used to add include statements. Specifies 4103 * the path value of "<b>Task:part-of</b>". 4104 */ 4105 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Task:part-of").toLocked(); 4106 4107 /** 4108 * Search parameter: <b>priority</b> 4109 * <p> 4110 * Description: <b>Search by task priority</b><br> 4111 * Type: <b>token</b><br> 4112 * Path: <b>Task.priority</b><br> 4113 * </p> 4114 */ 4115 @SearchParamDefinition(name="priority", path="Task.priority", description="Search by task priority", type="token" ) 4116 public static final String SP_PRIORITY = "priority"; 4117 /** 4118 * <b>Fluent Client</b> search parameter constant for <b>priority</b> 4119 * <p> 4120 * Description: <b>Search by task priority</b><br> 4121 * Type: <b>token</b><br> 4122 * Path: <b>Task.priority</b><br> 4123 * </p> 4124 */ 4125 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); 4126 4127 /** 4128 * Search parameter: <b>authored-on</b> 4129 * <p> 4130 * Description: <b>Search by creation date</b><br> 4131 * Type: <b>date</b><br> 4132 * Path: <b>Task.authoredOn</b><br> 4133 * </p> 4134 */ 4135 @SearchParamDefinition(name="authored-on", path="Task.authoredOn", description="Search by creation date", type="date" ) 4136 public static final String SP_AUTHORED_ON = "authored-on"; 4137 /** 4138 * <b>Fluent Client</b> search parameter constant for <b>authored-on</b> 4139 * <p> 4140 * Description: <b>Search by creation date</b><br> 4141 * Type: <b>date</b><br> 4142 * Path: <b>Task.authoredOn</b><br> 4143 * </p> 4144 */ 4145 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED_ON = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED_ON); 4146 4147 /** 4148 * Search parameter: <b>intent</b> 4149 * <p> 4150 * Description: <b>Search by task intent</b><br> 4151 * Type: <b>token</b><br> 4152 * Path: <b>Task.intent</b><br> 4153 * </p> 4154 */ 4155 @SearchParamDefinition(name="intent", path="Task.intent", description="Search by task intent", type="token" ) 4156 public static final String SP_INTENT = "intent"; 4157 /** 4158 * <b>Fluent Client</b> search parameter constant for <b>intent</b> 4159 * <p> 4160 * Description: <b>Search by task intent</b><br> 4161 * Type: <b>token</b><br> 4162 * Path: <b>Task.intent</b><br> 4163 * </p> 4164 */ 4165 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT); 4166 4167 /** 4168 * Search parameter: <b>group-identifier</b> 4169 * <p> 4170 * Description: <b>Search by group identifier</b><br> 4171 * Type: <b>token</b><br> 4172 * Path: <b>Task.groupIdentifier</b><br> 4173 * </p> 4174 */ 4175 @SearchParamDefinition(name="group-identifier", path="Task.groupIdentifier", description="Search by group identifier", type="token" ) 4176 public static final String SP_GROUP_IDENTIFIER = "group-identifier"; 4177 /** 4178 * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b> 4179 * <p> 4180 * Description: <b>Search by group identifier</b><br> 4181 * Type: <b>token</b><br> 4182 * Path: <b>Task.groupIdentifier</b><br> 4183 * </p> 4184 */ 4185 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER); 4186 4187 /** 4188 * Search parameter: <b>based-on</b> 4189 * <p> 4190 * Description: <b>Search by requests this task is based on</b><br> 4191 * Type: <b>reference</b><br> 4192 * Path: <b>Task.basedOn</b><br> 4193 * </p> 4194 */ 4195 @SearchParamDefinition(name="based-on", path="Task.basedOn", description="Search by requests this task is based on", type="reference" ) 4196 public static final String SP_BASED_ON = "based-on"; 4197 /** 4198 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 4199 * <p> 4200 * Description: <b>Search by requests this task is based on</b><br> 4201 * Type: <b>reference</b><br> 4202 * Path: <b>Task.basedOn</b><br> 4203 * </p> 4204 */ 4205 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 4206 4207/** 4208 * Constant for fluent queries to be used to add include statements. Specifies 4209 * the path value of "<b>Task:based-on</b>". 4210 */ 4211 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Task:based-on").toLocked(); 4212 4213 /** 4214 * Search parameter: <b>patient</b> 4215 * <p> 4216 * Description: <b>Search by patient</b><br> 4217 * Type: <b>reference</b><br> 4218 * Path: <b>Task.for</b><br> 4219 * </p> 4220 */ 4221 @SearchParamDefinition(name="patient", path="Task.for", description="Search by patient", type="reference", target={Patient.class } ) 4222 public static final String SP_PATIENT = "patient"; 4223 /** 4224 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4225 * <p> 4226 * Description: <b>Search by patient</b><br> 4227 * Type: <b>reference</b><br> 4228 * Path: <b>Task.for</b><br> 4229 * </p> 4230 */ 4231 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4232 4233/** 4234 * Constant for fluent queries to be used to add include statements. Specifies 4235 * the path value of "<b>Task:patient</b>". 4236 */ 4237 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Task:patient").toLocked(); 4238 4239 /** 4240 * Search parameter: <b>organization</b> 4241 * <p> 4242 * Description: <b>Search by responsible organization</b><br> 4243 * Type: <b>reference</b><br> 4244 * Path: <b>Task.requester.onBehalfOf</b><br> 4245 * </p> 4246 */ 4247 @SearchParamDefinition(name="organization", path="Task.requester.onBehalfOf", description="Search by responsible organization", type="reference", target={Organization.class } ) 4248 public static final String SP_ORGANIZATION = "organization"; 4249 /** 4250 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 4251 * <p> 4252 * Description: <b>Search by responsible organization</b><br> 4253 * Type: <b>reference</b><br> 4254 * Path: <b>Task.requester.onBehalfOf</b><br> 4255 * </p> 4256 */ 4257 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 4258 4259/** 4260 * Constant for fluent queries to be used to add include statements. Specifies 4261 * the path value of "<b>Task:organization</b>". 4262 */ 4263 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Task:organization").toLocked(); 4264 4265 /** 4266 * Search parameter: <b>context</b> 4267 * <p> 4268 * Description: <b>Search by encounter or episode</b><br> 4269 * Type: <b>reference</b><br> 4270 * Path: <b>Task.context</b><br> 4271 * </p> 4272 */ 4273 @SearchParamDefinition(name="context", path="Task.context", description="Search by encounter or episode", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 4274 public static final String SP_CONTEXT = "context"; 4275 /** 4276 * <b>Fluent Client</b> search parameter constant for <b>context</b> 4277 * <p> 4278 * Description: <b>Search by encounter or episode</b><br> 4279 * Type: <b>reference</b><br> 4280 * Path: <b>Task.context</b><br> 4281 * </p> 4282 */ 4283 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 4284 4285/** 4286 * Constant for fluent queries to be used to add include statements. Specifies 4287 * the path value of "<b>Task:context</b>". 4288 */ 4289 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("Task:context").toLocked(); 4290 4291 /** 4292 * Search parameter: <b>modified</b> 4293 * <p> 4294 * Description: <b>Search by last modification date</b><br> 4295 * Type: <b>date</b><br> 4296 * Path: <b>Task.lastModified</b><br> 4297 * </p> 4298 */ 4299 @SearchParamDefinition(name="modified", path="Task.lastModified", description="Search by last modification date", type="date" ) 4300 public static final String SP_MODIFIED = "modified"; 4301 /** 4302 * <b>Fluent Client</b> search parameter constant for <b>modified</b> 4303 * <p> 4304 * Description: <b>Search by last modification date</b><br> 4305 * Type: <b>date</b><br> 4306 * Path: <b>Task.lastModified</b><br> 4307 * </p> 4308 */ 4309 public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_MODIFIED); 4310 4311 /** 4312 * Search parameter: <b>status</b> 4313 * <p> 4314 * Description: <b>Search by task status</b><br> 4315 * Type: <b>token</b><br> 4316 * Path: <b>Task.status</b><br> 4317 * </p> 4318 */ 4319 @SearchParamDefinition(name="status", path="Task.status", description="Search by task status", type="token" ) 4320 public static final String SP_STATUS = "status"; 4321 /** 4322 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4323 * <p> 4324 * Description: <b>Search by task status</b><br> 4325 * Type: <b>token</b><br> 4326 * Path: <b>Task.status</b><br> 4327 * </p> 4328 */ 4329 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4330 4331 4332} 4333