001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import org.hl7.fhir.r4.model.Enumerations.*; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. 051 */ 052@ResourceDef(name="PlanDefinition", profile="http://hl7.org/fhir/StructureDefinition/PlanDefinition") 053@ChildOrder(names={"url", "identifier", "version", "name", "title", "subtitle", "type", "status", "experimental", "subject[x]", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "usage", "copyright", "approvalDate", "lastReviewDate", "effectivePeriod", "topic", "author", "editor", "reviewer", "endorser", "relatedArtifact", "library", "goal", "action"}) 054public class PlanDefinition extends MetadataResource { 055 056 public enum RequestPriority { 057 /** 058 * The request has normal priority. 059 */ 060 ROUTINE, 061 /** 062 * The request should be actioned promptly - higher priority than routine. 063 */ 064 URGENT, 065 /** 066 * The request should be actioned as soon as possible - higher priority than urgent. 067 */ 068 ASAP, 069 /** 070 * The request should be actioned immediately - highest possible priority. E.g. an emergency. 071 */ 072 STAT, 073 /** 074 * added to help the parsers with the generic types 075 */ 076 NULL; 077 public static RequestPriority fromCode(String codeString) throws FHIRException { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("routine".equals(codeString)) 081 return ROUTINE; 082 if ("urgent".equals(codeString)) 083 return URGENT; 084 if ("asap".equals(codeString)) 085 return ASAP; 086 if ("stat".equals(codeString)) 087 return STAT; 088 if (Configuration.isAcceptInvalidEnums()) 089 return null; 090 else 091 throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); 092 } 093 public String toCode() { 094 switch (this) { 095 case ROUTINE: return "routine"; 096 case URGENT: return "urgent"; 097 case ASAP: return "asap"; 098 case STAT: return "stat"; 099 case NULL: return null; 100 default: return "?"; 101 } 102 } 103 public String getSystem() { 104 switch (this) { 105 case ROUTINE: return "http://hl7.org/fhir/request-priority"; 106 case URGENT: return "http://hl7.org/fhir/request-priority"; 107 case ASAP: return "http://hl7.org/fhir/request-priority"; 108 case STAT: return "http://hl7.org/fhir/request-priority"; 109 case NULL: return null; 110 default: return "?"; 111 } 112 } 113 public String getDefinition() { 114 switch (this) { 115 case ROUTINE: return "The request has normal priority."; 116 case URGENT: return "The request should be actioned promptly - higher priority than routine."; 117 case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent."; 118 case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency."; 119 case NULL: return null; 120 default: return "?"; 121 } 122 } 123 public String getDisplay() { 124 switch (this) { 125 case ROUTINE: return "Routine"; 126 case URGENT: return "Urgent"; 127 case ASAP: return "ASAP"; 128 case STAT: return "STAT"; 129 case NULL: return null; 130 default: return "?"; 131 } 132 } 133 } 134 135 public static class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> { 136 public RequestPriority fromCode(String codeString) throws IllegalArgumentException { 137 if (codeString == null || "".equals(codeString)) 138 if (codeString == null || "".equals(codeString)) 139 return null; 140 if ("routine".equals(codeString)) 141 return RequestPriority.ROUTINE; 142 if ("urgent".equals(codeString)) 143 return RequestPriority.URGENT; 144 if ("asap".equals(codeString)) 145 return RequestPriority.ASAP; 146 if ("stat".equals(codeString)) 147 return RequestPriority.STAT; 148 throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'"); 149 } 150 public Enumeration<RequestPriority> fromType(Base code) throws FHIRException { 151 if (code == null) 152 return null; 153 if (code.isEmpty()) 154 return new Enumeration<RequestPriority>(this); 155 String codeString = ((PrimitiveType) code).asStringValue(); 156 if (codeString == null || "".equals(codeString)) 157 return null; 158 if ("routine".equals(codeString)) 159 return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE); 160 if ("urgent".equals(codeString)) 161 return new Enumeration<RequestPriority>(this, RequestPriority.URGENT); 162 if ("asap".equals(codeString)) 163 return new Enumeration<RequestPriority>(this, RequestPriority.ASAP); 164 if ("stat".equals(codeString)) 165 return new Enumeration<RequestPriority>(this, RequestPriority.STAT); 166 throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); 167 } 168 public String toCode(RequestPriority code) { 169 if (code == RequestPriority.ROUTINE) 170 return "routine"; 171 if (code == RequestPriority.URGENT) 172 return "urgent"; 173 if (code == RequestPriority.ASAP) 174 return "asap"; 175 if (code == RequestPriority.STAT) 176 return "stat"; 177 return "?"; 178 } 179 public String toSystem(RequestPriority code) { 180 return code.getSystem(); 181 } 182 } 183 184 public enum ActionConditionKind { 185 /** 186 * The condition describes whether or not a given action is applicable. 187 */ 188 APPLICABILITY, 189 /** 190 * The condition is a starting condition for the action. 191 */ 192 START, 193 /** 194 * The condition is a stop, or exit condition for the action. 195 */ 196 STOP, 197 /** 198 * added to help the parsers with the generic types 199 */ 200 NULL; 201 public static ActionConditionKind fromCode(String codeString) throws FHIRException { 202 if (codeString == null || "".equals(codeString)) 203 return null; 204 if ("applicability".equals(codeString)) 205 return APPLICABILITY; 206 if ("start".equals(codeString)) 207 return START; 208 if ("stop".equals(codeString)) 209 return STOP; 210 if (Configuration.isAcceptInvalidEnums()) 211 return null; 212 else 213 throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); 214 } 215 public String toCode() { 216 switch (this) { 217 case APPLICABILITY: return "applicability"; 218 case START: return "start"; 219 case STOP: return "stop"; 220 case NULL: return null; 221 default: return "?"; 222 } 223 } 224 public String getSystem() { 225 switch (this) { 226 case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind"; 227 case START: return "http://hl7.org/fhir/action-condition-kind"; 228 case STOP: return "http://hl7.org/fhir/action-condition-kind"; 229 case NULL: return null; 230 default: return "?"; 231 } 232 } 233 public String getDefinition() { 234 switch (this) { 235 case APPLICABILITY: return "The condition describes whether or not a given action is applicable."; 236 case START: return "The condition is a starting condition for the action."; 237 case STOP: return "The condition is a stop, or exit condition for the action."; 238 case NULL: return null; 239 default: return "?"; 240 } 241 } 242 public String getDisplay() { 243 switch (this) { 244 case APPLICABILITY: return "Applicability"; 245 case START: return "Start"; 246 case STOP: return "Stop"; 247 case NULL: return null; 248 default: return "?"; 249 } 250 } 251 } 252 253 public static class ActionConditionKindEnumFactory implements EnumFactory<ActionConditionKind> { 254 public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException { 255 if (codeString == null || "".equals(codeString)) 256 if (codeString == null || "".equals(codeString)) 257 return null; 258 if ("applicability".equals(codeString)) 259 return ActionConditionKind.APPLICABILITY; 260 if ("start".equals(codeString)) 261 return ActionConditionKind.START; 262 if ("stop".equals(codeString)) 263 return ActionConditionKind.STOP; 264 throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'"); 265 } 266 public Enumeration<ActionConditionKind> fromType(Base code) throws FHIRException { 267 if (code == null) 268 return null; 269 if (code.isEmpty()) 270 return new Enumeration<ActionConditionKind>(this); 271 String codeString = ((PrimitiveType) code).asStringValue(); 272 if (codeString == null || "".equals(codeString)) 273 return null; 274 if ("applicability".equals(codeString)) 275 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.APPLICABILITY); 276 if ("start".equals(codeString)) 277 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.START); 278 if ("stop".equals(codeString)) 279 return new Enumeration<ActionConditionKind>(this, ActionConditionKind.STOP); 280 throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); 281 } 282 public String toCode(ActionConditionKind code) { 283 if (code == ActionConditionKind.APPLICABILITY) 284 return "applicability"; 285 if (code == ActionConditionKind.START) 286 return "start"; 287 if (code == ActionConditionKind.STOP) 288 return "stop"; 289 return "?"; 290 } 291 public String toSystem(ActionConditionKind code) { 292 return code.getSystem(); 293 } 294 } 295 296 public enum ActionRelationshipType { 297 /** 298 * The action must be performed before the start of the related action. 299 */ 300 BEFORESTART, 301 /** 302 * The action must be performed before the related action. 303 */ 304 BEFORE, 305 /** 306 * The action must be performed before the end of the related action. 307 */ 308 BEFOREEND, 309 /** 310 * The action must be performed concurrent with the start of the related action. 311 */ 312 CONCURRENTWITHSTART, 313 /** 314 * The action must be performed concurrent with the related action. 315 */ 316 CONCURRENT, 317 /** 318 * The action must be performed concurrent with the end of the related action. 319 */ 320 CONCURRENTWITHEND, 321 /** 322 * The action must be performed after the start of the related action. 323 */ 324 AFTERSTART, 325 /** 326 * The action must be performed after the related action. 327 */ 328 AFTER, 329 /** 330 * The action must be performed after the end of the related action. 331 */ 332 AFTEREND, 333 /** 334 * added to help the parsers with the generic types 335 */ 336 NULL; 337 public static ActionRelationshipType fromCode(String codeString) throws FHIRException { 338 if (codeString == null || "".equals(codeString)) 339 return null; 340 if ("before-start".equals(codeString)) 341 return BEFORESTART; 342 if ("before".equals(codeString)) 343 return BEFORE; 344 if ("before-end".equals(codeString)) 345 return BEFOREEND; 346 if ("concurrent-with-start".equals(codeString)) 347 return CONCURRENTWITHSTART; 348 if ("concurrent".equals(codeString)) 349 return CONCURRENT; 350 if ("concurrent-with-end".equals(codeString)) 351 return CONCURRENTWITHEND; 352 if ("after-start".equals(codeString)) 353 return AFTERSTART; 354 if ("after".equals(codeString)) 355 return AFTER; 356 if ("after-end".equals(codeString)) 357 return AFTEREND; 358 if (Configuration.isAcceptInvalidEnums()) 359 return null; 360 else 361 throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); 362 } 363 public String toCode() { 364 switch (this) { 365 case BEFORESTART: return "before-start"; 366 case BEFORE: return "before"; 367 case BEFOREEND: return "before-end"; 368 case CONCURRENTWITHSTART: return "concurrent-with-start"; 369 case CONCURRENT: return "concurrent"; 370 case CONCURRENTWITHEND: return "concurrent-with-end"; 371 case AFTERSTART: return "after-start"; 372 case AFTER: return "after"; 373 case AFTEREND: return "after-end"; 374 case NULL: return null; 375 default: return "?"; 376 } 377 } 378 public String getSystem() { 379 switch (this) { 380 case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type"; 381 case BEFORE: return "http://hl7.org/fhir/action-relationship-type"; 382 case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type"; 383 case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type"; 384 case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type"; 385 case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type"; 386 case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type"; 387 case AFTER: return "http://hl7.org/fhir/action-relationship-type"; 388 case AFTEREND: return "http://hl7.org/fhir/action-relationship-type"; 389 case NULL: return null; 390 default: return "?"; 391 } 392 } 393 public String getDefinition() { 394 switch (this) { 395 case BEFORESTART: return "The action must be performed before the start of the related action."; 396 case BEFORE: return "The action must be performed before the related action."; 397 case BEFOREEND: return "The action must be performed before the end of the related action."; 398 case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action."; 399 case CONCURRENT: return "The action must be performed concurrent with the related action."; 400 case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action."; 401 case AFTERSTART: return "The action must be performed after the start of the related action."; 402 case AFTER: return "The action must be performed after the related action."; 403 case AFTEREND: return "The action must be performed after the end of the related action."; 404 case NULL: return null; 405 default: return "?"; 406 } 407 } 408 public String getDisplay() { 409 switch (this) { 410 case BEFORESTART: return "Before Start"; 411 case BEFORE: return "Before"; 412 case BEFOREEND: return "Before End"; 413 case CONCURRENTWITHSTART: return "Concurrent With Start"; 414 case CONCURRENT: return "Concurrent"; 415 case CONCURRENTWITHEND: return "Concurrent With End"; 416 case AFTERSTART: return "After Start"; 417 case AFTER: return "After"; 418 case AFTEREND: return "After End"; 419 case NULL: return null; 420 default: return "?"; 421 } 422 } 423 } 424 425 public static class ActionRelationshipTypeEnumFactory implements EnumFactory<ActionRelationshipType> { 426 public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException { 427 if (codeString == null || "".equals(codeString)) 428 if (codeString == null || "".equals(codeString)) 429 return null; 430 if ("before-start".equals(codeString)) 431 return ActionRelationshipType.BEFORESTART; 432 if ("before".equals(codeString)) 433 return ActionRelationshipType.BEFORE; 434 if ("before-end".equals(codeString)) 435 return ActionRelationshipType.BEFOREEND; 436 if ("concurrent-with-start".equals(codeString)) 437 return ActionRelationshipType.CONCURRENTWITHSTART; 438 if ("concurrent".equals(codeString)) 439 return ActionRelationshipType.CONCURRENT; 440 if ("concurrent-with-end".equals(codeString)) 441 return ActionRelationshipType.CONCURRENTWITHEND; 442 if ("after-start".equals(codeString)) 443 return ActionRelationshipType.AFTERSTART; 444 if ("after".equals(codeString)) 445 return ActionRelationshipType.AFTER; 446 if ("after-end".equals(codeString)) 447 return ActionRelationshipType.AFTEREND; 448 throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'"); 449 } 450 public Enumeration<ActionRelationshipType> fromType(Base code) throws FHIRException { 451 if (code == null) 452 return null; 453 if (code.isEmpty()) 454 return new Enumeration<ActionRelationshipType>(this); 455 String codeString = ((PrimitiveType) code).asStringValue(); 456 if (codeString == null || "".equals(codeString)) 457 return null; 458 if ("before-start".equals(codeString)) 459 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORESTART); 460 if ("before".equals(codeString)) 461 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORE); 462 if ("before-end".equals(codeString)) 463 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFOREEND); 464 if ("concurrent-with-start".equals(codeString)) 465 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHSTART); 466 if ("concurrent".equals(codeString)) 467 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENT); 468 if ("concurrent-with-end".equals(codeString)) 469 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHEND); 470 if ("after-start".equals(codeString)) 471 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTERSTART); 472 if ("after".equals(codeString)) 473 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTER); 474 if ("after-end".equals(codeString)) 475 return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTEREND); 476 throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); 477 } 478 public String toCode(ActionRelationshipType code) { 479 if (code == ActionRelationshipType.BEFORESTART) 480 return "before-start"; 481 if (code == ActionRelationshipType.BEFORE) 482 return "before"; 483 if (code == ActionRelationshipType.BEFOREEND) 484 return "before-end"; 485 if (code == ActionRelationshipType.CONCURRENTWITHSTART) 486 return "concurrent-with-start"; 487 if (code == ActionRelationshipType.CONCURRENT) 488 return "concurrent"; 489 if (code == ActionRelationshipType.CONCURRENTWITHEND) 490 return "concurrent-with-end"; 491 if (code == ActionRelationshipType.AFTERSTART) 492 return "after-start"; 493 if (code == ActionRelationshipType.AFTER) 494 return "after"; 495 if (code == ActionRelationshipType.AFTEREND) 496 return "after-end"; 497 return "?"; 498 } 499 public String toSystem(ActionRelationshipType code) { 500 return code.getSystem(); 501 } 502 } 503 504 public enum ActionParticipantType { 505 /** 506 * The participant is the patient under evaluation. 507 */ 508 PATIENT, 509 /** 510 * The participant is a practitioner involved in the patient's care. 511 */ 512 PRACTITIONER, 513 /** 514 * The participant is a person related to the patient. 515 */ 516 RELATEDPERSON, 517 /** 518 * The participant is a system or device used in the care of the patient. 519 */ 520 DEVICE, 521 /** 522 * added to help the parsers with the generic types 523 */ 524 NULL; 525 public static ActionParticipantType fromCode(String codeString) throws FHIRException { 526 if (codeString == null || "".equals(codeString)) 527 return null; 528 if ("patient".equals(codeString)) 529 return PATIENT; 530 if ("practitioner".equals(codeString)) 531 return PRACTITIONER; 532 if ("related-person".equals(codeString)) 533 return RELATEDPERSON; 534 if ("device".equals(codeString)) 535 return DEVICE; 536 if (Configuration.isAcceptInvalidEnums()) 537 return null; 538 else 539 throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'"); 540 } 541 public String toCode() { 542 switch (this) { 543 case PATIENT: return "patient"; 544 case PRACTITIONER: return "practitioner"; 545 case RELATEDPERSON: return "related-person"; 546 case DEVICE: return "device"; 547 case NULL: return null; 548 default: return "?"; 549 } 550 } 551 public String getSystem() { 552 switch (this) { 553 case PATIENT: return "http://hl7.org/fhir/action-participant-type"; 554 case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type"; 555 case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type"; 556 case DEVICE: return "http://hl7.org/fhir/action-participant-type"; 557 case NULL: return null; 558 default: return "?"; 559 } 560 } 561 public String getDefinition() { 562 switch (this) { 563 case PATIENT: return "The participant is the patient under evaluation."; 564 case PRACTITIONER: return "The participant is a practitioner involved in the patient's care."; 565 case RELATEDPERSON: return "The participant is a person related to the patient."; 566 case DEVICE: return "The participant is a system or device used in the care of the patient."; 567 case NULL: return null; 568 default: return "?"; 569 } 570 } 571 public String getDisplay() { 572 switch (this) { 573 case PATIENT: return "Patient"; 574 case PRACTITIONER: return "Practitioner"; 575 case RELATEDPERSON: return "Related Person"; 576 case DEVICE: return "Device"; 577 case NULL: return null; 578 default: return "?"; 579 } 580 } 581 } 582 583 public static class ActionParticipantTypeEnumFactory implements EnumFactory<ActionParticipantType> { 584 public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException { 585 if (codeString == null || "".equals(codeString)) 586 if (codeString == null || "".equals(codeString)) 587 return null; 588 if ("patient".equals(codeString)) 589 return ActionParticipantType.PATIENT; 590 if ("practitioner".equals(codeString)) 591 return ActionParticipantType.PRACTITIONER; 592 if ("related-person".equals(codeString)) 593 return ActionParticipantType.RELATEDPERSON; 594 if ("device".equals(codeString)) 595 return ActionParticipantType.DEVICE; 596 throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'"); 597 } 598 public Enumeration<ActionParticipantType> fromType(Base code) throws FHIRException { 599 if (code == null) 600 return null; 601 if (code.isEmpty()) 602 return new Enumeration<ActionParticipantType>(this); 603 String codeString = ((PrimitiveType) code).asStringValue(); 604 if (codeString == null || "".equals(codeString)) 605 return null; 606 if ("patient".equals(codeString)) 607 return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PATIENT); 608 if ("practitioner".equals(codeString)) 609 return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONER); 610 if ("related-person".equals(codeString)) 611 return new Enumeration<ActionParticipantType>(this, ActionParticipantType.RELATEDPERSON); 612 if ("device".equals(codeString)) 613 return new Enumeration<ActionParticipantType>(this, ActionParticipantType.DEVICE); 614 throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'"); 615 } 616 public String toCode(ActionParticipantType code) { 617 if (code == ActionParticipantType.PATIENT) 618 return "patient"; 619 if (code == ActionParticipantType.PRACTITIONER) 620 return "practitioner"; 621 if (code == ActionParticipantType.RELATEDPERSON) 622 return "related-person"; 623 if (code == ActionParticipantType.DEVICE) 624 return "device"; 625 return "?"; 626 } 627 public String toSystem(ActionParticipantType code) { 628 return code.getSystem(); 629 } 630 } 631 632 public enum ActionGroupingBehavior { 633 /** 634 * Any group marked with this behavior should be displayed as a visual group to the end user. 635 */ 636 VISUALGROUP, 637 /** 638 * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so. 639 */ 640 LOGICALGROUP, 641 /** 642 * A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne". 643 */ 644 SENTENCEGROUP, 645 /** 646 * added to help the parsers with the generic types 647 */ 648 NULL; 649 public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException { 650 if (codeString == null || "".equals(codeString)) 651 return null; 652 if ("visual-group".equals(codeString)) 653 return VISUALGROUP; 654 if ("logical-group".equals(codeString)) 655 return LOGICALGROUP; 656 if ("sentence-group".equals(codeString)) 657 return SENTENCEGROUP; 658 if (Configuration.isAcceptInvalidEnums()) 659 return null; 660 else 661 throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 662 } 663 public String toCode() { 664 switch (this) { 665 case VISUALGROUP: return "visual-group"; 666 case LOGICALGROUP: return "logical-group"; 667 case SENTENCEGROUP: return "sentence-group"; 668 case NULL: return null; 669 default: return "?"; 670 } 671 } 672 public String getSystem() { 673 switch (this) { 674 case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 675 case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 676 case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior"; 677 case NULL: return null; 678 default: return "?"; 679 } 680 } 681 public String getDefinition() { 682 switch (this) { 683 case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user."; 684 case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so."; 685 case SENTENCEGROUP: return "A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required action, in which case, it would be \"ExactlyOne\"."; 686 case NULL: return null; 687 default: return "?"; 688 } 689 } 690 public String getDisplay() { 691 switch (this) { 692 case VISUALGROUP: return "Visual Group"; 693 case LOGICALGROUP: return "Logical Group"; 694 case SENTENCEGROUP: return "Sentence Group"; 695 case NULL: return null; 696 default: return "?"; 697 } 698 } 699 } 700 701 public static class ActionGroupingBehaviorEnumFactory implements EnumFactory<ActionGroupingBehavior> { 702 public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException { 703 if (codeString == null || "".equals(codeString)) 704 if (codeString == null || "".equals(codeString)) 705 return null; 706 if ("visual-group".equals(codeString)) 707 return ActionGroupingBehavior.VISUALGROUP; 708 if ("logical-group".equals(codeString)) 709 return ActionGroupingBehavior.LOGICALGROUP; 710 if ("sentence-group".equals(codeString)) 711 return ActionGroupingBehavior.SENTENCEGROUP; 712 throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 713 } 714 public Enumeration<ActionGroupingBehavior> fromType(Base code) throws FHIRException { 715 if (code == null) 716 return null; 717 if (code.isEmpty()) 718 return new Enumeration<ActionGroupingBehavior>(this); 719 String codeString = ((PrimitiveType) code).asStringValue(); 720 if (codeString == null || "".equals(codeString)) 721 return null; 722 if ("visual-group".equals(codeString)) 723 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.VISUALGROUP); 724 if ("logical-group".equals(codeString)) 725 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.LOGICALGROUP); 726 if ("sentence-group".equals(codeString)) 727 return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.SENTENCEGROUP); 728 throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); 729 } 730 public String toCode(ActionGroupingBehavior code) { 731 if (code == ActionGroupingBehavior.VISUALGROUP) 732 return "visual-group"; 733 if (code == ActionGroupingBehavior.LOGICALGROUP) 734 return "logical-group"; 735 if (code == ActionGroupingBehavior.SENTENCEGROUP) 736 return "sentence-group"; 737 return "?"; 738 } 739 public String toSystem(ActionGroupingBehavior code) { 740 return code.getSystem(); 741 } 742 } 743 744 public enum ActionSelectionBehavior { 745 /** 746 * Any number of the actions in the group may be chosen, from zero to all. 747 */ 748 ANY, 749 /** 750 * All the actions in the group must be selected as a single unit. 751 */ 752 ALL, 753 /** 754 * All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected. 755 */ 756 ALLORNONE, 757 /** 758 * The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group. 759 */ 760 EXACTLYONE, 761 /** 762 * The end user may choose zero or at most one of the actions in the group. 763 */ 764 ATMOSTONE, 765 /** 766 * The end user must choose a minimum of one, and as many additional as desired. 767 */ 768 ONEORMORE, 769 /** 770 * added to help the parsers with the generic types 771 */ 772 NULL; 773 public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException { 774 if (codeString == null || "".equals(codeString)) 775 return null; 776 if ("any".equals(codeString)) 777 return ANY; 778 if ("all".equals(codeString)) 779 return ALL; 780 if ("all-or-none".equals(codeString)) 781 return ALLORNONE; 782 if ("exactly-one".equals(codeString)) 783 return EXACTLYONE; 784 if ("at-most-one".equals(codeString)) 785 return ATMOSTONE; 786 if ("one-or-more".equals(codeString)) 787 return ONEORMORE; 788 if (Configuration.isAcceptInvalidEnums()) 789 return null; 790 else 791 throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 792 } 793 public String toCode() { 794 switch (this) { 795 case ANY: return "any"; 796 case ALL: return "all"; 797 case ALLORNONE: return "all-or-none"; 798 case EXACTLYONE: return "exactly-one"; 799 case ATMOSTONE: return "at-most-one"; 800 case ONEORMORE: return "one-or-more"; 801 case NULL: return null; 802 default: return "?"; 803 } 804 } 805 public String getSystem() { 806 switch (this) { 807 case ANY: return "http://hl7.org/fhir/action-selection-behavior"; 808 case ALL: return "http://hl7.org/fhir/action-selection-behavior"; 809 case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior"; 810 case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior"; 811 case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior"; 812 case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior"; 813 case NULL: return null; 814 default: return "?"; 815 } 816 } 817 public String getDefinition() { 818 switch (this) { 819 case ANY: return "Any number of the actions in the group may be chosen, from zero to all."; 820 case ALL: return "All the actions in the group must be selected as a single unit."; 821 case ALLORNONE: return "All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected."; 822 case EXACTLYONE: return "The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group."; 823 case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group."; 824 case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired."; 825 case NULL: return null; 826 default: return "?"; 827 } 828 } 829 public String getDisplay() { 830 switch (this) { 831 case ANY: return "Any"; 832 case ALL: return "All"; 833 case ALLORNONE: return "All Or None"; 834 case EXACTLYONE: return "Exactly One"; 835 case ATMOSTONE: return "At Most One"; 836 case ONEORMORE: return "One Or More"; 837 case NULL: return null; 838 default: return "?"; 839 } 840 } 841 } 842 843 public static class ActionSelectionBehaviorEnumFactory implements EnumFactory<ActionSelectionBehavior> { 844 public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException { 845 if (codeString == null || "".equals(codeString)) 846 if (codeString == null || "".equals(codeString)) 847 return null; 848 if ("any".equals(codeString)) 849 return ActionSelectionBehavior.ANY; 850 if ("all".equals(codeString)) 851 return ActionSelectionBehavior.ALL; 852 if ("all-or-none".equals(codeString)) 853 return ActionSelectionBehavior.ALLORNONE; 854 if ("exactly-one".equals(codeString)) 855 return ActionSelectionBehavior.EXACTLYONE; 856 if ("at-most-one".equals(codeString)) 857 return ActionSelectionBehavior.ATMOSTONE; 858 if ("one-or-more".equals(codeString)) 859 return ActionSelectionBehavior.ONEORMORE; 860 throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 861 } 862 public Enumeration<ActionSelectionBehavior> fromType(Base code) throws FHIRException { 863 if (code == null) 864 return null; 865 if (code.isEmpty()) 866 return new Enumeration<ActionSelectionBehavior>(this); 867 String codeString = ((PrimitiveType) code).asStringValue(); 868 if (codeString == null || "".equals(codeString)) 869 return null; 870 if ("any".equals(codeString)) 871 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ANY); 872 if ("all".equals(codeString)) 873 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALL); 874 if ("all-or-none".equals(codeString)) 875 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALLORNONE); 876 if ("exactly-one".equals(codeString)) 877 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.EXACTLYONE); 878 if ("at-most-one".equals(codeString)) 879 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ATMOSTONE); 880 if ("one-or-more".equals(codeString)) 881 return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ONEORMORE); 882 throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); 883 } 884 public String toCode(ActionSelectionBehavior code) { 885 if (code == ActionSelectionBehavior.ANY) 886 return "any"; 887 if (code == ActionSelectionBehavior.ALL) 888 return "all"; 889 if (code == ActionSelectionBehavior.ALLORNONE) 890 return "all-or-none"; 891 if (code == ActionSelectionBehavior.EXACTLYONE) 892 return "exactly-one"; 893 if (code == ActionSelectionBehavior.ATMOSTONE) 894 return "at-most-one"; 895 if (code == ActionSelectionBehavior.ONEORMORE) 896 return "one-or-more"; 897 return "?"; 898 } 899 public String toSystem(ActionSelectionBehavior code) { 900 return code.getSystem(); 901 } 902 } 903 904 public enum ActionRequiredBehavior { 905 /** 906 * An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action. 907 */ 908 MUST, 909 /** 910 * An action with this behavior may be included in the set of actions processed by the end user. 911 */ 912 COULD, 913 /** 914 * An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included. 915 */ 916 MUSTUNLESSDOCUMENTED, 917 /** 918 * added to help the parsers with the generic types 919 */ 920 NULL; 921 public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException { 922 if (codeString == null || "".equals(codeString)) 923 return null; 924 if ("must".equals(codeString)) 925 return MUST; 926 if ("could".equals(codeString)) 927 return COULD; 928 if ("must-unless-documented".equals(codeString)) 929 return MUSTUNLESSDOCUMENTED; 930 if (Configuration.isAcceptInvalidEnums()) 931 return null; 932 else 933 throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 934 } 935 public String toCode() { 936 switch (this) { 937 case MUST: return "must"; 938 case COULD: return "could"; 939 case MUSTUNLESSDOCUMENTED: return "must-unless-documented"; 940 case NULL: return null; 941 default: return "?"; 942 } 943 } 944 public String getSystem() { 945 switch (this) { 946 case MUST: return "http://hl7.org/fhir/action-required-behavior"; 947 case COULD: return "http://hl7.org/fhir/action-required-behavior"; 948 case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior"; 949 case NULL: return null; 950 default: return "?"; 951 } 952 } 953 public String getDefinition() { 954 switch (this) { 955 case MUST: return "An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action."; 956 case COULD: return "An action with this behavior may be included in the set of actions processed by the end user."; 957 case MUSTUNLESSDOCUMENTED: return "An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included."; 958 case NULL: return null; 959 default: return "?"; 960 } 961 } 962 public String getDisplay() { 963 switch (this) { 964 case MUST: return "Must"; 965 case COULD: return "Could"; 966 case MUSTUNLESSDOCUMENTED: return "Must Unless Documented"; 967 case NULL: return null; 968 default: return "?"; 969 } 970 } 971 } 972 973 public static class ActionRequiredBehaviorEnumFactory implements EnumFactory<ActionRequiredBehavior> { 974 public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException { 975 if (codeString == null || "".equals(codeString)) 976 if (codeString == null || "".equals(codeString)) 977 return null; 978 if ("must".equals(codeString)) 979 return ActionRequiredBehavior.MUST; 980 if ("could".equals(codeString)) 981 return ActionRequiredBehavior.COULD; 982 if ("must-unless-documented".equals(codeString)) 983 return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED; 984 throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 985 } 986 public Enumeration<ActionRequiredBehavior> fromType(Base code) throws FHIRException { 987 if (code == null) 988 return null; 989 if (code.isEmpty()) 990 return new Enumeration<ActionRequiredBehavior>(this); 991 String codeString = ((PrimitiveType) code).asStringValue(); 992 if (codeString == null || "".equals(codeString)) 993 return null; 994 if ("must".equals(codeString)) 995 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUST); 996 if ("could".equals(codeString)) 997 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.COULD); 998 if ("must-unless-documented".equals(codeString)) 999 return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED); 1000 throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); 1001 } 1002 public String toCode(ActionRequiredBehavior code) { 1003 if (code == ActionRequiredBehavior.MUST) 1004 return "must"; 1005 if (code == ActionRequiredBehavior.COULD) 1006 return "could"; 1007 if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) 1008 return "must-unless-documented"; 1009 return "?"; 1010 } 1011 public String toSystem(ActionRequiredBehavior code) { 1012 return code.getSystem(); 1013 } 1014 } 1015 1016 public enum ActionPrecheckBehavior { 1017 /** 1018 * An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user. 1019 */ 1020 YES, 1021 /** 1022 * An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action. 1023 */ 1024 NO, 1025 /** 1026 * added to help the parsers with the generic types 1027 */ 1028 NULL; 1029 public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException { 1030 if (codeString == null || "".equals(codeString)) 1031 return null; 1032 if ("yes".equals(codeString)) 1033 return YES; 1034 if ("no".equals(codeString)) 1035 return NO; 1036 if (Configuration.isAcceptInvalidEnums()) 1037 return null; 1038 else 1039 throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1040 } 1041 public String toCode() { 1042 switch (this) { 1043 case YES: return "yes"; 1044 case NO: return "no"; 1045 case NULL: return null; 1046 default: return "?"; 1047 } 1048 } 1049 public String getSystem() { 1050 switch (this) { 1051 case YES: return "http://hl7.org/fhir/action-precheck-behavior"; 1052 case NO: return "http://hl7.org/fhir/action-precheck-behavior"; 1053 case NULL: return null; 1054 default: return "?"; 1055 } 1056 } 1057 public String getDefinition() { 1058 switch (this) { 1059 case YES: return "An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider \"pre-checking\" such an action as a convenience for the user."; 1060 case NO: return "An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not \"pre-check\" such an action."; 1061 case NULL: return null; 1062 default: return "?"; 1063 } 1064 } 1065 public String getDisplay() { 1066 switch (this) { 1067 case YES: return "Yes"; 1068 case NO: return "No"; 1069 case NULL: return null; 1070 default: return "?"; 1071 } 1072 } 1073 } 1074 1075 public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory<ActionPrecheckBehavior> { 1076 public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException { 1077 if (codeString == null || "".equals(codeString)) 1078 if (codeString == null || "".equals(codeString)) 1079 return null; 1080 if ("yes".equals(codeString)) 1081 return ActionPrecheckBehavior.YES; 1082 if ("no".equals(codeString)) 1083 return ActionPrecheckBehavior.NO; 1084 throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1085 } 1086 public Enumeration<ActionPrecheckBehavior> fromType(Base code) throws FHIRException { 1087 if (code == null) 1088 return null; 1089 if (code.isEmpty()) 1090 return new Enumeration<ActionPrecheckBehavior>(this); 1091 String codeString = ((PrimitiveType) code).asStringValue(); 1092 if (codeString == null || "".equals(codeString)) 1093 return null; 1094 if ("yes".equals(codeString)) 1095 return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.YES); 1096 if ("no".equals(codeString)) 1097 return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.NO); 1098 throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); 1099 } 1100 public String toCode(ActionPrecheckBehavior code) { 1101 if (code == ActionPrecheckBehavior.YES) 1102 return "yes"; 1103 if (code == ActionPrecheckBehavior.NO) 1104 return "no"; 1105 return "?"; 1106 } 1107 public String toSystem(ActionPrecheckBehavior code) { 1108 return code.getSystem(); 1109 } 1110 } 1111 1112 public enum ActionCardinalityBehavior { 1113 /** 1114 * The action may only be selected one time. 1115 */ 1116 SINGLE, 1117 /** 1118 * The action may be selected multiple times. 1119 */ 1120 MULTIPLE, 1121 /** 1122 * added to help the parsers with the generic types 1123 */ 1124 NULL; 1125 public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException { 1126 if (codeString == null || "".equals(codeString)) 1127 return null; 1128 if ("single".equals(codeString)) 1129 return SINGLE; 1130 if ("multiple".equals(codeString)) 1131 return MULTIPLE; 1132 if (Configuration.isAcceptInvalidEnums()) 1133 return null; 1134 else 1135 throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1136 } 1137 public String toCode() { 1138 switch (this) { 1139 case SINGLE: return "single"; 1140 case MULTIPLE: return "multiple"; 1141 case NULL: return null; 1142 default: return "?"; 1143 } 1144 } 1145 public String getSystem() { 1146 switch (this) { 1147 case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior"; 1148 case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior"; 1149 case NULL: return null; 1150 default: return "?"; 1151 } 1152 } 1153 public String getDefinition() { 1154 switch (this) { 1155 case SINGLE: return "The action may only be selected one time."; 1156 case MULTIPLE: return "The action may be selected multiple times."; 1157 case NULL: return null; 1158 default: return "?"; 1159 } 1160 } 1161 public String getDisplay() { 1162 switch (this) { 1163 case SINGLE: return "Single"; 1164 case MULTIPLE: return "Multiple"; 1165 case NULL: return null; 1166 default: return "?"; 1167 } 1168 } 1169 } 1170 1171 public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory<ActionCardinalityBehavior> { 1172 public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException { 1173 if (codeString == null || "".equals(codeString)) 1174 if (codeString == null || "".equals(codeString)) 1175 return null; 1176 if ("single".equals(codeString)) 1177 return ActionCardinalityBehavior.SINGLE; 1178 if ("multiple".equals(codeString)) 1179 return ActionCardinalityBehavior.MULTIPLE; 1180 throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1181 } 1182 public Enumeration<ActionCardinalityBehavior> fromType(Base code) throws FHIRException { 1183 if (code == null) 1184 return null; 1185 if (code.isEmpty()) 1186 return new Enumeration<ActionCardinalityBehavior>(this); 1187 String codeString = ((PrimitiveType) code).asStringValue(); 1188 if (codeString == null || "".equals(codeString)) 1189 return null; 1190 if ("single".equals(codeString)) 1191 return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.SINGLE); 1192 if ("multiple".equals(codeString)) 1193 return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.MULTIPLE); 1194 throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); 1195 } 1196 public String toCode(ActionCardinalityBehavior code) { 1197 if (code == ActionCardinalityBehavior.SINGLE) 1198 return "single"; 1199 if (code == ActionCardinalityBehavior.MULTIPLE) 1200 return "multiple"; 1201 return "?"; 1202 } 1203 public String toSystem(ActionCardinalityBehavior code) { 1204 return code.getSystem(); 1205 } 1206 } 1207 1208 @Block() 1209 public static class PlanDefinitionGoalComponent extends BackboneElement implements IBaseBackboneElement { 1210 /** 1211 * Indicates a category the goal falls within. 1212 */ 1213 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1214 @Description(shortDefinition="E.g. Treatment, dietary, behavioral", formalDefinition="Indicates a category the goal falls within." ) 1215 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category") 1216 protected CodeableConcept category; 1217 1218 /** 1219 * Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding". 1220 */ 1221 @Child(name = "description", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 1222 @Description(shortDefinition="Code or text describing the goal", formalDefinition="Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\"." ) 1223 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 1224 protected CodeableConcept description; 1225 1226 /** 1227 * Identifies the expected level of importance associated with reaching/sustaining the defined goal. 1228 */ 1229 @Child(name = "priority", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1230 @Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the expected level of importance associated with reaching/sustaining the defined goal." ) 1231 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority") 1232 protected CodeableConcept priority; 1233 1234 /** 1235 * The event after which the goal should begin being pursued. 1236 */ 1237 @Child(name = "start", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 1238 @Description(shortDefinition="When goal pursuit begins", formalDefinition="The event after which the goal should begin being pursued." ) 1239 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event") 1240 protected CodeableConcept start; 1241 1242 /** 1243 * Identifies problems, conditions, issues, or concerns the goal is intended to address. 1244 */ 1245 @Child(name = "addresses", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1246 @Description(shortDefinition="What does the goal address", formalDefinition="Identifies problems, conditions, issues, or concerns the goal is intended to address." ) 1247 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") 1248 protected List<CodeableConcept> addresses; 1249 1250 /** 1251 * Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources. 1252 */ 1253 @Child(name = "documentation", type = {RelatedArtifact.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1254 @Description(shortDefinition="Supporting documentation for the goal", formalDefinition="Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources." ) 1255 protected List<RelatedArtifact> documentation; 1256 1257 /** 1258 * Indicates what should be done and within what timeframe. 1259 */ 1260 @Child(name = "target", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1261 @Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done and within what timeframe." ) 1262 protected List<PlanDefinitionGoalTargetComponent> target; 1263 1264 private static final long serialVersionUID = -795308926L; 1265 1266 /** 1267 * Constructor 1268 */ 1269 public PlanDefinitionGoalComponent() { 1270 super(); 1271 } 1272 1273 /** 1274 * Constructor 1275 */ 1276 public PlanDefinitionGoalComponent(CodeableConcept description) { 1277 super(); 1278 this.description = description; 1279 } 1280 1281 /** 1282 * @return {@link #category} (Indicates a category the goal falls within.) 1283 */ 1284 public CodeableConcept getCategory() { 1285 if (this.category == null) 1286 if (Configuration.errorOnAutoCreate()) 1287 throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.category"); 1288 else if (Configuration.doAutoCreate()) 1289 this.category = new CodeableConcept(); // cc 1290 return this.category; 1291 } 1292 1293 public boolean hasCategory() { 1294 return this.category != null && !this.category.isEmpty(); 1295 } 1296 1297 /** 1298 * @param value {@link #category} (Indicates a category the goal falls within.) 1299 */ 1300 public PlanDefinitionGoalComponent setCategory(CodeableConcept value) { 1301 this.category = value; 1302 return this; 1303 } 1304 1305 /** 1306 * @return {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".) 1307 */ 1308 public CodeableConcept getDescription() { 1309 if (this.description == null) 1310 if (Configuration.errorOnAutoCreate()) 1311 throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.description"); 1312 else if (Configuration.doAutoCreate()) 1313 this.description = new CodeableConcept(); // cc 1314 return this.description; 1315 } 1316 1317 public boolean hasDescription() { 1318 return this.description != null && !this.description.isEmpty(); 1319 } 1320 1321 /** 1322 * @param value {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".) 1323 */ 1324 public PlanDefinitionGoalComponent setDescription(CodeableConcept value) { 1325 this.description = value; 1326 return this; 1327 } 1328 1329 /** 1330 * @return {@link #priority} (Identifies the expected level of importance associated with reaching/sustaining the defined goal.) 1331 */ 1332 public CodeableConcept getPriority() { 1333 if (this.priority == null) 1334 if (Configuration.errorOnAutoCreate()) 1335 throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.priority"); 1336 else if (Configuration.doAutoCreate()) 1337 this.priority = new CodeableConcept(); // cc 1338 return this.priority; 1339 } 1340 1341 public boolean hasPriority() { 1342 return this.priority != null && !this.priority.isEmpty(); 1343 } 1344 1345 /** 1346 * @param value {@link #priority} (Identifies the expected level of importance associated with reaching/sustaining the defined goal.) 1347 */ 1348 public PlanDefinitionGoalComponent setPriority(CodeableConcept value) { 1349 this.priority = value; 1350 return this; 1351 } 1352 1353 /** 1354 * @return {@link #start} (The event after which the goal should begin being pursued.) 1355 */ 1356 public CodeableConcept getStart() { 1357 if (this.start == null) 1358 if (Configuration.errorOnAutoCreate()) 1359 throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.start"); 1360 else if (Configuration.doAutoCreate()) 1361 this.start = new CodeableConcept(); // cc 1362 return this.start; 1363 } 1364 1365 public boolean hasStart() { 1366 return this.start != null && !this.start.isEmpty(); 1367 } 1368 1369 /** 1370 * @param value {@link #start} (The event after which the goal should begin being pursued.) 1371 */ 1372 public PlanDefinitionGoalComponent setStart(CodeableConcept value) { 1373 this.start = value; 1374 return this; 1375 } 1376 1377 /** 1378 * @return {@link #addresses} (Identifies problems, conditions, issues, or concerns the goal is intended to address.) 1379 */ 1380 public List<CodeableConcept> getAddresses() { 1381 if (this.addresses == null) 1382 this.addresses = new ArrayList<CodeableConcept>(); 1383 return this.addresses; 1384 } 1385 1386 /** 1387 * @return Returns a reference to <code>this</code> for easy method chaining 1388 */ 1389 public PlanDefinitionGoalComponent setAddresses(List<CodeableConcept> theAddresses) { 1390 this.addresses = theAddresses; 1391 return this; 1392 } 1393 1394 public boolean hasAddresses() { 1395 if (this.addresses == null) 1396 return false; 1397 for (CodeableConcept item : this.addresses) 1398 if (!item.isEmpty()) 1399 return true; 1400 return false; 1401 } 1402 1403 public CodeableConcept addAddresses() { //3 1404 CodeableConcept t = new CodeableConcept(); 1405 if (this.addresses == null) 1406 this.addresses = new ArrayList<CodeableConcept>(); 1407 this.addresses.add(t); 1408 return t; 1409 } 1410 1411 public PlanDefinitionGoalComponent addAddresses(CodeableConcept t) { //3 1412 if (t == null) 1413 return this; 1414 if (this.addresses == null) 1415 this.addresses = new ArrayList<CodeableConcept>(); 1416 this.addresses.add(t); 1417 return this; 1418 } 1419 1420 /** 1421 * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist 1422 */ 1423 public CodeableConcept getAddressesFirstRep() { 1424 if (getAddresses().isEmpty()) { 1425 addAddresses(); 1426 } 1427 return getAddresses().get(0); 1428 } 1429 1430 /** 1431 * @return {@link #documentation} (Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.) 1432 */ 1433 public List<RelatedArtifact> getDocumentation() { 1434 if (this.documentation == null) 1435 this.documentation = new ArrayList<RelatedArtifact>(); 1436 return this.documentation; 1437 } 1438 1439 /** 1440 * @return Returns a reference to <code>this</code> for easy method chaining 1441 */ 1442 public PlanDefinitionGoalComponent setDocumentation(List<RelatedArtifact> theDocumentation) { 1443 this.documentation = theDocumentation; 1444 return this; 1445 } 1446 1447 public boolean hasDocumentation() { 1448 if (this.documentation == null) 1449 return false; 1450 for (RelatedArtifact item : this.documentation) 1451 if (!item.isEmpty()) 1452 return true; 1453 return false; 1454 } 1455 1456 public RelatedArtifact addDocumentation() { //3 1457 RelatedArtifact t = new RelatedArtifact(); 1458 if (this.documentation == null) 1459 this.documentation = new ArrayList<RelatedArtifact>(); 1460 this.documentation.add(t); 1461 return t; 1462 } 1463 1464 public PlanDefinitionGoalComponent addDocumentation(RelatedArtifact t) { //3 1465 if (t == null) 1466 return this; 1467 if (this.documentation == null) 1468 this.documentation = new ArrayList<RelatedArtifact>(); 1469 this.documentation.add(t); 1470 return this; 1471 } 1472 1473 /** 1474 * @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist 1475 */ 1476 public RelatedArtifact getDocumentationFirstRep() { 1477 if (getDocumentation().isEmpty()) { 1478 addDocumentation(); 1479 } 1480 return getDocumentation().get(0); 1481 } 1482 1483 /** 1484 * @return {@link #target} (Indicates what should be done and within what timeframe.) 1485 */ 1486 public List<PlanDefinitionGoalTargetComponent> getTarget() { 1487 if (this.target == null) 1488 this.target = new ArrayList<PlanDefinitionGoalTargetComponent>(); 1489 return this.target; 1490 } 1491 1492 /** 1493 * @return Returns a reference to <code>this</code> for easy method chaining 1494 */ 1495 public PlanDefinitionGoalComponent setTarget(List<PlanDefinitionGoalTargetComponent> theTarget) { 1496 this.target = theTarget; 1497 return this; 1498 } 1499 1500 public boolean hasTarget() { 1501 if (this.target == null) 1502 return false; 1503 for (PlanDefinitionGoalTargetComponent item : this.target) 1504 if (!item.isEmpty()) 1505 return true; 1506 return false; 1507 } 1508 1509 public PlanDefinitionGoalTargetComponent addTarget() { //3 1510 PlanDefinitionGoalTargetComponent t = new PlanDefinitionGoalTargetComponent(); 1511 if (this.target == null) 1512 this.target = new ArrayList<PlanDefinitionGoalTargetComponent>(); 1513 this.target.add(t); 1514 return t; 1515 } 1516 1517 public PlanDefinitionGoalComponent addTarget(PlanDefinitionGoalTargetComponent t) { //3 1518 if (t == null) 1519 return this; 1520 if (this.target == null) 1521 this.target = new ArrayList<PlanDefinitionGoalTargetComponent>(); 1522 this.target.add(t); 1523 return this; 1524 } 1525 1526 /** 1527 * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist 1528 */ 1529 public PlanDefinitionGoalTargetComponent getTargetFirstRep() { 1530 if (getTarget().isEmpty()) { 1531 addTarget(); 1532 } 1533 return getTarget().get(0); 1534 } 1535 1536 protected void listChildren(List<Property> children) { 1537 super.listChildren(children); 1538 children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, 1, category)); 1539 children.add(new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description)); 1540 children.add(new Property("priority", "CodeableConcept", "Identifies the expected level of importance associated with reaching/sustaining the defined goal.", 0, 1, priority)); 1541 children.add(new Property("start", "CodeableConcept", "The event after which the goal should begin being pursued.", 0, 1, start)); 1542 children.add(new Property("addresses", "CodeableConcept", "Identifies problems, conditions, issues, or concerns the goal is intended to address.", 0, java.lang.Integer.MAX_VALUE, addresses)); 1543 children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation)); 1544 children.add(new Property("target", "", "Indicates what should be done and within what timeframe.", 0, java.lang.Integer.MAX_VALUE, target)); 1545 } 1546 1547 @Override 1548 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1549 switch (_hash) { 1550 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, 1, category); 1551 case -1724546052: /*description*/ return new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description); 1552 case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "Identifies the expected level of importance associated with reaching/sustaining the defined goal.", 0, 1, priority); 1553 case 109757538: /*start*/ return new Property("start", "CodeableConcept", "The event after which the goal should begin being pursued.", 0, 1, start); 1554 case 874544034: /*addresses*/ return new Property("addresses", "CodeableConcept", "Identifies problems, conditions, issues, or concerns the goal is intended to address.", 0, java.lang.Integer.MAX_VALUE, addresses); 1555 case 1587405498: /*documentation*/ return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation); 1556 case -880905839: /*target*/ return new Property("target", "", "Indicates what should be done and within what timeframe.", 0, java.lang.Integer.MAX_VALUE, target); 1557 default: return super.getNamedProperty(_hash, _name, _checkValid); 1558 } 1559 1560 } 1561 1562 @Override 1563 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1564 switch (hash) { 1565 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1566 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept 1567 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept 1568 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // CodeableConcept 1569 case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // CodeableConcept 1570 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact 1571 case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // PlanDefinitionGoalTargetComponent 1572 default: return super.getProperty(hash, name, checkValid); 1573 } 1574 1575 } 1576 1577 @Override 1578 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1579 switch (hash) { 1580 case 50511102: // category 1581 this.category = castToCodeableConcept(value); // CodeableConcept 1582 return value; 1583 case -1724546052: // description 1584 this.description = castToCodeableConcept(value); // CodeableConcept 1585 return value; 1586 case -1165461084: // priority 1587 this.priority = castToCodeableConcept(value); // CodeableConcept 1588 return value; 1589 case 109757538: // start 1590 this.start = castToCodeableConcept(value); // CodeableConcept 1591 return value; 1592 case 874544034: // addresses 1593 this.getAddresses().add(castToCodeableConcept(value)); // CodeableConcept 1594 return value; 1595 case 1587405498: // documentation 1596 this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact 1597 return value; 1598 case -880905839: // target 1599 this.getTarget().add((PlanDefinitionGoalTargetComponent) value); // PlanDefinitionGoalTargetComponent 1600 return value; 1601 default: return super.setProperty(hash, name, value); 1602 } 1603 1604 } 1605 1606 @Override 1607 public Base setProperty(String name, Base value) throws FHIRException { 1608 if (name.equals("category")) { 1609 this.category = castToCodeableConcept(value); // CodeableConcept 1610 } else if (name.equals("description")) { 1611 this.description = castToCodeableConcept(value); // CodeableConcept 1612 } else if (name.equals("priority")) { 1613 this.priority = castToCodeableConcept(value); // CodeableConcept 1614 } else if (name.equals("start")) { 1615 this.start = castToCodeableConcept(value); // CodeableConcept 1616 } else if (name.equals("addresses")) { 1617 this.getAddresses().add(castToCodeableConcept(value)); 1618 } else if (name.equals("documentation")) { 1619 this.getDocumentation().add(castToRelatedArtifact(value)); 1620 } else if (name.equals("target")) { 1621 this.getTarget().add((PlanDefinitionGoalTargetComponent) value); 1622 } else 1623 return super.setProperty(name, value); 1624 return value; 1625 } 1626 1627 @Override 1628 public Base makeProperty(int hash, String name) throws FHIRException { 1629 switch (hash) { 1630 case 50511102: return getCategory(); 1631 case -1724546052: return getDescription(); 1632 case -1165461084: return getPriority(); 1633 case 109757538: return getStart(); 1634 case 874544034: return addAddresses(); 1635 case 1587405498: return addDocumentation(); 1636 case -880905839: return addTarget(); 1637 default: return super.makeProperty(hash, name); 1638 } 1639 1640 } 1641 1642 @Override 1643 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1644 switch (hash) { 1645 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1646 case -1724546052: /*description*/ return new String[] {"CodeableConcept"}; 1647 case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; 1648 case 109757538: /*start*/ return new String[] {"CodeableConcept"}; 1649 case 874544034: /*addresses*/ return new String[] {"CodeableConcept"}; 1650 case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"}; 1651 case -880905839: /*target*/ return new String[] {}; 1652 default: return super.getTypesForProperty(hash, name); 1653 } 1654 1655 } 1656 1657 @Override 1658 public Base addChild(String name) throws FHIRException { 1659 if (name.equals("category")) { 1660 this.category = new CodeableConcept(); 1661 return this.category; 1662 } 1663 else if (name.equals("description")) { 1664 this.description = new CodeableConcept(); 1665 return this.description; 1666 } 1667 else if (name.equals("priority")) { 1668 this.priority = new CodeableConcept(); 1669 return this.priority; 1670 } 1671 else if (name.equals("start")) { 1672 this.start = new CodeableConcept(); 1673 return this.start; 1674 } 1675 else if (name.equals("addresses")) { 1676 return addAddresses(); 1677 } 1678 else if (name.equals("documentation")) { 1679 return addDocumentation(); 1680 } 1681 else if (name.equals("target")) { 1682 return addTarget(); 1683 } 1684 else 1685 return super.addChild(name); 1686 } 1687 1688 public PlanDefinitionGoalComponent copy() { 1689 PlanDefinitionGoalComponent dst = new PlanDefinitionGoalComponent(); 1690 copyValues(dst); 1691 return dst; 1692 } 1693 1694 public void copyValues(PlanDefinitionGoalComponent dst) { 1695 super.copyValues(dst); 1696 dst.category = category == null ? null : category.copy(); 1697 dst.description = description == null ? null : description.copy(); 1698 dst.priority = priority == null ? null : priority.copy(); 1699 dst.start = start == null ? null : start.copy(); 1700 if (addresses != null) { 1701 dst.addresses = new ArrayList<CodeableConcept>(); 1702 for (CodeableConcept i : addresses) 1703 dst.addresses.add(i.copy()); 1704 }; 1705 if (documentation != null) { 1706 dst.documentation = new ArrayList<RelatedArtifact>(); 1707 for (RelatedArtifact i : documentation) 1708 dst.documentation.add(i.copy()); 1709 }; 1710 if (target != null) { 1711 dst.target = new ArrayList<PlanDefinitionGoalTargetComponent>(); 1712 for (PlanDefinitionGoalTargetComponent i : target) 1713 dst.target.add(i.copy()); 1714 }; 1715 } 1716 1717 @Override 1718 public boolean equalsDeep(Base other_) { 1719 if (!super.equalsDeep(other_)) 1720 return false; 1721 if (!(other_ instanceof PlanDefinitionGoalComponent)) 1722 return false; 1723 PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other_; 1724 return compareDeep(category, o.category, true) && compareDeep(description, o.description, true) 1725 && compareDeep(priority, o.priority, true) && compareDeep(start, o.start, true) && compareDeep(addresses, o.addresses, true) 1726 && compareDeep(documentation, o.documentation, true) && compareDeep(target, o.target, true); 1727 } 1728 1729 @Override 1730 public boolean equalsShallow(Base other_) { 1731 if (!super.equalsShallow(other_)) 1732 return false; 1733 if (!(other_ instanceof PlanDefinitionGoalComponent)) 1734 return false; 1735 PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other_; 1736 return true; 1737 } 1738 1739 public boolean isEmpty() { 1740 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, description, priority 1741 , start, addresses, documentation, target); 1742 } 1743 1744 public String fhirType() { 1745 return "PlanDefinition.goal"; 1746 1747 } 1748 1749 } 1750 1751 @Block() 1752 public static class PlanDefinitionGoalTargetComponent extends BackboneElement implements IBaseBackboneElement { 1753 /** 1754 * The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level. 1755 */ 1756 @Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1757 @Description(shortDefinition="The parameter whose value is to be tracked", formalDefinition="The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." ) 1758 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 1759 protected CodeableConcept measure; 1760 1761 /** 1762 * The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value. 1763 */ 1764 @Child(name = "detail", type = {Quantity.class, Range.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1765 @Description(shortDefinition="The target value to be achieved", formalDefinition="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value." ) 1766 protected Type detail; 1767 1768 /** 1769 * Indicates the timeframe after the start of the goal in which the goal should be met. 1770 */ 1771 @Child(name = "due", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false) 1772 @Description(shortDefinition="Reach goal within", formalDefinition="Indicates the timeframe after the start of the goal in which the goal should be met." ) 1773 protected Duration due; 1774 1775 private static final long serialVersionUID = -131874144L; 1776 1777 /** 1778 * Constructor 1779 */ 1780 public PlanDefinitionGoalTargetComponent() { 1781 super(); 1782 } 1783 1784 /** 1785 * @return {@link #measure} (The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.) 1786 */ 1787 public CodeableConcept getMeasure() { 1788 if (this.measure == null) 1789 if (Configuration.errorOnAutoCreate()) 1790 throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.measure"); 1791 else if (Configuration.doAutoCreate()) 1792 this.measure = new CodeableConcept(); // cc 1793 return this.measure; 1794 } 1795 1796 public boolean hasMeasure() { 1797 return this.measure != null && !this.measure.isEmpty(); 1798 } 1799 1800 /** 1801 * @param value {@link #measure} (The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.) 1802 */ 1803 public PlanDefinitionGoalTargetComponent setMeasure(CodeableConcept value) { 1804 this.measure = value; 1805 return this; 1806 } 1807 1808 /** 1809 * @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.) 1810 */ 1811 public Type getDetail() { 1812 return this.detail; 1813 } 1814 1815 /** 1816 * @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.) 1817 */ 1818 public Quantity getDetailQuantity() throws FHIRException { 1819 if (this.detail == null) 1820 this.detail = new Quantity(); 1821 if (!(this.detail instanceof Quantity)) 1822 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered"); 1823 return (Quantity) this.detail; 1824 } 1825 1826 public boolean hasDetailQuantity() { 1827 return this != null && this.detail instanceof Quantity; 1828 } 1829 1830 /** 1831 * @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.) 1832 */ 1833 public Range getDetailRange() throws FHIRException { 1834 if (this.detail == null) 1835 this.detail = new Range(); 1836 if (!(this.detail instanceof Range)) 1837 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered"); 1838 return (Range) this.detail; 1839 } 1840 1841 public boolean hasDetailRange() { 1842 return this != null && this.detail instanceof Range; 1843 } 1844 1845 /** 1846 * @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.) 1847 */ 1848 public CodeableConcept getDetailCodeableConcept() throws FHIRException { 1849 if (this.detail == null) 1850 this.detail = new CodeableConcept(); 1851 if (!(this.detail instanceof CodeableConcept)) 1852 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered"); 1853 return (CodeableConcept) this.detail; 1854 } 1855 1856 public boolean hasDetailCodeableConcept() { 1857 return this != null && this.detail instanceof CodeableConcept; 1858 } 1859 1860 public boolean hasDetail() { 1861 return this.detail != null && !this.detail.isEmpty(); 1862 } 1863 1864 /** 1865 * @param value {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.) 1866 */ 1867 public PlanDefinitionGoalTargetComponent setDetail(Type value) { 1868 if (value != null && !(value instanceof Quantity || value instanceof Range || value instanceof CodeableConcept)) 1869 throw new Error("Not the right type for PlanDefinition.goal.target.detail[x]: "+value.fhirType()); 1870 this.detail = value; 1871 return this; 1872 } 1873 1874 /** 1875 * @return {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.) 1876 */ 1877 public Duration getDue() { 1878 if (this.due == null) 1879 if (Configuration.errorOnAutoCreate()) 1880 throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.due"); 1881 else if (Configuration.doAutoCreate()) 1882 this.due = new Duration(); // cc 1883 return this.due; 1884 } 1885 1886 public boolean hasDue() { 1887 return this.due != null && !this.due.isEmpty(); 1888 } 1889 1890 /** 1891 * @param value {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.) 1892 */ 1893 public PlanDefinitionGoalTargetComponent setDue(Duration value) { 1894 this.due = value; 1895 return this; 1896 } 1897 1898 protected void listChildren(List<Property> children) { 1899 super.listChildren(children); 1900 children.add(new Property("measure", "CodeableConcept", "The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure)); 1901 children.add(new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail)); 1902 children.add(new Property("due", "Duration", "Indicates the timeframe after the start of the goal in which the goal should be met.", 0, 1, due)); 1903 } 1904 1905 @Override 1906 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1907 switch (_hash) { 1908 case 938321246: /*measure*/ return new Property("measure", "CodeableConcept", "The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure); 1909 case -1973084529: /*detail[x]*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail); 1910 case -1335224239: /*detail*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail); 1911 case -1313079300: /*detailQuantity*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail); 1912 case -2062632084: /*detailRange*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail); 1913 case -175586544: /*detailCodeableConcept*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail); 1914 case 99828: /*due*/ return new Property("due", "Duration", "Indicates the timeframe after the start of the goal in which the goal should be met.", 0, 1, due); 1915 default: return super.getNamedProperty(_hash, _name, _checkValid); 1916 } 1917 1918 } 1919 1920 @Override 1921 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1922 switch (hash) { 1923 case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept 1924 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // Type 1925 case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // Duration 1926 default: return super.getProperty(hash, name, checkValid); 1927 } 1928 1929 } 1930 1931 @Override 1932 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1933 switch (hash) { 1934 case 938321246: // measure 1935 this.measure = castToCodeableConcept(value); // CodeableConcept 1936 return value; 1937 case -1335224239: // detail 1938 this.detail = castToType(value); // Type 1939 return value; 1940 case 99828: // due 1941 this.due = castToDuration(value); // Duration 1942 return value; 1943 default: return super.setProperty(hash, name, value); 1944 } 1945 1946 } 1947 1948 @Override 1949 public Base setProperty(String name, Base value) throws FHIRException { 1950 if (name.equals("measure")) { 1951 this.measure = castToCodeableConcept(value); // CodeableConcept 1952 } else if (name.equals("detail[x]")) { 1953 this.detail = castToType(value); // Type 1954 } else if (name.equals("due")) { 1955 this.due = castToDuration(value); // Duration 1956 } else 1957 return super.setProperty(name, value); 1958 return value; 1959 } 1960 1961 @Override 1962 public Base makeProperty(int hash, String name) throws FHIRException { 1963 switch (hash) { 1964 case 938321246: return getMeasure(); 1965 case -1973084529: return getDetail(); 1966 case -1335224239: return getDetail(); 1967 case 99828: return getDue(); 1968 default: return super.makeProperty(hash, name); 1969 } 1970 1971 } 1972 1973 @Override 1974 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1975 switch (hash) { 1976 case 938321246: /*measure*/ return new String[] {"CodeableConcept"}; 1977 case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept"}; 1978 case 99828: /*due*/ return new String[] {"Duration"}; 1979 default: return super.getTypesForProperty(hash, name); 1980 } 1981 1982 } 1983 1984 @Override 1985 public Base addChild(String name) throws FHIRException { 1986 if (name.equals("measure")) { 1987 this.measure = new CodeableConcept(); 1988 return this.measure; 1989 } 1990 else if (name.equals("detailQuantity")) { 1991 this.detail = new Quantity(); 1992 return this.detail; 1993 } 1994 else if (name.equals("detailRange")) { 1995 this.detail = new Range(); 1996 return this.detail; 1997 } 1998 else if (name.equals("detailCodeableConcept")) { 1999 this.detail = new CodeableConcept(); 2000 return this.detail; 2001 } 2002 else if (name.equals("due")) { 2003 this.due = new Duration(); 2004 return this.due; 2005 } 2006 else 2007 return super.addChild(name); 2008 } 2009 2010 public PlanDefinitionGoalTargetComponent copy() { 2011 PlanDefinitionGoalTargetComponent dst = new PlanDefinitionGoalTargetComponent(); 2012 copyValues(dst); 2013 return dst; 2014 } 2015 2016 public void copyValues(PlanDefinitionGoalTargetComponent dst) { 2017 super.copyValues(dst); 2018 dst.measure = measure == null ? null : measure.copy(); 2019 dst.detail = detail == null ? null : detail.copy(); 2020 dst.due = due == null ? null : due.copy(); 2021 } 2022 2023 @Override 2024 public boolean equalsDeep(Base other_) { 2025 if (!super.equalsDeep(other_)) 2026 return false; 2027 if (!(other_ instanceof PlanDefinitionGoalTargetComponent)) 2028 return false; 2029 PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other_; 2030 return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true) 2031 ; 2032 } 2033 2034 @Override 2035 public boolean equalsShallow(Base other_) { 2036 if (!super.equalsShallow(other_)) 2037 return false; 2038 if (!(other_ instanceof PlanDefinitionGoalTargetComponent)) 2039 return false; 2040 PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other_; 2041 return true; 2042 } 2043 2044 public boolean isEmpty() { 2045 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due); 2046 } 2047 2048 public String fhirType() { 2049 return "PlanDefinition.goal.target"; 2050 2051 } 2052 2053 } 2054 2055 @Block() 2056 public static class PlanDefinitionActionComponent extends BackboneElement implements IBaseBackboneElement { 2057 /** 2058 * A user-visible prefix for the action. 2059 */ 2060 @Child(name = "prefix", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2061 @Description(shortDefinition="User-visible prefix for the action (e.g. 1. or A.)", formalDefinition="A user-visible prefix for the action." ) 2062 protected StringType prefix; 2063 2064 /** 2065 * The title of the action displayed to a user. 2066 */ 2067 @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2068 @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." ) 2069 protected StringType title; 2070 2071 /** 2072 * A brief description of the action used to provide a summary to display to the user. 2073 */ 2074 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2075 @Description(shortDefinition="Brief description of the action", formalDefinition="A brief description of the action used to provide a summary to display to the user." ) 2076 protected StringType description; 2077 2078 /** 2079 * A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 2080 */ 2081 @Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2082 @Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically." ) 2083 protected StringType textEquivalent; 2084 2085 /** 2086 * Indicates how quickly the action should be addressed with respect to other actions. 2087 */ 2088 @Child(name = "priority", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2089 @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the action should be addressed with respect to other actions." ) 2090 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 2091 protected Enumeration<RequestPriority> priority; 2092 2093 /** 2094 * A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template. 2095 */ 2096 @Child(name = "code", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2097 @Description(shortDefinition="Code representing the meaning of the action or sub-actions", formalDefinition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template." ) 2098 protected List<CodeableConcept> code; 2099 2100 /** 2101 * A description of why this action is necessary or appropriate. 2102 */ 2103 @Child(name = "reason", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2104 @Description(shortDefinition="Why the action should be performed", formalDefinition="A description of why this action is necessary or appropriate." ) 2105 protected List<CodeableConcept> reason; 2106 2107 /** 2108 * Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources. 2109 */ 2110 @Child(name = "documentation", type = {RelatedArtifact.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2111 @Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." ) 2112 protected List<RelatedArtifact> documentation; 2113 2114 /** 2115 * Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. 2116 */ 2117 @Child(name = "goalId", type = {IdType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2118 @Description(shortDefinition="What goals this action supports", formalDefinition="Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition." ) 2119 protected List<IdType> goalId; 2120 2121 /** 2122 * A code or group definition that describes the intended subject of the action and its children, if any. 2123 */ 2124 @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=10, min=0, max=1, modifier=false, summary=false) 2125 @Description(shortDefinition="Type of individual the action is focused on", formalDefinition="A code or group definition that describes the intended subject of the action and its children, if any." ) 2126 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type") 2127 protected Type subject; 2128 2129 /** 2130 * A description of when the action should be triggered. 2131 */ 2132 @Child(name = "trigger", type = {TriggerDefinition.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2133 @Description(shortDefinition="When the action should be triggered", formalDefinition="A description of when the action should be triggered." ) 2134 protected List<TriggerDefinition> trigger; 2135 2136 /** 2137 * An expression that describes applicability criteria or start/stop conditions for the action. 2138 */ 2139 @Child(name = "condition", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2140 @Description(shortDefinition="Whether or not the action is applicable", formalDefinition="An expression that describes applicability criteria or start/stop conditions for the action." ) 2141 protected List<PlanDefinitionActionConditionComponent> condition; 2142 2143 /** 2144 * Defines input data requirements for the action. 2145 */ 2146 @Child(name = "input", type = {DataRequirement.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2147 @Description(shortDefinition="Input data requirements", formalDefinition="Defines input data requirements for the action." ) 2148 protected List<DataRequirement> input; 2149 2150 /** 2151 * Defines the outputs of the action, if any. 2152 */ 2153 @Child(name = "output", type = {DataRequirement.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2154 @Description(shortDefinition="Output data definition", formalDefinition="Defines the outputs of the action, if any." ) 2155 protected List<DataRequirement> output; 2156 2157 /** 2158 * A relationship to another action such as "before" or "30-60 minutes after start of". 2159 */ 2160 @Child(name = "relatedAction", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2161 @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." ) 2162 protected List<PlanDefinitionActionRelatedActionComponent> relatedAction; 2163 2164 /** 2165 * An optional value describing when the action should be performed. 2166 */ 2167 @Child(name = "timing", type = {DateTimeType.class, Age.class, Period.class, Duration.class, Range.class, Timing.class}, order=16, min=0, max=1, modifier=false, summary=false) 2168 @Description(shortDefinition="When the action should take place", formalDefinition="An optional value describing when the action should be performed." ) 2169 protected Type timing; 2170 2171 /** 2172 * Indicates who should participate in performing the action described. 2173 */ 2174 @Child(name = "participant", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2175 @Description(shortDefinition="Who should participate in the action", formalDefinition="Indicates who should participate in performing the action described." ) 2176 protected List<PlanDefinitionActionParticipantComponent> participant; 2177 2178 /** 2179 * The type of action to perform (create, update, remove). 2180 */ 2181 @Child(name = "type", type = {CodeableConcept.class}, order=18, min=0, max=1, modifier=false, summary=false) 2182 @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) 2183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-type") 2184 protected CodeableConcept type; 2185 2186 /** 2187 * Defines the grouping behavior for the action and its children. 2188 */ 2189 @Child(name = "groupingBehavior", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false) 2190 @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines the grouping behavior for the action and its children." ) 2191 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-grouping-behavior") 2192 protected Enumeration<ActionGroupingBehavior> groupingBehavior; 2193 2194 /** 2195 * Defines the selection behavior for the action and its children. 2196 */ 2197 @Child(name = "selectionBehavior", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=false) 2198 @Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines the selection behavior for the action and its children." ) 2199 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-selection-behavior") 2200 protected Enumeration<ActionSelectionBehavior> selectionBehavior; 2201 2202 /** 2203 * Defines the required behavior for the action. 2204 */ 2205 @Child(name = "requiredBehavior", type = {CodeType.class}, order=21, min=0, max=1, modifier=false, summary=false) 2206 @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines the required behavior for the action." ) 2207 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-required-behavior") 2208 protected Enumeration<ActionRequiredBehavior> requiredBehavior; 2209 2210 /** 2211 * Defines whether the action should usually be preselected. 2212 */ 2213 @Child(name = "precheckBehavior", type = {CodeType.class}, order=22, min=0, max=1, modifier=false, summary=false) 2214 @Description(shortDefinition="yes | no", formalDefinition="Defines whether the action should usually be preselected." ) 2215 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-precheck-behavior") 2216 protected Enumeration<ActionPrecheckBehavior> precheckBehavior; 2217 2218 /** 2219 * Defines whether the action can be selected multiple times. 2220 */ 2221 @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=23, min=0, max=1, modifier=false, summary=false) 2222 @Description(shortDefinition="single | multiple", formalDefinition="Defines whether the action can be selected multiple times." ) 2223 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-cardinality-behavior") 2224 protected Enumeration<ActionCardinalityBehavior> cardinalityBehavior; 2225 2226 /** 2227 * A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken. 2228 */ 2229 @Child(name = "definition", type = {CanonicalType.class, UriType.class}, order=24, min=0, max=1, modifier=false, summary=false) 2230 @Description(shortDefinition="Description of the activity to be performed", formalDefinition="A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken." ) 2231 protected Type definition; 2232 2233 /** 2234 * A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input. 2235 */ 2236 @Child(name = "transform", type = {CanonicalType.class}, order=25, min=0, max=1, modifier=false, summary=false) 2237 @Description(shortDefinition="Transform to apply the template", formalDefinition="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input." ) 2238 protected CanonicalType transform; 2239 2240 /** 2241 * Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result. 2242 */ 2243 @Child(name = "dynamicValue", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2244 @Description(shortDefinition="Dynamic aspects of the definition", formalDefinition="Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result." ) 2245 protected List<PlanDefinitionActionDynamicValueComponent> dynamicValue; 2246 2247 /** 2248 * Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition. 2249 */ 2250 @Child(name = "action", type = {PlanDefinitionActionComponent.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2251 @Description(shortDefinition="A sub-action", formalDefinition="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition." ) 2252 protected List<PlanDefinitionActionComponent> action; 2253 2254 private static final long serialVersionUID = 158605540L; 2255 2256 /** 2257 * Constructor 2258 */ 2259 public PlanDefinitionActionComponent() { 2260 super(); 2261 } 2262 2263 /** 2264 * @return {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 2265 */ 2266 public StringType getPrefixElement() { 2267 if (this.prefix == null) 2268 if (Configuration.errorOnAutoCreate()) 2269 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.prefix"); 2270 else if (Configuration.doAutoCreate()) 2271 this.prefix = new StringType(); // bb 2272 return this.prefix; 2273 } 2274 2275 public boolean hasPrefixElement() { 2276 return this.prefix != null && !this.prefix.isEmpty(); 2277 } 2278 2279 public boolean hasPrefix() { 2280 return this.prefix != null && !this.prefix.isEmpty(); 2281 } 2282 2283 /** 2284 * @param value {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 2285 */ 2286 public PlanDefinitionActionComponent setPrefixElement(StringType value) { 2287 this.prefix = value; 2288 return this; 2289 } 2290 2291 /** 2292 * @return A user-visible prefix for the action. 2293 */ 2294 public String getPrefix() { 2295 return this.prefix == null ? null : this.prefix.getValue(); 2296 } 2297 2298 /** 2299 * @param value A user-visible prefix for the action. 2300 */ 2301 public PlanDefinitionActionComponent setPrefix(String value) { 2302 if (Utilities.noString(value)) 2303 this.prefix = null; 2304 else { 2305 if (this.prefix == null) 2306 this.prefix = new StringType(); 2307 this.prefix.setValue(value); 2308 } 2309 return this; 2310 } 2311 2312 /** 2313 * @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2314 */ 2315 public StringType getTitleElement() { 2316 if (this.title == null) 2317 if (Configuration.errorOnAutoCreate()) 2318 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.title"); 2319 else if (Configuration.doAutoCreate()) 2320 this.title = new StringType(); // bb 2321 return this.title; 2322 } 2323 2324 public boolean hasTitleElement() { 2325 return this.title != null && !this.title.isEmpty(); 2326 } 2327 2328 public boolean hasTitle() { 2329 return this.title != null && !this.title.isEmpty(); 2330 } 2331 2332 /** 2333 * @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2334 */ 2335 public PlanDefinitionActionComponent setTitleElement(StringType value) { 2336 this.title = value; 2337 return this; 2338 } 2339 2340 /** 2341 * @return The title of the action displayed to a user. 2342 */ 2343 public String getTitle() { 2344 return this.title == null ? null : this.title.getValue(); 2345 } 2346 2347 /** 2348 * @param value The title of the action displayed to a user. 2349 */ 2350 public PlanDefinitionActionComponent setTitle(String value) { 2351 if (Utilities.noString(value)) 2352 this.title = null; 2353 else { 2354 if (this.title == null) 2355 this.title = new StringType(); 2356 this.title.setValue(value); 2357 } 2358 return this; 2359 } 2360 2361 /** 2362 * @return {@link #description} (A brief description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2363 */ 2364 public StringType getDescriptionElement() { 2365 if (this.description == null) 2366 if (Configuration.errorOnAutoCreate()) 2367 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.description"); 2368 else if (Configuration.doAutoCreate()) 2369 this.description = new StringType(); // bb 2370 return this.description; 2371 } 2372 2373 public boolean hasDescriptionElement() { 2374 return this.description != null && !this.description.isEmpty(); 2375 } 2376 2377 public boolean hasDescription() { 2378 return this.description != null && !this.description.isEmpty(); 2379 } 2380 2381 /** 2382 * @param value {@link #description} (A brief description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2383 */ 2384 public PlanDefinitionActionComponent setDescriptionElement(StringType value) { 2385 this.description = value; 2386 return this; 2387 } 2388 2389 /** 2390 * @return A brief description of the action used to provide a summary to display to the user. 2391 */ 2392 public String getDescription() { 2393 return this.description == null ? null : this.description.getValue(); 2394 } 2395 2396 /** 2397 * @param value A brief description of the action used to provide a summary to display to the user. 2398 */ 2399 public PlanDefinitionActionComponent setDescription(String value) { 2400 if (Utilities.noString(value)) 2401 this.description = null; 2402 else { 2403 if (this.description == null) 2404 this.description = new StringType(); 2405 this.description.setValue(value); 2406 } 2407 return this; 2408 } 2409 2410 /** 2411 * @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value 2412 */ 2413 public StringType getTextEquivalentElement() { 2414 if (this.textEquivalent == null) 2415 if (Configuration.errorOnAutoCreate()) 2416 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.textEquivalent"); 2417 else if (Configuration.doAutoCreate()) 2418 this.textEquivalent = new StringType(); // bb 2419 return this.textEquivalent; 2420 } 2421 2422 public boolean hasTextEquivalentElement() { 2423 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 2424 } 2425 2426 public boolean hasTextEquivalent() { 2427 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 2428 } 2429 2430 /** 2431 * @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value 2432 */ 2433 public PlanDefinitionActionComponent setTextEquivalentElement(StringType value) { 2434 this.textEquivalent = value; 2435 return this; 2436 } 2437 2438 /** 2439 * @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 2440 */ 2441 public String getTextEquivalent() { 2442 return this.textEquivalent == null ? null : this.textEquivalent.getValue(); 2443 } 2444 2445 /** 2446 * @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically. 2447 */ 2448 public PlanDefinitionActionComponent setTextEquivalent(String value) { 2449 if (Utilities.noString(value)) 2450 this.textEquivalent = null; 2451 else { 2452 if (this.textEquivalent == null) 2453 this.textEquivalent = new StringType(); 2454 this.textEquivalent.setValue(value); 2455 } 2456 return this; 2457 } 2458 2459 /** 2460 * @return {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 2461 */ 2462 public Enumeration<RequestPriority> getPriorityElement() { 2463 if (this.priority == null) 2464 if (Configuration.errorOnAutoCreate()) 2465 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.priority"); 2466 else if (Configuration.doAutoCreate()) 2467 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb 2468 return this.priority; 2469 } 2470 2471 public boolean hasPriorityElement() { 2472 return this.priority != null && !this.priority.isEmpty(); 2473 } 2474 2475 public boolean hasPriority() { 2476 return this.priority != null && !this.priority.isEmpty(); 2477 } 2478 2479 /** 2480 * @param value {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 2481 */ 2482 public PlanDefinitionActionComponent setPriorityElement(Enumeration<RequestPriority> value) { 2483 this.priority = value; 2484 return this; 2485 } 2486 2487 /** 2488 * @return Indicates how quickly the action should be addressed with respect to other actions. 2489 */ 2490 public RequestPriority getPriority() { 2491 return this.priority == null ? null : this.priority.getValue(); 2492 } 2493 2494 /** 2495 * @param value Indicates how quickly the action should be addressed with respect to other actions. 2496 */ 2497 public PlanDefinitionActionComponent setPriority(RequestPriority value) { 2498 if (value == null) 2499 this.priority = null; 2500 else { 2501 if (this.priority == null) 2502 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); 2503 this.priority.setValue(value); 2504 } 2505 return this; 2506 } 2507 2508 /** 2509 * @return {@link #code} (A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.) 2510 */ 2511 public List<CodeableConcept> getCode() { 2512 if (this.code == null) 2513 this.code = new ArrayList<CodeableConcept>(); 2514 return this.code; 2515 } 2516 2517 /** 2518 * @return Returns a reference to <code>this</code> for easy method chaining 2519 */ 2520 public PlanDefinitionActionComponent setCode(List<CodeableConcept> theCode) { 2521 this.code = theCode; 2522 return this; 2523 } 2524 2525 public boolean hasCode() { 2526 if (this.code == null) 2527 return false; 2528 for (CodeableConcept item : this.code) 2529 if (!item.isEmpty()) 2530 return true; 2531 return false; 2532 } 2533 2534 public CodeableConcept addCode() { //3 2535 CodeableConcept t = new CodeableConcept(); 2536 if (this.code == null) 2537 this.code = new ArrayList<CodeableConcept>(); 2538 this.code.add(t); 2539 return t; 2540 } 2541 2542 public PlanDefinitionActionComponent addCode(CodeableConcept t) { //3 2543 if (t == null) 2544 return this; 2545 if (this.code == null) 2546 this.code = new ArrayList<CodeableConcept>(); 2547 this.code.add(t); 2548 return this; 2549 } 2550 2551 /** 2552 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 2553 */ 2554 public CodeableConcept getCodeFirstRep() { 2555 if (getCode().isEmpty()) { 2556 addCode(); 2557 } 2558 return getCode().get(0); 2559 } 2560 2561 /** 2562 * @return {@link #reason} (A description of why this action is necessary or appropriate.) 2563 */ 2564 public List<CodeableConcept> getReason() { 2565 if (this.reason == null) 2566 this.reason = new ArrayList<CodeableConcept>(); 2567 return this.reason; 2568 } 2569 2570 /** 2571 * @return Returns a reference to <code>this</code> for easy method chaining 2572 */ 2573 public PlanDefinitionActionComponent setReason(List<CodeableConcept> theReason) { 2574 this.reason = theReason; 2575 return this; 2576 } 2577 2578 public boolean hasReason() { 2579 if (this.reason == null) 2580 return false; 2581 for (CodeableConcept item : this.reason) 2582 if (!item.isEmpty()) 2583 return true; 2584 return false; 2585 } 2586 2587 public CodeableConcept addReason() { //3 2588 CodeableConcept t = new CodeableConcept(); 2589 if (this.reason == null) 2590 this.reason = new ArrayList<CodeableConcept>(); 2591 this.reason.add(t); 2592 return t; 2593 } 2594 2595 public PlanDefinitionActionComponent addReason(CodeableConcept t) { //3 2596 if (t == null) 2597 return this; 2598 if (this.reason == null) 2599 this.reason = new ArrayList<CodeableConcept>(); 2600 this.reason.add(t); 2601 return this; 2602 } 2603 2604 /** 2605 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist 2606 */ 2607 public CodeableConcept getReasonFirstRep() { 2608 if (getReason().isEmpty()) { 2609 addReason(); 2610 } 2611 return getReason().get(0); 2612 } 2613 2614 /** 2615 * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) 2616 */ 2617 public List<RelatedArtifact> getDocumentation() { 2618 if (this.documentation == null) 2619 this.documentation = new ArrayList<RelatedArtifact>(); 2620 return this.documentation; 2621 } 2622 2623 /** 2624 * @return Returns a reference to <code>this</code> for easy method chaining 2625 */ 2626 public PlanDefinitionActionComponent setDocumentation(List<RelatedArtifact> theDocumentation) { 2627 this.documentation = theDocumentation; 2628 return this; 2629 } 2630 2631 public boolean hasDocumentation() { 2632 if (this.documentation == null) 2633 return false; 2634 for (RelatedArtifact item : this.documentation) 2635 if (!item.isEmpty()) 2636 return true; 2637 return false; 2638 } 2639 2640 public RelatedArtifact addDocumentation() { //3 2641 RelatedArtifact t = new RelatedArtifact(); 2642 if (this.documentation == null) 2643 this.documentation = new ArrayList<RelatedArtifact>(); 2644 this.documentation.add(t); 2645 return t; 2646 } 2647 2648 public PlanDefinitionActionComponent addDocumentation(RelatedArtifact t) { //3 2649 if (t == null) 2650 return this; 2651 if (this.documentation == null) 2652 this.documentation = new ArrayList<RelatedArtifact>(); 2653 this.documentation.add(t); 2654 return this; 2655 } 2656 2657 /** 2658 * @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist 2659 */ 2660 public RelatedArtifact getDocumentationFirstRep() { 2661 if (getDocumentation().isEmpty()) { 2662 addDocumentation(); 2663 } 2664 return getDocumentation().get(0); 2665 } 2666 2667 /** 2668 * @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2669 */ 2670 public List<IdType> getGoalId() { 2671 if (this.goalId == null) 2672 this.goalId = new ArrayList<IdType>(); 2673 return this.goalId; 2674 } 2675 2676 /** 2677 * @return Returns a reference to <code>this</code> for easy method chaining 2678 */ 2679 public PlanDefinitionActionComponent setGoalId(List<IdType> theGoalId) { 2680 this.goalId = theGoalId; 2681 return this; 2682 } 2683 2684 public boolean hasGoalId() { 2685 if (this.goalId == null) 2686 return false; 2687 for (IdType item : this.goalId) 2688 if (!item.isEmpty()) 2689 return true; 2690 return false; 2691 } 2692 2693 /** 2694 * @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2695 */ 2696 public IdType addGoalIdElement() {//2 2697 IdType t = new IdType(); 2698 if (this.goalId == null) 2699 this.goalId = new ArrayList<IdType>(); 2700 this.goalId.add(t); 2701 return t; 2702 } 2703 2704 /** 2705 * @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2706 */ 2707 public PlanDefinitionActionComponent addGoalId(String value) { //1 2708 IdType t = new IdType(); 2709 t.setValue(value); 2710 if (this.goalId == null) 2711 this.goalId = new ArrayList<IdType>(); 2712 this.goalId.add(t); 2713 return this; 2714 } 2715 2716 /** 2717 * @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2718 */ 2719 public boolean hasGoalId(String value) { 2720 if (this.goalId == null) 2721 return false; 2722 for (IdType v : this.goalId) 2723 if (v.getValue().equals(value)) // id 2724 return true; 2725 return false; 2726 } 2727 2728 /** 2729 * @return {@link #subject} (A code or group definition that describes the intended subject of the action and its children, if any.) 2730 */ 2731 public Type getSubject() { 2732 return this.subject; 2733 } 2734 2735 /** 2736 * @return {@link #subject} (A code or group definition that describes the intended subject of the action and its children, if any.) 2737 */ 2738 public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 2739 if (this.subject == null) 2740 this.subject = new CodeableConcept(); 2741 if (!(this.subject instanceof CodeableConcept)) 2742 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered"); 2743 return (CodeableConcept) this.subject; 2744 } 2745 2746 public boolean hasSubjectCodeableConcept() { 2747 return this != null && this.subject instanceof CodeableConcept; 2748 } 2749 2750 /** 2751 * @return {@link #subject} (A code or group definition that describes the intended subject of the action and its children, if any.) 2752 */ 2753 public Reference getSubjectReference() throws FHIRException { 2754 if (this.subject == null) 2755 this.subject = new Reference(); 2756 if (!(this.subject instanceof Reference)) 2757 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered"); 2758 return (Reference) this.subject; 2759 } 2760 2761 public boolean hasSubjectReference() { 2762 return this != null && this.subject instanceof Reference; 2763 } 2764 2765 public boolean hasSubject() { 2766 return this.subject != null && !this.subject.isEmpty(); 2767 } 2768 2769 /** 2770 * @param value {@link #subject} (A code or group definition that describes the intended subject of the action and its children, if any.) 2771 */ 2772 public PlanDefinitionActionComponent setSubject(Type value) { 2773 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 2774 throw new Error("Not the right type for PlanDefinition.action.subject[x]: "+value.fhirType()); 2775 this.subject = value; 2776 return this; 2777 } 2778 2779 /** 2780 * @return {@link #trigger} (A description of when the action should be triggered.) 2781 */ 2782 public List<TriggerDefinition> getTrigger() { 2783 if (this.trigger == null) 2784 this.trigger = new ArrayList<TriggerDefinition>(); 2785 return this.trigger; 2786 } 2787 2788 /** 2789 * @return Returns a reference to <code>this</code> for easy method chaining 2790 */ 2791 public PlanDefinitionActionComponent setTrigger(List<TriggerDefinition> theTrigger) { 2792 this.trigger = theTrigger; 2793 return this; 2794 } 2795 2796 public boolean hasTrigger() { 2797 if (this.trigger == null) 2798 return false; 2799 for (TriggerDefinition item : this.trigger) 2800 if (!item.isEmpty()) 2801 return true; 2802 return false; 2803 } 2804 2805 public TriggerDefinition addTrigger() { //3 2806 TriggerDefinition t = new TriggerDefinition(); 2807 if (this.trigger == null) 2808 this.trigger = new ArrayList<TriggerDefinition>(); 2809 this.trigger.add(t); 2810 return t; 2811 } 2812 2813 public PlanDefinitionActionComponent addTrigger(TriggerDefinition t) { //3 2814 if (t == null) 2815 return this; 2816 if (this.trigger == null) 2817 this.trigger = new ArrayList<TriggerDefinition>(); 2818 this.trigger.add(t); 2819 return this; 2820 } 2821 2822 /** 2823 * @return The first repetition of repeating field {@link #trigger}, creating it if it does not already exist 2824 */ 2825 public TriggerDefinition getTriggerFirstRep() { 2826 if (getTrigger().isEmpty()) { 2827 addTrigger(); 2828 } 2829 return getTrigger().get(0); 2830 } 2831 2832 /** 2833 * @return {@link #condition} (An expression that describes applicability criteria or start/stop conditions for the action.) 2834 */ 2835 public List<PlanDefinitionActionConditionComponent> getCondition() { 2836 if (this.condition == null) 2837 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2838 return this.condition; 2839 } 2840 2841 /** 2842 * @return Returns a reference to <code>this</code> for easy method chaining 2843 */ 2844 public PlanDefinitionActionComponent setCondition(List<PlanDefinitionActionConditionComponent> theCondition) { 2845 this.condition = theCondition; 2846 return this; 2847 } 2848 2849 public boolean hasCondition() { 2850 if (this.condition == null) 2851 return false; 2852 for (PlanDefinitionActionConditionComponent item : this.condition) 2853 if (!item.isEmpty()) 2854 return true; 2855 return false; 2856 } 2857 2858 public PlanDefinitionActionConditionComponent addCondition() { //3 2859 PlanDefinitionActionConditionComponent t = new PlanDefinitionActionConditionComponent(); 2860 if (this.condition == null) 2861 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2862 this.condition.add(t); 2863 return t; 2864 } 2865 2866 public PlanDefinitionActionComponent addCondition(PlanDefinitionActionConditionComponent t) { //3 2867 if (t == null) 2868 return this; 2869 if (this.condition == null) 2870 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2871 this.condition.add(t); 2872 return this; 2873 } 2874 2875 /** 2876 * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist 2877 */ 2878 public PlanDefinitionActionConditionComponent getConditionFirstRep() { 2879 if (getCondition().isEmpty()) { 2880 addCondition(); 2881 } 2882 return getCondition().get(0); 2883 } 2884 2885 /** 2886 * @return {@link #input} (Defines input data requirements for the action.) 2887 */ 2888 public List<DataRequirement> getInput() { 2889 if (this.input == null) 2890 this.input = new ArrayList<DataRequirement>(); 2891 return this.input; 2892 } 2893 2894 /** 2895 * @return Returns a reference to <code>this</code> for easy method chaining 2896 */ 2897 public PlanDefinitionActionComponent setInput(List<DataRequirement> theInput) { 2898 this.input = theInput; 2899 return this; 2900 } 2901 2902 public boolean hasInput() { 2903 if (this.input == null) 2904 return false; 2905 for (DataRequirement item : this.input) 2906 if (!item.isEmpty()) 2907 return true; 2908 return false; 2909 } 2910 2911 public DataRequirement addInput() { //3 2912 DataRequirement t = new DataRequirement(); 2913 if (this.input == null) 2914 this.input = new ArrayList<DataRequirement>(); 2915 this.input.add(t); 2916 return t; 2917 } 2918 2919 public PlanDefinitionActionComponent addInput(DataRequirement t) { //3 2920 if (t == null) 2921 return this; 2922 if (this.input == null) 2923 this.input = new ArrayList<DataRequirement>(); 2924 this.input.add(t); 2925 return this; 2926 } 2927 2928 /** 2929 * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist 2930 */ 2931 public DataRequirement getInputFirstRep() { 2932 if (getInput().isEmpty()) { 2933 addInput(); 2934 } 2935 return getInput().get(0); 2936 } 2937 2938 /** 2939 * @return {@link #output} (Defines the outputs of the action, if any.) 2940 */ 2941 public List<DataRequirement> getOutput() { 2942 if (this.output == null) 2943 this.output = new ArrayList<DataRequirement>(); 2944 return this.output; 2945 } 2946 2947 /** 2948 * @return Returns a reference to <code>this</code> for easy method chaining 2949 */ 2950 public PlanDefinitionActionComponent setOutput(List<DataRequirement> theOutput) { 2951 this.output = theOutput; 2952 return this; 2953 } 2954 2955 public boolean hasOutput() { 2956 if (this.output == null) 2957 return false; 2958 for (DataRequirement item : this.output) 2959 if (!item.isEmpty()) 2960 return true; 2961 return false; 2962 } 2963 2964 public DataRequirement addOutput() { //3 2965 DataRequirement t = new DataRequirement(); 2966 if (this.output == null) 2967 this.output = new ArrayList<DataRequirement>(); 2968 this.output.add(t); 2969 return t; 2970 } 2971 2972 public PlanDefinitionActionComponent addOutput(DataRequirement t) { //3 2973 if (t == null) 2974 return this; 2975 if (this.output == null) 2976 this.output = new ArrayList<DataRequirement>(); 2977 this.output.add(t); 2978 return this; 2979 } 2980 2981 /** 2982 * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist 2983 */ 2984 public DataRequirement getOutputFirstRep() { 2985 if (getOutput().isEmpty()) { 2986 addOutput(); 2987 } 2988 return getOutput().get(0); 2989 } 2990 2991 /** 2992 * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) 2993 */ 2994 public List<PlanDefinitionActionRelatedActionComponent> getRelatedAction() { 2995 if (this.relatedAction == null) 2996 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 2997 return this.relatedAction; 2998 } 2999 3000 /** 3001 * @return Returns a reference to <code>this</code> for easy method chaining 3002 */ 3003 public PlanDefinitionActionComponent setRelatedAction(List<PlanDefinitionActionRelatedActionComponent> theRelatedAction) { 3004 this.relatedAction = theRelatedAction; 3005 return this; 3006 } 3007 3008 public boolean hasRelatedAction() { 3009 if (this.relatedAction == null) 3010 return false; 3011 for (PlanDefinitionActionRelatedActionComponent item : this.relatedAction) 3012 if (!item.isEmpty()) 3013 return true; 3014 return false; 3015 } 3016 3017 public PlanDefinitionActionRelatedActionComponent addRelatedAction() { //3 3018 PlanDefinitionActionRelatedActionComponent t = new PlanDefinitionActionRelatedActionComponent(); 3019 if (this.relatedAction == null) 3020 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 3021 this.relatedAction.add(t); 3022 return t; 3023 } 3024 3025 public PlanDefinitionActionComponent addRelatedAction(PlanDefinitionActionRelatedActionComponent t) { //3 3026 if (t == null) 3027 return this; 3028 if (this.relatedAction == null) 3029 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 3030 this.relatedAction.add(t); 3031 return this; 3032 } 3033 3034 /** 3035 * @return The first repetition of repeating field {@link #relatedAction}, creating it if it does not already exist 3036 */ 3037 public PlanDefinitionActionRelatedActionComponent getRelatedActionFirstRep() { 3038 if (getRelatedAction().isEmpty()) { 3039 addRelatedAction(); 3040 } 3041 return getRelatedAction().get(0); 3042 } 3043 3044 /** 3045 * @return {@link #timing} (An optional value describing when the action should be performed.) 3046 */ 3047 public Type getTiming() { 3048 return this.timing; 3049 } 3050 3051 /** 3052 * @return {@link #timing} (An optional value describing when the action should be performed.) 3053 */ 3054 public DateTimeType getTimingDateTimeType() throws FHIRException { 3055 if (this.timing == null) 3056 this.timing = new DateTimeType(); 3057 if (!(this.timing instanceof DateTimeType)) 3058 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); 3059 return (DateTimeType) this.timing; 3060 } 3061 3062 public boolean hasTimingDateTimeType() { 3063 return this != null && this.timing instanceof DateTimeType; 3064 } 3065 3066 /** 3067 * @return {@link #timing} (An optional value describing when the action should be performed.) 3068 */ 3069 public Age getTimingAge() throws FHIRException { 3070 if (this.timing == null) 3071 this.timing = new Age(); 3072 if (!(this.timing instanceof Age)) 3073 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.timing.getClass().getName()+" was encountered"); 3074 return (Age) this.timing; 3075 } 3076 3077 public boolean hasTimingAge() { 3078 return this != null && this.timing instanceof Age; 3079 } 3080 3081 /** 3082 * @return {@link #timing} (An optional value describing when the action should be performed.) 3083 */ 3084 public Period getTimingPeriod() throws FHIRException { 3085 if (this.timing == null) 3086 this.timing = new Period(); 3087 if (!(this.timing instanceof Period)) 3088 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); 3089 return (Period) this.timing; 3090 } 3091 3092 public boolean hasTimingPeriod() { 3093 return this != null && this.timing instanceof Period; 3094 } 3095 3096 /** 3097 * @return {@link #timing} (An optional value describing when the action should be performed.) 3098 */ 3099 public Duration getTimingDuration() throws FHIRException { 3100 if (this.timing == null) 3101 this.timing = new Duration(); 3102 if (!(this.timing instanceof Duration)) 3103 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered"); 3104 return (Duration) this.timing; 3105 } 3106 3107 public boolean hasTimingDuration() { 3108 return this != null && this.timing instanceof Duration; 3109 } 3110 3111 /** 3112 * @return {@link #timing} (An optional value describing when the action should be performed.) 3113 */ 3114 public Range getTimingRange() throws FHIRException { 3115 if (this.timing == null) 3116 this.timing = new Range(); 3117 if (!(this.timing instanceof Range)) 3118 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered"); 3119 return (Range) this.timing; 3120 } 3121 3122 public boolean hasTimingRange() { 3123 return this != null && this.timing instanceof Range; 3124 } 3125 3126 /** 3127 * @return {@link #timing} (An optional value describing when the action should be performed.) 3128 */ 3129 public Timing getTimingTiming() throws FHIRException { 3130 if (this.timing == null) 3131 this.timing = new Timing(); 3132 if (!(this.timing instanceof Timing)) 3133 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); 3134 return (Timing) this.timing; 3135 } 3136 3137 public boolean hasTimingTiming() { 3138 return this != null && this.timing instanceof Timing; 3139 } 3140 3141 public boolean hasTiming() { 3142 return this.timing != null && !this.timing.isEmpty(); 3143 } 3144 3145 /** 3146 * @param value {@link #timing} (An optional value describing when the action should be performed.) 3147 */ 3148 public PlanDefinitionActionComponent setTiming(Type value) { 3149 if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Duration || value instanceof Range || value instanceof Timing)) 3150 throw new Error("Not the right type for PlanDefinition.action.timing[x]: "+value.fhirType()); 3151 this.timing = value; 3152 return this; 3153 } 3154 3155 /** 3156 * @return {@link #participant} (Indicates who should participate in performing the action described.) 3157 */ 3158 public List<PlanDefinitionActionParticipantComponent> getParticipant() { 3159 if (this.participant == null) 3160 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 3161 return this.participant; 3162 } 3163 3164 /** 3165 * @return Returns a reference to <code>this</code> for easy method chaining 3166 */ 3167 public PlanDefinitionActionComponent setParticipant(List<PlanDefinitionActionParticipantComponent> theParticipant) { 3168 this.participant = theParticipant; 3169 return this; 3170 } 3171 3172 public boolean hasParticipant() { 3173 if (this.participant == null) 3174 return false; 3175 for (PlanDefinitionActionParticipantComponent item : this.participant) 3176 if (!item.isEmpty()) 3177 return true; 3178 return false; 3179 } 3180 3181 public PlanDefinitionActionParticipantComponent addParticipant() { //3 3182 PlanDefinitionActionParticipantComponent t = new PlanDefinitionActionParticipantComponent(); 3183 if (this.participant == null) 3184 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 3185 this.participant.add(t); 3186 return t; 3187 } 3188 3189 public PlanDefinitionActionComponent addParticipant(PlanDefinitionActionParticipantComponent t) { //3 3190 if (t == null) 3191 return this; 3192 if (this.participant == null) 3193 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 3194 this.participant.add(t); 3195 return this; 3196 } 3197 3198 /** 3199 * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist 3200 */ 3201 public PlanDefinitionActionParticipantComponent getParticipantFirstRep() { 3202 if (getParticipant().isEmpty()) { 3203 addParticipant(); 3204 } 3205 return getParticipant().get(0); 3206 } 3207 3208 /** 3209 * @return {@link #type} (The type of action to perform (create, update, remove).) 3210 */ 3211 public CodeableConcept getType() { 3212 if (this.type == null) 3213 if (Configuration.errorOnAutoCreate()) 3214 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.type"); 3215 else if (Configuration.doAutoCreate()) 3216 this.type = new CodeableConcept(); // cc 3217 return this.type; 3218 } 3219 3220 public boolean hasType() { 3221 return this.type != null && !this.type.isEmpty(); 3222 } 3223 3224 /** 3225 * @param value {@link #type} (The type of action to perform (create, update, remove).) 3226 */ 3227 public PlanDefinitionActionComponent setType(CodeableConcept value) { 3228 this.type = value; 3229 return this; 3230 } 3231 3232 /** 3233 * @return {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value 3234 */ 3235 public Enumeration<ActionGroupingBehavior> getGroupingBehaviorElement() { 3236 if (this.groupingBehavior == null) 3237 if (Configuration.errorOnAutoCreate()) 3238 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.groupingBehavior"); 3239 else if (Configuration.doAutoCreate()) 3240 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); // bb 3241 return this.groupingBehavior; 3242 } 3243 3244 public boolean hasGroupingBehaviorElement() { 3245 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 3246 } 3247 3248 public boolean hasGroupingBehavior() { 3249 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 3250 } 3251 3252 /** 3253 * @param value {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value 3254 */ 3255 public PlanDefinitionActionComponent setGroupingBehaviorElement(Enumeration<ActionGroupingBehavior> value) { 3256 this.groupingBehavior = value; 3257 return this; 3258 } 3259 3260 /** 3261 * @return Defines the grouping behavior for the action and its children. 3262 */ 3263 public ActionGroupingBehavior getGroupingBehavior() { 3264 return this.groupingBehavior == null ? null : this.groupingBehavior.getValue(); 3265 } 3266 3267 /** 3268 * @param value Defines the grouping behavior for the action and its children. 3269 */ 3270 public PlanDefinitionActionComponent setGroupingBehavior(ActionGroupingBehavior value) { 3271 if (value == null) 3272 this.groupingBehavior = null; 3273 else { 3274 if (this.groupingBehavior == null) 3275 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); 3276 this.groupingBehavior.setValue(value); 3277 } 3278 return this; 3279 } 3280 3281 /** 3282 * @return {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value 3283 */ 3284 public Enumeration<ActionSelectionBehavior> getSelectionBehaviorElement() { 3285 if (this.selectionBehavior == null) 3286 if (Configuration.errorOnAutoCreate()) 3287 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.selectionBehavior"); 3288 else if (Configuration.doAutoCreate()) 3289 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); // bb 3290 return this.selectionBehavior; 3291 } 3292 3293 public boolean hasSelectionBehaviorElement() { 3294 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 3295 } 3296 3297 public boolean hasSelectionBehavior() { 3298 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 3299 } 3300 3301 /** 3302 * @param value {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value 3303 */ 3304 public PlanDefinitionActionComponent setSelectionBehaviorElement(Enumeration<ActionSelectionBehavior> value) { 3305 this.selectionBehavior = value; 3306 return this; 3307 } 3308 3309 /** 3310 * @return Defines the selection behavior for the action and its children. 3311 */ 3312 public ActionSelectionBehavior getSelectionBehavior() { 3313 return this.selectionBehavior == null ? null : this.selectionBehavior.getValue(); 3314 } 3315 3316 /** 3317 * @param value Defines the selection behavior for the action and its children. 3318 */ 3319 public PlanDefinitionActionComponent setSelectionBehavior(ActionSelectionBehavior value) { 3320 if (value == null) 3321 this.selectionBehavior = null; 3322 else { 3323 if (this.selectionBehavior == null) 3324 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); 3325 this.selectionBehavior.setValue(value); 3326 } 3327 return this; 3328 } 3329 3330 /** 3331 * @return {@link #requiredBehavior} (Defines the required behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 3332 */ 3333 public Enumeration<ActionRequiredBehavior> getRequiredBehaviorElement() { 3334 if (this.requiredBehavior == null) 3335 if (Configuration.errorOnAutoCreate()) 3336 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.requiredBehavior"); 3337 else if (Configuration.doAutoCreate()) 3338 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); // bb 3339 return this.requiredBehavior; 3340 } 3341 3342 public boolean hasRequiredBehaviorElement() { 3343 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 3344 } 3345 3346 public boolean hasRequiredBehavior() { 3347 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 3348 } 3349 3350 /** 3351 * @param value {@link #requiredBehavior} (Defines the required behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 3352 */ 3353 public PlanDefinitionActionComponent setRequiredBehaviorElement(Enumeration<ActionRequiredBehavior> value) { 3354 this.requiredBehavior = value; 3355 return this; 3356 } 3357 3358 /** 3359 * @return Defines the required behavior for the action. 3360 */ 3361 public ActionRequiredBehavior getRequiredBehavior() { 3362 return this.requiredBehavior == null ? null : this.requiredBehavior.getValue(); 3363 } 3364 3365 /** 3366 * @param value Defines the required behavior for the action. 3367 */ 3368 public PlanDefinitionActionComponent setRequiredBehavior(ActionRequiredBehavior value) { 3369 if (value == null) 3370 this.requiredBehavior = null; 3371 else { 3372 if (this.requiredBehavior == null) 3373 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); 3374 this.requiredBehavior.setValue(value); 3375 } 3376 return this; 3377 } 3378 3379 /** 3380 * @return {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value 3381 */ 3382 public Enumeration<ActionPrecheckBehavior> getPrecheckBehaviorElement() { 3383 if (this.precheckBehavior == null) 3384 if (Configuration.errorOnAutoCreate()) 3385 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.precheckBehavior"); 3386 else if (Configuration.doAutoCreate()) 3387 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); // bb 3388 return this.precheckBehavior; 3389 } 3390 3391 public boolean hasPrecheckBehaviorElement() { 3392 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 3393 } 3394 3395 public boolean hasPrecheckBehavior() { 3396 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 3397 } 3398 3399 /** 3400 * @param value {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value 3401 */ 3402 public PlanDefinitionActionComponent setPrecheckBehaviorElement(Enumeration<ActionPrecheckBehavior> value) { 3403 this.precheckBehavior = value; 3404 return this; 3405 } 3406 3407 /** 3408 * @return Defines whether the action should usually be preselected. 3409 */ 3410 public ActionPrecheckBehavior getPrecheckBehavior() { 3411 return this.precheckBehavior == null ? null : this.precheckBehavior.getValue(); 3412 } 3413 3414 /** 3415 * @param value Defines whether the action should usually be preselected. 3416 */ 3417 public PlanDefinitionActionComponent setPrecheckBehavior(ActionPrecheckBehavior value) { 3418 if (value == null) 3419 this.precheckBehavior = null; 3420 else { 3421 if (this.precheckBehavior == null) 3422 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); 3423 this.precheckBehavior.setValue(value); 3424 } 3425 return this; 3426 } 3427 3428 /** 3429 * @return {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value 3430 */ 3431 public Enumeration<ActionCardinalityBehavior> getCardinalityBehaviorElement() { 3432 if (this.cardinalityBehavior == null) 3433 if (Configuration.errorOnAutoCreate()) 3434 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.cardinalityBehavior"); 3435 else if (Configuration.doAutoCreate()) 3436 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); // bb 3437 return this.cardinalityBehavior; 3438 } 3439 3440 public boolean hasCardinalityBehaviorElement() { 3441 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 3442 } 3443 3444 public boolean hasCardinalityBehavior() { 3445 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 3446 } 3447 3448 /** 3449 * @param value {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value 3450 */ 3451 public PlanDefinitionActionComponent setCardinalityBehaviorElement(Enumeration<ActionCardinalityBehavior> value) { 3452 this.cardinalityBehavior = value; 3453 return this; 3454 } 3455 3456 /** 3457 * @return Defines whether the action can be selected multiple times. 3458 */ 3459 public ActionCardinalityBehavior getCardinalityBehavior() { 3460 return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue(); 3461 } 3462 3463 /** 3464 * @param value Defines whether the action can be selected multiple times. 3465 */ 3466 public PlanDefinitionActionComponent setCardinalityBehavior(ActionCardinalityBehavior value) { 3467 if (value == null) 3468 this.cardinalityBehavior = null; 3469 else { 3470 if (this.cardinalityBehavior == null) 3471 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); 3472 this.cardinalityBehavior.setValue(value); 3473 } 3474 return this; 3475 } 3476 3477 /** 3478 * @return {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.) 3479 */ 3480 public Type getDefinition() { 3481 return this.definition; 3482 } 3483 3484 /** 3485 * @return {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.) 3486 */ 3487 public CanonicalType getDefinitionCanonicalType() throws FHIRException { 3488 if (this.definition == null) 3489 this.definition = new CanonicalType(); 3490 if (!(this.definition instanceof CanonicalType)) 3491 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.definition.getClass().getName()+" was encountered"); 3492 return (CanonicalType) this.definition; 3493 } 3494 3495 public boolean hasDefinitionCanonicalType() { 3496 return this != null && this.definition instanceof CanonicalType; 3497 } 3498 3499 /** 3500 * @return {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.) 3501 */ 3502 public UriType getDefinitionUriType() throws FHIRException { 3503 if (this.definition == null) 3504 this.definition = new UriType(); 3505 if (!(this.definition instanceof UriType)) 3506 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.definition.getClass().getName()+" was encountered"); 3507 return (UriType) this.definition; 3508 } 3509 3510 public boolean hasDefinitionUriType() { 3511 return this != null && this.definition instanceof UriType; 3512 } 3513 3514 public boolean hasDefinition() { 3515 return this.definition != null && !this.definition.isEmpty(); 3516 } 3517 3518 /** 3519 * @param value {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.) 3520 */ 3521 public PlanDefinitionActionComponent setDefinition(Type value) { 3522 if (value != null && !(value instanceof CanonicalType || value instanceof UriType)) 3523 throw new Error("Not the right type for PlanDefinition.action.definition[x]: "+value.fhirType()); 3524 this.definition = value; 3525 return this; 3526 } 3527 3528 /** 3529 * @return {@link #transform} (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value 3530 */ 3531 public CanonicalType getTransformElement() { 3532 if (this.transform == null) 3533 if (Configuration.errorOnAutoCreate()) 3534 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.transform"); 3535 else if (Configuration.doAutoCreate()) 3536 this.transform = new CanonicalType(); // bb 3537 return this.transform; 3538 } 3539 3540 public boolean hasTransformElement() { 3541 return this.transform != null && !this.transform.isEmpty(); 3542 } 3543 3544 public boolean hasTransform() { 3545 return this.transform != null && !this.transform.isEmpty(); 3546 } 3547 3548 /** 3549 * @param value {@link #transform} (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value 3550 */ 3551 public PlanDefinitionActionComponent setTransformElement(CanonicalType value) { 3552 this.transform = value; 3553 return this; 3554 } 3555 3556 /** 3557 * @return A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input. 3558 */ 3559 public String getTransform() { 3560 return this.transform == null ? null : this.transform.getValue(); 3561 } 3562 3563 /** 3564 * @param value A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input. 3565 */ 3566 public PlanDefinitionActionComponent setTransform(String value) { 3567 if (Utilities.noString(value)) 3568 this.transform = null; 3569 else { 3570 if (this.transform == null) 3571 this.transform = new CanonicalType(); 3572 this.transform.setValue(value); 3573 } 3574 return this; 3575 } 3576 3577 /** 3578 * @return {@link #dynamicValue} (Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.) 3579 */ 3580 public List<PlanDefinitionActionDynamicValueComponent> getDynamicValue() { 3581 if (this.dynamicValue == null) 3582 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3583 return this.dynamicValue; 3584 } 3585 3586 /** 3587 * @return Returns a reference to <code>this</code> for easy method chaining 3588 */ 3589 public PlanDefinitionActionComponent setDynamicValue(List<PlanDefinitionActionDynamicValueComponent> theDynamicValue) { 3590 this.dynamicValue = theDynamicValue; 3591 return this; 3592 } 3593 3594 public boolean hasDynamicValue() { 3595 if (this.dynamicValue == null) 3596 return false; 3597 for (PlanDefinitionActionDynamicValueComponent item : this.dynamicValue) 3598 if (!item.isEmpty()) 3599 return true; 3600 return false; 3601 } 3602 3603 public PlanDefinitionActionDynamicValueComponent addDynamicValue() { //3 3604 PlanDefinitionActionDynamicValueComponent t = new PlanDefinitionActionDynamicValueComponent(); 3605 if (this.dynamicValue == null) 3606 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3607 this.dynamicValue.add(t); 3608 return t; 3609 } 3610 3611 public PlanDefinitionActionComponent addDynamicValue(PlanDefinitionActionDynamicValueComponent t) { //3 3612 if (t == null) 3613 return this; 3614 if (this.dynamicValue == null) 3615 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3616 this.dynamicValue.add(t); 3617 return this; 3618 } 3619 3620 /** 3621 * @return The first repetition of repeating field {@link #dynamicValue}, creating it if it does not already exist 3622 */ 3623 public PlanDefinitionActionDynamicValueComponent getDynamicValueFirstRep() { 3624 if (getDynamicValue().isEmpty()) { 3625 addDynamicValue(); 3626 } 3627 return getDynamicValue().get(0); 3628 } 3629 3630 /** 3631 * @return {@link #action} (Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.) 3632 */ 3633 public List<PlanDefinitionActionComponent> getAction() { 3634 if (this.action == null) 3635 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3636 return this.action; 3637 } 3638 3639 /** 3640 * @return Returns a reference to <code>this</code> for easy method chaining 3641 */ 3642 public PlanDefinitionActionComponent setAction(List<PlanDefinitionActionComponent> theAction) { 3643 this.action = theAction; 3644 return this; 3645 } 3646 3647 public boolean hasAction() { 3648 if (this.action == null) 3649 return false; 3650 for (PlanDefinitionActionComponent item : this.action) 3651 if (!item.isEmpty()) 3652 return true; 3653 return false; 3654 } 3655 3656 public PlanDefinitionActionComponent addAction() { //3 3657 PlanDefinitionActionComponent t = new PlanDefinitionActionComponent(); 3658 if (this.action == null) 3659 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3660 this.action.add(t); 3661 return t; 3662 } 3663 3664 public PlanDefinitionActionComponent addAction(PlanDefinitionActionComponent t) { //3 3665 if (t == null) 3666 return this; 3667 if (this.action == null) 3668 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3669 this.action.add(t); 3670 return this; 3671 } 3672 3673 /** 3674 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 3675 */ 3676 public PlanDefinitionActionComponent getActionFirstRep() { 3677 if (getAction().isEmpty()) { 3678 addAction(); 3679 } 3680 return getAction().get(0); 3681 } 3682 3683 protected void listChildren(List<Property> children) { 3684 super.listChildren(children); 3685 children.add(new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix)); 3686 children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title)); 3687 children.add(new Property("description", "string", "A brief description of the action used to provide a summary to display to the user.", 0, 1, description)); 3688 children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent)); 3689 children.add(new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority)); 3690 children.add(new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code)); 3691 children.add(new Property("reason", "CodeableConcept", "A description of why this action is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, reason)); 3692 children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation)); 3693 children.add(new Property("goalId", "id", "Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.", 0, java.lang.Integer.MAX_VALUE, goalId)); 3694 children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the action and its children, if any.", 0, 1, subject)); 3695 children.add(new Property("trigger", "TriggerDefinition", "A description of when the action should be triggered.", 0, java.lang.Integer.MAX_VALUE, trigger)); 3696 children.add(new Property("condition", "", "An expression that describes applicability criteria or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition)); 3697 children.add(new Property("input", "DataRequirement", "Defines input data requirements for the action.", 0, java.lang.Integer.MAX_VALUE, input)); 3698 children.add(new Property("output", "DataRequirement", "Defines the outputs of the action, if any.", 0, java.lang.Integer.MAX_VALUE, output)); 3699 children.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction)); 3700 children.add(new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing)); 3701 children.add(new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant)); 3702 children.add(new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type)); 3703 children.add(new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior)); 3704 children.add(new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior)); 3705 children.add(new Property("requiredBehavior", "code", "Defines the required behavior for the action.", 0, 1, requiredBehavior)); 3706 children.add(new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior)); 3707 children.add(new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior)); 3708 children.add(new Property("definition[x]", "canonical(ActivityDefinition|PlanDefinition|Questionnaire)|uri", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition)); 3709 children.add(new Property("transform", "canonical(StructureMap)", "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", 0, 1, transform)); 3710 children.add(new Property("dynamicValue", "", "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue)); 3711 children.add(new Property("action", "@PlanDefinition.action", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action)); 3712 } 3713 3714 @Override 3715 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3716 switch (_hash) { 3717 case -980110702: /*prefix*/ return new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix); 3718 case 110371416: /*title*/ return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title); 3719 case -1724546052: /*description*/ return new Property("description", "string", "A brief description of the action used to provide a summary to display to the user.", 0, 1, description); 3720 case -900391049: /*textEquivalent*/ return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent); 3721 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority); 3722 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code); 3723 case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A description of why this action is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, reason); 3724 case 1587405498: /*documentation*/ return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation); 3725 case -1240658034: /*goalId*/ return new Property("goalId", "id", "Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.", 0, java.lang.Integer.MAX_VALUE, goalId); 3726 case -573640748: /*subject[x]*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the action and its children, if any.", 0, 1, subject); 3727 case -1867885268: /*subject*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the action and its children, if any.", 0, 1, subject); 3728 case -1257122603: /*subjectCodeableConcept*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the action and its children, if any.", 0, 1, subject); 3729 case 772938623: /*subjectReference*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the action and its children, if any.", 0, 1, subject); 3730 case -1059891784: /*trigger*/ return new Property("trigger", "TriggerDefinition", "A description of when the action should be triggered.", 0, java.lang.Integer.MAX_VALUE, trigger); 3731 case -861311717: /*condition*/ return new Property("condition", "", "An expression that describes applicability criteria or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition); 3732 case 100358090: /*input*/ return new Property("input", "DataRequirement", "Defines input data requirements for the action.", 0, java.lang.Integer.MAX_VALUE, input); 3733 case -1005512447: /*output*/ return new Property("output", "DataRequirement", "Defines the outputs of the action, if any.", 0, java.lang.Integer.MAX_VALUE, output); 3734 case -384107967: /*relatedAction*/ return new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction); 3735 case 164632566: /*timing[x]*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3736 case -873664438: /*timing*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3737 case -1837458939: /*timingDateTime*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3738 case 164607061: /*timingAge*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3739 case -615615829: /*timingPeriod*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3740 case -1327253506: /*timingDuration*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3741 case -710871277: /*timingRange*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3742 case -497554124: /*timingTiming*/ return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing); 3743 case 767422259: /*participant*/ return new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant); 3744 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type); 3745 case 586678389: /*groupingBehavior*/ return new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior); 3746 case 168639486: /*selectionBehavior*/ return new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior); 3747 case -1163906287: /*requiredBehavior*/ return new Property("requiredBehavior", "code", "Defines the required behavior for the action.", 0, 1, requiredBehavior); 3748 case -1174249033: /*precheckBehavior*/ return new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior); 3749 case -922577408: /*cardinalityBehavior*/ return new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior); 3750 case -1139422643: /*definition[x]*/ return new Property("definition[x]", "canonical(ActivityDefinition|PlanDefinition|Questionnaire)|uri", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition); 3751 case -1014418093: /*definition*/ return new Property("definition[x]", "canonical(ActivityDefinition|PlanDefinition|Questionnaire)|uri", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition); 3752 case 933485793: /*definitionCanonical*/ return new Property("definition[x]", "canonical(ActivityDefinition|PlanDefinition|Questionnaire)|uri", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition); 3753 case -1139428583: /*definitionUri*/ return new Property("definition[x]", "canonical(ActivityDefinition|PlanDefinition|Questionnaire)|uri", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition); 3754 case 1052666732: /*transform*/ return new Property("transform", "canonical(StructureMap)", "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", 0, 1, transform); 3755 case 572625010: /*dynamicValue*/ return new Property("dynamicValue", "", "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue); 3756 case -1422950858: /*action*/ return new Property("action", "@PlanDefinition.action", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action); 3757 default: return super.getNamedProperty(_hash, _name, _checkValid); 3758 } 3759 3760 } 3761 3762 @Override 3763 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3764 switch (hash) { 3765 case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType 3766 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3767 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3768 case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType 3769 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority> 3770 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 3771 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept 3772 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact 3773 case -1240658034: /*goalId*/ return this.goalId == null ? new Base[0] : this.goalId.toArray(new Base[this.goalId.size()]); // IdType 3774 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Type 3775 case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : this.trigger.toArray(new Base[this.trigger.size()]); // TriggerDefinition 3776 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // PlanDefinitionActionConditionComponent 3777 case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // DataRequirement 3778 case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // DataRequirement 3779 case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : this.relatedAction.toArray(new Base[this.relatedAction.size()]); // PlanDefinitionActionRelatedActionComponent 3780 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type 3781 case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // PlanDefinitionActionParticipantComponent 3782 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3783 case 586678389: /*groupingBehavior*/ return this.groupingBehavior == null ? new Base[0] : new Base[] {this.groupingBehavior}; // Enumeration<ActionGroupingBehavior> 3784 case 168639486: /*selectionBehavior*/ return this.selectionBehavior == null ? new Base[0] : new Base[] {this.selectionBehavior}; // Enumeration<ActionSelectionBehavior> 3785 case -1163906287: /*requiredBehavior*/ return this.requiredBehavior == null ? new Base[0] : new Base[] {this.requiredBehavior}; // Enumeration<ActionRequiredBehavior> 3786 case -1174249033: /*precheckBehavior*/ return this.precheckBehavior == null ? new Base[0] : new Base[] {this.precheckBehavior}; // Enumeration<ActionPrecheckBehavior> 3787 case -922577408: /*cardinalityBehavior*/ return this.cardinalityBehavior == null ? new Base[0] : new Base[] {this.cardinalityBehavior}; // Enumeration<ActionCardinalityBehavior> 3788 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Type 3789 case 1052666732: /*transform*/ return this.transform == null ? new Base[0] : new Base[] {this.transform}; // CanonicalType 3790 case 572625010: /*dynamicValue*/ return this.dynamicValue == null ? new Base[0] : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // PlanDefinitionActionDynamicValueComponent 3791 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // PlanDefinitionActionComponent 3792 default: return super.getProperty(hash, name, checkValid); 3793 } 3794 3795 } 3796 3797 @Override 3798 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3799 switch (hash) { 3800 case -980110702: // prefix 3801 this.prefix = castToString(value); // StringType 3802 return value; 3803 case 110371416: // title 3804 this.title = castToString(value); // StringType 3805 return value; 3806 case -1724546052: // description 3807 this.description = castToString(value); // StringType 3808 return value; 3809 case -900391049: // textEquivalent 3810 this.textEquivalent = castToString(value); // StringType 3811 return value; 3812 case -1165461084: // priority 3813 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 3814 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 3815 return value; 3816 case 3059181: // code 3817 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 3818 return value; 3819 case -934964668: // reason 3820 this.getReason().add(castToCodeableConcept(value)); // CodeableConcept 3821 return value; 3822 case 1587405498: // documentation 3823 this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact 3824 return value; 3825 case -1240658034: // goalId 3826 this.getGoalId().add(castToId(value)); // IdType 3827 return value; 3828 case -1867885268: // subject 3829 this.subject = castToType(value); // Type 3830 return value; 3831 case -1059891784: // trigger 3832 this.getTrigger().add(castToTriggerDefinition(value)); // TriggerDefinition 3833 return value; 3834 case -861311717: // condition 3835 this.getCondition().add((PlanDefinitionActionConditionComponent) value); // PlanDefinitionActionConditionComponent 3836 return value; 3837 case 100358090: // input 3838 this.getInput().add(castToDataRequirement(value)); // DataRequirement 3839 return value; 3840 case -1005512447: // output 3841 this.getOutput().add(castToDataRequirement(value)); // DataRequirement 3842 return value; 3843 case -384107967: // relatedAction 3844 this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value); // PlanDefinitionActionRelatedActionComponent 3845 return value; 3846 case -873664438: // timing 3847 this.timing = castToType(value); // Type 3848 return value; 3849 case 767422259: // participant 3850 this.getParticipant().add((PlanDefinitionActionParticipantComponent) value); // PlanDefinitionActionParticipantComponent 3851 return value; 3852 case 3575610: // type 3853 this.type = castToCodeableConcept(value); // CodeableConcept 3854 return value; 3855 case 586678389: // groupingBehavior 3856 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 3857 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 3858 return value; 3859 case 168639486: // selectionBehavior 3860 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 3861 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 3862 return value; 3863 case -1163906287: // requiredBehavior 3864 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 3865 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 3866 return value; 3867 case -1174249033: // precheckBehavior 3868 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 3869 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 3870 return value; 3871 case -922577408: // cardinalityBehavior 3872 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 3873 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 3874 return value; 3875 case -1014418093: // definition 3876 this.definition = castToType(value); // Type 3877 return value; 3878 case 1052666732: // transform 3879 this.transform = castToCanonical(value); // CanonicalType 3880 return value; 3881 case 572625010: // dynamicValue 3882 this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value); // PlanDefinitionActionDynamicValueComponent 3883 return value; 3884 case -1422950858: // action 3885 this.getAction().add((PlanDefinitionActionComponent) value); // PlanDefinitionActionComponent 3886 return value; 3887 default: return super.setProperty(hash, name, value); 3888 } 3889 3890 } 3891 3892 @Override 3893 public Base setProperty(String name, Base value) throws FHIRException { 3894 if (name.equals("prefix")) { 3895 this.prefix = castToString(value); // StringType 3896 } else if (name.equals("title")) { 3897 this.title = castToString(value); // StringType 3898 } else if (name.equals("description")) { 3899 this.description = castToString(value); // StringType 3900 } else if (name.equals("textEquivalent")) { 3901 this.textEquivalent = castToString(value); // StringType 3902 } else if (name.equals("priority")) { 3903 value = new RequestPriorityEnumFactory().fromType(castToCode(value)); 3904 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 3905 } else if (name.equals("code")) { 3906 this.getCode().add(castToCodeableConcept(value)); 3907 } else if (name.equals("reason")) { 3908 this.getReason().add(castToCodeableConcept(value)); 3909 } else if (name.equals("documentation")) { 3910 this.getDocumentation().add(castToRelatedArtifact(value)); 3911 } else if (name.equals("goalId")) { 3912 this.getGoalId().add(castToId(value)); 3913 } else if (name.equals("subject[x]")) { 3914 this.subject = castToType(value); // Type 3915 } else if (name.equals("trigger")) { 3916 this.getTrigger().add(castToTriggerDefinition(value)); 3917 } else if (name.equals("condition")) { 3918 this.getCondition().add((PlanDefinitionActionConditionComponent) value); 3919 } else if (name.equals("input")) { 3920 this.getInput().add(castToDataRequirement(value)); 3921 } else if (name.equals("output")) { 3922 this.getOutput().add(castToDataRequirement(value)); 3923 } else if (name.equals("relatedAction")) { 3924 this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value); 3925 } else if (name.equals("timing[x]")) { 3926 this.timing = castToType(value); // Type 3927 } else if (name.equals("participant")) { 3928 this.getParticipant().add((PlanDefinitionActionParticipantComponent) value); 3929 } else if (name.equals("type")) { 3930 this.type = castToCodeableConcept(value); // CodeableConcept 3931 } else if (name.equals("groupingBehavior")) { 3932 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 3933 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 3934 } else if (name.equals("selectionBehavior")) { 3935 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 3936 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 3937 } else if (name.equals("requiredBehavior")) { 3938 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 3939 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 3940 } else if (name.equals("precheckBehavior")) { 3941 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 3942 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 3943 } else if (name.equals("cardinalityBehavior")) { 3944 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 3945 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 3946 } else if (name.equals("definition[x]")) { 3947 this.definition = castToType(value); // Type 3948 } else if (name.equals("transform")) { 3949 this.transform = castToCanonical(value); // CanonicalType 3950 } else if (name.equals("dynamicValue")) { 3951 this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value); 3952 } else if (name.equals("action")) { 3953 this.getAction().add((PlanDefinitionActionComponent) value); 3954 } else 3955 return super.setProperty(name, value); 3956 return value; 3957 } 3958 3959 @Override 3960 public Base makeProperty(int hash, String name) throws FHIRException { 3961 switch (hash) { 3962 case -980110702: return getPrefixElement(); 3963 case 110371416: return getTitleElement(); 3964 case -1724546052: return getDescriptionElement(); 3965 case -900391049: return getTextEquivalentElement(); 3966 case -1165461084: return getPriorityElement(); 3967 case 3059181: return addCode(); 3968 case -934964668: return addReason(); 3969 case 1587405498: return addDocumentation(); 3970 case -1240658034: return addGoalIdElement(); 3971 case -573640748: return getSubject(); 3972 case -1867885268: return getSubject(); 3973 case -1059891784: return addTrigger(); 3974 case -861311717: return addCondition(); 3975 case 100358090: return addInput(); 3976 case -1005512447: return addOutput(); 3977 case -384107967: return addRelatedAction(); 3978 case 164632566: return getTiming(); 3979 case -873664438: return getTiming(); 3980 case 767422259: return addParticipant(); 3981 case 3575610: return getType(); 3982 case 586678389: return getGroupingBehaviorElement(); 3983 case 168639486: return getSelectionBehaviorElement(); 3984 case -1163906287: return getRequiredBehaviorElement(); 3985 case -1174249033: return getPrecheckBehaviorElement(); 3986 case -922577408: return getCardinalityBehaviorElement(); 3987 case -1139422643: return getDefinition(); 3988 case -1014418093: return getDefinition(); 3989 case 1052666732: return getTransformElement(); 3990 case 572625010: return addDynamicValue(); 3991 case -1422950858: return addAction(); 3992 default: return super.makeProperty(hash, name); 3993 } 3994 3995 } 3996 3997 @Override 3998 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3999 switch (hash) { 4000 case -980110702: /*prefix*/ return new String[] {"string"}; 4001 case 110371416: /*title*/ return new String[] {"string"}; 4002 case -1724546052: /*description*/ return new String[] {"string"}; 4003 case -900391049: /*textEquivalent*/ return new String[] {"string"}; 4004 case -1165461084: /*priority*/ return new String[] {"code"}; 4005 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 4006 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 4007 case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"}; 4008 case -1240658034: /*goalId*/ return new String[] {"id"}; 4009 case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"}; 4010 case -1059891784: /*trigger*/ return new String[] {"TriggerDefinition"}; 4011 case -861311717: /*condition*/ return new String[] {}; 4012 case 100358090: /*input*/ return new String[] {"DataRequirement"}; 4013 case -1005512447: /*output*/ return new String[] {"DataRequirement"}; 4014 case -384107967: /*relatedAction*/ return new String[] {}; 4015 case -873664438: /*timing*/ return new String[] {"dateTime", "Age", "Period", "Duration", "Range", "Timing"}; 4016 case 767422259: /*participant*/ return new String[] {}; 4017 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4018 case 586678389: /*groupingBehavior*/ return new String[] {"code"}; 4019 case 168639486: /*selectionBehavior*/ return new String[] {"code"}; 4020 case -1163906287: /*requiredBehavior*/ return new String[] {"code"}; 4021 case -1174249033: /*precheckBehavior*/ return new String[] {"code"}; 4022 case -922577408: /*cardinalityBehavior*/ return new String[] {"code"}; 4023 case -1014418093: /*definition*/ return new String[] {"canonical", "uri"}; 4024 case 1052666732: /*transform*/ return new String[] {"canonical"}; 4025 case 572625010: /*dynamicValue*/ return new String[] {}; 4026 case -1422950858: /*action*/ return new String[] {"@PlanDefinition.action"}; 4027 default: return super.getTypesForProperty(hash, name); 4028 } 4029 4030 } 4031 4032 @Override 4033 public Base addChild(String name) throws FHIRException { 4034 if (name.equals("prefix")) { 4035 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.prefix"); 4036 } 4037 else if (name.equals("title")) { 4038 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.title"); 4039 } 4040 else if (name.equals("description")) { 4041 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 4042 } 4043 else if (name.equals("textEquivalent")) { 4044 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.textEquivalent"); 4045 } 4046 else if (name.equals("priority")) { 4047 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.priority"); 4048 } 4049 else if (name.equals("code")) { 4050 return addCode(); 4051 } 4052 else if (name.equals("reason")) { 4053 return addReason(); 4054 } 4055 else if (name.equals("documentation")) { 4056 return addDocumentation(); 4057 } 4058 else if (name.equals("goalId")) { 4059 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.goalId"); 4060 } 4061 else if (name.equals("subjectCodeableConcept")) { 4062 this.subject = new CodeableConcept(); 4063 return this.subject; 4064 } 4065 else if (name.equals("subjectReference")) { 4066 this.subject = new Reference(); 4067 return this.subject; 4068 } 4069 else if (name.equals("trigger")) { 4070 return addTrigger(); 4071 } 4072 else if (name.equals("condition")) { 4073 return addCondition(); 4074 } 4075 else if (name.equals("input")) { 4076 return addInput(); 4077 } 4078 else if (name.equals("output")) { 4079 return addOutput(); 4080 } 4081 else if (name.equals("relatedAction")) { 4082 return addRelatedAction(); 4083 } 4084 else if (name.equals("timingDateTime")) { 4085 this.timing = new DateTimeType(); 4086 return this.timing; 4087 } 4088 else if (name.equals("timingAge")) { 4089 this.timing = new Age(); 4090 return this.timing; 4091 } 4092 else if (name.equals("timingPeriod")) { 4093 this.timing = new Period(); 4094 return this.timing; 4095 } 4096 else if (name.equals("timingDuration")) { 4097 this.timing = new Duration(); 4098 return this.timing; 4099 } 4100 else if (name.equals("timingRange")) { 4101 this.timing = new Range(); 4102 return this.timing; 4103 } 4104 else if (name.equals("timingTiming")) { 4105 this.timing = new Timing(); 4106 return this.timing; 4107 } 4108 else if (name.equals("participant")) { 4109 return addParticipant(); 4110 } 4111 else if (name.equals("type")) { 4112 this.type = new CodeableConcept(); 4113 return this.type; 4114 } 4115 else if (name.equals("groupingBehavior")) { 4116 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.groupingBehavior"); 4117 } 4118 else if (name.equals("selectionBehavior")) { 4119 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.selectionBehavior"); 4120 } 4121 else if (name.equals("requiredBehavior")) { 4122 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.requiredBehavior"); 4123 } 4124 else if (name.equals("precheckBehavior")) { 4125 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.precheckBehavior"); 4126 } 4127 else if (name.equals("cardinalityBehavior")) { 4128 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.cardinalityBehavior"); 4129 } 4130 else if (name.equals("definitionCanonical")) { 4131 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.definition[x]"); 4132 } 4133 else if (name.equals("definitionUri")) { 4134 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.definition[x]"); 4135 } 4136 else if (name.equals("transform")) { 4137 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.transform"); 4138 } 4139 else if (name.equals("dynamicValue")) { 4140 return addDynamicValue(); 4141 } 4142 else if (name.equals("action")) { 4143 return addAction(); 4144 } 4145 else 4146 return super.addChild(name); 4147 } 4148 4149 public PlanDefinitionActionComponent copy() { 4150 PlanDefinitionActionComponent dst = new PlanDefinitionActionComponent(); 4151 copyValues(dst); 4152 return dst; 4153 } 4154 4155 public void copyValues(PlanDefinitionActionComponent dst) { 4156 super.copyValues(dst); 4157 dst.prefix = prefix == null ? null : prefix.copy(); 4158 dst.title = title == null ? null : title.copy(); 4159 dst.description = description == null ? null : description.copy(); 4160 dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); 4161 dst.priority = priority == null ? null : priority.copy(); 4162 if (code != null) { 4163 dst.code = new ArrayList<CodeableConcept>(); 4164 for (CodeableConcept i : code) 4165 dst.code.add(i.copy()); 4166 }; 4167 if (reason != null) { 4168 dst.reason = new ArrayList<CodeableConcept>(); 4169 for (CodeableConcept i : reason) 4170 dst.reason.add(i.copy()); 4171 }; 4172 if (documentation != null) { 4173 dst.documentation = new ArrayList<RelatedArtifact>(); 4174 for (RelatedArtifact i : documentation) 4175 dst.documentation.add(i.copy()); 4176 }; 4177 if (goalId != null) { 4178 dst.goalId = new ArrayList<IdType>(); 4179 for (IdType i : goalId) 4180 dst.goalId.add(i.copy()); 4181 }; 4182 dst.subject = subject == null ? null : subject.copy(); 4183 if (trigger != null) { 4184 dst.trigger = new ArrayList<TriggerDefinition>(); 4185 for (TriggerDefinition i : trigger) 4186 dst.trigger.add(i.copy()); 4187 }; 4188 if (condition != null) { 4189 dst.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 4190 for (PlanDefinitionActionConditionComponent i : condition) 4191 dst.condition.add(i.copy()); 4192 }; 4193 if (input != null) { 4194 dst.input = new ArrayList<DataRequirement>(); 4195 for (DataRequirement i : input) 4196 dst.input.add(i.copy()); 4197 }; 4198 if (output != null) { 4199 dst.output = new ArrayList<DataRequirement>(); 4200 for (DataRequirement i : output) 4201 dst.output.add(i.copy()); 4202 }; 4203 if (relatedAction != null) { 4204 dst.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 4205 for (PlanDefinitionActionRelatedActionComponent i : relatedAction) 4206 dst.relatedAction.add(i.copy()); 4207 }; 4208 dst.timing = timing == null ? null : timing.copy(); 4209 if (participant != null) { 4210 dst.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 4211 for (PlanDefinitionActionParticipantComponent i : participant) 4212 dst.participant.add(i.copy()); 4213 }; 4214 dst.type = type == null ? null : type.copy(); 4215 dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy(); 4216 dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy(); 4217 dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy(); 4218 dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy(); 4219 dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy(); 4220 dst.definition = definition == null ? null : definition.copy(); 4221 dst.transform = transform == null ? null : transform.copy(); 4222 if (dynamicValue != null) { 4223 dst.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 4224 for (PlanDefinitionActionDynamicValueComponent i : dynamicValue) 4225 dst.dynamicValue.add(i.copy()); 4226 }; 4227 if (action != null) { 4228 dst.action = new ArrayList<PlanDefinitionActionComponent>(); 4229 for (PlanDefinitionActionComponent i : action) 4230 dst.action.add(i.copy()); 4231 }; 4232 } 4233 4234 @Override 4235 public boolean equalsDeep(Base other_) { 4236 if (!super.equalsDeep(other_)) 4237 return false; 4238 if (!(other_ instanceof PlanDefinitionActionComponent)) 4239 return false; 4240 PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other_; 4241 return compareDeep(prefix, o.prefix, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) 4242 && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(priority, o.priority, true) 4243 && compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) && compareDeep(documentation, o.documentation, true) 4244 && compareDeep(goalId, o.goalId, true) && compareDeep(subject, o.subject, true) && compareDeep(trigger, o.trigger, true) 4245 && compareDeep(condition, o.condition, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true) 4246 && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true) 4247 && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true) 4248 && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true) 4249 && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(definition, o.definition, true) 4250 && compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true) 4251 && compareDeep(action, o.action, true); 4252 } 4253 4254 @Override 4255 public boolean equalsShallow(Base other_) { 4256 if (!super.equalsShallow(other_)) 4257 return false; 4258 if (!(other_ instanceof PlanDefinitionActionComponent)) 4259 return false; 4260 PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other_; 4261 return compareValues(prefix, o.prefix, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) 4262 && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(priority, o.priority, true) 4263 && compareValues(goalId, o.goalId, true) && compareValues(groupingBehavior, o.groupingBehavior, true) 4264 && compareValues(selectionBehavior, o.selectionBehavior, true) && compareValues(requiredBehavior, o.requiredBehavior, true) 4265 && compareValues(precheckBehavior, o.precheckBehavior, true) && compareValues(cardinalityBehavior, o.cardinalityBehavior, true) 4266 ; 4267 } 4268 4269 public boolean isEmpty() { 4270 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(prefix, title, description 4271 , textEquivalent, priority, code, reason, documentation, goalId, subject, trigger 4272 , condition, input, output, relatedAction, timing, participant, type, groupingBehavior 4273 , selectionBehavior, requiredBehavior, precheckBehavior, cardinalityBehavior, definition 4274 , transform, dynamicValue, action); 4275 } 4276 4277 public String fhirType() { 4278 return "PlanDefinition.action"; 4279 4280 } 4281 4282 } 4283 4284 @Block() 4285 public static class PlanDefinitionActionConditionComponent extends BackboneElement implements IBaseBackboneElement { 4286 /** 4287 * The kind of condition. 4288 */ 4289 @Child(name = "kind", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4290 @Description(shortDefinition="applicability | start | stop", formalDefinition="The kind of condition." ) 4291 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-condition-kind") 4292 protected Enumeration<ActionConditionKind> kind; 4293 4294 /** 4295 * An expression that returns true or false, indicating whether the condition is satisfied. 4296 */ 4297 @Child(name = "expression", type = {Expression.class}, order=2, min=0, max=1, modifier=false, summary=false) 4298 @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether the condition is satisfied." ) 4299 protected Expression expression; 4300 4301 private static final long serialVersionUID = -455150438L; 4302 4303 /** 4304 * Constructor 4305 */ 4306 public PlanDefinitionActionConditionComponent() { 4307 super(); 4308 } 4309 4310 /** 4311 * Constructor 4312 */ 4313 public PlanDefinitionActionConditionComponent(Enumeration<ActionConditionKind> kind) { 4314 super(); 4315 this.kind = kind; 4316 } 4317 4318 /** 4319 * @return {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 4320 */ 4321 public Enumeration<ActionConditionKind> getKindElement() { 4322 if (this.kind == null) 4323 if (Configuration.errorOnAutoCreate()) 4324 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.kind"); 4325 else if (Configuration.doAutoCreate()) 4326 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); // bb 4327 return this.kind; 4328 } 4329 4330 public boolean hasKindElement() { 4331 return this.kind != null && !this.kind.isEmpty(); 4332 } 4333 4334 public boolean hasKind() { 4335 return this.kind != null && !this.kind.isEmpty(); 4336 } 4337 4338 /** 4339 * @param value {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 4340 */ 4341 public PlanDefinitionActionConditionComponent setKindElement(Enumeration<ActionConditionKind> value) { 4342 this.kind = value; 4343 return this; 4344 } 4345 4346 /** 4347 * @return The kind of condition. 4348 */ 4349 public ActionConditionKind getKind() { 4350 return this.kind == null ? null : this.kind.getValue(); 4351 } 4352 4353 /** 4354 * @param value The kind of condition. 4355 */ 4356 public PlanDefinitionActionConditionComponent setKind(ActionConditionKind value) { 4357 if (this.kind == null) 4358 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); 4359 this.kind.setValue(value); 4360 return this; 4361 } 4362 4363 /** 4364 * @return {@link #expression} (An expression that returns true or false, indicating whether the condition is satisfied.) 4365 */ 4366 public Expression getExpression() { 4367 if (this.expression == null) 4368 if (Configuration.errorOnAutoCreate()) 4369 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.expression"); 4370 else if (Configuration.doAutoCreate()) 4371 this.expression = new Expression(); // cc 4372 return this.expression; 4373 } 4374 4375 public boolean hasExpression() { 4376 return this.expression != null && !this.expression.isEmpty(); 4377 } 4378 4379 /** 4380 * @param value {@link #expression} (An expression that returns true or false, indicating whether the condition is satisfied.) 4381 */ 4382 public PlanDefinitionActionConditionComponent setExpression(Expression value) { 4383 this.expression = value; 4384 return this; 4385 } 4386 4387 protected void listChildren(List<Property> children) { 4388 super.listChildren(children); 4389 children.add(new Property("kind", "code", "The kind of condition.", 0, 1, kind)); 4390 children.add(new Property("expression", "Expression", "An expression that returns true or false, indicating whether the condition is satisfied.", 0, 1, expression)); 4391 } 4392 4393 @Override 4394 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4395 switch (_hash) { 4396 case 3292052: /*kind*/ return new Property("kind", "code", "The kind of condition.", 0, 1, kind); 4397 case -1795452264: /*expression*/ return new Property("expression", "Expression", "An expression that returns true or false, indicating whether the condition is satisfied.", 0, 1, expression); 4398 default: return super.getNamedProperty(_hash, _name, _checkValid); 4399 } 4400 4401 } 4402 4403 @Override 4404 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4405 switch (hash) { 4406 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<ActionConditionKind> 4407 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // Expression 4408 default: return super.getProperty(hash, name, checkValid); 4409 } 4410 4411 } 4412 4413 @Override 4414 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4415 switch (hash) { 4416 case 3292052: // kind 4417 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 4418 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 4419 return value; 4420 case -1795452264: // expression 4421 this.expression = castToExpression(value); // Expression 4422 return value; 4423 default: return super.setProperty(hash, name, value); 4424 } 4425 4426 } 4427 4428 @Override 4429 public Base setProperty(String name, Base value) throws FHIRException { 4430 if (name.equals("kind")) { 4431 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 4432 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 4433 } else if (name.equals("expression")) { 4434 this.expression = castToExpression(value); // Expression 4435 } else 4436 return super.setProperty(name, value); 4437 return value; 4438 } 4439 4440 @Override 4441 public Base makeProperty(int hash, String name) throws FHIRException { 4442 switch (hash) { 4443 case 3292052: return getKindElement(); 4444 case -1795452264: return getExpression(); 4445 default: return super.makeProperty(hash, name); 4446 } 4447 4448 } 4449 4450 @Override 4451 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4452 switch (hash) { 4453 case 3292052: /*kind*/ return new String[] {"code"}; 4454 case -1795452264: /*expression*/ return new String[] {"Expression"}; 4455 default: return super.getTypesForProperty(hash, name); 4456 } 4457 4458 } 4459 4460 @Override 4461 public Base addChild(String name) throws FHIRException { 4462 if (name.equals("kind")) { 4463 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.kind"); 4464 } 4465 else if (name.equals("expression")) { 4466 this.expression = new Expression(); 4467 return this.expression; 4468 } 4469 else 4470 return super.addChild(name); 4471 } 4472 4473 public PlanDefinitionActionConditionComponent copy() { 4474 PlanDefinitionActionConditionComponent dst = new PlanDefinitionActionConditionComponent(); 4475 copyValues(dst); 4476 return dst; 4477 } 4478 4479 public void copyValues(PlanDefinitionActionConditionComponent dst) { 4480 super.copyValues(dst); 4481 dst.kind = kind == null ? null : kind.copy(); 4482 dst.expression = expression == null ? null : expression.copy(); 4483 } 4484 4485 @Override 4486 public boolean equalsDeep(Base other_) { 4487 if (!super.equalsDeep(other_)) 4488 return false; 4489 if (!(other_ instanceof PlanDefinitionActionConditionComponent)) 4490 return false; 4491 PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other_; 4492 return compareDeep(kind, o.kind, true) && compareDeep(expression, o.expression, true); 4493 } 4494 4495 @Override 4496 public boolean equalsShallow(Base other_) { 4497 if (!super.equalsShallow(other_)) 4498 return false; 4499 if (!(other_ instanceof PlanDefinitionActionConditionComponent)) 4500 return false; 4501 PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other_; 4502 return compareValues(kind, o.kind, true); 4503 } 4504 4505 public boolean isEmpty() { 4506 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, expression); 4507 } 4508 4509 public String fhirType() { 4510 return "PlanDefinition.action.condition"; 4511 4512 } 4513 4514 } 4515 4516 @Block() 4517 public static class PlanDefinitionActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement { 4518 /** 4519 * The element id of the related action. 4520 */ 4521 @Child(name = "actionId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4522 @Description(shortDefinition="What action is this related to", formalDefinition="The element id of the related action." ) 4523 protected IdType actionId; 4524 4525 /** 4526 * The relationship of this action to the related action. 4527 */ 4528 @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 4529 @Description(shortDefinition="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end", formalDefinition="The relationship of this action to the related action." ) 4530 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-relationship-type") 4531 protected Enumeration<ActionRelationshipType> relationship; 4532 4533 /** 4534 * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before. 4535 */ 4536 @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false) 4537 @Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." ) 4538 protected Type offset; 4539 4540 private static final long serialVersionUID = 1063306770L; 4541 4542 /** 4543 * Constructor 4544 */ 4545 public PlanDefinitionActionRelatedActionComponent() { 4546 super(); 4547 } 4548 4549 /** 4550 * Constructor 4551 */ 4552 public PlanDefinitionActionRelatedActionComponent(IdType actionId, Enumeration<ActionRelationshipType> relationship) { 4553 super(); 4554 this.actionId = actionId; 4555 this.relationship = relationship; 4556 } 4557 4558 /** 4559 * @return {@link #actionId} (The element id of the related action.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value 4560 */ 4561 public IdType getActionIdElement() { 4562 if (this.actionId == null) 4563 if (Configuration.errorOnAutoCreate()) 4564 throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.actionId"); 4565 else if (Configuration.doAutoCreate()) 4566 this.actionId = new IdType(); // bb 4567 return this.actionId; 4568 } 4569 4570 public boolean hasActionIdElement() { 4571 return this.actionId != null && !this.actionId.isEmpty(); 4572 } 4573 4574 public boolean hasActionId() { 4575 return this.actionId != null && !this.actionId.isEmpty(); 4576 } 4577 4578 /** 4579 * @param value {@link #actionId} (The element id of the related action.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value 4580 */ 4581 public PlanDefinitionActionRelatedActionComponent setActionIdElement(IdType value) { 4582 this.actionId = value; 4583 return this; 4584 } 4585 4586 /** 4587 * @return The element id of the related action. 4588 */ 4589 public String getActionId() { 4590 return this.actionId == null ? null : this.actionId.getValue(); 4591 } 4592 4593 /** 4594 * @param value The element id of the related action. 4595 */ 4596 public PlanDefinitionActionRelatedActionComponent setActionId(String value) { 4597 if (this.actionId == null) 4598 this.actionId = new IdType(); 4599 this.actionId.setValue(value); 4600 return this; 4601 } 4602 4603 /** 4604 * @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value 4605 */ 4606 public Enumeration<ActionRelationshipType> getRelationshipElement() { 4607 if (this.relationship == null) 4608 if (Configuration.errorOnAutoCreate()) 4609 throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.relationship"); 4610 else if (Configuration.doAutoCreate()) 4611 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); // bb 4612 return this.relationship; 4613 } 4614 4615 public boolean hasRelationshipElement() { 4616 return this.relationship != null && !this.relationship.isEmpty(); 4617 } 4618 4619 public boolean hasRelationship() { 4620 return this.relationship != null && !this.relationship.isEmpty(); 4621 } 4622 4623 /** 4624 * @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value 4625 */ 4626 public PlanDefinitionActionRelatedActionComponent setRelationshipElement(Enumeration<ActionRelationshipType> value) { 4627 this.relationship = value; 4628 return this; 4629 } 4630 4631 /** 4632 * @return The relationship of this action to the related action. 4633 */ 4634 public ActionRelationshipType getRelationship() { 4635 return this.relationship == null ? null : this.relationship.getValue(); 4636 } 4637 4638 /** 4639 * @param value The relationship of this action to the related action. 4640 */ 4641 public PlanDefinitionActionRelatedActionComponent setRelationship(ActionRelationshipType value) { 4642 if (this.relationship == null) 4643 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); 4644 this.relationship.setValue(value); 4645 return this; 4646 } 4647 4648 /** 4649 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4650 */ 4651 public Type getOffset() { 4652 return this.offset; 4653 } 4654 4655 /** 4656 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4657 */ 4658 public Duration getOffsetDuration() throws FHIRException { 4659 if (this.offset == null) 4660 this.offset = new Duration(); 4661 if (!(this.offset instanceof Duration)) 4662 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); 4663 return (Duration) this.offset; 4664 } 4665 4666 public boolean hasOffsetDuration() { 4667 return this != null && this.offset instanceof Duration; 4668 } 4669 4670 /** 4671 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4672 */ 4673 public Range getOffsetRange() throws FHIRException { 4674 if (this.offset == null) 4675 this.offset = new Range(); 4676 if (!(this.offset instanceof Range)) 4677 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered"); 4678 return (Range) this.offset; 4679 } 4680 4681 public boolean hasOffsetRange() { 4682 return this != null && this.offset instanceof Range; 4683 } 4684 4685 public boolean hasOffset() { 4686 return this.offset != null && !this.offset.isEmpty(); 4687 } 4688 4689 /** 4690 * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4691 */ 4692 public PlanDefinitionActionRelatedActionComponent setOffset(Type value) { 4693 if (value != null && !(value instanceof Duration || value instanceof Range)) 4694 throw new Error("Not the right type for PlanDefinition.action.relatedAction.offset[x]: "+value.fhirType()); 4695 this.offset = value; 4696 return this; 4697 } 4698 4699 protected void listChildren(List<Property> children) { 4700 super.listChildren(children); 4701 children.add(new Property("actionId", "id", "The element id of the related action.", 0, 1, actionId)); 4702 children.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship)); 4703 children.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset)); 4704 } 4705 4706 @Override 4707 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4708 switch (_hash) { 4709 case -1656172047: /*actionId*/ return new Property("actionId", "id", "The element id of the related action.", 0, 1, actionId); 4710 case -261851592: /*relationship*/ return new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship); 4711 case -1960684787: /*offset[x]*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 4712 case -1019779949: /*offset*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 4713 case 134075207: /*offsetDuration*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 4714 case 1263585386: /*offsetRange*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset); 4715 default: return super.getNamedProperty(_hash, _name, _checkValid); 4716 } 4717 4718 } 4719 4720 @Override 4721 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4722 switch (hash) { 4723 case -1656172047: /*actionId*/ return this.actionId == null ? new Base[0] : new Base[] {this.actionId}; // IdType 4724 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType> 4725 case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type 4726 default: return super.getProperty(hash, name, checkValid); 4727 } 4728 4729 } 4730 4731 @Override 4732 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4733 switch (hash) { 4734 case -1656172047: // actionId 4735 this.actionId = castToId(value); // IdType 4736 return value; 4737 case -261851592: // relationship 4738 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 4739 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 4740 return value; 4741 case -1019779949: // offset 4742 this.offset = castToType(value); // Type 4743 return value; 4744 default: return super.setProperty(hash, name, value); 4745 } 4746 4747 } 4748 4749 @Override 4750 public Base setProperty(String name, Base value) throws FHIRException { 4751 if (name.equals("actionId")) { 4752 this.actionId = castToId(value); // IdType 4753 } else if (name.equals("relationship")) { 4754 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 4755 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 4756 } else if (name.equals("offset[x]")) { 4757 this.offset = castToType(value); // Type 4758 } else 4759 return super.setProperty(name, value); 4760 return value; 4761 } 4762 4763 @Override 4764 public Base makeProperty(int hash, String name) throws FHIRException { 4765 switch (hash) { 4766 case -1656172047: return getActionIdElement(); 4767 case -261851592: return getRelationshipElement(); 4768 case -1960684787: return getOffset(); 4769 case -1019779949: return getOffset(); 4770 default: return super.makeProperty(hash, name); 4771 } 4772 4773 } 4774 4775 @Override 4776 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4777 switch (hash) { 4778 case -1656172047: /*actionId*/ return new String[] {"id"}; 4779 case -261851592: /*relationship*/ return new String[] {"code"}; 4780 case -1019779949: /*offset*/ return new String[] {"Duration", "Range"}; 4781 default: return super.getTypesForProperty(hash, name); 4782 } 4783 4784 } 4785 4786 @Override 4787 public Base addChild(String name) throws FHIRException { 4788 if (name.equals("actionId")) { 4789 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.actionId"); 4790 } 4791 else if (name.equals("relationship")) { 4792 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.relationship"); 4793 } 4794 else if (name.equals("offsetDuration")) { 4795 this.offset = new Duration(); 4796 return this.offset; 4797 } 4798 else if (name.equals("offsetRange")) { 4799 this.offset = new Range(); 4800 return this.offset; 4801 } 4802 else 4803 return super.addChild(name); 4804 } 4805 4806 public PlanDefinitionActionRelatedActionComponent copy() { 4807 PlanDefinitionActionRelatedActionComponent dst = new PlanDefinitionActionRelatedActionComponent(); 4808 copyValues(dst); 4809 return dst; 4810 } 4811 4812 public void copyValues(PlanDefinitionActionRelatedActionComponent dst) { 4813 super.copyValues(dst); 4814 dst.actionId = actionId == null ? null : actionId.copy(); 4815 dst.relationship = relationship == null ? null : relationship.copy(); 4816 dst.offset = offset == null ? null : offset.copy(); 4817 } 4818 4819 @Override 4820 public boolean equalsDeep(Base other_) { 4821 if (!super.equalsDeep(other_)) 4822 return false; 4823 if (!(other_ instanceof PlanDefinitionActionRelatedActionComponent)) 4824 return false; 4825 PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other_; 4826 return compareDeep(actionId, o.actionId, true) && compareDeep(relationship, o.relationship, true) 4827 && compareDeep(offset, o.offset, true); 4828 } 4829 4830 @Override 4831 public boolean equalsShallow(Base other_) { 4832 if (!super.equalsShallow(other_)) 4833 return false; 4834 if (!(other_ instanceof PlanDefinitionActionRelatedActionComponent)) 4835 return false; 4836 PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other_; 4837 return compareValues(actionId, o.actionId, true) && compareValues(relationship, o.relationship, true) 4838 ; 4839 } 4840 4841 public boolean isEmpty() { 4842 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionId, relationship, offset 4843 ); 4844 } 4845 4846 public String fhirType() { 4847 return "PlanDefinition.action.relatedAction"; 4848 4849 } 4850 4851 } 4852 4853 @Block() 4854 public static class PlanDefinitionActionParticipantComponent extends BackboneElement implements IBaseBackboneElement { 4855 /** 4856 * The type of participant in the action. 4857 */ 4858 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4859 @Description(shortDefinition="patient | practitioner | related-person | device", formalDefinition="The type of participant in the action." ) 4860 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-type") 4861 protected Enumeration<ActionParticipantType> type; 4862 4863 /** 4864 * The role the participant should play in performing the described action. 4865 */ 4866 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 4867 @Description(shortDefinition="E.g. Nurse, Surgeon, Parent", formalDefinition="The role the participant should play in performing the described action." ) 4868 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-role") 4869 protected CodeableConcept role; 4870 4871 private static final long serialVersionUID = -1152013659L; 4872 4873 /** 4874 * Constructor 4875 */ 4876 public PlanDefinitionActionParticipantComponent() { 4877 super(); 4878 } 4879 4880 /** 4881 * Constructor 4882 */ 4883 public PlanDefinitionActionParticipantComponent(Enumeration<ActionParticipantType> type) { 4884 super(); 4885 this.type = type; 4886 } 4887 4888 /** 4889 * @return {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4890 */ 4891 public Enumeration<ActionParticipantType> getTypeElement() { 4892 if (this.type == null) 4893 if (Configuration.errorOnAutoCreate()) 4894 throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.type"); 4895 else if (Configuration.doAutoCreate()) 4896 this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory()); // bb 4897 return this.type; 4898 } 4899 4900 public boolean hasTypeElement() { 4901 return this.type != null && !this.type.isEmpty(); 4902 } 4903 4904 public boolean hasType() { 4905 return this.type != null && !this.type.isEmpty(); 4906 } 4907 4908 /** 4909 * @param value {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4910 */ 4911 public PlanDefinitionActionParticipantComponent setTypeElement(Enumeration<ActionParticipantType> value) { 4912 this.type = value; 4913 return this; 4914 } 4915 4916 /** 4917 * @return The type of participant in the action. 4918 */ 4919 public ActionParticipantType getType() { 4920 return this.type == null ? null : this.type.getValue(); 4921 } 4922 4923 /** 4924 * @param value The type of participant in the action. 4925 */ 4926 public PlanDefinitionActionParticipantComponent setType(ActionParticipantType value) { 4927 if (this.type == null) 4928 this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory()); 4929 this.type.setValue(value); 4930 return this; 4931 } 4932 4933 /** 4934 * @return {@link #role} (The role the participant should play in performing the described action.) 4935 */ 4936 public CodeableConcept getRole() { 4937 if (this.role == null) 4938 if (Configuration.errorOnAutoCreate()) 4939 throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.role"); 4940 else if (Configuration.doAutoCreate()) 4941 this.role = new CodeableConcept(); // cc 4942 return this.role; 4943 } 4944 4945 public boolean hasRole() { 4946 return this.role != null && !this.role.isEmpty(); 4947 } 4948 4949 /** 4950 * @param value {@link #role} (The role the participant should play in performing the described action.) 4951 */ 4952 public PlanDefinitionActionParticipantComponent setRole(CodeableConcept value) { 4953 this.role = value; 4954 return this; 4955 } 4956 4957 protected void listChildren(List<Property> children) { 4958 super.listChildren(children); 4959 children.add(new Property("type", "code", "The type of participant in the action.", 0, 1, type)); 4960 children.add(new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role)); 4961 } 4962 4963 @Override 4964 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4965 switch (_hash) { 4966 case 3575610: /*type*/ return new Property("type", "code", "The type of participant in the action.", 0, 1, type); 4967 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role); 4968 default: return super.getNamedProperty(_hash, _name, _checkValid); 4969 } 4970 4971 } 4972 4973 @Override 4974 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4975 switch (hash) { 4976 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActionParticipantType> 4977 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 4978 default: return super.getProperty(hash, name, checkValid); 4979 } 4980 4981 } 4982 4983 @Override 4984 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4985 switch (hash) { 4986 case 3575610: // type 4987 value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value)); 4988 this.type = (Enumeration) value; // Enumeration<ActionParticipantType> 4989 return value; 4990 case 3506294: // role 4991 this.role = castToCodeableConcept(value); // CodeableConcept 4992 return value; 4993 default: return super.setProperty(hash, name, value); 4994 } 4995 4996 } 4997 4998 @Override 4999 public Base setProperty(String name, Base value) throws FHIRException { 5000 if (name.equals("type")) { 5001 value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value)); 5002 this.type = (Enumeration) value; // Enumeration<ActionParticipantType> 5003 } else if (name.equals("role")) { 5004 this.role = castToCodeableConcept(value); // CodeableConcept 5005 } else 5006 return super.setProperty(name, value); 5007 return value; 5008 } 5009 5010 @Override 5011 public Base makeProperty(int hash, String name) throws FHIRException { 5012 switch (hash) { 5013 case 3575610: return getTypeElement(); 5014 case 3506294: return getRole(); 5015 default: return super.makeProperty(hash, name); 5016 } 5017 5018 } 5019 5020 @Override 5021 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5022 switch (hash) { 5023 case 3575610: /*type*/ return new String[] {"code"}; 5024 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 5025 default: return super.getTypesForProperty(hash, name); 5026 } 5027 5028 } 5029 5030 @Override 5031 public Base addChild(String name) throws FHIRException { 5032 if (name.equals("type")) { 5033 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.type"); 5034 } 5035 else if (name.equals("role")) { 5036 this.role = new CodeableConcept(); 5037 return this.role; 5038 } 5039 else 5040 return super.addChild(name); 5041 } 5042 5043 public PlanDefinitionActionParticipantComponent copy() { 5044 PlanDefinitionActionParticipantComponent dst = new PlanDefinitionActionParticipantComponent(); 5045 copyValues(dst); 5046 return dst; 5047 } 5048 5049 public void copyValues(PlanDefinitionActionParticipantComponent dst) { 5050 super.copyValues(dst); 5051 dst.type = type == null ? null : type.copy(); 5052 dst.role = role == null ? null : role.copy(); 5053 } 5054 5055 @Override 5056 public boolean equalsDeep(Base other_) { 5057 if (!super.equalsDeep(other_)) 5058 return false; 5059 if (!(other_ instanceof PlanDefinitionActionParticipantComponent)) 5060 return false; 5061 PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other_; 5062 return compareDeep(type, o.type, true) && compareDeep(role, o.role, true); 5063 } 5064 5065 @Override 5066 public boolean equalsShallow(Base other_) { 5067 if (!super.equalsShallow(other_)) 5068 return false; 5069 if (!(other_ instanceof PlanDefinitionActionParticipantComponent)) 5070 return false; 5071 PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other_; 5072 return compareValues(type, o.type, true); 5073 } 5074 5075 public boolean isEmpty() { 5076 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role); 5077 } 5078 5079 public String fhirType() { 5080 return "PlanDefinition.action.participant"; 5081 5082 } 5083 5084 } 5085 5086 @Block() 5087 public static class PlanDefinitionActionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement { 5088 /** 5089 * The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). 5090 */ 5091 @Child(name = "path", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 5092 @Description(shortDefinition="The path to the element to be set dynamically", formalDefinition="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)." ) 5093 protected StringType path; 5094 5095 /** 5096 * An expression specifying the value of the customized element. 5097 */ 5098 @Child(name = "expression", type = {Expression.class}, order=2, min=0, max=1, modifier=false, summary=false) 5099 @Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." ) 5100 protected Expression expression; 5101 5102 private static final long serialVersionUID = 1064529082L; 5103 5104 /** 5105 * Constructor 5106 */ 5107 public PlanDefinitionActionDynamicValueComponent() { 5108 super(); 5109 } 5110 5111 /** 5112 * @return {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 5113 */ 5114 public StringType getPathElement() { 5115 if (this.path == null) 5116 if (Configuration.errorOnAutoCreate()) 5117 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.path"); 5118 else if (Configuration.doAutoCreate()) 5119 this.path = new StringType(); // bb 5120 return this.path; 5121 } 5122 5123 public boolean hasPathElement() { 5124 return this.path != null && !this.path.isEmpty(); 5125 } 5126 5127 public boolean hasPath() { 5128 return this.path != null && !this.path.isEmpty(); 5129 } 5130 5131 /** 5132 * @param value {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 5133 */ 5134 public PlanDefinitionActionDynamicValueComponent setPathElement(StringType value) { 5135 this.path = value; 5136 return this; 5137 } 5138 5139 /** 5140 * @return The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). 5141 */ 5142 public String getPath() { 5143 return this.path == null ? null : this.path.getValue(); 5144 } 5145 5146 /** 5147 * @param value The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). 5148 */ 5149 public PlanDefinitionActionDynamicValueComponent setPath(String value) { 5150 if (Utilities.noString(value)) 5151 this.path = null; 5152 else { 5153 if (this.path == null) 5154 this.path = new StringType(); 5155 this.path.setValue(value); 5156 } 5157 return this; 5158 } 5159 5160 /** 5161 * @return {@link #expression} (An expression specifying the value of the customized element.) 5162 */ 5163 public Expression getExpression() { 5164 if (this.expression == null) 5165 if (Configuration.errorOnAutoCreate()) 5166 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.expression"); 5167 else if (Configuration.doAutoCreate()) 5168 this.expression = new Expression(); // cc 5169 return this.expression; 5170 } 5171 5172 public boolean hasExpression() { 5173 return this.expression != null && !this.expression.isEmpty(); 5174 } 5175 5176 /** 5177 * @param value {@link #expression} (An expression specifying the value of the customized element.) 5178 */ 5179 public PlanDefinitionActionDynamicValueComponent setExpression(Expression value) { 5180 this.expression = value; 5181 return this; 5182 } 5183 5184 protected void listChildren(List<Property> children) { 5185 super.listChildren(children); 5186 children.add(new Property("path", "string", "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).", 0, 1, path)); 5187 children.add(new Property("expression", "Expression", "An expression specifying the value of the customized element.", 0, 1, expression)); 5188 } 5189 5190 @Override 5191 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5192 switch (_hash) { 5193 case 3433509: /*path*/ return new Property("path", "string", "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).", 0, 1, path); 5194 case -1795452264: /*expression*/ return new Property("expression", "Expression", "An expression specifying the value of the customized element.", 0, 1, expression); 5195 default: return super.getNamedProperty(_hash, _name, _checkValid); 5196 } 5197 5198 } 5199 5200 @Override 5201 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5202 switch (hash) { 5203 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 5204 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // Expression 5205 default: return super.getProperty(hash, name, checkValid); 5206 } 5207 5208 } 5209 5210 @Override 5211 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5212 switch (hash) { 5213 case 3433509: // path 5214 this.path = castToString(value); // StringType 5215 return value; 5216 case -1795452264: // expression 5217 this.expression = castToExpression(value); // Expression 5218 return value; 5219 default: return super.setProperty(hash, name, value); 5220 } 5221 5222 } 5223 5224 @Override 5225 public Base setProperty(String name, Base value) throws FHIRException { 5226 if (name.equals("path")) { 5227 this.path = castToString(value); // StringType 5228 } else if (name.equals("expression")) { 5229 this.expression = castToExpression(value); // Expression 5230 } else 5231 return super.setProperty(name, value); 5232 return value; 5233 } 5234 5235 @Override 5236 public Base makeProperty(int hash, String name) throws FHIRException { 5237 switch (hash) { 5238 case 3433509: return getPathElement(); 5239 case -1795452264: return getExpression(); 5240 default: return super.makeProperty(hash, name); 5241 } 5242 5243 } 5244 5245 @Override 5246 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5247 switch (hash) { 5248 case 3433509: /*path*/ return new String[] {"string"}; 5249 case -1795452264: /*expression*/ return new String[] {"Expression"}; 5250 default: return super.getTypesForProperty(hash, name); 5251 } 5252 5253 } 5254 5255 @Override 5256 public Base addChild(String name) throws FHIRException { 5257 if (name.equals("path")) { 5258 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.path"); 5259 } 5260 else if (name.equals("expression")) { 5261 this.expression = new Expression(); 5262 return this.expression; 5263 } 5264 else 5265 return super.addChild(name); 5266 } 5267 5268 public PlanDefinitionActionDynamicValueComponent copy() { 5269 PlanDefinitionActionDynamicValueComponent dst = new PlanDefinitionActionDynamicValueComponent(); 5270 copyValues(dst); 5271 return dst; 5272 } 5273 5274 public void copyValues(PlanDefinitionActionDynamicValueComponent dst) { 5275 super.copyValues(dst); 5276 dst.path = path == null ? null : path.copy(); 5277 dst.expression = expression == null ? null : expression.copy(); 5278 } 5279 5280 @Override 5281 public boolean equalsDeep(Base other_) { 5282 if (!super.equalsDeep(other_)) 5283 return false; 5284 if (!(other_ instanceof PlanDefinitionActionDynamicValueComponent)) 5285 return false; 5286 PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other_; 5287 return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); 5288 } 5289 5290 @Override 5291 public boolean equalsShallow(Base other_) { 5292 if (!super.equalsShallow(other_)) 5293 return false; 5294 if (!(other_ instanceof PlanDefinitionActionDynamicValueComponent)) 5295 return false; 5296 PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other_; 5297 return compareValues(path, o.path, true); 5298 } 5299 5300 public boolean isEmpty() { 5301 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, expression); 5302 } 5303 5304 public String fhirType() { 5305 return "PlanDefinition.action.dynamicValue"; 5306 5307 } 5308 5309 } 5310 5311 /** 5312 * A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance. 5313 */ 5314 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5315 @Description(shortDefinition="Additional identifier for the plan definition", formalDefinition="A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 5316 protected List<Identifier> identifier; 5317 5318 /** 5319 * An explanatory or alternate title for the plan definition giving additional information about its content. 5320 */ 5321 @Child(name = "subtitle", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 5322 @Description(shortDefinition="Subordinate title of the plan definition", formalDefinition="An explanatory or alternate title for the plan definition giving additional information about its content." ) 5323 protected StringType subtitle; 5324 5325 /** 5326 * A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition. 5327 */ 5328 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 5329 @Description(shortDefinition="order-set | clinical-protocol | eca-rule | workflow-definition", formalDefinition="A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition." ) 5330 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/plan-definition-type") 5331 protected CodeableConcept type; 5332 5333 /** 5334 * A code or group definition that describes the intended subject of the plan definition. 5335 */ 5336 @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=3, min=0, max=1, modifier=false, summary=false) 5337 @Description(shortDefinition="Type of individual the plan definition is focused on", formalDefinition="A code or group definition that describes the intended subject of the plan definition." ) 5338 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type") 5339 protected Type subject; 5340 5341 /** 5342 * Explanation of why this plan definition is needed and why it has been designed as it has. 5343 */ 5344 @Child(name = "purpose", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5345 @Description(shortDefinition="Why this plan definition is defined", formalDefinition="Explanation of why this plan definition is needed and why it has been designed as it has." ) 5346 protected MarkdownType purpose; 5347 5348 /** 5349 * A detailed description of how the plan definition is used from a clinical perspective. 5350 */ 5351 @Child(name = "usage", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5352 @Description(shortDefinition="Describes the clinical usage of the plan", formalDefinition="A detailed description of how the plan definition is used from a clinical perspective." ) 5353 protected StringType usage; 5354 5355 /** 5356 * A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition. 5357 */ 5358 @Child(name = "copyright", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5359 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition." ) 5360 protected MarkdownType copyright; 5361 5362 /** 5363 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 5364 */ 5365 @Child(name = "approvalDate", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5366 @Description(shortDefinition="When the plan definition was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." ) 5367 protected DateType approvalDate; 5368 5369 /** 5370 * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 5371 */ 5372 @Child(name = "lastReviewDate", type = {DateType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5373 @Description(shortDefinition="When the plan definition was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." ) 5374 protected DateType lastReviewDate; 5375 5376 /** 5377 * The period during which the plan definition content was or is planned to be in active use. 5378 */ 5379 @Child(name = "effectivePeriod", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 5380 @Description(shortDefinition="When the plan definition is expected to be used", formalDefinition="The period during which the plan definition content was or is planned to be in active use." ) 5381 protected Period effectivePeriod; 5382 5383 /** 5384 * Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching. 5385 */ 5386 @Child(name = "topic", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5387 @Description(shortDefinition="E.g. Education, Treatment, Assessment", formalDefinition="Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching." ) 5388 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic") 5389 protected List<CodeableConcept> topic; 5390 5391 /** 5392 * An individiual or organization primarily involved in the creation and maintenance of the content. 5393 */ 5394 @Child(name = "author", type = {ContactDetail.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5395 @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." ) 5396 protected List<ContactDetail> author; 5397 5398 /** 5399 * An individual or organization primarily responsible for internal coherence of the content. 5400 */ 5401 @Child(name = "editor", type = {ContactDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5402 @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." ) 5403 protected List<ContactDetail> editor; 5404 5405 /** 5406 * An individual or organization primarily responsible for review of some aspect of the content. 5407 */ 5408 @Child(name = "reviewer", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5409 @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." ) 5410 protected List<ContactDetail> reviewer; 5411 5412 /** 5413 * An individual or organization responsible for officially endorsing the content for use in some setting. 5414 */ 5415 @Child(name = "endorser", type = {ContactDetail.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5416 @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." ) 5417 protected List<ContactDetail> endorser; 5418 5419 /** 5420 * Related artifacts such as additional documentation, justification, or bibliographic references. 5421 */ 5422 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5423 @Description(shortDefinition="Additional documentation, citations", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." ) 5424 protected List<RelatedArtifact> relatedArtifact; 5425 5426 /** 5427 * A reference to a Library resource containing any formal logic used by the plan definition. 5428 */ 5429 @Child(name = "library", type = {CanonicalType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5430 @Description(shortDefinition="Logic used by the plan definition", formalDefinition="A reference to a Library resource containing any formal logic used by the plan definition." ) 5431 protected List<CanonicalType> library; 5432 5433 /** 5434 * Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. 5435 */ 5436 @Child(name = "goal", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5437 @Description(shortDefinition="What the plan is trying to accomplish", formalDefinition="Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc." ) 5438 protected List<PlanDefinitionGoalComponent> goal; 5439 5440 /** 5441 * An action or group of actions to be taken as part of the plan. 5442 */ 5443 @Child(name = "action", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5444 @Description(shortDefinition="Action defined by the plan", formalDefinition="An action or group of actions to be taken as part of the plan." ) 5445 protected List<PlanDefinitionActionComponent> action; 5446 5447 private static final long serialVersionUID = -1725695645L; 5448 5449 /** 5450 * Constructor 5451 */ 5452 public PlanDefinition() { 5453 super(); 5454 } 5455 5456 /** 5457 * Constructor 5458 */ 5459 public PlanDefinition(Enumeration<PublicationStatus> status) { 5460 super(); 5461 this.status = status; 5462 } 5463 5464 /** 5465 * @return {@link #url} (An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5466 */ 5467 public UriType getUrlElement() { 5468 if (this.url == null) 5469 if (Configuration.errorOnAutoCreate()) 5470 throw new Error("Attempt to auto-create PlanDefinition.url"); 5471 else if (Configuration.doAutoCreate()) 5472 this.url = new UriType(); // bb 5473 return this.url; 5474 } 5475 5476 public boolean hasUrlElement() { 5477 return this.url != null && !this.url.isEmpty(); 5478 } 5479 5480 public boolean hasUrl() { 5481 return this.url != null && !this.url.isEmpty(); 5482 } 5483 5484 /** 5485 * @param value {@link #url} (An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5486 */ 5487 public PlanDefinition setUrlElement(UriType value) { 5488 this.url = value; 5489 return this; 5490 } 5491 5492 /** 5493 * @return An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers. 5494 */ 5495 public String getUrl() { 5496 return this.url == null ? null : this.url.getValue(); 5497 } 5498 5499 /** 5500 * @param value An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers. 5501 */ 5502 public PlanDefinition setUrl(String value) { 5503 if (Utilities.noString(value)) 5504 this.url = null; 5505 else { 5506 if (this.url == null) 5507 this.url = new UriType(); 5508 this.url.setValue(value); 5509 } 5510 return this; 5511 } 5512 5513 /** 5514 * @return {@link #identifier} (A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.) 5515 */ 5516 public List<Identifier> getIdentifier() { 5517 if (this.identifier == null) 5518 this.identifier = new ArrayList<Identifier>(); 5519 return this.identifier; 5520 } 5521 5522 /** 5523 * @return Returns a reference to <code>this</code> for easy method chaining 5524 */ 5525 public PlanDefinition setIdentifier(List<Identifier> theIdentifier) { 5526 this.identifier = theIdentifier; 5527 return this; 5528 } 5529 5530 public boolean hasIdentifier() { 5531 if (this.identifier == null) 5532 return false; 5533 for (Identifier item : this.identifier) 5534 if (!item.isEmpty()) 5535 return true; 5536 return false; 5537 } 5538 5539 public Identifier addIdentifier() { //3 5540 Identifier t = new Identifier(); 5541 if (this.identifier == null) 5542 this.identifier = new ArrayList<Identifier>(); 5543 this.identifier.add(t); 5544 return t; 5545 } 5546 5547 public PlanDefinition addIdentifier(Identifier t) { //3 5548 if (t == null) 5549 return this; 5550 if (this.identifier == null) 5551 this.identifier = new ArrayList<Identifier>(); 5552 this.identifier.add(t); 5553 return this; 5554 } 5555 5556 /** 5557 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 5558 */ 5559 public Identifier getIdentifierFirstRep() { 5560 if (getIdentifier().isEmpty()) { 5561 addIdentifier(); 5562 } 5563 return getIdentifier().get(0); 5564 } 5565 5566 /** 5567 * @return {@link #version} (The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 5568 */ 5569 public StringType getVersionElement() { 5570 if (this.version == null) 5571 if (Configuration.errorOnAutoCreate()) 5572 throw new Error("Attempt to auto-create PlanDefinition.version"); 5573 else if (Configuration.doAutoCreate()) 5574 this.version = new StringType(); // bb 5575 return this.version; 5576 } 5577 5578 public boolean hasVersionElement() { 5579 return this.version != null && !this.version.isEmpty(); 5580 } 5581 5582 public boolean hasVersion() { 5583 return this.version != null && !this.version.isEmpty(); 5584 } 5585 5586 /** 5587 * @param value {@link #version} (The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 5588 */ 5589 public PlanDefinition setVersionElement(StringType value) { 5590 this.version = value; 5591 return this; 5592 } 5593 5594 /** 5595 * @return The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts. 5596 */ 5597 public String getVersion() { 5598 return this.version == null ? null : this.version.getValue(); 5599 } 5600 5601 /** 5602 * @param value The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts. 5603 */ 5604 public PlanDefinition setVersion(String value) { 5605 if (Utilities.noString(value)) 5606 this.version = null; 5607 else { 5608 if (this.version == null) 5609 this.version = new StringType(); 5610 this.version.setValue(value); 5611 } 5612 return this; 5613 } 5614 5615 /** 5616 * @return {@link #name} (A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 5617 */ 5618 public StringType getNameElement() { 5619 if (this.name == null) 5620 if (Configuration.errorOnAutoCreate()) 5621 throw new Error("Attempt to auto-create PlanDefinition.name"); 5622 else if (Configuration.doAutoCreate()) 5623 this.name = new StringType(); // bb 5624 return this.name; 5625 } 5626 5627 public boolean hasNameElement() { 5628 return this.name != null && !this.name.isEmpty(); 5629 } 5630 5631 public boolean hasName() { 5632 return this.name != null && !this.name.isEmpty(); 5633 } 5634 5635 /** 5636 * @param value {@link #name} (A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 5637 */ 5638 public PlanDefinition setNameElement(StringType value) { 5639 this.name = value; 5640 return this; 5641 } 5642 5643 /** 5644 * @return A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 5645 */ 5646 public String getName() { 5647 return this.name == null ? null : this.name.getValue(); 5648 } 5649 5650 /** 5651 * @param value A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 5652 */ 5653 public PlanDefinition setName(String value) { 5654 if (Utilities.noString(value)) 5655 this.name = null; 5656 else { 5657 if (this.name == null) 5658 this.name = new StringType(); 5659 this.name.setValue(value); 5660 } 5661 return this; 5662 } 5663 5664 /** 5665 * @return {@link #title} (A short, descriptive, user-friendly title for the plan definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 5666 */ 5667 public StringType getTitleElement() { 5668 if (this.title == null) 5669 if (Configuration.errorOnAutoCreate()) 5670 throw new Error("Attempt to auto-create PlanDefinition.title"); 5671 else if (Configuration.doAutoCreate()) 5672 this.title = new StringType(); // bb 5673 return this.title; 5674 } 5675 5676 public boolean hasTitleElement() { 5677 return this.title != null && !this.title.isEmpty(); 5678 } 5679 5680 public boolean hasTitle() { 5681 return this.title != null && !this.title.isEmpty(); 5682 } 5683 5684 /** 5685 * @param value {@link #title} (A short, descriptive, user-friendly title for the plan definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 5686 */ 5687 public PlanDefinition setTitleElement(StringType value) { 5688 this.title = value; 5689 return this; 5690 } 5691 5692 /** 5693 * @return A short, descriptive, user-friendly title for the plan definition. 5694 */ 5695 public String getTitle() { 5696 return this.title == null ? null : this.title.getValue(); 5697 } 5698 5699 /** 5700 * @param value A short, descriptive, user-friendly title for the plan definition. 5701 */ 5702 public PlanDefinition setTitle(String value) { 5703 if (Utilities.noString(value)) 5704 this.title = null; 5705 else { 5706 if (this.title == null) 5707 this.title = new StringType(); 5708 this.title.setValue(value); 5709 } 5710 return this; 5711 } 5712 5713 /** 5714 * @return {@link #subtitle} (An explanatory or alternate title for the plan definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value 5715 */ 5716 public StringType getSubtitleElement() { 5717 if (this.subtitle == null) 5718 if (Configuration.errorOnAutoCreate()) 5719 throw new Error("Attempt to auto-create PlanDefinition.subtitle"); 5720 else if (Configuration.doAutoCreate()) 5721 this.subtitle = new StringType(); // bb 5722 return this.subtitle; 5723 } 5724 5725 public boolean hasSubtitleElement() { 5726 return this.subtitle != null && !this.subtitle.isEmpty(); 5727 } 5728 5729 public boolean hasSubtitle() { 5730 return this.subtitle != null && !this.subtitle.isEmpty(); 5731 } 5732 5733 /** 5734 * @param value {@link #subtitle} (An explanatory or alternate title for the plan definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value 5735 */ 5736 public PlanDefinition setSubtitleElement(StringType value) { 5737 this.subtitle = value; 5738 return this; 5739 } 5740 5741 /** 5742 * @return An explanatory or alternate title for the plan definition giving additional information about its content. 5743 */ 5744 public String getSubtitle() { 5745 return this.subtitle == null ? null : this.subtitle.getValue(); 5746 } 5747 5748 /** 5749 * @param value An explanatory or alternate title for the plan definition giving additional information about its content. 5750 */ 5751 public PlanDefinition setSubtitle(String value) { 5752 if (Utilities.noString(value)) 5753 this.subtitle = null; 5754 else { 5755 if (this.subtitle == null) 5756 this.subtitle = new StringType(); 5757 this.subtitle.setValue(value); 5758 } 5759 return this; 5760 } 5761 5762 /** 5763 * @return {@link #type} (A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.) 5764 */ 5765 public CodeableConcept getType() { 5766 if (this.type == null) 5767 if (Configuration.errorOnAutoCreate()) 5768 throw new Error("Attempt to auto-create PlanDefinition.type"); 5769 else if (Configuration.doAutoCreate()) 5770 this.type = new CodeableConcept(); // cc 5771 return this.type; 5772 } 5773 5774 public boolean hasType() { 5775 return this.type != null && !this.type.isEmpty(); 5776 } 5777 5778 /** 5779 * @param value {@link #type} (A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.) 5780 */ 5781 public PlanDefinition setType(CodeableConcept value) { 5782 this.type = value; 5783 return this; 5784 } 5785 5786 /** 5787 * @return {@link #status} (The status of this plan definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 5788 */ 5789 public Enumeration<PublicationStatus> getStatusElement() { 5790 if (this.status == null) 5791 if (Configuration.errorOnAutoCreate()) 5792 throw new Error("Attempt to auto-create PlanDefinition.status"); 5793 else if (Configuration.doAutoCreate()) 5794 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 5795 return this.status; 5796 } 5797 5798 public boolean hasStatusElement() { 5799 return this.status != null && !this.status.isEmpty(); 5800 } 5801 5802 public boolean hasStatus() { 5803 return this.status != null && !this.status.isEmpty(); 5804 } 5805 5806 /** 5807 * @param value {@link #status} (The status of this plan definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 5808 */ 5809 public PlanDefinition setStatusElement(Enumeration<PublicationStatus> value) { 5810 this.status = value; 5811 return this; 5812 } 5813 5814 /** 5815 * @return The status of this plan definition. Enables tracking the life-cycle of the content. 5816 */ 5817 public PublicationStatus getStatus() { 5818 return this.status == null ? null : this.status.getValue(); 5819 } 5820 5821 /** 5822 * @param value The status of this plan definition. Enables tracking the life-cycle of the content. 5823 */ 5824 public PlanDefinition setStatus(PublicationStatus value) { 5825 if (this.status == null) 5826 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 5827 this.status.setValue(value); 5828 return this; 5829 } 5830 5831 /** 5832 * @return {@link #experimental} (A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 5833 */ 5834 public BooleanType getExperimentalElement() { 5835 if (this.experimental == null) 5836 if (Configuration.errorOnAutoCreate()) 5837 throw new Error("Attempt to auto-create PlanDefinition.experimental"); 5838 else if (Configuration.doAutoCreate()) 5839 this.experimental = new BooleanType(); // bb 5840 return this.experimental; 5841 } 5842 5843 public boolean hasExperimentalElement() { 5844 return this.experimental != null && !this.experimental.isEmpty(); 5845 } 5846 5847 public boolean hasExperimental() { 5848 return this.experimental != null && !this.experimental.isEmpty(); 5849 } 5850 5851 /** 5852 * @param value {@link #experimental} (A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 5853 */ 5854 public PlanDefinition setExperimentalElement(BooleanType value) { 5855 this.experimental = value; 5856 return this; 5857 } 5858 5859 /** 5860 * @return A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 5861 */ 5862 public boolean getExperimental() { 5863 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 5864 } 5865 5866 /** 5867 * @param value A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 5868 */ 5869 public PlanDefinition setExperimental(boolean value) { 5870 if (this.experimental == null) 5871 this.experimental = new BooleanType(); 5872 this.experimental.setValue(value); 5873 return this; 5874 } 5875 5876 /** 5877 * @return {@link #subject} (A code or group definition that describes the intended subject of the plan definition.) 5878 */ 5879 public Type getSubject() { 5880 return this.subject; 5881 } 5882 5883 /** 5884 * @return {@link #subject} (A code or group definition that describes the intended subject of the plan definition.) 5885 */ 5886 public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 5887 if (this.subject == null) 5888 this.subject = new CodeableConcept(); 5889 if (!(this.subject instanceof CodeableConcept)) 5890 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered"); 5891 return (CodeableConcept) this.subject; 5892 } 5893 5894 public boolean hasSubjectCodeableConcept() { 5895 return this != null && this.subject instanceof CodeableConcept; 5896 } 5897 5898 /** 5899 * @return {@link #subject} (A code or group definition that describes the intended subject of the plan definition.) 5900 */ 5901 public Reference getSubjectReference() throws FHIRException { 5902 if (this.subject == null) 5903 this.subject = new Reference(); 5904 if (!(this.subject instanceof Reference)) 5905 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered"); 5906 return (Reference) this.subject; 5907 } 5908 5909 public boolean hasSubjectReference() { 5910 return this != null && this.subject instanceof Reference; 5911 } 5912 5913 public boolean hasSubject() { 5914 return this.subject != null && !this.subject.isEmpty(); 5915 } 5916 5917 /** 5918 * @param value {@link #subject} (A code or group definition that describes the intended subject of the plan definition.) 5919 */ 5920 public PlanDefinition setSubject(Type value) { 5921 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 5922 throw new Error("Not the right type for PlanDefinition.subject[x]: "+value.fhirType()); 5923 this.subject = value; 5924 return this; 5925 } 5926 5927 /** 5928 * @return {@link #date} (The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 5929 */ 5930 public DateTimeType getDateElement() { 5931 if (this.date == null) 5932 if (Configuration.errorOnAutoCreate()) 5933 throw new Error("Attempt to auto-create PlanDefinition.date"); 5934 else if (Configuration.doAutoCreate()) 5935 this.date = new DateTimeType(); // bb 5936 return this.date; 5937 } 5938 5939 public boolean hasDateElement() { 5940 return this.date != null && !this.date.isEmpty(); 5941 } 5942 5943 public boolean hasDate() { 5944 return this.date != null && !this.date.isEmpty(); 5945 } 5946 5947 /** 5948 * @param value {@link #date} (The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 5949 */ 5950 public PlanDefinition setDateElement(DateTimeType value) { 5951 this.date = value; 5952 return this; 5953 } 5954 5955 /** 5956 * @return The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes. 5957 */ 5958 public Date getDate() { 5959 return this.date == null ? null : this.date.getValue(); 5960 } 5961 5962 /** 5963 * @param value The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes. 5964 */ 5965 public PlanDefinition setDate(Date value) { 5966 if (value == null) 5967 this.date = null; 5968 else { 5969 if (this.date == null) 5970 this.date = new DateTimeType(); 5971 this.date.setValue(value); 5972 } 5973 return this; 5974 } 5975 5976 /** 5977 * @return {@link #publisher} (The name of the organization or individual that published the plan definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 5978 */ 5979 public StringType getPublisherElement() { 5980 if (this.publisher == null) 5981 if (Configuration.errorOnAutoCreate()) 5982 throw new Error("Attempt to auto-create PlanDefinition.publisher"); 5983 else if (Configuration.doAutoCreate()) 5984 this.publisher = new StringType(); // bb 5985 return this.publisher; 5986 } 5987 5988 public boolean hasPublisherElement() { 5989 return this.publisher != null && !this.publisher.isEmpty(); 5990 } 5991 5992 public boolean hasPublisher() { 5993 return this.publisher != null && !this.publisher.isEmpty(); 5994 } 5995 5996 /** 5997 * @param value {@link #publisher} (The name of the organization or individual that published the plan definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 5998 */ 5999 public PlanDefinition setPublisherElement(StringType value) { 6000 this.publisher = value; 6001 return this; 6002 } 6003 6004 /** 6005 * @return The name of the organization or individual that published the plan definition. 6006 */ 6007 public String getPublisher() { 6008 return this.publisher == null ? null : this.publisher.getValue(); 6009 } 6010 6011 /** 6012 * @param value The name of the organization or individual that published the plan definition. 6013 */ 6014 public PlanDefinition setPublisher(String value) { 6015 if (Utilities.noString(value)) 6016 this.publisher = null; 6017 else { 6018 if (this.publisher == null) 6019 this.publisher = new StringType(); 6020 this.publisher.setValue(value); 6021 } 6022 return this; 6023 } 6024 6025 /** 6026 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 6027 */ 6028 public List<ContactDetail> getContact() { 6029 if (this.contact == null) 6030 this.contact = new ArrayList<ContactDetail>(); 6031 return this.contact; 6032 } 6033 6034 /** 6035 * @return Returns a reference to <code>this</code> for easy method chaining 6036 */ 6037 public PlanDefinition setContact(List<ContactDetail> theContact) { 6038 this.contact = theContact; 6039 return this; 6040 } 6041 6042 public boolean hasContact() { 6043 if (this.contact == null) 6044 return false; 6045 for (ContactDetail item : this.contact) 6046 if (!item.isEmpty()) 6047 return true; 6048 return false; 6049 } 6050 6051 public ContactDetail addContact() { //3 6052 ContactDetail t = new ContactDetail(); 6053 if (this.contact == null) 6054 this.contact = new ArrayList<ContactDetail>(); 6055 this.contact.add(t); 6056 return t; 6057 } 6058 6059 public PlanDefinition addContact(ContactDetail t) { //3 6060 if (t == null) 6061 return this; 6062 if (this.contact == null) 6063 this.contact = new ArrayList<ContactDetail>(); 6064 this.contact.add(t); 6065 return this; 6066 } 6067 6068 /** 6069 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 6070 */ 6071 public ContactDetail getContactFirstRep() { 6072 if (getContact().isEmpty()) { 6073 addContact(); 6074 } 6075 return getContact().get(0); 6076 } 6077 6078 /** 6079 * @return {@link #description} (A free text natural language description of the plan definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 6080 */ 6081 public MarkdownType getDescriptionElement() { 6082 if (this.description == null) 6083 if (Configuration.errorOnAutoCreate()) 6084 throw new Error("Attempt to auto-create PlanDefinition.description"); 6085 else if (Configuration.doAutoCreate()) 6086 this.description = new MarkdownType(); // bb 6087 return this.description; 6088 } 6089 6090 public boolean hasDescriptionElement() { 6091 return this.description != null && !this.description.isEmpty(); 6092 } 6093 6094 public boolean hasDescription() { 6095 return this.description != null && !this.description.isEmpty(); 6096 } 6097 6098 /** 6099 * @param value {@link #description} (A free text natural language description of the plan definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 6100 */ 6101 public PlanDefinition setDescriptionElement(MarkdownType value) { 6102 this.description = value; 6103 return this; 6104 } 6105 6106 /** 6107 * @return A free text natural language description of the plan definition from a consumer's perspective. 6108 */ 6109 public String getDescription() { 6110 return this.description == null ? null : this.description.getValue(); 6111 } 6112 6113 /** 6114 * @param value A free text natural language description of the plan definition from a consumer's perspective. 6115 */ 6116 public PlanDefinition setDescription(String value) { 6117 if (value == null) 6118 this.description = null; 6119 else { 6120 if (this.description == null) 6121 this.description = new MarkdownType(); 6122 this.description.setValue(value); 6123 } 6124 return this; 6125 } 6126 6127 /** 6128 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.) 6129 */ 6130 public List<UsageContext> getUseContext() { 6131 if (this.useContext == null) 6132 this.useContext = new ArrayList<UsageContext>(); 6133 return this.useContext; 6134 } 6135 6136 /** 6137 * @return Returns a reference to <code>this</code> for easy method chaining 6138 */ 6139 public PlanDefinition setUseContext(List<UsageContext> theUseContext) { 6140 this.useContext = theUseContext; 6141 return this; 6142 } 6143 6144 public boolean hasUseContext() { 6145 if (this.useContext == null) 6146 return false; 6147 for (UsageContext item : this.useContext) 6148 if (!item.isEmpty()) 6149 return true; 6150 return false; 6151 } 6152 6153 public UsageContext addUseContext() { //3 6154 UsageContext t = new UsageContext(); 6155 if (this.useContext == null) 6156 this.useContext = new ArrayList<UsageContext>(); 6157 this.useContext.add(t); 6158 return t; 6159 } 6160 6161 public PlanDefinition addUseContext(UsageContext t) { //3 6162 if (t == null) 6163 return this; 6164 if (this.useContext == null) 6165 this.useContext = new ArrayList<UsageContext>(); 6166 this.useContext.add(t); 6167 return this; 6168 } 6169 6170 /** 6171 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 6172 */ 6173 public UsageContext getUseContextFirstRep() { 6174 if (getUseContext().isEmpty()) { 6175 addUseContext(); 6176 } 6177 return getUseContext().get(0); 6178 } 6179 6180 /** 6181 * @return {@link #jurisdiction} (A legal or geographic region in which the plan definition is intended to be used.) 6182 */ 6183 public List<CodeableConcept> getJurisdiction() { 6184 if (this.jurisdiction == null) 6185 this.jurisdiction = new ArrayList<CodeableConcept>(); 6186 return this.jurisdiction; 6187 } 6188 6189 /** 6190 * @return Returns a reference to <code>this</code> for easy method chaining 6191 */ 6192 public PlanDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 6193 this.jurisdiction = theJurisdiction; 6194 return this; 6195 } 6196 6197 public boolean hasJurisdiction() { 6198 if (this.jurisdiction == null) 6199 return false; 6200 for (CodeableConcept item : this.jurisdiction) 6201 if (!item.isEmpty()) 6202 return true; 6203 return false; 6204 } 6205 6206 public CodeableConcept addJurisdiction() { //3 6207 CodeableConcept t = new CodeableConcept(); 6208 if (this.jurisdiction == null) 6209 this.jurisdiction = new ArrayList<CodeableConcept>(); 6210 this.jurisdiction.add(t); 6211 return t; 6212 } 6213 6214 public PlanDefinition addJurisdiction(CodeableConcept t) { //3 6215 if (t == null) 6216 return this; 6217 if (this.jurisdiction == null) 6218 this.jurisdiction = new ArrayList<CodeableConcept>(); 6219 this.jurisdiction.add(t); 6220 return this; 6221 } 6222 6223 /** 6224 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 6225 */ 6226 public CodeableConcept getJurisdictionFirstRep() { 6227 if (getJurisdiction().isEmpty()) { 6228 addJurisdiction(); 6229 } 6230 return getJurisdiction().get(0); 6231 } 6232 6233 /** 6234 * @return {@link #purpose} (Explanation of why this plan definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 6235 */ 6236 public MarkdownType getPurposeElement() { 6237 if (this.purpose == null) 6238 if (Configuration.errorOnAutoCreate()) 6239 throw new Error("Attempt to auto-create PlanDefinition.purpose"); 6240 else if (Configuration.doAutoCreate()) 6241 this.purpose = new MarkdownType(); // bb 6242 return this.purpose; 6243 } 6244 6245 public boolean hasPurposeElement() { 6246 return this.purpose != null && !this.purpose.isEmpty(); 6247 } 6248 6249 public boolean hasPurpose() { 6250 return this.purpose != null && !this.purpose.isEmpty(); 6251 } 6252 6253 /** 6254 * @param value {@link #purpose} (Explanation of why this plan definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 6255 */ 6256 public PlanDefinition setPurposeElement(MarkdownType value) { 6257 this.purpose = value; 6258 return this; 6259 } 6260 6261 /** 6262 * @return Explanation of why this plan definition is needed and why it has been designed as it has. 6263 */ 6264 public String getPurpose() { 6265 return this.purpose == null ? null : this.purpose.getValue(); 6266 } 6267 6268 /** 6269 * @param value Explanation of why this plan definition is needed and why it has been designed as it has. 6270 */ 6271 public PlanDefinition setPurpose(String value) { 6272 if (value == null) 6273 this.purpose = null; 6274 else { 6275 if (this.purpose == null) 6276 this.purpose = new MarkdownType(); 6277 this.purpose.setValue(value); 6278 } 6279 return this; 6280 } 6281 6282 /** 6283 * @return {@link #usage} (A detailed description of how the plan definition is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 6284 */ 6285 public StringType getUsageElement() { 6286 if (this.usage == null) 6287 if (Configuration.errorOnAutoCreate()) 6288 throw new Error("Attempt to auto-create PlanDefinition.usage"); 6289 else if (Configuration.doAutoCreate()) 6290 this.usage = new StringType(); // bb 6291 return this.usage; 6292 } 6293 6294 public boolean hasUsageElement() { 6295 return this.usage != null && !this.usage.isEmpty(); 6296 } 6297 6298 public boolean hasUsage() { 6299 return this.usage != null && !this.usage.isEmpty(); 6300 } 6301 6302 /** 6303 * @param value {@link #usage} (A detailed description of how the plan definition is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 6304 */ 6305 public PlanDefinition setUsageElement(StringType value) { 6306 this.usage = value; 6307 return this; 6308 } 6309 6310 /** 6311 * @return A detailed description of how the plan definition is used from a clinical perspective. 6312 */ 6313 public String getUsage() { 6314 return this.usage == null ? null : this.usage.getValue(); 6315 } 6316 6317 /** 6318 * @param value A detailed description of how the plan definition is used from a clinical perspective. 6319 */ 6320 public PlanDefinition setUsage(String value) { 6321 if (Utilities.noString(value)) 6322 this.usage = null; 6323 else { 6324 if (this.usage == null) 6325 this.usage = new StringType(); 6326 this.usage.setValue(value); 6327 } 6328 return this; 6329 } 6330 6331 /** 6332 * @return {@link #copyright} (A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 6333 */ 6334 public MarkdownType getCopyrightElement() { 6335 if (this.copyright == null) 6336 if (Configuration.errorOnAutoCreate()) 6337 throw new Error("Attempt to auto-create PlanDefinition.copyright"); 6338 else if (Configuration.doAutoCreate()) 6339 this.copyright = new MarkdownType(); // bb 6340 return this.copyright; 6341 } 6342 6343 public boolean hasCopyrightElement() { 6344 return this.copyright != null && !this.copyright.isEmpty(); 6345 } 6346 6347 public boolean hasCopyright() { 6348 return this.copyright != null && !this.copyright.isEmpty(); 6349 } 6350 6351 /** 6352 * @param value {@link #copyright} (A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 6353 */ 6354 public PlanDefinition setCopyrightElement(MarkdownType value) { 6355 this.copyright = value; 6356 return this; 6357 } 6358 6359 /** 6360 * @return A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition. 6361 */ 6362 public String getCopyright() { 6363 return this.copyright == null ? null : this.copyright.getValue(); 6364 } 6365 6366 /** 6367 * @param value A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition. 6368 */ 6369 public PlanDefinition setCopyright(String value) { 6370 if (value == null) 6371 this.copyright = null; 6372 else { 6373 if (this.copyright == null) 6374 this.copyright = new MarkdownType(); 6375 this.copyright.setValue(value); 6376 } 6377 return this; 6378 } 6379 6380 /** 6381 * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 6382 */ 6383 public DateType getApprovalDateElement() { 6384 if (this.approvalDate == null) 6385 if (Configuration.errorOnAutoCreate()) 6386 throw new Error("Attempt to auto-create PlanDefinition.approvalDate"); 6387 else if (Configuration.doAutoCreate()) 6388 this.approvalDate = new DateType(); // bb 6389 return this.approvalDate; 6390 } 6391 6392 public boolean hasApprovalDateElement() { 6393 return this.approvalDate != null && !this.approvalDate.isEmpty(); 6394 } 6395 6396 public boolean hasApprovalDate() { 6397 return this.approvalDate != null && !this.approvalDate.isEmpty(); 6398 } 6399 6400 /** 6401 * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 6402 */ 6403 public PlanDefinition setApprovalDateElement(DateType value) { 6404 this.approvalDate = value; 6405 return this; 6406 } 6407 6408 /** 6409 * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 6410 */ 6411 public Date getApprovalDate() { 6412 return this.approvalDate == null ? null : this.approvalDate.getValue(); 6413 } 6414 6415 /** 6416 * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 6417 */ 6418 public PlanDefinition setApprovalDate(Date value) { 6419 if (value == null) 6420 this.approvalDate = null; 6421 else { 6422 if (this.approvalDate == null) 6423 this.approvalDate = new DateType(); 6424 this.approvalDate.setValue(value); 6425 } 6426 return this; 6427 } 6428 6429 /** 6430 * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 6431 */ 6432 public DateType getLastReviewDateElement() { 6433 if (this.lastReviewDate == null) 6434 if (Configuration.errorOnAutoCreate()) 6435 throw new Error("Attempt to auto-create PlanDefinition.lastReviewDate"); 6436 else if (Configuration.doAutoCreate()) 6437 this.lastReviewDate = new DateType(); // bb 6438 return this.lastReviewDate; 6439 } 6440 6441 public boolean hasLastReviewDateElement() { 6442 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 6443 } 6444 6445 public boolean hasLastReviewDate() { 6446 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 6447 } 6448 6449 /** 6450 * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 6451 */ 6452 public PlanDefinition setLastReviewDateElement(DateType value) { 6453 this.lastReviewDate = value; 6454 return this; 6455 } 6456 6457 /** 6458 * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 6459 */ 6460 public Date getLastReviewDate() { 6461 return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); 6462 } 6463 6464 /** 6465 * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 6466 */ 6467 public PlanDefinition setLastReviewDate(Date value) { 6468 if (value == null) 6469 this.lastReviewDate = null; 6470 else { 6471 if (this.lastReviewDate == null) 6472 this.lastReviewDate = new DateType(); 6473 this.lastReviewDate.setValue(value); 6474 } 6475 return this; 6476 } 6477 6478 /** 6479 * @return {@link #effectivePeriod} (The period during which the plan definition content was or is planned to be in active use.) 6480 */ 6481 public Period getEffectivePeriod() { 6482 if (this.effectivePeriod == null) 6483 if (Configuration.errorOnAutoCreate()) 6484 throw new Error("Attempt to auto-create PlanDefinition.effectivePeriod"); 6485 else if (Configuration.doAutoCreate()) 6486 this.effectivePeriod = new Period(); // cc 6487 return this.effectivePeriod; 6488 } 6489 6490 public boolean hasEffectivePeriod() { 6491 return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); 6492 } 6493 6494 /** 6495 * @param value {@link #effectivePeriod} (The period during which the plan definition content was or is planned to be in active use.) 6496 */ 6497 public PlanDefinition setEffectivePeriod(Period value) { 6498 this.effectivePeriod = value; 6499 return this; 6500 } 6501 6502 /** 6503 * @return {@link #topic} (Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.) 6504 */ 6505 public List<CodeableConcept> getTopic() { 6506 if (this.topic == null) 6507 this.topic = new ArrayList<CodeableConcept>(); 6508 return this.topic; 6509 } 6510 6511 /** 6512 * @return Returns a reference to <code>this</code> for easy method chaining 6513 */ 6514 public PlanDefinition setTopic(List<CodeableConcept> theTopic) { 6515 this.topic = theTopic; 6516 return this; 6517 } 6518 6519 public boolean hasTopic() { 6520 if (this.topic == null) 6521 return false; 6522 for (CodeableConcept item : this.topic) 6523 if (!item.isEmpty()) 6524 return true; 6525 return false; 6526 } 6527 6528 public CodeableConcept addTopic() { //3 6529 CodeableConcept t = new CodeableConcept(); 6530 if (this.topic == null) 6531 this.topic = new ArrayList<CodeableConcept>(); 6532 this.topic.add(t); 6533 return t; 6534 } 6535 6536 public PlanDefinition addTopic(CodeableConcept t) { //3 6537 if (t == null) 6538 return this; 6539 if (this.topic == null) 6540 this.topic = new ArrayList<CodeableConcept>(); 6541 this.topic.add(t); 6542 return this; 6543 } 6544 6545 /** 6546 * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist 6547 */ 6548 public CodeableConcept getTopicFirstRep() { 6549 if (getTopic().isEmpty()) { 6550 addTopic(); 6551 } 6552 return getTopic().get(0); 6553 } 6554 6555 /** 6556 * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.) 6557 */ 6558 public List<ContactDetail> getAuthor() { 6559 if (this.author == null) 6560 this.author = new ArrayList<ContactDetail>(); 6561 return this.author; 6562 } 6563 6564 /** 6565 * @return Returns a reference to <code>this</code> for easy method chaining 6566 */ 6567 public PlanDefinition setAuthor(List<ContactDetail> theAuthor) { 6568 this.author = theAuthor; 6569 return this; 6570 } 6571 6572 public boolean hasAuthor() { 6573 if (this.author == null) 6574 return false; 6575 for (ContactDetail item : this.author) 6576 if (!item.isEmpty()) 6577 return true; 6578 return false; 6579 } 6580 6581 public ContactDetail addAuthor() { //3 6582 ContactDetail t = new ContactDetail(); 6583 if (this.author == null) 6584 this.author = new ArrayList<ContactDetail>(); 6585 this.author.add(t); 6586 return t; 6587 } 6588 6589 public PlanDefinition addAuthor(ContactDetail t) { //3 6590 if (t == null) 6591 return this; 6592 if (this.author == null) 6593 this.author = new ArrayList<ContactDetail>(); 6594 this.author.add(t); 6595 return this; 6596 } 6597 6598 /** 6599 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist 6600 */ 6601 public ContactDetail getAuthorFirstRep() { 6602 if (getAuthor().isEmpty()) { 6603 addAuthor(); 6604 } 6605 return getAuthor().get(0); 6606 } 6607 6608 /** 6609 * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.) 6610 */ 6611 public List<ContactDetail> getEditor() { 6612 if (this.editor == null) 6613 this.editor = new ArrayList<ContactDetail>(); 6614 return this.editor; 6615 } 6616 6617 /** 6618 * @return Returns a reference to <code>this</code> for easy method chaining 6619 */ 6620 public PlanDefinition setEditor(List<ContactDetail> theEditor) { 6621 this.editor = theEditor; 6622 return this; 6623 } 6624 6625 public boolean hasEditor() { 6626 if (this.editor == null) 6627 return false; 6628 for (ContactDetail item : this.editor) 6629 if (!item.isEmpty()) 6630 return true; 6631 return false; 6632 } 6633 6634 public ContactDetail addEditor() { //3 6635 ContactDetail t = new ContactDetail(); 6636 if (this.editor == null) 6637 this.editor = new ArrayList<ContactDetail>(); 6638 this.editor.add(t); 6639 return t; 6640 } 6641 6642 public PlanDefinition addEditor(ContactDetail t) { //3 6643 if (t == null) 6644 return this; 6645 if (this.editor == null) 6646 this.editor = new ArrayList<ContactDetail>(); 6647 this.editor.add(t); 6648 return this; 6649 } 6650 6651 /** 6652 * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist 6653 */ 6654 public ContactDetail getEditorFirstRep() { 6655 if (getEditor().isEmpty()) { 6656 addEditor(); 6657 } 6658 return getEditor().get(0); 6659 } 6660 6661 /** 6662 * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.) 6663 */ 6664 public List<ContactDetail> getReviewer() { 6665 if (this.reviewer == null) 6666 this.reviewer = new ArrayList<ContactDetail>(); 6667 return this.reviewer; 6668 } 6669 6670 /** 6671 * @return Returns a reference to <code>this</code> for easy method chaining 6672 */ 6673 public PlanDefinition setReviewer(List<ContactDetail> theReviewer) { 6674 this.reviewer = theReviewer; 6675 return this; 6676 } 6677 6678 public boolean hasReviewer() { 6679 if (this.reviewer == null) 6680 return false; 6681 for (ContactDetail item : this.reviewer) 6682 if (!item.isEmpty()) 6683 return true; 6684 return false; 6685 } 6686 6687 public ContactDetail addReviewer() { //3 6688 ContactDetail t = new ContactDetail(); 6689 if (this.reviewer == null) 6690 this.reviewer = new ArrayList<ContactDetail>(); 6691 this.reviewer.add(t); 6692 return t; 6693 } 6694 6695 public PlanDefinition addReviewer(ContactDetail t) { //3 6696 if (t == null) 6697 return this; 6698 if (this.reviewer == null) 6699 this.reviewer = new ArrayList<ContactDetail>(); 6700 this.reviewer.add(t); 6701 return this; 6702 } 6703 6704 /** 6705 * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist 6706 */ 6707 public ContactDetail getReviewerFirstRep() { 6708 if (getReviewer().isEmpty()) { 6709 addReviewer(); 6710 } 6711 return getReviewer().get(0); 6712 } 6713 6714 /** 6715 * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.) 6716 */ 6717 public List<ContactDetail> getEndorser() { 6718 if (this.endorser == null) 6719 this.endorser = new ArrayList<ContactDetail>(); 6720 return this.endorser; 6721 } 6722 6723 /** 6724 * @return Returns a reference to <code>this</code> for easy method chaining 6725 */ 6726 public PlanDefinition setEndorser(List<ContactDetail> theEndorser) { 6727 this.endorser = theEndorser; 6728 return this; 6729 } 6730 6731 public boolean hasEndorser() { 6732 if (this.endorser == null) 6733 return false; 6734 for (ContactDetail item : this.endorser) 6735 if (!item.isEmpty()) 6736 return true; 6737 return false; 6738 } 6739 6740 public ContactDetail addEndorser() { //3 6741 ContactDetail t = new ContactDetail(); 6742 if (this.endorser == null) 6743 this.endorser = new ArrayList<ContactDetail>(); 6744 this.endorser.add(t); 6745 return t; 6746 } 6747 6748 public PlanDefinition addEndorser(ContactDetail t) { //3 6749 if (t == null) 6750 return this; 6751 if (this.endorser == null) 6752 this.endorser = new ArrayList<ContactDetail>(); 6753 this.endorser.add(t); 6754 return this; 6755 } 6756 6757 /** 6758 * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist 6759 */ 6760 public ContactDetail getEndorserFirstRep() { 6761 if (getEndorser().isEmpty()) { 6762 addEndorser(); 6763 } 6764 return getEndorser().get(0); 6765 } 6766 6767 /** 6768 * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.) 6769 */ 6770 public List<RelatedArtifact> getRelatedArtifact() { 6771 if (this.relatedArtifact == null) 6772 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6773 return this.relatedArtifact; 6774 } 6775 6776 /** 6777 * @return Returns a reference to <code>this</code> for easy method chaining 6778 */ 6779 public PlanDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 6780 this.relatedArtifact = theRelatedArtifact; 6781 return this; 6782 } 6783 6784 public boolean hasRelatedArtifact() { 6785 if (this.relatedArtifact == null) 6786 return false; 6787 for (RelatedArtifact item : this.relatedArtifact) 6788 if (!item.isEmpty()) 6789 return true; 6790 return false; 6791 } 6792 6793 public RelatedArtifact addRelatedArtifact() { //3 6794 RelatedArtifact t = new RelatedArtifact(); 6795 if (this.relatedArtifact == null) 6796 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6797 this.relatedArtifact.add(t); 6798 return t; 6799 } 6800 6801 public PlanDefinition addRelatedArtifact(RelatedArtifact t) { //3 6802 if (t == null) 6803 return this; 6804 if (this.relatedArtifact == null) 6805 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6806 this.relatedArtifact.add(t); 6807 return this; 6808 } 6809 6810 /** 6811 * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist 6812 */ 6813 public RelatedArtifact getRelatedArtifactFirstRep() { 6814 if (getRelatedArtifact().isEmpty()) { 6815 addRelatedArtifact(); 6816 } 6817 return getRelatedArtifact().get(0); 6818 } 6819 6820 /** 6821 * @return {@link #library} (A reference to a Library resource containing any formal logic used by the plan definition.) 6822 */ 6823 public List<CanonicalType> getLibrary() { 6824 if (this.library == null) 6825 this.library = new ArrayList<CanonicalType>(); 6826 return this.library; 6827 } 6828 6829 /** 6830 * @return Returns a reference to <code>this</code> for easy method chaining 6831 */ 6832 public PlanDefinition setLibrary(List<CanonicalType> theLibrary) { 6833 this.library = theLibrary; 6834 return this; 6835 } 6836 6837 public boolean hasLibrary() { 6838 if (this.library == null) 6839 return false; 6840 for (CanonicalType item : this.library) 6841 if (!item.isEmpty()) 6842 return true; 6843 return false; 6844 } 6845 6846 /** 6847 * @return {@link #library} (A reference to a Library resource containing any formal logic used by the plan definition.) 6848 */ 6849 public CanonicalType addLibraryElement() {//2 6850 CanonicalType t = new CanonicalType(); 6851 if (this.library == null) 6852 this.library = new ArrayList<CanonicalType>(); 6853 this.library.add(t); 6854 return t; 6855 } 6856 6857 /** 6858 * @param value {@link #library} (A reference to a Library resource containing any formal logic used by the plan definition.) 6859 */ 6860 public PlanDefinition addLibrary(String value) { //1 6861 CanonicalType t = new CanonicalType(); 6862 t.setValue(value); 6863 if (this.library == null) 6864 this.library = new ArrayList<CanonicalType>(); 6865 this.library.add(t); 6866 return this; 6867 } 6868 6869 /** 6870 * @param value {@link #library} (A reference to a Library resource containing any formal logic used by the plan definition.) 6871 */ 6872 public boolean hasLibrary(String value) { 6873 if (this.library == null) 6874 return false; 6875 for (CanonicalType v : this.library) 6876 if (v.getValue().equals(value)) // canonical(Library) 6877 return true; 6878 return false; 6879 } 6880 6881 /** 6882 * @return {@link #goal} (Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.) 6883 */ 6884 public List<PlanDefinitionGoalComponent> getGoal() { 6885 if (this.goal == null) 6886 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6887 return this.goal; 6888 } 6889 6890 /** 6891 * @return Returns a reference to <code>this</code> for easy method chaining 6892 */ 6893 public PlanDefinition setGoal(List<PlanDefinitionGoalComponent> theGoal) { 6894 this.goal = theGoal; 6895 return this; 6896 } 6897 6898 public boolean hasGoal() { 6899 if (this.goal == null) 6900 return false; 6901 for (PlanDefinitionGoalComponent item : this.goal) 6902 if (!item.isEmpty()) 6903 return true; 6904 return false; 6905 } 6906 6907 public PlanDefinitionGoalComponent addGoal() { //3 6908 PlanDefinitionGoalComponent t = new PlanDefinitionGoalComponent(); 6909 if (this.goal == null) 6910 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6911 this.goal.add(t); 6912 return t; 6913 } 6914 6915 public PlanDefinition addGoal(PlanDefinitionGoalComponent t) { //3 6916 if (t == null) 6917 return this; 6918 if (this.goal == null) 6919 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6920 this.goal.add(t); 6921 return this; 6922 } 6923 6924 /** 6925 * @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist 6926 */ 6927 public PlanDefinitionGoalComponent getGoalFirstRep() { 6928 if (getGoal().isEmpty()) { 6929 addGoal(); 6930 } 6931 return getGoal().get(0); 6932 } 6933 6934 /** 6935 * @return {@link #action} (An action or group of actions to be taken as part of the plan.) 6936 */ 6937 public List<PlanDefinitionActionComponent> getAction() { 6938 if (this.action == null) 6939 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6940 return this.action; 6941 } 6942 6943 /** 6944 * @return Returns a reference to <code>this</code> for easy method chaining 6945 */ 6946 public PlanDefinition setAction(List<PlanDefinitionActionComponent> theAction) { 6947 this.action = theAction; 6948 return this; 6949 } 6950 6951 public boolean hasAction() { 6952 if (this.action == null) 6953 return false; 6954 for (PlanDefinitionActionComponent item : this.action) 6955 if (!item.isEmpty()) 6956 return true; 6957 return false; 6958 } 6959 6960 public PlanDefinitionActionComponent addAction() { //3 6961 PlanDefinitionActionComponent t = new PlanDefinitionActionComponent(); 6962 if (this.action == null) 6963 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6964 this.action.add(t); 6965 return t; 6966 } 6967 6968 public PlanDefinition addAction(PlanDefinitionActionComponent t) { //3 6969 if (t == null) 6970 return this; 6971 if (this.action == null) 6972 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6973 this.action.add(t); 6974 return this; 6975 } 6976 6977 /** 6978 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 6979 */ 6980 public PlanDefinitionActionComponent getActionFirstRep() { 6981 if (getAction().isEmpty()) { 6982 addAction(); 6983 } 6984 return getAction().get(0); 6985 } 6986 6987 protected void listChildren(List<Property> children) { 6988 super.listChildren(children); 6989 children.add(new Property("url", "uri", "An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.", 0, 1, url)); 6990 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 6991 children.add(new Property("version", "string", "The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", 0, 1, version)); 6992 children.add(new Property("name", "string", "A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 6993 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the plan definition.", 0, 1, title)); 6994 children.add(new Property("subtitle", "string", "An explanatory or alternate title for the plan definition giving additional information about its content.", 0, 1, subtitle)); 6995 children.add(new Property("type", "CodeableConcept", "A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.", 0, 1, type)); 6996 children.add(new Property("status", "code", "The status of this plan definition. Enables tracking the life-cycle of the content.", 0, 1, status)); 6997 children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental)); 6998 children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the plan definition.", 0, 1, subject)); 6999 children.add(new Property("date", "dateTime", "The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.", 0, 1, date)); 7000 children.add(new Property("publisher", "string", "The name of the organization or individual that published the plan definition.", 0, 1, publisher)); 7001 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 7002 children.add(new Property("description", "markdown", "A free text natural language description of the plan definition from a consumer's perspective.", 0, 1, description)); 7003 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 7004 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the plan definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 7005 children.add(new Property("purpose", "markdown", "Explanation of why this plan definition is needed and why it has been designed as it has.", 0, 1, purpose)); 7006 children.add(new Property("usage", "string", "A detailed description of how the plan definition is used from a clinical perspective.", 0, 1, usage)); 7007 children.add(new Property("copyright", "markdown", "A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.", 0, 1, copyright)); 7008 children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate)); 7009 children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate)); 7010 children.add(new Property("effectivePeriod", "Period", "The period during which the plan definition content was or is planned to be in active use.", 0, 1, effectivePeriod)); 7011 children.add(new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic)); 7012 children.add(new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author)); 7013 children.add(new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor)); 7014 children.add(new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer)); 7015 children.add(new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser)); 7016 children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact)); 7017 children.add(new Property("library", "canonical(Library)", "A reference to a Library resource containing any formal logic used by the plan definition.", 0, java.lang.Integer.MAX_VALUE, library)); 7018 children.add(new Property("goal", "", "Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.", 0, java.lang.Integer.MAX_VALUE, goal)); 7019 children.add(new Property("action", "", "An action or group of actions to be taken as part of the plan.", 0, java.lang.Integer.MAX_VALUE, action)); 7020 } 7021 7022 @Override 7023 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7024 switch (_hash) { 7025 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.", 0, 1, url); 7026 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 7027 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", 0, 1, version); 7028 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 7029 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the plan definition.", 0, 1, title); 7030 case -2060497896: /*subtitle*/ return new Property("subtitle", "string", "An explanatory or alternate title for the plan definition giving additional information about its content.", 0, 1, subtitle); 7031 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.", 0, 1, type); 7032 case -892481550: /*status*/ return new Property("status", "code", "The status of this plan definition. Enables tracking the life-cycle of the content.", 0, 1, status); 7033 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental); 7034 case -573640748: /*subject[x]*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the plan definition.", 0, 1, subject); 7035 case -1867885268: /*subject*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the plan definition.", 0, 1, subject); 7036 case -1257122603: /*subjectCodeableConcept*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the plan definition.", 0, 1, subject); 7037 case 772938623: /*subjectReference*/ return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject of the plan definition.", 0, 1, subject); 7038 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.", 0, 1, date); 7039 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the plan definition.", 0, 1, publisher); 7040 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 7041 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the plan definition from a consumer's perspective.", 0, 1, description); 7042 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 7043 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the plan definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 7044 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this plan definition is needed and why it has been designed as it has.", 0, 1, purpose); 7045 case 111574433: /*usage*/ return new Property("usage", "string", "A detailed description of how the plan definition is used from a clinical perspective.", 0, 1, usage); 7046 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.", 0, 1, copyright); 7047 case 223539345: /*approvalDate*/ return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate); 7048 case -1687512484: /*lastReviewDate*/ return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate); 7049 case -403934648: /*effectivePeriod*/ return new Property("effectivePeriod", "Period", "The period during which the plan definition content was or is planned to be in active use.", 0, 1, effectivePeriod); 7050 case 110546223: /*topic*/ return new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic); 7051 case -1406328437: /*author*/ return new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author); 7052 case -1307827859: /*editor*/ return new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor); 7053 case -261190139: /*reviewer*/ return new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer); 7054 case 1740277666: /*endorser*/ return new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser); 7055 case 666807069: /*relatedArtifact*/ return new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact); 7056 case 166208699: /*library*/ return new Property("library", "canonical(Library)", "A reference to a Library resource containing any formal logic used by the plan definition.", 0, java.lang.Integer.MAX_VALUE, library); 7057 case 3178259: /*goal*/ return new Property("goal", "", "Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.", 0, java.lang.Integer.MAX_VALUE, goal); 7058 case -1422950858: /*action*/ return new Property("action", "", "An action or group of actions to be taken as part of the plan.", 0, java.lang.Integer.MAX_VALUE, action); 7059 default: return super.getNamedProperty(_hash, _name, _checkValid); 7060 } 7061 7062 } 7063 7064 @Override 7065 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7066 switch (hash) { 7067 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 7068 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 7069 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 7070 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 7071 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 7072 case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType 7073 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 7074 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 7075 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 7076 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Type 7077 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 7078 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 7079 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 7080 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 7081 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 7082 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 7083 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 7084 case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType 7085 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 7086 case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType 7087 case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType 7088 case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period 7089 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept 7090 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail 7091 case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail 7092 case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail 7093 case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail 7094 case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact 7095 case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType 7096 case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // PlanDefinitionGoalComponent 7097 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // PlanDefinitionActionComponent 7098 default: return super.getProperty(hash, name, checkValid); 7099 } 7100 7101 } 7102 7103 @Override 7104 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7105 switch (hash) { 7106 case 116079: // url 7107 this.url = castToUri(value); // UriType 7108 return value; 7109 case -1618432855: // identifier 7110 this.getIdentifier().add(castToIdentifier(value)); // Identifier 7111 return value; 7112 case 351608024: // version 7113 this.version = castToString(value); // StringType 7114 return value; 7115 case 3373707: // name 7116 this.name = castToString(value); // StringType 7117 return value; 7118 case 110371416: // title 7119 this.title = castToString(value); // StringType 7120 return value; 7121 case -2060497896: // subtitle 7122 this.subtitle = castToString(value); // StringType 7123 return value; 7124 case 3575610: // type 7125 this.type = castToCodeableConcept(value); // CodeableConcept 7126 return value; 7127 case -892481550: // status 7128 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 7129 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 7130 return value; 7131 case -404562712: // experimental 7132 this.experimental = castToBoolean(value); // BooleanType 7133 return value; 7134 case -1867885268: // subject 7135 this.subject = castToType(value); // Type 7136 return value; 7137 case 3076014: // date 7138 this.date = castToDateTime(value); // DateTimeType 7139 return value; 7140 case 1447404028: // publisher 7141 this.publisher = castToString(value); // StringType 7142 return value; 7143 case 951526432: // contact 7144 this.getContact().add(castToContactDetail(value)); // ContactDetail 7145 return value; 7146 case -1724546052: // description 7147 this.description = castToMarkdown(value); // MarkdownType 7148 return value; 7149 case -669707736: // useContext 7150 this.getUseContext().add(castToUsageContext(value)); // UsageContext 7151 return value; 7152 case -507075711: // jurisdiction 7153 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 7154 return value; 7155 case -220463842: // purpose 7156 this.purpose = castToMarkdown(value); // MarkdownType 7157 return value; 7158 case 111574433: // usage 7159 this.usage = castToString(value); // StringType 7160 return value; 7161 case 1522889671: // copyright 7162 this.copyright = castToMarkdown(value); // MarkdownType 7163 return value; 7164 case 223539345: // approvalDate 7165 this.approvalDate = castToDate(value); // DateType 7166 return value; 7167 case -1687512484: // lastReviewDate 7168 this.lastReviewDate = castToDate(value); // DateType 7169 return value; 7170 case -403934648: // effectivePeriod 7171 this.effectivePeriod = castToPeriod(value); // Period 7172 return value; 7173 case 110546223: // topic 7174 this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept 7175 return value; 7176 case -1406328437: // author 7177 this.getAuthor().add(castToContactDetail(value)); // ContactDetail 7178 return value; 7179 case -1307827859: // editor 7180 this.getEditor().add(castToContactDetail(value)); // ContactDetail 7181 return value; 7182 case -261190139: // reviewer 7183 this.getReviewer().add(castToContactDetail(value)); // ContactDetail 7184 return value; 7185 case 1740277666: // endorser 7186 this.getEndorser().add(castToContactDetail(value)); // ContactDetail 7187 return value; 7188 case 666807069: // relatedArtifact 7189 this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact 7190 return value; 7191 case 166208699: // library 7192 this.getLibrary().add(castToCanonical(value)); // CanonicalType 7193 return value; 7194 case 3178259: // goal 7195 this.getGoal().add((PlanDefinitionGoalComponent) value); // PlanDefinitionGoalComponent 7196 return value; 7197 case -1422950858: // action 7198 this.getAction().add((PlanDefinitionActionComponent) value); // PlanDefinitionActionComponent 7199 return value; 7200 default: return super.setProperty(hash, name, value); 7201 } 7202 7203 } 7204 7205 @Override 7206 public Base setProperty(String name, Base value) throws FHIRException { 7207 if (name.equals("url")) { 7208 this.url = castToUri(value); // UriType 7209 } else if (name.equals("identifier")) { 7210 this.getIdentifier().add(castToIdentifier(value)); 7211 } else if (name.equals("version")) { 7212 this.version = castToString(value); // StringType 7213 } else if (name.equals("name")) { 7214 this.name = castToString(value); // StringType 7215 } else if (name.equals("title")) { 7216 this.title = castToString(value); // StringType 7217 } else if (name.equals("subtitle")) { 7218 this.subtitle = castToString(value); // StringType 7219 } else if (name.equals("type")) { 7220 this.type = castToCodeableConcept(value); // CodeableConcept 7221 } else if (name.equals("status")) { 7222 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 7223 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 7224 } else if (name.equals("experimental")) { 7225 this.experimental = castToBoolean(value); // BooleanType 7226 } else if (name.equals("subject[x]")) { 7227 this.subject = castToType(value); // Type 7228 } else if (name.equals("date")) { 7229 this.date = castToDateTime(value); // DateTimeType 7230 } else if (name.equals("publisher")) { 7231 this.publisher = castToString(value); // StringType 7232 } else if (name.equals("contact")) { 7233 this.getContact().add(castToContactDetail(value)); 7234 } else if (name.equals("description")) { 7235 this.description = castToMarkdown(value); // MarkdownType 7236 } else if (name.equals("useContext")) { 7237 this.getUseContext().add(castToUsageContext(value)); 7238 } else if (name.equals("jurisdiction")) { 7239 this.getJurisdiction().add(castToCodeableConcept(value)); 7240 } else if (name.equals("purpose")) { 7241 this.purpose = castToMarkdown(value); // MarkdownType 7242 } else if (name.equals("usage")) { 7243 this.usage = castToString(value); // StringType 7244 } else if (name.equals("copyright")) { 7245 this.copyright = castToMarkdown(value); // MarkdownType 7246 } else if (name.equals("approvalDate")) { 7247 this.approvalDate = castToDate(value); // DateType 7248 } else if (name.equals("lastReviewDate")) { 7249 this.lastReviewDate = castToDate(value); // DateType 7250 } else if (name.equals("effectivePeriod")) { 7251 this.effectivePeriod = castToPeriod(value); // Period 7252 } else if (name.equals("topic")) { 7253 this.getTopic().add(castToCodeableConcept(value)); 7254 } else if (name.equals("author")) { 7255 this.getAuthor().add(castToContactDetail(value)); 7256 } else if (name.equals("editor")) { 7257 this.getEditor().add(castToContactDetail(value)); 7258 } else if (name.equals("reviewer")) { 7259 this.getReviewer().add(castToContactDetail(value)); 7260 } else if (name.equals("endorser")) { 7261 this.getEndorser().add(castToContactDetail(value)); 7262 } else if (name.equals("relatedArtifact")) { 7263 this.getRelatedArtifact().add(castToRelatedArtifact(value)); 7264 } else if (name.equals("library")) { 7265 this.getLibrary().add(castToCanonical(value)); 7266 } else if (name.equals("goal")) { 7267 this.getGoal().add((PlanDefinitionGoalComponent) value); 7268 } else if (name.equals("action")) { 7269 this.getAction().add((PlanDefinitionActionComponent) value); 7270 } else 7271 return super.setProperty(name, value); 7272 return value; 7273 } 7274 7275 @Override 7276 public Base makeProperty(int hash, String name) throws FHIRException { 7277 switch (hash) { 7278 case 116079: return getUrlElement(); 7279 case -1618432855: return addIdentifier(); 7280 case 351608024: return getVersionElement(); 7281 case 3373707: return getNameElement(); 7282 case 110371416: return getTitleElement(); 7283 case -2060497896: return getSubtitleElement(); 7284 case 3575610: return getType(); 7285 case -892481550: return getStatusElement(); 7286 case -404562712: return getExperimentalElement(); 7287 case -573640748: return getSubject(); 7288 case -1867885268: return getSubject(); 7289 case 3076014: return getDateElement(); 7290 case 1447404028: return getPublisherElement(); 7291 case 951526432: return addContact(); 7292 case -1724546052: return getDescriptionElement(); 7293 case -669707736: return addUseContext(); 7294 case -507075711: return addJurisdiction(); 7295 case -220463842: return getPurposeElement(); 7296 case 111574433: return getUsageElement(); 7297 case 1522889671: return getCopyrightElement(); 7298 case 223539345: return getApprovalDateElement(); 7299 case -1687512484: return getLastReviewDateElement(); 7300 case -403934648: return getEffectivePeriod(); 7301 case 110546223: return addTopic(); 7302 case -1406328437: return addAuthor(); 7303 case -1307827859: return addEditor(); 7304 case -261190139: return addReviewer(); 7305 case 1740277666: return addEndorser(); 7306 case 666807069: return addRelatedArtifact(); 7307 case 166208699: return addLibraryElement(); 7308 case 3178259: return addGoal(); 7309 case -1422950858: return addAction(); 7310 default: return super.makeProperty(hash, name); 7311 } 7312 7313 } 7314 7315 @Override 7316 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7317 switch (hash) { 7318 case 116079: /*url*/ return new String[] {"uri"}; 7319 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 7320 case 351608024: /*version*/ return new String[] {"string"}; 7321 case 3373707: /*name*/ return new String[] {"string"}; 7322 case 110371416: /*title*/ return new String[] {"string"}; 7323 case -2060497896: /*subtitle*/ return new String[] {"string"}; 7324 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 7325 case -892481550: /*status*/ return new String[] {"code"}; 7326 case -404562712: /*experimental*/ return new String[] {"boolean"}; 7327 case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"}; 7328 case 3076014: /*date*/ return new String[] {"dateTime"}; 7329 case 1447404028: /*publisher*/ return new String[] {"string"}; 7330 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 7331 case -1724546052: /*description*/ return new String[] {"markdown"}; 7332 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 7333 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 7334 case -220463842: /*purpose*/ return new String[] {"markdown"}; 7335 case 111574433: /*usage*/ return new String[] {"string"}; 7336 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 7337 case 223539345: /*approvalDate*/ return new String[] {"date"}; 7338 case -1687512484: /*lastReviewDate*/ return new String[] {"date"}; 7339 case -403934648: /*effectivePeriod*/ return new String[] {"Period"}; 7340 case 110546223: /*topic*/ return new String[] {"CodeableConcept"}; 7341 case -1406328437: /*author*/ return new String[] {"ContactDetail"}; 7342 case -1307827859: /*editor*/ return new String[] {"ContactDetail"}; 7343 case -261190139: /*reviewer*/ return new String[] {"ContactDetail"}; 7344 case 1740277666: /*endorser*/ return new String[] {"ContactDetail"}; 7345 case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"}; 7346 case 166208699: /*library*/ return new String[] {"canonical"}; 7347 case 3178259: /*goal*/ return new String[] {}; 7348 case -1422950858: /*action*/ return new String[] {}; 7349 default: return super.getTypesForProperty(hash, name); 7350 } 7351 7352 } 7353 7354 @Override 7355 public Base addChild(String name) throws FHIRException { 7356 if (name.equals("url")) { 7357 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.url"); 7358 } 7359 else if (name.equals("identifier")) { 7360 return addIdentifier(); 7361 } 7362 else if (name.equals("version")) { 7363 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.version"); 7364 } 7365 else if (name.equals("name")) { 7366 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.name"); 7367 } 7368 else if (name.equals("title")) { 7369 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.title"); 7370 } 7371 else if (name.equals("subtitle")) { 7372 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.subtitle"); 7373 } 7374 else if (name.equals("type")) { 7375 this.type = new CodeableConcept(); 7376 return this.type; 7377 } 7378 else if (name.equals("status")) { 7379 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.status"); 7380 } 7381 else if (name.equals("experimental")) { 7382 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.experimental"); 7383 } 7384 else if (name.equals("subjectCodeableConcept")) { 7385 this.subject = new CodeableConcept(); 7386 return this.subject; 7387 } 7388 else if (name.equals("subjectReference")) { 7389 this.subject = new Reference(); 7390 return this.subject; 7391 } 7392 else if (name.equals("date")) { 7393 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.date"); 7394 } 7395 else if (name.equals("publisher")) { 7396 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.publisher"); 7397 } 7398 else if (name.equals("contact")) { 7399 return addContact(); 7400 } 7401 else if (name.equals("description")) { 7402 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 7403 } 7404 else if (name.equals("useContext")) { 7405 return addUseContext(); 7406 } 7407 else if (name.equals("jurisdiction")) { 7408 return addJurisdiction(); 7409 } 7410 else if (name.equals("purpose")) { 7411 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.purpose"); 7412 } 7413 else if (name.equals("usage")) { 7414 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.usage"); 7415 } 7416 else if (name.equals("copyright")) { 7417 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.copyright"); 7418 } 7419 else if (name.equals("approvalDate")) { 7420 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.approvalDate"); 7421 } 7422 else if (name.equals("lastReviewDate")) { 7423 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.lastReviewDate"); 7424 } 7425 else if (name.equals("effectivePeriod")) { 7426 this.effectivePeriod = new Period(); 7427 return this.effectivePeriod; 7428 } 7429 else if (name.equals("topic")) { 7430 return addTopic(); 7431 } 7432 else if (name.equals("author")) { 7433 return addAuthor(); 7434 } 7435 else if (name.equals("editor")) { 7436 return addEditor(); 7437 } 7438 else if (name.equals("reviewer")) { 7439 return addReviewer(); 7440 } 7441 else if (name.equals("endorser")) { 7442 return addEndorser(); 7443 } 7444 else if (name.equals("relatedArtifact")) { 7445 return addRelatedArtifact(); 7446 } 7447 else if (name.equals("library")) { 7448 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.library"); 7449 } 7450 else if (name.equals("goal")) { 7451 return addGoal(); 7452 } 7453 else if (name.equals("action")) { 7454 return addAction(); 7455 } 7456 else 7457 return super.addChild(name); 7458 } 7459 7460 public String fhirType() { 7461 return "PlanDefinition"; 7462 7463 } 7464 7465 public PlanDefinition copy() { 7466 PlanDefinition dst = new PlanDefinition(); 7467 copyValues(dst); 7468 return dst; 7469 } 7470 7471 public void copyValues(PlanDefinition dst) { 7472 super.copyValues(dst); 7473 dst.url = url == null ? null : url.copy(); 7474 if (identifier != null) { 7475 dst.identifier = new ArrayList<Identifier>(); 7476 for (Identifier i : identifier) 7477 dst.identifier.add(i.copy()); 7478 }; 7479 dst.version = version == null ? null : version.copy(); 7480 dst.name = name == null ? null : name.copy(); 7481 dst.title = title == null ? null : title.copy(); 7482 dst.subtitle = subtitle == null ? null : subtitle.copy(); 7483 dst.type = type == null ? null : type.copy(); 7484 dst.status = status == null ? null : status.copy(); 7485 dst.experimental = experimental == null ? null : experimental.copy(); 7486 dst.subject = subject == null ? null : subject.copy(); 7487 dst.date = date == null ? null : date.copy(); 7488 dst.publisher = publisher == null ? null : publisher.copy(); 7489 if (contact != null) { 7490 dst.contact = new ArrayList<ContactDetail>(); 7491 for (ContactDetail i : contact) 7492 dst.contact.add(i.copy()); 7493 }; 7494 dst.description = description == null ? null : description.copy(); 7495 if (useContext != null) { 7496 dst.useContext = new ArrayList<UsageContext>(); 7497 for (UsageContext i : useContext) 7498 dst.useContext.add(i.copy()); 7499 }; 7500 if (jurisdiction != null) { 7501 dst.jurisdiction = new ArrayList<CodeableConcept>(); 7502 for (CodeableConcept i : jurisdiction) 7503 dst.jurisdiction.add(i.copy()); 7504 }; 7505 dst.purpose = purpose == null ? null : purpose.copy(); 7506 dst.usage = usage == null ? null : usage.copy(); 7507 dst.copyright = copyright == null ? null : copyright.copy(); 7508 dst.approvalDate = approvalDate == null ? null : approvalDate.copy(); 7509 dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); 7510 dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); 7511 if (topic != null) { 7512 dst.topic = new ArrayList<CodeableConcept>(); 7513 for (CodeableConcept i : topic) 7514 dst.topic.add(i.copy()); 7515 }; 7516 if (author != null) { 7517 dst.author = new ArrayList<ContactDetail>(); 7518 for (ContactDetail i : author) 7519 dst.author.add(i.copy()); 7520 }; 7521 if (editor != null) { 7522 dst.editor = new ArrayList<ContactDetail>(); 7523 for (ContactDetail i : editor) 7524 dst.editor.add(i.copy()); 7525 }; 7526 if (reviewer != null) { 7527 dst.reviewer = new ArrayList<ContactDetail>(); 7528 for (ContactDetail i : reviewer) 7529 dst.reviewer.add(i.copy()); 7530 }; 7531 if (endorser != null) { 7532 dst.endorser = new ArrayList<ContactDetail>(); 7533 for (ContactDetail i : endorser) 7534 dst.endorser.add(i.copy()); 7535 }; 7536 if (relatedArtifact != null) { 7537 dst.relatedArtifact = new ArrayList<RelatedArtifact>(); 7538 for (RelatedArtifact i : relatedArtifact) 7539 dst.relatedArtifact.add(i.copy()); 7540 }; 7541 if (library != null) { 7542 dst.library = new ArrayList<CanonicalType>(); 7543 for (CanonicalType i : library) 7544 dst.library.add(i.copy()); 7545 }; 7546 if (goal != null) { 7547 dst.goal = new ArrayList<PlanDefinitionGoalComponent>(); 7548 for (PlanDefinitionGoalComponent i : goal) 7549 dst.goal.add(i.copy()); 7550 }; 7551 if (action != null) { 7552 dst.action = new ArrayList<PlanDefinitionActionComponent>(); 7553 for (PlanDefinitionActionComponent i : action) 7554 dst.action.add(i.copy()); 7555 }; 7556 } 7557 7558 protected PlanDefinition typedCopy() { 7559 return copy(); 7560 } 7561 7562 @Override 7563 public boolean equalsDeep(Base other_) { 7564 if (!super.equalsDeep(other_)) 7565 return false; 7566 if (!(other_ instanceof PlanDefinition)) 7567 return false; 7568 PlanDefinition o = (PlanDefinition) other_; 7569 return compareDeep(identifier, o.identifier, true) && compareDeep(subtitle, o.subtitle, true) && compareDeep(type, o.type, true) 7570 && compareDeep(subject, o.subject, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) 7571 && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true) 7572 && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true) 7573 && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true) && compareDeep(editor, o.editor, true) 7574 && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true) && compareDeep(relatedArtifact, o.relatedArtifact, true) 7575 && compareDeep(library, o.library, true) && compareDeep(goal, o.goal, true) && compareDeep(action, o.action, true) 7576 ; 7577 } 7578 7579 @Override 7580 public boolean equalsShallow(Base other_) { 7581 if (!super.equalsShallow(other_)) 7582 return false; 7583 if (!(other_ instanceof PlanDefinition)) 7584 return false; 7585 PlanDefinition o = (PlanDefinition) other_; 7586 return compareValues(subtitle, o.subtitle, true) && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) 7587 && compareValues(copyright, o.copyright, true) && compareValues(approvalDate, o.approvalDate, true) 7588 && compareValues(lastReviewDate, o.lastReviewDate, true); 7589 } 7590 7591 public boolean isEmpty() { 7592 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subtitle, type 7593 , subject, purpose, usage, copyright, approvalDate, lastReviewDate, effectivePeriod 7594 , topic, author, editor, reviewer, endorser, relatedArtifact, library, goal 7595 , action); 7596 } 7597 7598 @Override 7599 public ResourceType getResourceType() { 7600 return ResourceType.PlanDefinition; 7601 } 7602 7603 /** 7604 * Search parameter: <b>date</b> 7605 * <p> 7606 * Description: <b>The plan definition publication date</b><br> 7607 * Type: <b>date</b><br> 7608 * Path: <b>PlanDefinition.date</b><br> 7609 * </p> 7610 */ 7611 @SearchParamDefinition(name="date", path="PlanDefinition.date", description="The plan definition publication date", type="date" ) 7612 public static final String SP_DATE = "date"; 7613 /** 7614 * <b>Fluent Client</b> search parameter constant for <b>date</b> 7615 * <p> 7616 * Description: <b>The plan definition publication date</b><br> 7617 * Type: <b>date</b><br> 7618 * Path: <b>PlanDefinition.date</b><br> 7619 * </p> 7620 */ 7621 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 7622 7623 /** 7624 * Search parameter: <b>identifier</b> 7625 * <p> 7626 * Description: <b>External identifier for the plan definition</b><br> 7627 * Type: <b>token</b><br> 7628 * Path: <b>PlanDefinition.identifier</b><br> 7629 * </p> 7630 */ 7631 @SearchParamDefinition(name="identifier", path="PlanDefinition.identifier", description="External identifier for the plan definition", type="token" ) 7632 public static final String SP_IDENTIFIER = "identifier"; 7633 /** 7634 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 7635 * <p> 7636 * Description: <b>External identifier for the plan definition</b><br> 7637 * Type: <b>token</b><br> 7638 * Path: <b>PlanDefinition.identifier</b><br> 7639 * </p> 7640 */ 7641 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 7642 7643 /** 7644 * Search parameter: <b>successor</b> 7645 * <p> 7646 * Description: <b>What resource is being referenced</b><br> 7647 * Type: <b>reference</b><br> 7648 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7649 * </p> 7650 */ 7651 @SearchParamDefinition(name="successor", path="PlanDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference" ) 7652 public static final String SP_SUCCESSOR = "successor"; 7653 /** 7654 * <b>Fluent Client</b> search parameter constant for <b>successor</b> 7655 * <p> 7656 * Description: <b>What resource is being referenced</b><br> 7657 * Type: <b>reference</b><br> 7658 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7659 * </p> 7660 */ 7661 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR); 7662 7663/** 7664 * Constant for fluent queries to be used to add include statements. Specifies 7665 * the path value of "<b>PlanDefinition:successor</b>". 7666 */ 7667 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("PlanDefinition:successor").toLocked(); 7668 7669 /** 7670 * Search parameter: <b>context-type-value</b> 7671 * <p> 7672 * Description: <b>A use context type and value assigned to the plan definition</b><br> 7673 * Type: <b>composite</b><br> 7674 * Path: <b></b><br> 7675 * </p> 7676 */ 7677 @SearchParamDefinition(name="context-type-value", path="PlanDefinition.useContext", description="A use context type and value assigned to the plan definition", type="composite", compositeOf={"context-type", "context"} ) 7678 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 7679 /** 7680 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 7681 * <p> 7682 * Description: <b>A use context type and value assigned to the plan definition</b><br> 7683 * Type: <b>composite</b><br> 7684 * Path: <b></b><br> 7685 * </p> 7686 */ 7687 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 7688 7689 /** 7690 * Search parameter: <b>jurisdiction</b> 7691 * <p> 7692 * Description: <b>Intended jurisdiction for the plan definition</b><br> 7693 * Type: <b>token</b><br> 7694 * Path: <b>PlanDefinition.jurisdiction</b><br> 7695 * </p> 7696 */ 7697 @SearchParamDefinition(name="jurisdiction", path="PlanDefinition.jurisdiction", description="Intended jurisdiction for the plan definition", type="token" ) 7698 public static final String SP_JURISDICTION = "jurisdiction"; 7699 /** 7700 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 7701 * <p> 7702 * Description: <b>Intended jurisdiction for the plan definition</b><br> 7703 * Type: <b>token</b><br> 7704 * Path: <b>PlanDefinition.jurisdiction</b><br> 7705 * </p> 7706 */ 7707 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 7708 7709 /** 7710 * Search parameter: <b>description</b> 7711 * <p> 7712 * Description: <b>The description of the plan definition</b><br> 7713 * Type: <b>string</b><br> 7714 * Path: <b>PlanDefinition.description</b><br> 7715 * </p> 7716 */ 7717 @SearchParamDefinition(name="description", path="PlanDefinition.description", description="The description of the plan definition", type="string" ) 7718 public static final String SP_DESCRIPTION = "description"; 7719 /** 7720 * <b>Fluent Client</b> search parameter constant for <b>description</b> 7721 * <p> 7722 * Description: <b>The description of the plan definition</b><br> 7723 * Type: <b>string</b><br> 7724 * Path: <b>PlanDefinition.description</b><br> 7725 * </p> 7726 */ 7727 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 7728 7729 /** 7730 * Search parameter: <b>derived-from</b> 7731 * <p> 7732 * Description: <b>What resource is being referenced</b><br> 7733 * Type: <b>reference</b><br> 7734 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7735 * </p> 7736 */ 7737 @SearchParamDefinition(name="derived-from", path="PlanDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference" ) 7738 public static final String SP_DERIVED_FROM = "derived-from"; 7739 /** 7740 * <b>Fluent Client</b> search parameter constant for <b>derived-from</b> 7741 * <p> 7742 * Description: <b>What resource is being referenced</b><br> 7743 * Type: <b>reference</b><br> 7744 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7745 * </p> 7746 */ 7747 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM); 7748 7749/** 7750 * Constant for fluent queries to be used to add include statements. Specifies 7751 * the path value of "<b>PlanDefinition:derived-from</b>". 7752 */ 7753 public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("PlanDefinition:derived-from").toLocked(); 7754 7755 /** 7756 * Search parameter: <b>context-type</b> 7757 * <p> 7758 * Description: <b>A type of use context assigned to the plan definition</b><br> 7759 * Type: <b>token</b><br> 7760 * Path: <b>PlanDefinition.useContext.code</b><br> 7761 * </p> 7762 */ 7763 @SearchParamDefinition(name="context-type", path="PlanDefinition.useContext.code", description="A type of use context assigned to the plan definition", type="token" ) 7764 public static final String SP_CONTEXT_TYPE = "context-type"; 7765 /** 7766 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 7767 * <p> 7768 * Description: <b>A type of use context assigned to the plan definition</b><br> 7769 * Type: <b>token</b><br> 7770 * Path: <b>PlanDefinition.useContext.code</b><br> 7771 * </p> 7772 */ 7773 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 7774 7775 /** 7776 * Search parameter: <b>predecessor</b> 7777 * <p> 7778 * Description: <b>What resource is being referenced</b><br> 7779 * Type: <b>reference</b><br> 7780 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7781 * </p> 7782 */ 7783 @SearchParamDefinition(name="predecessor", path="PlanDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference" ) 7784 public static final String SP_PREDECESSOR = "predecessor"; 7785 /** 7786 * <b>Fluent Client</b> search parameter constant for <b>predecessor</b> 7787 * <p> 7788 * Description: <b>What resource is being referenced</b><br> 7789 * Type: <b>reference</b><br> 7790 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7791 * </p> 7792 */ 7793 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR); 7794 7795/** 7796 * Constant for fluent queries to be used to add include statements. Specifies 7797 * the path value of "<b>PlanDefinition:predecessor</b>". 7798 */ 7799 public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("PlanDefinition:predecessor").toLocked(); 7800 7801 /** 7802 * Search parameter: <b>title</b> 7803 * <p> 7804 * Description: <b>The human-friendly name of the plan definition</b><br> 7805 * Type: <b>string</b><br> 7806 * Path: <b>PlanDefinition.title</b><br> 7807 * </p> 7808 */ 7809 @SearchParamDefinition(name="title", path="PlanDefinition.title", description="The human-friendly name of the plan definition", type="string" ) 7810 public static final String SP_TITLE = "title"; 7811 /** 7812 * <b>Fluent Client</b> search parameter constant for <b>title</b> 7813 * <p> 7814 * Description: <b>The human-friendly name of the plan definition</b><br> 7815 * Type: <b>string</b><br> 7816 * Path: <b>PlanDefinition.title</b><br> 7817 * </p> 7818 */ 7819 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 7820 7821 /** 7822 * Search parameter: <b>composed-of</b> 7823 * <p> 7824 * Description: <b>What resource is being referenced</b><br> 7825 * Type: <b>reference</b><br> 7826 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7827 * </p> 7828 */ 7829 @SearchParamDefinition(name="composed-of", path="PlanDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference" ) 7830 public static final String SP_COMPOSED_OF = "composed-of"; 7831 /** 7832 * <b>Fluent Client</b> search parameter constant for <b>composed-of</b> 7833 * <p> 7834 * Description: <b>What resource is being referenced</b><br> 7835 * Type: <b>reference</b><br> 7836 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7837 * </p> 7838 */ 7839 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF); 7840 7841/** 7842 * Constant for fluent queries to be used to add include statements. Specifies 7843 * the path value of "<b>PlanDefinition:composed-of</b>". 7844 */ 7845 public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("PlanDefinition:composed-of").toLocked(); 7846 7847 /** 7848 * Search parameter: <b>type</b> 7849 * <p> 7850 * Description: <b>The type of artifact the plan (e.g. order-set, eca-rule, protocol)</b><br> 7851 * Type: <b>token</b><br> 7852 * Path: <b>PlanDefinition.type</b><br> 7853 * </p> 7854 */ 7855 @SearchParamDefinition(name="type", path="PlanDefinition.type", description="The type of artifact the plan (e.g. order-set, eca-rule, protocol)", type="token" ) 7856 public static final String SP_TYPE = "type"; 7857 /** 7858 * <b>Fluent Client</b> search parameter constant for <b>type</b> 7859 * <p> 7860 * Description: <b>The type of artifact the plan (e.g. order-set, eca-rule, protocol)</b><br> 7861 * Type: <b>token</b><br> 7862 * Path: <b>PlanDefinition.type</b><br> 7863 * </p> 7864 */ 7865 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 7866 7867 /** 7868 * Search parameter: <b>version</b> 7869 * <p> 7870 * Description: <b>The business version of the plan definition</b><br> 7871 * Type: <b>token</b><br> 7872 * Path: <b>PlanDefinition.version</b><br> 7873 * </p> 7874 */ 7875 @SearchParamDefinition(name="version", path="PlanDefinition.version", description="The business version of the plan definition", type="token" ) 7876 public static final String SP_VERSION = "version"; 7877 /** 7878 * <b>Fluent Client</b> search parameter constant for <b>version</b> 7879 * <p> 7880 * Description: <b>The business version of the plan definition</b><br> 7881 * Type: <b>token</b><br> 7882 * Path: <b>PlanDefinition.version</b><br> 7883 * </p> 7884 */ 7885 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 7886 7887 /** 7888 * Search parameter: <b>url</b> 7889 * <p> 7890 * Description: <b>The uri that identifies the plan definition</b><br> 7891 * Type: <b>uri</b><br> 7892 * Path: <b>PlanDefinition.url</b><br> 7893 * </p> 7894 */ 7895 @SearchParamDefinition(name="url", path="PlanDefinition.url", description="The uri that identifies the plan definition", type="uri" ) 7896 public static final String SP_URL = "url"; 7897 /** 7898 * <b>Fluent Client</b> search parameter constant for <b>url</b> 7899 * <p> 7900 * Description: <b>The uri that identifies the plan definition</b><br> 7901 * Type: <b>uri</b><br> 7902 * Path: <b>PlanDefinition.url</b><br> 7903 * </p> 7904 */ 7905 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 7906 7907 /** 7908 * Search parameter: <b>context-quantity</b> 7909 * <p> 7910 * Description: <b>A quantity- or range-valued use context assigned to the plan definition</b><br> 7911 * Type: <b>quantity</b><br> 7912 * Path: <b>PlanDefinition.useContext.valueQuantity, PlanDefinition.useContext.valueRange</b><br> 7913 * </p> 7914 */ 7915 @SearchParamDefinition(name="context-quantity", path="(PlanDefinition.useContext.value as Quantity) | (PlanDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the plan definition", type="quantity" ) 7916 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 7917 /** 7918 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 7919 * <p> 7920 * Description: <b>A quantity- or range-valued use context assigned to the plan definition</b><br> 7921 * Type: <b>quantity</b><br> 7922 * Path: <b>PlanDefinition.useContext.valueQuantity, PlanDefinition.useContext.valueRange</b><br> 7923 * </p> 7924 */ 7925 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 7926 7927 /** 7928 * Search parameter: <b>effective</b> 7929 * <p> 7930 * Description: <b>The time during which the plan definition is intended to be in use</b><br> 7931 * Type: <b>date</b><br> 7932 * Path: <b>PlanDefinition.effectivePeriod</b><br> 7933 * </p> 7934 */ 7935 @SearchParamDefinition(name="effective", path="PlanDefinition.effectivePeriod", description="The time during which the plan definition is intended to be in use", type="date" ) 7936 public static final String SP_EFFECTIVE = "effective"; 7937 /** 7938 * <b>Fluent Client</b> search parameter constant for <b>effective</b> 7939 * <p> 7940 * Description: <b>The time during which the plan definition is intended to be in use</b><br> 7941 * Type: <b>date</b><br> 7942 * Path: <b>PlanDefinition.effectivePeriod</b><br> 7943 * </p> 7944 */ 7945 public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE); 7946 7947 /** 7948 * Search parameter: <b>depends-on</b> 7949 * <p> 7950 * Description: <b>What resource is being referenced</b><br> 7951 * Type: <b>reference</b><br> 7952 * Path: <b>PlanDefinition.relatedArtifact.resource, PlanDefinition.library</b><br> 7953 * </p> 7954 */ 7955 @SearchParamDefinition(name="depends-on", path="PlanDefinition.relatedArtifact.where(type='depends-on').resource | PlanDefinition.library", description="What resource is being referenced", type="reference" ) 7956 public static final String SP_DEPENDS_ON = "depends-on"; 7957 /** 7958 * <b>Fluent Client</b> search parameter constant for <b>depends-on</b> 7959 * <p> 7960 * Description: <b>What resource is being referenced</b><br> 7961 * Type: <b>reference</b><br> 7962 * Path: <b>PlanDefinition.relatedArtifact.resource, PlanDefinition.library</b><br> 7963 * </p> 7964 */ 7965 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON); 7966 7967/** 7968 * Constant for fluent queries to be used to add include statements. Specifies 7969 * the path value of "<b>PlanDefinition:depends-on</b>". 7970 */ 7971 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("PlanDefinition:depends-on").toLocked(); 7972 7973 /** 7974 * Search parameter: <b>name</b> 7975 * <p> 7976 * Description: <b>Computationally friendly name of the plan definition</b><br> 7977 * Type: <b>string</b><br> 7978 * Path: <b>PlanDefinition.name</b><br> 7979 * </p> 7980 */ 7981 @SearchParamDefinition(name="name", path="PlanDefinition.name", description="Computationally friendly name of the plan definition", type="string" ) 7982 public static final String SP_NAME = "name"; 7983 /** 7984 * <b>Fluent Client</b> search parameter constant for <b>name</b> 7985 * <p> 7986 * Description: <b>Computationally friendly name of the plan definition</b><br> 7987 * Type: <b>string</b><br> 7988 * Path: <b>PlanDefinition.name</b><br> 7989 * </p> 7990 */ 7991 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 7992 7993 /** 7994 * Search parameter: <b>context</b> 7995 * <p> 7996 * Description: <b>A use context assigned to the plan definition</b><br> 7997 * Type: <b>token</b><br> 7998 * Path: <b>PlanDefinition.useContext.valueCodeableConcept</b><br> 7999 * </p> 8000 */ 8001 @SearchParamDefinition(name="context", path="(PlanDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the plan definition", type="token" ) 8002 public static final String SP_CONTEXT = "context"; 8003 /** 8004 * <b>Fluent Client</b> search parameter constant for <b>context</b> 8005 * <p> 8006 * Description: <b>A use context assigned to the plan definition</b><br> 8007 * Type: <b>token</b><br> 8008 * Path: <b>PlanDefinition.useContext.valueCodeableConcept</b><br> 8009 * </p> 8010 */ 8011 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 8012 8013 /** 8014 * Search parameter: <b>publisher</b> 8015 * <p> 8016 * Description: <b>Name of the publisher of the plan definition</b><br> 8017 * Type: <b>string</b><br> 8018 * Path: <b>PlanDefinition.publisher</b><br> 8019 * </p> 8020 */ 8021 @SearchParamDefinition(name="publisher", path="PlanDefinition.publisher", description="Name of the publisher of the plan definition", type="string" ) 8022 public static final String SP_PUBLISHER = "publisher"; 8023 /** 8024 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 8025 * <p> 8026 * Description: <b>Name of the publisher of the plan definition</b><br> 8027 * Type: <b>string</b><br> 8028 * Path: <b>PlanDefinition.publisher</b><br> 8029 * </p> 8030 */ 8031 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 8032 8033 /** 8034 * Search parameter: <b>topic</b> 8035 * <p> 8036 * Description: <b>Topics associated with the module</b><br> 8037 * Type: <b>token</b><br> 8038 * Path: <b>PlanDefinition.topic</b><br> 8039 * </p> 8040 */ 8041 @SearchParamDefinition(name="topic", path="PlanDefinition.topic", description="Topics associated with the module", type="token" ) 8042 public static final String SP_TOPIC = "topic"; 8043 /** 8044 * <b>Fluent Client</b> search parameter constant for <b>topic</b> 8045 * <p> 8046 * Description: <b>Topics associated with the module</b><br> 8047 * Type: <b>token</b><br> 8048 * Path: <b>PlanDefinition.topic</b><br> 8049 * </p> 8050 */ 8051 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); 8052 8053 /** 8054 * Search parameter: <b>definition</b> 8055 * <p> 8056 * Description: <b>Activity or plan definitions used by plan definition</b><br> 8057 * Type: <b>reference</b><br> 8058 * Path: <b>PlanDefinition.action.definition[x]</b><br> 8059 * </p> 8060 */ 8061 @SearchParamDefinition(name="definition", path="PlanDefinition.action.definition", description="Activity or plan definitions used by plan definition", type="reference", target={ActivityDefinition.class, PlanDefinition.class, Questionnaire.class } ) 8062 public static final String SP_DEFINITION = "definition"; 8063 /** 8064 * <b>Fluent Client</b> search parameter constant for <b>definition</b> 8065 * <p> 8066 * Description: <b>Activity or plan definitions used by plan definition</b><br> 8067 * Type: <b>reference</b><br> 8068 * Path: <b>PlanDefinition.action.definition[x]</b><br> 8069 * </p> 8070 */ 8071 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEFINITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEFINITION); 8072 8073/** 8074 * Constant for fluent queries to be used to add include statements. Specifies 8075 * the path value of "<b>PlanDefinition:definition</b>". 8076 */ 8077 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEFINITION = new ca.uhn.fhir.model.api.Include("PlanDefinition:definition").toLocked(); 8078 8079 /** 8080 * Search parameter: <b>context-type-quantity</b> 8081 * <p> 8082 * Description: <b>A use context type and quantity- or range-based value assigned to the plan definition</b><br> 8083 * Type: <b>composite</b><br> 8084 * Path: <b></b><br> 8085 * </p> 8086 */ 8087 @SearchParamDefinition(name="context-type-quantity", path="PlanDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the plan definition", type="composite", compositeOf={"context-type", "context-quantity"} ) 8088 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 8089 /** 8090 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 8091 * <p> 8092 * Description: <b>A use context type and quantity- or range-based value assigned to the plan definition</b><br> 8093 * Type: <b>composite</b><br> 8094 * Path: <b></b><br> 8095 * </p> 8096 */ 8097 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 8098 8099 /** 8100 * Search parameter: <b>status</b> 8101 * <p> 8102 * Description: <b>The current status of the plan definition</b><br> 8103 * Type: <b>token</b><br> 8104 * Path: <b>PlanDefinition.status</b><br> 8105 * </p> 8106 */ 8107 @SearchParamDefinition(name="status", path="PlanDefinition.status", description="The current status of the plan definition", type="token" ) 8108 public static final String SP_STATUS = "status"; 8109 /** 8110 * <b>Fluent Client</b> search parameter constant for <b>status</b> 8111 * <p> 8112 * Description: <b>The current status of the plan definition</b><br> 8113 * Type: <b>token</b><br> 8114 * Path: <b>PlanDefinition.status</b><br> 8115 * </p> 8116 */ 8117 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 8118 8119 8120}