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