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