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