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