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