001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Tue, Dec 13, 2022 17:53+1100 for FHIR vcurrent 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. 052 */ 053@ResourceDef(name="CarePlan", profile="http://hl7.org/fhir/StructureDefinition/CarePlan") 054public class CarePlan extends DomainResource { 055 056 public enum CarePlanActivityKind { 057 /** 058 * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). 059 */ 060 APPOINTMENT, 061 /** 062 * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. 063 */ 064 COMMUNICATIONREQUEST, 065 /** 066 * Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used. 067 */ 068 DEVICEREQUEST, 069 /** 070 * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. 071 */ 072 MEDICATIONREQUEST, 073 /** 074 * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. 075 */ 076 NUTRITIONORDER, 077 /** 078 * A task to be performed. 079 */ 080 TASK, 081 /** 082 * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. 083 */ 084 SERVICEREQUEST, 085 /** 086 * An authorization for the provision of glasses and/or contact lenses to a patient. 087 */ 088 VISIONPRESCRIPTION, 089 /** 090 * added to help the parsers with the generic types 091 */ 092 NULL; 093 public static CarePlanActivityKind fromCode(String codeString) throws FHIRException { 094 if (codeString == null || "".equals(codeString)) 095 return null; 096 if ("Appointment".equals(codeString)) 097 return APPOINTMENT; 098 if ("CommunicationRequest".equals(codeString)) 099 return COMMUNICATIONREQUEST; 100 if ("DeviceRequest".equals(codeString)) 101 return DEVICEREQUEST; 102 if ("MedicationRequest".equals(codeString)) 103 return MEDICATIONREQUEST; 104 if ("NutritionOrder".equals(codeString)) 105 return NUTRITIONORDER; 106 if ("Task".equals(codeString)) 107 return TASK; 108 if ("ServiceRequest".equals(codeString)) 109 return SERVICEREQUEST; 110 if ("VisionPrescription".equals(codeString)) 111 return VISIONPRESCRIPTION; 112 if (Configuration.isAcceptInvalidEnums()) 113 return null; 114 else 115 throw new FHIRException("Unknown CarePlanActivityKind code '"+codeString+"'"); 116 } 117 public String toCode() { 118 switch (this) { 119 case APPOINTMENT: return "Appointment"; 120 case COMMUNICATIONREQUEST: return "CommunicationRequest"; 121 case DEVICEREQUEST: return "DeviceRequest"; 122 case MEDICATIONREQUEST: return "MedicationRequest"; 123 case NUTRITIONORDER: return "NutritionOrder"; 124 case TASK: return "Task"; 125 case SERVICEREQUEST: return "ServiceRequest"; 126 case VISIONPRESCRIPTION: return "VisionPrescription"; 127 case NULL: return null; 128 default: return "?"; 129 } 130 } 131 public String getSystem() { 132 switch (this) { 133 case APPOINTMENT: return "http://hl7.org/fhir/fhir-types"; 134 case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/fhir-types"; 135 case DEVICEREQUEST: return "http://hl7.org/fhir/fhir-types"; 136 case MEDICATIONREQUEST: return "http://hl7.org/fhir/fhir-types"; 137 case NUTRITIONORDER: return "http://hl7.org/fhir/fhir-types"; 138 case TASK: return "http://hl7.org/fhir/fhir-types"; 139 case SERVICEREQUEST: return "http://hl7.org/fhir/fhir-types"; 140 case VISIONPRESCRIPTION: return "http://hl7.org/fhir/fhir-types"; 141 case NULL: return null; 142 default: return "?"; 143 } 144 } 145 public String getDefinition() { 146 switch (this) { 147 case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; 148 case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; 149 case DEVICEREQUEST: return "Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used."; 150 case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."; 151 case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; 152 case TASK: return "A task to be performed."; 153 case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed."; 154 case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient."; 155 case NULL: return null; 156 default: return "?"; 157 } 158 } 159 public String getDisplay() { 160 switch (this) { 161 case APPOINTMENT: return "Appointment"; 162 case COMMUNICATIONREQUEST: return "CommunicationRequest"; 163 case DEVICEREQUEST: return "DeviceRequest"; 164 case MEDICATIONREQUEST: return "MedicationRequest"; 165 case NUTRITIONORDER: return "NutritionOrder"; 166 case TASK: return "Task"; 167 case SERVICEREQUEST: return "ServiceRequest"; 168 case VISIONPRESCRIPTION: return "VisionPrescription"; 169 case NULL: return null; 170 default: return "?"; 171 } 172 } 173 } 174 175 public static class CarePlanActivityKindEnumFactory implements EnumFactory<CarePlanActivityKind> { 176 public CarePlanActivityKind fromCode(String codeString) throws IllegalArgumentException { 177 if (codeString == null || "".equals(codeString)) 178 if (codeString == null || "".equals(codeString)) 179 return null; 180 if ("Appointment".equals(codeString)) 181 return CarePlanActivityKind.APPOINTMENT; 182 if ("CommunicationRequest".equals(codeString)) 183 return CarePlanActivityKind.COMMUNICATIONREQUEST; 184 if ("DeviceRequest".equals(codeString)) 185 return CarePlanActivityKind.DEVICEREQUEST; 186 if ("MedicationRequest".equals(codeString)) 187 return CarePlanActivityKind.MEDICATIONREQUEST; 188 if ("NutritionOrder".equals(codeString)) 189 return CarePlanActivityKind.NUTRITIONORDER; 190 if ("Task".equals(codeString)) 191 return CarePlanActivityKind.TASK; 192 if ("ServiceRequest".equals(codeString)) 193 return CarePlanActivityKind.SERVICEREQUEST; 194 if ("VisionPrescription".equals(codeString)) 195 return CarePlanActivityKind.VISIONPRESCRIPTION; 196 throw new IllegalArgumentException("Unknown CarePlanActivityKind code '"+codeString+"'"); 197 } 198 public Enumeration<CarePlanActivityKind> fromType(PrimitiveType<?> code) throws FHIRException { 199 if (code == null) 200 return null; 201 if (code.isEmpty()) 202 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NULL, code); 203 String codeString = ((PrimitiveType) code).asStringValue(); 204 if (codeString == null || "".equals(codeString)) 205 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NULL, code); 206 if ("Appointment".equals(codeString)) 207 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.APPOINTMENT, code); 208 if ("CommunicationRequest".equals(codeString)) 209 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.COMMUNICATIONREQUEST, code); 210 if ("DeviceRequest".equals(codeString)) 211 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.DEVICEREQUEST, code); 212 if ("MedicationRequest".equals(codeString)) 213 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.MEDICATIONREQUEST, code); 214 if ("NutritionOrder".equals(codeString)) 215 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.NUTRITIONORDER, code); 216 if ("Task".equals(codeString)) 217 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.TASK, code); 218 if ("ServiceRequest".equals(codeString)) 219 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.SERVICEREQUEST, code); 220 if ("VisionPrescription".equals(codeString)) 221 return new Enumeration<CarePlanActivityKind>(this, CarePlanActivityKind.VISIONPRESCRIPTION, code); 222 throw new FHIRException("Unknown CarePlanActivityKind code '"+codeString+"'"); 223 } 224 public String toCode(CarePlanActivityKind code) { 225 if (code == CarePlanActivityKind.APPOINTMENT) 226 return "Appointment"; 227 if (code == CarePlanActivityKind.COMMUNICATIONREQUEST) 228 return "CommunicationRequest"; 229 if (code == CarePlanActivityKind.DEVICEREQUEST) 230 return "DeviceRequest"; 231 if (code == CarePlanActivityKind.MEDICATIONREQUEST) 232 return "MedicationRequest"; 233 if (code == CarePlanActivityKind.NUTRITIONORDER) 234 return "NutritionOrder"; 235 if (code == CarePlanActivityKind.TASK) 236 return "Task"; 237 if (code == CarePlanActivityKind.SERVICEREQUEST) 238 return "ServiceRequest"; 239 if (code == CarePlanActivityKind.VISIONPRESCRIPTION) 240 return "VisionPrescription"; 241 return "?"; 242 } 243 public String toSystem(CarePlanActivityKind code) { 244 return code.getSystem(); 245 } 246 } 247 248 public enum CarePlanActivityStatus { 249 /** 250 * Care plan activity is planned but no action has yet been taken. 251 */ 252 NOTSTARTED, 253 /** 254 * Appointment or other booking has occurred but activity has not yet begun. 255 */ 256 SCHEDULED, 257 /** 258 * Care plan activity has been started but is not yet complete. 259 */ 260 INPROGRESS, 261 /** 262 * Care plan activity was started but has temporarily ceased with an expectation of resumption at a future time. 263 */ 264 ONHOLD, 265 /** 266 * Care plan activity has been completed (more or less) as planned. 267 */ 268 COMPLETED, 269 /** 270 * The planned care plan activity has been withdrawn. 271 */ 272 CANCELLED, 273 /** 274 * The planned care plan activity has been ended prior to completion after the activity was started. 275 */ 276 STOPPED, 277 /** 278 * 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. 279 */ 280 UNKNOWN, 281 /** 282 * Care plan activity was entered in error and voided. 283 */ 284 ENTEREDINERROR, 285 /** 286 * added to help the parsers with the generic types 287 */ 288 NULL; 289 public static CarePlanActivityStatus fromCode(String codeString) throws FHIRException { 290 if (codeString == null || "".equals(codeString)) 291 return null; 292 if ("not-started".equals(codeString)) 293 return NOTSTARTED; 294 if ("scheduled".equals(codeString)) 295 return SCHEDULED; 296 if ("in-progress".equals(codeString)) 297 return INPROGRESS; 298 if ("on-hold".equals(codeString)) 299 return ONHOLD; 300 if ("completed".equals(codeString)) 301 return COMPLETED; 302 if ("cancelled".equals(codeString)) 303 return CANCELLED; 304 if ("stopped".equals(codeString)) 305 return STOPPED; 306 if ("unknown".equals(codeString)) 307 return UNKNOWN; 308 if ("entered-in-error".equals(codeString)) 309 return ENTEREDINERROR; 310 if (Configuration.isAcceptInvalidEnums()) 311 return null; 312 else 313 throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); 314 } 315 public String toCode() { 316 switch (this) { 317 case NOTSTARTED: return "not-started"; 318 case SCHEDULED: return "scheduled"; 319 case INPROGRESS: return "in-progress"; 320 case ONHOLD: return "on-hold"; 321 case COMPLETED: return "completed"; 322 case CANCELLED: return "cancelled"; 323 case STOPPED: return "stopped"; 324 case UNKNOWN: return "unknown"; 325 case ENTEREDINERROR: return "entered-in-error"; 326 case NULL: return null; 327 default: return "?"; 328 } 329 } 330 public String getSystem() { 331 switch (this) { 332 case NOTSTARTED: return "http://hl7.org/fhir/care-plan-activity-status"; 333 case SCHEDULED: return "http://hl7.org/fhir/care-plan-activity-status"; 334 case INPROGRESS: return "http://hl7.org/fhir/care-plan-activity-status"; 335 case ONHOLD: return "http://hl7.org/fhir/care-plan-activity-status"; 336 case COMPLETED: return "http://hl7.org/fhir/care-plan-activity-status"; 337 case CANCELLED: return "http://hl7.org/fhir/care-plan-activity-status"; 338 case STOPPED: return "http://hl7.org/fhir/care-plan-activity-status"; 339 case UNKNOWN: return "http://hl7.org/fhir/care-plan-activity-status"; 340 case ENTEREDINERROR: return "http://hl7.org/fhir/care-plan-activity-status"; 341 case NULL: return null; 342 default: return "?"; 343 } 344 } 345 public String getDefinition() { 346 switch (this) { 347 case NOTSTARTED: return "Care plan activity is planned but no action has yet been taken."; 348 case SCHEDULED: return "Appointment or other booking has occurred but activity has not yet begun."; 349 case INPROGRESS: return "Care plan activity has been started but is not yet complete."; 350 case ONHOLD: return "Care plan activity was started but has temporarily ceased with an expectation of resumption at a future time."; 351 case COMPLETED: return "Care plan activity has been completed (more or less) as planned."; 352 case CANCELLED: return "The planned care plan activity has been withdrawn."; 353 case STOPPED: return "The planned care plan activity has been ended prior to completion after the activity was started."; 354 case UNKNOWN: 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."; 355 case ENTEREDINERROR: return "Care plan activity was entered in error and voided."; 356 case NULL: return null; 357 default: return "?"; 358 } 359 } 360 public String getDisplay() { 361 switch (this) { 362 case NOTSTARTED: return "Not Started"; 363 case SCHEDULED: return "Scheduled"; 364 case INPROGRESS: return "In Progress"; 365 case ONHOLD: return "On Hold"; 366 case COMPLETED: return "Completed"; 367 case CANCELLED: return "Cancelled"; 368 case STOPPED: return "Stopped"; 369 case UNKNOWN: return "Unknown"; 370 case ENTEREDINERROR: return "Entered in Error"; 371 case NULL: return null; 372 default: return "?"; 373 } 374 } 375 } 376 377 public static class CarePlanActivityStatusEnumFactory implements EnumFactory<CarePlanActivityStatus> { 378 public CarePlanActivityStatus fromCode(String codeString) throws IllegalArgumentException { 379 if (codeString == null || "".equals(codeString)) 380 if (codeString == null || "".equals(codeString)) 381 return null; 382 if ("not-started".equals(codeString)) 383 return CarePlanActivityStatus.NOTSTARTED; 384 if ("scheduled".equals(codeString)) 385 return CarePlanActivityStatus.SCHEDULED; 386 if ("in-progress".equals(codeString)) 387 return CarePlanActivityStatus.INPROGRESS; 388 if ("on-hold".equals(codeString)) 389 return CarePlanActivityStatus.ONHOLD; 390 if ("completed".equals(codeString)) 391 return CarePlanActivityStatus.COMPLETED; 392 if ("cancelled".equals(codeString)) 393 return CarePlanActivityStatus.CANCELLED; 394 if ("stopped".equals(codeString)) 395 return CarePlanActivityStatus.STOPPED; 396 if ("unknown".equals(codeString)) 397 return CarePlanActivityStatus.UNKNOWN; 398 if ("entered-in-error".equals(codeString)) 399 return CarePlanActivityStatus.ENTEREDINERROR; 400 throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '"+codeString+"'"); 401 } 402 public Enumeration<CarePlanActivityStatus> fromType(PrimitiveType<?> code) throws FHIRException { 403 if (code == null) 404 return null; 405 if (code.isEmpty()) 406 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NULL, code); 407 String codeString = ((PrimitiveType) code).asStringValue(); 408 if (codeString == null || "".equals(codeString)) 409 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NULL, code); 410 if ("not-started".equals(codeString)) 411 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.NOTSTARTED, code); 412 if ("scheduled".equals(codeString)) 413 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.SCHEDULED, code); 414 if ("in-progress".equals(codeString)) 415 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.INPROGRESS, code); 416 if ("on-hold".equals(codeString)) 417 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.ONHOLD, code); 418 if ("completed".equals(codeString)) 419 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.COMPLETED, code); 420 if ("cancelled".equals(codeString)) 421 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.CANCELLED, code); 422 if ("stopped".equals(codeString)) 423 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.STOPPED, code); 424 if ("unknown".equals(codeString)) 425 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.UNKNOWN, code); 426 if ("entered-in-error".equals(codeString)) 427 return new Enumeration<CarePlanActivityStatus>(this, CarePlanActivityStatus.ENTEREDINERROR, code); 428 throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); 429 } 430 public String toCode(CarePlanActivityStatus code) { 431 if (code == CarePlanActivityStatus.NOTSTARTED) 432 return "not-started"; 433 if (code == CarePlanActivityStatus.SCHEDULED) 434 return "scheduled"; 435 if (code == CarePlanActivityStatus.INPROGRESS) 436 return "in-progress"; 437 if (code == CarePlanActivityStatus.ONHOLD) 438 return "on-hold"; 439 if (code == CarePlanActivityStatus.COMPLETED) 440 return "completed"; 441 if (code == CarePlanActivityStatus.CANCELLED) 442 return "cancelled"; 443 if (code == CarePlanActivityStatus.STOPPED) 444 return "stopped"; 445 if (code == CarePlanActivityStatus.UNKNOWN) 446 return "unknown"; 447 if (code == CarePlanActivityStatus.ENTEREDINERROR) 448 return "entered-in-error"; 449 return "?"; 450 } 451 public String toSystem(CarePlanActivityStatus code) { 452 return code.getSystem(); 453 } 454 } 455 456 public enum CarePlanIntent { 457 /** 458 * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act. 459 */ 460 PROPOSAL, 461 /** 462 * The request represents an intention to ensure something occurs without providing an authorization for others to act. 463 */ 464 PLAN, 465 /** 466 * The request represents a request/demand and authorization for action by the requestor. 467 */ 468 ORDER, 469 /** 470 * The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestOrchestration]]] for additional information on how this status is used. 471 */ 472 OPTION, 473 /** 474 * The request represents a legally binding instruction authored by a Patient or RelatedPerson. 475 */ 476 DIRECTIVE, 477 /** 478 * added to help the parsers with the generic types 479 */ 480 NULL; 481 public static CarePlanIntent fromCode(String codeString) throws FHIRException { 482 if (codeString == null || "".equals(codeString)) 483 return null; 484 if ("proposal".equals(codeString)) 485 return PROPOSAL; 486 if ("plan".equals(codeString)) 487 return PLAN; 488 if ("order".equals(codeString)) 489 return ORDER; 490 if ("option".equals(codeString)) 491 return OPTION; 492 if ("directive".equals(codeString)) 493 return DIRECTIVE; 494 if (Configuration.isAcceptInvalidEnums()) 495 return null; 496 else 497 throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'"); 498 } 499 public String toCode() { 500 switch (this) { 501 case PROPOSAL: return "proposal"; 502 case PLAN: return "plan"; 503 case ORDER: return "order"; 504 case OPTION: return "option"; 505 case DIRECTIVE: return "directive"; 506 case NULL: return null; 507 default: return "?"; 508 } 509 } 510 public String getSystem() { 511 switch (this) { 512 case PROPOSAL: return "http://hl7.org/fhir/request-intent"; 513 case PLAN: return "http://hl7.org/fhir/request-intent"; 514 case ORDER: return "http://hl7.org/fhir/request-intent"; 515 case OPTION: return "http://hl7.org/fhir/request-intent"; 516 case DIRECTIVE: return "http://hl7.org/fhir/request-intent"; 517 case NULL: return null; 518 default: return "?"; 519 } 520 } 521 public String getDefinition() { 522 switch (this) { 523 case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act."; 524 case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act."; 525 case ORDER: return "The request represents a request/demand and authorization for action by the requestor."; 526 case OPTION: return "The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestOrchestration]]] for additional information on how this status is used."; 527 case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson."; 528 case NULL: return null; 529 default: return "?"; 530 } 531 } 532 public String getDisplay() { 533 switch (this) { 534 case PROPOSAL: return "Proposal"; 535 case PLAN: return "Plan"; 536 case ORDER: return "Order"; 537 case OPTION: return "Option"; 538 case DIRECTIVE: return "Directive"; 539 case NULL: return null; 540 default: return "?"; 541 } 542 } 543 } 544 545 public static class CarePlanIntentEnumFactory implements EnumFactory<CarePlanIntent> { 546 public CarePlanIntent fromCode(String codeString) throws IllegalArgumentException { 547 if (codeString == null || "".equals(codeString)) 548 if (codeString == null || "".equals(codeString)) 549 return null; 550 if ("proposal".equals(codeString)) 551 return CarePlanIntent.PROPOSAL; 552 if ("plan".equals(codeString)) 553 return CarePlanIntent.PLAN; 554 if ("order".equals(codeString)) 555 return CarePlanIntent.ORDER; 556 if ("option".equals(codeString)) 557 return CarePlanIntent.OPTION; 558 if ("directive".equals(codeString)) 559 return CarePlanIntent.DIRECTIVE; 560 throw new IllegalArgumentException("Unknown CarePlanIntent code '"+codeString+"'"); 561 } 562 public Enumeration<CarePlanIntent> fromType(PrimitiveType<?> code) throws FHIRException { 563 if (code == null) 564 return null; 565 if (code.isEmpty()) 566 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code); 567 String codeString = ((PrimitiveType) code).asStringValue(); 568 if (codeString == null || "".equals(codeString)) 569 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code); 570 if ("proposal".equals(codeString)) 571 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PROPOSAL, code); 572 if ("plan".equals(codeString)) 573 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PLAN, code); 574 if ("order".equals(codeString)) 575 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.ORDER, code); 576 if ("option".equals(codeString)) 577 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.OPTION, code); 578 if ("directive".equals(codeString)) 579 return new Enumeration<CarePlanIntent>(this, CarePlanIntent.DIRECTIVE, code); 580 throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'"); 581 } 582 public String toCode(CarePlanIntent code) { 583 if (code == CarePlanIntent.PROPOSAL) 584 return "proposal"; 585 if (code == CarePlanIntent.PLAN) 586 return "plan"; 587 if (code == CarePlanIntent.ORDER) 588 return "order"; 589 if (code == CarePlanIntent.OPTION) 590 return "option"; 591 if (code == CarePlanIntent.DIRECTIVE) 592 return "directive"; 593 return "?"; 594 } 595 public String toSystem(CarePlanIntent code) { 596 return code.getSystem(); 597 } 598 } 599 600 @Block() 601 public static class CarePlanActivityComponent extends BackboneElement implements IBaseBackboneElement { 602 /** 603 * Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an "event" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using CarePlan.activity.plannedActivityDetail OR using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource). 604 */ 605 @Child(name = "performedActivity", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 606 @Description(shortDefinition="Results of the activity (concept, or Appointment, Encounter, Procedure, etc)", formalDefinition="Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using CarePlan.activity.plannedActivityDetail OR using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource)." ) 607 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-performed") 608 protected List<CodeableReference> performedActivity; 609 610 /** 611 * Notes about the adherence/status/progress of the activity. 612 */ 613 @Child(name = "progress", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 614 @Description(shortDefinition="Comments about the activity status/progress", formalDefinition="Notes about the adherence/status/progress of the activity." ) 615 protected List<Annotation> progress; 616 617 /** 618 * The details of the proposed activity represented in a specific resource. 619 */ 620 @Child(name = "plannedActivityReference", type = {Appointment.class, CommunicationRequest.class, DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, Task.class, ServiceRequest.class, VisionPrescription.class, RequestOrchestration.class, ImmunizationRecommendation.class, SupplyRequest.class}, order=3, min=0, max=1, modifier=false, summary=false) 621 @Description(shortDefinition="Activity that is intended to be part of the care plan", formalDefinition="The details of the proposed activity represented in a specific resource." ) 622 protected Reference plannedActivityReference; 623 624 /** 625 * 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. 626 */ 627 @Child(name = "plannedActivityDetail", type = {}, order=4, min=0, max=1, modifier=false, summary=false) 628 @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." ) 629 protected CarePlanActivityPlannedActivityDetailComponent plannedActivityDetail; 630 631 private static final long serialVersionUID = 1513409624L; 632 633 /** 634 * Constructor 635 */ 636 public CarePlanActivityComponent() { 637 super(); 638 } 639 640 /** 641 * @return {@link #performedActivity} (Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an "event" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using CarePlan.activity.plannedActivityDetail OR using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource).) 642 */ 643 public List<CodeableReference> getPerformedActivity() { 644 if (this.performedActivity == null) 645 this.performedActivity = new ArrayList<CodeableReference>(); 646 return this.performedActivity; 647 } 648 649 /** 650 * @return Returns a reference to <code>this</code> for easy method chaining 651 */ 652 public CarePlanActivityComponent setPerformedActivity(List<CodeableReference> thePerformedActivity) { 653 this.performedActivity = thePerformedActivity; 654 return this; 655 } 656 657 public boolean hasPerformedActivity() { 658 if (this.performedActivity == null) 659 return false; 660 for (CodeableReference item : this.performedActivity) 661 if (!item.isEmpty()) 662 return true; 663 return false; 664 } 665 666 public CodeableReference addPerformedActivity() { //3 667 CodeableReference t = new CodeableReference(); 668 if (this.performedActivity == null) 669 this.performedActivity = new ArrayList<CodeableReference>(); 670 this.performedActivity.add(t); 671 return t; 672 } 673 674 public CarePlanActivityComponent addPerformedActivity(CodeableReference t) { //3 675 if (t == null) 676 return this; 677 if (this.performedActivity == null) 678 this.performedActivity = new ArrayList<CodeableReference>(); 679 this.performedActivity.add(t); 680 return this; 681 } 682 683 /** 684 * @return The first repetition of repeating field {@link #performedActivity}, creating it if it does not already exist {3} 685 */ 686 public CodeableReference getPerformedActivityFirstRep() { 687 if (getPerformedActivity().isEmpty()) { 688 addPerformedActivity(); 689 } 690 return getPerformedActivity().get(0); 691 } 692 693 /** 694 * @return {@link #progress} (Notes about the adherence/status/progress of the activity.) 695 */ 696 public List<Annotation> getProgress() { 697 if (this.progress == null) 698 this.progress = new ArrayList<Annotation>(); 699 return this.progress; 700 } 701 702 /** 703 * @return Returns a reference to <code>this</code> for easy method chaining 704 */ 705 public CarePlanActivityComponent setProgress(List<Annotation> theProgress) { 706 this.progress = theProgress; 707 return this; 708 } 709 710 public boolean hasProgress() { 711 if (this.progress == null) 712 return false; 713 for (Annotation item : this.progress) 714 if (!item.isEmpty()) 715 return true; 716 return false; 717 } 718 719 public Annotation addProgress() { //3 720 Annotation t = new Annotation(); 721 if (this.progress == null) 722 this.progress = new ArrayList<Annotation>(); 723 this.progress.add(t); 724 return t; 725 } 726 727 public CarePlanActivityComponent addProgress(Annotation t) { //3 728 if (t == null) 729 return this; 730 if (this.progress == null) 731 this.progress = new ArrayList<Annotation>(); 732 this.progress.add(t); 733 return this; 734 } 735 736 /** 737 * @return The first repetition of repeating field {@link #progress}, creating it if it does not already exist {3} 738 */ 739 public Annotation getProgressFirstRep() { 740 if (getProgress().isEmpty()) { 741 addProgress(); 742 } 743 return getProgress().get(0); 744 } 745 746 /** 747 * @return {@link #plannedActivityReference} (The details of the proposed activity represented in a specific resource.) 748 */ 749 public Reference getPlannedActivityReference() { 750 if (this.plannedActivityReference == null) 751 if (Configuration.errorOnAutoCreate()) 752 throw new Error("Attempt to auto-create CarePlanActivityComponent.plannedActivityReference"); 753 else if (Configuration.doAutoCreate()) 754 this.plannedActivityReference = new Reference(); // cc 755 return this.plannedActivityReference; 756 } 757 758 public boolean hasPlannedActivityReference() { 759 return this.plannedActivityReference != null && !this.plannedActivityReference.isEmpty(); 760 } 761 762 /** 763 * @param value {@link #plannedActivityReference} (The details of the proposed activity represented in a specific resource.) 764 */ 765 public CarePlanActivityComponent setPlannedActivityReference(Reference value) { 766 this.plannedActivityReference = value; 767 return this; 768 } 769 770 /** 771 * @return {@link #plannedActivityDetail} (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.) 772 */ 773 public CarePlanActivityPlannedActivityDetailComponent getPlannedActivityDetail() { 774 if (this.plannedActivityDetail == null) 775 if (Configuration.errorOnAutoCreate()) 776 throw new Error("Attempt to auto-create CarePlanActivityComponent.plannedActivityDetail"); 777 else if (Configuration.doAutoCreate()) 778 this.plannedActivityDetail = new CarePlanActivityPlannedActivityDetailComponent(); // cc 779 return this.plannedActivityDetail; 780 } 781 782 public boolean hasPlannedActivityDetail() { 783 return this.plannedActivityDetail != null && !this.plannedActivityDetail.isEmpty(); 784 } 785 786 /** 787 * @param value {@link #plannedActivityDetail} (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.) 788 */ 789 public CarePlanActivityComponent setPlannedActivityDetail(CarePlanActivityPlannedActivityDetailComponent value) { 790 this.plannedActivityDetail = value; 791 return this; 792 } 793 794 protected void listChildren(List<Property> children) { 795 super.listChildren(children); 796 children.add(new Property("performedActivity", "CodeableReference(Any)", "Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using CarePlan.activity.plannedActivityDetail OR using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource).", 0, java.lang.Integer.MAX_VALUE, performedActivity)); 797 children.add(new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress)); 798 children.add(new Property("plannedActivityReference", "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestOrchestration|ImmunizationRecommendation|SupplyRequest)", "The details of the proposed activity represented in a specific resource.", 0, 1, plannedActivityReference)); 799 children.add(new Property("plannedActivityDetail", "", "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.", 0, 1, plannedActivityDetail)); 800 } 801 802 @Override 803 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 804 switch (_hash) { 805 case 1964521199: /*performedActivity*/ return new Property("performedActivity", "CodeableReference(Any)", "Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using CarePlan.activity.plannedActivityDetail OR using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource).", 0, java.lang.Integer.MAX_VALUE, performedActivity); 806 case -1001078227: /*progress*/ return new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress); 807 case -1114371176: /*plannedActivityReference*/ return new Property("plannedActivityReference", "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestOrchestration|ImmunizationRecommendation|SupplyRequest)", "The details of the proposed activity represented in a specific resource.", 0, 1, plannedActivityReference); 808 case 2072803108: /*plannedActivityDetail*/ return new Property("plannedActivityDetail", "", "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.", 0, 1, plannedActivityDetail); 809 default: return super.getNamedProperty(_hash, _name, _checkValid); 810 } 811 812 } 813 814 @Override 815 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 816 switch (hash) { 817 case 1964521199: /*performedActivity*/ return this.performedActivity == null ? new Base[0] : this.performedActivity.toArray(new Base[this.performedActivity.size()]); // CodeableReference 818 case -1001078227: /*progress*/ return this.progress == null ? new Base[0] : this.progress.toArray(new Base[this.progress.size()]); // Annotation 819 case -1114371176: /*plannedActivityReference*/ return this.plannedActivityReference == null ? new Base[0] : new Base[] {this.plannedActivityReference}; // Reference 820 case 2072803108: /*plannedActivityDetail*/ return this.plannedActivityDetail == null ? new Base[0] : new Base[] {this.plannedActivityDetail}; // CarePlanActivityPlannedActivityDetailComponent 821 default: return super.getProperty(hash, name, checkValid); 822 } 823 824 } 825 826 @Override 827 public Base setProperty(int hash, String name, Base value) throws FHIRException { 828 switch (hash) { 829 case 1964521199: // performedActivity 830 this.getPerformedActivity().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 831 return value; 832 case -1001078227: // progress 833 this.getProgress().add(TypeConvertor.castToAnnotation(value)); // Annotation 834 return value; 835 case -1114371176: // plannedActivityReference 836 this.plannedActivityReference = TypeConvertor.castToReference(value); // Reference 837 return value; 838 case 2072803108: // plannedActivityDetail 839 this.plannedActivityDetail = (CarePlanActivityPlannedActivityDetailComponent) value; // CarePlanActivityPlannedActivityDetailComponent 840 return value; 841 default: return super.setProperty(hash, name, value); 842 } 843 844 } 845 846 @Override 847 public Base setProperty(String name, Base value) throws FHIRException { 848 if (name.equals("performedActivity")) { 849 this.getPerformedActivity().add(TypeConvertor.castToCodeableReference(value)); 850 } else if (name.equals("progress")) { 851 this.getProgress().add(TypeConvertor.castToAnnotation(value)); 852 } else if (name.equals("plannedActivityReference")) { 853 this.plannedActivityReference = TypeConvertor.castToReference(value); // Reference 854 } else if (name.equals("plannedActivityDetail")) { 855 this.plannedActivityDetail = (CarePlanActivityPlannedActivityDetailComponent) value; // CarePlanActivityPlannedActivityDetailComponent 856 } else 857 return super.setProperty(name, value); 858 return value; 859 } 860 861 @Override 862 public Base makeProperty(int hash, String name) throws FHIRException { 863 switch (hash) { 864 case 1964521199: return addPerformedActivity(); 865 case -1001078227: return addProgress(); 866 case -1114371176: return getPlannedActivityReference(); 867 case 2072803108: return getPlannedActivityDetail(); 868 default: return super.makeProperty(hash, name); 869 } 870 871 } 872 873 @Override 874 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 875 switch (hash) { 876 case 1964521199: /*performedActivity*/ return new String[] {"CodeableReference"}; 877 case -1001078227: /*progress*/ return new String[] {"Annotation"}; 878 case -1114371176: /*plannedActivityReference*/ return new String[] {"Reference"}; 879 case 2072803108: /*plannedActivityDetail*/ return new String[] {}; 880 default: return super.getTypesForProperty(hash, name); 881 } 882 883 } 884 885 @Override 886 public Base addChild(String name) throws FHIRException { 887 if (name.equals("performedActivity")) { 888 return addPerformedActivity(); 889 } 890 else if (name.equals("progress")) { 891 return addProgress(); 892 } 893 else if (name.equals("plannedActivityReference")) { 894 this.plannedActivityReference = new Reference(); 895 return this.plannedActivityReference; 896 } 897 else if (name.equals("plannedActivityDetail")) { 898 this.plannedActivityDetail = new CarePlanActivityPlannedActivityDetailComponent(); 899 return this.plannedActivityDetail; 900 } 901 else 902 return super.addChild(name); 903 } 904 905 public CarePlanActivityComponent copy() { 906 CarePlanActivityComponent dst = new CarePlanActivityComponent(); 907 copyValues(dst); 908 return dst; 909 } 910 911 public void copyValues(CarePlanActivityComponent dst) { 912 super.copyValues(dst); 913 if (performedActivity != null) { 914 dst.performedActivity = new ArrayList<CodeableReference>(); 915 for (CodeableReference i : performedActivity) 916 dst.performedActivity.add(i.copy()); 917 }; 918 if (progress != null) { 919 dst.progress = new ArrayList<Annotation>(); 920 for (Annotation i : progress) 921 dst.progress.add(i.copy()); 922 }; 923 dst.plannedActivityReference = plannedActivityReference == null ? null : plannedActivityReference.copy(); 924 dst.plannedActivityDetail = plannedActivityDetail == null ? null : plannedActivityDetail.copy(); 925 } 926 927 @Override 928 public boolean equalsDeep(Base other_) { 929 if (!super.equalsDeep(other_)) 930 return false; 931 if (!(other_ instanceof CarePlanActivityComponent)) 932 return false; 933 CarePlanActivityComponent o = (CarePlanActivityComponent) other_; 934 return compareDeep(performedActivity, o.performedActivity, true) && compareDeep(progress, o.progress, true) 935 && compareDeep(plannedActivityReference, o.plannedActivityReference, true) && compareDeep(plannedActivityDetail, o.plannedActivityDetail, true) 936 ; 937 } 938 939 @Override 940 public boolean equalsShallow(Base other_) { 941 if (!super.equalsShallow(other_)) 942 return false; 943 if (!(other_ instanceof CarePlanActivityComponent)) 944 return false; 945 CarePlanActivityComponent o = (CarePlanActivityComponent) other_; 946 return true; 947 } 948 949 public boolean isEmpty() { 950 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(performedActivity, progress 951 , plannedActivityReference, plannedActivityDetail); 952 } 953 954 public String fhirType() { 955 return "CarePlan.activity"; 956 957 } 958 959 } 960 961 @Block() 962 public static class CarePlanActivityPlannedActivityDetailComponent extends BackboneElement implements IBaseBackboneElement { 963 /** 964 * 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. 965 */ 966 @Child(name = "kind", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) 967 @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." ) 968 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-kind") 969 protected Enumeration<CarePlanActivityKind> kind; 970 971 /** 972 * 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. 973 */ 974 @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 975 @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." ) 976 protected List<CanonicalType> instantiatesCanonical; 977 978 /** 979 * 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. 980 */ 981 @Child(name = "instantiatesUri", type = {UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 982 @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." ) 983 protected List<UriType> instantiatesUri; 984 985 /** 986 * Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter. 987 */ 988 @Child(name = "code", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 989 @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." ) 990 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code") 991 protected CodeableConcept code; 992 993 /** 994 * Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited - either a coded concept, or 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. 995 */ 996 @Child(name = "reason", type = {CodeableReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 997 @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 - either a coded concept, or 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." ) 998 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 999 protected List<CodeableReference> reason; 1000 1001 /** 1002 * Internal reference that identifies the goals that this activity is intended to contribute towards meeting. 1003 */ 1004 @Child(name = "goal", type = {Goal.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1005 @Description(shortDefinition="Goals this activity relates to", formalDefinition="Internal reference that identifies the goals that this activity is intended to contribute towards meeting." ) 1006 protected List<Reference> goal; 1007 1008 /** 1009 * Identifies what progress is being made for the specific activity. 1010 */ 1011 @Child(name = "status", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=false) 1012 @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." ) 1013 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-status") 1014 protected Enumeration<CarePlanActivityStatus> status; 1015 1016 /** 1017 * Provides reason why the activity isn't yet started, is on hold, was cancelled, etc. 1018 */ 1019 @Child(name = "statusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 1020 @Description(shortDefinition="Reason for current status", formalDefinition="Provides reason why the activity isn't yet started, is on hold, was cancelled, etc." ) 1021 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-status-reason") 1022 protected CodeableConcept statusReason; 1023 1024 /** 1025 * 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. 1026 */ 1027 @Child(name = "doNotPerform", type = {BooleanType.class}, order=9, min=0, max=1, modifier=true, summary=false) 1028 @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." ) 1029 protected BooleanType doNotPerform; 1030 1031 /** 1032 * The period, timing or frequency upon which the described activity is to occur. 1033 */ 1034 @Child(name = "scheduled", type = {Timing.class, Period.class, StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 1035 @Description(shortDefinition="When activity is to occur", formalDefinition="The period, timing or frequency upon which the described activity is to occur." ) 1036 protected DataType scheduled; 1037 1038 /** 1039 * Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc. 1040 */ 1041 @Child(name = "location", type = {CodeableReference.class}, order=11, min=0, max=1, modifier=false, summary=false) 1042 @Description(shortDefinition="Where it should happen", formalDefinition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." ) 1043 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType") 1044 protected CodeableReference location; 1045 1046 /** 1047 * Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report. 1048 */ 1049 @Child(name = "reported", type = {BooleanType.class, Patient.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Organization.class}, order=12, min=0, max=1, modifier=false, summary=false) 1050 @Description(shortDefinition="Reported rather than primary record", formalDefinition="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report." ) 1051 protected DataType reported; 1052 1053 /** 1054 * Identifies who's expected to be involved in the activity. 1055 */ 1056 @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, RelatedPerson.class, Patient.class, CareTeam.class, HealthcareService.class, Device.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1057 @Description(shortDefinition="Who will be responsible?", formalDefinition="Identifies who's expected to be involved in the activity." ) 1058 protected List<Reference> performer; 1059 1060 /** 1061 * Identifies the food, drug or other product to be consumed or supplied in the activity. 1062 */ 1063 @Child(name = "product", type = {CodeableConcept.class, Medication.class, Substance.class}, order=14, min=0, max=1, modifier=false, summary=false) 1064 @Description(shortDefinition="What is to be administered/supplied", formalDefinition="Identifies the food, drug or other product to be consumed or supplied in the activity." ) 1065 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") 1066 protected DataType product; 1067 1068 /** 1069 * Identifies the quantity expected to be consumed in a given day. 1070 */ 1071 @Child(name = "dailyAmount", type = {Quantity.class}, order=15, min=0, max=1, modifier=false, summary=false) 1072 @Description(shortDefinition="How to consume/day?", formalDefinition="Identifies the quantity expected to be consumed in a given day." ) 1073 protected Quantity dailyAmount; 1074 1075 /** 1076 * Identifies the quantity expected to be supplied, administered or consumed by the subject. 1077 */ 1078 @Child(name = "quantity", type = {Quantity.class}, order=16, min=0, max=1, modifier=false, summary=false) 1079 @Description(shortDefinition="How much to administer/supply/consume", formalDefinition="Identifies the quantity expected to be supplied, administered or consumed by the subject." ) 1080 protected Quantity quantity; 1081 1082 /** 1083 * 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. 1084 */ 1085 @Child(name = "description", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 1086 @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." ) 1087 protected StringType description; 1088 1089 private static final long serialVersionUID = -1258570436L; 1090 1091 /** 1092 * Constructor 1093 */ 1094 public CarePlanActivityPlannedActivityDetailComponent() { 1095 super(); 1096 } 1097 1098 /** 1099 * Constructor 1100 */ 1101 public CarePlanActivityPlannedActivityDetailComponent(CarePlanActivityStatus status) { 1102 super(); 1103 this.setStatus(status); 1104 } 1105 1106 /** 1107 * @return {@link #kind} (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.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1108 */ 1109 public Enumeration<CarePlanActivityKind> getKindElement() { 1110 if (this.kind == null) 1111 if (Configuration.errorOnAutoCreate()) 1112 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.kind"); 1113 else if (Configuration.doAutoCreate()) 1114 this.kind = new Enumeration<CarePlanActivityKind>(new CarePlanActivityKindEnumFactory()); // bb 1115 return this.kind; 1116 } 1117 1118 public boolean hasKindElement() { 1119 return this.kind != null && !this.kind.isEmpty(); 1120 } 1121 1122 public boolean hasKind() { 1123 return this.kind != null && !this.kind.isEmpty(); 1124 } 1125 1126 /** 1127 * @param value {@link #kind} (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.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1128 */ 1129 public CarePlanActivityPlannedActivityDetailComponent setKindElement(Enumeration<CarePlanActivityKind> value) { 1130 this.kind = value; 1131 return this; 1132 } 1133 1134 /** 1135 * @return 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. 1136 */ 1137 public CarePlanActivityKind getKind() { 1138 return this.kind == null ? null : this.kind.getValue(); 1139 } 1140 1141 /** 1142 * @param value 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. 1143 */ 1144 public CarePlanActivityPlannedActivityDetailComponent setKind(CarePlanActivityKind value) { 1145 if (value == null) 1146 this.kind = null; 1147 else { 1148 if (this.kind == null) 1149 this.kind = new Enumeration<CarePlanActivityKind>(new CarePlanActivityKindEnumFactory()); 1150 this.kind.setValue(value); 1151 } 1152 return this; 1153 } 1154 1155 /** 1156 * @return {@link #instantiatesCanonical} (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.) 1157 */ 1158 public List<CanonicalType> getInstantiatesCanonical() { 1159 if (this.instantiatesCanonical == null) 1160 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1161 return this.instantiatesCanonical; 1162 } 1163 1164 /** 1165 * @return Returns a reference to <code>this</code> for easy method chaining 1166 */ 1167 public CarePlanActivityPlannedActivityDetailComponent setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 1168 this.instantiatesCanonical = theInstantiatesCanonical; 1169 return this; 1170 } 1171 1172 public boolean hasInstantiatesCanonical() { 1173 if (this.instantiatesCanonical == null) 1174 return false; 1175 for (CanonicalType item : this.instantiatesCanonical) 1176 if (!item.isEmpty()) 1177 return true; 1178 return false; 1179 } 1180 1181 /** 1182 * @return {@link #instantiatesCanonical} (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.) 1183 */ 1184 public CanonicalType addInstantiatesCanonicalElement() {//2 1185 CanonicalType t = new CanonicalType(); 1186 if (this.instantiatesCanonical == null) 1187 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1188 this.instantiatesCanonical.add(t); 1189 return t; 1190 } 1191 1192 /** 1193 * @param value {@link #instantiatesCanonical} (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.) 1194 */ 1195 public CarePlanActivityPlannedActivityDetailComponent addInstantiatesCanonical(String value) { //1 1196 CanonicalType t = new CanonicalType(); 1197 t.setValue(value); 1198 if (this.instantiatesCanonical == null) 1199 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 1200 this.instantiatesCanonical.add(t); 1201 return this; 1202 } 1203 1204 /** 1205 * @param value {@link #instantiatesCanonical} (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.) 1206 */ 1207 public boolean hasInstantiatesCanonical(String value) { 1208 if (this.instantiatesCanonical == null) 1209 return false; 1210 for (CanonicalType v : this.instantiatesCanonical) 1211 if (v.getValue().equals(value)) // canonical 1212 return true; 1213 return false; 1214 } 1215 1216 /** 1217 * @return {@link #instantiatesUri} (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.) 1218 */ 1219 public List<UriType> getInstantiatesUri() { 1220 if (this.instantiatesUri == null) 1221 this.instantiatesUri = new ArrayList<UriType>(); 1222 return this.instantiatesUri; 1223 } 1224 1225 /** 1226 * @return Returns a reference to <code>this</code> for easy method chaining 1227 */ 1228 public CarePlanActivityPlannedActivityDetailComponent setInstantiatesUri(List<UriType> theInstantiatesUri) { 1229 this.instantiatesUri = theInstantiatesUri; 1230 return this; 1231 } 1232 1233 public boolean hasInstantiatesUri() { 1234 if (this.instantiatesUri == null) 1235 return false; 1236 for (UriType item : this.instantiatesUri) 1237 if (!item.isEmpty()) 1238 return true; 1239 return false; 1240 } 1241 1242 /** 1243 * @return {@link #instantiatesUri} (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.) 1244 */ 1245 public UriType addInstantiatesUriElement() {//2 1246 UriType t = new UriType(); 1247 if (this.instantiatesUri == null) 1248 this.instantiatesUri = new ArrayList<UriType>(); 1249 this.instantiatesUri.add(t); 1250 return t; 1251 } 1252 1253 /** 1254 * @param value {@link #instantiatesUri} (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.) 1255 */ 1256 public CarePlanActivityPlannedActivityDetailComponent addInstantiatesUri(String value) { //1 1257 UriType t = new UriType(); 1258 t.setValue(value); 1259 if (this.instantiatesUri == null) 1260 this.instantiatesUri = new ArrayList<UriType>(); 1261 this.instantiatesUri.add(t); 1262 return this; 1263 } 1264 1265 /** 1266 * @param value {@link #instantiatesUri} (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.) 1267 */ 1268 public boolean hasInstantiatesUri(String value) { 1269 if (this.instantiatesUri == null) 1270 return false; 1271 for (UriType v : this.instantiatesUri) 1272 if (v.getValue().equals(value)) // uri 1273 return true; 1274 return false; 1275 } 1276 1277 /** 1278 * @return {@link #code} (Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.) 1279 */ 1280 public CodeableConcept getCode() { 1281 if (this.code == null) 1282 if (Configuration.errorOnAutoCreate()) 1283 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.code"); 1284 else if (Configuration.doAutoCreate()) 1285 this.code = new CodeableConcept(); // cc 1286 return this.code; 1287 } 1288 1289 public boolean hasCode() { 1290 return this.code != null && !this.code.isEmpty(); 1291 } 1292 1293 /** 1294 * @param value {@link #code} (Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.) 1295 */ 1296 public CarePlanActivityPlannedActivityDetailComponent setCode(CodeableConcept value) { 1297 this.code = value; 1298 return this; 1299 } 1300 1301 /** 1302 * @return {@link #reason} (Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited - either a coded concept, or 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.) 1303 */ 1304 public List<CodeableReference> getReason() { 1305 if (this.reason == null) 1306 this.reason = new ArrayList<CodeableReference>(); 1307 return this.reason; 1308 } 1309 1310 /** 1311 * @return Returns a reference to <code>this</code> for easy method chaining 1312 */ 1313 public CarePlanActivityPlannedActivityDetailComponent setReason(List<CodeableReference> theReason) { 1314 this.reason = theReason; 1315 return this; 1316 } 1317 1318 public boolean hasReason() { 1319 if (this.reason == null) 1320 return false; 1321 for (CodeableReference item : this.reason) 1322 if (!item.isEmpty()) 1323 return true; 1324 return false; 1325 } 1326 1327 public CodeableReference addReason() { //3 1328 CodeableReference t = new CodeableReference(); 1329 if (this.reason == null) 1330 this.reason = new ArrayList<CodeableReference>(); 1331 this.reason.add(t); 1332 return t; 1333 } 1334 1335 public CarePlanActivityPlannedActivityDetailComponent addReason(CodeableReference t) { //3 1336 if (t == null) 1337 return this; 1338 if (this.reason == null) 1339 this.reason = new ArrayList<CodeableReference>(); 1340 this.reason.add(t); 1341 return this; 1342 } 1343 1344 /** 1345 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} 1346 */ 1347 public CodeableReference getReasonFirstRep() { 1348 if (getReason().isEmpty()) { 1349 addReason(); 1350 } 1351 return getReason().get(0); 1352 } 1353 1354 /** 1355 * @return {@link #goal} (Internal reference that identifies the goals that this activity is intended to contribute towards meeting.) 1356 */ 1357 public List<Reference> getGoal() { 1358 if (this.goal == null) 1359 this.goal = new ArrayList<Reference>(); 1360 return this.goal; 1361 } 1362 1363 /** 1364 * @return Returns a reference to <code>this</code> for easy method chaining 1365 */ 1366 public CarePlanActivityPlannedActivityDetailComponent setGoal(List<Reference> theGoal) { 1367 this.goal = theGoal; 1368 return this; 1369 } 1370 1371 public boolean hasGoal() { 1372 if (this.goal == null) 1373 return false; 1374 for (Reference item : this.goal) 1375 if (!item.isEmpty()) 1376 return true; 1377 return false; 1378 } 1379 1380 public Reference addGoal() { //3 1381 Reference t = new Reference(); 1382 if (this.goal == null) 1383 this.goal = new ArrayList<Reference>(); 1384 this.goal.add(t); 1385 return t; 1386 } 1387 1388 public CarePlanActivityPlannedActivityDetailComponent addGoal(Reference t) { //3 1389 if (t == null) 1390 return this; 1391 if (this.goal == null) 1392 this.goal = new ArrayList<Reference>(); 1393 this.goal.add(t); 1394 return this; 1395 } 1396 1397 /** 1398 * @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist {3} 1399 */ 1400 public Reference getGoalFirstRep() { 1401 if (getGoal().isEmpty()) { 1402 addGoal(); 1403 } 1404 return getGoal().get(0); 1405 } 1406 1407 /** 1408 * @return {@link #status} (Identifies what progress is being made for the specific activity.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1409 */ 1410 public Enumeration<CarePlanActivityStatus> getStatusElement() { 1411 if (this.status == null) 1412 if (Configuration.errorOnAutoCreate()) 1413 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.status"); 1414 else if (Configuration.doAutoCreate()) 1415 this.status = new Enumeration<CarePlanActivityStatus>(new CarePlanActivityStatusEnumFactory()); // bb 1416 return this.status; 1417 } 1418 1419 public boolean hasStatusElement() { 1420 return this.status != null && !this.status.isEmpty(); 1421 } 1422 1423 public boolean hasStatus() { 1424 return this.status != null && !this.status.isEmpty(); 1425 } 1426 1427 /** 1428 * @param value {@link #status} (Identifies what progress is being made for the specific activity.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1429 */ 1430 public CarePlanActivityPlannedActivityDetailComponent setStatusElement(Enumeration<CarePlanActivityStatus> value) { 1431 this.status = value; 1432 return this; 1433 } 1434 1435 /** 1436 * @return Identifies what progress is being made for the specific activity. 1437 */ 1438 public CarePlanActivityStatus getStatus() { 1439 return this.status == null ? null : this.status.getValue(); 1440 } 1441 1442 /** 1443 * @param value Identifies what progress is being made for the specific activity. 1444 */ 1445 public CarePlanActivityPlannedActivityDetailComponent setStatus(CarePlanActivityStatus value) { 1446 if (this.status == null) 1447 this.status = new Enumeration<CarePlanActivityStatus>(new CarePlanActivityStatusEnumFactory()); 1448 this.status.setValue(value); 1449 return this; 1450 } 1451 1452 /** 1453 * @return {@link #statusReason} (Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.) 1454 */ 1455 public CodeableConcept getStatusReason() { 1456 if (this.statusReason == null) 1457 if (Configuration.errorOnAutoCreate()) 1458 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.statusReason"); 1459 else if (Configuration.doAutoCreate()) 1460 this.statusReason = new CodeableConcept(); // cc 1461 return this.statusReason; 1462 } 1463 1464 public boolean hasStatusReason() { 1465 return this.statusReason != null && !this.statusReason.isEmpty(); 1466 } 1467 1468 /** 1469 * @param value {@link #statusReason} (Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.) 1470 */ 1471 public CarePlanActivityPlannedActivityDetailComponent setStatusReason(CodeableConcept value) { 1472 this.statusReason = value; 1473 return this; 1474 } 1475 1476 /** 1477 * @return {@link #doNotPerform} (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.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value 1478 */ 1479 public BooleanType getDoNotPerformElement() { 1480 if (this.doNotPerform == null) 1481 if (Configuration.errorOnAutoCreate()) 1482 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.doNotPerform"); 1483 else if (Configuration.doAutoCreate()) 1484 this.doNotPerform = new BooleanType(); // bb 1485 return this.doNotPerform; 1486 } 1487 1488 public boolean hasDoNotPerformElement() { 1489 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 1490 } 1491 1492 public boolean hasDoNotPerform() { 1493 return this.doNotPerform != null && !this.doNotPerform.isEmpty(); 1494 } 1495 1496 /** 1497 * @param value {@link #doNotPerform} (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.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value 1498 */ 1499 public CarePlanActivityPlannedActivityDetailComponent setDoNotPerformElement(BooleanType value) { 1500 this.doNotPerform = value; 1501 return this; 1502 } 1503 1504 /** 1505 * @return 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. 1506 */ 1507 public boolean getDoNotPerform() { 1508 return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue(); 1509 } 1510 1511 /** 1512 * @param value 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. 1513 */ 1514 public CarePlanActivityPlannedActivityDetailComponent setDoNotPerform(boolean value) { 1515 if (this.doNotPerform == null) 1516 this.doNotPerform = new BooleanType(); 1517 this.doNotPerform.setValue(value); 1518 return this; 1519 } 1520 1521 /** 1522 * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) 1523 */ 1524 public DataType getScheduled() { 1525 return this.scheduled; 1526 } 1527 1528 /** 1529 * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) 1530 */ 1531 public Timing getScheduledTiming() throws FHIRException { 1532 if (this.scheduled == null) 1533 this.scheduled = new Timing(); 1534 if (!(this.scheduled instanceof Timing)) 1535 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.scheduled.getClass().getName()+" was encountered"); 1536 return (Timing) this.scheduled; 1537 } 1538 1539 public boolean hasScheduledTiming() { 1540 return this != null && this.scheduled instanceof Timing; 1541 } 1542 1543 /** 1544 * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) 1545 */ 1546 public Period getScheduledPeriod() throws FHIRException { 1547 if (this.scheduled == null) 1548 this.scheduled = new Period(); 1549 if (!(this.scheduled instanceof Period)) 1550 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered"); 1551 return (Period) this.scheduled; 1552 } 1553 1554 public boolean hasScheduledPeriod() { 1555 return this != null && this.scheduled instanceof Period; 1556 } 1557 1558 /** 1559 * @return {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) 1560 */ 1561 public StringType getScheduledStringType() throws FHIRException { 1562 if (this.scheduled == null) 1563 this.scheduled = new StringType(); 1564 if (!(this.scheduled instanceof StringType)) 1565 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.scheduled.getClass().getName()+" was encountered"); 1566 return (StringType) this.scheduled; 1567 } 1568 1569 public boolean hasScheduledStringType() { 1570 return this != null && this.scheduled instanceof StringType; 1571 } 1572 1573 public boolean hasScheduled() { 1574 return this.scheduled != null && !this.scheduled.isEmpty(); 1575 } 1576 1577 /** 1578 * @param value {@link #scheduled} (The period, timing or frequency upon which the described activity is to occur.) 1579 */ 1580 public CarePlanActivityPlannedActivityDetailComponent setScheduled(DataType value) { 1581 if (value != null && !(value instanceof Timing || value instanceof Period || value instanceof StringType)) 1582 throw new Error("Not the right type for CarePlan.activity.plannedActivityDetail.scheduled[x]: "+value.fhirType()); 1583 this.scheduled = value; 1584 return this; 1585 } 1586 1587 /** 1588 * @return {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) 1589 */ 1590 public CodeableReference getLocation() { 1591 if (this.location == null) 1592 if (Configuration.errorOnAutoCreate()) 1593 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.location"); 1594 else if (Configuration.doAutoCreate()) 1595 this.location = new CodeableReference(); // cc 1596 return this.location; 1597 } 1598 1599 public boolean hasLocation() { 1600 return this.location != null && !this.location.isEmpty(); 1601 } 1602 1603 /** 1604 * @param value {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.) 1605 */ 1606 public CarePlanActivityPlannedActivityDetailComponent setLocation(CodeableReference value) { 1607 this.location = value; 1608 return this; 1609 } 1610 1611 /** 1612 * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) 1613 */ 1614 public DataType getReported() { 1615 return this.reported; 1616 } 1617 1618 /** 1619 * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) 1620 */ 1621 public BooleanType getReportedBooleanType() throws FHIRException { 1622 if (this.reported == null) 1623 this.reported = new BooleanType(); 1624 if (!(this.reported instanceof BooleanType)) 1625 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.reported.getClass().getName()+" was encountered"); 1626 return (BooleanType) this.reported; 1627 } 1628 1629 public boolean hasReportedBooleanType() { 1630 return this != null && this.reported instanceof BooleanType; 1631 } 1632 1633 /** 1634 * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) 1635 */ 1636 public Reference getReportedReference() throws FHIRException { 1637 if (this.reported == null) 1638 this.reported = new Reference(); 1639 if (!(this.reported instanceof Reference)) 1640 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reported.getClass().getName()+" was encountered"); 1641 return (Reference) this.reported; 1642 } 1643 1644 public boolean hasReportedReference() { 1645 return this != null && this.reported instanceof Reference; 1646 } 1647 1648 public boolean hasReported() { 1649 return this.reported != null && !this.reported.isEmpty(); 1650 } 1651 1652 /** 1653 * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.) 1654 */ 1655 public CarePlanActivityPlannedActivityDetailComponent setReported(DataType value) { 1656 if (value != null && !(value instanceof BooleanType || value instanceof Reference)) 1657 throw new Error("Not the right type for CarePlan.activity.plannedActivityDetail.reported[x]: "+value.fhirType()); 1658 this.reported = value; 1659 return this; 1660 } 1661 1662 /** 1663 * @return {@link #performer} (Identifies who's expected to be involved in the activity.) 1664 */ 1665 public List<Reference> getPerformer() { 1666 if (this.performer == null) 1667 this.performer = new ArrayList<Reference>(); 1668 return this.performer; 1669 } 1670 1671 /** 1672 * @return Returns a reference to <code>this</code> for easy method chaining 1673 */ 1674 public CarePlanActivityPlannedActivityDetailComponent setPerformer(List<Reference> thePerformer) { 1675 this.performer = thePerformer; 1676 return this; 1677 } 1678 1679 public boolean hasPerformer() { 1680 if (this.performer == null) 1681 return false; 1682 for (Reference item : this.performer) 1683 if (!item.isEmpty()) 1684 return true; 1685 return false; 1686 } 1687 1688 public Reference addPerformer() { //3 1689 Reference t = new Reference(); 1690 if (this.performer == null) 1691 this.performer = new ArrayList<Reference>(); 1692 this.performer.add(t); 1693 return t; 1694 } 1695 1696 public CarePlanActivityPlannedActivityDetailComponent addPerformer(Reference t) { //3 1697 if (t == null) 1698 return this; 1699 if (this.performer == null) 1700 this.performer = new ArrayList<Reference>(); 1701 this.performer.add(t); 1702 return this; 1703 } 1704 1705 /** 1706 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3} 1707 */ 1708 public Reference getPerformerFirstRep() { 1709 if (getPerformer().isEmpty()) { 1710 addPerformer(); 1711 } 1712 return getPerformer().get(0); 1713 } 1714 1715 /** 1716 * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) 1717 */ 1718 public DataType getProduct() { 1719 return this.product; 1720 } 1721 1722 /** 1723 * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) 1724 */ 1725 public CodeableConcept getProductCodeableConcept() throws FHIRException { 1726 if (this.product == null) 1727 this.product = new CodeableConcept(); 1728 if (!(this.product instanceof CodeableConcept)) 1729 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.product.getClass().getName()+" was encountered"); 1730 return (CodeableConcept) this.product; 1731 } 1732 1733 public boolean hasProductCodeableConcept() { 1734 return this != null && this.product instanceof CodeableConcept; 1735 } 1736 1737 /** 1738 * @return {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) 1739 */ 1740 public Reference getProductReference() throws FHIRException { 1741 if (this.product == null) 1742 this.product = new Reference(); 1743 if (!(this.product instanceof Reference)) 1744 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.product.getClass().getName()+" was encountered"); 1745 return (Reference) this.product; 1746 } 1747 1748 public boolean hasProductReference() { 1749 return this != null && this.product instanceof Reference; 1750 } 1751 1752 public boolean hasProduct() { 1753 return this.product != null && !this.product.isEmpty(); 1754 } 1755 1756 /** 1757 * @param value {@link #product} (Identifies the food, drug or other product to be consumed or supplied in the activity.) 1758 */ 1759 public CarePlanActivityPlannedActivityDetailComponent setProduct(DataType value) { 1760 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 1761 throw new Error("Not the right type for CarePlan.activity.plannedActivityDetail.product[x]: "+value.fhirType()); 1762 this.product = value; 1763 return this; 1764 } 1765 1766 /** 1767 * @return {@link #dailyAmount} (Identifies the quantity expected to be consumed in a given day.) 1768 */ 1769 public Quantity getDailyAmount() { 1770 if (this.dailyAmount == null) 1771 if (Configuration.errorOnAutoCreate()) 1772 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.dailyAmount"); 1773 else if (Configuration.doAutoCreate()) 1774 this.dailyAmount = new Quantity(); // cc 1775 return this.dailyAmount; 1776 } 1777 1778 public boolean hasDailyAmount() { 1779 return this.dailyAmount != null && !this.dailyAmount.isEmpty(); 1780 } 1781 1782 /** 1783 * @param value {@link #dailyAmount} (Identifies the quantity expected to be consumed in a given day.) 1784 */ 1785 public CarePlanActivityPlannedActivityDetailComponent setDailyAmount(Quantity value) { 1786 this.dailyAmount = value; 1787 return this; 1788 } 1789 1790 /** 1791 * @return {@link #quantity} (Identifies the quantity expected to be supplied, administered or consumed by the subject.) 1792 */ 1793 public Quantity getQuantity() { 1794 if (this.quantity == null) 1795 if (Configuration.errorOnAutoCreate()) 1796 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.quantity"); 1797 else if (Configuration.doAutoCreate()) 1798 this.quantity = new Quantity(); // cc 1799 return this.quantity; 1800 } 1801 1802 public boolean hasQuantity() { 1803 return this.quantity != null && !this.quantity.isEmpty(); 1804 } 1805 1806 /** 1807 * @param value {@link #quantity} (Identifies the quantity expected to be supplied, administered or consumed by the subject.) 1808 */ 1809 public CarePlanActivityPlannedActivityDetailComponent setQuantity(Quantity value) { 1810 this.quantity = value; 1811 return this; 1812 } 1813 1814 /** 1815 * @return {@link #description} (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.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1816 */ 1817 public StringType getDescriptionElement() { 1818 if (this.description == null) 1819 if (Configuration.errorOnAutoCreate()) 1820 throw new Error("Attempt to auto-create CarePlanActivityPlannedActivityDetailComponent.description"); 1821 else if (Configuration.doAutoCreate()) 1822 this.description = new StringType(); // bb 1823 return this.description; 1824 } 1825 1826 public boolean hasDescriptionElement() { 1827 return this.description != null && !this.description.isEmpty(); 1828 } 1829 1830 public boolean hasDescription() { 1831 return this.description != null && !this.description.isEmpty(); 1832 } 1833 1834 /** 1835 * @param value {@link #description} (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.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1836 */ 1837 public CarePlanActivityPlannedActivityDetailComponent setDescriptionElement(StringType value) { 1838 this.description = value; 1839 return this; 1840 } 1841 1842 /** 1843 * @return 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. 1844 */ 1845 public String getDescription() { 1846 return this.description == null ? null : this.description.getValue(); 1847 } 1848 1849 /** 1850 * @param value 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. 1851 */ 1852 public CarePlanActivityPlannedActivityDetailComponent setDescription(String value) { 1853 if (Utilities.noString(value)) 1854 this.description = null; 1855 else { 1856 if (this.description == null) 1857 this.description = new StringType(); 1858 this.description.setValue(value); 1859 } 1860 return this; 1861 } 1862 1863 protected void listChildren(List<Property> children) { 1864 super.listChildren(children); 1865 children.add(new Property("kind", "code", "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.", 0, 1, kind)); 1866 children.add(new Property("instantiatesCanonical", "canonical(PlanDefinition|ActivityDefinition|Questionnaire|Measure|OperationDefinition)", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 1867 children.add(new Property("instantiatesUri", "uri", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 1868 children.add(new Property("code", "CodeableConcept", "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.", 0, 1, code)); 1869 children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited - either a coded concept, or 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.", 0, java.lang.Integer.MAX_VALUE, reason)); 1870 children.add(new Property("goal", "Reference(Goal)", "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", 0, java.lang.Integer.MAX_VALUE, goal)); 1871 children.add(new Property("status", "code", "Identifies what progress is being made for the specific activity.", 0, 1, status)); 1872 children.add(new Property("statusReason", "CodeableConcept", "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", 0, 1, statusReason)); 1873 children.add(new Property("doNotPerform", "boolean", "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.", 0, 1, doNotPerform)); 1874 children.add(new Property("scheduled[x]", "Timing|Period|string", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled)); 1875 children.add(new Property("location", "CodeableReference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location)); 1876 children.add(new Property("reported[x]", "boolean|Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", 0, 1, reported)); 1877 children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|RelatedPerson|Patient|CareTeam|HealthcareService|Device)", "Identifies who's expected to be involved in the activity.", 0, java.lang.Integer.MAX_VALUE, performer)); 1878 children.add(new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product)); 1879 children.add(new Property("dailyAmount", "Quantity", "Identifies the quantity expected to be consumed in a given day.", 0, 1, dailyAmount)); 1880 children.add(new Property("quantity", "Quantity", "Identifies the quantity expected to be supplied, administered or consumed by the subject.", 0, 1, quantity)); 1881 children.add(new Property("description", "string", "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.", 0, 1, description)); 1882 } 1883 1884 @Override 1885 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1886 switch (_hash) { 1887 case 3292052: /*kind*/ return new Property("kind", "code", "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.", 0, 1, kind); 1888 case 8911915: /*instantiatesCanonical*/ return new Property("instantiatesCanonical", "canonical(PlanDefinition|ActivityDefinition|Questionnaire|Measure|OperationDefinition)", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 1889 case -1926393373: /*instantiatesUri*/ return new Property("instantiatesUri", "uri", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 1890 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.", 0, 1, code); 1891 case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited - either a coded concept, or 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.", 0, java.lang.Integer.MAX_VALUE, reason); 1892 case 3178259: /*goal*/ return new Property("goal", "Reference(Goal)", "Internal reference that identifies the goals that this activity is intended to contribute towards meeting.", 0, java.lang.Integer.MAX_VALUE, goal); 1893 case -892481550: /*status*/ return new Property("status", "code", "Identifies what progress is being made for the specific activity.", 0, 1, status); 1894 case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", 0, 1, statusReason); 1895 case -1788508167: /*doNotPerform*/ return new Property("doNotPerform", "boolean", "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.", 0, 1, doNotPerform); 1896 case 1162627251: /*scheduled[x]*/ return new Property("scheduled[x]", "Timing|Period|string", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 1897 case -160710483: /*scheduled*/ return new Property("scheduled[x]", "Timing|Period|string", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 1898 case 998483799: /*scheduledTiming*/ return new Property("scheduled[x]", "Timing", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 1899 case 880422094: /*scheduledPeriod*/ return new Property("scheduled[x]", "Period", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 1900 case 980162334: /*scheduledString*/ return new Property("scheduled[x]", "string", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, scheduled); 1901 case 1901043637: /*location*/ return new Property("location", "CodeableReference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location); 1902 case -241505587: /*reported[x]*/ return new Property("reported[x]", "boolean|Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", 0, 1, reported); 1903 case -427039533: /*reported*/ return new Property("reported[x]", "boolean|Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", 0, 1, reported); 1904 case 1219992533: /*reportedBoolean*/ return new Property("reported[x]", "boolean", "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", 0, 1, reported); 1905 case 1198143416: /*reportedReference*/ return new Property("reported[x]", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", 0, 1, reported); 1906 case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|RelatedPerson|Patient|CareTeam|HealthcareService|Device)", "Identifies who's expected to be involved in the activity.", 0, java.lang.Integer.MAX_VALUE, performer); 1907 case 1753005361: /*product[x]*/ return new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 1908 case -309474065: /*product*/ return new Property("product[x]", "CodeableConcept|Reference(Medication|Substance)", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 1909 case 906854066: /*productCodeableConcept*/ return new Property("product[x]", "CodeableConcept", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 1910 case -669667556: /*productReference*/ return new Property("product[x]", "Reference(Medication|Substance)", "Identifies the food, drug or other product to be consumed or supplied in the activity.", 0, 1, product); 1911 case -768908335: /*dailyAmount*/ return new Property("dailyAmount", "Quantity", "Identifies the quantity expected to be consumed in a given day.", 0, 1, dailyAmount); 1912 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "Identifies the quantity expected to be supplied, administered or consumed by the subject.", 0, 1, quantity); 1913 case -1724546052: /*description*/ return new Property("description", "string", "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.", 0, 1, description); 1914 default: return super.getNamedProperty(_hash, _name, _checkValid); 1915 } 1916 1917 } 1918 1919 @Override 1920 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1921 switch (hash) { 1922 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<CarePlanActivityKind> 1923 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 1924 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 1925 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1926 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference 1927 case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference 1928 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CarePlanActivityStatus> 1929 case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept 1930 case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType 1931 case -160710483: /*scheduled*/ return this.scheduled == null ? new Base[0] : new Base[] {this.scheduled}; // DataType 1932 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // CodeableReference 1933 case -427039533: /*reported*/ return this.reported == null ? new Base[0] : new Base[] {this.reported}; // DataType 1934 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference 1935 case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // DataType 1936 case -768908335: /*dailyAmount*/ return this.dailyAmount == null ? new Base[0] : new Base[] {this.dailyAmount}; // Quantity 1937 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 1938 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1939 default: return super.getProperty(hash, name, checkValid); 1940 } 1941 1942 } 1943 1944 @Override 1945 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1946 switch (hash) { 1947 case 3292052: // kind 1948 value = new CarePlanActivityKindEnumFactory().fromType(TypeConvertor.castToCode(value)); 1949 this.kind = (Enumeration) value; // Enumeration<CarePlanActivityKind> 1950 return value; 1951 case 8911915: // instantiatesCanonical 1952 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType 1953 return value; 1954 case -1926393373: // instantiatesUri 1955 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType 1956 return value; 1957 case 3059181: // code 1958 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1959 return value; 1960 case -934964668: // reason 1961 this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 1962 return value; 1963 case 3178259: // goal 1964 this.getGoal().add(TypeConvertor.castToReference(value)); // Reference 1965 return value; 1966 case -892481550: // status 1967 value = new CarePlanActivityStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1968 this.status = (Enumeration) value; // Enumeration<CarePlanActivityStatus> 1969 return value; 1970 case 2051346646: // statusReason 1971 this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1972 return value; 1973 case -1788508167: // doNotPerform 1974 this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType 1975 return value; 1976 case -160710483: // scheduled 1977 this.scheduled = TypeConvertor.castToType(value); // DataType 1978 return value; 1979 case 1901043637: // location 1980 this.location = TypeConvertor.castToCodeableReference(value); // CodeableReference 1981 return value; 1982 case -427039533: // reported 1983 this.reported = TypeConvertor.castToType(value); // DataType 1984 return value; 1985 case 481140686: // performer 1986 this.getPerformer().add(TypeConvertor.castToReference(value)); // Reference 1987 return value; 1988 case -309474065: // product 1989 this.product = TypeConvertor.castToType(value); // DataType 1990 return value; 1991 case -768908335: // dailyAmount 1992 this.dailyAmount = TypeConvertor.castToQuantity(value); // Quantity 1993 return value; 1994 case -1285004149: // quantity 1995 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1996 return value; 1997 case -1724546052: // description 1998 this.description = TypeConvertor.castToString(value); // StringType 1999 return value; 2000 default: return super.setProperty(hash, name, value); 2001 } 2002 2003 } 2004 2005 @Override 2006 public Base setProperty(String name, Base value) throws FHIRException { 2007 if (name.equals("kind")) { 2008 value = new CarePlanActivityKindEnumFactory().fromType(TypeConvertor.castToCode(value)); 2009 this.kind = (Enumeration) value; // Enumeration<CarePlanActivityKind> 2010 } else if (name.equals("instantiatesCanonical")) { 2011 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); 2012 } else if (name.equals("instantiatesUri")) { 2013 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); 2014 } else if (name.equals("code")) { 2015 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2016 } else if (name.equals("reason")) { 2017 this.getReason().add(TypeConvertor.castToCodeableReference(value)); 2018 } else if (name.equals("goal")) { 2019 this.getGoal().add(TypeConvertor.castToReference(value)); 2020 } else if (name.equals("status")) { 2021 value = new CarePlanActivityStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2022 this.status = (Enumeration) value; // Enumeration<CarePlanActivityStatus> 2023 } else if (name.equals("statusReason")) { 2024 this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2025 } else if (name.equals("doNotPerform")) { 2026 this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType 2027 } else if (name.equals("scheduled[x]")) { 2028 this.scheduled = TypeConvertor.castToType(value); // DataType 2029 } else if (name.equals("location")) { 2030 this.location = TypeConvertor.castToCodeableReference(value); // CodeableReference 2031 } else if (name.equals("reported[x]")) { 2032 this.reported = TypeConvertor.castToType(value); // DataType 2033 } else if (name.equals("performer")) { 2034 this.getPerformer().add(TypeConvertor.castToReference(value)); 2035 } else if (name.equals("product[x]")) { 2036 this.product = TypeConvertor.castToType(value); // DataType 2037 } else if (name.equals("dailyAmount")) { 2038 this.dailyAmount = TypeConvertor.castToQuantity(value); // Quantity 2039 } else if (name.equals("quantity")) { 2040 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 2041 } else if (name.equals("description")) { 2042 this.description = TypeConvertor.castToString(value); // StringType 2043 } else 2044 return super.setProperty(name, value); 2045 return value; 2046 } 2047 2048 @Override 2049 public Base makeProperty(int hash, String name) throws FHIRException { 2050 switch (hash) { 2051 case 3292052: return getKindElement(); 2052 case 8911915: return addInstantiatesCanonicalElement(); 2053 case -1926393373: return addInstantiatesUriElement(); 2054 case 3059181: return getCode(); 2055 case -934964668: return addReason(); 2056 case 3178259: return addGoal(); 2057 case -892481550: return getStatusElement(); 2058 case 2051346646: return getStatusReason(); 2059 case -1788508167: return getDoNotPerformElement(); 2060 case 1162627251: return getScheduled(); 2061 case -160710483: return getScheduled(); 2062 case 1901043637: return getLocation(); 2063 case -241505587: return getReported(); 2064 case -427039533: return getReported(); 2065 case 481140686: return addPerformer(); 2066 case 1753005361: return getProduct(); 2067 case -309474065: return getProduct(); 2068 case -768908335: return getDailyAmount(); 2069 case -1285004149: return getQuantity(); 2070 case -1724546052: return getDescriptionElement(); 2071 default: return super.makeProperty(hash, name); 2072 } 2073 2074 } 2075 2076 @Override 2077 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2078 switch (hash) { 2079 case 3292052: /*kind*/ return new String[] {"code"}; 2080 case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"}; 2081 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 2082 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 2083 case -934964668: /*reason*/ return new String[] {"CodeableReference"}; 2084 case 3178259: /*goal*/ return new String[] {"Reference"}; 2085 case -892481550: /*status*/ return new String[] {"code"}; 2086 case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; 2087 case -1788508167: /*doNotPerform*/ return new String[] {"boolean"}; 2088 case -160710483: /*scheduled*/ return new String[] {"Timing", "Period", "string"}; 2089 case 1901043637: /*location*/ return new String[] {"CodeableReference"}; 2090 case -427039533: /*reported*/ return new String[] {"boolean", "Reference"}; 2091 case 481140686: /*performer*/ return new String[] {"Reference"}; 2092 case -309474065: /*product*/ return new String[] {"CodeableConcept", "Reference"}; 2093 case -768908335: /*dailyAmount*/ return new String[] {"Quantity"}; 2094 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 2095 case -1724546052: /*description*/ return new String[] {"string"}; 2096 default: return super.getTypesForProperty(hash, name); 2097 } 2098 2099 } 2100 2101 @Override 2102 public Base addChild(String name) throws FHIRException { 2103 if (name.equals("kind")) { 2104 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.kind"); 2105 } 2106 else if (name.equals("instantiatesCanonical")) { 2107 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.instantiatesCanonical"); 2108 } 2109 else if (name.equals("instantiatesUri")) { 2110 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.instantiatesUri"); 2111 } 2112 else if (name.equals("code")) { 2113 this.code = new CodeableConcept(); 2114 return this.code; 2115 } 2116 else if (name.equals("reason")) { 2117 return addReason(); 2118 } 2119 else if (name.equals("goal")) { 2120 return addGoal(); 2121 } 2122 else if (name.equals("status")) { 2123 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.status"); 2124 } 2125 else if (name.equals("statusReason")) { 2126 this.statusReason = new CodeableConcept(); 2127 return this.statusReason; 2128 } 2129 else if (name.equals("doNotPerform")) { 2130 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.doNotPerform"); 2131 } 2132 else if (name.equals("scheduledTiming")) { 2133 this.scheduled = new Timing(); 2134 return this.scheduled; 2135 } 2136 else if (name.equals("scheduledPeriod")) { 2137 this.scheduled = new Period(); 2138 return this.scheduled; 2139 } 2140 else if (name.equals("scheduledString")) { 2141 this.scheduled = new StringType(); 2142 return this.scheduled; 2143 } 2144 else if (name.equals("location")) { 2145 this.location = new CodeableReference(); 2146 return this.location; 2147 } 2148 else if (name.equals("reportedBoolean")) { 2149 this.reported = new BooleanType(); 2150 return this.reported; 2151 } 2152 else if (name.equals("reportedReference")) { 2153 this.reported = new Reference(); 2154 return this.reported; 2155 } 2156 else if (name.equals("performer")) { 2157 return addPerformer(); 2158 } 2159 else if (name.equals("productCodeableConcept")) { 2160 this.product = new CodeableConcept(); 2161 return this.product; 2162 } 2163 else if (name.equals("productReference")) { 2164 this.product = new Reference(); 2165 return this.product; 2166 } 2167 else if (name.equals("dailyAmount")) { 2168 this.dailyAmount = new Quantity(); 2169 return this.dailyAmount; 2170 } 2171 else if (name.equals("quantity")) { 2172 this.quantity = new Quantity(); 2173 return this.quantity; 2174 } 2175 else if (name.equals("description")) { 2176 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.activity.plannedActivityDetail.description"); 2177 } 2178 else 2179 return super.addChild(name); 2180 } 2181 2182 public CarePlanActivityPlannedActivityDetailComponent copy() { 2183 CarePlanActivityPlannedActivityDetailComponent dst = new CarePlanActivityPlannedActivityDetailComponent(); 2184 copyValues(dst); 2185 return dst; 2186 } 2187 2188 public void copyValues(CarePlanActivityPlannedActivityDetailComponent dst) { 2189 super.copyValues(dst); 2190 dst.kind = kind == null ? null : kind.copy(); 2191 if (instantiatesCanonical != null) { 2192 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 2193 for (CanonicalType i : instantiatesCanonical) 2194 dst.instantiatesCanonical.add(i.copy()); 2195 }; 2196 if (instantiatesUri != null) { 2197 dst.instantiatesUri = new ArrayList<UriType>(); 2198 for (UriType i : instantiatesUri) 2199 dst.instantiatesUri.add(i.copy()); 2200 }; 2201 dst.code = code == null ? null : code.copy(); 2202 if (reason != null) { 2203 dst.reason = new ArrayList<CodeableReference>(); 2204 for (CodeableReference i : reason) 2205 dst.reason.add(i.copy()); 2206 }; 2207 if (goal != null) { 2208 dst.goal = new ArrayList<Reference>(); 2209 for (Reference i : goal) 2210 dst.goal.add(i.copy()); 2211 }; 2212 dst.status = status == null ? null : status.copy(); 2213 dst.statusReason = statusReason == null ? null : statusReason.copy(); 2214 dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy(); 2215 dst.scheduled = scheduled == null ? null : scheduled.copy(); 2216 dst.location = location == null ? null : location.copy(); 2217 dst.reported = reported == null ? null : reported.copy(); 2218 if (performer != null) { 2219 dst.performer = new ArrayList<Reference>(); 2220 for (Reference i : performer) 2221 dst.performer.add(i.copy()); 2222 }; 2223 dst.product = product == null ? null : product.copy(); 2224 dst.dailyAmount = dailyAmount == null ? null : dailyAmount.copy(); 2225 dst.quantity = quantity == null ? null : quantity.copy(); 2226 dst.description = description == null ? null : description.copy(); 2227 } 2228 2229 @Override 2230 public boolean equalsDeep(Base other_) { 2231 if (!super.equalsDeep(other_)) 2232 return false; 2233 if (!(other_ instanceof CarePlanActivityPlannedActivityDetailComponent)) 2234 return false; 2235 CarePlanActivityPlannedActivityDetailComponent o = (CarePlanActivityPlannedActivityDetailComponent) other_; 2236 return compareDeep(kind, o.kind, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 2237 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) 2238 && compareDeep(goal, o.goal, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) 2239 && compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(scheduled, o.scheduled, true) 2240 && compareDeep(location, o.location, true) && compareDeep(reported, o.reported, true) && compareDeep(performer, o.performer, true) 2241 && compareDeep(product, o.product, true) && compareDeep(dailyAmount, o.dailyAmount, true) && compareDeep(quantity, o.quantity, true) 2242 && compareDeep(description, o.description, true); 2243 } 2244 2245 @Override 2246 public boolean equalsShallow(Base other_) { 2247 if (!super.equalsShallow(other_)) 2248 return false; 2249 if (!(other_ instanceof CarePlanActivityPlannedActivityDetailComponent)) 2250 return false; 2251 CarePlanActivityPlannedActivityDetailComponent o = (CarePlanActivityPlannedActivityDetailComponent) other_; 2252 return compareValues(kind, o.kind, true) && compareValues(instantiatesCanonical, o.instantiatesCanonical, true) 2253 && compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(status, o.status, true) 2254 && compareValues(doNotPerform, o.doNotPerform, true) && compareValues(description, o.description, true) 2255 ; 2256 } 2257 2258 public boolean isEmpty() { 2259 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, instantiatesCanonical 2260 , instantiatesUri, code, reason, goal, status, statusReason, doNotPerform, scheduled 2261 , location, reported, performer, product, dailyAmount, quantity, description); 2262 } 2263 2264 public String fhirType() { 2265 return "CarePlan.activity.plannedActivityDetail"; 2266 2267 } 2268 2269 } 2270 2271 /** 2272 * 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. 2273 */ 2274 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2275 @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." ) 2276 protected List<Identifier> identifier; 2277 2278 /** 2279 * 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. 2280 */ 2281 @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2282 @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." ) 2283 protected List<CanonicalType> instantiatesCanonical; 2284 2285 /** 2286 * 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. 2287 */ 2288 @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2289 @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." ) 2290 protected List<UriType> instantiatesUri; 2291 2292 /** 2293 * A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan. 2294 */ 2295 @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class, RequestOrchestration.class, NutritionOrder.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2296 @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan." ) 2297 protected List<Reference> basedOn; 2298 2299 /** 2300 * Completed or terminated care plan whose function is taken by this new care plan. 2301 */ 2302 @Child(name = "replaces", type = {CarePlan.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2303 @Description(shortDefinition="CarePlan replaced by this CarePlan", formalDefinition="Completed or terminated care plan whose function is taken by this new care plan." ) 2304 protected List<Reference> replaces; 2305 2306 /** 2307 * A larger care plan of which this particular care plan is a component or step. 2308 */ 2309 @Child(name = "partOf", type = {CarePlan.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2310 @Description(shortDefinition="Part of referenced CarePlan", formalDefinition="A larger care plan of which this particular care plan is a component or step." ) 2311 protected List<Reference> partOf; 2312 2313 /** 2314 * Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. 2315 */ 2316 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 2317 @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." ) 2318 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status") 2319 protected Enumeration<RequestStatus> status; 2320 2321 /** 2322 * Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain. 2323 */ 2324 @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true) 2325 @Description(shortDefinition="proposal | plan | order | option | directive", formalDefinition="Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain." ) 2326 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-intent") 2327 protected Enumeration<CarePlanIntent> intent; 2328 2329 /** 2330 * 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. 2331 */ 2332 @Child(name = "category", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2333 @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." ) 2334 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-category") 2335 protected List<CodeableConcept> category; 2336 2337 /** 2338 * Human-friendly name for the care plan. 2339 */ 2340 @Child(name = "title", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 2341 @Description(shortDefinition="Human-friendly name for the care plan", formalDefinition="Human-friendly name for the care plan." ) 2342 protected StringType title; 2343 2344 /** 2345 * A description of the scope and nature of the plan. 2346 */ 2347 @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) 2348 @Description(shortDefinition="Summary of nature of plan", formalDefinition="A description of the scope and nature of the plan." ) 2349 protected StringType description; 2350 2351 /** 2352 * Identifies the patient or group whose intended care is described by the plan. 2353 */ 2354 @Child(name = "subject", type = {Patient.class, Group.class}, order=11, min=1, max=1, modifier=false, summary=true) 2355 @Description(shortDefinition="Who the care plan is for", formalDefinition="Identifies the patient or group whose intended care is described by the plan." ) 2356 protected Reference subject; 2357 2358 /** 2359 * The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated. 2360 */ 2361 @Child(name = "encounter", type = {Encounter.class}, order=12, min=0, max=1, modifier=false, summary=true) 2362 @Description(shortDefinition="The Encounter during which this CarePlan was created", formalDefinition="The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated." ) 2363 protected Reference encounter; 2364 2365 /** 2366 * Indicates when the plan did (or is intended to) come into effect and end. 2367 */ 2368 @Child(name = "period", type = {Period.class}, order=13, min=0, max=1, modifier=false, summary=true) 2369 @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) 2370 protected Period period; 2371 2372 /** 2373 * Represents when this particular CarePlan record was created in the system, which is often a system-generated date. 2374 */ 2375 @Child(name = "created", type = {DateTimeType.class}, order=14, min=0, max=1, modifier=false, summary=true) 2376 @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." ) 2377 protected DateTimeType created; 2378 2379 /** 2380 * When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian. 2381 */ 2382 @Child(name = "custodian", type = {Patient.class, Practitioner.class, PractitionerRole.class, Device.class, RelatedPerson.class, Organization.class, CareTeam.class}, order=15, min=0, max=1, modifier=false, summary=true) 2383 @Description(shortDefinition="Who is the designated responsible party", formalDefinition="When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian." ) 2384 protected Reference custodian; 2385 2386 /** 2387 * Identifies the individual(s), organization or device who provided the contents of the care plan. 2388 */ 2389 @Child(name = "contributor", type = {Patient.class, Practitioner.class, PractitionerRole.class, Device.class, RelatedPerson.class, Organization.class, CareTeam.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2390 @Description(shortDefinition="Who provided the content of the care plan", formalDefinition="Identifies the individual(s), organization or device who provided the contents of the care plan." ) 2391 protected List<Reference> contributor; 2392 2393 /** 2394 * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. 2395 */ 2396 @Child(name = "careTeam", type = {CareTeam.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2397 @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." ) 2398 protected List<Reference> careTeam; 2399 2400 /** 2401 * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. 2402 */ 2403 @Child(name = "addresses", type = {CodeableReference.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2404 @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." ) 2405 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 2406 protected List<CodeableReference> addresses; 2407 2408 /** 2409 * 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. 2410 */ 2411 @Child(name = "supportingInfo", type = {Reference.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2412 @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." ) 2413 protected List<Reference> supportingInfo; 2414 2415 /** 2416 * Describes the intended objective(s) of carrying out the care plan. 2417 */ 2418 @Child(name = "goal", type = {Goal.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2419 @Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the care plan." ) 2420 protected List<Reference> goal; 2421 2422 /** 2423 * Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc. 2424 */ 2425 @Child(name = "activity", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2426 @Description(shortDefinition="Action to occur or has occurred as part of plan", formalDefinition="Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc." ) 2427 protected List<CarePlanActivityComponent> activity; 2428 2429 /** 2430 * General notes about the care plan not covered elsewhere. 2431 */ 2432 @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2433 @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) 2434 protected List<Annotation> note; 2435 2436 private static final long serialVersionUID = -700769298L; 2437 2438 /** 2439 * Constructor 2440 */ 2441 public CarePlan() { 2442 super(); 2443 } 2444 2445 /** 2446 * Constructor 2447 */ 2448 public CarePlan(RequestStatus status, CarePlanIntent intent, Reference subject) { 2449 super(); 2450 this.setStatus(status); 2451 this.setIntent(intent); 2452 this.setSubject(subject); 2453 } 2454 2455 /** 2456 * @return {@link #identifier} (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.) 2457 */ 2458 public List<Identifier> getIdentifier() { 2459 if (this.identifier == null) 2460 this.identifier = new ArrayList<Identifier>(); 2461 return this.identifier; 2462 } 2463 2464 /** 2465 * @return Returns a reference to <code>this</code> for easy method chaining 2466 */ 2467 public CarePlan setIdentifier(List<Identifier> theIdentifier) { 2468 this.identifier = theIdentifier; 2469 return this; 2470 } 2471 2472 public boolean hasIdentifier() { 2473 if (this.identifier == null) 2474 return false; 2475 for (Identifier item : this.identifier) 2476 if (!item.isEmpty()) 2477 return true; 2478 return false; 2479 } 2480 2481 public Identifier addIdentifier() { //3 2482 Identifier t = new Identifier(); 2483 if (this.identifier == null) 2484 this.identifier = new ArrayList<Identifier>(); 2485 this.identifier.add(t); 2486 return t; 2487 } 2488 2489 public CarePlan addIdentifier(Identifier t) { //3 2490 if (t == null) 2491 return this; 2492 if (this.identifier == null) 2493 this.identifier = new ArrayList<Identifier>(); 2494 this.identifier.add(t); 2495 return this; 2496 } 2497 2498 /** 2499 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2500 */ 2501 public Identifier getIdentifierFirstRep() { 2502 if (getIdentifier().isEmpty()) { 2503 addIdentifier(); 2504 } 2505 return getIdentifier().get(0); 2506 } 2507 2508 /** 2509 * @return {@link #instantiatesCanonical} (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.) 2510 */ 2511 public List<CanonicalType> getInstantiatesCanonical() { 2512 if (this.instantiatesCanonical == null) 2513 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 2514 return this.instantiatesCanonical; 2515 } 2516 2517 /** 2518 * @return Returns a reference to <code>this</code> for easy method chaining 2519 */ 2520 public CarePlan setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 2521 this.instantiatesCanonical = theInstantiatesCanonical; 2522 return this; 2523 } 2524 2525 public boolean hasInstantiatesCanonical() { 2526 if (this.instantiatesCanonical == null) 2527 return false; 2528 for (CanonicalType item : this.instantiatesCanonical) 2529 if (!item.isEmpty()) 2530 return true; 2531 return false; 2532 } 2533 2534 /** 2535 * @return {@link #instantiatesCanonical} (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.) 2536 */ 2537 public CanonicalType addInstantiatesCanonicalElement() {//2 2538 CanonicalType t = new CanonicalType(); 2539 if (this.instantiatesCanonical == null) 2540 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 2541 this.instantiatesCanonical.add(t); 2542 return t; 2543 } 2544 2545 /** 2546 * @param value {@link #instantiatesCanonical} (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.) 2547 */ 2548 public CarePlan addInstantiatesCanonical(String value) { //1 2549 CanonicalType t = new CanonicalType(); 2550 t.setValue(value); 2551 if (this.instantiatesCanonical == null) 2552 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 2553 this.instantiatesCanonical.add(t); 2554 return this; 2555 } 2556 2557 /** 2558 * @param value {@link #instantiatesCanonical} (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.) 2559 */ 2560 public boolean hasInstantiatesCanonical(String value) { 2561 if (this.instantiatesCanonical == null) 2562 return false; 2563 for (CanonicalType v : this.instantiatesCanonical) 2564 if (v.getValue().equals(value)) // canonical 2565 return true; 2566 return false; 2567 } 2568 2569 /** 2570 * @return {@link #instantiatesUri} (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.) 2571 */ 2572 public List<UriType> getInstantiatesUri() { 2573 if (this.instantiatesUri == null) 2574 this.instantiatesUri = new ArrayList<UriType>(); 2575 return this.instantiatesUri; 2576 } 2577 2578 /** 2579 * @return Returns a reference to <code>this</code> for easy method chaining 2580 */ 2581 public CarePlan setInstantiatesUri(List<UriType> theInstantiatesUri) { 2582 this.instantiatesUri = theInstantiatesUri; 2583 return this; 2584 } 2585 2586 public boolean hasInstantiatesUri() { 2587 if (this.instantiatesUri == null) 2588 return false; 2589 for (UriType item : this.instantiatesUri) 2590 if (!item.isEmpty()) 2591 return true; 2592 return false; 2593 } 2594 2595 /** 2596 * @return {@link #instantiatesUri} (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.) 2597 */ 2598 public UriType addInstantiatesUriElement() {//2 2599 UriType t = new UriType(); 2600 if (this.instantiatesUri == null) 2601 this.instantiatesUri = new ArrayList<UriType>(); 2602 this.instantiatesUri.add(t); 2603 return t; 2604 } 2605 2606 /** 2607 * @param value {@link #instantiatesUri} (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.) 2608 */ 2609 public CarePlan addInstantiatesUri(String value) { //1 2610 UriType t = new UriType(); 2611 t.setValue(value); 2612 if (this.instantiatesUri == null) 2613 this.instantiatesUri = new ArrayList<UriType>(); 2614 this.instantiatesUri.add(t); 2615 return this; 2616 } 2617 2618 /** 2619 * @param value {@link #instantiatesUri} (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.) 2620 */ 2621 public boolean hasInstantiatesUri(String value) { 2622 if (this.instantiatesUri == null) 2623 return false; 2624 for (UriType v : this.instantiatesUri) 2625 if (v.getValue().equals(value)) // uri 2626 return true; 2627 return false; 2628 } 2629 2630 /** 2631 * @return {@link #basedOn} (A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.) 2632 */ 2633 public List<Reference> getBasedOn() { 2634 if (this.basedOn == null) 2635 this.basedOn = new ArrayList<Reference>(); 2636 return this.basedOn; 2637 } 2638 2639 /** 2640 * @return Returns a reference to <code>this</code> for easy method chaining 2641 */ 2642 public CarePlan setBasedOn(List<Reference> theBasedOn) { 2643 this.basedOn = theBasedOn; 2644 return this; 2645 } 2646 2647 public boolean hasBasedOn() { 2648 if (this.basedOn == null) 2649 return false; 2650 for (Reference item : this.basedOn) 2651 if (!item.isEmpty()) 2652 return true; 2653 return false; 2654 } 2655 2656 public Reference addBasedOn() { //3 2657 Reference t = new Reference(); 2658 if (this.basedOn == null) 2659 this.basedOn = new ArrayList<Reference>(); 2660 this.basedOn.add(t); 2661 return t; 2662 } 2663 2664 public CarePlan addBasedOn(Reference t) { //3 2665 if (t == null) 2666 return this; 2667 if (this.basedOn == null) 2668 this.basedOn = new ArrayList<Reference>(); 2669 this.basedOn.add(t); 2670 return this; 2671 } 2672 2673 /** 2674 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} 2675 */ 2676 public Reference getBasedOnFirstRep() { 2677 if (getBasedOn().isEmpty()) { 2678 addBasedOn(); 2679 } 2680 return getBasedOn().get(0); 2681 } 2682 2683 /** 2684 * @return {@link #replaces} (Completed or terminated care plan whose function is taken by this new care plan.) 2685 */ 2686 public List<Reference> getReplaces() { 2687 if (this.replaces == null) 2688 this.replaces = new ArrayList<Reference>(); 2689 return this.replaces; 2690 } 2691 2692 /** 2693 * @return Returns a reference to <code>this</code> for easy method chaining 2694 */ 2695 public CarePlan setReplaces(List<Reference> theReplaces) { 2696 this.replaces = theReplaces; 2697 return this; 2698 } 2699 2700 public boolean hasReplaces() { 2701 if (this.replaces == null) 2702 return false; 2703 for (Reference item : this.replaces) 2704 if (!item.isEmpty()) 2705 return true; 2706 return false; 2707 } 2708 2709 public Reference addReplaces() { //3 2710 Reference t = new Reference(); 2711 if (this.replaces == null) 2712 this.replaces = new ArrayList<Reference>(); 2713 this.replaces.add(t); 2714 return t; 2715 } 2716 2717 public CarePlan addReplaces(Reference t) { //3 2718 if (t == null) 2719 return this; 2720 if (this.replaces == null) 2721 this.replaces = new ArrayList<Reference>(); 2722 this.replaces.add(t); 2723 return this; 2724 } 2725 2726 /** 2727 * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3} 2728 */ 2729 public Reference getReplacesFirstRep() { 2730 if (getReplaces().isEmpty()) { 2731 addReplaces(); 2732 } 2733 return getReplaces().get(0); 2734 } 2735 2736 /** 2737 * @return {@link #partOf} (A larger care plan of which this particular care plan is a component or step.) 2738 */ 2739 public List<Reference> getPartOf() { 2740 if (this.partOf == null) 2741 this.partOf = new ArrayList<Reference>(); 2742 return this.partOf; 2743 } 2744 2745 /** 2746 * @return Returns a reference to <code>this</code> for easy method chaining 2747 */ 2748 public CarePlan setPartOf(List<Reference> thePartOf) { 2749 this.partOf = thePartOf; 2750 return this; 2751 } 2752 2753 public boolean hasPartOf() { 2754 if (this.partOf == null) 2755 return false; 2756 for (Reference item : this.partOf) 2757 if (!item.isEmpty()) 2758 return true; 2759 return false; 2760 } 2761 2762 public Reference addPartOf() { //3 2763 Reference t = new Reference(); 2764 if (this.partOf == null) 2765 this.partOf = new ArrayList<Reference>(); 2766 this.partOf.add(t); 2767 return t; 2768 } 2769 2770 public CarePlan addPartOf(Reference t) { //3 2771 if (t == null) 2772 return this; 2773 if (this.partOf == null) 2774 this.partOf = new ArrayList<Reference>(); 2775 this.partOf.add(t); 2776 return this; 2777 } 2778 2779 /** 2780 * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3} 2781 */ 2782 public Reference getPartOfFirstRep() { 2783 if (getPartOf().isEmpty()) { 2784 addPartOf(); 2785 } 2786 return getPartOf().get(0); 2787 } 2788 2789 /** 2790 * @return {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2791 */ 2792 public Enumeration<RequestStatus> getStatusElement() { 2793 if (this.status == null) 2794 if (Configuration.errorOnAutoCreate()) 2795 throw new Error("Attempt to auto-create CarePlan.status"); 2796 else if (Configuration.doAutoCreate()) 2797 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb 2798 return this.status; 2799 } 2800 2801 public boolean hasStatusElement() { 2802 return this.status != null && !this.status.isEmpty(); 2803 } 2804 2805 public boolean hasStatus() { 2806 return this.status != null && !this.status.isEmpty(); 2807 } 2808 2809 /** 2810 * @param value {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2811 */ 2812 public CarePlan setStatusElement(Enumeration<RequestStatus> value) { 2813 this.status = value; 2814 return this; 2815 } 2816 2817 /** 2818 * @return Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. 2819 */ 2820 public RequestStatus getStatus() { 2821 return this.status == null ? null : this.status.getValue(); 2822 } 2823 2824 /** 2825 * @param value Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record. 2826 */ 2827 public CarePlan setStatus(RequestStatus value) { 2828 if (this.status == null) 2829 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); 2830 this.status.setValue(value); 2831 return this; 2832 } 2833 2834 /** 2835 * @return {@link #intent} (Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 2836 */ 2837 public Enumeration<CarePlanIntent> getIntentElement() { 2838 if (this.intent == null) 2839 if (Configuration.errorOnAutoCreate()) 2840 throw new Error("Attempt to auto-create CarePlan.intent"); 2841 else if (Configuration.doAutoCreate()) 2842 this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory()); // bb 2843 return this.intent; 2844 } 2845 2846 public boolean hasIntentElement() { 2847 return this.intent != null && !this.intent.isEmpty(); 2848 } 2849 2850 public boolean hasIntent() { 2851 return this.intent != null && !this.intent.isEmpty(); 2852 } 2853 2854 /** 2855 * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value 2856 */ 2857 public CarePlan setIntentElement(Enumeration<CarePlanIntent> value) { 2858 this.intent = value; 2859 return this; 2860 } 2861 2862 /** 2863 * @return Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain. 2864 */ 2865 public CarePlanIntent getIntent() { 2866 return this.intent == null ? null : this.intent.getValue(); 2867 } 2868 2869 /** 2870 * @param value Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain. 2871 */ 2872 public CarePlan setIntent(CarePlanIntent value) { 2873 if (this.intent == null) 2874 this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory()); 2875 this.intent.setValue(value); 2876 return this; 2877 } 2878 2879 /** 2880 * @return {@link #category} (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.) 2881 */ 2882 public List<CodeableConcept> getCategory() { 2883 if (this.category == null) 2884 this.category = new ArrayList<CodeableConcept>(); 2885 return this.category; 2886 } 2887 2888 /** 2889 * @return Returns a reference to <code>this</code> for easy method chaining 2890 */ 2891 public CarePlan setCategory(List<CodeableConcept> theCategory) { 2892 this.category = theCategory; 2893 return this; 2894 } 2895 2896 public boolean hasCategory() { 2897 if (this.category == null) 2898 return false; 2899 for (CodeableConcept item : this.category) 2900 if (!item.isEmpty()) 2901 return true; 2902 return false; 2903 } 2904 2905 public CodeableConcept addCategory() { //3 2906 CodeableConcept t = new CodeableConcept(); 2907 if (this.category == null) 2908 this.category = new ArrayList<CodeableConcept>(); 2909 this.category.add(t); 2910 return t; 2911 } 2912 2913 public CarePlan addCategory(CodeableConcept t) { //3 2914 if (t == null) 2915 return this; 2916 if (this.category == null) 2917 this.category = new ArrayList<CodeableConcept>(); 2918 this.category.add(t); 2919 return this; 2920 } 2921 2922 /** 2923 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} 2924 */ 2925 public CodeableConcept getCategoryFirstRep() { 2926 if (getCategory().isEmpty()) { 2927 addCategory(); 2928 } 2929 return getCategory().get(0); 2930 } 2931 2932 /** 2933 * @return {@link #title} (Human-friendly name for the care plan.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2934 */ 2935 public StringType getTitleElement() { 2936 if (this.title == null) 2937 if (Configuration.errorOnAutoCreate()) 2938 throw new Error("Attempt to auto-create CarePlan.title"); 2939 else if (Configuration.doAutoCreate()) 2940 this.title = new StringType(); // bb 2941 return this.title; 2942 } 2943 2944 public boolean hasTitleElement() { 2945 return this.title != null && !this.title.isEmpty(); 2946 } 2947 2948 public boolean hasTitle() { 2949 return this.title != null && !this.title.isEmpty(); 2950 } 2951 2952 /** 2953 * @param value {@link #title} (Human-friendly name for the care plan.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2954 */ 2955 public CarePlan setTitleElement(StringType value) { 2956 this.title = value; 2957 return this; 2958 } 2959 2960 /** 2961 * @return Human-friendly name for the care plan. 2962 */ 2963 public String getTitle() { 2964 return this.title == null ? null : this.title.getValue(); 2965 } 2966 2967 /** 2968 * @param value Human-friendly name for the care plan. 2969 */ 2970 public CarePlan setTitle(String value) { 2971 if (Utilities.noString(value)) 2972 this.title = null; 2973 else { 2974 if (this.title == null) 2975 this.title = new StringType(); 2976 this.title.setValue(value); 2977 } 2978 return this; 2979 } 2980 2981 /** 2982 * @return {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2983 */ 2984 public StringType getDescriptionElement() { 2985 if (this.description == null) 2986 if (Configuration.errorOnAutoCreate()) 2987 throw new Error("Attempt to auto-create CarePlan.description"); 2988 else if (Configuration.doAutoCreate()) 2989 this.description = new StringType(); // bb 2990 return this.description; 2991 } 2992 2993 public boolean hasDescriptionElement() { 2994 return this.description != null && !this.description.isEmpty(); 2995 } 2996 2997 public boolean hasDescription() { 2998 return this.description != null && !this.description.isEmpty(); 2999 } 3000 3001 /** 3002 * @param value {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3003 */ 3004 public CarePlan setDescriptionElement(StringType value) { 3005 this.description = value; 3006 return this; 3007 } 3008 3009 /** 3010 * @return A description of the scope and nature of the plan. 3011 */ 3012 public String getDescription() { 3013 return this.description == null ? null : this.description.getValue(); 3014 } 3015 3016 /** 3017 * @param value A description of the scope and nature of the plan. 3018 */ 3019 public CarePlan setDescription(String value) { 3020 if (Utilities.noString(value)) 3021 this.description = null; 3022 else { 3023 if (this.description == null) 3024 this.description = new StringType(); 3025 this.description.setValue(value); 3026 } 3027 return this; 3028 } 3029 3030 /** 3031 * @return {@link #subject} (Identifies the patient or group whose intended care is described by the plan.) 3032 */ 3033 public Reference getSubject() { 3034 if (this.subject == null) 3035 if (Configuration.errorOnAutoCreate()) 3036 throw new Error("Attempt to auto-create CarePlan.subject"); 3037 else if (Configuration.doAutoCreate()) 3038 this.subject = new Reference(); // cc 3039 return this.subject; 3040 } 3041 3042 public boolean hasSubject() { 3043 return this.subject != null && !this.subject.isEmpty(); 3044 } 3045 3046 /** 3047 * @param value {@link #subject} (Identifies the patient or group whose intended care is described by the plan.) 3048 */ 3049 public CarePlan setSubject(Reference value) { 3050 this.subject = value; 3051 return this; 3052 } 3053 3054 /** 3055 * @return {@link #encounter} (The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.) 3056 */ 3057 public Reference getEncounter() { 3058 if (this.encounter == null) 3059 if (Configuration.errorOnAutoCreate()) 3060 throw new Error("Attempt to auto-create CarePlan.encounter"); 3061 else if (Configuration.doAutoCreate()) 3062 this.encounter = new Reference(); // cc 3063 return this.encounter; 3064 } 3065 3066 public boolean hasEncounter() { 3067 return this.encounter != null && !this.encounter.isEmpty(); 3068 } 3069 3070 /** 3071 * @param value {@link #encounter} (The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.) 3072 */ 3073 public CarePlan setEncounter(Reference value) { 3074 this.encounter = value; 3075 return this; 3076 } 3077 3078 /** 3079 * @return {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) 3080 */ 3081 public Period getPeriod() { 3082 if (this.period == null) 3083 if (Configuration.errorOnAutoCreate()) 3084 throw new Error("Attempt to auto-create CarePlan.period"); 3085 else if (Configuration.doAutoCreate()) 3086 this.period = new Period(); // cc 3087 return this.period; 3088 } 3089 3090 public boolean hasPeriod() { 3091 return this.period != null && !this.period.isEmpty(); 3092 } 3093 3094 /** 3095 * @param value {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) 3096 */ 3097 public CarePlan setPeriod(Period value) { 3098 this.period = value; 3099 return this; 3100 } 3101 3102 /** 3103 * @return {@link #created} (Represents when this particular CarePlan record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 3104 */ 3105 public DateTimeType getCreatedElement() { 3106 if (this.created == null) 3107 if (Configuration.errorOnAutoCreate()) 3108 throw new Error("Attempt to auto-create CarePlan.created"); 3109 else if (Configuration.doAutoCreate()) 3110 this.created = new DateTimeType(); // bb 3111 return this.created; 3112 } 3113 3114 public boolean hasCreatedElement() { 3115 return this.created != null && !this.created.isEmpty(); 3116 } 3117 3118 public boolean hasCreated() { 3119 return this.created != null && !this.created.isEmpty(); 3120 } 3121 3122 /** 3123 * @param value {@link #created} (Represents when this particular CarePlan record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 3124 */ 3125 public CarePlan setCreatedElement(DateTimeType value) { 3126 this.created = value; 3127 return this; 3128 } 3129 3130 /** 3131 * @return Represents when this particular CarePlan record was created in the system, which is often a system-generated date. 3132 */ 3133 public Date getCreated() { 3134 return this.created == null ? null : this.created.getValue(); 3135 } 3136 3137 /** 3138 * @param value Represents when this particular CarePlan record was created in the system, which is often a system-generated date. 3139 */ 3140 public CarePlan setCreated(Date value) { 3141 if (value == null) 3142 this.created = null; 3143 else { 3144 if (this.created == null) 3145 this.created = new DateTimeType(); 3146 this.created.setValue(value); 3147 } 3148 return this; 3149 } 3150 3151 /** 3152 * @return {@link #custodian} (When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.) 3153 */ 3154 public Reference getCustodian() { 3155 if (this.custodian == null) 3156 if (Configuration.errorOnAutoCreate()) 3157 throw new Error("Attempt to auto-create CarePlan.custodian"); 3158 else if (Configuration.doAutoCreate()) 3159 this.custodian = new Reference(); // cc 3160 return this.custodian; 3161 } 3162 3163 public boolean hasCustodian() { 3164 return this.custodian != null && !this.custodian.isEmpty(); 3165 } 3166 3167 /** 3168 * @param value {@link #custodian} (When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.) 3169 */ 3170 public CarePlan setCustodian(Reference value) { 3171 this.custodian = value; 3172 return this; 3173 } 3174 3175 /** 3176 * @return {@link #contributor} (Identifies the individual(s), organization or device who provided the contents of the care plan.) 3177 */ 3178 public List<Reference> getContributor() { 3179 if (this.contributor == null) 3180 this.contributor = new ArrayList<Reference>(); 3181 return this.contributor; 3182 } 3183 3184 /** 3185 * @return Returns a reference to <code>this</code> for easy method chaining 3186 */ 3187 public CarePlan setContributor(List<Reference> theContributor) { 3188 this.contributor = theContributor; 3189 return this; 3190 } 3191 3192 public boolean hasContributor() { 3193 if (this.contributor == null) 3194 return false; 3195 for (Reference item : this.contributor) 3196 if (!item.isEmpty()) 3197 return true; 3198 return false; 3199 } 3200 3201 public Reference addContributor() { //3 3202 Reference t = new Reference(); 3203 if (this.contributor == null) 3204 this.contributor = new ArrayList<Reference>(); 3205 this.contributor.add(t); 3206 return t; 3207 } 3208 3209 public CarePlan addContributor(Reference t) { //3 3210 if (t == null) 3211 return this; 3212 if (this.contributor == null) 3213 this.contributor = new ArrayList<Reference>(); 3214 this.contributor.add(t); 3215 return this; 3216 } 3217 3218 /** 3219 * @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist {3} 3220 */ 3221 public Reference getContributorFirstRep() { 3222 if (getContributor().isEmpty()) { 3223 addContributor(); 3224 } 3225 return getContributor().get(0); 3226 } 3227 3228 /** 3229 * @return {@link #careTeam} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.) 3230 */ 3231 public List<Reference> getCareTeam() { 3232 if (this.careTeam == null) 3233 this.careTeam = new ArrayList<Reference>(); 3234 return this.careTeam; 3235 } 3236 3237 /** 3238 * @return Returns a reference to <code>this</code> for easy method chaining 3239 */ 3240 public CarePlan setCareTeam(List<Reference> theCareTeam) { 3241 this.careTeam = theCareTeam; 3242 return this; 3243 } 3244 3245 public boolean hasCareTeam() { 3246 if (this.careTeam == null) 3247 return false; 3248 for (Reference item : this.careTeam) 3249 if (!item.isEmpty()) 3250 return true; 3251 return false; 3252 } 3253 3254 public Reference addCareTeam() { //3 3255 Reference t = new Reference(); 3256 if (this.careTeam == null) 3257 this.careTeam = new ArrayList<Reference>(); 3258 this.careTeam.add(t); 3259 return t; 3260 } 3261 3262 public CarePlan addCareTeam(Reference t) { //3 3263 if (t == null) 3264 return this; 3265 if (this.careTeam == null) 3266 this.careTeam = new ArrayList<Reference>(); 3267 this.careTeam.add(t); 3268 return this; 3269 } 3270 3271 /** 3272 * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3} 3273 */ 3274 public Reference getCareTeamFirstRep() { 3275 if (getCareTeam().isEmpty()) { 3276 addCareTeam(); 3277 } 3278 return getCareTeam().get(0); 3279 } 3280 3281 /** 3282 * @return {@link #addresses} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) 3283 */ 3284 public List<CodeableReference> getAddresses() { 3285 if (this.addresses == null) 3286 this.addresses = new ArrayList<CodeableReference>(); 3287 return this.addresses; 3288 } 3289 3290 /** 3291 * @return Returns a reference to <code>this</code> for easy method chaining 3292 */ 3293 public CarePlan setAddresses(List<CodeableReference> theAddresses) { 3294 this.addresses = theAddresses; 3295 return this; 3296 } 3297 3298 public boolean hasAddresses() { 3299 if (this.addresses == null) 3300 return false; 3301 for (CodeableReference item : this.addresses) 3302 if (!item.isEmpty()) 3303 return true; 3304 return false; 3305 } 3306 3307 public CodeableReference addAddresses() { //3 3308 CodeableReference t = new CodeableReference(); 3309 if (this.addresses == null) 3310 this.addresses = new ArrayList<CodeableReference>(); 3311 this.addresses.add(t); 3312 return t; 3313 } 3314 3315 public CarePlan addAddresses(CodeableReference t) { //3 3316 if (t == null) 3317 return this; 3318 if (this.addresses == null) 3319 this.addresses = new ArrayList<CodeableReference>(); 3320 this.addresses.add(t); 3321 return this; 3322 } 3323 3324 /** 3325 * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist {3} 3326 */ 3327 public CodeableReference getAddressesFirstRep() { 3328 if (getAddresses().isEmpty()) { 3329 addAddresses(); 3330 } 3331 return getAddresses().get(0); 3332 } 3333 3334 /** 3335 * @return {@link #supportingInfo} (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.) 3336 */ 3337 public List<Reference> getSupportingInfo() { 3338 if (this.supportingInfo == null) 3339 this.supportingInfo = new ArrayList<Reference>(); 3340 return this.supportingInfo; 3341 } 3342 3343 /** 3344 * @return Returns a reference to <code>this</code> for easy method chaining 3345 */ 3346 public CarePlan setSupportingInfo(List<Reference> theSupportingInfo) { 3347 this.supportingInfo = theSupportingInfo; 3348 return this; 3349 } 3350 3351 public boolean hasSupportingInfo() { 3352 if (this.supportingInfo == null) 3353 return false; 3354 for (Reference item : this.supportingInfo) 3355 if (!item.isEmpty()) 3356 return true; 3357 return false; 3358 } 3359 3360 public Reference addSupportingInfo() { //3 3361 Reference t = new Reference(); 3362 if (this.supportingInfo == null) 3363 this.supportingInfo = new ArrayList<Reference>(); 3364 this.supportingInfo.add(t); 3365 return t; 3366 } 3367 3368 public CarePlan addSupportingInfo(Reference t) { //3 3369 if (t == null) 3370 return this; 3371 if (this.supportingInfo == null) 3372 this.supportingInfo = new ArrayList<Reference>(); 3373 this.supportingInfo.add(t); 3374 return this; 3375 } 3376 3377 /** 3378 * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3} 3379 */ 3380 public Reference getSupportingInfoFirstRep() { 3381 if (getSupportingInfo().isEmpty()) { 3382 addSupportingInfo(); 3383 } 3384 return getSupportingInfo().get(0); 3385 } 3386 3387 /** 3388 * @return {@link #goal} (Describes the intended objective(s) of carrying out the care plan.) 3389 */ 3390 public List<Reference> getGoal() { 3391 if (this.goal == null) 3392 this.goal = new ArrayList<Reference>(); 3393 return this.goal; 3394 } 3395 3396 /** 3397 * @return Returns a reference to <code>this</code> for easy method chaining 3398 */ 3399 public CarePlan setGoal(List<Reference> theGoal) { 3400 this.goal = theGoal; 3401 return this; 3402 } 3403 3404 public boolean hasGoal() { 3405 if (this.goal == null) 3406 return false; 3407 for (Reference item : this.goal) 3408 if (!item.isEmpty()) 3409 return true; 3410 return false; 3411 } 3412 3413 public Reference addGoal() { //3 3414 Reference t = new Reference(); 3415 if (this.goal == null) 3416 this.goal = new ArrayList<Reference>(); 3417 this.goal.add(t); 3418 return t; 3419 } 3420 3421 public CarePlan addGoal(Reference t) { //3 3422 if (t == null) 3423 return this; 3424 if (this.goal == null) 3425 this.goal = new ArrayList<Reference>(); 3426 this.goal.add(t); 3427 return this; 3428 } 3429 3430 /** 3431 * @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist {3} 3432 */ 3433 public Reference getGoalFirstRep() { 3434 if (getGoal().isEmpty()) { 3435 addGoal(); 3436 } 3437 return getGoal().get(0); 3438 } 3439 3440 /** 3441 * @return {@link #activity} (Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.) 3442 */ 3443 public List<CarePlanActivityComponent> getActivity() { 3444 if (this.activity == null) 3445 this.activity = new ArrayList<CarePlanActivityComponent>(); 3446 return this.activity; 3447 } 3448 3449 /** 3450 * @return Returns a reference to <code>this</code> for easy method chaining 3451 */ 3452 public CarePlan setActivity(List<CarePlanActivityComponent> theActivity) { 3453 this.activity = theActivity; 3454 return this; 3455 } 3456 3457 public boolean hasActivity() { 3458 if (this.activity == null) 3459 return false; 3460 for (CarePlanActivityComponent item : this.activity) 3461 if (!item.isEmpty()) 3462 return true; 3463 return false; 3464 } 3465 3466 public CarePlanActivityComponent addActivity() { //3 3467 CarePlanActivityComponent t = new CarePlanActivityComponent(); 3468 if (this.activity == null) 3469 this.activity = new ArrayList<CarePlanActivityComponent>(); 3470 this.activity.add(t); 3471 return t; 3472 } 3473 3474 public CarePlan addActivity(CarePlanActivityComponent t) { //3 3475 if (t == null) 3476 return this; 3477 if (this.activity == null) 3478 this.activity = new ArrayList<CarePlanActivityComponent>(); 3479 this.activity.add(t); 3480 return this; 3481 } 3482 3483 /** 3484 * @return The first repetition of repeating field {@link #activity}, creating it if it does not already exist {3} 3485 */ 3486 public CarePlanActivityComponent getActivityFirstRep() { 3487 if (getActivity().isEmpty()) { 3488 addActivity(); 3489 } 3490 return getActivity().get(0); 3491 } 3492 3493 /** 3494 * @return {@link #note} (General notes about the care plan not covered elsewhere.) 3495 */ 3496 public List<Annotation> getNote() { 3497 if (this.note == null) 3498 this.note = new ArrayList<Annotation>(); 3499 return this.note; 3500 } 3501 3502 /** 3503 * @return Returns a reference to <code>this</code> for easy method chaining 3504 */ 3505 public CarePlan setNote(List<Annotation> theNote) { 3506 this.note = theNote; 3507 return this; 3508 } 3509 3510 public boolean hasNote() { 3511 if (this.note == null) 3512 return false; 3513 for (Annotation item : this.note) 3514 if (!item.isEmpty()) 3515 return true; 3516 return false; 3517 } 3518 3519 public Annotation addNote() { //3 3520 Annotation t = new Annotation(); 3521 if (this.note == null) 3522 this.note = new ArrayList<Annotation>(); 3523 this.note.add(t); 3524 return t; 3525 } 3526 3527 public CarePlan addNote(Annotation t) { //3 3528 if (t == null) 3529 return this; 3530 if (this.note == null) 3531 this.note = new ArrayList<Annotation>(); 3532 this.note.add(t); 3533 return this; 3534 } 3535 3536 /** 3537 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 3538 */ 3539 public Annotation getNoteFirstRep() { 3540 if (getNote().isEmpty()) { 3541 addNote(); 3542 } 3543 return getNote().get(0); 3544 } 3545 3546 protected void listChildren(List<Property> children) { 3547 super.listChildren(children); 3548 children.add(new Property("identifier", "Identifier", "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.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3549 children.add(new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 3550 children.add(new Property("instantiatesUri", "uri", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 3551 children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest|RequestOrchestration|NutritionOrder)", "A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 3552 children.add(new Property("replaces", "Reference(CarePlan)", "Completed or terminated care plan whose function is taken by this new care plan.", 0, java.lang.Integer.MAX_VALUE, replaces)); 3553 children.add(new Property("partOf", "Reference(CarePlan)", "A larger care plan of which this particular care plan is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf)); 3554 children.add(new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 0, 1, status)); 3555 children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 0, 1, intent)); 3556 children.add(new Property("category", "CodeableConcept", "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.", 0, java.lang.Integer.MAX_VALUE, category)); 3557 children.add(new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title)); 3558 children.add(new Property("description", "string", "A description of the scope and nature of the plan.", 0, 1, description)); 3559 children.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject)); 3560 children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 0, 1, encounter)); 3561 children.add(new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period)); 3562 children.add(new Property("created", "dateTime", "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 0, 1, created)); 3563 children.add(new Property("custodian", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.", 0, 1, custodian)); 3564 children.add(new Property("contributor", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "Identifies the individual(s), organization or device who provided the contents of the care plan.", 0, java.lang.Integer.MAX_VALUE, contributor)); 3565 children.add(new Property("careTeam", "Reference(CareTeam)", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, careTeam)); 3566 children.add(new Property("addresses", "CodeableReference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, addresses)); 3567 children.add(new Property("supportingInfo", "Reference(Any)", "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.", 0, java.lang.Integer.MAX_VALUE, supportingInfo)); 3568 children.add(new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal)); 3569 children.add(new Property("activity", "", "Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.", 0, java.lang.Integer.MAX_VALUE, activity)); 3570 children.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note)); 3571 } 3572 3573 @Override 3574 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3575 switch (_hash) { 3576 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "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.", 0, java.lang.Integer.MAX_VALUE, identifier); 3577 case 8911915: /*instantiatesCanonical*/ return new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 3578 case -1926393373: /*instantiatesUri*/ return new Property("instantiatesUri", "uri", "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.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 3579 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|ServiceRequest|RequestOrchestration|NutritionOrder)", "A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, basedOn); 3580 case -430332865: /*replaces*/ return new Property("replaces", "Reference(CarePlan)", "Completed or terminated care plan whose function is taken by this new care plan.", 0, java.lang.Integer.MAX_VALUE, replaces); 3581 case -995410646: /*partOf*/ return new Property("partOf", "Reference(CarePlan)", "A larger care plan of which this particular care plan is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf); 3582 case -892481550: /*status*/ return new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 0, 1, status); 3583 case -1183762788: /*intent*/ return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 0, 1, intent); 3584 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "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.", 0, java.lang.Integer.MAX_VALUE, category); 3585 case 110371416: /*title*/ return new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title); 3586 case -1724546052: /*description*/ return new Property("description", "string", "A description of the scope and nature of the plan.", 0, 1, description); 3587 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject); 3588 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 0, 1, encounter); 3589 case -991726143: /*period*/ return new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period); 3590 case 1028554472: /*created*/ return new Property("created", "dateTime", "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 0, 1, created); 3591 case 1611297262: /*custodian*/ return new Property("custodian", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.", 0, 1, custodian); 3592 case -1895276325: /*contributor*/ return new Property("contributor", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "Identifies the individual(s), organization or device who provided the contents of the care plan.", 0, java.lang.Integer.MAX_VALUE, contributor); 3593 case -7323378: /*careTeam*/ return new Property("careTeam", "Reference(CareTeam)", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, careTeam); 3594 case 874544034: /*addresses*/ return new Property("addresses", "CodeableReference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, addresses); 3595 case 1922406657: /*supportingInfo*/ return new Property("supportingInfo", "Reference(Any)", "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.", 0, java.lang.Integer.MAX_VALUE, supportingInfo); 3596 case 3178259: /*goal*/ return new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal); 3597 case -1655966961: /*activity*/ return new Property("activity", "", "Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.", 0, java.lang.Integer.MAX_VALUE, activity); 3598 case 3387378: /*note*/ return new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note); 3599 default: return super.getNamedProperty(_hash, _name, _checkValid); 3600 } 3601 3602 } 3603 3604 @Override 3605 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3606 switch (hash) { 3607 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3608 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 3609 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 3610 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 3611 case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference 3612 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 3613 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus> 3614 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<CarePlanIntent> 3615 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 3616 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3617 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3618 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 3619 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 3620 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 3621 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 3622 case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference 3623 case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // Reference 3624 case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference 3625 case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // CodeableReference 3626 case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference 3627 case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference 3628 case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : this.activity.toArray(new Base[this.activity.size()]); // CarePlanActivityComponent 3629 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3630 default: return super.getProperty(hash, name, checkValid); 3631 } 3632 3633 } 3634 3635 @Override 3636 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3637 switch (hash) { 3638 case -1618432855: // identifier 3639 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3640 return value; 3641 case 8911915: // instantiatesCanonical 3642 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType 3643 return value; 3644 case -1926393373: // instantiatesUri 3645 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType 3646 return value; 3647 case -332612366: // basedOn 3648 this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference 3649 return value; 3650 case -430332865: // replaces 3651 this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference 3652 return value; 3653 case -995410646: // partOf 3654 this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference 3655 return value; 3656 case -892481550: // status 3657 value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 3658 this.status = (Enumeration) value; // Enumeration<RequestStatus> 3659 return value; 3660 case -1183762788: // intent 3661 value = new CarePlanIntentEnumFactory().fromType(TypeConvertor.castToCode(value)); 3662 this.intent = (Enumeration) value; // Enumeration<CarePlanIntent> 3663 return value; 3664 case 50511102: // category 3665 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3666 return value; 3667 case 110371416: // title 3668 this.title = TypeConvertor.castToString(value); // StringType 3669 return value; 3670 case -1724546052: // description 3671 this.description = TypeConvertor.castToString(value); // StringType 3672 return value; 3673 case -1867885268: // subject 3674 this.subject = TypeConvertor.castToReference(value); // Reference 3675 return value; 3676 case 1524132147: // encounter 3677 this.encounter = TypeConvertor.castToReference(value); // Reference 3678 return value; 3679 case -991726143: // period 3680 this.period = TypeConvertor.castToPeriod(value); // Period 3681 return value; 3682 case 1028554472: // created 3683 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 3684 return value; 3685 case 1611297262: // custodian 3686 this.custodian = TypeConvertor.castToReference(value); // Reference 3687 return value; 3688 case -1895276325: // contributor 3689 this.getContributor().add(TypeConvertor.castToReference(value)); // Reference 3690 return value; 3691 case -7323378: // careTeam 3692 this.getCareTeam().add(TypeConvertor.castToReference(value)); // Reference 3693 return value; 3694 case 874544034: // addresses 3695 this.getAddresses().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 3696 return value; 3697 case 1922406657: // supportingInfo 3698 this.getSupportingInfo().add(TypeConvertor.castToReference(value)); // Reference 3699 return value; 3700 case 3178259: // goal 3701 this.getGoal().add(TypeConvertor.castToReference(value)); // Reference 3702 return value; 3703 case -1655966961: // activity 3704 this.getActivity().add((CarePlanActivityComponent) value); // CarePlanActivityComponent 3705 return value; 3706 case 3387378: // note 3707 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 3708 return value; 3709 default: return super.setProperty(hash, name, value); 3710 } 3711 3712 } 3713 3714 @Override 3715 public Base setProperty(String name, Base value) throws FHIRException { 3716 if (name.equals("identifier")) { 3717 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 3718 } else if (name.equals("instantiatesCanonical")) { 3719 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); 3720 } else if (name.equals("instantiatesUri")) { 3721 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); 3722 } else if (name.equals("basedOn")) { 3723 this.getBasedOn().add(TypeConvertor.castToReference(value)); 3724 } else if (name.equals("replaces")) { 3725 this.getReplaces().add(TypeConvertor.castToReference(value)); 3726 } else if (name.equals("partOf")) { 3727 this.getPartOf().add(TypeConvertor.castToReference(value)); 3728 } else if (name.equals("status")) { 3729 value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 3730 this.status = (Enumeration) value; // Enumeration<RequestStatus> 3731 } else if (name.equals("intent")) { 3732 value = new CarePlanIntentEnumFactory().fromType(TypeConvertor.castToCode(value)); 3733 this.intent = (Enumeration) value; // Enumeration<CarePlanIntent> 3734 } else if (name.equals("category")) { 3735 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); 3736 } else if (name.equals("title")) { 3737 this.title = TypeConvertor.castToString(value); // StringType 3738 } else if (name.equals("description")) { 3739 this.description = TypeConvertor.castToString(value); // StringType 3740 } else if (name.equals("subject")) { 3741 this.subject = TypeConvertor.castToReference(value); // Reference 3742 } else if (name.equals("encounter")) { 3743 this.encounter = TypeConvertor.castToReference(value); // Reference 3744 } else if (name.equals("period")) { 3745 this.period = TypeConvertor.castToPeriod(value); // Period 3746 } else if (name.equals("created")) { 3747 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 3748 } else if (name.equals("custodian")) { 3749 this.custodian = TypeConvertor.castToReference(value); // Reference 3750 } else if (name.equals("contributor")) { 3751 this.getContributor().add(TypeConvertor.castToReference(value)); 3752 } else if (name.equals("careTeam")) { 3753 this.getCareTeam().add(TypeConvertor.castToReference(value)); 3754 } else if (name.equals("addresses")) { 3755 this.getAddresses().add(TypeConvertor.castToCodeableReference(value)); 3756 } else if (name.equals("supportingInfo")) { 3757 this.getSupportingInfo().add(TypeConvertor.castToReference(value)); 3758 } else if (name.equals("goal")) { 3759 this.getGoal().add(TypeConvertor.castToReference(value)); 3760 } else if (name.equals("activity")) { 3761 this.getActivity().add((CarePlanActivityComponent) value); 3762 } else if (name.equals("note")) { 3763 this.getNote().add(TypeConvertor.castToAnnotation(value)); 3764 } else 3765 return super.setProperty(name, value); 3766 return value; 3767 } 3768 3769 @Override 3770 public Base makeProperty(int hash, String name) throws FHIRException { 3771 switch (hash) { 3772 case -1618432855: return addIdentifier(); 3773 case 8911915: return addInstantiatesCanonicalElement(); 3774 case -1926393373: return addInstantiatesUriElement(); 3775 case -332612366: return addBasedOn(); 3776 case -430332865: return addReplaces(); 3777 case -995410646: return addPartOf(); 3778 case -892481550: return getStatusElement(); 3779 case -1183762788: return getIntentElement(); 3780 case 50511102: return addCategory(); 3781 case 110371416: return getTitleElement(); 3782 case -1724546052: return getDescriptionElement(); 3783 case -1867885268: return getSubject(); 3784 case 1524132147: return getEncounter(); 3785 case -991726143: return getPeriod(); 3786 case 1028554472: return getCreatedElement(); 3787 case 1611297262: return getCustodian(); 3788 case -1895276325: return addContributor(); 3789 case -7323378: return addCareTeam(); 3790 case 874544034: return addAddresses(); 3791 case 1922406657: return addSupportingInfo(); 3792 case 3178259: return addGoal(); 3793 case -1655966961: return addActivity(); 3794 case 3387378: return addNote(); 3795 default: return super.makeProperty(hash, name); 3796 } 3797 3798 } 3799 3800 @Override 3801 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3802 switch (hash) { 3803 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3804 case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"}; 3805 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 3806 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 3807 case -430332865: /*replaces*/ return new String[] {"Reference"}; 3808 case -995410646: /*partOf*/ return new String[] {"Reference"}; 3809 case -892481550: /*status*/ return new String[] {"code"}; 3810 case -1183762788: /*intent*/ return new String[] {"code"}; 3811 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 3812 case 110371416: /*title*/ return new String[] {"string"}; 3813 case -1724546052: /*description*/ return new String[] {"string"}; 3814 case -1867885268: /*subject*/ return new String[] {"Reference"}; 3815 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 3816 case -991726143: /*period*/ return new String[] {"Period"}; 3817 case 1028554472: /*created*/ return new String[] {"dateTime"}; 3818 case 1611297262: /*custodian*/ return new String[] {"Reference"}; 3819 case -1895276325: /*contributor*/ return new String[] {"Reference"}; 3820 case -7323378: /*careTeam*/ return new String[] {"Reference"}; 3821 case 874544034: /*addresses*/ return new String[] {"CodeableReference"}; 3822 case 1922406657: /*supportingInfo*/ return new String[] {"Reference"}; 3823 case 3178259: /*goal*/ return new String[] {"Reference"}; 3824 case -1655966961: /*activity*/ return new String[] {}; 3825 case 3387378: /*note*/ return new String[] {"Annotation"}; 3826 default: return super.getTypesForProperty(hash, name); 3827 } 3828 3829 } 3830 3831 @Override 3832 public Base addChild(String name) throws FHIRException { 3833 if (name.equals("identifier")) { 3834 return addIdentifier(); 3835 } 3836 else if (name.equals("instantiatesCanonical")) { 3837 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.instantiatesCanonical"); 3838 } 3839 else if (name.equals("instantiatesUri")) { 3840 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.instantiatesUri"); 3841 } 3842 else if (name.equals("basedOn")) { 3843 return addBasedOn(); 3844 } 3845 else if (name.equals("replaces")) { 3846 return addReplaces(); 3847 } 3848 else if (name.equals("partOf")) { 3849 return addPartOf(); 3850 } 3851 else if (name.equals("status")) { 3852 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.status"); 3853 } 3854 else if (name.equals("intent")) { 3855 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.intent"); 3856 } 3857 else if (name.equals("category")) { 3858 return addCategory(); 3859 } 3860 else if (name.equals("title")) { 3861 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.title"); 3862 } 3863 else if (name.equals("description")) { 3864 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.description"); 3865 } 3866 else if (name.equals("subject")) { 3867 this.subject = new Reference(); 3868 return this.subject; 3869 } 3870 else if (name.equals("encounter")) { 3871 this.encounter = new Reference(); 3872 return this.encounter; 3873 } 3874 else if (name.equals("period")) { 3875 this.period = new Period(); 3876 return this.period; 3877 } 3878 else if (name.equals("created")) { 3879 throw new FHIRException("Cannot call addChild on a primitive type CarePlan.created"); 3880 } 3881 else if (name.equals("custodian")) { 3882 this.custodian = new Reference(); 3883 return this.custodian; 3884 } 3885 else if (name.equals("contributor")) { 3886 return addContributor(); 3887 } 3888 else if (name.equals("careTeam")) { 3889 return addCareTeam(); 3890 } 3891 else if (name.equals("addresses")) { 3892 return addAddresses(); 3893 } 3894 else if (name.equals("supportingInfo")) { 3895 return addSupportingInfo(); 3896 } 3897 else if (name.equals("goal")) { 3898 return addGoal(); 3899 } 3900 else if (name.equals("activity")) { 3901 return addActivity(); 3902 } 3903 else if (name.equals("note")) { 3904 return addNote(); 3905 } 3906 else 3907 return super.addChild(name); 3908 } 3909 3910 public String fhirType() { 3911 return "CarePlan"; 3912 3913 } 3914 3915 public CarePlan copy() { 3916 CarePlan dst = new CarePlan(); 3917 copyValues(dst); 3918 return dst; 3919 } 3920 3921 public void copyValues(CarePlan dst) { 3922 super.copyValues(dst); 3923 if (identifier != null) { 3924 dst.identifier = new ArrayList<Identifier>(); 3925 for (Identifier i : identifier) 3926 dst.identifier.add(i.copy()); 3927 }; 3928 if (instantiatesCanonical != null) { 3929 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 3930 for (CanonicalType i : instantiatesCanonical) 3931 dst.instantiatesCanonical.add(i.copy()); 3932 }; 3933 if (instantiatesUri != null) { 3934 dst.instantiatesUri = new ArrayList<UriType>(); 3935 for (UriType i : instantiatesUri) 3936 dst.instantiatesUri.add(i.copy()); 3937 }; 3938 if (basedOn != null) { 3939 dst.basedOn = new ArrayList<Reference>(); 3940 for (Reference i : basedOn) 3941 dst.basedOn.add(i.copy()); 3942 }; 3943 if (replaces != null) { 3944 dst.replaces = new ArrayList<Reference>(); 3945 for (Reference i : replaces) 3946 dst.replaces.add(i.copy()); 3947 }; 3948 if (partOf != null) { 3949 dst.partOf = new ArrayList<Reference>(); 3950 for (Reference i : partOf) 3951 dst.partOf.add(i.copy()); 3952 }; 3953 dst.status = status == null ? null : status.copy(); 3954 dst.intent = intent == null ? null : intent.copy(); 3955 if (category != null) { 3956 dst.category = new ArrayList<CodeableConcept>(); 3957 for (CodeableConcept i : category) 3958 dst.category.add(i.copy()); 3959 }; 3960 dst.title = title == null ? null : title.copy(); 3961 dst.description = description == null ? null : description.copy(); 3962 dst.subject = subject == null ? null : subject.copy(); 3963 dst.encounter = encounter == null ? null : encounter.copy(); 3964 dst.period = period == null ? null : period.copy(); 3965 dst.created = created == null ? null : created.copy(); 3966 dst.custodian = custodian == null ? null : custodian.copy(); 3967 if (contributor != null) { 3968 dst.contributor = new ArrayList<Reference>(); 3969 for (Reference i : contributor) 3970 dst.contributor.add(i.copy()); 3971 }; 3972 if (careTeam != null) { 3973 dst.careTeam = new ArrayList<Reference>(); 3974 for (Reference i : careTeam) 3975 dst.careTeam.add(i.copy()); 3976 }; 3977 if (addresses != null) { 3978 dst.addresses = new ArrayList<CodeableReference>(); 3979 for (CodeableReference i : addresses) 3980 dst.addresses.add(i.copy()); 3981 }; 3982 if (supportingInfo != null) { 3983 dst.supportingInfo = new ArrayList<Reference>(); 3984 for (Reference i : supportingInfo) 3985 dst.supportingInfo.add(i.copy()); 3986 }; 3987 if (goal != null) { 3988 dst.goal = new ArrayList<Reference>(); 3989 for (Reference i : goal) 3990 dst.goal.add(i.copy()); 3991 }; 3992 if (activity != null) { 3993 dst.activity = new ArrayList<CarePlanActivityComponent>(); 3994 for (CarePlanActivityComponent i : activity) 3995 dst.activity.add(i.copy()); 3996 }; 3997 if (note != null) { 3998 dst.note = new ArrayList<Annotation>(); 3999 for (Annotation i : note) 4000 dst.note.add(i.copy()); 4001 }; 4002 } 4003 4004 protected CarePlan typedCopy() { 4005 return copy(); 4006 } 4007 4008 @Override 4009 public boolean equalsDeep(Base other_) { 4010 if (!super.equalsDeep(other_)) 4011 return false; 4012 if (!(other_ instanceof CarePlan)) 4013 return false; 4014 CarePlan o = (CarePlan) other_; 4015 return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 4016 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true) 4017 && compareDeep(replaces, o.replaces, true) && compareDeep(partOf, o.partOf, true) && compareDeep(status, o.status, true) 4018 && compareDeep(intent, o.intent, true) && compareDeep(category, o.category, true) && compareDeep(title, o.title, true) 4019 && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) 4020 && compareDeep(period, o.period, true) && compareDeep(created, o.created, true) && compareDeep(custodian, o.custodian, true) 4021 && compareDeep(contributor, o.contributor, true) && compareDeep(careTeam, o.careTeam, true) && compareDeep(addresses, o.addresses, true) 4022 && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(goal, o.goal, true) && compareDeep(activity, o.activity, true) 4023 && compareDeep(note, o.note, true); 4024 } 4025 4026 @Override 4027 public boolean equalsShallow(Base other_) { 4028 if (!super.equalsShallow(other_)) 4029 return false; 4030 if (!(other_ instanceof CarePlan)) 4031 return false; 4032 CarePlan o = (CarePlan) other_; 4033 return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true) 4034 && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(title, o.title, true) 4035 && compareValues(description, o.description, true) && compareValues(created, o.created, true); 4036 } 4037 4038 public boolean isEmpty() { 4039 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical 4040 , instantiatesUri, basedOn, replaces, partOf, status, intent, category, title 4041 , description, subject, encounter, period, created, custodian, contributor, careTeam 4042 , addresses, supportingInfo, goal, activity, note); 4043 } 4044 4045 @Override 4046 public ResourceType getResourceType() { 4047 return ResourceType.CarePlan; 4048 } 4049 4050 /** 4051 * Search parameter: <b>activity-code</b> 4052 * <p> 4053 * Description: <b>Detail type of activity</b><br> 4054 * Type: <b>token</b><br> 4055 * Path: <b>CarePlan.activity.plannedActivityDetail.code</b><br> 4056 * </p> 4057 */ 4058 @SearchParamDefinition(name="activity-code", path="CarePlan.activity.plannedActivityDetail.code", description="Detail type of activity", type="token" ) 4059 public static final String SP_ACTIVITY_CODE = "activity-code"; 4060 /** 4061 * <b>Fluent Client</b> search parameter constant for <b>activity-code</b> 4062 * <p> 4063 * Description: <b>Detail type of activity</b><br> 4064 * Type: <b>token</b><br> 4065 * Path: <b>CarePlan.activity.plannedActivityDetail.code</b><br> 4066 * </p> 4067 */ 4068 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVITY_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVITY_CODE); 4069 4070 /** 4071 * Search parameter: <b>activity-reference</b> 4072 * <p> 4073 * Description: <b>Activity that is intended to be part of the care plan</b><br> 4074 * Type: <b>reference</b><br> 4075 * Path: <b>CarePlan.activity.plannedActivityReference</b><br> 4076 * </p> 4077 */ 4078 @SearchParamDefinition(name="activity-reference", path="CarePlan.activity.plannedActivityReference", description="Activity that is intended to be part of the care plan", type="reference", target={Appointment.class, CommunicationRequest.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, RequestOrchestration.class, ServiceRequest.class, SupplyRequest.class, Task.class, VisionPrescription.class } ) 4079 public static final String SP_ACTIVITY_REFERENCE = "activity-reference"; 4080 /** 4081 * <b>Fluent Client</b> search parameter constant for <b>activity-reference</b> 4082 * <p> 4083 * Description: <b>Activity that is intended to be part of the care plan</b><br> 4084 * Type: <b>reference</b><br> 4085 * Path: <b>CarePlan.activity.plannedActivityReference</b><br> 4086 * </p> 4087 */ 4088 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTIVITY_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTIVITY_REFERENCE); 4089 4090/** 4091 * Constant for fluent queries to be used to add include statements. Specifies 4092 * the path value of "<b>CarePlan:activity-reference</b>". 4093 */ 4094 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTIVITY_REFERENCE = new ca.uhn.fhir.model.api.Include("CarePlan:activity-reference").toLocked(); 4095 4096 /** 4097 * Search parameter: <b>activity-scheduled-date</b> 4098 * <p> 4099 * Description: <b>Specified date occurs within period specified by CarePlan.activity.plannedActivityDetail.scheduled[x]</b><br> 4100 * Type: <b>date</b><br> 4101 * Path: <b>CarePlan.activity.plannedActivityDetail.scheduled.ofType(Timing) | CarePlan.activity.plannedActivityDetail.scheduled.ofType(Period)</b><br> 4102 * </p> 4103 */ 4104 @SearchParamDefinition(name="activity-scheduled-date", path="CarePlan.activity.plannedActivityDetail.scheduled.ofType(Timing) | CarePlan.activity.plannedActivityDetail.scheduled.ofType(Period)", description="Specified date occurs within period specified by CarePlan.activity.plannedActivityDetail.scheduled[x]", type="date" ) 4105 public static final String SP_ACTIVITY_SCHEDULED_DATE = "activity-scheduled-date"; 4106 /** 4107 * <b>Fluent Client</b> search parameter constant for <b>activity-scheduled-date</b> 4108 * <p> 4109 * Description: <b>Specified date occurs within period specified by CarePlan.activity.plannedActivityDetail.scheduled[x]</b><br> 4110 * Type: <b>date</b><br> 4111 * Path: <b>CarePlan.activity.plannedActivityDetail.scheduled.ofType(Timing) | CarePlan.activity.plannedActivityDetail.scheduled.ofType(Period)</b><br> 4112 * </p> 4113 */ 4114 public static final ca.uhn.fhir.rest.gclient.DateClientParam ACTIVITY_SCHEDULED_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ACTIVITY_SCHEDULED_DATE); 4115 4116 /** 4117 * Search parameter: <b>activity-scheduled-string</b> 4118 * <p> 4119 * Description: <b>When activity is to occur</b><br> 4120 * Type: <b>string</b><br> 4121 * Path: <b>CarePlan.activity.plannedActivityDetail.scheduled.ofType(string)</b><br> 4122 * </p> 4123 */ 4124 @SearchParamDefinition(name="activity-scheduled-string", path="CarePlan.activity.plannedActivityDetail.scheduled.ofType(string)", description="When activity is to occur", type="string" ) 4125 public static final String SP_ACTIVITY_SCHEDULED_STRING = "activity-scheduled-string"; 4126 /** 4127 * <b>Fluent Client</b> search parameter constant for <b>activity-scheduled-string</b> 4128 * <p> 4129 * Description: <b>When activity is to occur</b><br> 4130 * Type: <b>string</b><br> 4131 * Path: <b>CarePlan.activity.plannedActivityDetail.scheduled.ofType(string)</b><br> 4132 * </p> 4133 */ 4134 public static final ca.uhn.fhir.rest.gclient.StringClientParam ACTIVITY_SCHEDULED_STRING = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ACTIVITY_SCHEDULED_STRING); 4135 4136 /** 4137 * Search parameter: <b>based-on</b> 4138 * <p> 4139 * Description: <b>Fulfills CarePlan</b><br> 4140 * Type: <b>reference</b><br> 4141 * Path: <b>CarePlan.basedOn</b><br> 4142 * </p> 4143 */ 4144 @SearchParamDefinition(name="based-on", path="CarePlan.basedOn", description="Fulfills CarePlan", type="reference", target={CarePlan.class, NutritionOrder.class, RequestOrchestration.class, ServiceRequest.class } ) 4145 public static final String SP_BASED_ON = "based-on"; 4146 /** 4147 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 4148 * <p> 4149 * Description: <b>Fulfills CarePlan</b><br> 4150 * Type: <b>reference</b><br> 4151 * Path: <b>CarePlan.basedOn</b><br> 4152 * </p> 4153 */ 4154 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 4155 4156/** 4157 * Constant for fluent queries to be used to add include statements. Specifies 4158 * the path value of "<b>CarePlan:based-on</b>". 4159 */ 4160 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("CarePlan:based-on").toLocked(); 4161 4162 /** 4163 * Search parameter: <b>care-team</b> 4164 * <p> 4165 * Description: <b>Who's involved in plan?</b><br> 4166 * Type: <b>reference</b><br> 4167 * Path: <b>CarePlan.careTeam</b><br> 4168 * </p> 4169 */ 4170 @SearchParamDefinition(name="care-team", path="CarePlan.careTeam", description="Who's involved in plan?", type="reference", target={CareTeam.class } ) 4171 public static final String SP_CARE_TEAM = "care-team"; 4172 /** 4173 * <b>Fluent Client</b> search parameter constant for <b>care-team</b> 4174 * <p> 4175 * Description: <b>Who's involved in plan?</b><br> 4176 * Type: <b>reference</b><br> 4177 * Path: <b>CarePlan.careTeam</b><br> 4178 * </p> 4179 */ 4180 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARE_TEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARE_TEAM); 4181 4182/** 4183 * Constant for fluent queries to be used to add include statements. Specifies 4184 * the path value of "<b>CarePlan:care-team</b>". 4185 */ 4186 public static final ca.uhn.fhir.model.api.Include INCLUDE_CARE_TEAM = new ca.uhn.fhir.model.api.Include("CarePlan:care-team").toLocked(); 4187 4188 /** 4189 * Search parameter: <b>category</b> 4190 * <p> 4191 * Description: <b>Type of plan</b><br> 4192 * Type: <b>token</b><br> 4193 * Path: <b>CarePlan.category</b><br> 4194 * </p> 4195 */ 4196 @SearchParamDefinition(name="category", path="CarePlan.category", description="Type of plan", type="token" ) 4197 public static final String SP_CATEGORY = "category"; 4198 /** 4199 * <b>Fluent Client</b> search parameter constant for <b>category</b> 4200 * <p> 4201 * Description: <b>Type of plan</b><br> 4202 * Type: <b>token</b><br> 4203 * Path: <b>CarePlan.category</b><br> 4204 * </p> 4205 */ 4206 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 4207 4208 /** 4209 * Search parameter: <b>condition</b> 4210 * <p> 4211 * Description: <b>Reference to a resource (by instance)</b><br> 4212 * Type: <b>reference</b><br> 4213 * Path: <b>CarePlan.addresses.reference</b><br> 4214 * </p> 4215 */ 4216 @SearchParamDefinition(name="condition", path="CarePlan.addresses.reference", description="Reference to a resource (by instance)", type="reference" ) 4217 public static final String SP_CONDITION = "condition"; 4218 /** 4219 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 4220 * <p> 4221 * Description: <b>Reference to a resource (by instance)</b><br> 4222 * Type: <b>reference</b><br> 4223 * Path: <b>CarePlan.addresses.reference</b><br> 4224 * </p> 4225 */ 4226 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONDITION); 4227 4228/** 4229 * Constant for fluent queries to be used to add include statements. Specifies 4230 * the path value of "<b>CarePlan:condition</b>". 4231 */ 4232 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include("CarePlan:condition").toLocked(); 4233 4234 /** 4235 * Search parameter: <b>custodian</b> 4236 * <p> 4237 * Description: <b>Who is the designated responsible party</b><br> 4238 * Type: <b>reference</b><br> 4239 * Path: <b>CarePlan.custodian</b><br> 4240 * </p> 4241 */ 4242 @SearchParamDefinition(name="custodian", path="CarePlan.custodian", description="Who is the designated responsible party", type="reference", target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 4243 public static final String SP_CUSTODIAN = "custodian"; 4244 /** 4245 * <b>Fluent Client</b> search parameter constant for <b>custodian</b> 4246 * <p> 4247 * Description: <b>Who is the designated responsible party</b><br> 4248 * Type: <b>reference</b><br> 4249 * Path: <b>CarePlan.custodian</b><br> 4250 * </p> 4251 */ 4252 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CUSTODIAN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CUSTODIAN); 4253 4254/** 4255 * Constant for fluent queries to be used to add include statements. Specifies 4256 * the path value of "<b>CarePlan:custodian</b>". 4257 */ 4258 public static final ca.uhn.fhir.model.api.Include INCLUDE_CUSTODIAN = new ca.uhn.fhir.model.api.Include("CarePlan:custodian").toLocked(); 4259 4260 /** 4261 * Search parameter: <b>encounter</b> 4262 * <p> 4263 * Description: <b>The Encounter during which this CarePlan was created</b><br> 4264 * Type: <b>reference</b><br> 4265 * Path: <b>CarePlan.encounter</b><br> 4266 * </p> 4267 */ 4268 @SearchParamDefinition(name="encounter", path="CarePlan.encounter", description="The Encounter during which this CarePlan was created", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } ) 4269 public static final String SP_ENCOUNTER = "encounter"; 4270 /** 4271 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 4272 * <p> 4273 * Description: <b>The Encounter during which this CarePlan was created</b><br> 4274 * Type: <b>reference</b><br> 4275 * Path: <b>CarePlan.encounter</b><br> 4276 * </p> 4277 */ 4278 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 4279 4280/** 4281 * Constant for fluent queries to be used to add include statements. Specifies 4282 * the path value of "<b>CarePlan:encounter</b>". 4283 */ 4284 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("CarePlan:encounter").toLocked(); 4285 4286 /** 4287 * Search parameter: <b>goal</b> 4288 * <p> 4289 * Description: <b>Desired outcome of plan</b><br> 4290 * Type: <b>reference</b><br> 4291 * Path: <b>CarePlan.goal</b><br> 4292 * </p> 4293 */ 4294 @SearchParamDefinition(name="goal", path="CarePlan.goal", description="Desired outcome of plan", type="reference", target={Goal.class } ) 4295 public static final String SP_GOAL = "goal"; 4296 /** 4297 * <b>Fluent Client</b> search parameter constant for <b>goal</b> 4298 * <p> 4299 * Description: <b>Desired outcome of plan</b><br> 4300 * Type: <b>reference</b><br> 4301 * Path: <b>CarePlan.goal</b><br> 4302 * </p> 4303 */ 4304 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GOAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GOAL); 4305 4306/** 4307 * Constant for fluent queries to be used to add include statements. Specifies 4308 * the path value of "<b>CarePlan:goal</b>". 4309 */ 4310 public static final ca.uhn.fhir.model.api.Include INCLUDE_GOAL = new ca.uhn.fhir.model.api.Include("CarePlan:goal").toLocked(); 4311 4312 /** 4313 * Search parameter: <b>instantiates-canonical</b> 4314 * <p> 4315 * Description: <b>Instantiates FHIR protocol or definition</b><br> 4316 * Type: <b>reference</b><br> 4317 * Path: <b>CarePlan.instantiatesCanonical</b><br> 4318 * </p> 4319 */ 4320 @SearchParamDefinition(name="instantiates-canonical", path="CarePlan.instantiatesCanonical", description="Instantiates FHIR protocol or definition", type="reference", target={ActivityDefinition.class, Measure.class, OperationDefinition.class, PlanDefinition.class, Questionnaire.class } ) 4321 public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical"; 4322 /** 4323 * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b> 4324 * <p> 4325 * Description: <b>Instantiates FHIR protocol or definition</b><br> 4326 * Type: <b>reference</b><br> 4327 * Path: <b>CarePlan.instantiatesCanonical</b><br> 4328 * </p> 4329 */ 4330 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL); 4331 4332/** 4333 * Constant for fluent queries to be used to add include statements. Specifies 4334 * the path value of "<b>CarePlan:instantiates-canonical</b>". 4335 */ 4336 public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("CarePlan:instantiates-canonical").toLocked(); 4337 4338 /** 4339 * Search parameter: <b>instantiates-uri</b> 4340 * <p> 4341 * Description: <b>Instantiates external protocol or definition</b><br> 4342 * Type: <b>uri</b><br> 4343 * Path: <b>CarePlan.instantiatesUri</b><br> 4344 * </p> 4345 */ 4346 @SearchParamDefinition(name="instantiates-uri", path="CarePlan.instantiatesUri", description="Instantiates external protocol or definition", type="uri" ) 4347 public static final String SP_INSTANTIATES_URI = "instantiates-uri"; 4348 /** 4349 * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b> 4350 * <p> 4351 * Description: <b>Instantiates external protocol or definition</b><br> 4352 * Type: <b>uri</b><br> 4353 * Path: <b>CarePlan.instantiatesUri</b><br> 4354 * </p> 4355 */ 4356 public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI); 4357 4358 /** 4359 * Search parameter: <b>intent</b> 4360 * <p> 4361 * Description: <b>proposal | plan | order | option | directive</b><br> 4362 * Type: <b>token</b><br> 4363 * Path: <b>CarePlan.intent</b><br> 4364 * </p> 4365 */ 4366 @SearchParamDefinition(name="intent", path="CarePlan.intent", description="proposal | plan | order | option | directive", type="token" ) 4367 public static final String SP_INTENT = "intent"; 4368 /** 4369 * <b>Fluent Client</b> search parameter constant for <b>intent</b> 4370 * <p> 4371 * Description: <b>proposal | plan | order | option | directive</b><br> 4372 * Type: <b>token</b><br> 4373 * Path: <b>CarePlan.intent</b><br> 4374 * </p> 4375 */ 4376 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT); 4377 4378 /** 4379 * Search parameter: <b>part-of</b> 4380 * <p> 4381 * Description: <b>Part of referenced CarePlan</b><br> 4382 * Type: <b>reference</b><br> 4383 * Path: <b>CarePlan.partOf</b><br> 4384 * </p> 4385 */ 4386 @SearchParamDefinition(name="part-of", path="CarePlan.partOf", description="Part of referenced CarePlan", type="reference", target={CarePlan.class } ) 4387 public static final String SP_PART_OF = "part-of"; 4388 /** 4389 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 4390 * <p> 4391 * Description: <b>Part of referenced CarePlan</b><br> 4392 * Type: <b>reference</b><br> 4393 * Path: <b>CarePlan.partOf</b><br> 4394 * </p> 4395 */ 4396 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); 4397 4398/** 4399 * Constant for fluent queries to be used to add include statements. Specifies 4400 * the path value of "<b>CarePlan:part-of</b>". 4401 */ 4402 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("CarePlan:part-of").toLocked(); 4403 4404 /** 4405 * Search parameter: <b>performer</b> 4406 * <p> 4407 * Description: <b>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.)</b><br> 4408 * Type: <b>reference</b><br> 4409 * Path: <b>CarePlan.activity.plannedActivityDetail.performer</b><br> 4410 * </p> 4411 */ 4412 @SearchParamDefinition(name="performer", path="CarePlan.activity.plannedActivityDetail.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={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 4413 public static final String SP_PERFORMER = "performer"; 4414 /** 4415 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 4416 * <p> 4417 * Description: <b>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.)</b><br> 4418 * Type: <b>reference</b><br> 4419 * Path: <b>CarePlan.activity.plannedActivityDetail.performer</b><br> 4420 * </p> 4421 */ 4422 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 4423 4424/** 4425 * Constant for fluent queries to be used to add include statements. Specifies 4426 * the path value of "<b>CarePlan:performer</b>". 4427 */ 4428 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("CarePlan:performer").toLocked(); 4429 4430 /** 4431 * Search parameter: <b>replaces</b> 4432 * <p> 4433 * Description: <b>CarePlan replaced by this CarePlan</b><br> 4434 * Type: <b>reference</b><br> 4435 * Path: <b>CarePlan.replaces</b><br> 4436 * </p> 4437 */ 4438 @SearchParamDefinition(name="replaces", path="CarePlan.replaces", description="CarePlan replaced by this CarePlan", type="reference", target={CarePlan.class } ) 4439 public static final String SP_REPLACES = "replaces"; 4440 /** 4441 * <b>Fluent Client</b> search parameter constant for <b>replaces</b> 4442 * <p> 4443 * Description: <b>CarePlan replaced by this CarePlan</b><br> 4444 * Type: <b>reference</b><br> 4445 * Path: <b>CarePlan.replaces</b><br> 4446 * </p> 4447 */ 4448 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPLACES); 4449 4450/** 4451 * Constant for fluent queries to be used to add include statements. Specifies 4452 * the path value of "<b>CarePlan:replaces</b>". 4453 */ 4454 public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACES = new ca.uhn.fhir.model.api.Include("CarePlan:replaces").toLocked(); 4455 4456 /** 4457 * Search parameter: <b>status</b> 4458 * <p> 4459 * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br> 4460 * Type: <b>token</b><br> 4461 * Path: <b>CarePlan.status</b><br> 4462 * </p> 4463 */ 4464 @SearchParamDefinition(name="status", path="CarePlan.status", description="draft | active | on-hold | revoked | completed | entered-in-error | unknown", type="token" ) 4465 public static final String SP_STATUS = "status"; 4466 /** 4467 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4468 * <p> 4469 * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br> 4470 * Type: <b>token</b><br> 4471 * Path: <b>CarePlan.status</b><br> 4472 * </p> 4473 */ 4474 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4475 4476 /** 4477 * Search parameter: <b>subject</b> 4478 * <p> 4479 * Description: <b>Who the care plan is for</b><br> 4480 * Type: <b>reference</b><br> 4481 * Path: <b>CarePlan.subject</b><br> 4482 * </p> 4483 */ 4484 @SearchParamDefinition(name="subject", path="CarePlan.subject", description="Who the care plan is for", type="reference", target={Group.class, Patient.class } ) 4485 public static final String SP_SUBJECT = "subject"; 4486 /** 4487 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 4488 * <p> 4489 * Description: <b>Who the care plan is for</b><br> 4490 * Type: <b>reference</b><br> 4491 * Path: <b>CarePlan.subject</b><br> 4492 * </p> 4493 */ 4494 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 4495 4496/** 4497 * Constant for fluent queries to be used to add include statements. Specifies 4498 * the path value of "<b>CarePlan:subject</b>". 4499 */ 4500 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CarePlan:subject").toLocked(); 4501 4502 /** 4503 * Search parameter: <b>date</b> 4504 * <p> 4505 * Description: <b>Multiple Resources: 4506 4507* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 4508* [CarePlan](careplan.html): Time period plan covers 4509* [CareTeam](careteam.html): A date within the coverage time period. 4510* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 4511* [Composition](composition.html): Composition editing time 4512* [Consent](consent.html): When consent was agreed to 4513* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 4514* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted 4515* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 4516* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 4517* [Flag](flag.html): Time period when flag is active 4518* [Immunization](immunization.html): Vaccination (non)-Administration Date 4519* [List](list.html): When the list was prepared 4520* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 4521* [Procedure](procedure.html): When the procedure occurred or is occurring 4522* [RiskAssessment](riskassessment.html): When was assessment made? 4523* [SupplyRequest](supplyrequest.html): When the request was made 4524</b><br> 4525 * Type: <b>date</b><br> 4526 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 4527 * </p> 4528 */ 4529 @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) 4530 public static final String SP_DATE = "date"; 4531 /** 4532 * <b>Fluent Client</b> search parameter constant for <b>date</b> 4533 * <p> 4534 * Description: <b>Multiple Resources: 4535 4536* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 4537* [CarePlan](careplan.html): Time period plan covers 4538* [CareTeam](careteam.html): A date within the coverage time period. 4539* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 4540* [Composition](composition.html): Composition editing time 4541* [Consent](consent.html): When consent was agreed to 4542* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 4543* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted 4544* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 4545* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 4546* [Flag](flag.html): Time period when flag is active 4547* [Immunization](immunization.html): Vaccination (non)-Administration Date 4548* [List](list.html): When the list was prepared 4549* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 4550* [Procedure](procedure.html): When the procedure occurred or is occurring 4551* [RiskAssessment](riskassessment.html): When was assessment made? 4552* [SupplyRequest](supplyrequest.html): When the request was made 4553</b><br> 4554 * Type: <b>date</b><br> 4555 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 4556 * </p> 4557 */ 4558 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 4559 4560 /** 4561 * Search parameter: <b>identifier</b> 4562 * <p> 4563 * Description: <b>Multiple Resources: 4564 4565* [AllergyIntolerance](allergyintolerance.html): External ids for this item 4566* [CarePlan](careplan.html): External Ids for this plan 4567* [CareTeam](careteam.html): External Ids for this team 4568* [Composition](composition.html): Version-independent identifier for the Composition 4569* [Condition](condition.html): A unique identifier of the condition record 4570* [Consent](consent.html): Identifier for this record (external references) 4571* [DetectedIssue](detectedissue.html): Unique id for the detected issue 4572* [DeviceRequest](devicerequest.html): Business identifier for request/order 4573* [DiagnosticReport](diagnosticreport.html): An identifier for the report 4574* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 4575* [DocumentReference](documentreference.html): Identifier of the attachment binary 4576* [Encounter](encounter.html): Identifier(s) by which this encounter is known 4577* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 4578* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 4579* [Goal](goal.html): External Ids for this goal 4580* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 4581* [Immunization](immunization.html): Business identifier 4582* [List](list.html): Business identifier 4583* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 4584* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 4585* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 4586* [MedicationUsage](medicationusage.html): Return statements with this external identifier 4587* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 4588* [Observation](observation.html): The unique id for a particular observation 4589* [Procedure](procedure.html): A unique identifier for a procedure 4590* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 4591* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 4592* [SupplyDelivery](supplydelivery.html): External identifier 4593* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 4594* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 4595</b><br> 4596 * Type: <b>token</b><br> 4597 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 4598 * </p> 4599 */ 4600 @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 4601 public static final String SP_IDENTIFIER = "identifier"; 4602 /** 4603 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4604 * <p> 4605 * Description: <b>Multiple Resources: 4606 4607* [AllergyIntolerance](allergyintolerance.html): External ids for this item 4608* [CarePlan](careplan.html): External Ids for this plan 4609* [CareTeam](careteam.html): External Ids for this team 4610* [Composition](composition.html): Version-independent identifier for the Composition 4611* [Condition](condition.html): A unique identifier of the condition record 4612* [Consent](consent.html): Identifier for this record (external references) 4613* [DetectedIssue](detectedissue.html): Unique id for the detected issue 4614* [DeviceRequest](devicerequest.html): Business identifier for request/order 4615* [DiagnosticReport](diagnosticreport.html): An identifier for the report 4616* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 4617* [DocumentReference](documentreference.html): Identifier of the attachment binary 4618* [Encounter](encounter.html): Identifier(s) by which this encounter is known 4619* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 4620* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 4621* [Goal](goal.html): External Ids for this goal 4622* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 4623* [Immunization](immunization.html): Business identifier 4624* [List](list.html): Business identifier 4625* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 4626* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 4627* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 4628* [MedicationUsage](medicationusage.html): Return statements with this external identifier 4629* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 4630* [Observation](observation.html): The unique id for a particular observation 4631* [Procedure](procedure.html): A unique identifier for a procedure 4632* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 4633* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 4634* [SupplyDelivery](supplydelivery.html): External identifier 4635* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 4636* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 4637</b><br> 4638 * Type: <b>token</b><br> 4639 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 4640 * </p> 4641 */ 4642 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 4643 4644 /** 4645 * Search parameter: <b>patient</b> 4646 * <p> 4647 * Description: <b>Multiple Resources: 4648 4649* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 4650* [CarePlan](careplan.html): Who the care plan is for 4651* [CareTeam](careteam.html): Who care team is for 4652* [ClinicalImpression](clinicalimpression.html): Patient assessed 4653* [Composition](composition.html): Who and/or what the composition is about 4654* [Condition](condition.html): Who has the condition? 4655* [Consent](consent.html): Who the consent applies to 4656* [DetectedIssue](detectedissue.html): Associated patient 4657* [DeviceRequest](devicerequest.html): Individual the service is ordered for 4658* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 4659* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 4660* [DocumentManifest](documentmanifest.html): The subject of the set of documents 4661* [DocumentReference](documentreference.html): Who/what is the subject of the document 4662* [Encounter](encounter.html): The patient present at the encounter 4663* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 4664* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 4665* [Flag](flag.html): The identity of a subject to list flags for 4666* [Goal](goal.html): Who this goal is intended for 4667* [ImagingStudy](imagingstudy.html): Who the study is about 4668* [Immunization](immunization.html): The patient for the vaccination record 4669* [List](list.html): If all resources have the same subject 4670* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 4671* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 4672* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 4673* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 4674* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 4675* [Observation](observation.html): The subject that the observation is about (if patient) 4676* [Procedure](procedure.html): Search by subject - a patient 4677* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 4678* [ServiceRequest](servicerequest.html): Search by subject - a patient 4679* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 4680* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 4681* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 4682</b><br> 4683 * Type: <b>reference</b><br> 4684 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient</b><br> 4685 * </p> 4686 */ 4687 @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={BiologicallyDerivedProduct.class, Device.class, Group.class, Location.class, Medication.class, NutritionProduct.class, Organization.class, Patient.class, Practitioner.class, Procedure.class, Substance.class } ) 4688 public static final String SP_PATIENT = "patient"; 4689 /** 4690 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4691 * <p> 4692 * Description: <b>Multiple Resources: 4693 4694* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 4695* [CarePlan](careplan.html): Who the care plan is for 4696* [CareTeam](careteam.html): Who care team is for 4697* [ClinicalImpression](clinicalimpression.html): Patient assessed 4698* [Composition](composition.html): Who and/or what the composition is about 4699* [Condition](condition.html): Who has the condition? 4700* [Consent](consent.html): Who the consent applies to 4701* [DetectedIssue](detectedissue.html): Associated patient 4702* [DeviceRequest](devicerequest.html): Individual the service is ordered for 4703* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 4704* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 4705* [DocumentManifest](documentmanifest.html): The subject of the set of documents 4706* [DocumentReference](documentreference.html): Who/what is the subject of the document 4707* [Encounter](encounter.html): The patient present at the encounter 4708* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 4709* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 4710* [Flag](flag.html): The identity of a subject to list flags for 4711* [Goal](goal.html): Who this goal is intended for 4712* [ImagingStudy](imagingstudy.html): Who the study is about 4713* [Immunization](immunization.html): The patient for the vaccination record 4714* [List](list.html): If all resources have the same subject 4715* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 4716* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 4717* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 4718* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 4719* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 4720* [Observation](observation.html): The subject that the observation is about (if patient) 4721* [Procedure](procedure.html): Search by subject - a patient 4722* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 4723* [ServiceRequest](servicerequest.html): Search by subject - a patient 4724* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 4725* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 4726* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 4727</b><br> 4728 * Type: <b>reference</b><br> 4729 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient</b><br> 4730 * </p> 4731 */ 4732 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4733 4734/** 4735 * Constant for fluent queries to be used to add include statements. Specifies 4736 * the path value of "<b>CarePlan:patient</b>". 4737 */ 4738 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CarePlan:patient").toLocked(); 4739 4740 4741}