
001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 046 047/** 048 * Describes the intention of how one or more practitioners intend to deliver 049 * care for a particular patient, group or community for a period of time, 050 * possibly limited to care for a specific condition or set of conditions. 051 */ 052@ResourceDef(name = "CarePlan", profile = "http://hl7.org/fhir/StructureDefinition/CarePlan") 053public class CarePlan extends DomainResource { 054 055 public enum CarePlanStatus { 056 /** 057 * The request has been created but is not yet complete or ready for action. 058 */ 059 DRAFT, 060 /** 061 * The request is in force and ready to be acted upon. 062 */ 063 ACTIVE, 064 /** 065 * The request (and any implicit authorization to act) has been temporarily 066 * withdrawn but is expected to resume in the future. 067 */ 068 ONHOLD, 069 /** 070 * The request (and any implicit authorization to act) has been terminated prior 071 * to the known full completion of the intended actions. No further activity 072 * should occur. 073 */ 074 REVOKED, 075 /** 076 * The activity described by the request has been fully performed. No further 077 * activity will occur. 078 */ 079 COMPLETED, 080 /** 081 * This request should never have existed and should be considered 'void'. (It 082 * is possible that real-world decisions were based on it. If real-world 083 * activity has occurred, the status should be "revoked" rather than 084 * "entered-in-error".). 085 */ 086 ENTEREDINERROR, 087 /** 088 * The authoring/source system does not know which of the status values 089 * currently applies for this request. Note: This concept is not to be used for 090 * "other" - one of the listed statuses is presumed to apply, but the 091 * authoring/source system does not know which. 092 */ 093 UNKNOWN, 094 /** 095 * added to help the parsers with the generic types 096 */ 097 NULL; 098 099 public static CarePlanStatus fromCode(String codeString) throws FHIRException { 100 if (codeString == null || "".equals(codeString)) 101 return null; 102 if ("draft".equals(codeString)) 103 return DRAFT; 104 if ("active".equals(codeString)) 105 return ACTIVE; 106 if ("on-hold".equals(codeString)) 107 return ONHOLD; 108 if ("revoked".equals(codeString)) 109 return REVOKED; 110 if ("completed".equals(codeString)) 111 return COMPLETED; 112 if ("entered-in-error".equals(codeString)) 113 return ENTEREDINERROR; 114 if ("unknown".equals(codeString)) 115 return UNKNOWN; 116 if (Configuration.isAcceptInvalidEnums()) 117 return null; 118 else 119 throw new FHIRException("Unknown CarePlanStatus code '" + codeString + "'"); 120 } 121 122 public String toCode() { 123 switch (this) { 124 case DRAFT: 125 return "draft"; 126 case ACTIVE: 127 return "active"; 128 case ONHOLD: 129 return "on-hold"; 130 case REVOKED: 131 return "revoked"; 132 case COMPLETED: 133 return "completed"; 134 case ENTEREDINERROR: 135 return "entered-in-error"; 136 case UNKNOWN: 137 return "unknown"; 138 case NULL: 139 return null; 140 default: 141 return "?"; 142 } 143 } 144 145 public String getSystem() { 146 switch (this) { 147 case DRAFT: 148 return "http://hl7.org/fhir/request-status"; 149 case ACTIVE: 150 return "http://hl7.org/fhir/request-status"; 151 case ONHOLD: 152 return "http://hl7.org/fhir/request-status"; 153 case REVOKED: 154 return "http://hl7.org/fhir/request-status"; 155 case COMPLETED: 156 return "http://hl7.org/fhir/request-status"; 157 case ENTEREDINERROR: 158 return "http://hl7.org/fhir/request-status"; 159 case UNKNOWN: 160 return "http://hl7.org/fhir/request-status"; 161 case NULL: 162 return null; 163 default: 164 return "?"; 165 } 166 } 167 168 public String getDefinition() { 169 switch (this) { 170 case DRAFT: 171 return "The request has been created but is not yet complete or ready for action."; 172 case ACTIVE: 173 return "The request is in force and ready to be acted upon."; 174 case ONHOLD: 175 return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future."; 176 case REVOKED: 177 return "The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur."; 178 case COMPLETED: 179 return "The activity described by the request has been fully performed. No further activity will occur."; 180 case ENTEREDINERROR: 181 return "This request should never have existed and should be considered 'void'. (It is possible that real-world decisions were based on it. If real-world activity has occurred, the status should be \"revoked\" rather than \"entered-in-error\".)."; 182 case UNKNOWN: 183 return "The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; 184 case NULL: 185 return null; 186 default: 187 return "?"; 188 } 189 } 190 191 public String getDisplay() { 192 switch (this) { 193 case DRAFT: 194 return "Draft"; 195 case ACTIVE: 196 return "Active"; 197 case ONHOLD: 198 return "On Hold"; 199 case REVOKED: 200 return "Revoked"; 201 case COMPLETED: 202 return "Completed"; 203 case ENTEREDINERROR: 204 return "Entered in Error"; 205 case UNKNOWN: 206 return "Unknown"; 207 case NULL: 208 return null; 209 default: 210 return "?"; 211 } 212 } 213 } 214 215 public static class CarePlanStatusEnumFactory implements EnumFactory<CarePlanStatus> { 216 public CarePlanStatus fromCode(String codeString) throws IllegalArgumentException { 217 if (codeString == null || "".equals(codeString)) 218 if (codeString == null || "".equals(codeString)) 219 return null; 220 if ("draft".equals(codeString)) 221 return CarePlanStatus.DRAFT; 222 if ("active".equals(codeString)) 223 return CarePlanStatus.ACTIVE; 224 if ("on-hold".equals(codeString)) 225 return CarePlanStatus.ONHOLD; 226 if ("revoked".equals(codeString)) 227 return CarePlanStatus.REVOKED; 228 if ("completed".equals(codeString)) 229 return CarePlanStatus.COMPLETED; 230 if ("entered-in-error".equals(codeString)) 231 return CarePlanStatus.ENTEREDINERROR; 232 if ("unknown".equals(codeString)) 233 return CarePlanStatus.UNKNOWN; 234 throw new IllegalArgumentException("Unknown CarePlanStatus code '" + codeString + "'"); 235 } 236 237 public Enumeration<CarePlanStatus> fromType(PrimitiveType<?> code) throws FHIRException { 238 if (code == null) 239 return null; 240 if (code.isEmpty()) 241 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.NULL, code); 242 String codeString = code.asStringValue(); 243 if (codeString == null || "".equals(codeString)) 244 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.NULL, code); 245 if ("draft".equals(codeString)) 246 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.DRAFT, code); 247 if ("active".equals(codeString)) 248 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.ACTIVE, code); 249 if ("on-hold".equals(codeString)) 250 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.ONHOLD, code); 251 if ("revoked".equals(codeString)) 252 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.REVOKED, code); 253 if ("completed".equals(codeString)) 254 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.COMPLETED, code); 255 if ("entered-in-error".equals(codeString)) 256 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.ENTEREDINERROR, code); 257 if ("unknown".equals(codeString)) 258 return new Enumeration<CarePlanStatus>(this, CarePlanStatus.UNKNOWN, code); 259 throw new FHIRException("Unknown CarePlanStatus code '" + codeString + "'"); 260 } 261 262 public String toCode(CarePlanStatus code) { 263 if (code == CarePlanStatus.NULL) 264 return null; 265 if (code == CarePlanStatus.DRAFT) 266 return "draft"; 267 if (code == CarePlanStatus.ACTIVE) 268 return "active"; 269 if (code == CarePlanStatus.ONHOLD) 270 return "on-hold"; 271 if (code == CarePlanStatus.REVOKED) 272 return "revoked"; 273 if (code == CarePlanStatus.COMPLETED) 274 return "completed"; 275 if (code == CarePlanStatus.ENTEREDINERROR) 276 return "entered-in-error"; 277 if (code == CarePlanStatus.UNKNOWN) 278 return "unknown"; 279 return "?"; 280 } 281 282 public String toSystem(CarePlanStatus code) { 283 return code.getSystem(); 284 } 285 } 286 287 public enum CarePlanIntent { 288 /** 289 * null 290 */ 291 PROPOSAL, 292 /** 293 * null 294 */ 295 PLAN, 296 /** 297 * null 298 */ 299 ORDER, 300 /** 301 * null 302 */ 303 OPTION, 304 /** 305 * added to help the parsers with the generic types 306 */ 307 NULL; 308 309 public static CarePlanIntent fromCode(String codeString) throws FHIRException { 310 if (codeString == null || "".equals(codeString)) 311 return null; 312 if ("proposal".equals(codeString)) 313 return PROPOSAL; 314 if ("plan".equals(codeString)) 315 return PLAN; 316 if ("order".equals(codeString)) 317 return ORDER; 318 if ("option".equals(codeString)) 319 return OPTION; 320 if (Configuration.isAcceptInvalidEnums()) 321 return null; 322 else 323 throw new FHIRException("Unknown CarePlanIntent code '" + codeString + "'"); 324 } 325 326 public String toCode() { 327 switch (this) { 328 case PROPOSAL: 329 return "proposal"; 330 case PLAN: 331 return "plan"; 332 case ORDER: 333 return "order"; 334 case OPTION: 335 return "option"; 336 case NULL: 337 return null; 338 default: 339 return "?"; 340 } 341 } 342 343 public String getSystem() { 344 switch (this) { 345 case PROPOSAL: 346 return "http://hl7.org/fhir/request-intent"; 347 case PLAN: 348 return "http://hl7.org/fhir/request-intent"; 349 case ORDER: 350 return "http://hl7.org/fhir/request-intent"; 351 case OPTION: 352 return "http://hl7.org/fhir/request-intent"; 353 case NULL: 354 return null; 355 default: 356 return "?"; 357 } 358 } 359 360 public String getDefinition() { 361 switch (this) { 362 case PROPOSAL: 363 return ""; 364 case PLAN: 365 return ""; 366 case ORDER: 367 return ""; 368 case OPTION: 369 return ""; 370 case NULL: 371 return null; 372 default: 373 return "?"; 374 } 375 } 376 377 public String getDisplay() { 378 switch (this) { 379 case PROPOSAL: 380 return "proposal"; 381 case PLAN: 382 return "plan"; 383 case ORDER: 384 return "order"; 385 case OPTION: 386 return "option"; 387 case NULL: 388 return null; 389 default: 390 return "?"; 391 } 392 } 393 } 394 395 public static class CarePlanIntentEnumFactory implements EnumFactory<CarePlanIntent> { 396 public CarePlanIntent fromCode(String codeString) throws IllegalArgumentException { 397 if (codeString == null || "".equals(codeString)) 398 if (codeString == null || "".equals(codeString)) 399 return null; 400 if ("proposal".equals(codeString)) 401 return CarePlanIntent.PROPOSAL; 402 if ("plan".equals(codeString)) 403 return CarePlanIntent.PLAN; 404 if ("order".equals(codeString)) 405 return CarePlanIntent.ORDER; 406 if ("option".equals(codeString)) 407 return CarePlanIntent.OPTION; 408 throw new IllegalArgumentException("Unknown CarePlanIntent code '" + codeString + "'"); 409 } 410 411 public Enumeration<CarePlanIntent> fromType(PrimitiveType<?> code) throws FHIRException { 412 if (code == null) 413 return null; 414 if (code.isEmpty()) 415 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code); 416 String codeString = code.asStringValue(); 417 if (codeString == null || "".equals(codeString)) 418 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code); 419 if ("proposal".equals(codeString)) 420 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PROPOSAL, code); 421 if ("plan".equals(codeString)) 422 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PLAN, code); 423 if ("order".equals(codeString)) 424 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.ORDER, code); 425 if ("option".equals(codeString)) 426 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.OPTION, code); 427 throw new FHIRException("Unknown CarePlanIntent code '" + codeString + "'"); 428 } 429 430 public String toCode(CarePlanIntent code) { 431 if (code == CarePlanIntent.NULL) 432 return null; 433 if (code == CarePlanIntent.PROPOSAL) 434 return "proposal"; 435 if (code == CarePlanIntent.PLAN) 436 return "plan"; 437 if (code == CarePlanIntent.ORDER) 438 return "order"; 439 if (code == CarePlanIntent.OPTION) 440 return "option"; 441 return "?"; 442 } 443 444 public String toSystem(CarePlanIntent code) { 445 return code.getSystem(); 446 } 447 } 448 449 public enum CarePlanActivityKind { 450 /** 451 * null 452 */ 453 APPOINTMENT, 454 /** 455 * null 456 */ 457 COMMUNICATIONREQUEST, 458 /** 459 * null 460 */ 461 DEVICEREQUEST, 462 /** 463 * null 464 */ 465 MEDICATIONREQUEST, 466 /** 467 * null 468 */ 469 NUTRITIONORDER, 470 /** 471 * null 472 */ 473 TASK, 474 /** 475 * null 476 */ 477 SERVICEREQUEST, 478 /** 479 * null 480 */ 481 VISIONPRESCRIPTION, 482 /** 483 * added to help the parsers with the generic types 484 */ 485 NULL; 486 487 public static CarePlanActivityKind fromCode(String codeString) throws FHIRException { 488 if (codeString == null || "".equals(codeString)) 489 return null; 490 if ("Appointment".equals(codeString)) 491 return APPOINTMENT; 492 if ("CommunicationRequest".equals(codeString)) 493 return COMMUNICATIONREQUEST; 494 if ("DeviceRequest".equals(codeString)) 495 return DEVICEREQUEST; 496 if ("MedicationRequest".equals(codeString)) 497 return MEDICATIONREQUEST; 498 if ("NutritionOrder".equals(codeString)) 499 return NUTRITIONORDER; 500 if ("Task".equals(codeString)) 501 return TASK; 502 if ("ServiceRequest".equals(codeString)) 503 return SERVICEREQUEST; 504 if ("VisionPrescription".equals(codeString)) 505 return VISIONPRESCRIPTION; 506 if (Configuration.isAcceptInvalidEnums()) 507 return null; 508 else 509 throw new FHIRException("Unknown CarePlanActivityKind code '" + codeString + "'"); 510 } 511 512 public String toCode() { 513 switch (this) { 514 case APPOINTMENT: 515 return "Appointment"; 516 case COMMUNICATIONREQUEST: 517 return "CommunicationRequest"; 518 case DEVICEREQUEST: 519 return "DeviceRequest"; 520 case MEDICATIONREQUEST: 521 return "MedicationRequest"; 522 case NUTRITIONORDER: 523 return "NutritionOrder"; 524 case TASK: 525 return "Task"; 526 case SERVICEREQUEST: 527 return "ServiceRequest"; 528 case VISIONPRESCRIPTION: 529 return "VisionPrescription"; 530 case NULL: 531 return null; 532 default: 533 return "?"; 534 } 535 } 536 537 public String getSystem() { 538 switch (this) { 539 case APPOINTMENT: 540 return "http://hl7.org/fhir/resource-types"; 541 case COMMUNICATIONREQUEST: 542 return "http://hl7.org/fhir/resource-types"; 543 case DEVICEREQUEST: 544 return "http://hl7.org/fhir/resource-types"; 545 case MEDICATIONREQUEST: 546 return "http://hl7.org/fhir/resource-types"; 547 case NUTRITIONORDER: 548 return "http://hl7.org/fhir/resource-types"; 549 case TASK: 550 return "http://hl7.org/fhir/resource-types"; 551 case SERVICEREQUEST: 552 return "http://hl7.org/fhir/resource-types"; 553 case VISIONPRESCRIPTION: 554 return "http://hl7.org/fhir/resource-types"; 555 case NULL: 556 return null; 557 default: 558 return "?"; 559 } 560 } 561 562 public String getDefinition() { 563 switch (this) { 564 case APPOINTMENT: 565 return ""; 566 case COMMUNICATIONREQUEST: 567 return ""; 568 case DEVICEREQUEST: 569 return ""; 570 case MEDICATIONREQUEST: 571 return ""; 572 case NUTRITIONORDER: 573 return ""; 574 case TASK: 575 return ""; 576 case SERVICEREQUEST: 577 return ""; 578 case VISIONPRESCRIPTION: 579 return ""; 580 case NULL: 581 return null; 582 default: 583 return "?"; 584 } 585 } 586 587 public String getDisplay() { 588 switch (this) { 589 case APPOINTMENT: 590 return "Appointment"; 591 case COMMUNICATIONREQUEST: 592 return "CommunicationRequest"; 593 case DEVICEREQUEST: 594 return "DeviceRequest"; 595 case MEDICATIONREQUEST: 596 return "MedicationRequest"; 597 case NUTRITIONORDER: 598 return "NutritionOrder"; 599 case TASK: 600 return "Task"; 601 case SERVICEREQUEST: 602 return "ServiceRequest"; 603 case VISIONPRESCRIPTION: 604 return "VisionPrescription"; 605 case NULL: 606 return null; 607 default: 608 return "?"; 609 } 610 } 611 } 612 613 public static class CarePlanActivityKindEnumFactory implements EnumFactory<CarePlanActivityKind> { 614 public CarePlanActivityKind fromCode(String codeString) throws IllegalArgumentException { 615 if (codeString == null || "".equals(codeString)) 616 if (codeString == null || "".equals(codeString)) 617 return null; 618 if ("Appointment".equals(codeString)) 619 return CarePlanActivityKind.APPOINTMENT; 620 if ("CommunicationRequest".equals(codeString)) 621 return CarePlanActivityKind.COMMUNICATIONREQUEST; 622 if ("DeviceRequest".equals(codeString)) 623 return CarePlanActivityKind.DEVICEREQUEST; 624 if ("MedicationRequest".equals(codeString)) 625 return CarePlanActivityKind.MEDICATIONREQUEST; 626 if ("NutritionOrder".equals(codeString)) 627 return CarePlanActivityKind.NUTRITIONORDER; 628 if ("Task".equals(codeString)) 629 return CarePlanActivityKind.TASK; 630 if ("ServiceRequest".equals(codeString)) 631 return CarePlanActivityKind.SERVICEREQUEST; 632 if ("VisionPrescription".equals(codeString)) 633 return CarePlanActivityKind.VISIONPRESCRIPTION; 634 throw new IllegalArgumentException("Unknown CarePlanActivityKind code '" + codeString + "'"); 635 } 636 637 public Enumeration<CarePlanActivityKind> fromType(PrimitiveType<?> code) throws FHIRException { 638 if (code == null) 639 return null; 640 if (code.isEmpty()) 641 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NULL, code); 642 String codeString = code.asStringValue(); 643 if (codeString == null || "".equals(codeString)) 644 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NULL, code); 645 if ("Appointment".equals(codeString)) 646 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.APPOINTMENT, code); 647 if ("CommunicationRequest".equals(codeString)) 648 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.COMMUNICATIONREQUEST, code); 649 if ("DeviceRequest".equals(codeString)) 650 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.DEVICEREQUEST, code); 651 if ("MedicationRequest".equals(codeString)) 652 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.MEDICATIONREQUEST, code); 653 if ("NutritionOrder".equals(codeString)) 654 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NUTRITIONORDER, code); 655 if ("Task".equals(codeString)) 656 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.TASK, code); 657 if ("ServiceRequest".equals(codeString)) 658 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.SERVICEREQUEST, code); 659 if ("VisionPrescription".equals(codeString)) 660 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.VISIONPRESCRIPTION, code); 661 throw new FHIRException("Unknown CarePlanActivityKind code '" + codeString + "'"); 662 } 663 664 public String toCode(CarePlanActivityKind code) { 665 if (code == CarePlanActivityKind.NULL) 666 return null; 667 if (code == CarePlanActivityKind.APPOINTMENT) 668 return "Appointment"; 669 if (code == CarePlanActivityKind.COMMUNICATIONREQUEST) 670 return "CommunicationRequest"; 671 if (code == CarePlanActivityKind.DEVICEREQUEST) 672 return "DeviceRequest"; 673 if (code == CarePlanActivityKind.MEDICATIONREQUEST) 674 return "MedicationRequest"; 675 if (code == CarePlanActivityKind.NUTRITIONORDER) 676 return "NutritionOrder"; 677 if (code == CarePlanActivityKind.TASK) 678 return "Task"; 679 if (code == CarePlanActivityKind.SERVICEREQUEST) 680 return "ServiceRequest"; 681 if (code == CarePlanActivityKind.VISIONPRESCRIPTION) 682 return "VisionPrescription"; 683 return "?"; 684 } 685 686 public String toSystem(CarePlanActivityKind code) { 687 return code.getSystem(); 688 } 689 } 690 691 public enum CarePlanActivityStatus { 692 /** 693 * Care plan activity is planned but no action has yet been taken. 694 */ 695 NOTSTARTED, 696 /** 697 * Appointment or other booking has occurred but activity has not yet begun. 698 */ 699 SCHEDULED, 700 /** 701 * Care plan activity has been started but is not yet complete. 702 */ 703 INPROGRESS, 704 /** 705 * Care plan activity was started but has temporarily ceased with an expectation 706 * of resumption at a future time. 707 */ 708 ONHOLD, 709 /** 710 * Care plan activity has been completed (more or less) as planned. 711 */ 712 COMPLETED, 713 /** 714 * The planned care plan activity has been withdrawn. 715 */ 716 CANCELLED, 717 /** 718 * The planned care plan activity has been ended prior to completion after the 719 * activity was started. 720 */ 721 STOPPED, 722 /** 723 * The current state of the care plan activity is not known. Note: This concept 724 * is not to be used for "other" - one of the listed statuses is presumed to 725 * apply, but the authoring/source system does not know which one. 726 */ 727 UNKNOWN, 728 /** 729 * Care plan activity was entered in error and voided. 730 */ 731 ENTEREDINERROR, 732 /** 733 * added to help the parsers with the generic types 734 */ 735 NULL; 736 737 public static CarePlanActivityStatus fromCode(String codeString) throws FHIRException { 738 if (codeString == null || "".equals(codeString)) 739 return null; 740 if ("not-started".equals(codeString)) 741 return NOTSTARTED; 742 if ("scheduled".equals(codeString)) 743 return SCHEDULED; 744 if ("in-progress".equals(codeString)) 745 return INPROGRESS; 746 if ("on-hold".equals(codeString)) 747 return ONHOLD; 748 if ("completed".equals(codeString)) 749 return COMPLETED; 750 if ("cancelled".equals(codeString)) 751 return CANCELLED; 752 if ("stopped".equals(codeString)) 753 return STOPPED; 754 if ("unknown".equals(codeString)) 755 return UNKNOWN; 756 if ("entered-in-error".equals(codeString)) 757 return ENTEREDINERROR; 758 if (Configuration.isAcceptInvalidEnums()) 759 return null; 760 else 761 throw new FHIRException("Unknown CarePlanActivityStatus code '" + codeString + "'"); 762 } 763 764 public String toCode() { 765 switch (this) { 766 case NOTSTARTED: 767 return "not-started"; 768 case SCHEDULED: 769 return "scheduled"; 770 case INPROGRESS: 771 return "in-progress"; 772 case ONHOLD: 773 return "on-hold"; 774 case COMPLETED: 775 return "completed"; 776 case CANCELLED: 777 return "cancelled"; 778 case STOPPED: 779 return "stopped"; 780 case UNKNOWN: 781 return "unknown"; 782 case ENTEREDINERROR: 783 return "entered-in-error"; 784 case NULL: 785 return null; 786 default: 787 return "?"; 788 } 789 } 790 791 public String getSystem() { 792 switch (this) { 793 case NOTSTARTED: 794 return "http://hl7.org/fhir/care-plan-activity-status"; 795 case SCHEDULED: 796 return "http://hl7.org/fhir/care-plan-activity-status"; 797 case INPROGRESS: 798 return "http://hl7.org/fhir/care-plan-activity-status"; 799 case ONHOLD: 800 return "http://hl7.org/fhir/care-plan-activity-status"; 801 case COMPLETED: 802 return "http://hl7.org/fhir/care-plan-activity-status"; 803 case CANCELLED: 804 return "http://hl7.org/fhir/care-plan-activity-status"; 805 case STOPPED: 806 return "http://hl7.org/fhir/care-plan-activity-status"; 807 case UNKNOWN: 808 return "http://hl7.org/fhir/care-plan-activity-status"; 809 case ENTEREDINERROR: 810 return "http://hl7.org/fhir/care-plan-activity-status"; 811 case NULL: 812 return null; 813 default: 814 return "?"; 815 } 816 } 817 818 public String getDefinition() { 819 switch (this) { 820 case NOTSTARTED: 821 return "Care plan activity is planned but no action has yet been taken."; 822 case SCHEDULED: 823 return "Appointment or other booking has occurred but activity has not yet begun."; 824 case INPROGRESS: 825 return "Care plan activity has been started but is not yet complete."; 826 case ONHOLD: 827 return "Care plan activity was started but has temporarily ceased with an expectation of resumption at a future time."; 828 case COMPLETED: 829 return "Care plan activity has been completed (more or less) as planned."; 830 case CANCELLED: 831 return "The planned care plan activity has been withdrawn."; 832 case STOPPED: 833 return "The planned care plan activity has been ended prior to completion after the activity was started."; 834 case UNKNOWN: 835 return "The current state of the care plan activity is not known. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which one."; 836 case ENTEREDINERROR: 837 return "Care plan activity was entered in error and voided."; 838 case NULL: 839 return null; 840 default: 841 return "?"; 842 } 843 } 844 845 public String getDisplay() { 846 switch (this) { 847 case NOTSTARTED: 848 return "Not Started"; 849 case SCHEDULED: 850 return "Scheduled"; 851 case INPROGRESS: 852 return "In Progress"; 853 case ONHOLD: 854 return "On Hold"; 855 case COMPLETED: 856 return "Completed"; 857 case CANCELLED: 858 return "Cancelled"; 859 case STOPPED: 860 return "Stopped"; 861 case UNKNOWN: 862 return "Unknown"; 863 case ENTEREDINERROR: 864 return "Entered in Error"; 865 case NULL: 866 return null; 867 default: 868 return "?"; 869 } 870 } 871 } 872 873 public static class CarePlanActivityStatusEnumFactory implements EnumFactory<CarePlanActivityStatus> { 874 public CarePlanActivityStatus fromCode(String codeString) throws IllegalArgumentException { 875 if (codeString == null || "".equals(codeString)) 876 if (codeString == null || "".equals(codeString)) 877 return null; 878 if ("not-started".equals(codeString)) 879 return CarePlanActivityStatus.NOTSTARTED; 880 if ("scheduled".equals(codeString)) 881 return CarePlanActivityStatus.SCHEDULED; 882 if ("in-progress".equals(codeString)) 883 return CarePlanActivityStatus.INPROGRESS; 884 if ("on-hold".equals(codeString)) 885 return CarePlanActivityStatus.ONHOLD; 886 if ("completed".equals(codeString)) 887 return CarePlanActivityStatus.COMPLETED; 888 if ("cancelled".equals(codeString)) 889 return CarePlanActivityStatus.CANCELLED; 890 if ("stopped".equals(codeString)) 891 return CarePlanActivityStatus.STOPPED; 892 if ("unknown".equals(codeString)) 893 return CarePlanActivityStatus.UNKNOWN; 894 if ("entered-in-error".equals(codeString)) 895 return CarePlanActivityStatus.ENTEREDINERROR; 896 throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '" + codeString + "'"); 897 } 898 899 public Enumeration<CarePlanActivityStatus> fromType(PrimitiveType<?> code) throws FHIRException { 900 if (code == null) 901 return null; 902 if (code.isEmpty()) 903 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NULL, code); 904 String codeString = code.asStringValue(); 905 if (codeString == null || "".equals(codeString)) 906 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NULL, code); 907 if ("not-started".equals(codeString)) 908 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NOTSTARTED, code); 909 if ("scheduled".equals(codeString)) 910 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.SCHEDULED, code); 911 if ("in-progress".equals(codeString)) 912 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.INPROGRESS, code); 913 if ("on-hold".equals(codeString)) 914 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.ONHOLD, code); 915 if ("completed".equals(codeString)) 916 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.COMPLETED, code); 917 if ("cancelled".equals(codeString)) 918 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.CANCELLED, code); 919 if ("stopped".equals(codeString)) 920 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.STOPPED, code); 921 if ("unknown".equals(codeString)) 922 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.UNKNOWN, code); 923 if ("entered-in-error".equals(codeString)) 924 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.ENTEREDINERROR, code); 925 throw new FHIRException("Unknown CarePlanActivityStatus code '" + codeString + "'"); 926 } 927 928 public String toCode(CarePlanActivityStatus code) { 929 if (code == CarePlanActivityStatus.NULL) 930 return null; 931 if (code == CarePlanActivityStatus.NOTSTARTED) 932 return "not-started"; 933 if (code == CarePlanActivityStatus.SCHEDULED) 934 return "scheduled"; 935 if (code == CarePlanActivityStatus.INPROGRESS) 936 return "in-progress"; 937 if (code == CarePlanActivityStatus.ONHOLD) 938 return "on-hold"; 939 if (code == CarePlanActivityStatus.COMPLETED) 940 return "completed"; 941 if (code == CarePlanActivityStatus.CANCELLED) 942 return "cancelled"; 943 if (code == CarePlanActivityStatus.STOPPED) 944 return "stopped"; 945 if (code == CarePlanActivityStatus.UNKNOWN) 946 return "unknown"; 947 if (code == CarePlanActivityStatus.ENTEREDINERROR) 948 return "entered-in-error"; 949 return "?"; 950 } 951 952 public String toSystem(CarePlanActivityStatus code) { 953 return code.getSystem(); 954 } 955 } 956 957 @Block() 958 public static class CarePlanActivityComponent extends BackboneElement implements IBaseBackboneElement { 959 /** 960 * Identifies the outcome at the point when the status of the activity is 961 * assessed. For example, the outcome of an education activity could be patient 962 * understands (or not). 963 */ 964 @Child(name = "outcomeCodeableConcept", type = { 965 CodeableConcept.class }, order = 1, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 966 @Description(shortDefinition = "Results of the activity", formalDefinition = "Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).") 967 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/care-plan-activity-outcome") 968 protected List<CodeableConcept> outcomeCodeableConcept; 969 970 /** 971 * Details of the outcome or action resulting from the activity. The reference 972 * to an "event" resource, such as Procedure or Encounter or Observation, is the 973 * result/outcome of the activity itself. The activity can be conveyed using 974 * CarePlan.activity.detail OR using the CarePlan.activity.reference (a 975 * reference to a ?request? resource). 976 */ 977 @Child(name = "outcomeReference", type = { 978 Reference.class }, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 979 @Description(shortDefinition = "Appointment, Encounter, Procedure, etc.", formalDefinition = "Details of the outcome or action resulting from the activity. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a ?request? resource).") 980 protected List<Reference> outcomeReference; 981 /** 982 * The actual objects that are the target of the reference (Details of the 983 * outcome or action resulting from the activity. The reference to an "event" 984 * resource, such as Procedure or Encounter or Observation, is the 985 * result/outcome of the activity itself. The activity can be conveyed using 986 * CarePlan.activity.detail OR using the CarePlan.activity.reference (a 987 * reference to a ?request? resource).) 988 */ 989 protected List<Resource> outcomeReferenceTarget; 990 991 /** 992 * Notes about the adherence/status/progress of the activity. 993 */ 994 @Child(name = "progress", type = { 995 Annotation.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 996 @Description(shortDefinition = "Comments about the activity status/progress", formalDefinition = "Notes about the adherence/status/progress of the activity.") 997 protected List<Annotation> progress; 998 999 /** 1000 * The details of the proposed activity represented in a specific resource. 1001 */ 1002 @Child(name = "reference", type = { Appointment.class, CommunicationRequest.class, DeviceRequest.class, 1003 MedicationRequest.class, NutritionOrder.class, Task.class, ServiceRequest.class, VisionPrescription.class, 1004 RequestGroup.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 1005 @Description(shortDefinition = "Activity details defined in specific resource", formalDefinition = "The details of the proposed activity represented in a specific resource.") 1006 protected Reference reference; 1007 1008 /** 1009 * The actual object that is the target of the reference (The details of the 1010 * proposed activity represented in a specific resource.) 1011 */ 1012 protected Resource referenceTarget; 1013 1014 /** 1015 * A simple summary of a planned activity suitable for a general care plan 1016 * system (e.g. form driven) that doesn't know about specific resources such as 1017 * procedure etc. 1018 */ 1019 @Child(name = "detail", type = {}, order = 5, min = 0, max = 1, modifier = false, summary = false) 1020 @Description(shortDefinition = "In-line definition of activity", formalDefinition = "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.") 1021 protected CarePlanActivityDetailComponent detail; 1022 1023 private static final long serialVersionUID = -609287300L; 1024 1025 /** 1026 * Constructor 1027 */ 1028 public CarePlanActivityComponent() { 1029 super(); 1030 } 1031 1032 /** 1033 * @return {@link #outcomeCodeableConcept} (Identifies the outcome at the point 1034 * when the status of the activity is assessed. For example, the outcome 1035 * of an education activity could be patient understands (or not).) 1036 */ 1037 public List<CodeableConcept> getOutcomeCodeableConcept() { 1038 if (this.outcomeCodeableConcept == null) 1039 this.outcomeCodeableConcept = new ArrayList<CodeableConcept>(); 1040 return this.outcomeCodeableConcept; 1041 } 1042 1043 /** 1044 * @return Returns a reference to <code>this</code> for easy method chaining 1045 */ 1046 public CarePlanActivityComponent setOutcomeCodeableConcept(List<CodeableConcept> theOutcomeCodeableConcept) { 1047 this.outcomeCodeableConcept = theOutcomeCodeableConcept; 1048 return this; 1049 } 1050 1051 public boolean hasOutcomeCodeableConcept() { 1052 if (this.outcomeCodeableConcept == null) 1053 return false; 1054 for (CodeableConcept item : this.outcomeCodeableConcept) 1055 if (!item.isEmpty()) 1056 return true; 1057 return false; 1058 } 1059 1060 public CodeableConcept addOutcomeCodeableConcept() { // 3 1061 CodeableConcept t = new CodeableConcept(); 1062 if (this.outcomeCodeableConcept == null) 1063 this.outcomeCodeableConcept = new ArrayList<CodeableConcept>(); 1064 this.outcomeCodeableConcept.add(t); 1065 return t; 1066 } 1067 1068 public CarePlanActivityComponent addOutcomeCodeableConcept(CodeableConcept t) { // 3 1069 if (t == null) 1070 return this; 1071 if (this.outcomeCodeableConcept == null) 1072 this.outcomeCodeableConcept = new ArrayList<CodeableConcept>(); 1073 this.outcomeCodeableConcept.add(t); 1074 return this; 1075 } 1076 1077 /** 1078 * @return The first repetition of repeating field 1079 * {@link #outcomeCodeableConcept}, creating it if it does not already 1080 * exist 1081 */ 1082 public CodeableConcept getOutcomeCodeableConceptFirstRep() { 1083 if (getOutcomeCodeableConcept().isEmpty()) { 1084 addOutcomeCodeableConcept(); 1085 } 1086 return getOutcomeCodeableConcept().get(0); 1087 } 1088 1089 /** 1090 * @return {@link #outcomeReference} (Details of the outcome or action resulting 1091 * from the activity. The reference to an "event" resource, such as 1092 * Procedure or Encounter or Observation, is the result/outcome of the 1093 * activity itself. The activity can be conveyed using 1094 * CarePlan.activity.detail OR using the CarePlan.activity.reference (a 1095 * reference to a ?request? resource).) 1096 */ 1097 public List<Reference> getOutcomeReference() { 1098 if (this.outcomeReference == null) 1099 this.outcomeReference = new ArrayList<Reference>(); 1100 return this.outcomeReference; 1101 } 1102 1103 /** 1104 * @return Returns a reference to <code>this</code> for easy method chaining 1105 */ 1106 public CarePlanActivityComponent setOutcomeReference(List<Reference> theOutcomeReference) { 1107 this.outcomeReference = theOutcomeReference; 1108 return this; 1109 } 1110 1111 public boolean hasOutcomeReference() { 1112 if (this.outcomeReference == null) 1113 return false; 1114 for (Reference item : this.outcomeReference) 1115 if (!item.isEmpty()) 1116 return true; 1117 return false; 1118 } 1119 1120 public Reference addOutcomeReference() { // 3 1121 Reference t = new Reference(); 1122 if (this.outcomeReference == null) 1123 this.outcomeReference = new ArrayList<Reference>(); 1124 this.outcomeReference.add(t); 1125 return t; 1126 } 1127 1128 public CarePlanActivityComponent addOutcomeReference(Reference t) { // 3 1129 if (t == null) 1130 return this; 1131 if (this.outcomeReference == null) 1132 this.outcomeReference = new ArrayList<Reference>(); 1133 this.outcomeReference.add(t); 1134 return this; 1135 } 1136 1137 /** 1138 * @return The first repetition of repeating field {@link #outcomeReference}, 1139 * creating it if it does not already exist 1140 */ 1141 public Reference getOutcomeReferenceFirstRep() { 1142 if (getOutcomeReference().isEmpty()) { 1143 addOutcomeReference(); 1144 } 1145 return getOutcomeReference().get(0); 1146 } 1147 1148 /** 1149 * @return {@link #progress} (Notes about the adherence/status/progress of the 1150 * activity.) 1151 */ 1152 public List<Annotation> getProgress() { 1153 if (this.progress == null) 1154 this.progress = new ArrayList<Annotation>(); 1155 return this.progress; 1156 } 1157 1158 /** 1159 * @return Returns a reference to <code>this</code> for easy method chaining 1160 */ 1161 public CarePlanActivityComponent setProgress(List<Annotation> theProgress) { 1162 this.progress = theProgress; 1163 return this; 1164 } 1165 1166 public boolean hasProgress() { 1167 if (this.progress == null) 1168 return false; 1169 for (Annotation item : this.progress) 1170 if (!item.isEmpty()) 1171 return true; 1172 return false; 1173 } 1174 1175 public Annotation addProgress() { // 3 1176 Annotation t = new Annotation(); 1177 if (this.progress == null) 1178 this.progress = new ArrayList<Annotation>(); 1179 this.progress.add(t); 1180 return t; 1181 } 1182 1183 public CarePlanActivityComponent addProgress(Annotation t) { // 3 1184 if (t == null) 1185 return this; 1186 if (this.progress == null) 1187 this.progress = new ArrayList<Annotation>(); 1188 this.progress.add(t); 1189 return this; 1190 } 1191 1192 /** 1193 * @return The first repetition of repeating field {@link #progress}, creating 1194 * it if it does not already exist 1195 */ 1196 public Annotation getProgressFirstRep() { 1197 if (getProgress().isEmpty()) { 1198 addProgress(); 1199 } 1200 return getProgress().get(0); 1201 } 1202 1203 /** 1204 * @return {@link #reference} (The details of the proposed activity represented 1205 * in a specific resource.) 1206 */ 1207 public Reference getReference() { 1208 if (this.reference == null) 1209 if (Configuration.errorOnAutoCreate()) 1210 throw new Error("Attempt to auto-create CarePlanActivityComponent.reference"); 1211 else if (Configuration.doAutoCreate()) 1212 this.reference = new Reference(); // cc 1213 return this.reference; 1214 } 1215 1216 public boolean hasReference() { 1217 return this.reference != null && !this.reference.isEmpty(); 1218 } 1219 1220 /** 1221 * @param value {@link #reference} (The details of the proposed activity 1222 * represented in a specific resource.) 1223 */ 1224 public CarePlanActivityComponent setReference(Reference value) { 1225 this.reference = value; 1226 return this; 1227 } 1228 1229 /** 1230 * @return {@link #reference} The actual object that is the target of the 1231 * reference. The reference library doesn't populate this, but you can 1232 * use it to hold the resource if you resolve it. (The details of the 1233 * proposed activity represented in a specific resource.) 1234 */ 1235 public Resource getReferenceTarget() { 1236 return this.referenceTarget; 1237 } 1238 1239 /** 1240 * @param value {@link #reference} The actual object that is the target of the 1241 * reference. The reference library doesn't use these, but you can 1242 * use it to hold the resource if you resolve it. (The details of 1243 * the proposed activity represented in a specific resource.) 1244 */ 1245 public CarePlanActivityComponent setReferenceTarget(Resource value) { 1246 this.referenceTarget = value; 1247 return this; 1248 } 1249 1250 /** 1251 * @return {@link #detail} (A simple summary of a planned activity suitable for 1252 * a general care plan system (e.g. form driven) that doesn't know about 1253 * specific resources such as procedure etc.) 1254 */ 1255 public CarePlanActivityDetailComponent getDetail() { 1256 if (this.detail == null) 1257 if (Configuration.errorOnAutoCreate()) 1258 throw new Error("Attempt to auto-create CarePlanActivityComponent.detail"); 1259 else if (Configuration.doAutoCreate()) 1260 this.detail = new CarePlanActivityDetailComponent(); // cc 1261 return this.detail; 1262 } 1263 1264 public boolean hasDetail() { 1265 return this.detail != null && !this.detail.isEmpty(); 1266 } 1267 1268 /** 1269 * @param value {@link #detail} (A simple summary of a planned activity suitable 1270 * for a general care plan system (e.g. form driven) that doesn't 1271 * know about specific resources such as procedure etc.) 1272 */ 1273 public CarePlanActivityComponent setDetail(CarePlanActivityDetailComponent value) { 1274 this.detail = value; 1275 return this; 1276 } 1277 1278 protected void listChildren(List<Property> children) { 1279 super.listChildren(children); 1280 children.add(new Property("outcomeCodeableConcept", "CodeableConcept", 1281 "Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).", 1282 0, java.lang.Integer.MAX_VALUE, outcomeCodeableConcept)); 1283 children.add(new Property("outcomeReference", "Reference(Any)", 1284 "Details of the outcome or action resulting from the activity. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a ?request? resource).", 1285 0, java.lang.Integer.MAX_VALUE, outcomeReference)); 1286 children.add(new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 1287 0, java.lang.Integer.MAX_VALUE, progress)); 1288 children.add(new Property("reference", 1289 "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestGroup)", 1290 "The details of the proposed activity represented in a specific resource.", 0, 1, reference)); 1291 children.add(new Property("detail", "", 1292 "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 1293 0, 1, detail)); 1294 } 1295 1296 @Override 1297 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1298 switch (_hash) { 1299 case -511913489: 1300 /* outcomeCodeableConcept */ return new Property("outcomeCodeableConcept", "CodeableConcept", 1301 "Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).", 1302 0, java.lang.Integer.MAX_VALUE, outcomeCodeableConcept); 1303 case -782273511: 1304 /* outcomeReference */ return new Property("outcomeReference", "Reference(Any)", 1305 "Details of the outcome or action resulting from the activity. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a ?request? resource).", 1306 0, java.lang.Integer.MAX_VALUE, outcomeReference); 1307 case -1001078227: 1308 /* progress */ return new Property("progress", "Annotation", 1309 "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress); 1310 case -925155509: 1311 /* reference */ return new Property("reference", 1312 "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestGroup)", 1313 "The details of the proposed activity represented in a specific resource.", 0, 1, reference); 1314 case -1335224239: 1315 /* detail */ return new Property("detail", "", 1316 "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", 1317 0, 1, detail); 1318 default: 1319 return super.getNamedProperty(_hash, _name, _checkValid); 1320 } 1321 1322 } 1323 1324 @Override 1325 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1326 switch (hash) { 1327 case -511913489: 1328 /* outcomeCodeableConcept */ return this.outcomeCodeableConcept == null ? new Base[0] 1329 : this.outcomeCodeableConcept.toArray(new Base[this.outcomeCodeableConcept.size()]); // CodeableConcept 1330 case -782273511: 1331 /* outcomeReference */ return this.outcomeReference == null ? new Base[0] 1332 : this.outcomeReference.toArray(new Base[this.outcomeReference.size()]); // Reference 1333 case -1001078227: 1334 /* progress */ return this.progress == null ? new Base[0] 1335 : this.progress.toArray(new Base[this.progress.size()]); // Annotation 1336 case -925155509: 1337 /* reference */ return this.reference == null ? new Base[0] : new Base[] { this.reference }; // Reference 1338 case -1335224239: 1339 /* detail */ return this.detail == null ? new Base[0] : new Base[] { this.detail }; // CarePlanActivityDetailComponent 1340 default: 1341 return super.getProperty(hash, name, checkValid); 1342 } 1343 1344 } 1345 1346 @Override 1347 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1348 switch (hash) { 1349 case -511913489: // outcomeCodeableConcept 1350 this.getOutcomeCodeableConcept().add(castToCodeableConcept(value)); // CodeableConcept 1351 return value; 1352 case -782273511: // outcomeReference 1353 this.getOutcomeReference().add(castToReference(value)); // Reference 1354 return value; 1355 case -1001078227: // progress 1356 this.getProgress().add(castToAnnotation(value)); // Annotation 1357 return value; 1358 case -925155509: // reference 1359 this.reference = castToReference(value); // Reference 1360 return value; 1361 case -1335224239: // detail 1362 this.detail = (CarePlanActivityDetailComponent) value; // CarePlanActivityDetailComponent 1363 return value; 1364 default: 1365 return super.setProperty(hash, name, value); 1366 } 1367 1368 } 1369 1370 @Override 1371 public Base setProperty(String name, Base value) throws FHIRException { 1372 if (name.equals("outcomeCodeableConcept")) { 1373 this.getOutcomeCodeableConcept().add(castToCodeableConcept(value)); 1374 } else if (name.equals("outcomeReference")) { 1375 this.getOutcomeReference().add(castToReference(value)); 1376 } else if (name.equals("progress")) { 1377 this.getProgress().add(castToAnnotation(value)); 1378 } else if (name.equals("reference")) { 1379 this.reference = castToReference(value); // Reference 1380 } else if (name.equals("detail")) { 1381 this.detail = (CarePlanActivityDetailComponent) value; // CarePlanActivityDetailComponent 1382 } else 1383 return super.setProperty(name, value); 1384 return value; 1385 } 1386 1387 @Override 1388 public void removeChild(String name, Base value) throws FHIRException { 1389 if (name.equals("outcomeCodeableConcept")) { 1390 this.getOutcomeCodeableConcept().remove(castToCodeableConcept(value)); 1391 } else if (name.equals("outcomeReference")) { 1392 this.getOutcomeReference().remove(castToReference(value)); 1393 } else if (name.equals("progress")) { 1394 this.getProgress().remove(castToAnnotation(value)); 1395 } else if (name.equals("reference")) { 1396 this.reference = null; 1397 } else if (name.equals("detail")) { 1398 this.detail = (CarePlanActivityDetailComponent) value; // CarePlanActivityDetailComponent 1399 } else 1400 super.removeChild(name, value); 1401 1402 } 1403 1404 @Override 1405 public Base makeProperty(int hash, String name) throws FHIRException { 1406 switch (hash) { 1407 case -511913489: 1408 return addOutcomeCodeableConcept(); 1409 case -782273511: 1410 return addOutcomeReference(); 1411 case -1001078227: 1412 return addProgress(); 1413 case -925155509: 1414 return getReference(); 1415 case -1335224239: 1416 return getDetail(); 1417 default: 1418 return super.makeProperty(hash, name); 1419 } 1420 1421 } 1422 1423 @Override 1424 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1425 switch (hash) { 1426 case -511913489: 1427 /* outcomeCodeableConcept */ return new String[] { "CodeableConcept" }; 1428 case -782273511: 1429 /* outcomeReference */ return new String[] { "Reference" }; 1430 case -1001078227: 1431 /* progress */ return new String[] { "Annotation" }; 1432 case -925155509: 1433 /* reference */ return new String[] { "Reference" }; 1434 case -1335224239: 1435 /* detail */ return new String[] {}; 1436 default: 1437 return super.getTypesForProperty(hash, name); 1438 } 1439 1440 } 1441 1442 @Override 1443 public Base addChild(String name) throws FHIRException { 1444 if (name.equals("outcomeCodeableConcept")) { 1445 return addOutcomeCodeableConcept(); 1446 } else if (name.equals("outcomeReference")) { 1447 return addOutcomeReference(); 1448 } else if (name.equals("progress")) { 1449 return addProgress(); 1450 } else if (name.equals("reference")) { 1451 this.reference = new Reference(); 1452 return this.reference; 1453 } else if (name.equals("detail")) { 1454 this.detail = new CarePlanActivityDetailComponent(); 1455 return this.detail; 1456 } else 1457 return super.addChild(name); 1458 } 1459 1460 public CarePlanActivityComponent copy() { 1461 CarePlanActivityComponent dst = new CarePlanActivityComponent(); 1462 copyValues(dst); 1463 return dst; 1464 } 1465 1466 public void copyValues(CarePlanActivityComponent dst) { 1467 super.copyValues(dst); 1468 if (outcomeCodeableConcept != null) { 1469 dst.outcomeCodeableConcept = new ArrayList<CodeableConcept>(); 1470 for (CodeableConcept i : outcomeCodeableConcept) 1471 dst.outcomeCodeableConcept.add(i.copy()); 1472 } 1473 ; 1474 if (outcomeReference != null) { 1475 dst.outcomeReference = new ArrayList<Reference>(); 1476 for (Reference i : outcomeReference) 1477 dst.outcomeReference.add(i.copy()); 1478 } 1479 ; 1480 if (progress != null) { 1481 dst.progress = new ArrayList<Annotation>(); 1482 for (Annotation i : progress) 1483 dst.progress.add(i.copy()); 1484 } 1485 ; 1486 dst.reference = reference == null ? null : reference.copy(); 1487 dst.detail = detail == null ? null : detail.copy(); 1488 } 1489 1490 @Override 1491 public boolean equalsDeep(Base other_) { 1492 if (!super.equalsDeep(other_)) 1493 return false; 1494 if (!(other_ instanceof CarePlanActivityComponent)) 1495 return false; 1496 CarePlanActivityComponent o = (CarePlanActivityComponent) other_; 1497 return compareDeep(outcomeCodeableConcept, o.outcomeCodeableConcept, true) 1498 && compareDeep(outcomeReference, o.outcomeReference, true) && compareDeep(progress, o.progress, true) 1499 && compareDeep(reference, o.reference, true) && compareDeep(detail, o.detail, true); 1500 } 1501 1502 @Override 1503 public boolean equalsShallow(Base other_) { 1504 if (!super.equalsShallow(other_)) 1505 return false; 1506 if (!(other_ instanceof CarePlanActivityComponent)) 1507 return false; 1508 CarePlanActivityComponent o = (CarePlanActivityComponent) other_; 1509 return true; 1510 } 1511 1512 public boolean isEmpty() { 1513 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(outcomeCodeableConcept, outcomeReference, progress, 1514 reference, detail); 1515 } 1516 1517 public String fhirType() { 1518 return "CarePlan.activity"; 1519 1520 } 1521 1522 } 1523 1524 @Block() 1525 public static class CarePlanActivityDetailComponent extends BackboneElement implements IBaseBackboneElement { 1526 /** 1527 * A description of the kind of resource the in-line definition of a care plan 1528 * activity is representing. The CarePlan.activity.detail is an in-line 1529 * definition when a resource is not referenced using 1530 * CarePlan.activity.reference. For example, a MedicationRequest, a 1531 * ServiceRequest, or a CommunicationRequest. 1532 */ 1533 @Child(name = "kind", type = { CodeType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 1534 @Description(shortDefinition = "Appointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription", formalDefinition = "A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.") 1535 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/care-plan-activity-kind") 1536 protected Enumeration<CarePlanActivityKind> kind; 1537 1538 /** 1539 * The URL pointing to a FHIR-defined protocol, guideline, questionnaire or 1540 * other definition that is adhered to in whole or in part by this CarePlan 1541 * activity. 1542 */ 1543 @Child(name = "instantiatesCanonical", type = { 1544 CanonicalType.class }, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1545 @Description(shortDefinition = "Instantiates FHIR protocol or definition", formalDefinition = "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.") 1546 protected List<CanonicalType> instantiatesCanonical; 1547 1548 /** 1549 * The URL pointing to an externally maintained protocol, guideline, 1550 * questionnaire or other definition that is adhered to in whole or in part by 1551 * this CarePlan activity. 1552 */ 1553 @Child(name = "instantiatesUri", type = { 1554 UriType.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1555 @Description(shortDefinition = "Instantiates external protocol or definition", formalDefinition = "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.") 1556 protected List<UriType> instantiatesUri; 1557 1558 /** 1559 * Detailed description of the type of planned activity; e.g. what lab test, 1560 * what procedure, what kind of encounter. 1561 */ 1562 @Child(name = "code", type = { 1563 CodeableConcept.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 1564 @Description(shortDefinition = "Detail type of activity", formalDefinition = "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.") 1565 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/procedure-code") 1566 protected CodeableConcept code; 1567 1568 /** 1569 * Provides the rationale that drove the inclusion of this particular activity 1570 * as part of the plan or the reason why the activity was prohibited. 1571 */ 1572 @Child(name = "reasonCode", type = { 1573 CodeableConcept.class }, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1574 @Description(shortDefinition = "Why activity should be done or why activity was prohibited", formalDefinition = "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.") 1575 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/clinical-findings") 1576 protected List<CodeableConcept> reasonCode; 1577 1578 /** 1579 * Indicates another resource, such as the health condition(s), whose existence 1580 * justifies this request and drove the inclusion of this particular activity as 1581 * part of the plan. 1582 */ 1583 @Child(name = "reasonReference", type = { Condition.class, Observation.class, DiagnosticReport.class, 1584 DocumentReference.class }, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1585 @Description(shortDefinition = "Why activity is needed", formalDefinition = "Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.") 1586 protected List<Reference> reasonReference; 1587 /** 1588 * The actual objects that are the target of the reference (Indicates another 1589 * resource, such as the health condition(s), whose existence justifies this 1590 * request and drove the inclusion of this particular activity as part of the 1591 * plan.) 1592 */ 1593 protected List<Resource> reasonReferenceTarget; 1594 1595 /** 1596 * Internal reference that identifies the goals that this activity is intended 1597 * to contribute towards meeting. 1598 */ 1599 @Child(name = "goal", type = { 1600 Goal.class }, order = 7, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1601 @Description(shortDefinition = "Goals this activity relates to", formalDefinition = "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.") 1602 protected List<Reference> goal; 1603 /** 1604 * The actual objects that are the target of the reference (Internal reference 1605 * that identifies the goals that this activity is intended to contribute 1606 * towards meeting.) 1607 */ 1608 protected List<Goal> goalTarget; 1609 1610 /** 1611 * Identifies what progress is being made for the specific activity. 1612 */ 1613 @Child(name = "status", type = { CodeType.class }, order = 8, min = 1, max = 1, modifier = true, summary = false) 1614 @Description(shortDefinition = "not-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error", formalDefinition = "Identifies what progress is being made for the specific activity.") 1615 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/care-plan-activity-status") 1616 protected Enumeration<CarePlanActivityStatus> status; 1617 1618 /** 1619 * Provides reason why the activity isn't yet started, is on hold, was 1620 * cancelled, etc. 1621 */ 1622 @Child(name = "statusReason", type = { 1623 CodeableConcept.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 1624 @Description(shortDefinition = "Reason for current status", formalDefinition = "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.") 1625 protected CodeableConcept statusReason; 1626 1627 /** 1628 * If true, indicates that the described activity is one that must NOT be 1629 * engaged in when following the plan. If false, or missing, indicates that the 1630 * described activity is one that should be engaged in when following the plan. 1631 */ 1632 @Child(name = "doNotPerform", type = { 1633 BooleanType.class }, order = 10, min = 0, max = 1, modifier = true, summary = false) 1634 @Description(shortDefinition = "If true, activity is prohibiting action", formalDefinition = "If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.") 1635 protected BooleanType doNotPerform; 1636 1637 /** 1638 * The period, timing or frequency upon which the described activity is to 1639 * occur. 1640 */ 1641 @Child(name = "scheduled", type = { Timing.class, Period.class, 1642 StringType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false) 1643 @Description(shortDefinition = "When activity is to occur", formalDefinition = "The period, timing or frequency upon which the described activity is to occur.") 1644 protected Type scheduled; 1645 1646 /** 1647 * Identifies the facility where the activity will occur; e.g. home, hospital, 1648 * specific clinic, etc. 1649 */ 1650 @Child(name = "location", type = { 1651 Location.class }, order = 12, min = 0, max = 1, modifier = false, summary = false) 1652 @Description(shortDefinition = "Where it should happen", formalDefinition = "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.") 1653 protected Reference location; 1654 1655 /** 1656 * The actual object that is the target of the reference (Identifies the 1657 * facility where the activity will occur; e.g. home, hospital, specific clinic, 1658 * etc.) 1659 */ 1660 protected Location locationTarget; 1661 1662 /** 1663 * Identifies who's expected to be involved in the activity. 1664 */ 1665 @Child(name = "performer", type = { Practitioner.class, PractitionerRole.class, Organization.class, 1666 RelatedPerson.class, Patient.class, CareTeam.class, HealthcareService.class, 1667 Device.class }, order = 13, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1668 @Description(shortDefinition = "Who will be responsible?", formalDefinition = "Identifies who's expected to be involved in the activity.") 1669 protected List<Reference> performer; 1670 /** 1671 * The actual objects that are the target of the reference (Identifies who's 1672 * expected to be involved in the activity.) 1673 */ 1674 protected List<Resource> performerTarget; 1675 1676 /** 1677 * Identifies the food, drug or other product to be consumed or supplied in the 1678 * activity. 1679 */ 1680 @Child(name = "product", type = { CodeableConcept.class, Medication.class, 1681 Substance.class }, order = 14, min = 0, max = 1, modifier = false, summary = false) 1682 @Description(shortDefinition = "What is to be administered/supplied", formalDefinition = "Identifies the food, drug or other product to be consumed or supplied in the activity.") 1683 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medication-codes") 1684 protected Type product; 1685 1686 /** 1687 * Identifies the quantity expected to be consumed in a given day. 1688 */ 1689 @Child(name = "dailyAmount", type = { 1690 Quantity.class }, order = 15, min = 0, max = 1, modifier = false, summary = false) 1691 @Description(shortDefinition = "How to consume/day?", formalDefinition = "Identifies the quantity expected to be consumed in a given day.") 1692 protected Quantity dailyAmount; 1693 1694 /** 1695 * Identifies the quantity expected to be supplied, administered or consumed by 1696 * the subject. 1697 */ 1698 @Child(name = "quantity", type = { 1699 Quantity.class }, order = 16, min = 0, max = 1, modifier = false, summary = false) 1700 @Description(shortDefinition = "How much to administer/supply/consume", formalDefinition = "Identifies the quantity expected to be supplied, administered or consumed by the subject.") 1701 protected Quantity quantity; 1702 1703 /** 1704 * This provides a textual description of constraints on the intended activity 1705 * occurrence, including relation to other activities. It may also include 1706 * objectives, pre-conditions and end-conditions. Finally, it may convey 1707 * specifics about the activity such as body site, method, route, etc. 1708 */ 1709 @Child(name = "description", type = { 1710 StringType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false) 1711 @Description(shortDefinition = "Extra info describing activity to perform", formalDefinition = "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.") 1712 protected StringType description; 1713 1714 private static final long serialVersionUID = 1355568081L; 1715 1716 /** 1717 * Constructor 1718 */ 1719 public CarePlanActivityDetailComponent() { 1720 super(); 1721 } 1722 1723 /** 1724 * Constructor 1725 */ 1726 public CarePlanActivityDetailComponent(Enumeration<CarePlanActivityStatus> status) { 1727 super(); 1728 this.status = status; 1729 } 1730 1731 /** 1732 * @return {@link #kind} (A description of the kind of resource the in-line 1733 * definition of a care plan activity is representing. The 1734 * CarePlan.activity.detail is an in-line definition when a resource is 1735 * not referenced using CarePlan.activity.reference. For example, a 1736 * MedicationRequest, a ServiceRequest, or a CommunicationRequest.). 1737 * This is the underlying object with id, value and extensions. The 1738 * accessor "getKind" gives direct access to the value 1739 */ 1740 public Enumeration<CarePlanActivityKind> getKindElement() { 1741 if (this.kind == null) 1742 if (Configuration.errorOnAutoCreate()) 1743 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.kind"); 1744 else if (Configuration.doAutoCreate()) 1745 this.kind = new Enumeration<CarePlanActivityKind>(new CarePlanActivityKindEnumFactory()); // bb 1746 return this.kind; 1747 } 1748 1749 public boolean hasKindElement() { 1750 return this.kind != null && !this.kind.isEmpty(); 1751 } 1752 1753 public boolean hasKind() { 1754 return this.kind != null && !this.kind.isEmpty(); 1755 } 1756 1757 /** 1758 * @param value {@link #kind} (A description of the kind of resource the in-line 1759 * definition of a care plan activity is representing. The 1760 * CarePlan.activity.detail is an in-line definition when a 1761 * resource is not referenced using CarePlan.activity.reference. 1762 * For example, a MedicationRequest, a ServiceRequest, or a 1763 * CommunicationRequest.). This is the underlying object with id, 1764 * value and extensions. The accessor "getKind" gives direct access 1765 * to the value 1766 */ 1767 public CarePlanActivityDetailComponent setKindElement(Enumeration<CarePlanActivityKind> value) { 1768 this.kind = value; 1769 return this; 1770 } 1771 1772 /** 1773 * @return A description of the kind of resource the in-line definition of a 1774 * care plan activity is representing. The CarePlan.activity.detail is 1775 * an in-line definition when a resource is not referenced using 1776 * CarePlan.activity.reference. For example, a MedicationRequest, a 1777 * ServiceRequest, or a CommunicationRequest. 1778 */ 1779 public CarePlanActivityKind getKind() { 1780 return this.kind == null ? null : this.kind.getValue(); 1781 } 1782 1783 /** 1784 * @param value A description of the kind of resource the in-line definition of 1785 * a care plan activity is representing. The 1786 * CarePlan.activity.detail is an in-line definition when a 1787 * resource is not referenced using CarePlan.activity.reference. 1788 * For example, a MedicationRequest, a ServiceRequest, or a 1789 * CommunicationRequest. 1790 */ 1791 public CarePlanActivityDetailComponent setKind(CarePlanActivityKind value) { 1792 if (value == null) 1793 this.kind = null; 1794 else { 1795 if (this.kind == null) 1796 this.kind = new Enumeration<CarePlanActivityKind>(new CarePlanActivityKindEnumFactory()); 1797 this.kind.setValue(value); 1798 } 1799 return this; 1800 } 1801 1802 /** 1803 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined 1804 * protocol, guideline, questionnaire or other definition that is 1805 * adhered to in whole or in part by this CarePlan activity.) 1806 */ 1807 public List<CanonicalType> getInstantiatesCanonical() { 1808 if (this.instantiatesCanonical == null) 1809 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1810 return this.instantiatesCanonical; 1811 } 1812 1813 /** 1814 * @return Returns a reference to <code>this</code> for easy method chaining 1815 */ 1816 public CarePlanActivityDetailComponent setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 1817 this.instantiatesCanonical = theInstantiatesCanonical; 1818 return this; 1819 } 1820 1821 public boolean hasInstantiatesCanonical() { 1822 if (this.instantiatesCanonical == null) 1823 return false; 1824 for (CanonicalType item : this.instantiatesCanonical) 1825 if (!item.isEmpty()) 1826 return true; 1827 return false; 1828 } 1829 1830 /** 1831 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined 1832 * protocol, guideline, questionnaire or other definition that is 1833 * adhered to in whole or in part by this CarePlan activity.) 1834 */ 1835 public CanonicalType addInstantiatesCanonicalElement() {// 2 1836 CanonicalType t = new CanonicalType(); 1837 if (this.instantiatesCanonical == null) 1838 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1839 this.instantiatesCanonical.add(t); 1840 return t; 1841 } 1842 1843 /** 1844 * @param value {@link #instantiatesCanonical} (The URL pointing to a 1845 * FHIR-defined protocol, guideline, questionnaire or other 1846 * definition that is adhered to in whole or in part by this 1847 * CarePlan activity.) 1848 */ 1849 public CarePlanActivityDetailComponent addInstantiatesCanonical(String value) { // 1 1850 CanonicalType t = new CanonicalType(); 1851 t.setValue(value); 1852 if (this.instantiatesCanonical == null) 1853 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1854 this.instantiatesCanonical.add(t); 1855 return this; 1856 } 1857 1858 /** 1859 * @param value {@link #instantiatesCanonical} (The URL pointing to a 1860 * FHIR-defined protocol, guideline, questionnaire or other 1861 * definition that is adhered to in whole or in part by this 1862 * CarePlan activity.) 1863 */ 1864 public boolean hasInstantiatesCanonical(String value) { 1865 if (this.instantiatesCanonical == null) 1866 return false; 1867 for (CanonicalType v : this.instantiatesCanonical) 1868 if (v.getValue().equals(value)) // canonical(PlanDefinition|ActivityDefinition|Questionnaire|Measure|OperationDefinition) 1869 return true; 1870 return false; 1871 } 1872 1873 /** 1874 * @return {@link #instantiatesUri} (The URL pointing to an externally 1875 * maintained protocol, guideline, questionnaire or other definition 1876 * that is adhered to in whole or in part by this CarePlan activity.) 1877 */ 1878 public List<UriType> getInstantiatesUri() { 1879 if (this.instantiatesUri == null) 1880 this.instantiatesUri = new ArrayList<UriType>(); 1881 return this.instantiatesUri; 1882 } 1883 1884 /** 1885 * @return Returns a reference to <code>this</code> for easy method chaining 1886 */ 1887 public CarePlanActivityDetailComponent setInstantiatesUri(List<UriType> theInstantiatesUri) { 1888 this.instantiatesUri = theInstantiatesUri; 1889 return this; 1890 } 1891 1892 public boolean hasInstantiatesUri() { 1893 if (this.instantiatesUri == null) 1894 return false; 1895 for (UriType item : this.instantiatesUri) 1896 if (!item.isEmpty()) 1897 return true; 1898 return false; 1899 } 1900 1901 /** 1902 * @return {@link #instantiatesUri} (The URL pointing to an externally 1903 * maintained protocol, guideline, questionnaire or other definition 1904 * that is adhered to in whole or in part by this CarePlan activity.) 1905 */ 1906 public UriType addInstantiatesUriElement() {// 2 1907 UriType t = new UriType(); 1908 if (this.instantiatesUri == null) 1909 this.instantiatesUri = new ArrayList<UriType>(); 1910 this.instantiatesUri.add(t); 1911 return t; 1912 } 1913 1914 /** 1915 * @param value {@link #instantiatesUri} (The URL pointing to an externally 1916 * maintained protocol, guideline, questionnaire or other 1917 * definition that is adhered to in whole or in part by this 1918 * CarePlan activity.) 1919 */ 1920 public CarePlanActivityDetailComponent addInstantiatesUri(String value) { // 1 1921 UriType t = new UriType(); 1922 t.setValue(value); 1923 if (this.instantiatesUri == null) 1924 this.instantiatesUri = new ArrayList<UriType>(); 1925 this.instantiatesUri.add(t); 1926 return this; 1927 } 1928 1929 /** 1930 * @param value {@link #instantiatesUri} (The URL pointing to an externally 1931 * maintained protocol, guideline, questionnaire or other 1932 * definition that is adhered to in whole or in part by this 1933 * CarePlan activity.) 1934 */ 1935 public boolean hasInstantiatesUri(String value) { 1936 if (this.instantiatesUri == null) 1937 return false; 1938 for (UriType v : this.instantiatesUri) 1939 if (v.getValue().equals(value)) // uri 1940 return true; 1941 return false; 1942 } 1943 1944 /** 1945 * @return {@link #code} (Detailed description of the type of planned activity; 1946 * e.g. what lab test, what procedure, what kind of encounter.) 1947 */ 1948 public CodeableConcept getCode() { 1949 if (this.code == null) 1950 if (Configuration.errorOnAutoCreate()) 1951 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.code"); 1952 else if (Configuration.doAutoCreate()) 1953 this.code = new CodeableConcept(); // cc 1954 return this.code; 1955 } 1956 1957 public boolean hasCode() { 1958 return this.code != null && !this.code.isEmpty(); 1959 } 1960 1961 /** 1962 * @param value {@link #code} (Detailed description of the type of planned 1963 * activity; e.g. what lab test, what procedure, what kind of 1964 * encounter.) 1965 */ 1966 public CarePlanActivityDetailComponent setCode(CodeableConcept value) { 1967 this.code = value; 1968 return this; 1969 } 1970 1971 /** 1972 * @return {@link #reasonCode} (Provides the rationale that drove the inclusion 1973 * of this particular activity as part of the plan or the reason why the 1974 * activity was prohibited.) 1975 */ 1976 public List<CodeableConcept> getReasonCode() { 1977 if (this.reasonCode == null) 1978 this.reasonCode = new ArrayList<CodeableConcept>(); 1979 return this.reasonCode; 1980 } 1981 1982 /** 1983 * @return Returns a reference to <code>this</code> for easy method chaining 1984 */ 1985 public CarePlanActivityDetailComponent setReasonCode(List<CodeableConcept> theReasonCode) { 1986 this.reasonCode = theReasonCode; 1987 return this; 1988 } 1989 1990 public boolean hasReasonCode() { 1991 if (this.reasonCode == null) 1992 return false; 1993 for (CodeableConcept item : this.reasonCode) 1994 if (!item.isEmpty()) 1995 return true; 1996 return false; 1997 } 1998 1999 public CodeableConcept addReasonCode() { // 3 2000 CodeableConcept t = new CodeableConcept(); 2001 if (this.reasonCode == null) 2002 this.reasonCode = new ArrayList<CodeableConcept>(); 2003 this.reasonCode.add(t); 2004 return t; 2005 } 2006 2007 public CarePlanActivityDetailComponent addReasonCode(CodeableConcept t) { // 3 2008 if (t == null) 2009 return this; 2010 if (this.reasonCode == null) 2011 this.reasonCode = new ArrayList<CodeableConcept>(); 2012 this.reasonCode.add(t); 2013 return this; 2014 } 2015 2016 /** 2017 * @return The first repetition of repeating field {@link #reasonCode}, creating 2018 * it if it does not already exist 2019 */ 2020 public CodeableConcept getReasonCodeFirstRep() { 2021 if (getReasonCode().isEmpty()) { 2022 addReasonCode(); 2023 } 2024 return getReasonCode().get(0); 2025 } 2026 2027 /** 2028 * @return {@link #reasonReference} (Indicates another resource, such as the 2029 * health condition(s), whose existence justifies this request and drove 2030 * the inclusion of this particular activity as part of the plan.) 2031 */ 2032 public List<Reference> getReasonReference() { 2033 if (this.reasonReference == null) 2034 this.reasonReference = new ArrayList<Reference>(); 2035 return this.reasonReference; 2036 } 2037 2038 /** 2039 * @return Returns a reference to <code>this</code> for easy method chaining 2040 */ 2041 public CarePlanActivityDetailComponent setReasonReference(List<Reference> theReasonReference) { 2042 this.reasonReference = theReasonReference; 2043 return this; 2044 } 2045 2046 public boolean hasReasonReference() { 2047 if (this.reasonReference == null) 2048 return false; 2049 for (Reference item : this.reasonReference) 2050 if (!item.isEmpty()) 2051 return true; 2052 return false; 2053 } 2054 2055 public Reference addReasonReference() { // 3 2056 Reference t = new Reference(); 2057 if (this.reasonReference == null) 2058 this.reasonReference = new ArrayList<Reference>(); 2059 this.reasonReference.add(t); 2060 return t; 2061 } 2062 2063 public CarePlanActivityDetailComponent addReasonReference(Reference t) { // 3 2064 if (t == null) 2065 return this; 2066 if (this.reasonReference == null) 2067 this.reasonReference = new ArrayList<Reference>(); 2068 this.reasonReference.add(t); 2069 return this; 2070 } 2071 2072 /** 2073 * @return The first repetition of repeating field {@link #reasonReference}, 2074 * creating it if it does not already exist 2075 */ 2076 public Reference getReasonReferenceFirstRep() { 2077 if (getReasonReference().isEmpty()) { 2078 addReasonReference(); 2079 } 2080 return getReasonReference().get(0); 2081 } 2082 2083 /** 2084 * @return {@link #goal} (Internal reference that identifies the goals that this 2085 * activity is intended to contribute towards meeting.) 2086 */ 2087 public List<Reference> getGoal() { 2088 if (this.goal == null) 2089 this.goal = new ArrayList<Reference>(); 2090 return this.goal; 2091 } 2092 2093 /** 2094 * @return Returns a reference to <code>this</code> for easy method chaining 2095 */ 2096 public CarePlanActivityDetailComponent setGoal(List<Reference> theGoal) { 2097 this.goal = theGoal; 2098 return this; 2099 } 2100 2101 public boolean hasGoal() { 2102 if (this.goal == null) 2103 return false; 2104 for (Reference item : this.goal) 2105 if (!item.isEmpty()) 2106 return true; 2107 return false; 2108 } 2109 2110 public Reference addGoal() { // 3 2111 Reference t = new Reference(); 2112 if (this.goal == null) 2113 this.goal = new ArrayList<Reference>(); 2114 this.goal.add(t); 2115 return t; 2116 } 2117 2118 public CarePlanActivityDetailComponent addGoal(Reference t) { // 3 2119 if (t == null) 2120 return this; 2121 if (this.goal == null) 2122 this.goal = new ArrayList<Reference>(); 2123 this.goal.add(t); 2124 return this; 2125 } 2126 2127 /** 2128 * @return The first repetition of repeating field {@link #goal}, creating it if 2129 * it does not already exist 2130 */ 2131 public Reference getGoalFirstRep() { 2132 if (getGoal().isEmpty()) { 2133 addGoal(); 2134 } 2135 return getGoal().get(0); 2136 } 2137 2138 /** 2139 * @return {@link #status} (Identifies what progress is being made for the 2140 * specific activity.). This is the underlying object with id, value and 2141 * extensions. The accessor "getStatus" gives direct access to the value 2142 */ 2143 public Enumeration<CarePlanActivityStatus> getStatusElement() { 2144 if (this.status == null) 2145 if (Configuration.errorOnAutoCreate()) 2146 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.status"); 2147 else if (Configuration.doAutoCreate()) 2148 this.status = new Enumeration<CarePlanActivityStatus>(new CarePlanActivityStatusEnumFactory()); // bb 2149 return this.status; 2150 } 2151 2152 public boolean hasStatusElement() { 2153 return this.status != null && !this.status.isEmpty(); 2154 } 2155 2156 public boolean hasStatus() { 2157 return this.status != null && !this.status.isEmpty(); 2158 } 2159 2160 /** 2161 * @param value {@link #status} (Identifies what progress is being made for the 2162 * specific activity.). This is the underlying object with id, 2163 * value and extensions. The accessor "getStatus" gives direct 2164 * access to the value 2165 */ 2166 public CarePlanActivityDetailComponent setStatusElement(Enumeration<CarePlanActivityStatus> value) { 2167 this.status = value; 2168 return this; 2169 } 2170 2171 /** 2172 * @return Identifies what progress is being made for the specific activity. 2173 */ 2174 public CarePlanActivityStatus getStatus() { 2175 return this.status == null ? null : this.status.getValue(); 2176 } 2177 2178 /** 2179 * @param value Identifies what progress is being made for the specific 2180 * activity. 2181 */ 2182 public CarePlanActivityDetailComponent setStatus(CarePlanActivityStatus value) { 2183 if (this.status == null) 2184 this.status = new Enumeration<CarePlanActivityStatus>(new CarePlanActivityStatusEnumFactory()); 2185 this.status.setValue(value); 2186 return this; 2187 } 2188 2189 /** 2190 * @return {@link #statusReason} (Provides reason why the activity isn't yet 2191 * started, is on hold, was cancelled, etc.) 2192 */ 2193 public CodeableConcept getStatusReason() { 2194 if (this.statusReason == null) 2195 if (Configuration.errorOnAutoCreate()) 2196 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.statusReason"); 2197 else if (Configuration.doAutoCreate()) 2198 this.statusReason = new CodeableConcept(); // cc 2199 return this.statusReason; 2200 } 2201 2202 public boolean hasStatusReason() { 2203 return this.statusReason != null && !this.statusReason.isEmpty(); 2204 } 2205 2206 /** 2207 * @param value {@link #statusReason} (Provides reason why the activity isn't 2208 * yet started, is on hold, was cancelled, etc.) 2209 */ 2210 public CarePlanActivityDetailComponent setStatusReason(CodeableConcept value) { 2211 this.statusReason = value; 2212 return this; 2213 } 2214 2215 /** 2216 * @return {@link #doNotPerform} (If true, indicates that the described activity 2217 * is one that must NOT be engaged in when following the plan. If false, 2218 * or missing, indicates that the described activity is one that should 2219 * be engaged in when following the plan.). This is the underlying 2220 * object with id, value and extensions. The accessor "getDoNotPerform" 2221 * gives direct access to the value 2222 */ 2223 public BooleanType getDoNotPerformElement() { 2224 if (this.doNotPerform == null) 2225 if (Configuration.errorOnAutoCreate()) 2226 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.doNotPerform"); 2227 else if (Configuration.doAutoCreate()) 2228 this.doNotPerform = new BooleanType(); // bb 2229 return this.doNotPerform; 2230 } 2231 2232 public boolean hasDoNotPerformElement() { 2233 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 2234 } 2235 2236 public boolean hasDoNotPerform() { 2237 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 2238 } 2239 2240 /** 2241 * @param value {@link #doNotPerform} (If true, indicates that the described 2242 * activity is one that must NOT be engaged in when following the 2243 * plan. If false, or missing, indicates that the described 2244 * activity is one that should be engaged in when following the 2245 * plan.). This is the underlying object with id, value and 2246 * extensions. The accessor "getDoNotPerform" gives direct access 2247 * to the value 2248 */ 2249 public CarePlanActivityDetailComponent setDoNotPerformElement(BooleanType value) { 2250 this.doNotPerform = value; 2251 return this; 2252 } 2253 2254 /** 2255 * @return If true, indicates that the described activity is one that must NOT 2256 * be engaged in when following the plan. If false, or missing, 2257 * indicates that the described activity is one that should be engaged 2258 * in when following the plan. 2259 */ 2260 public boolean getDoNotPerform() { 2261 return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue(); 2262 } 2263 2264 /** 2265 * @param value If true, indicates that the described activity is one that must 2266 * NOT be engaged in when following the plan. If false, or missing, 2267 * indicates that the described activity is one that should be 2268 * engaged in when following the plan. 2269 */ 2270 public CarePlanActivityDetailComponent setDoNotPerform(boolean value) { 2271 if (this.doNotPerform == null) 2272 this.doNotPerform = new BooleanType(); 2273 this.doNotPerform.setValue(value); 2274 return this; 2275 } 2276 2277 /** 2278 * @return {@link #scheduled} (The period, timing or frequency upon which the 2279 * described activity is to occur.) 2280 */ 2281 public Type getScheduled() { 2282 return this.scheduled; 2283 } 2284 2285 /** 2286 * @return {@link #scheduled} (The period, timing or frequency upon which the 2287 * described activity is to occur.) 2288 */ 2289 public Timing getScheduledTiming() throws FHIRException { 2290 if (this.scheduled == null) 2291 this.scheduled = new Timing(); 2292 if (!(this.scheduled instanceof Timing)) 2293 throw new FHIRException("Type mismatch: the type Timing was expected, but " 2294 + this.scheduled.getClass().getName() + " was encountered"); 2295 return (Timing) this.scheduled; 2296 } 2297 2298 public boolean hasScheduledTiming() { 2299 return this.scheduled instanceof Timing; 2300 } 2301 2302 /** 2303 * @return {@link #scheduled} (The period, timing or frequency upon which the 2304 * described activity is to occur.) 2305 */ 2306 public Period getScheduledPeriod() throws FHIRException { 2307 if (this.scheduled == null) 2308 this.scheduled = new Period(); 2309 if (!(this.scheduled instanceof Period)) 2310 throw new FHIRException("Type mismatch: the type Period was expected, but " 2311 + this.scheduled.getClass().getName() + " was encountered"); 2312 return (Period) this.scheduled; 2313 } 2314 2315 public boolean hasScheduledPeriod() { 2316 return this.scheduled instanceof Period; 2317 } 2318 2319 /** 2320 * @return {@link #scheduled} (The period, timing or frequency upon which the 2321 * described activity is to occur.) 2322 */ 2323 public StringType getScheduledStringType() throws FHIRException { 2324 if (this.scheduled == null) 2325 this.scheduled = new StringType(); 2326 if (!(this.scheduled instanceof StringType)) 2327 throw new FHIRException("Type mismatch: the type StringType was expected, but " 2328 + this.scheduled.getClass().getName() + " was encountered"); 2329 return (StringType) this.scheduled; 2330 } 2331 2332 public boolean hasScheduledStringType() { 2333 return this.scheduled instanceof StringType; 2334 } 2335 2336 public boolean hasScheduled() { 2337 return this.scheduled != null && !this.scheduled.isEmpty(); 2338 } 2339 2340 /** 2341 * @param value {@link #scheduled} (The period, timing or frequency upon which 2342 * the described activity is to occur.) 2343 */ 2344 public CarePlanActivityDetailComponent setScheduled(Type value) { 2345 if (value != null && !(value instanceof Timing || value instanceof Period || value instanceof StringType)) 2346 throw new Error("Not the right type for CarePlan.activity.detail.scheduled[x]: " + value.fhirType()); 2347 this.scheduled = value; 2348 return this; 2349 } 2350 2351 /** 2352 * @return {@link #location} (Identifies the facility where the activity will 2353 * occur; e.g. home, hospital, specific clinic, etc.) 2354 */ 2355 public Reference getLocation() { 2356 if (this.location == null) 2357 if (Configuration.errorOnAutoCreate()) 2358 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.location"); 2359 else if (Configuration.doAutoCreate()) 2360 this.location = new Reference(); // cc 2361 return this.location; 2362 } 2363 2364 public boolean hasLocation() { 2365 return this.location != null && !this.location.isEmpty(); 2366 } 2367 2368 /** 2369 * @param value {@link #location} (Identifies the facility where the activity 2370 * will occur; e.g. home, hospital, specific clinic, etc.) 2371 */ 2372 public CarePlanActivityDetailComponent setLocation(Reference value) { 2373 this.location = value; 2374 return this; 2375 } 2376 2377 /** 2378 * @return {@link #location} The actual object that is the target of the 2379 * reference. The reference library doesn't populate this, but you can 2380 * use it to hold the resource if you resolve it. (Identifies the 2381 * facility where the activity will occur; e.g. home, hospital, specific 2382 * clinic, etc.) 2383 */ 2384 public Location getLocationTarget() { 2385 if (this.locationTarget == null) 2386 if (Configuration.errorOnAutoCreate()) 2387 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.location"); 2388 else if (Configuration.doAutoCreate()) 2389 this.locationTarget = new Location(); // aa 2390 return this.locationTarget; 2391 } 2392 2393 /** 2394 * @param value {@link #location} The actual object that is the target of the 2395 * reference. The reference library doesn't use these, but you can 2396 * use it to hold the resource if you resolve it. (Identifies the 2397 * facility where the activity will occur; e.g. home, hospital, 2398 * specific clinic, etc.) 2399 */ 2400 public CarePlanActivityDetailComponent setLocationTarget(Location value) { 2401 this.locationTarget = value; 2402 return this; 2403 } 2404 2405 /** 2406 * @return {@link #performer} (Identifies who's expected to be involved in the 2407 * activity.) 2408 */ 2409 public List<Reference> getPerformer() { 2410 if (this.performer == null) 2411 this.performer = new ArrayList<Reference>(); 2412 return this.performer; 2413 } 2414 2415 /** 2416 * @return Returns a reference to <code>this</code> for easy method chaining 2417 */ 2418 public CarePlanActivityDetailComponent setPerformer(List<Reference> thePerformer) { 2419 this.performer = thePerformer; 2420 return this; 2421 } 2422 2423 public boolean hasPerformer() { 2424 if (this.performer == null) 2425 return false; 2426 for (Reference item : this.performer) 2427 if (!item.isEmpty()) 2428 return true; 2429 return false; 2430 } 2431 2432 public Reference addPerformer() { // 3 2433 Reference t = new Reference(); 2434 if (this.performer == null) 2435 this.performer = new ArrayList<Reference>(); 2436 this.performer.add(t); 2437 return t; 2438 } 2439 2440 public CarePlanActivityDetailComponent addPerformer(Reference t) { // 3 2441 if (t == null) 2442 return this; 2443 if (this.performer == null) 2444 this.performer = new ArrayList<Reference>(); 2445 this.performer.add(t); 2446 return this; 2447 } 2448 2449 /** 2450 * @return The first repetition of repeating field {@link #performer}, creating 2451 * it if it does not already exist 2452 */ 2453 public Reference getPerformerFirstRep() { 2454 if (getPerformer().isEmpty()) { 2455 addPerformer(); 2456 } 2457 return getPerformer().get(0); 2458 } 2459 2460 /** 2461 * @return {@link #product} (Identifies the food, drug or other product to be 2462 * consumed or supplied in the activity.) 2463 */ 2464 public Type getProduct() { 2465 return this.product; 2466 } 2467 2468 /** 2469 * @return {@link #product} (Identifies the food, drug or other product to be 2470 * consumed or supplied in the activity.) 2471 */ 2472 public CodeableConcept getProductCodeableConcept() throws FHIRException { 2473 if (this.product == null) 2474 this.product = new CodeableConcept(); 2475 if (!(this.product instanceof CodeableConcept)) 2476 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but " 2477 + this.product.getClass().getName() + " was encountered"); 2478 return (CodeableConcept) this.product; 2479 } 2480 2481 public boolean hasProductCodeableConcept() { 2482 return this.product instanceof CodeableConcept; 2483 } 2484 2485 /** 2486 * @return {@link #product} (Identifies the food, drug or other product to be 2487 * consumed or supplied in the activity.) 2488 */ 2489 public Reference getProductReference() throws FHIRException { 2490 if (this.product == null) 2491 this.product = new Reference(); 2492 if (!(this.product instanceof Reference)) 2493 throw new FHIRException("Type mismatch: the type Reference was expected, but " 2494 + this.product.getClass().getName() + " was encountered"); 2495 return (Reference) this.product; 2496 } 2497 2498 public boolean hasProductReference() { 2499 return this.product instanceof Reference; 2500 } 2501 2502 public boolean hasProduct() { 2503 return this.product != null && !this.product.isEmpty(); 2504 } 2505 2506 /** 2507 * @param value {@link #product} (Identifies the food, drug or other product to 2508 * be consumed or supplied in the activity.) 2509 */ 2510 public CarePlanActivityDetailComponent setProduct(Type value) { 2511 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 2512 throw new Error("Not the right type for CarePlan.activity.detail.product[x]: " + value.fhirType()); 2513 this.product = value; 2514 return this; 2515 } 2516 2517 /** 2518 * @return {@link #dailyAmount} (Identifies the quantity expected to be consumed 2519 * in a given day.) 2520 */ 2521 public Quantity getDailyAmount() { 2522 if (this.dailyAmount == null) 2523 if (Configuration.errorOnAutoCreate()) 2524 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.dailyAmount"); 2525 else if (Configuration.doAutoCreate()) 2526 this.dailyAmount = new Quantity(); // cc 2527 return this.dailyAmount; 2528 } 2529 2530 public boolean hasDailyAmount() { 2531 return this.dailyAmount != null && !this.dailyAmount.isEmpty(); 2532 } 2533 2534 /** 2535 * @param value {@link #dailyAmount} (Identifies the quantity expected to be 2536 * consumed in a given day.) 2537 */ 2538 public CarePlanActivityDetailComponent setDailyAmount(Quantity value) { 2539 this.dailyAmount = value; 2540 return this; 2541 } 2542 2543 /** 2544 * @return {@link #quantity} (Identifies the quantity expected to be supplied, 2545 * administered or consumed by the subject.) 2546 */ 2547 public Quantity getQuantity() { 2548 if (this.quantity == null) 2549 if (Configuration.errorOnAutoCreate()) 2550 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.quantity"); 2551 else if (Configuration.doAutoCreate()) 2552 this.quantity = new Quantity(); // cc 2553 return this.quantity; 2554 } 2555 2556 public boolean hasQuantity() { 2557 return this.quantity != null && !this.quantity.isEmpty(); 2558 } 2559 2560 /** 2561 * @param value {@link #quantity} (Identifies the quantity expected to be 2562 * supplied, administered or consumed by the subject.) 2563 */ 2564 public CarePlanActivityDetailComponent setQuantity(Quantity value) { 2565 this.quantity = value; 2566 return this; 2567 } 2568 2569 /** 2570 * @return {@link #description} (This provides a textual description of 2571 * constraints on the intended activity occurrence, including relation 2572 * to other activities. It may also include objectives, pre-conditions 2573 * and end-conditions. Finally, it may convey specifics about the 2574 * activity such as body site, method, route, etc.). This is the 2575 * underlying object with id, value and extensions. The accessor 2576 * "getDescription" gives direct access to the value 2577 */ 2578 public StringType getDescriptionElement() { 2579 if (this.description == null) 2580 if (Configuration.errorOnAutoCreate()) 2581 throw new Error("Attempt to auto-create CarePlanActivityDetailComponent.description"); 2582 else if (Configuration.doAutoCreate()) 2583 this.description = new StringType(); // bb 2584 return this.description; 2585 } 2586 2587 public boolean hasDescriptionElement() { 2588 return this.description != null && !this.description.isEmpty(); 2589 } 2590 2591 public boolean hasDescription() { 2592 return this.description != null && !this.description.isEmpty(); 2593 } 2594 2595 /** 2596 * @param value {@link #description} (This provides a textual description of 2597 * constraints on the intended activity occurrence, including 2598 * relation to other activities. It may also include objectives, 2599 * pre-conditions and end-conditions. Finally, it may convey 2600 * specifics about the activity such as body site, method, route, 2601 * etc.). This is the underlying object with id, value and 2602 * extensions. The accessor "getDescription" gives direct access to 2603 * the value 2604 */ 2605 public CarePlanActivityDetailComponent setDescriptionElement(StringType value) { 2606 this.description = value; 2607 return this; 2608 } 2609 2610 /** 2611 * @return This provides a textual description of constraints on the intended 2612 * activity occurrence, including relation to other activities. It may 2613 * also include objectives, pre-conditions and end-conditions. Finally, 2614 * it may convey specifics about the activity such as body site, method, 2615 * route, etc. 2616 */ 2617 public String getDescription() { 2618 return this.description == null ? null : this.description.getValue(); 2619 } 2620 2621 /** 2622 * @param value This provides a textual description of constraints on the 2623 * intended activity occurrence, including relation to other 2624 * activities. It may also include objectives, pre-conditions and 2625 * end-conditions. Finally, it may convey specifics about the 2626 * activity such as body site, method, route, etc. 2627 */ 2628 public CarePlanActivityDetailComponent setDescription(String value) { 2629 if (Utilities.noString(value)) 2630 this.description = null; 2631 else { 2632 if (this.description == null) 2633 this.description = new StringType(); 2634 this.description.setValue(value); 2635 } 2636 return this; 2637 } 2638 2639 protected void listChildren(List<Property> children) { 2640 super.listChildren(children); 2641 children.add(new Property("kind", "code", 2642 "A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.", 2643 0, 1, kind)); 2644 children.add(new Property("instantiatesCanonical", 2645 "canonical(PlanDefinition|ActivityDefinition|Questionnaire|Measure|OperationDefinition)", 2646 "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", 2647 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 2648 children.add(new Property("instantiatesUri", "uri", 2649 "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", 2650 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 2651 children.add(new Property("code", "CodeableConcept", 2652 "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.", 2653 0, 1, code)); 2654 children.add(new Property("reasonCode", "CodeableConcept", 2655 "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.", 2656 0, java.lang.Integer.MAX_VALUE, reasonCode)); 2657 children.add(new Property("reasonReference", 2658 "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", 2659 "Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.", 2660 0, java.lang.Integer.MAX_VALUE, reasonReference)); 2661 children.add(new Property("goal", "Reference(Goal)", 2662 "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", 2663 0, java.lang.Integer.MAX_VALUE, goal)); 2664 children.add(new Property("status", "code", "Identifies what progress is being made for the specific activity.", 2665 0, 1, status)); 2666 children.add(new Property("statusReason", "CodeableConcept", 2667 "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", 0, 1, statusReason)); 2668 children.add(new Property("doNotPerform", "boolean", 2669 "If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.", 2670 0, 1, doNotPerform)); 2671 children.add(new Property("scheduled[x]", "Timing|Period|string", 2672 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled)); 2673 children.add(new Property("location", "Reference(Location)", 2674 "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, 2675 location)); 2676 children.add(new Property("performer", 2677 "Reference(Practitioner|PractitionerRole|Organization|RelatedPerson|Patient|CareTeam|HealthcareService|Device)", 2678 "Identifies who's expected to be involved in the activity.", 0, java.lang.Integer.MAX_VALUE, performer)); 2679 children.add(new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", 2680 "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product)); 2681 children.add(new Property("dailyAmount", "SimpleQuantity", 2682 "Identifies the quantity expected to be consumed in a given day.", 0, 1, dailyAmount)); 2683 children.add(new Property("quantity", "SimpleQuantity", 2684 "Identifies the quantity expected to be supplied, administered or consumed by the subject.", 0, 1, quantity)); 2685 children.add(new Property("description", "string", 2686 "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", 2687 0, 1, description)); 2688 } 2689 2690 @Override 2691 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2692 switch (_hash) { 2693 case 3292052: 2694 /* kind */ return new Property("kind", "code", 2695 "A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.", 2696 0, 1, kind); 2697 case 8911915: 2698 /* instantiatesCanonical */ return new Property("instantiatesCanonical", 2699 "canonical(PlanDefinition|ActivityDefinition|Questionnaire|Measure|OperationDefinition)", 2700 "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", 2701 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 2702 case -1926393373: 2703 /* instantiatesUri */ return new Property("instantiatesUri", "uri", 2704 "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.", 2705 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 2706 case 3059181: 2707 /* code */ return new Property("code", "CodeableConcept", 2708 "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.", 2709 0, 1, code); 2710 case 722137681: 2711 /* reasonCode */ return new Property("reasonCode", "CodeableConcept", 2712 "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.", 2713 0, java.lang.Integer.MAX_VALUE, reasonCode); 2714 case -1146218137: 2715 /* reasonReference */ return new Property("reasonReference", 2716 "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", 2717 "Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.", 2718 0, java.lang.Integer.MAX_VALUE, reasonReference); 2719 case 3178259: 2720 /* goal */ return new Property("goal", "Reference(Goal)", 2721 "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", 2722 0, java.lang.Integer.MAX_VALUE, goal); 2723 case -892481550: 2724 /* status */ return new Property("status", "code", 2725 "Identifies what progress is being made for the specific activity.", 0, 1, status); 2726 case 2051346646: 2727 /* statusReason */ return new Property("statusReason", "CodeableConcept", 2728 "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", 0, 1, statusReason); 2729 case -1788508167: 2730 /* doNotPerform */ return new Property("doNotPerform", "boolean", 2731 "If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.", 2732 0, 1, doNotPerform); 2733 case 1162627251: 2734 /* scheduled[x] */ return new Property("scheduled[x]", "Timing|Period|string", 2735 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 2736 case -160710483: 2737 /* scheduled */ return new Property("scheduled[x]", "Timing|Period|string", 2738 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 2739 case 998483799: 2740 /* scheduledTiming */ return new Property("scheduled[x]", "Timing|Period|string", 2741 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 2742 case 880422094: 2743 /* scheduledPeriod */ return new Property("scheduled[x]", "Timing|Period|string", 2744 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 2745 case 980162334: 2746 /* scheduledString */ return new Property("scheduled[x]", "Timing|Period|string", 2747 "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 2748 case 1901043637: 2749 /* location */ return new Property("location", "Reference(Location)", 2750 "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, 2751 location); 2752 case 481140686: 2753 /* performer */ return new Property("performer", 2754 "Reference(Practitioner|PractitionerRole|Organization|RelatedPerson|Patient|CareTeam|HealthcareService|Device)", 2755 "Identifies who's expected to be involved in the activity.", 0, java.lang.Integer.MAX_VALUE, performer); 2756 case 1753005361: 2757 /* product[x] */ return new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", 2758 "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 2759 case -309474065: 2760 /* product */ return new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", 2761 "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 2762 case 906854066: 2763 /* productCodeableConcept */ return new Property("product[x]", 2764 "CodeableConcept|Reference(Medication|Substance)", 2765 "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 2766 case -669667556: 2767 /* productReference */ return new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", 2768 "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 2769 case -768908335: 2770 /* dailyAmount */ return new Property("dailyAmount", "SimpleQuantity", 2771 "Identifies the quantity expected to be consumed in a given day.", 0, 1, dailyAmount); 2772 case -1285004149: 2773 /* quantity */ return new Property("quantity", "SimpleQuantity", 2774 "Identifies the quantity expected to be supplied, administered or consumed by the subject.", 0, 1, 2775 quantity); 2776 case -1724546052: 2777 /* description */ return new Property("description", "string", 2778 "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.", 2779 0, 1, description); 2780 default: 2781 return super.getNamedProperty(_hash, _name, _checkValid); 2782 } 2783 2784 } 2785 2786 @Override 2787 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2788 switch (hash) { 2789 case 3292052: 2790 /* kind */ return this.kind == null ? new Base[0] : new Base[] { this.kind }; // Enumeration<CarePlanActivityKind> 2791 case 8911915: 2792 /* instantiatesCanonical */ return this.instantiatesCanonical == null ? new Base[0] 2793 : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 2794 case -1926393373: 2795 /* instantiatesUri */ return this.instantiatesUri == null ? new Base[0] 2796 : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 2797 case 3059181: 2798 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeableConcept 2799 case 722137681: 2800 /* reasonCode */ return this.reasonCode == null ? new Base[0] 2801 : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 2802 case -1146218137: 2803 /* reasonReference */ return this.reasonReference == null ? new Base[0] 2804 : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 2805 case 3178259: 2806 /* goal */ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference 2807 case -892481550: 2808 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<CarePlanActivityStatus> 2809 case 2051346646: 2810 /* statusReason */ return this.statusReason == null ? new Base[0] : new Base[] { this.statusReason }; // CodeableConcept 2811 case -1788508167: 2812 /* doNotPerform */ return this.doNotPerform == null ? new Base[0] : new Base[] { this.doNotPerform }; // BooleanType 2813 case -160710483: 2814 /* scheduled */ return this.scheduled == null ? new Base[0] : new Base[] { this.scheduled }; // Type 2815 case 1901043637: 2816 /* location */ return this.location == null ? new Base[0] : new Base[] { this.location }; // Reference 2817 case 481140686: 2818 /* performer */ return this.performer == null ? new Base[0] 2819 : this.performer.toArray(new Base[this.performer.size()]); // Reference 2820 case -309474065: 2821 /* product */ return this.product == null ? new Base[0] : new Base[] { this.product }; // Type 2822 case -768908335: 2823 /* dailyAmount */ return this.dailyAmount == null ? new Base[0] : new Base[] { this.dailyAmount }; // Quantity 2824 case -1285004149: 2825 /* quantity */ return this.quantity == null ? new Base[0] : new Base[] { this.quantity }; // Quantity 2826 case -1724546052: 2827 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 2828 default: 2829 return super.getProperty(hash, name, checkValid); 2830 } 2831 2832 } 2833 2834 @Override 2835 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2836 switch (hash) { 2837 case 3292052: // kind 2838 value = new CarePlanActivityKindEnumFactory().fromType(castToCode(value)); 2839 this.kind = (Enumeration) value; // Enumeration<CarePlanActivityKind> 2840 return value; 2841 case 8911915: // instantiatesCanonical 2842 this.getInstantiatesCanonical().add(castToCanonical(value)); // CanonicalType 2843 return value; 2844 case -1926393373: // instantiatesUri 2845 this.getInstantiatesUri().add(castToUri(value)); // UriType 2846 return value; 2847 case 3059181: // code 2848 this.code = castToCodeableConcept(value); // CodeableConcept 2849 return value; 2850 case 722137681: // reasonCode 2851 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 2852 return value; 2853 case -1146218137: // reasonReference 2854 this.getReasonReference().add(castToReference(value)); // Reference 2855 return value; 2856 case 3178259: // goal 2857 this.getGoal().add(castToReference(value)); // Reference 2858 return value; 2859 case -892481550: // status 2860 value = new CarePlanActivityStatusEnumFactory().fromType(castToCode(value)); 2861 this.status = (Enumeration) value; // Enumeration<CarePlanActivityStatus> 2862 return value; 2863 case 2051346646: // statusReason 2864 this.statusReason = castToCodeableConcept(value); // CodeableConcept 2865 return value; 2866 case -1788508167: // doNotPerform 2867 this.doNotPerform = castToBoolean(value); // BooleanType 2868 return value; 2869 case -160710483: // scheduled 2870 this.scheduled = castToType(value); // Type 2871 return value; 2872 case 1901043637: // location 2873 this.location = castToReference(value); // Reference 2874 return value; 2875 case 481140686: // performer 2876 this.getPerformer().add(castToReference(value)); // Reference 2877 return value; 2878 case -309474065: // product 2879 this.product = castToType(value); // Type 2880 return value; 2881 case -768908335: // dailyAmount 2882 this.dailyAmount = castToQuantity(value); // Quantity 2883 return value; 2884 case -1285004149: // quantity 2885 this.quantity = castToQuantity(value); // Quantity 2886 return value; 2887 case -1724546052: // description 2888 this.description = castToString(value); // StringType 2889 return value; 2890 default: 2891 return super.setProperty(hash, name, value); 2892 } 2893 2894 } 2895 2896 @Override 2897 public Base setProperty(String name, Base value) throws FHIRException { 2898 if (name.equals("kind")) { 2899 value = new CarePlanActivityKindEnumFactory().fromType(castToCode(value)); 2900 this.kind = (Enumeration) value; // Enumeration<CarePlanActivityKind> 2901 } else if (name.equals("instantiatesCanonical")) { 2902 this.getInstantiatesCanonical().add(castToCanonical(value)); 2903 } else if (name.equals("instantiatesUri")) { 2904 this.getInstantiatesUri().add(castToUri(value)); 2905 } else if (name.equals("code")) { 2906 this.code = castToCodeableConcept(value); // CodeableConcept 2907 } else if (name.equals("reasonCode")) { 2908 this.getReasonCode().add(castToCodeableConcept(value)); 2909 } else if (name.equals("reasonReference")) { 2910 this.getReasonReference().add(castToReference(value)); 2911 } else if (name.equals("goal")) { 2912 this.getGoal().add(castToReference(value)); 2913 } else if (name.equals("status")) { 2914 value = new CarePlanActivityStatusEnumFactory().fromType(castToCode(value)); 2915 this.status = (Enumeration) value; // Enumeration<CarePlanActivityStatus> 2916 } else if (name.equals("statusReason")) { 2917 this.statusReason = castToCodeableConcept(value); // CodeableConcept 2918 } else if (name.equals("doNotPerform")) { 2919 this.doNotPerform = castToBoolean(value); // BooleanType 2920 } else if (name.equals("scheduled[x]")) { 2921 this.scheduled = castToType(value); // Type 2922 } else if (name.equals("location")) { 2923 this.location = castToReference(value); // Reference 2924 } else if (name.equals("performer")) { 2925 this.getPerformer().add(castToReference(value)); 2926 } else if (name.equals("product[x]")) { 2927 this.product = castToType(value); // Type 2928 } else if (name.equals("dailyAmount")) { 2929 this.dailyAmount = castToQuantity(value); // Quantity 2930 } else if (name.equals("quantity")) { 2931 this.quantity = castToQuantity(value); // Quantity 2932 } else if (name.equals("description")) { 2933 this.description = castToString(value); // StringType 2934 } else 2935 return super.setProperty(name, value); 2936 return value; 2937 } 2938 2939 @Override 2940 public void removeChild(String name, Base value) throws FHIRException { 2941 if (name.equals("kind")) { 2942 this.kind = null; 2943 } else if (name.equals("instantiatesCanonical")) { 2944 this.getInstantiatesCanonical().remove(castToCanonical(value)); 2945 } else if (name.equals("instantiatesUri")) { 2946 this.getInstantiatesUri().remove(castToUri(value)); 2947 } else if (name.equals("code")) { 2948 this.code = null; 2949 } else if (name.equals("reasonCode")) { 2950 this.getReasonCode().remove(castToCodeableConcept(value)); 2951 } else if (name.equals("reasonReference")) { 2952 this.getReasonReference().remove(castToReference(value)); 2953 } else if (name.equals("goal")) { 2954 this.getGoal().remove(castToReference(value)); 2955 } else if (name.equals("status")) { 2956 this.status = null; 2957 } else if (name.equals("statusReason")) { 2958 this.statusReason = null; 2959 } else if (name.equals("doNotPerform")) { 2960 this.doNotPerform = null; 2961 } else if (name.equals("scheduled[x]")) { 2962 this.scheduled = null; 2963 } else if (name.equals("location")) { 2964 this.location = null; 2965 } else if (name.equals("performer")) { 2966 this.getPerformer().remove(castToReference(value)); 2967 } else if (name.equals("product[x]")) { 2968 this.product = null; 2969 } else if (name.equals("dailyAmount")) { 2970 this.dailyAmount = null; 2971 } else if (name.equals("quantity")) { 2972 this.quantity = null; 2973 } else if (name.equals("description")) { 2974 this.description = null; 2975 } else 2976 super.removeChild(name, value); 2977 2978 } 2979 2980 @Override 2981 public Base makeProperty(int hash, String name) throws FHIRException { 2982 switch (hash) { 2983 case 3292052: 2984 return getKindElement(); 2985 case 8911915: 2986 return addInstantiatesCanonicalElement(); 2987 case -1926393373: 2988 return addInstantiatesUriElement(); 2989 case 3059181: 2990 return getCode(); 2991 case 722137681: 2992 return addReasonCode(); 2993 case -1146218137: 2994 return addReasonReference(); 2995 case 3178259: 2996 return addGoal(); 2997 case -892481550: 2998 return getStatusElement(); 2999 case 2051346646: 3000 return getStatusReason(); 3001 case -1788508167: 3002 return getDoNotPerformElement(); 3003 case 1162627251: 3004 return getScheduled(); 3005 case -160710483: 3006 return getScheduled(); 3007 case 1901043637: 3008 return getLocation(); 3009 case 481140686: 3010 return addPerformer(); 3011 case 1753005361: 3012 return getProduct(); 3013 case -309474065: 3014 return getProduct(); 3015 case -768908335: 3016 return getDailyAmount(); 3017 case -1285004149: 3018 return getQuantity(); 3019 case -1724546052: 3020 return getDescriptionElement(); 3021 default: 3022 return super.makeProperty(hash, name); 3023 } 3024 3025 } 3026 3027 @Override 3028 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3029 switch (hash) { 3030 case 3292052: 3031 /* kind */ return new String[] { "code" }; 3032 case 8911915: 3033 /* instantiatesCanonical */ return new String[] { "canonical" }; 3034 case -1926393373: 3035 /* instantiatesUri */ return new String[] { "uri" }; 3036 case 3059181: 3037 /* code */ return new String[] { "CodeableConcept" }; 3038 case 722137681: 3039 /* reasonCode */ return new String[] { "CodeableConcept" }; 3040 case -1146218137: 3041 /* reasonReference */ return new String[] { "Reference" }; 3042 case 3178259: 3043 /* goal */ return new String[] { "Reference" }; 3044 case -892481550: 3045 /* status */ return new String[] { "code" }; 3046 case 2051346646: 3047 /* statusReason */ return new String[] { "CodeableConcept" }; 3048 case -1788508167: 3049 /* doNotPerform */ return new String[] { "boolean" }; 3050 case -160710483: 3051 /* scheduled */ return new String[] { "Timing", "Period", "string" }; 3052 case 1901043637: 3053 /* location */ return new String[] { "Reference" }; 3054 case 481140686: 3055 /* performer */ return new String[] { "Reference" }; 3056 case -309474065: 3057 /* product */ return new String[] { "CodeableConcept", "Reference" }; 3058 case -768908335: 3059 /* dailyAmount */ return new String[] { "SimpleQuantity" }; 3060 case -1285004149: 3061 /* quantity */ return new String[] { "SimpleQuantity" }; 3062 case -1724546052: 3063 /* description */ return new String[] { "string" }; 3064 default: 3065 return super.getTypesForProperty(hash, name); 3066 } 3067 3068 } 3069 3070 @Override 3071 public Base addChild(String name) throws FHIRException { 3072 if (name.equals("kind")) { 3073 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.kind"); 3074 } else if (name.equals("instantiatesCanonical")) { 3075 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesCanonical"); 3076 } else if (name.equals("instantiatesUri")) { 3077 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesUri"); 3078 } else if (name.equals("code")) { 3079 this.code = new CodeableConcept(); 3080 return this.code; 3081 } else if (name.equals("reasonCode")) { 3082 return addReasonCode(); 3083 } else if (name.equals("reasonReference")) { 3084 return addReasonReference(); 3085 } else if (name.equals("goal")) { 3086 return addGoal(); 3087 } else if (name.equals("status")) { 3088 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.status"); 3089 } else if (name.equals("statusReason")) { 3090 this.statusReason = new CodeableConcept(); 3091 return this.statusReason; 3092 } else if (name.equals("doNotPerform")) { 3093 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.doNotPerform"); 3094 } else if (name.equals("scheduledTiming")) { 3095 this.scheduled = new Timing(); 3096 return this.scheduled; 3097 } else if (name.equals("scheduledPeriod")) { 3098 this.scheduled = new Period(); 3099 return this.scheduled; 3100 } else if (name.equals("scheduledString")) { 3101 this.scheduled = new StringType(); 3102 return this.scheduled; 3103 } else if (name.equals("location")) { 3104 this.location = new Reference(); 3105 return this.location; 3106 } else if (name.equals("performer")) { 3107 return addPerformer(); 3108 } else if (name.equals("productCodeableConcept")) { 3109 this.product = new CodeableConcept(); 3110 return this.product; 3111 } else if (name.equals("productReference")) { 3112 this.product = new Reference(); 3113 return this.product; 3114 } else if (name.equals("dailyAmount")) { 3115 this.dailyAmount = new Quantity(); 3116 return this.dailyAmount; 3117 } else if (name.equals("quantity")) { 3118 this.quantity = new Quantity(); 3119 return this.quantity; 3120 } else if (name.equals("description")) { 3121 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.description"); 3122 } else 3123 return super.addChild(name); 3124 } 3125 3126 public CarePlanActivityDetailComponent copy() { 3127 CarePlanActivityDetailComponent dst = new CarePlanActivityDetailComponent(); 3128 copyValues(dst); 3129 return dst; 3130 } 3131 3132 public void copyValues(CarePlanActivityDetailComponent dst) { 3133 super.copyValues(dst); 3134 dst.kind = kind == null ? null : kind.copy(); 3135 if (instantiatesCanonical != null) { 3136 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 3137 for (CanonicalType i : instantiatesCanonical) 3138 dst.instantiatesCanonical.add(i.copy()); 3139 } 3140 ; 3141 if (instantiatesUri != null) { 3142 dst.instantiatesUri = new ArrayList<UriType>(); 3143 for (UriType i : instantiatesUri) 3144 dst.instantiatesUri.add(i.copy()); 3145 } 3146 ; 3147 dst.code = code == null ? null : code.copy(); 3148 if (reasonCode != null) { 3149 dst.reasonCode = new ArrayList<CodeableConcept>(); 3150 for (CodeableConcept i : reasonCode) 3151 dst.reasonCode.add(i.copy()); 3152 } 3153 ; 3154 if (reasonReference != null) { 3155 dst.reasonReference = new ArrayList<Reference>(); 3156 for (Reference i : reasonReference) 3157 dst.reasonReference.add(i.copy()); 3158 } 3159 ; 3160 if (goal != null) { 3161 dst.goal = new ArrayList<Reference>(); 3162 for (Reference i : goal) 3163 dst.goal.add(i.copy()); 3164 } 3165 ; 3166 dst.status = status == null ? null : status.copy(); 3167 dst.statusReason = statusReason == null ? null : statusReason.copy(); 3168 dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy(); 3169 dst.scheduled = scheduled == null ? null : scheduled.copy(); 3170 dst.location = location == null ? null : location.copy(); 3171 if (performer != null) { 3172 dst.performer = new ArrayList<Reference>(); 3173 for (Reference i : performer) 3174 dst.performer.add(i.copy()); 3175 } 3176 ; 3177 dst.product = product == null ? null : product.copy(); 3178 dst.dailyAmount = dailyAmount == null ? null : dailyAmount.copy(); 3179 dst.quantity = quantity == null ? null : quantity.copy(); 3180 dst.description = description == null ? null : description.copy(); 3181 } 3182 3183 @Override 3184 public boolean equalsDeep(Base other_) { 3185 if (!super.equalsDeep(other_)) 3186 return false; 3187 if (!(other_ instanceof CarePlanActivityDetailComponent)) 3188 return false; 3189 CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other_; 3190 return compareDeep(kind, o.kind, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 3191 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(code, o.code, true) 3192 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 3193 && compareDeep(goal, o.goal, true) && compareDeep(status, o.status, true) 3194 && compareDeep(statusReason, o.statusReason, true) && compareDeep(doNotPerform, o.doNotPerform, true) 3195 && compareDeep(scheduled, o.scheduled, true) && compareDeep(location, o.location, true) 3196 && compareDeep(performer, o.performer, true) && compareDeep(product, o.product, true) 3197 && compareDeep(dailyAmount, o.dailyAmount, true) && compareDeep(quantity, o.quantity, true) 3198 && compareDeep(description, o.description, true); 3199 } 3200 3201 @Override 3202 public boolean equalsShallow(Base other_) { 3203 if (!super.equalsShallow(other_)) 3204 return false; 3205 if (!(other_ instanceof CarePlanActivityDetailComponent)) 3206 return false; 3207 CarePlanActivityDetailComponent o = (CarePlanActivityDetailComponent) other_; 3208 return compareValues(kind, o.kind, true) && compareValues(instantiatesUri, o.instantiatesUri, true) 3209 && compareValues(status, o.status, true) && compareValues(doNotPerform, o.doNotPerform, true) 3210 && compareValues(description, o.description, true); 3211 } 3212 3213 public boolean isEmpty() { 3214 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, instantiatesCanonical, instantiatesUri, code, 3215 reasonCode, reasonReference, goal, status, statusReason, doNotPerform, scheduled, location, performer, 3216 product, dailyAmount, quantity, description); 3217 } 3218 3219 public String fhirType() { 3220 return "CarePlan.activity.detail"; 3221 3222 } 3223 3224 } 3225 3226 /** 3227 * Business identifiers assigned to this care plan by the performer or other 3228 * systems which remain constant as the resource is updated and propagates from 3229 * server to server. 3230 */ 3231 @Child(name = "identifier", type = { 3232 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3233 @Description(shortDefinition = "External Ids for this plan", formalDefinition = "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.") 3234 protected List<Identifier> identifier; 3235 3236 /** 3237 * The URL pointing to a FHIR-defined protocol, guideline, questionnaire or 3238 * other definition that is adhered to in whole or in part by this CarePlan. 3239 */ 3240 @Child(name = "instantiatesCanonical", type = { 3241 CanonicalType.class }, order = 1, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3242 @Description(shortDefinition = "Instantiates FHIR protocol or definition", formalDefinition = "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.") 3243 protected List<CanonicalType> instantiatesCanonical; 3244 3245 /** 3246 * The URL pointing to an externally maintained protocol, guideline, 3247 * questionnaire or other definition that is adhered to in whole or in part by 3248 * this CarePlan. 3249 */ 3250 @Child(name = "instantiatesUri", type = { 3251 UriType.class }, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3252 @Description(shortDefinition = "Instantiates external protocol or definition", formalDefinition = "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.") 3253 protected List<UriType> instantiatesUri; 3254 3255 /** 3256 * A care plan that is fulfilled in whole or in part by this care plan. 3257 */ 3258 @Child(name = "basedOn", type = { 3259 CarePlan.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3260 @Description(shortDefinition = "Fulfills CarePlan", formalDefinition = "A care plan that is fulfilled in whole or in part by this care plan.") 3261 protected List<Reference> basedOn; 3262 /** 3263 * The actual objects that are the target of the reference (A care plan that is 3264 * fulfilled in whole or in part by this care plan.) 3265 */ 3266 protected List<CarePlan> basedOnTarget; 3267 3268 /** 3269 * Completed or terminated care plan whose function is taken by this new care 3270 * plan. 3271 */ 3272 @Child(name = "replaces", type = { 3273 CarePlan.class }, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3274 @Description(shortDefinition = "CarePlan replaced by this CarePlan", formalDefinition = "Completed or terminated care plan whose function is taken by this new care plan.") 3275 protected List<Reference> replaces; 3276 /** 3277 * The actual objects that are the target of the reference (Completed or 3278 * terminated care plan whose function is taken by this new care plan.) 3279 */ 3280 protected List<CarePlan> replacesTarget; 3281 3282 /** 3283 * A larger care plan of which this particular care plan is a component or step. 3284 */ 3285 @Child(name = "partOf", type = { 3286 CarePlan.class }, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3287 @Description(shortDefinition = "Part of referenced CarePlan", formalDefinition = "A larger care plan of which this particular care plan is a component or step.") 3288 protected List<Reference> partOf; 3289 /** 3290 * The actual objects that are the target of the reference (A larger care plan 3291 * of which this particular care plan is a component or step.) 3292 */ 3293 protected List<CarePlan> partOfTarget; 3294 3295 /** 3296 * Indicates whether the plan is currently being acted upon, represents future 3297 * intentions or is now a historical record. 3298 */ 3299 @Child(name = "status", type = { CodeType.class }, order = 6, min = 1, max = 1, modifier = true, summary = true) 3300 @Description(shortDefinition = "draft | active | on-hold | revoked | completed | entered-in-error | unknown", formalDefinition = "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.") 3301 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-status") 3302 protected Enumeration<CarePlanStatus> status; 3303 3304 /** 3305 * Indicates the level of authority/intentionality associated with the care plan 3306 * and where the care plan fits into the workflow chain. 3307 */ 3308 @Child(name = "intent", type = { CodeType.class }, order = 7, min = 1, max = 1, modifier = true, summary = true) 3309 @Description(shortDefinition = "proposal | plan | order | option", formalDefinition = "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.") 3310 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/care-plan-intent") 3311 protected Enumeration<CarePlanIntent> intent; 3312 3313 /** 3314 * Identifies what "kind" of plan this is to support differentiation between 3315 * multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", 3316 * "disease management", "wellness plan", etc. 3317 */ 3318 @Child(name = "category", type = { 3319 CodeableConcept.class }, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3320 @Description(shortDefinition = "Type of plan", formalDefinition = "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.") 3321 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/care-plan-category") 3322 protected List<CodeableConcept> category; 3323 3324 /** 3325 * Human-friendly name for the care plan. 3326 */ 3327 @Child(name = "title", type = { StringType.class }, order = 9, min = 0, max = 1, modifier = false, summary = true) 3328 @Description(shortDefinition = "Human-friendly name for the care plan", formalDefinition = "Human-friendly name for the care plan.") 3329 protected StringType title; 3330 3331 /** 3332 * A description of the scope and nature of the plan. 3333 */ 3334 @Child(name = "description", type = { 3335 StringType.class }, order = 10, min = 0, max = 1, modifier = false, summary = true) 3336 @Description(shortDefinition = "Summary of nature of plan", formalDefinition = "A description of the scope and nature of the plan.") 3337 protected StringType description; 3338 3339 /** 3340 * Identifies the patient or group whose intended care is described by the plan. 3341 */ 3342 @Child(name = "subject", type = { Patient.class, 3343 Group.class }, order = 11, min = 1, max = 1, modifier = false, summary = true) 3344 @Description(shortDefinition = "Who the care plan is for", formalDefinition = "Identifies the patient or group whose intended care is described by the plan.") 3345 protected Reference subject; 3346 3347 /** 3348 * The actual object that is the target of the reference (Identifies the patient 3349 * or group whose intended care is described by the plan.) 3350 */ 3351 protected Resource subjectTarget; 3352 3353 /** 3354 * The Encounter during which this CarePlan was created or to which the creation 3355 * of this record is tightly associated. 3356 */ 3357 @Child(name = "encounter", type = { Encounter.class }, order = 12, min = 0, max = 1, modifier = false, summary = true) 3358 @Description(shortDefinition = "Encounter created as part of", formalDefinition = "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.") 3359 protected Reference encounter; 3360 3361 /** 3362 * The actual object that is the target of the reference (The Encounter during 3363 * which this CarePlan was created or to which the creation of this record is 3364 * tightly associated.) 3365 */ 3366 protected Encounter encounterTarget; 3367 3368 /** 3369 * Indicates when the plan did (or is intended to) come into effect and end. 3370 */ 3371 @Child(name = "period", type = { Period.class }, order = 13, min = 0, max = 1, modifier = false, summary = true) 3372 @Description(shortDefinition = "Time period plan covers", formalDefinition = "Indicates when the plan did (or is intended to) come into effect and end.") 3373 protected Period period; 3374 3375 /** 3376 * Represents when this particular CarePlan record was created in the system, 3377 * which is often a system-generated date. 3378 */ 3379 @Child(name = "created", type = { 3380 DateTimeType.class }, order = 14, min = 0, max = 1, modifier = false, summary = true) 3381 @Description(shortDefinition = "Date record was first recorded", formalDefinition = "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.") 3382 protected DateTimeType created; 3383 3384 /** 3385 * When populated, the author is responsible for the care plan. The care plan is 3386 * attributed to the author. 3387 */ 3388 @Child(name = "author", type = { Patient.class, Practitioner.class, PractitionerRole.class, Device.class, 3389 RelatedPerson.class, Organization.class, 3390 CareTeam.class }, order = 15, min = 0, max = 1, modifier = false, summary = true) 3391 @Description(shortDefinition = "Who is the designated responsible party", formalDefinition = "When populated, the author is responsible for the care plan. The care plan is attributed to the author.") 3392 protected Reference author; 3393 3394 /** 3395 * The actual object that is the target of the reference (When populated, the 3396 * author is responsible for the care plan. The care plan is attributed to the 3397 * author.) 3398 */ 3399 protected Resource authorTarget; 3400 3401 /** 3402 * Identifies the individual(s) or organization who provided the contents of the 3403 * care plan. 3404 */ 3405 @Child(name = "contributor", type = { Patient.class, Practitioner.class, PractitionerRole.class, Device.class, 3406 RelatedPerson.class, Organization.class, 3407 CareTeam.class }, order = 16, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3408 @Description(shortDefinition = "Who provided the content of the care plan", formalDefinition = "Identifies the individual(s) or organization who provided the contents of the care plan.") 3409 protected List<Reference> contributor; 3410 /** 3411 * The actual objects that are the target of the reference (Identifies the 3412 * individual(s) or organization who provided the contents of the care plan.) 3413 */ 3414 protected List<Resource> contributorTarget; 3415 3416 /** 3417 * Identifies all people and organizations who are expected to be involved in 3418 * the care envisioned by this plan. 3419 */ 3420 @Child(name = "careTeam", type = { 3421 CareTeam.class }, order = 17, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3422 @Description(shortDefinition = "Who's involved in plan?", formalDefinition = "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.") 3423 protected List<Reference> careTeam; 3424 /** 3425 * The actual objects that are the target of the reference (Identifies all 3426 * people and organizations who are expected to be involved in the care 3427 * envisioned by this plan.) 3428 */ 3429 protected List<CareTeam> careTeamTarget; 3430 3431 /** 3432 * Identifies the conditions/problems/concerns/diagnoses/etc. whose management 3433 * and/or mitigation are handled by this plan. 3434 */ 3435 @Child(name = "addresses", type = { 3436 Condition.class }, order = 18, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3437 @Description(shortDefinition = "Health issues this plan addresses", formalDefinition = "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.") 3438 protected List<Reference> addresses; 3439 /** 3440 * The actual objects that are the target of the reference (Identifies the 3441 * conditions/problems/concerns/diagnoses/etc. whose management and/or 3442 * mitigation are handled by this plan.) 3443 */ 3444 protected List<Condition> addressesTarget; 3445 3446 /** 3447 * Identifies portions of the patient's record that specifically influenced the 3448 * formation of the plan. These might include comorbidities, recent procedures, 3449 * limitations, recent assessments, etc. 3450 */ 3451 @Child(name = "supportingInfo", type = { 3452 Reference.class }, order = 19, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3453 @Description(shortDefinition = "Information considered as part of plan", formalDefinition = "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.") 3454 protected List<Reference> supportingInfo; 3455 /** 3456 * The actual objects that are the target of the reference (Identifies portions 3457 * of the patient's record that specifically influenced the formation of the 3458 * plan. These might include comorbidities, recent procedures, limitations, 3459 * recent assessments, etc.) 3460 */ 3461 protected List<Resource> supportingInfoTarget; 3462 3463 /** 3464 * Describes the intended objective(s) of carrying out the care plan. 3465 */ 3466 @Child(name = "goal", type = { 3467 Goal.class }, order = 20, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3468 @Description(shortDefinition = "Desired outcome of plan", formalDefinition = "Describes the intended objective(s) of carrying out the care plan.") 3469 protected List<Reference> goal; 3470 /** 3471 * The actual objects that are the target of the reference (Describes the 3472 * intended objective(s) of carrying out the care plan.) 3473 */ 3474 protected List<Goal> goalTarget; 3475 3476 /** 3477 * Identifies a planned action to occur as part of the plan. For example, a 3478 * medication to be used, lab tests to perform, self-monitoring, education, etc. 3479 */ 3480 @Child(name = "activity", type = {}, order = 21, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3481 @Description(shortDefinition = "Action to occur as part of plan", formalDefinition = "Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.") 3482 protected List<CarePlanActivityComponent> activity; 3483 3484 /** 3485 * General notes about the care plan not covered elsewhere. 3486 */ 3487 @Child(name = "note", type = { 3488 Annotation.class }, order = 22, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3489 @Description(shortDefinition = "Comments about the plan", formalDefinition = "General notes about the care plan not covered elsewhere.") 3490 protected List<Annotation> note; 3491 3492 private static final long serialVersionUID = -584930613L; 3493 3494 /** 3495 * Constructor 3496 */ 3497 public CarePlan() { 3498 super(); 3499 } 3500 3501 /** 3502 * Constructor 3503 */ 3504 public CarePlan(Enumeration<CarePlanStatus> status, Enumeration<CarePlanIntent> intent, Reference subject) { 3505 super(); 3506 this.status = status; 3507 this.intent = intent; 3508 this.subject = subject; 3509 } 3510 3511 /** 3512 * @return {@link #identifier} (Business identifiers assigned to this care plan 3513 * by the performer or other systems which remain constant as the 3514 * resource is updated and propagates from server to server.) 3515 */ 3516 public List<Identifier> getIdentifier() { 3517 if (this.identifier == null) 3518 this.identifier = new ArrayList<Identifier>(); 3519 return this.identifier; 3520 } 3521 3522 /** 3523 * @return Returns a reference to <code>this</code> for easy method chaining 3524 */ 3525 public CarePlan setIdentifier(List<Identifier> theIdentifier) { 3526 this.identifier = theIdentifier; 3527 return this; 3528 } 3529 3530 public boolean hasIdentifier() { 3531 if (this.identifier == null) 3532 return false; 3533 for (Identifier item : this.identifier) 3534 if (!item.isEmpty()) 3535 return true; 3536 return false; 3537 } 3538 3539 public Identifier addIdentifier() { // 3 3540 Identifier t = new Identifier(); 3541 if (this.identifier == null) 3542 this.identifier = new ArrayList<Identifier>(); 3543 this.identifier.add(t); 3544 return t; 3545 } 3546 3547 public CarePlan addIdentifier(Identifier t) { // 3 3548 if (t == null) 3549 return this; 3550 if (this.identifier == null) 3551 this.identifier = new ArrayList<Identifier>(); 3552 this.identifier.add(t); 3553 return this; 3554 } 3555 3556 /** 3557 * @return The first repetition of repeating field {@link #identifier}, creating 3558 * it if it does not already exist 3559 */ 3560 public Identifier getIdentifierFirstRep() { 3561 if (getIdentifier().isEmpty()) { 3562 addIdentifier(); 3563 } 3564 return getIdentifier().get(0); 3565 } 3566 3567 /** 3568 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined 3569 * protocol, guideline, questionnaire or other definition that is 3570 * adhered to in whole or in part by this CarePlan.) 3571 */ 3572 public List<CanonicalType> getInstantiatesCanonical() { 3573 if (this.instantiatesCanonical == null) 3574 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3575 return this.instantiatesCanonical; 3576 } 3577 3578 /** 3579 * @return Returns a reference to <code>this</code> for easy method chaining 3580 */ 3581 public CarePlan setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 3582 this.instantiatesCanonical = theInstantiatesCanonical; 3583 return this; 3584 } 3585 3586 public boolean hasInstantiatesCanonical() { 3587 if (this.instantiatesCanonical == null) 3588 return false; 3589 for (CanonicalType item : this.instantiatesCanonical) 3590 if (!item.isEmpty()) 3591 return true; 3592 return false; 3593 } 3594 3595 /** 3596 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined 3597 * protocol, guideline, questionnaire or other definition that is 3598 * adhered to in whole or in part by this CarePlan.) 3599 */ 3600 public CanonicalType addInstantiatesCanonicalElement() {// 2 3601 CanonicalType t = new CanonicalType(); 3602 if (this.instantiatesCanonical == null) 3603 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3604 this.instantiatesCanonical.add(t); 3605 return t; 3606 } 3607 3608 /** 3609 * @param value {@link #instantiatesCanonical} (The URL pointing to a 3610 * FHIR-defined protocol, guideline, questionnaire or other 3611 * definition that is adhered to in whole or in part by this 3612 * CarePlan.) 3613 */ 3614 public CarePlan addInstantiatesCanonical(String value) { // 1 3615 CanonicalType t = new CanonicalType(); 3616 t.setValue(value); 3617 if (this.instantiatesCanonical == null) 3618 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3619 this.instantiatesCanonical.add(t); 3620 return this; 3621 } 3622 3623 /** 3624 * @param value {@link #instantiatesCanonical} (The URL pointing to a 3625 * FHIR-defined protocol, guideline, questionnaire or other 3626 * definition that is adhered to in whole or in part by this 3627 * CarePlan.) 3628 */ 3629 public boolean hasInstantiatesCanonical(String value) { 3630 if (this.instantiatesCanonical == null) 3631 return false; 3632 for (CanonicalType v : this.instantiatesCanonical) 3633 if (v.getValue().equals(value)) // canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition) 3634 return true; 3635 return false; 3636 } 3637 3638 /** 3639 * @return {@link #instantiatesUri} (The URL pointing to an externally 3640 * maintained protocol, guideline, questionnaire or other definition 3641 * that is adhered to in whole or in part by this CarePlan.) 3642 */ 3643 public List<UriType> getInstantiatesUri() { 3644 if (this.instantiatesUri == null) 3645 this.instantiatesUri = new ArrayList<UriType>(); 3646 return this.instantiatesUri; 3647 } 3648 3649 /** 3650 * @return Returns a reference to <code>this</code> for easy method chaining 3651 */ 3652 public CarePlan setInstantiatesUri(List<UriType> theInstantiatesUri) { 3653 this.instantiatesUri = theInstantiatesUri; 3654 return this; 3655 } 3656 3657 public boolean hasInstantiatesUri() { 3658 if (this.instantiatesUri == null) 3659 return false; 3660 for (UriType item : this.instantiatesUri) 3661 if (!item.isEmpty()) 3662 return true; 3663 return false; 3664 } 3665 3666 /** 3667 * @return {@link #instantiatesUri} (The URL pointing to an externally 3668 * maintained protocol, guideline, questionnaire or other definition 3669 * that is adhered to in whole or in part by this CarePlan.) 3670 */ 3671 public UriType addInstantiatesUriElement() {// 2 3672 UriType t = new UriType(); 3673 if (this.instantiatesUri == null) 3674 this.instantiatesUri = new ArrayList<UriType>(); 3675 this.instantiatesUri.add(t); 3676 return t; 3677 } 3678 3679 /** 3680 * @param value {@link #instantiatesUri} (The URL pointing to an externally 3681 * maintained protocol, guideline, questionnaire or other 3682 * definition that is adhered to in whole or in part by this 3683 * CarePlan.) 3684 */ 3685 public CarePlan addInstantiatesUri(String value) { // 1 3686 UriType t = new UriType(); 3687 t.setValue(value); 3688 if (this.instantiatesUri == null) 3689 this.instantiatesUri = new ArrayList<UriType>(); 3690 this.instantiatesUri.add(t); 3691 return this; 3692 } 3693 3694 /** 3695 * @param value {@link #instantiatesUri} (The URL pointing to an externally 3696 * maintained protocol, guideline, questionnaire or other 3697 * definition that is adhered to in whole or in part by this 3698 * CarePlan.) 3699 */ 3700 public boolean hasInstantiatesUri(String value) { 3701 if (this.instantiatesUri == null) 3702 return false; 3703 for (UriType v : this.instantiatesUri) 3704 if (v.getValue().equals(value)) // uri 3705 return true; 3706 return false; 3707 } 3708 3709 /** 3710 * @return {@link #basedOn} (A care plan that is fulfilled in whole or in part 3711 * by this care plan.) 3712 */ 3713 public List<Reference> getBasedOn() { 3714 if (this.basedOn == null) 3715 this.basedOn = new ArrayList<Reference>(); 3716 return this.basedOn; 3717 } 3718 3719 /** 3720 * @return Returns a reference to <code>this</code> for easy method chaining 3721 */ 3722 public CarePlan setBasedOn(List<Reference> theBasedOn) { 3723 this.basedOn = theBasedOn; 3724 return this; 3725 } 3726 3727 public boolean hasBasedOn() { 3728 if (this.basedOn == null) 3729 return false; 3730 for (Reference item : this.basedOn) 3731 if (!item.isEmpty()) 3732 return true; 3733 return false; 3734 } 3735 3736 public Reference addBasedOn() { // 3 3737 Reference t = new Reference(); 3738 if (this.basedOn == null) 3739 this.basedOn = new ArrayList<Reference>(); 3740 this.basedOn.add(t); 3741 return t; 3742 } 3743 3744 public CarePlan addBasedOn(Reference t) { // 3 3745 if (t == null) 3746 return this; 3747 if (this.basedOn == null) 3748 this.basedOn = new ArrayList<Reference>(); 3749 this.basedOn.add(t); 3750 return this; 3751 } 3752 3753 /** 3754 * @return The first repetition of repeating field {@link #basedOn}, creating it 3755 * if it does not already exist 3756 */ 3757 public Reference getBasedOnFirstRep() { 3758 if (getBasedOn().isEmpty()) { 3759 addBasedOn(); 3760 } 3761 return getBasedOn().get(0); 3762 } 3763 3764 /** 3765 * @return {@link #replaces} (Completed or terminated care plan whose function 3766 * is taken by this new care plan.) 3767 */ 3768 public List<Reference> getReplaces() { 3769 if (this.replaces == null) 3770 this.replaces = new ArrayList<Reference>(); 3771 return this.replaces; 3772 } 3773 3774 /** 3775 * @return Returns a reference to <code>this</code> for easy method chaining 3776 */ 3777 public CarePlan setReplaces(List<Reference> theReplaces) { 3778 this.replaces = theReplaces; 3779 return this; 3780 } 3781 3782 public boolean hasReplaces() { 3783 if (this.replaces == null) 3784 return false; 3785 for (Reference item : this.replaces) 3786 if (!item.isEmpty()) 3787 return true; 3788 return false; 3789 } 3790 3791 public Reference addReplaces() { // 3 3792 Reference t = new Reference(); 3793 if (this.replaces == null) 3794 this.replaces = new ArrayList<Reference>(); 3795 this.replaces.add(t); 3796 return t; 3797 } 3798 3799 public CarePlan addReplaces(Reference t) { // 3 3800 if (t == null) 3801 return this; 3802 if (this.replaces == null) 3803 this.replaces = new ArrayList<Reference>(); 3804 this.replaces.add(t); 3805 return this; 3806 } 3807 3808 /** 3809 * @return The first repetition of repeating field {@link #replaces}, creating 3810 * it if it does not already exist 3811 */ 3812 public Reference getReplacesFirstRep() { 3813 if (getReplaces().isEmpty()) { 3814 addReplaces(); 3815 } 3816 return getReplaces().get(0); 3817 } 3818 3819 /** 3820 * @return {@link #partOf} (A larger care plan of which this particular care 3821 * plan is a component or step.) 3822 */ 3823 public List<Reference> getPartOf() { 3824 if (this.partOf == null) 3825 this.partOf = new ArrayList<Reference>(); 3826 return this.partOf; 3827 } 3828 3829 /** 3830 * @return Returns a reference to <code>this</code> for easy method chaining 3831 */ 3832 public CarePlan setPartOf(List<Reference> thePartOf) { 3833 this.partOf = thePartOf; 3834 return this; 3835 } 3836 3837 public boolean hasPartOf() { 3838 if (this.partOf == null) 3839 return false; 3840 for (Reference item : this.partOf) 3841 if (!item.isEmpty()) 3842 return true; 3843 return false; 3844 } 3845 3846 public Reference addPartOf() { // 3 3847 Reference t = new Reference(); 3848 if (this.partOf == null) 3849 this.partOf = new ArrayList<Reference>(); 3850 this.partOf.add(t); 3851 return t; 3852 } 3853 3854 public CarePlan addPartOf(Reference t) { // 3 3855 if (t == null) 3856 return this; 3857 if (this.partOf == null) 3858 this.partOf = new ArrayList<Reference>(); 3859 this.partOf.add(t); 3860 return this; 3861 } 3862 3863 /** 3864 * @return The first repetition of repeating field {@link #partOf}, creating it 3865 * if it does not already exist 3866 */ 3867 public Reference getPartOfFirstRep() { 3868 if (getPartOf().isEmpty()) { 3869 addPartOf(); 3870 } 3871 return getPartOf().get(0); 3872 } 3873 3874 /** 3875 * @return {@link #status} (Indicates whether the plan is currently being acted 3876 * upon, represents future intentions or is now a historical record.). 3877 * This is the underlying object with id, value and extensions. The 3878 * accessor "getStatus" gives direct access to the value 3879 */ 3880 public Enumeration<CarePlanStatus> getStatusElement() { 3881 if (this.status == null) 3882 if (Configuration.errorOnAutoCreate()) 3883 throw new Error("Attempt to auto-create CarePlan.status"); 3884 else if (Configuration.doAutoCreate()) 3885 this.status = new Enumeration<CarePlanStatus>(new CarePlanStatusEnumFactory()); // bb 3886 return this.status; 3887 } 3888 3889 public boolean hasStatusElement() { 3890 return this.status != null && !this.status.isEmpty(); 3891 } 3892 3893 public boolean hasStatus() { 3894 return this.status != null && !this.status.isEmpty(); 3895 } 3896 3897 /** 3898 * @param value {@link #status} (Indicates whether the plan is currently being 3899 * acted upon, represents future intentions or is now a historical 3900 * record.). This is the underlying object with id, value and 3901 * extensions. The accessor "getStatus" gives direct access to the 3902 * value 3903 */ 3904 public CarePlan setStatusElement(Enumeration<CarePlanStatus> value) { 3905 this.status = value; 3906 return this; 3907 } 3908 3909 /** 3910 * @return Indicates whether the plan is currently being acted upon, represents 3911 * future intentions or is now a historical record. 3912 */ 3913 public CarePlanStatus getStatus() { 3914 return this.status == null ? null : this.status.getValue(); 3915 } 3916 3917 /** 3918 * @param value Indicates whether the plan is currently being acted upon, 3919 * represents future intentions or is now a historical record. 3920 */ 3921 public CarePlan setStatus(CarePlanStatus value) { 3922 if (this.status == null) 3923 this.status = new Enumeration<CarePlanStatus>(new CarePlanStatusEnumFactory()); 3924 this.status.setValue(value); 3925 return this; 3926 } 3927 3928 /** 3929 * @return {@link #intent} (Indicates the level of authority/intentionality 3930 * associated with the care plan and where the care plan fits into the 3931 * workflow chain.). This is the underlying object with id, value and 3932 * extensions. The accessor "getIntent" gives direct access to the value 3933 */ 3934 public Enumeration<CarePlanIntent> getIntentElement() { 3935 if (this.intent == null) 3936 if (Configuration.errorOnAutoCreate()) 3937 throw new Error("Attempt to auto-create CarePlan.intent"); 3938 else if (Configuration.doAutoCreate()) 3939 this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory()); // bb 3940 return this.intent; 3941 } 3942 3943 public boolean hasIntentElement() { 3944 return this.intent != null && !this.intent.isEmpty(); 3945 } 3946 3947 public boolean hasIntent() { 3948 return this.intent != null && !this.intent.isEmpty(); 3949 } 3950 3951 /** 3952 * @param value {@link #intent} (Indicates the level of authority/intentionality 3953 * associated with the care plan and where the care plan fits into 3954 * the workflow chain.). This is the underlying object with id, 3955 * value and extensions. The accessor "getIntent" gives direct 3956 * access to the value 3957 */ 3958 public CarePlan setIntentElement(Enumeration<CarePlanIntent> value) { 3959 this.intent = value; 3960 return this; 3961 } 3962 3963 /** 3964 * @return Indicates the level of authority/intentionality associated with the 3965 * care plan and where the care plan fits into the workflow chain. 3966 */ 3967 public CarePlanIntent getIntent() { 3968 return this.intent == null ? null : this.intent.getValue(); 3969 } 3970 3971 /** 3972 * @param value Indicates the level of authority/intentionality associated with 3973 * the care plan and where the care plan fits into the workflow 3974 * chain. 3975 */ 3976 public CarePlan setIntent(CarePlanIntent value) { 3977 if (this.intent == null) 3978 this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory()); 3979 this.intent.setValue(value); 3980 return this; 3981 } 3982 3983 /** 3984 * @return {@link #category} (Identifies what "kind" of plan this is to support 3985 * differentiation between multiple co-existing plans; e.g. "Home 3986 * health", "psychiatric", "asthma", "disease management", "wellness 3987 * plan", etc.) 3988 */ 3989 public List<CodeableConcept> getCategory() { 3990 if (this.category == null) 3991 this.category = new ArrayList<CodeableConcept>(); 3992 return this.category; 3993 } 3994 3995 /** 3996 * @return Returns a reference to <code>this</code> for easy method chaining 3997 */ 3998 public CarePlan setCategory(List<CodeableConcept> theCategory) { 3999 this.category = theCategory; 4000 return this; 4001 } 4002 4003 public boolean hasCategory() { 4004 if (this.category == null) 4005 return false; 4006 for (CodeableConcept item : this.category) 4007 if (!item.isEmpty()) 4008 return true; 4009 return false; 4010 } 4011 4012 public CodeableConcept addCategory() { // 3 4013 CodeableConcept t = new CodeableConcept(); 4014 if (this.category == null) 4015 this.category = new ArrayList<CodeableConcept>(); 4016 this.category.add(t); 4017 return t; 4018 } 4019 4020 public CarePlan addCategory(CodeableConcept t) { // 3 4021 if (t == null) 4022 return this; 4023 if (this.category == null) 4024 this.category = new ArrayList<CodeableConcept>(); 4025 this.category.add(t); 4026 return this; 4027 } 4028 4029 /** 4030 * @return The first repetition of repeating field {@link #category}, creating 4031 * it if it does not already exist 4032 */ 4033 public CodeableConcept getCategoryFirstRep() { 4034 if (getCategory().isEmpty()) { 4035 addCategory(); 4036 } 4037 return getCategory().get(0); 4038 } 4039 4040 /** 4041 * @return {@link #title} (Human-friendly name for the care plan.). This is the 4042 * underlying object with id, value and extensions. The accessor 4043 * "getTitle" gives direct access to the value 4044 */ 4045 public StringType getTitleElement() { 4046 if (this.title == null) 4047 if (Configuration.errorOnAutoCreate()) 4048 throw new Error("Attempt to auto-create CarePlan.title"); 4049 else if (Configuration.doAutoCreate()) 4050 this.title = new StringType(); // bb 4051 return this.title; 4052 } 4053 4054 public boolean hasTitleElement() { 4055 return this.title != null && !this.title.isEmpty(); 4056 } 4057 4058 public boolean hasTitle() { 4059 return this.title != null && !this.title.isEmpty(); 4060 } 4061 4062 /** 4063 * @param value {@link #title} (Human-friendly name for the care plan.). This is 4064 * the underlying object with id, value and extensions. The 4065 * accessor "getTitle" gives direct access to the value 4066 */ 4067 public CarePlan setTitleElement(StringType value) { 4068 this.title = value; 4069 return this; 4070 } 4071 4072 /** 4073 * @return Human-friendly name for the care plan. 4074 */ 4075 public String getTitle() { 4076 return this.title == null ? null : this.title.getValue(); 4077 } 4078 4079 /** 4080 * @param value Human-friendly name for the care plan. 4081 */ 4082 public CarePlan setTitle(String value) { 4083 if (Utilities.noString(value)) 4084 this.title = null; 4085 else { 4086 if (this.title == null) 4087 this.title = new StringType(); 4088 this.title.setValue(value); 4089 } 4090 return this; 4091 } 4092 4093 /** 4094 * @return {@link #description} (A description of the scope and nature of the 4095 * plan.). This is the underlying object with id, value and extensions. 4096 * The accessor "getDescription" gives direct access to the value 4097 */ 4098 public StringType getDescriptionElement() { 4099 if (this.description == null) 4100 if (Configuration.errorOnAutoCreate()) 4101 throw new Error("Attempt to auto-create CarePlan.description"); 4102 else if (Configuration.doAutoCreate()) 4103 this.description = new StringType(); // bb 4104 return this.description; 4105 } 4106 4107 public boolean hasDescriptionElement() { 4108 return this.description != null && !this.description.isEmpty(); 4109 } 4110 4111 public boolean hasDescription() { 4112 return this.description != null && !this.description.isEmpty(); 4113 } 4114 4115 /** 4116 * @param value {@link #description} (A description of the scope and nature of 4117 * the plan.). This is the underlying object with id, value and 4118 * extensions. The accessor "getDescription" gives direct access to 4119 * the value 4120 */ 4121 public CarePlan setDescriptionElement(StringType value) { 4122 this.description = value; 4123 return this; 4124 } 4125 4126 /** 4127 * @return A description of the scope and nature of the plan. 4128 */ 4129 public String getDescription() { 4130 return this.description == null ? null : this.description.getValue(); 4131 } 4132 4133 /** 4134 * @param value A description of the scope and nature of the plan. 4135 */ 4136 public CarePlan setDescription(String value) { 4137 if (Utilities.noString(value)) 4138 this.description = null; 4139 else { 4140 if (this.description == null) 4141 this.description = new StringType(); 4142 this.description.setValue(value); 4143 } 4144 return this; 4145 } 4146 4147 /** 4148 * @return {@link #subject} (Identifies the patient or group whose intended care 4149 * is described by the plan.) 4150 */ 4151 public Reference getSubject() { 4152 if (this.subject == null) 4153 if (Configuration.errorOnAutoCreate()) 4154 throw new Error("Attempt to auto-create CarePlan.subject"); 4155 else if (Configuration.doAutoCreate()) 4156 this.subject = new Reference(); // cc 4157 return this.subject; 4158 } 4159 4160 public boolean hasSubject() { 4161 return this.subject != null && !this.subject.isEmpty(); 4162 } 4163 4164 /** 4165 * @param value {@link #subject} (Identifies the patient or group whose intended 4166 * care is described by the plan.) 4167 */ 4168 public CarePlan setSubject(Reference value) { 4169 this.subject = value; 4170 return this; 4171 } 4172 4173 /** 4174 * @return {@link #subject} The actual object that is the target of the 4175 * reference. The reference library doesn't populate this, but you can 4176 * use it to hold the resource if you resolve it. (Identifies the 4177 * patient or group whose intended care is described by the plan.) 4178 */ 4179 public Resource getSubjectTarget() { 4180 return this.subjectTarget; 4181 } 4182 4183 /** 4184 * @param value {@link #subject} The actual object that is the target of the 4185 * reference. The reference library doesn't use these, but you can 4186 * use it to hold the resource if you resolve it. (Identifies the 4187 * patient or group whose intended care is described by the plan.) 4188 */ 4189 public CarePlan setSubjectTarget(Resource value) { 4190 this.subjectTarget = value; 4191 return this; 4192 } 4193 4194 /** 4195 * @return {@link #encounter} (The Encounter during which this CarePlan was 4196 * created or to which the creation of this record is tightly 4197 * associated.) 4198 */ 4199 public Reference getEncounter() { 4200 if (this.encounter == null) 4201 if (Configuration.errorOnAutoCreate()) 4202 throw new Error("Attempt to auto-create CarePlan.encounter"); 4203 else if (Configuration.doAutoCreate()) 4204 this.encounter = new Reference(); // cc 4205 return this.encounter; 4206 } 4207 4208 public boolean hasEncounter() { 4209 return this.encounter != null && !this.encounter.isEmpty(); 4210 } 4211 4212 /** 4213 * @param value {@link #encounter} (The Encounter during which this CarePlan was 4214 * created or to which the creation of this record is tightly 4215 * associated.) 4216 */ 4217 public CarePlan setEncounter(Reference value) { 4218 this.encounter = value; 4219 return this; 4220 } 4221 4222 /** 4223 * @return {@link #encounter} The actual object that is the target of the 4224 * reference. The reference library doesn't populate this, but you can 4225 * use it to hold the resource if you resolve it. (The Encounter during 4226 * which this CarePlan was created or to which the creation of this 4227 * record is tightly associated.) 4228 */ 4229 public Encounter getEncounterTarget() { 4230 if (this.encounterTarget == null) 4231 if (Configuration.errorOnAutoCreate()) 4232 throw new Error("Attempt to auto-create CarePlan.encounter"); 4233 else if (Configuration.doAutoCreate()) 4234 this.encounterTarget = new Encounter(); // aa 4235 return this.encounterTarget; 4236 } 4237 4238 /** 4239 * @param value {@link #encounter} The actual object that is the target of the 4240 * reference. The reference library doesn't use these, but you can 4241 * use it to hold the resource if you resolve it. (The Encounter 4242 * during which this CarePlan was created or to which the creation 4243 * of this record is tightly associated.) 4244 */ 4245 public CarePlan setEncounterTarget(Encounter value) { 4246 this.encounterTarget = value; 4247 return this; 4248 } 4249 4250 /** 4251 * @return {@link #period} (Indicates when the plan did (or is intended to) come 4252 * into effect and end.) 4253 */ 4254 public Period getPeriod() { 4255 if (this.period == null) 4256 if (Configuration.errorOnAutoCreate()) 4257 throw new Error("Attempt to auto-create CarePlan.period"); 4258 else if (Configuration.doAutoCreate()) 4259 this.period = new Period(); // cc 4260 return this.period; 4261 } 4262 4263 public boolean hasPeriod() { 4264 return this.period != null && !this.period.isEmpty(); 4265 } 4266 4267 /** 4268 * @param value {@link #period} (Indicates when the plan did (or is intended to) 4269 * come into effect and end.) 4270 */ 4271 public CarePlan setPeriod(Period value) { 4272 this.period = value; 4273 return this; 4274 } 4275 4276 /** 4277 * @return {@link #created} (Represents when this particular CarePlan record was 4278 * created in the system, which is often a system-generated date.). This 4279 * is the underlying object with id, value and extensions. The accessor 4280 * "getCreated" gives direct access to the value 4281 */ 4282 public DateTimeType getCreatedElement() { 4283 if (this.created == null) 4284 if (Configuration.errorOnAutoCreate()) 4285 throw new Error("Attempt to auto-create CarePlan.created"); 4286 else if (Configuration.doAutoCreate()) 4287 this.created = new DateTimeType(); // bb 4288 return this.created; 4289 } 4290 4291 public boolean hasCreatedElement() { 4292 return this.created != null && !this.created.isEmpty(); 4293 } 4294 4295 public boolean hasCreated() { 4296 return this.created != null && !this.created.isEmpty(); 4297 } 4298 4299 /** 4300 * @param value {@link #created} (Represents when this particular CarePlan 4301 * record was created in the system, which is often a 4302 * system-generated date.). This is the underlying object with id, 4303 * value and extensions. The accessor "getCreated" gives direct 4304 * access to the value 4305 */ 4306 public CarePlan setCreatedElement(DateTimeType value) { 4307 this.created = value; 4308 return this; 4309 } 4310 4311 /** 4312 * @return Represents when this particular CarePlan record was created in the 4313 * system, which is often a system-generated date. 4314 */ 4315 public Date getCreated() { 4316 return this.created == null ? null : this.created.getValue(); 4317 } 4318 4319 /** 4320 * @param value Represents when this particular CarePlan record was created in 4321 * the system, which is often a system-generated date. 4322 */ 4323 public CarePlan setCreated(Date value) { 4324 if (value == null) 4325 this.created = null; 4326 else { 4327 if (this.created == null) 4328 this.created = new DateTimeType(); 4329 this.created.setValue(value); 4330 } 4331 return this; 4332 } 4333 4334 /** 4335 * @return {@link #author} (When populated, the author is responsible for the 4336 * care plan. The care plan is attributed to the author.) 4337 */ 4338 public Reference getAuthor() { 4339 if (this.author == null) 4340 if (Configuration.errorOnAutoCreate()) 4341 throw new Error("Attempt to auto-create CarePlan.author"); 4342 else if (Configuration.doAutoCreate()) 4343 this.author = new Reference(); // cc 4344 return this.author; 4345 } 4346 4347 public boolean hasAuthor() { 4348 return this.author != null && !this.author.isEmpty(); 4349 } 4350 4351 /** 4352 * @param value {@link #author} (When populated, the author is responsible for 4353 * the care plan. The care plan is attributed to the author.) 4354 */ 4355 public CarePlan setAuthor(Reference value) { 4356 this.author = value; 4357 return this; 4358 } 4359 4360 /** 4361 * @return {@link #author} The actual object that is the target of the 4362 * reference. The reference library doesn't populate this, but you can 4363 * use it to hold the resource if you resolve it. (When populated, the 4364 * author is responsible for the care plan. The care plan is attributed 4365 * to the author.) 4366 */ 4367 public Resource getAuthorTarget() { 4368 return this.authorTarget; 4369 } 4370 4371 /** 4372 * @param value {@link #author} The actual object that is the target of the 4373 * reference. The reference library doesn't use these, but you can 4374 * use it to hold the resource if you resolve it. (When populated, 4375 * the author is responsible for the care plan. The care plan is 4376 * attributed to the author.) 4377 */ 4378 public CarePlan setAuthorTarget(Resource value) { 4379 this.authorTarget = value; 4380 return this; 4381 } 4382 4383 /** 4384 * @return {@link #contributor} (Identifies the individual(s) or organization 4385 * who provided the contents of the care plan.) 4386 */ 4387 public List<Reference> getContributor() { 4388 if (this.contributor == null) 4389 this.contributor = new ArrayList<Reference>(); 4390 return this.contributor; 4391 } 4392 4393 /** 4394 * @return Returns a reference to <code>this</code> for easy method chaining 4395 */ 4396 public CarePlan setContributor(List<Reference> theContributor) { 4397 this.contributor = theContributor; 4398 return this; 4399 } 4400 4401 public boolean hasContributor() { 4402 if (this.contributor == null) 4403 return false; 4404 for (Reference item : this.contributor) 4405 if (!item.isEmpty()) 4406 return true; 4407 return false; 4408 } 4409 4410 public Reference addContributor() { // 3 4411 Reference t = new Reference(); 4412 if (this.contributor == null) 4413 this.contributor = new ArrayList<Reference>(); 4414 this.contributor.add(t); 4415 return t; 4416 } 4417 4418 public CarePlan addContributor(Reference t) { // 3 4419 if (t == null) 4420 return this; 4421 if (this.contributor == null) 4422 this.contributor = new ArrayList<Reference>(); 4423 this.contributor.add(t); 4424 return this; 4425 } 4426 4427 /** 4428 * @return The first repetition of repeating field {@link #contributor}, 4429 * creating it if it does not already exist 4430 */ 4431 public Reference getContributorFirstRep() { 4432 if (getContributor().isEmpty()) { 4433 addContributor(); 4434 } 4435 return getContributor().get(0); 4436 } 4437 4438 /** 4439 * @return {@link #careTeam} (Identifies all people and organizations who are 4440 * expected to be involved in the care envisioned by this plan.) 4441 */ 4442 public List<Reference> getCareTeam() { 4443 if (this.careTeam == null) 4444 this.careTeam = new ArrayList<Reference>(); 4445 return this.careTeam; 4446 } 4447 4448 /** 4449 * @return Returns a reference to <code>this</code> for easy method chaining 4450 */ 4451 public CarePlan setCareTeam(List<Reference> theCareTeam) { 4452 this.careTeam = theCareTeam; 4453 return this; 4454 } 4455 4456 public boolean hasCareTeam() { 4457 if (this.careTeam == null) 4458 return false; 4459 for (Reference item : this.careTeam) 4460 if (!item.isEmpty()) 4461 return true; 4462 return false; 4463 } 4464 4465 public Reference addCareTeam() { // 3 4466 Reference t = new Reference(); 4467 if (this.careTeam == null) 4468 this.careTeam = new ArrayList<Reference>(); 4469 this.careTeam.add(t); 4470 return t; 4471 } 4472 4473 public CarePlan addCareTeam(Reference t) { // 3 4474 if (t == null) 4475 return this; 4476 if (this.careTeam == null) 4477 this.careTeam = new ArrayList<Reference>(); 4478 this.careTeam.add(t); 4479 return this; 4480 } 4481 4482 /** 4483 * @return The first repetition of repeating field {@link #careTeam}, creating 4484 * it if it does not already exist 4485 */ 4486 public Reference getCareTeamFirstRep() { 4487 if (getCareTeam().isEmpty()) { 4488 addCareTeam(); 4489 } 4490 return getCareTeam().get(0); 4491 } 4492 4493 /** 4494 * @return {@link #addresses} (Identifies the 4495 * conditions/problems/concerns/diagnoses/etc. whose management and/or 4496 * mitigation are handled by this plan.) 4497 */ 4498 public List<Reference> getAddresses() { 4499 if (this.addresses == null) 4500 this.addresses = new ArrayList<Reference>(); 4501 return this.addresses; 4502 } 4503 4504 /** 4505 * @return Returns a reference to <code>this</code> for easy method chaining 4506 */ 4507 public CarePlan setAddresses(List<Reference> theAddresses) { 4508 this.addresses = theAddresses; 4509 return this; 4510 } 4511 4512 public boolean hasAddresses() { 4513 if (this.addresses == null) 4514 return false; 4515 for (Reference item : this.addresses) 4516 if (!item.isEmpty()) 4517 return true; 4518 return false; 4519 } 4520 4521 public Reference addAddresses() { // 3 4522 Reference t = new Reference(); 4523 if (this.addresses == null) 4524 this.addresses = new ArrayList<Reference>(); 4525 this.addresses.add(t); 4526 return t; 4527 } 4528 4529 public CarePlan addAddresses(Reference t) { // 3 4530 if (t == null) 4531 return this; 4532 if (this.addresses == null) 4533 this.addresses = new ArrayList<Reference>(); 4534 this.addresses.add(t); 4535 return this; 4536 } 4537 4538 /** 4539 * @return The first repetition of repeating field {@link #addresses}, creating 4540 * it if it does not already exist 4541 */ 4542 public Reference getAddressesFirstRep() { 4543 if (getAddresses().isEmpty()) { 4544 addAddresses(); 4545 } 4546 return getAddresses().get(0); 4547 } 4548 4549 /** 4550 * @return {@link #supportingInfo} (Identifies portions of the patient's record 4551 * that specifically influenced the formation of the plan. These might 4552 * include comorbidities, recent procedures, limitations, recent 4553 * assessments, etc.) 4554 */ 4555 public List<Reference> getSupportingInfo() { 4556 if (this.supportingInfo == null) 4557 this.supportingInfo = new ArrayList<Reference>(); 4558 return this.supportingInfo; 4559 } 4560 4561 /** 4562 * @return Returns a reference to <code>this</code> for easy method chaining 4563 */ 4564 public CarePlan setSupportingInfo(List<Reference> theSupportingInfo) { 4565 this.supportingInfo = theSupportingInfo; 4566 return this; 4567 } 4568 4569 public boolean hasSupportingInfo() { 4570 if (this.supportingInfo == null) 4571 return false; 4572 for (Reference item : this.supportingInfo) 4573 if (!item.isEmpty()) 4574 return true; 4575 return false; 4576 } 4577 4578 public Reference addSupportingInfo() { // 3 4579 Reference t = new Reference(); 4580 if (this.supportingInfo == null) 4581 this.supportingInfo = new ArrayList<Reference>(); 4582 this.supportingInfo.add(t); 4583 return t; 4584 } 4585 4586 public CarePlan addSupportingInfo(Reference t) { // 3 4587 if (t == null) 4588 return this; 4589 if (this.supportingInfo == null) 4590 this.supportingInfo = new ArrayList<Reference>(); 4591 this.supportingInfo.add(t); 4592 return this; 4593 } 4594 4595 /** 4596 * @return The first repetition of repeating field {@link #supportingInfo}, 4597 * creating it if it does not already exist 4598 */ 4599 public Reference getSupportingInfoFirstRep() { 4600 if (getSupportingInfo().isEmpty()) { 4601 addSupportingInfo(); 4602 } 4603 return getSupportingInfo().get(0); 4604 } 4605 4606 /** 4607 * @return {@link #goal} (Describes the intended objective(s) of carrying out 4608 * the care plan.) 4609 */ 4610 public List<Reference> getGoal() { 4611 if (this.goal == null) 4612 this.goal = new ArrayList<Reference>(); 4613 return this.goal; 4614 } 4615 4616 /** 4617 * @return Returns a reference to <code>this</code> for easy method chaining 4618 */ 4619 public CarePlan setGoal(List<Reference> theGoal) { 4620 this.goal = theGoal; 4621 return this; 4622 } 4623 4624 public boolean hasGoal() { 4625 if (this.goal == null) 4626 return false; 4627 for (Reference item : this.goal) 4628 if (!item.isEmpty()) 4629 return true; 4630 return false; 4631 } 4632 4633 public Reference addGoal() { // 3 4634 Reference t = new Reference(); 4635 if (this.goal == null) 4636 this.goal = new ArrayList<Reference>(); 4637 this.goal.add(t); 4638 return t; 4639 } 4640 4641 public CarePlan addGoal(Reference t) { // 3 4642 if (t == null) 4643 return this; 4644 if (this.goal == null) 4645 this.goal = new ArrayList<Reference>(); 4646 this.goal.add(t); 4647 return this; 4648 } 4649 4650 /** 4651 * @return The first repetition of repeating field {@link #goal}, creating it if 4652 * it does not already exist 4653 */ 4654 public Reference getGoalFirstRep() { 4655 if (getGoal().isEmpty()) { 4656 addGoal(); 4657 } 4658 return getGoal().get(0); 4659 } 4660 4661 /** 4662 * @return {@link #activity} (Identifies a planned action to occur as part of 4663 * the plan. For example, a medication to be used, lab tests to perform, 4664 * self-monitoring, education, etc.) 4665 */ 4666 public List<CarePlanActivityComponent> getActivity() { 4667 if (this.activity == null) 4668 this.activity = new ArrayList<CarePlanActivityComponent>(); 4669 return this.activity; 4670 } 4671 4672 /** 4673 * @return Returns a reference to <code>this</code> for easy method chaining 4674 */ 4675 public CarePlan setActivity(List<CarePlanActivityComponent> theActivity) { 4676 this.activity = theActivity; 4677 return this; 4678 } 4679 4680 public boolean hasActivity() { 4681 if (this.activity == null) 4682 return false; 4683 for (CarePlanActivityComponent item : this.activity) 4684 if (!item.isEmpty()) 4685 return true; 4686 return false; 4687 } 4688 4689 public CarePlanActivityComponent addActivity() { // 3 4690 CarePlanActivityComponent t = new CarePlanActivityComponent(); 4691 if (this.activity == null) 4692 this.activity = new ArrayList<CarePlanActivityComponent>(); 4693 this.activity.add(t); 4694 return t; 4695 } 4696 4697 public CarePlan addActivity(CarePlanActivityComponent t) { // 3 4698 if (t == null) 4699 return this; 4700 if (this.activity == null) 4701 this.activity = new ArrayList<CarePlanActivityComponent>(); 4702 this.activity.add(t); 4703 return this; 4704 } 4705 4706 /** 4707 * @return The first repetition of repeating field {@link #activity}, creating 4708 * it if it does not already exist 4709 */ 4710 public CarePlanActivityComponent getActivityFirstRep() { 4711 if (getActivity().isEmpty()) { 4712 addActivity(); 4713 } 4714 return getActivity().get(0); 4715 } 4716 4717 /** 4718 * @return {@link #note} (General notes about the care plan not covered 4719 * elsewhere.) 4720 */ 4721 public List<Annotation> getNote() { 4722 if (this.note == null) 4723 this.note = new ArrayList<Annotation>(); 4724 return this.note; 4725 } 4726 4727 /** 4728 * @return Returns a reference to <code>this</code> for easy method chaining 4729 */ 4730 public CarePlan setNote(List<Annotation> theNote) { 4731 this.note = theNote; 4732 return this; 4733 } 4734 4735 public boolean hasNote() { 4736 if (this.note == null) 4737 return false; 4738 for (Annotation item : this.note) 4739 if (!item.isEmpty()) 4740 return true; 4741 return false; 4742 } 4743 4744 public Annotation addNote() { // 3 4745 Annotation t = new Annotation(); 4746 if (this.note == null) 4747 this.note = new ArrayList<Annotation>(); 4748 this.note.add(t); 4749 return t; 4750 } 4751 4752 public CarePlan addNote(Annotation t) { // 3 4753 if (t == null) 4754 return this; 4755 if (this.note == null) 4756 this.note = new ArrayList<Annotation>(); 4757 this.note.add(t); 4758 return this; 4759 } 4760 4761 /** 4762 * @return The first repetition of repeating field {@link #note}, creating it if 4763 * it does not already exist 4764 */ 4765 public Annotation getNoteFirstRep() { 4766 if (getNote().isEmpty()) { 4767 addNote(); 4768 } 4769 return getNote().get(0); 4770 } 4771 4772 protected void listChildren(List<Property> children) { 4773 super.listChildren(children); 4774 children.add(new Property("identifier", "Identifier", 4775 "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 4776 0, java.lang.Integer.MAX_VALUE, identifier)); 4777 children.add(new Property("instantiatesCanonical", 4778 "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", 4779 "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 4780 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 4781 children.add(new Property("instantiatesUri", "uri", 4782 "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 4783 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 4784 children.add(new Property("basedOn", "Reference(CarePlan)", 4785 "A care plan that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, 4786 basedOn)); 4787 children.add(new Property("replaces", "Reference(CarePlan)", 4788 "Completed or terminated care plan whose function is taken by this new care plan.", 0, 4789 java.lang.Integer.MAX_VALUE, replaces)); 4790 children.add(new Property("partOf", "Reference(CarePlan)", 4791 "A larger care plan of which this particular care plan is a component or step.", 0, java.lang.Integer.MAX_VALUE, 4792 partOf)); 4793 children.add(new Property("status", "code", 4794 "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 4795 0, 1, status)); 4796 children.add(new Property("intent", "code", 4797 "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 4798 0, 1, intent)); 4799 children.add(new Property("category", "CodeableConcept", 4800 "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.", 4801 0, java.lang.Integer.MAX_VALUE, category)); 4802 children.add(new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title)); 4803 children.add( 4804 new Property("description", "string", "A description of the scope and nature of the plan.", 0, 1, description)); 4805 children.add(new Property("subject", "Reference(Patient|Group)", 4806 "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject)); 4807 children.add(new Property("encounter", "Reference(Encounter)", 4808 "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 4809 0, 1, encounter)); 4810 children.add(new Property("period", "Period", 4811 "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period)); 4812 children.add(new Property("created", "dateTime", 4813 "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 4814 0, 1, created)); 4815 children.add(new Property("author", 4816 "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", 4817 "When populated, the author is responsible for the care plan. The care plan is attributed to the author.", 0, 4818 1, author)); 4819 children.add(new Property("contributor", 4820 "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", 4821 "Identifies the individual(s) or organization who provided the contents of the care plan.", 0, 4822 java.lang.Integer.MAX_VALUE, contributor)); 4823 children.add(new Property("careTeam", "Reference(CareTeam)", 4824 "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 4825 0, java.lang.Integer.MAX_VALUE, careTeam)); 4826 children.add(new Property("addresses", "Reference(Condition)", 4827 "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 4828 0, java.lang.Integer.MAX_VALUE, addresses)); 4829 children.add(new Property("supportingInfo", "Reference(Any)", 4830 "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", 4831 0, java.lang.Integer.MAX_VALUE, supportingInfo)); 4832 children.add(new Property("goal", "Reference(Goal)", 4833 "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal)); 4834 children.add(new Property("activity", "", 4835 "Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.", 4836 0, java.lang.Integer.MAX_VALUE, activity)); 4837 children.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, 4838 java.lang.Integer.MAX_VALUE, note)); 4839 } 4840 4841 @Override 4842 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4843 switch (_hash) { 4844 case -1618432855: 4845 /* identifier */ return new Property("identifier", "Identifier", 4846 "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 4847 0, java.lang.Integer.MAX_VALUE, identifier); 4848 case 8911915: 4849 /* instantiatesCanonical */ return new Property("instantiatesCanonical", 4850 "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", 4851 "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 4852 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 4853 case -1926393373: 4854 /* instantiatesUri */ return new Property("instantiatesUri", "uri", 4855 "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 4856 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 4857 case -332612366: 4858 /* basedOn */ return new Property("basedOn", "Reference(CarePlan)", 4859 "A care plan that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, 4860 basedOn); 4861 case -430332865: 4862 /* replaces */ return new Property("replaces", "Reference(CarePlan)", 4863 "Completed or terminated care plan whose function is taken by this new care plan.", 0, 4864 java.lang.Integer.MAX_VALUE, replaces); 4865 case -995410646: 4866 /* partOf */ return new Property("partOf", "Reference(CarePlan)", 4867 "A larger care plan of which this particular care plan is a component or step.", 0, 4868 java.lang.Integer.MAX_VALUE, partOf); 4869 case -892481550: 4870 /* status */ return new Property("status", "code", 4871 "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 4872 0, 1, status); 4873 case -1183762788: 4874 /* intent */ return new Property("intent", "code", 4875 "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 4876 0, 1, intent); 4877 case 50511102: 4878 /* category */ return new Property("category", "CodeableConcept", 4879 "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.", 4880 0, java.lang.Integer.MAX_VALUE, category); 4881 case 110371416: 4882 /* title */ return new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title); 4883 case -1724546052: 4884 /* description */ return new Property("description", "string", 4885 "A description of the scope and nature of the plan.", 0, 1, description); 4886 case -1867885268: 4887 /* subject */ return new Property("subject", "Reference(Patient|Group)", 4888 "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject); 4889 case 1524132147: 4890 /* encounter */ return new Property("encounter", "Reference(Encounter)", 4891 "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 4892 0, 1, encounter); 4893 case -991726143: 4894 /* period */ return new Property("period", "Period", 4895 "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period); 4896 case 1028554472: 4897 /* created */ return new Property("created", "dateTime", 4898 "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 4899 0, 1, created); 4900 case -1406328437: 4901 /* author */ return new Property("author", 4902 "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", 4903 "When populated, the author is responsible for the care plan. The care plan is attributed to the author.", 0, 4904 1, author); 4905 case -1895276325: 4906 /* contributor */ return new Property("contributor", 4907 "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", 4908 "Identifies the individual(s) or organization who provided the contents of the care plan.", 0, 4909 java.lang.Integer.MAX_VALUE, contributor); 4910 case -7323378: 4911 /* careTeam */ return new Property("careTeam", "Reference(CareTeam)", 4912 "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 4913 0, java.lang.Integer.MAX_VALUE, careTeam); 4914 case 874544034: 4915 /* addresses */ return new Property("addresses", "Reference(Condition)", 4916 "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 4917 0, java.lang.Integer.MAX_VALUE, addresses); 4918 case 1922406657: 4919 /* supportingInfo */ return new Property("supportingInfo", "Reference(Any)", 4920 "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", 4921 0, java.lang.Integer.MAX_VALUE, supportingInfo); 4922 case 3178259: 4923 /* goal */ return new Property("goal", "Reference(Goal)", 4924 "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal); 4925 case -1655966961: 4926 /* activity */ return new Property("activity", "", 4927 "Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.", 4928 0, java.lang.Integer.MAX_VALUE, activity); 4929 case 3387378: 4930 /* note */ return new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 4931 0, java.lang.Integer.MAX_VALUE, note); 4932 default: 4933 return super.getNamedProperty(_hash, _name, _checkValid); 4934 } 4935 4936 } 4937 4938 @Override 4939 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4940 switch (hash) { 4941 case -1618432855: 4942 /* identifier */ return this.identifier == null ? new Base[0] 4943 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4944 case 8911915: 4945 /* instantiatesCanonical */ return this.instantiatesCanonical == null ? new Base[0] 4946 : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 4947 case -1926393373: 4948 /* instantiatesUri */ return this.instantiatesUri == null ? new Base[0] 4949 : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 4950 case -332612366: 4951 /* basedOn */ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 4952 case -430332865: 4953 /* replaces */ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference 4954 case -995410646: 4955 /* partOf */ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 4956 case -892481550: 4957 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<CarePlanStatus> 4958 case -1183762788: 4959 /* intent */ return this.intent == null ? new Base[0] : new Base[] { this.intent }; // Enumeration<CarePlanIntent> 4960 case 50511102: 4961 /* category */ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 4962 case 110371416: 4963 /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType 4964 case -1724546052: 4965 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 4966 case -1867885268: 4967 /* subject */ return this.subject == null ? new Base[0] : new Base[] { this.subject }; // Reference 4968 case 1524132147: 4969 /* encounter */ return this.encounter == null ? new Base[0] : new Base[] { this.encounter }; // Reference 4970 case -991726143: 4971 /* period */ return this.period == null ? new Base[0] : new Base[] { this.period }; // Period 4972 case 1028554472: 4973 /* created */ return this.created == null ? new Base[0] : new Base[] { this.created }; // DateTimeType 4974 case -1406328437: 4975 /* author */ return this.author == null ? new Base[0] : new Base[] { this.author }; // Reference 4976 case -1895276325: 4977 /* contributor */ return this.contributor == null ? new Base[0] 4978 : this.contributor.toArray(new Base[this.contributor.size()]); // Reference 4979 case -7323378: 4980 /* careTeam */ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference 4981 case 874544034: 4982 /* addresses */ return this.addresses == null ? new Base[0] 4983 : this.addresses.toArray(new Base[this.addresses.size()]); // Reference 4984 case 1922406657: 4985 /* supportingInfo */ return this.supportingInfo == null ? new Base[0] 4986 : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference 4987 case 3178259: 4988 /* goal */ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference 4989 case -1655966961: 4990 /* activity */ return this.activity == null ? new Base[0] : this.activity.toArray(new Base[this.activity.size()]); // CarePlanActivityComponent 4991 case 3387378: 4992 /* note */ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4993 default: 4994 return super.getProperty(hash, name, checkValid); 4995 } 4996 4997 } 4998 4999 @Override 5000 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5001 switch (hash) { 5002 case -1618432855: // identifier 5003 this.getIdentifier().add(castToIdentifier(value)); // Identifier 5004 return value; 5005 case 8911915: // instantiatesCanonical 5006 this.getInstantiatesCanonical().add(castToCanonical(value)); // CanonicalType 5007 return value; 5008 case -1926393373: // instantiatesUri 5009 this.getInstantiatesUri().add(castToUri(value)); // UriType 5010 return value; 5011 case -332612366: // basedOn 5012 this.getBasedOn().add(castToReference(value)); // Reference 5013 return value; 5014 case -430332865: // replaces 5015 this.getReplaces().add(castToReference(value)); // Reference 5016 return value; 5017 case -995410646: // partOf 5018 this.getPartOf().add(castToReference(value)); // Reference 5019 return value; 5020 case -892481550: // status 5021 value = new CarePlanStatusEnumFactory().fromType(castToCode(value)); 5022 this.status = (Enumeration) value; // Enumeration<CarePlanStatus> 5023 return value; 5024 case -1183762788: // intent 5025 value = new CarePlanIntentEnumFactory().fromType(castToCode(value)); 5026 this.intent = (Enumeration) value; // Enumeration<CarePlanIntent> 5027 return value; 5028 case 50511102: // category 5029 this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept 5030 return value; 5031 case 110371416: // title 5032 this.title = castToString(value); // StringType 5033 return value; 5034 case -1724546052: // description 5035 this.description = castToString(value); // StringType 5036 return value; 5037 case -1867885268: // subject 5038 this.subject = castToReference(value); // Reference 5039 return value; 5040 case 1524132147: // encounter 5041 this.encounter = castToReference(value); // Reference 5042 return value; 5043 case -991726143: // period 5044 this.period = castToPeriod(value); // Period 5045 return value; 5046 case 1028554472: // created 5047 this.created = castToDateTime(value); // DateTimeType 5048 return value; 5049 case -1406328437: // author 5050 this.author = castToReference(value); // Reference 5051 return value; 5052 case -1895276325: // contributor 5053 this.getContributor().add(castToReference(value)); // Reference 5054 return value; 5055 case -7323378: // careTeam 5056 this.getCareTeam().add(castToReference(value)); // Reference 5057 return value; 5058 case 874544034: // addresses 5059 this.getAddresses().add(castToReference(value)); // Reference 5060 return value; 5061 case 1922406657: // supportingInfo 5062 this.getSupportingInfo().add(castToReference(value)); // Reference 5063 return value; 5064 case 3178259: // goal 5065 this.getGoal().add(castToReference(value)); // Reference 5066 return value; 5067 case -1655966961: // activity 5068 this.getActivity().add((CarePlanActivityComponent) value); // CarePlanActivityComponent 5069 return value; 5070 case 3387378: // note 5071 this.getNote().add(castToAnnotation(value)); // Annotation 5072 return value; 5073 default: 5074 return super.setProperty(hash, name, value); 5075 } 5076 5077 } 5078 5079 @Override 5080 public Base setProperty(String name, Base value) throws FHIRException { 5081 if (name.equals("identifier")) { 5082 this.getIdentifier().add(castToIdentifier(value)); 5083 } else if (name.equals("instantiatesCanonical")) { 5084 this.getInstantiatesCanonical().add(castToCanonical(value)); 5085 } else if (name.equals("instantiatesUri")) { 5086 this.getInstantiatesUri().add(castToUri(value)); 5087 } else if (name.equals("basedOn")) { 5088 this.getBasedOn().add(castToReference(value)); 5089 } else if (name.equals("replaces")) { 5090 this.getReplaces().add(castToReference(value)); 5091 } else if (name.equals("partOf")) { 5092 this.getPartOf().add(castToReference(value)); 5093 } else if (name.equals("status")) { 5094 value = new CarePlanStatusEnumFactory().fromType(castToCode(value)); 5095 this.status = (Enumeration) value; // Enumeration<CarePlanStatus> 5096 } else if (name.equals("intent")) { 5097 value = new CarePlanIntentEnumFactory().fromType(castToCode(value)); 5098 this.intent = (Enumeration) value; // Enumeration<CarePlanIntent> 5099 } else if (name.equals("category")) { 5100 this.getCategory().add(castToCodeableConcept(value)); 5101 } else if (name.equals("title")) { 5102 this.title = castToString(value); // StringType 5103 } else if (name.equals("description")) { 5104 this.description = castToString(value); // StringType 5105 } else if (name.equals("subject")) { 5106 this.subject = castToReference(value); // Reference 5107 } else if (name.equals("encounter")) { 5108 this.encounter = castToReference(value); // Reference 5109 } else if (name.equals("period")) { 5110 this.period = castToPeriod(value); // Period 5111 } else if (name.equals("created")) { 5112 this.created = castToDateTime(value); // DateTimeType 5113 } else if (name.equals("author")) { 5114 this.author = castToReference(value); // Reference 5115 } else if (name.equals("contributor")) { 5116 this.getContributor().add(castToReference(value)); 5117 } else if (name.equals("careTeam")) { 5118 this.getCareTeam().add(castToReference(value)); 5119 } else if (name.equals("addresses")) { 5120 this.getAddresses().add(castToReference(value)); 5121 } else if (name.equals("supportingInfo")) { 5122 this.getSupportingInfo().add(castToReference(value)); 5123 } else if (name.equals("goal")) { 5124 this.getGoal().add(castToReference(value)); 5125 } else if (name.equals("activity")) { 5126 this.getActivity().add((CarePlanActivityComponent) value); 5127 } else if (name.equals("note")) { 5128 this.getNote().add(castToAnnotation(value)); 5129 } else 5130 return super.setProperty(name, value); 5131 return value; 5132 } 5133 5134 @Override 5135 public void removeChild(String name, Base value) throws FHIRException { 5136 if (name.equals("identifier")) { 5137 this.getIdentifier().remove(castToIdentifier(value)); 5138 } else if (name.equals("instantiatesCanonical")) { 5139 this.getInstantiatesCanonical().remove(castToCanonical(value)); 5140 } else if (name.equals("instantiatesUri")) { 5141 this.getInstantiatesUri().remove(castToUri(value)); 5142 } else if (name.equals("basedOn")) { 5143 this.getBasedOn().remove(castToReference(value)); 5144 } else if (name.equals("replaces")) { 5145 this.getReplaces().remove(castToReference(value)); 5146 } else if (name.equals("partOf")) { 5147 this.getPartOf().remove(castToReference(value)); 5148 } else if (name.equals("status")) { 5149 this.status = null; 5150 } else if (name.equals("intent")) { 5151 this.intent = null; 5152 } else if (name.equals("category")) { 5153 this.getCategory().remove(castToCodeableConcept(value)); 5154 } else if (name.equals("title")) { 5155 this.title = null; 5156 } else if (name.equals("description")) { 5157 this.description = null; 5158 } else if (name.equals("subject")) { 5159 this.subject = null; 5160 } else if (name.equals("encounter")) { 5161 this.encounter = null; 5162 } else if (name.equals("period")) { 5163 this.period = null; 5164 } else if (name.equals("created")) { 5165 this.created = null; 5166 } else if (name.equals("author")) { 5167 this.author = null; 5168 } else if (name.equals("contributor")) { 5169 this.getContributor().remove(castToReference(value)); 5170 } else if (name.equals("careTeam")) { 5171 this.getCareTeam().remove(castToReference(value)); 5172 } else if (name.equals("addresses")) { 5173 this.getAddresses().remove(castToReference(value)); 5174 } else if (name.equals("supportingInfo")) { 5175 this.getSupportingInfo().remove(castToReference(value)); 5176 } else if (name.equals("goal")) { 5177 this.getGoal().remove(castToReference(value)); 5178 } else if (name.equals("activity")) { 5179 this.getActivity().remove((CarePlanActivityComponent) value); 5180 } else if (name.equals("note")) { 5181 this.getNote().remove(castToAnnotation(value)); 5182 } else 5183 super.removeChild(name, value); 5184 5185 } 5186 5187 @Override 5188 public Base makeProperty(int hash, String name) throws FHIRException { 5189 switch (hash) { 5190 case -1618432855: 5191 return addIdentifier(); 5192 case 8911915: 5193 return addInstantiatesCanonicalElement(); 5194 case -1926393373: 5195 return addInstantiatesUriElement(); 5196 case -332612366: 5197 return addBasedOn(); 5198 case -430332865: 5199 return addReplaces(); 5200 case -995410646: 5201 return addPartOf(); 5202 case -892481550: 5203 return getStatusElement(); 5204 case -1183762788: 5205 return getIntentElement(); 5206 case 50511102: 5207 return addCategory(); 5208 case 110371416: 5209 return getTitleElement(); 5210 case -1724546052: 5211 return getDescriptionElement(); 5212 case -1867885268: 5213 return getSubject(); 5214 case 1524132147: 5215 return getEncounter(); 5216 case -991726143: 5217 return getPeriod(); 5218 case 1028554472: 5219 return getCreatedElement(); 5220 case -1406328437: 5221 return getAuthor(); 5222 case -1895276325: 5223 return addContributor(); 5224 case -7323378: 5225 return addCareTeam(); 5226 case 874544034: 5227 return addAddresses(); 5228 case 1922406657: 5229 return addSupportingInfo(); 5230 case 3178259: 5231 return addGoal(); 5232 case -1655966961: 5233 return addActivity(); 5234 case 3387378: 5235 return addNote(); 5236 default: 5237 return super.makeProperty(hash, name); 5238 } 5239 5240 } 5241 5242 @Override 5243 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5244 switch (hash) { 5245 case -1618432855: 5246 /* identifier */ return new String[] { "Identifier" }; 5247 case 8911915: 5248 /* instantiatesCanonical */ return new String[] { "canonical" }; 5249 case -1926393373: 5250 /* instantiatesUri */ return new String[] { "uri" }; 5251 case -332612366: 5252 /* basedOn */ return new String[] { "Reference" }; 5253 case -430332865: 5254 /* replaces */ return new String[] { "Reference" }; 5255 case -995410646: 5256 /* partOf */ return new String[] { "Reference" }; 5257 case -892481550: 5258 /* status */ return new String[] { "code" }; 5259 case -1183762788: 5260 /* intent */ return new String[] { "code" }; 5261 case 50511102: 5262 /* category */ return new String[] { "CodeableConcept" }; 5263 case 110371416: 5264 /* title */ return new String[] { "string" }; 5265 case -1724546052: 5266 /* description */ return new String[] { "string" }; 5267 case -1867885268: 5268 /* subject */ return new String[] { "Reference" }; 5269 case 1524132147: 5270 /* encounter */ return new String[] { "Reference" }; 5271 case -991726143: 5272 /* period */ return new String[] { "Period" }; 5273 case 1028554472: 5274 /* created */ return new String[] { "dateTime" }; 5275 case -1406328437: 5276 /* author */ return new String[] { "Reference" }; 5277 case -1895276325: 5278 /* contributor */ return new String[] { "Reference" }; 5279 case -7323378: 5280 /* careTeam */ return new String[] { "Reference" }; 5281 case 874544034: 5282 /* addresses */ return new String[] { "Reference" }; 5283 case 1922406657: 5284 /* supportingInfo */ return new String[] { "Reference" }; 5285 case 3178259: 5286 /* goal */ return new String[] { "Reference" }; 5287 case -1655966961: 5288 /* activity */ return new String[] {}; 5289 case 3387378: 5290 /* note */ return new String[] { "Annotation" }; 5291 default: 5292 return super.getTypesForProperty(hash, name); 5293 } 5294 5295 } 5296 5297 @Override 5298 public Base addChild(String name) throws FHIRException { 5299 if (name.equals("identifier")) { 5300 return addIdentifier(); 5301 } else if (name.equals("instantiatesCanonical")) { 5302 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesCanonical"); 5303 } else if (name.equals("instantiatesUri")) { 5304 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesUri"); 5305 } else if (name.equals("basedOn")) { 5306 return addBasedOn(); 5307 } else if (name.equals("replaces")) { 5308 return addReplaces(); 5309 } else if (name.equals("partOf")) { 5310 return addPartOf(); 5311 } else if (name.equals("status")) { 5312 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.status"); 5313 } else if (name.equals("intent")) { 5314 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.intent"); 5315 } else if (name.equals("category")) { 5316 return addCategory(); 5317 } else if (name.equals("title")) { 5318 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.title"); 5319 } else if (name.equals("description")) { 5320 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.description"); 5321 } else if (name.equals("subject")) { 5322 this.subject = new Reference(); 5323 return this.subject; 5324 } else if (name.equals("encounter")) { 5325 this.encounter = new Reference(); 5326 return this.encounter; 5327 } else if (name.equals("period")) { 5328 this.period = new Period(); 5329 return this.period; 5330 } else if (name.equals("created")) { 5331 throw new FHIRException("Cannot call addChild on a singleton property CarePlan.created"); 5332 } else if (name.equals("author")) { 5333 this.author = new Reference(); 5334 return this.author; 5335 } else if (name.equals("contributor")) { 5336 return addContributor(); 5337 } else if (name.equals("careTeam")) { 5338 return addCareTeam(); 5339 } else if (name.equals("addresses")) { 5340 return addAddresses(); 5341 } else if (name.equals("supportingInfo")) { 5342 return addSupportingInfo(); 5343 } else if (name.equals("goal")) { 5344 return addGoal(); 5345 } else if (name.equals("activity")) { 5346 return addActivity(); 5347 } else if (name.equals("note")) { 5348 return addNote(); 5349 } else 5350 return super.addChild(name); 5351 } 5352 5353 public String fhirType() { 5354 return "CarePlan"; 5355 5356 } 5357 5358 public CarePlan copy() { 5359 CarePlan dst = new CarePlan(); 5360 copyValues(dst); 5361 return dst; 5362 } 5363 5364 public void copyValues(CarePlan dst) { 5365 super.copyValues(dst); 5366 if (identifier != null) { 5367 dst.identifier = new ArrayList<Identifier>(); 5368 for (Identifier i : identifier) 5369 dst.identifier.add(i.copy()); 5370 } 5371 ; 5372 if (instantiatesCanonical != null) { 5373 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 5374 for (CanonicalType i : instantiatesCanonical) 5375 dst.instantiatesCanonical.add(i.copy()); 5376 } 5377 ; 5378 if (instantiatesUri != null) { 5379 dst.instantiatesUri = new ArrayList<UriType>(); 5380 for (UriType i : instantiatesUri) 5381 dst.instantiatesUri.add(i.copy()); 5382 } 5383 ; 5384 if (basedOn != null) { 5385 dst.basedOn = new ArrayList<Reference>(); 5386 for (Reference i : basedOn) 5387 dst.basedOn.add(i.copy()); 5388 } 5389 ; 5390 if (replaces != null) { 5391 dst.replaces = new ArrayList<Reference>(); 5392 for (Reference i : replaces) 5393 dst.replaces.add(i.copy()); 5394 } 5395 ; 5396 if (partOf != null) { 5397 dst.partOf = new ArrayList<Reference>(); 5398 for (Reference i : partOf) 5399 dst.partOf.add(i.copy()); 5400 } 5401 ; 5402 dst.status = status == null ? null : status.copy(); 5403 dst.intent = intent == null ? null : intent.copy(); 5404 if (category != null) { 5405 dst.category = new ArrayList<CodeableConcept>(); 5406 for (CodeableConcept i : category) 5407 dst.category.add(i.copy()); 5408 } 5409 ; 5410 dst.title = title == null ? null : title.copy(); 5411 dst.description = description == null ? null : description.copy(); 5412 dst.subject = subject == null ? null : subject.copy(); 5413 dst.encounter = encounter == null ? null : encounter.copy(); 5414 dst.period = period == null ? null : period.copy(); 5415 dst.created = created == null ? null : created.copy(); 5416 dst.author = author == null ? null : author.copy(); 5417 if (contributor != null) { 5418 dst.contributor = new ArrayList<Reference>(); 5419 for (Reference i : contributor) 5420 dst.contributor.add(i.copy()); 5421 } 5422 ; 5423 if (careTeam != null) { 5424 dst.careTeam = new ArrayList<Reference>(); 5425 for (Reference i : careTeam) 5426 dst.careTeam.add(i.copy()); 5427 } 5428 ; 5429 if (addresses != null) { 5430 dst.addresses = new ArrayList<Reference>(); 5431 for (Reference i : addresses) 5432 dst.addresses.add(i.copy()); 5433 } 5434 ; 5435 if (supportingInfo != null) { 5436 dst.supportingInfo = new ArrayList<Reference>(); 5437 for (Reference i : supportingInfo) 5438 dst.supportingInfo.add(i.copy()); 5439 } 5440 ; 5441 if (goal != null) { 5442 dst.goal = new ArrayList<Reference>(); 5443 for (Reference i : goal) 5444 dst.goal.add(i.copy()); 5445 } 5446 ; 5447 if (activity != null) { 5448 dst.activity = new ArrayList<CarePlanActivityComponent>(); 5449 for (CarePlanActivityComponent i : activity) 5450 dst.activity.add(i.copy()); 5451 } 5452 ; 5453 if (note != null) { 5454 dst.note = new ArrayList<Annotation>(); 5455 for (Annotation i : note) 5456 dst.note.add(i.copy()); 5457 } 5458 ; 5459 } 5460 5461 protected CarePlan typedCopy() { 5462 return copy(); 5463 } 5464 5465 @Override 5466 public boolean equalsDeep(Base other_) { 5467 if (!super.equalsDeep(other_)) 5468 return false; 5469 if (!(other_ instanceof CarePlan)) 5470 return false; 5471 CarePlan o = (CarePlan) other_; 5472 return compareDeep(identifier, o.identifier, true) 5473 && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 5474 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true) 5475 && compareDeep(replaces, o.replaces, true) && compareDeep(partOf, o.partOf, true) 5476 && compareDeep(status, o.status, true) && compareDeep(intent, o.intent, true) 5477 && compareDeep(category, o.category, true) && compareDeep(title, o.title, true) 5478 && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true) 5479 && compareDeep(encounter, o.encounter, true) && compareDeep(period, o.period, true) 5480 && compareDeep(created, o.created, true) && compareDeep(author, o.author, true) 5481 && compareDeep(contributor, o.contributor, true) && compareDeep(careTeam, o.careTeam, true) 5482 && compareDeep(addresses, o.addresses, true) && compareDeep(supportingInfo, o.supportingInfo, true) 5483 && compareDeep(goal, o.goal, true) && compareDeep(activity, o.activity, true) 5484 && compareDeep(note, o.note, true); 5485 } 5486 5487 @Override 5488 public boolean equalsShallow(Base other_) { 5489 if (!super.equalsShallow(other_)) 5490 return false; 5491 if (!(other_ instanceof CarePlan)) 5492 return false; 5493 CarePlan o = (CarePlan) other_; 5494 return compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(status, o.status, true) 5495 && compareValues(intent, o.intent, true) && compareValues(title, o.title, true) 5496 && compareValues(description, o.description, true) && compareValues(created, o.created, true); 5497 } 5498 5499 public boolean isEmpty() { 5500 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical, instantiatesUri, 5501 basedOn, replaces, partOf, status, intent, category, title, description, subject, encounter, period, created, 5502 author, contributor, careTeam, addresses, supportingInfo, goal, activity, note); 5503 } 5504 5505 @Override 5506 public ResourceType getResourceType() { 5507 return ResourceType.CarePlan; 5508 } 5509 5510 /** 5511 * Search parameter: <b>date</b> 5512 * <p> 5513 * Description: <b>Time period plan covers</b><br> 5514 * Type: <b>date</b><br> 5515 * Path: <b>CarePlan.period</b><br> 5516 * </p> 5517 */ 5518 @SearchParamDefinition(name = "date", path = "CarePlan.period", description = "Time period plan covers", type = "date") 5519 public static final String SP_DATE = "date"; 5520 /** 5521 * <b>Fluent Client</b> search parameter constant for <b>date</b> 5522 * <p> 5523 * Description: <b>Time period plan covers</b><br> 5524 * Type: <b>date</b><br> 5525 * Path: <b>CarePlan.period</b><br> 5526 * </p> 5527 */ 5528 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 5529 SP_DATE); 5530 5531 /** 5532 * Search parameter: <b>care-team</b> 5533 * <p> 5534 * Description: <b>Who's involved in plan?</b><br> 5535 * Type: <b>reference</b><br> 5536 * Path: <b>CarePlan.careTeam</b><br> 5537 * </p> 5538 */ 5539 @SearchParamDefinition(name = "care-team", path = "CarePlan.careTeam", description = "Who's involved in plan?", type = "reference", target = { 5540 CareTeam.class }) 5541 public static final String SP_CARE_TEAM = "care-team"; 5542 /** 5543 * <b>Fluent Client</b> search parameter constant for <b>care-team</b> 5544 * <p> 5545 * Description: <b>Who's involved in plan?</b><br> 5546 * Type: <b>reference</b><br> 5547 * Path: <b>CarePlan.careTeam</b><br> 5548 * </p> 5549 */ 5550 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARE_TEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5551 SP_CARE_TEAM); 5552 5553 /** 5554 * Constant for fluent queries to be used to add include statements. Specifies 5555 * the path value of "<b>CarePlan:care-team</b>". 5556 */ 5557 public static final ca.uhn.fhir.model.api.Include INCLUDE_CARE_TEAM = new ca.uhn.fhir.model.api.Include( 5558 "CarePlan:care-team").toLocked(); 5559 5560 /** 5561 * Search parameter: <b>identifier</b> 5562 * <p> 5563 * Description: <b>External Ids for this plan</b><br> 5564 * Type: <b>token</b><br> 5565 * Path: <b>CarePlan.identifier</b><br> 5566 * </p> 5567 */ 5568 @SearchParamDefinition(name = "identifier", path = "CarePlan.identifier", description = "External Ids for this plan", type = "token") 5569 public static final String SP_IDENTIFIER = "identifier"; 5570 /** 5571 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5572 * <p> 5573 * Description: <b>External Ids for this plan</b><br> 5574 * Type: <b>token</b><br> 5575 * Path: <b>CarePlan.identifier</b><br> 5576 * </p> 5577 */ 5578 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5579 SP_IDENTIFIER); 5580 5581 /** 5582 * Search parameter: <b>performer</b> 5583 * <p> 5584 * Description: <b>Matches if the practitioner is listed as a performer in any 5585 * of the "simple" activities. (For performers of the detailed activities, chain 5586 * through the activitydetail search parameter.)</b><br> 5587 * Type: <b>reference</b><br> 5588 * Path: <b>CarePlan.activity.detail.performer</b><br> 5589 * </p> 5590 */ 5591 @SearchParamDefinition(name = "performer", path = "CarePlan.activity.detail.performer", description = "Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type = "reference", providesMembershipIn = { 5592 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Patient"), 5593 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Practitioner"), 5594 @ca.uhn.fhir.model.api.annotation.Compartment(name = "RelatedPerson") }, target = { CareTeam.class, Device.class, 5595 HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, 5596 RelatedPerson.class }) 5597 public static final String SP_PERFORMER = "performer"; 5598 /** 5599 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 5600 * <p> 5601 * Description: <b>Matches if the practitioner is listed as a performer in any 5602 * of the "simple" activities. (For performers of the detailed activities, chain 5603 * through the activitydetail search parameter.)</b><br> 5604 * Type: <b>reference</b><br> 5605 * Path: <b>CarePlan.activity.detail.performer</b><br> 5606 * </p> 5607 */ 5608 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5609 SP_PERFORMER); 5610 5611 /** 5612 * Constant for fluent queries to be used to add include statements. Specifies 5613 * the path value of "<b>CarePlan:performer</b>". 5614 */ 5615 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include( 5616 "CarePlan:performer").toLocked(); 5617 5618 /** 5619 * Search parameter: <b>goal</b> 5620 * <p> 5621 * Description: <b>Desired outcome of plan</b><br> 5622 * Type: <b>reference</b><br> 5623 * Path: <b>CarePlan.goal</b><br> 5624 * </p> 5625 */ 5626 @SearchParamDefinition(name = "goal", path = "CarePlan.goal", description = "Desired outcome of plan", type = "reference", target = { 5627 Goal.class }) 5628 public static final String SP_GOAL = "goal"; 5629 /** 5630 * <b>Fluent Client</b> search parameter constant for <b>goal</b> 5631 * <p> 5632 * Description: <b>Desired outcome of plan</b><br> 5633 * Type: <b>reference</b><br> 5634 * Path: <b>CarePlan.goal</b><br> 5635 * </p> 5636 */ 5637 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GOAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5638 SP_GOAL); 5639 5640 /** 5641 * Constant for fluent queries to be used to add include statements. Specifies 5642 * the path value of "<b>CarePlan:goal</b>". 5643 */ 5644 public static final ca.uhn.fhir.model.api.Include INCLUDE_GOAL = new ca.uhn.fhir.model.api.Include("CarePlan:goal") 5645 .toLocked(); 5646 5647 /** 5648 * Search parameter: <b>subject</b> 5649 * <p> 5650 * Description: <b>Who the care plan is for</b><br> 5651 * Type: <b>reference</b><br> 5652 * Path: <b>CarePlan.subject</b><br> 5653 * </p> 5654 */ 5655 @SearchParamDefinition(name = "subject", path = "CarePlan.subject", description = "Who the care plan is for", type = "reference", target = { 5656 Group.class, Patient.class }) 5657 public static final String SP_SUBJECT = "subject"; 5658 /** 5659 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 5660 * <p> 5661 * Description: <b>Who the care plan is for</b><br> 5662 * Type: <b>reference</b><br> 5663 * Path: <b>CarePlan.subject</b><br> 5664 * </p> 5665 */ 5666 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5667 SP_SUBJECT); 5668 5669 /** 5670 * Constant for fluent queries to be used to add include statements. Specifies 5671 * the path value of "<b>CarePlan:subject</b>". 5672 */ 5673 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include( 5674 "CarePlan:subject").toLocked(); 5675 5676 /** 5677 * Search parameter: <b>replaces</b> 5678 * <p> 5679 * Description: <b>CarePlan replaced by this CarePlan</b><br> 5680 * Type: <b>reference</b><br> 5681 * Path: <b>CarePlan.replaces</b><br> 5682 * </p> 5683 */ 5684 @SearchParamDefinition(name = "replaces", path = "CarePlan.replaces", description = "CarePlan replaced by this CarePlan", type = "reference", target = { 5685 CarePlan.class }) 5686 public static final String SP_REPLACES = "replaces"; 5687 /** 5688 * <b>Fluent Client</b> search parameter constant for <b>replaces</b> 5689 * <p> 5690 * Description: <b>CarePlan replaced by this CarePlan</b><br> 5691 * Type: <b>reference</b><br> 5692 * Path: <b>CarePlan.replaces</b><br> 5693 * </p> 5694 */ 5695 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5696 SP_REPLACES); 5697 5698 /** 5699 * Constant for fluent queries to be used to add include statements. Specifies 5700 * the path value of "<b>CarePlan:replaces</b>". 5701 */ 5702 public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACES = new ca.uhn.fhir.model.api.Include( 5703 "CarePlan:replaces").toLocked(); 5704 5705 /** 5706 * Search parameter: <b>instantiates-canonical</b> 5707 * <p> 5708 * Description: <b>Instantiates FHIR protocol or definition</b><br> 5709 * Type: <b>reference</b><br> 5710 * Path: <b>CarePlan.instantiatesCanonical</b><br> 5711 * </p> 5712 */ 5713 @SearchParamDefinition(name = "instantiates-canonical", path = "CarePlan.instantiatesCanonical", description = "Instantiates FHIR protocol or definition", type = "reference", target = { 5714 ActivityDefinition.class, Measure.class, OperationDefinition.class, PlanDefinition.class, Questionnaire.class }) 5715 public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical"; 5716 /** 5717 * <b>Fluent Client</b> search parameter constant for 5718 * <b>instantiates-canonical</b> 5719 * <p> 5720 * Description: <b>Instantiates FHIR protocol or definition</b><br> 5721 * Type: <b>reference</b><br> 5722 * Path: <b>CarePlan.instantiatesCanonical</b><br> 5723 * </p> 5724 */ 5725 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5726 SP_INSTANTIATES_CANONICAL); 5727 5728 /** 5729 * Constant for fluent queries to be used to add include statements. Specifies 5730 * the path value of "<b>CarePlan:instantiates-canonical</b>". 5731 */ 5732 public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include( 5733 "CarePlan:instantiates-canonical").toLocked(); 5734 5735 /** 5736 * Search parameter: <b>part-of</b> 5737 * <p> 5738 * Description: <b>Part of referenced CarePlan</b><br> 5739 * Type: <b>reference</b><br> 5740 * Path: <b>CarePlan.partOf</b><br> 5741 * </p> 5742 */ 5743 @SearchParamDefinition(name = "part-of", path = "CarePlan.partOf", description = "Part of referenced CarePlan", type = "reference", target = { 5744 CarePlan.class }) 5745 public static final String SP_PART_OF = "part-of"; 5746 /** 5747 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 5748 * <p> 5749 * Description: <b>Part of referenced CarePlan</b><br> 5750 * Type: <b>reference</b><br> 5751 * Path: <b>CarePlan.partOf</b><br> 5752 * </p> 5753 */ 5754 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5755 SP_PART_OF); 5756 5757 /** 5758 * Constant for fluent queries to be used to add include statements. Specifies 5759 * the path value of "<b>CarePlan:part-of</b>". 5760 */ 5761 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include( 5762 "CarePlan:part-of").toLocked(); 5763 5764 /** 5765 * Search parameter: <b>encounter</b> 5766 * <p> 5767 * Description: <b>Encounter created as part of</b><br> 5768 * Type: <b>reference</b><br> 5769 * Path: <b>CarePlan.encounter</b><br> 5770 * </p> 5771 */ 5772 @SearchParamDefinition(name = "encounter", path = "CarePlan.encounter", description = "Encounter created as part of", type = "reference", providesMembershipIn = { 5773 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Encounter") }, target = { Encounter.class }) 5774 public static final String SP_ENCOUNTER = "encounter"; 5775 /** 5776 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 5777 * <p> 5778 * Description: <b>Encounter created as part of</b><br> 5779 * Type: <b>reference</b><br> 5780 * Path: <b>CarePlan.encounter</b><br> 5781 * </p> 5782 */ 5783 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5784 SP_ENCOUNTER); 5785 5786 /** 5787 * Constant for fluent queries to be used to add include statements. Specifies 5788 * the path value of "<b>CarePlan:encounter</b>". 5789 */ 5790 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include( 5791 "CarePlan:encounter").toLocked(); 5792 5793 /** 5794 * Search parameter: <b>intent</b> 5795 * <p> 5796 * Description: <b>proposal | plan | order | option</b><br> 5797 * Type: <b>token</b><br> 5798 * Path: <b>CarePlan.intent</b><br> 5799 * </p> 5800 */ 5801 @SearchParamDefinition(name = "intent", path = "CarePlan.intent", description = "proposal | plan | order | option", type = "token") 5802 public static final String SP_INTENT = "intent"; 5803 /** 5804 * <b>Fluent Client</b> search parameter constant for <b>intent</b> 5805 * <p> 5806 * Description: <b>proposal | plan | order | option</b><br> 5807 * Type: <b>token</b><br> 5808 * Path: <b>CarePlan.intent</b><br> 5809 * </p> 5810 */ 5811 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5812 SP_INTENT); 5813 5814 /** 5815 * Search parameter: <b>activity-reference</b> 5816 * <p> 5817 * Description: <b>Activity details defined in specific resource</b><br> 5818 * Type: <b>reference</b><br> 5819 * Path: <b>CarePlan.activity.reference</b><br> 5820 * </p> 5821 */ 5822 @SearchParamDefinition(name = "activity-reference", path = "CarePlan.activity.reference", description = "Activity details defined in specific resource", type = "reference", target = { 5823 Appointment.class, CommunicationRequest.class, DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, 5824 RequestGroup.class, ServiceRequest.class, Task.class, VisionPrescription.class }) 5825 public static final String SP_ACTIVITY_REFERENCE = "activity-reference"; 5826 /** 5827 * <b>Fluent Client</b> search parameter constant for <b>activity-reference</b> 5828 * <p> 5829 * Description: <b>Activity details defined in specific resource</b><br> 5830 * Type: <b>reference</b><br> 5831 * Path: <b>CarePlan.activity.reference</b><br> 5832 * </p> 5833 */ 5834 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTIVITY_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5835 SP_ACTIVITY_REFERENCE); 5836 5837 /** 5838 * Constant for fluent queries to be used to add include statements. Specifies 5839 * the path value of "<b>CarePlan:activity-reference</b>". 5840 */ 5841 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTIVITY_REFERENCE = new ca.uhn.fhir.model.api.Include( 5842 "CarePlan:activity-reference").toLocked(); 5843 5844 /** 5845 * Search parameter: <b>condition</b> 5846 * <p> 5847 * Description: <b>Health issues this plan addresses</b><br> 5848 * Type: <b>reference</b><br> 5849 * Path: <b>CarePlan.addresses</b><br> 5850 * </p> 5851 */ 5852 @SearchParamDefinition(name = "condition", path = "CarePlan.addresses", description = "Health issues this plan addresses", type = "reference", target = { 5853 Condition.class }) 5854 public static final String SP_CONDITION = "condition"; 5855 /** 5856 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 5857 * <p> 5858 * Description: <b>Health issues this plan addresses</b><br> 5859 * Type: <b>reference</b><br> 5860 * Path: <b>CarePlan.addresses</b><br> 5861 * </p> 5862 */ 5863 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5864 SP_CONDITION); 5865 5866 /** 5867 * Constant for fluent queries to be used to add include statements. Specifies 5868 * the path value of "<b>CarePlan:condition</b>". 5869 */ 5870 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include( 5871 "CarePlan:condition").toLocked(); 5872 5873 /** 5874 * Search parameter: <b>based-on</b> 5875 * <p> 5876 * Description: <b>Fulfills CarePlan</b><br> 5877 * Type: <b>reference</b><br> 5878 * Path: <b>CarePlan.basedOn</b><br> 5879 * </p> 5880 */ 5881 @SearchParamDefinition(name = "based-on", path = "CarePlan.basedOn", description = "Fulfills CarePlan", type = "reference", target = { 5882 CarePlan.class }) 5883 public static final String SP_BASED_ON = "based-on"; 5884 /** 5885 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 5886 * <p> 5887 * Description: <b>Fulfills CarePlan</b><br> 5888 * Type: <b>reference</b><br> 5889 * Path: <b>CarePlan.basedOn</b><br> 5890 * </p> 5891 */ 5892 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5893 SP_BASED_ON); 5894 5895 /** 5896 * Constant for fluent queries to be used to add include statements. Specifies 5897 * the path value of "<b>CarePlan:based-on</b>". 5898 */ 5899 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include( 5900 "CarePlan:based-on").toLocked(); 5901 5902 /** 5903 * Search parameter: <b>patient</b> 5904 * <p> 5905 * Description: <b>Who the care plan is for</b><br> 5906 * Type: <b>reference</b><br> 5907 * Path: <b>CarePlan.subject</b><br> 5908 * </p> 5909 */ 5910 @SearchParamDefinition(name = "patient", path = "CarePlan.subject.where(resolve() is Patient)", description = "Who the care plan is for", type = "reference", providesMembershipIn = { 5911 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Patient") }, target = { Patient.class }) 5912 public static final String SP_PATIENT = "patient"; 5913 /** 5914 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 5915 * <p> 5916 * Description: <b>Who the care plan is for</b><br> 5917 * Type: <b>reference</b><br> 5918 * Path: <b>CarePlan.subject</b><br> 5919 * </p> 5920 */ 5921 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5922 SP_PATIENT); 5923 5924 /** 5925 * Constant for fluent queries to be used to add include statements. Specifies 5926 * the path value of "<b>CarePlan:patient</b>". 5927 */ 5928 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include( 5929 "CarePlan:patient").toLocked(); 5930 5931 /** 5932 * Search parameter: <b>activity-date</b> 5933 * <p> 5934 * Description: <b>Specified date occurs within period specified by 5935 * CarePlan.activity.detail.scheduled[x]</b><br> 5936 * Type: <b>date</b><br> 5937 * Path: <b>CarePlan.activity.detail.scheduled[x]</b><br> 5938 * </p> 5939 */ 5940 @SearchParamDefinition(name = "activity-date", path = "CarePlan.activity.detail.scheduled", description = "Specified date occurs within period specified by CarePlan.activity.detail.scheduled[x]", type = "date") 5941 public static final String SP_ACTIVITY_DATE = "activity-date"; 5942 /** 5943 * <b>Fluent Client</b> search parameter constant for <b>activity-date</b> 5944 * <p> 5945 * Description: <b>Specified date occurs within period specified by 5946 * CarePlan.activity.detail.scheduled[x]</b><br> 5947 * Type: <b>date</b><br> 5948 * Path: <b>CarePlan.activity.detail.scheduled[x]</b><br> 5949 * </p> 5950 */ 5951 public static final ca.uhn.fhir.rest.gclient.DateClientParam ACTIVITY_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 5952 SP_ACTIVITY_DATE); 5953 5954 /** 5955 * Search parameter: <b>instantiates-uri</b> 5956 * <p> 5957 * Description: <b>Instantiates external protocol or definition</b><br> 5958 * Type: <b>uri</b><br> 5959 * Path: <b>CarePlan.instantiatesUri</b><br> 5960 * </p> 5961 */ 5962 @SearchParamDefinition(name = "instantiates-uri", path = "CarePlan.instantiatesUri", description = "Instantiates external protocol or definition", type = "uri") 5963 public static final String SP_INSTANTIATES_URI = "instantiates-uri"; 5964 /** 5965 * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b> 5966 * <p> 5967 * Description: <b>Instantiates external protocol or definition</b><br> 5968 * Type: <b>uri</b><br> 5969 * Path: <b>CarePlan.instantiatesUri</b><br> 5970 * </p> 5971 */ 5972 public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam( 5973 SP_INSTANTIATES_URI); 5974 5975 /** 5976 * Search parameter: <b>category</b> 5977 * <p> 5978 * Description: <b>Type of plan</b><br> 5979 * Type: <b>token</b><br> 5980 * Path: <b>CarePlan.category</b><br> 5981 * </p> 5982 */ 5983 @SearchParamDefinition(name = "category", path = "CarePlan.category", description = "Type of plan", type = "token") 5984 public static final String SP_CATEGORY = "category"; 5985 /** 5986 * <b>Fluent Client</b> search parameter constant for <b>category</b> 5987 * <p> 5988 * Description: <b>Type of plan</b><br> 5989 * Type: <b>token</b><br> 5990 * Path: <b>CarePlan.category</b><br> 5991 * </p> 5992 */ 5993 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5994 SP_CATEGORY); 5995 5996 /** 5997 * Search parameter: <b>activity-code</b> 5998 * <p> 5999 * Description: <b>Detail type of activity</b><br> 6000 * Type: <b>token</b><br> 6001 * Path: <b>CarePlan.activity.detail.code</b><br> 6002 * </p> 6003 */ 6004 @SearchParamDefinition(name = "activity-code", path = "CarePlan.activity.detail.code", description = "Detail type of activity", type = "token") 6005 public static final String SP_ACTIVITY_CODE = "activity-code"; 6006 /** 6007 * <b>Fluent Client</b> search parameter constant for <b>activity-code</b> 6008 * <p> 6009 * Description: <b>Detail type of activity</b><br> 6010 * Type: <b>token</b><br> 6011 * Path: <b>CarePlan.activity.detail.code</b><br> 6012 * </p> 6013 */ 6014 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVITY_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 6015 SP_ACTIVITY_CODE); 6016 6017 /** 6018 * Search parameter: <b>status</b> 6019 * <p> 6020 * Description: <b>draft | active | on-hold | revoked | completed | 6021 * entered-in-error | unknown</b><br> 6022 * Type: <b>token</b><br> 6023 * Path: <b>CarePlan.status</b><br> 6024 * </p> 6025 */ 6026 @SearchParamDefinition(name = "status", path = "CarePlan.status", description = "draft | active | on-hold | revoked | completed | entered-in-error | unknown", type = "token") 6027 public static final String SP_STATUS = "status"; 6028 /** 6029 * <b>Fluent Client</b> search parameter constant for <b>status</b> 6030 * <p> 6031 * Description: <b>draft | active | on-hold | revoked | completed | 6032 * entered-in-error | unknown</b><br> 6033 * Type: <b>token</b><br> 6034 * Path: <b>CarePlan.status</b><br> 6035 * </p> 6036 */ 6037 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 6038 SP_STATUS); 6039 6040}