001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.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", "type", "status", "experimental", "date", "publisher", "description", "purpose", "usage", "approvalDate", "lastReviewDate", "effectivePeriod", "useContext", "jurisdiction", "topic", "contributor", "contact", "copyright", "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 may 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 may 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 may 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 may 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, etc", 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> childrenList) { 1358 super.listChildren(childrenList); 1359 childrenList.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category)); 1360 childrenList.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, java.lang.Integer.MAX_VALUE, description)); 1361 childrenList.add(new Property("priority", "CodeableConcept", "Identifies the expected level of importance associated with reaching/sustaining the defined goal.", 0, java.lang.Integer.MAX_VALUE, priority)); 1362 childrenList.add(new Property("start", "CodeableConcept", "The event after which the goal should begin being pursued.", 0, java.lang.Integer.MAX_VALUE, start)); 1363 childrenList.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 childrenList.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 childrenList.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 Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1370 switch (hash) { 1371 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1372 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept 1373 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept 1374 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // CodeableConcept 1375 case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // CodeableConcept 1376 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact 1377 case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // PlanDefinitionGoalTargetComponent 1378 default: return super.getProperty(hash, name, checkValid); 1379 } 1380 1381 } 1382 1383 @Override 1384 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1385 switch (hash) { 1386 case 50511102: // category 1387 this.category = castToCodeableConcept(value); // CodeableConcept 1388 return value; 1389 case -1724546052: // description 1390 this.description = castToCodeableConcept(value); // CodeableConcept 1391 return value; 1392 case -1165461084: // priority 1393 this.priority = castToCodeableConcept(value); // CodeableConcept 1394 return value; 1395 case 109757538: // start 1396 this.start = castToCodeableConcept(value); // CodeableConcept 1397 return value; 1398 case 874544034: // addresses 1399 this.getAddresses().add(castToCodeableConcept(value)); // CodeableConcept 1400 return value; 1401 case 1587405498: // documentation 1402 this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact 1403 return value; 1404 case -880905839: // target 1405 this.getTarget().add((PlanDefinitionGoalTargetComponent) value); // PlanDefinitionGoalTargetComponent 1406 return value; 1407 default: return super.setProperty(hash, name, value); 1408 } 1409 1410 } 1411 1412 @Override 1413 public Base setProperty(String name, Base value) throws FHIRException { 1414 if (name.equals("category")) { 1415 this.category = castToCodeableConcept(value); // CodeableConcept 1416 } else if (name.equals("description")) { 1417 this.description = castToCodeableConcept(value); // CodeableConcept 1418 } else if (name.equals("priority")) { 1419 this.priority = castToCodeableConcept(value); // CodeableConcept 1420 } else if (name.equals("start")) { 1421 this.start = castToCodeableConcept(value); // CodeableConcept 1422 } else if (name.equals("addresses")) { 1423 this.getAddresses().add(castToCodeableConcept(value)); 1424 } else if (name.equals("documentation")) { 1425 this.getDocumentation().add(castToRelatedArtifact(value)); 1426 } else if (name.equals("target")) { 1427 this.getTarget().add((PlanDefinitionGoalTargetComponent) value); 1428 } else 1429 return super.setProperty(name, value); 1430 return value; 1431 } 1432 1433 @Override 1434 public Base makeProperty(int hash, String name) throws FHIRException { 1435 switch (hash) { 1436 case 50511102: return getCategory(); 1437 case -1724546052: return getDescription(); 1438 case -1165461084: return getPriority(); 1439 case 109757538: return getStart(); 1440 case 874544034: return addAddresses(); 1441 case 1587405498: return addDocumentation(); 1442 case -880905839: return addTarget(); 1443 default: return super.makeProperty(hash, name); 1444 } 1445 1446 } 1447 1448 @Override 1449 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1450 switch (hash) { 1451 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1452 case -1724546052: /*description*/ return new String[] {"CodeableConcept"}; 1453 case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; 1454 case 109757538: /*start*/ return new String[] {"CodeableConcept"}; 1455 case 874544034: /*addresses*/ return new String[] {"CodeableConcept"}; 1456 case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"}; 1457 case -880905839: /*target*/ return new String[] {}; 1458 default: return super.getTypesForProperty(hash, name); 1459 } 1460 1461 } 1462 1463 @Override 1464 public Base addChild(String name) throws FHIRException { 1465 if (name.equals("category")) { 1466 this.category = new CodeableConcept(); 1467 return this.category; 1468 } 1469 else if (name.equals("description")) { 1470 this.description = new CodeableConcept(); 1471 return this.description; 1472 } 1473 else if (name.equals("priority")) { 1474 this.priority = new CodeableConcept(); 1475 return this.priority; 1476 } 1477 else if (name.equals("start")) { 1478 this.start = new CodeableConcept(); 1479 return this.start; 1480 } 1481 else if (name.equals("addresses")) { 1482 return addAddresses(); 1483 } 1484 else if (name.equals("documentation")) { 1485 return addDocumentation(); 1486 } 1487 else if (name.equals("target")) { 1488 return addTarget(); 1489 } 1490 else 1491 return super.addChild(name); 1492 } 1493 1494 public PlanDefinitionGoalComponent copy() { 1495 PlanDefinitionGoalComponent dst = new PlanDefinitionGoalComponent(); 1496 copyValues(dst); 1497 dst.category = category == null ? null : category.copy(); 1498 dst.description = description == null ? null : description.copy(); 1499 dst.priority = priority == null ? null : priority.copy(); 1500 dst.start = start == null ? null : start.copy(); 1501 if (addresses != null) { 1502 dst.addresses = new ArrayList<CodeableConcept>(); 1503 for (CodeableConcept i : addresses) 1504 dst.addresses.add(i.copy()); 1505 }; 1506 if (documentation != null) { 1507 dst.documentation = new ArrayList<RelatedArtifact>(); 1508 for (RelatedArtifact i : documentation) 1509 dst.documentation.add(i.copy()); 1510 }; 1511 if (target != null) { 1512 dst.target = new ArrayList<PlanDefinitionGoalTargetComponent>(); 1513 for (PlanDefinitionGoalTargetComponent i : target) 1514 dst.target.add(i.copy()); 1515 }; 1516 return dst; 1517 } 1518 1519 @Override 1520 public boolean equalsDeep(Base other) { 1521 if (!super.equalsDeep(other)) 1522 return false; 1523 if (!(other instanceof PlanDefinitionGoalComponent)) 1524 return false; 1525 PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other; 1526 return compareDeep(category, o.category, true) && compareDeep(description, o.description, true) 1527 && compareDeep(priority, o.priority, true) && compareDeep(start, o.start, true) && compareDeep(addresses, o.addresses, true) 1528 && compareDeep(documentation, o.documentation, true) && compareDeep(target, o.target, true); 1529 } 1530 1531 @Override 1532 public boolean equalsShallow(Base other) { 1533 if (!super.equalsShallow(other)) 1534 return false; 1535 if (!(other instanceof PlanDefinitionGoalComponent)) 1536 return false; 1537 PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other; 1538 return true; 1539 } 1540 1541 public boolean isEmpty() { 1542 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, description, priority 1543 , start, addresses, documentation, target); 1544 } 1545 1546 public String fhirType() { 1547 return "PlanDefinition.goal"; 1548 1549 } 1550 1551 } 1552 1553 @Block() 1554 public static class PlanDefinitionGoalTargetComponent extends BackboneElement implements IBaseBackboneElement { 1555 /** 1556 * The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level. 1557 */ 1558 @Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1559 @Description(shortDefinition="The parameter whose value is to be tracked", formalDefinition="The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level." ) 1560 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 1561 protected CodeableConcept measure; 1562 1563 /** 1564 * 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. Whan 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. 1565 */ 1566 @Child(name = "detail", type = {Quantity.class, Range.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1567 @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. Whan 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." ) 1568 protected Type detail; 1569 1570 /** 1571 * Indicates the timeframe after the start of the goal in which the goal should be met. 1572 */ 1573 @Child(name = "due", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false) 1574 @Description(shortDefinition="Reach goal within", formalDefinition="Indicates the timeframe after the start of the goal in which the goal should be met." ) 1575 protected Duration due; 1576 1577 private static final long serialVersionUID = -131874144L; 1578 1579 /** 1580 * Constructor 1581 */ 1582 public PlanDefinitionGoalTargetComponent() { 1583 super(); 1584 } 1585 1586 /** 1587 * @return {@link #measure} (The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.) 1588 */ 1589 public CodeableConcept getMeasure() { 1590 if (this.measure == null) 1591 if (Configuration.errorOnAutoCreate()) 1592 throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.measure"); 1593 else if (Configuration.doAutoCreate()) 1594 this.measure = new CodeableConcept(); // cc 1595 return this.measure; 1596 } 1597 1598 public boolean hasMeasure() { 1599 return this.measure != null && !this.measure.isEmpty(); 1600 } 1601 1602 /** 1603 * @param value {@link #measure} (The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.) 1604 */ 1605 public PlanDefinitionGoalTargetComponent setMeasure(CodeableConcept value) { 1606 this.measure = value; 1607 return this; 1608 } 1609 1610 /** 1611 * @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. Whan 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.) 1612 */ 1613 public Type getDetail() { 1614 return this.detail; 1615 } 1616 1617 /** 1618 * @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. Whan 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.) 1619 */ 1620 public Quantity getDetailQuantity() throws FHIRException { 1621 if (!(this.detail instanceof Quantity)) 1622 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered"); 1623 return (Quantity) this.detail; 1624 } 1625 1626 public boolean hasDetailQuantity() { 1627 return this.detail instanceof Quantity; 1628 } 1629 1630 /** 1631 * @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. Whan 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.) 1632 */ 1633 public Range getDetailRange() throws FHIRException { 1634 if (!(this.detail instanceof Range)) 1635 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered"); 1636 return (Range) this.detail; 1637 } 1638 1639 public boolean hasDetailRange() { 1640 return this.detail instanceof Range; 1641 } 1642 1643 /** 1644 * @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. Whan 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.) 1645 */ 1646 public CodeableConcept getDetailCodeableConcept() throws FHIRException { 1647 if (!(this.detail instanceof CodeableConcept)) 1648 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered"); 1649 return (CodeableConcept) this.detail; 1650 } 1651 1652 public boolean hasDetailCodeableConcept() { 1653 return this.detail instanceof CodeableConcept; 1654 } 1655 1656 public boolean hasDetail() { 1657 return this.detail != null && !this.detail.isEmpty(); 1658 } 1659 1660 /** 1661 * @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. Whan 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.) 1662 */ 1663 public PlanDefinitionGoalTargetComponent setDetail(Type value) { 1664 this.detail = value; 1665 return this; 1666 } 1667 1668 /** 1669 * @return {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.) 1670 */ 1671 public Duration getDue() { 1672 if (this.due == null) 1673 if (Configuration.errorOnAutoCreate()) 1674 throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.due"); 1675 else if (Configuration.doAutoCreate()) 1676 this.due = new Duration(); // cc 1677 return this.due; 1678 } 1679 1680 public boolean hasDue() { 1681 return this.due != null && !this.due.isEmpty(); 1682 } 1683 1684 /** 1685 * @param value {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.) 1686 */ 1687 public PlanDefinitionGoalTargetComponent setDue(Duration value) { 1688 this.due = value; 1689 return this; 1690 } 1691 1692 protected void listChildren(List<Property> childrenList) { 1693 super.listChildren(childrenList); 1694 childrenList.add(new Property("measure", "CodeableConcept", "The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.", 0, java.lang.Integer.MAX_VALUE, measure)); 1695 childrenList.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. Whan 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, java.lang.Integer.MAX_VALUE, detail)); 1696 childrenList.add(new Property("due", "Duration", "Indicates the timeframe after the start of the goal in which the goal should be met.", 0, java.lang.Integer.MAX_VALUE, due)); 1697 } 1698 1699 @Override 1700 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1701 switch (hash) { 1702 case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept 1703 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // Type 1704 case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // Duration 1705 default: return super.getProperty(hash, name, checkValid); 1706 } 1707 1708 } 1709 1710 @Override 1711 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1712 switch (hash) { 1713 case 938321246: // measure 1714 this.measure = castToCodeableConcept(value); // CodeableConcept 1715 return value; 1716 case -1335224239: // detail 1717 this.detail = castToType(value); // Type 1718 return value; 1719 case 99828: // due 1720 this.due = castToDuration(value); // Duration 1721 return value; 1722 default: return super.setProperty(hash, name, value); 1723 } 1724 1725 } 1726 1727 @Override 1728 public Base setProperty(String name, Base value) throws FHIRException { 1729 if (name.equals("measure")) { 1730 this.measure = castToCodeableConcept(value); // CodeableConcept 1731 } else if (name.equals("detail[x]")) { 1732 this.detail = castToType(value); // Type 1733 } else if (name.equals("due")) { 1734 this.due = castToDuration(value); // Duration 1735 } else 1736 return super.setProperty(name, value); 1737 return value; 1738 } 1739 1740 @Override 1741 public Base makeProperty(int hash, String name) throws FHIRException { 1742 switch (hash) { 1743 case 938321246: return getMeasure(); 1744 case -1973084529: return getDetail(); 1745 case -1335224239: return getDetail(); 1746 case 99828: return getDue(); 1747 default: return super.makeProperty(hash, name); 1748 } 1749 1750 } 1751 1752 @Override 1753 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1754 switch (hash) { 1755 case 938321246: /*measure*/ return new String[] {"CodeableConcept"}; 1756 case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept"}; 1757 case 99828: /*due*/ return new String[] {"Duration"}; 1758 default: return super.getTypesForProperty(hash, name); 1759 } 1760 1761 } 1762 1763 @Override 1764 public Base addChild(String name) throws FHIRException { 1765 if (name.equals("measure")) { 1766 this.measure = new CodeableConcept(); 1767 return this.measure; 1768 } 1769 else if (name.equals("detailQuantity")) { 1770 this.detail = new Quantity(); 1771 return this.detail; 1772 } 1773 else if (name.equals("detailRange")) { 1774 this.detail = new Range(); 1775 return this.detail; 1776 } 1777 else if (name.equals("detailCodeableConcept")) { 1778 this.detail = new CodeableConcept(); 1779 return this.detail; 1780 } 1781 else if (name.equals("due")) { 1782 this.due = new Duration(); 1783 return this.due; 1784 } 1785 else 1786 return super.addChild(name); 1787 } 1788 1789 public PlanDefinitionGoalTargetComponent copy() { 1790 PlanDefinitionGoalTargetComponent dst = new PlanDefinitionGoalTargetComponent(); 1791 copyValues(dst); 1792 dst.measure = measure == null ? null : measure.copy(); 1793 dst.detail = detail == null ? null : detail.copy(); 1794 dst.due = due == null ? null : due.copy(); 1795 return dst; 1796 } 1797 1798 @Override 1799 public boolean equalsDeep(Base other) { 1800 if (!super.equalsDeep(other)) 1801 return false; 1802 if (!(other instanceof PlanDefinitionGoalTargetComponent)) 1803 return false; 1804 PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other; 1805 return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true) 1806 ; 1807 } 1808 1809 @Override 1810 public boolean equalsShallow(Base other) { 1811 if (!super.equalsShallow(other)) 1812 return false; 1813 if (!(other instanceof PlanDefinitionGoalTargetComponent)) 1814 return false; 1815 PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other; 1816 return true; 1817 } 1818 1819 public boolean isEmpty() { 1820 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due); 1821 } 1822 1823 public String fhirType() { 1824 return "PlanDefinition.goal.target"; 1825 1826 } 1827 1828 } 1829 1830 @Block() 1831 public static class PlanDefinitionActionComponent extends BackboneElement implements IBaseBackboneElement { 1832 /** 1833 * A user-visible label for the action. 1834 */ 1835 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1836 @Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." ) 1837 protected StringType label; 1838 1839 /** 1840 * The title of the action displayed to a user. 1841 */ 1842 @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1843 @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." ) 1844 protected StringType title; 1845 1846 /** 1847 * A short description of the action used to provide a summary to display to the user. 1848 */ 1849 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1850 @Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." ) 1851 protected StringType description; 1852 1853 /** 1854 * 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 may not be capable of interpreting it dynamically. 1855 */ 1856 @Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1857 @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 may not be capable of interpreting it dynamically." ) 1858 protected StringType textEquivalent; 1859 1860 /** 1861 * A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template. 1862 */ 1863 @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1864 @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 a the section of a documentation template." ) 1865 protected List<CodeableConcept> code; 1866 1867 /** 1868 * A description of why this action is necessary or appropriate. 1869 */ 1870 @Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1871 @Description(shortDefinition="Why the action should be performed", formalDefinition="A description of why this action is necessary or appropriate." ) 1872 protected List<CodeableConcept> reason; 1873 1874 /** 1875 * 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. 1876 */ 1877 @Child(name = "documentation", type = {RelatedArtifact.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1878 @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." ) 1879 protected List<RelatedArtifact> documentation; 1880 1881 /** 1882 * Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. 1883 */ 1884 @Child(name = "goalId", type = {IdType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1885 @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." ) 1886 protected List<IdType> goalId; 1887 1888 /** 1889 * A description of when the action should be triggered. 1890 */ 1891 @Child(name = "triggerDefinition", type = {TriggerDefinition.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1892 @Description(shortDefinition="When the action should be triggered", formalDefinition="A description of when the action should be triggered." ) 1893 protected List<TriggerDefinition> triggerDefinition; 1894 1895 /** 1896 * An expression that describes applicability criteria, or start/stop conditions for the action. 1897 */ 1898 @Child(name = "condition", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1899 @Description(shortDefinition="Whether or not the action is applicable", formalDefinition="An expression that describes applicability criteria, or start/stop conditions for the action." ) 1900 protected List<PlanDefinitionActionConditionComponent> condition; 1901 1902 /** 1903 * Defines input data requirements for the action. 1904 */ 1905 @Child(name = "input", type = {DataRequirement.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1906 @Description(shortDefinition="Input data requirements", formalDefinition="Defines input data requirements for the action." ) 1907 protected List<DataRequirement> input; 1908 1909 /** 1910 * Defines the outputs of the action, if any. 1911 */ 1912 @Child(name = "output", type = {DataRequirement.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1913 @Description(shortDefinition="Output data definition", formalDefinition="Defines the outputs of the action, if any." ) 1914 protected List<DataRequirement> output; 1915 1916 /** 1917 * A relationship to another action such as "before" or "30-60 minutes after start of". 1918 */ 1919 @Child(name = "relatedAction", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1920 @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." ) 1921 protected List<PlanDefinitionActionRelatedActionComponent> relatedAction; 1922 1923 /** 1924 * An optional value describing when the action should be performed. 1925 */ 1926 @Child(name = "timing", type = {DateTimeType.class, Period.class, Duration.class, Range.class, Timing.class}, order=14, min=0, max=1, modifier=false, summary=false) 1927 @Description(shortDefinition="When the action should take place", formalDefinition="An optional value describing when the action should be performed." ) 1928 protected Type timing; 1929 1930 /** 1931 * Indicates who should participate in performing the action described. 1932 */ 1933 @Child(name = "participant", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1934 @Description(shortDefinition="Who should participate in the action", formalDefinition="Indicates who should participate in performing the action described." ) 1935 protected List<PlanDefinitionActionParticipantComponent> participant; 1936 1937 /** 1938 * The type of action to perform (create, update, remove). 1939 */ 1940 @Child(name = "type", type = {Coding.class}, order=16, min=0, max=1, modifier=false, summary=false) 1941 @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) 1942 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-type") 1943 protected Coding type; 1944 1945 /** 1946 * Defines the grouping behavior for the action and its children. 1947 */ 1948 @Child(name = "groupingBehavior", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 1949 @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines the grouping behavior for the action and its children." ) 1950 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-grouping-behavior") 1951 protected Enumeration<ActionGroupingBehavior> groupingBehavior; 1952 1953 /** 1954 * Defines the selection behavior for the action and its children. 1955 */ 1956 @Child(name = "selectionBehavior", type = {CodeType.class}, order=18, min=0, max=1, modifier=false, summary=false) 1957 @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." ) 1958 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-selection-behavior") 1959 protected Enumeration<ActionSelectionBehavior> selectionBehavior; 1960 1961 /** 1962 * Defines the requiredness behavior for the action. 1963 */ 1964 @Child(name = "requiredBehavior", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false) 1965 @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines the requiredness behavior for the action." ) 1966 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-required-behavior") 1967 protected Enumeration<ActionRequiredBehavior> requiredBehavior; 1968 1969 /** 1970 * Defines whether the action should usually be preselected. 1971 */ 1972 @Child(name = "precheckBehavior", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=false) 1973 @Description(shortDefinition="yes | no", formalDefinition="Defines whether the action should usually be preselected." ) 1974 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-precheck-behavior") 1975 protected Enumeration<ActionPrecheckBehavior> precheckBehavior; 1976 1977 /** 1978 * Defines whether the action can be selected multiple times. 1979 */ 1980 @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=21, min=0, max=1, modifier=false, summary=false) 1981 @Description(shortDefinition="single | multiple", formalDefinition="Defines whether the action can be selected multiple times." ) 1982 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-cardinality-behavior") 1983 protected Enumeration<ActionCardinalityBehavior> cardinalityBehavior; 1984 1985 /** 1986 * 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. 1987 */ 1988 @Child(name = "definition", type = {ActivityDefinition.class, PlanDefinition.class}, order=22, min=0, max=1, modifier=false, summary=false) 1989 @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." ) 1990 protected Reference definition; 1991 1992 /** 1993 * The actual object that is the target of the reference (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.) 1994 */ 1995 protected Resource definitionTarget; 1996 1997 /** 1998 * 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. 1999 */ 2000 @Child(name = "transform", type = {StructureMap.class}, order=23, min=0, max=1, modifier=false, summary=false) 2001 @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." ) 2002 protected Reference transform; 2003 2004 /** 2005 * The actual object that is the target of the reference (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.) 2006 */ 2007 protected StructureMap transformTarget; 2008 2009 /** 2010 * 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. 2011 */ 2012 @Child(name = "dynamicValue", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2013 @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." ) 2014 protected List<PlanDefinitionActionDynamicValueComponent> dynamicValue; 2015 2016 /** 2017 * 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. 2018 */ 2019 @Child(name = "action", type = {PlanDefinitionActionComponent.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2020 @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." ) 2021 protected List<PlanDefinitionActionComponent> action; 2022 2023 private static final long serialVersionUID = -1404963512L; 2024 2025 /** 2026 * Constructor 2027 */ 2028 public PlanDefinitionActionComponent() { 2029 super(); 2030 } 2031 2032 /** 2033 * @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 2034 */ 2035 public StringType getLabelElement() { 2036 if (this.label == null) 2037 if (Configuration.errorOnAutoCreate()) 2038 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.label"); 2039 else if (Configuration.doAutoCreate()) 2040 this.label = new StringType(); // bb 2041 return this.label; 2042 } 2043 2044 public boolean hasLabelElement() { 2045 return this.label != null && !this.label.isEmpty(); 2046 } 2047 2048 public boolean hasLabel() { 2049 return this.label != null && !this.label.isEmpty(); 2050 } 2051 2052 /** 2053 * @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 2054 */ 2055 public PlanDefinitionActionComponent setLabelElement(StringType value) { 2056 this.label = value; 2057 return this; 2058 } 2059 2060 /** 2061 * @return A user-visible label for the action. 2062 */ 2063 public String getLabel() { 2064 return this.label == null ? null : this.label.getValue(); 2065 } 2066 2067 /** 2068 * @param value A user-visible label for the action. 2069 */ 2070 public PlanDefinitionActionComponent setLabel(String value) { 2071 if (Utilities.noString(value)) 2072 this.label = null; 2073 else { 2074 if (this.label == null) 2075 this.label = new StringType(); 2076 this.label.setValue(value); 2077 } 2078 return this; 2079 } 2080 2081 /** 2082 * @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 2083 */ 2084 public StringType getTitleElement() { 2085 if (this.title == null) 2086 if (Configuration.errorOnAutoCreate()) 2087 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.title"); 2088 else if (Configuration.doAutoCreate()) 2089 this.title = new StringType(); // bb 2090 return this.title; 2091 } 2092 2093 public boolean hasTitleElement() { 2094 return this.title != null && !this.title.isEmpty(); 2095 } 2096 2097 public boolean hasTitle() { 2098 return this.title != null && !this.title.isEmpty(); 2099 } 2100 2101 /** 2102 * @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 2103 */ 2104 public PlanDefinitionActionComponent setTitleElement(StringType value) { 2105 this.title = value; 2106 return this; 2107 } 2108 2109 /** 2110 * @return The title of the action displayed to a user. 2111 */ 2112 public String getTitle() { 2113 return this.title == null ? null : this.title.getValue(); 2114 } 2115 2116 /** 2117 * @param value The title of the action displayed to a user. 2118 */ 2119 public PlanDefinitionActionComponent setTitle(String value) { 2120 if (Utilities.noString(value)) 2121 this.title = null; 2122 else { 2123 if (this.title == null) 2124 this.title = new StringType(); 2125 this.title.setValue(value); 2126 } 2127 return this; 2128 } 2129 2130 /** 2131 * @return {@link #description} (A short 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 2132 */ 2133 public StringType getDescriptionElement() { 2134 if (this.description == null) 2135 if (Configuration.errorOnAutoCreate()) 2136 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.description"); 2137 else if (Configuration.doAutoCreate()) 2138 this.description = new StringType(); // bb 2139 return this.description; 2140 } 2141 2142 public boolean hasDescriptionElement() { 2143 return this.description != null && !this.description.isEmpty(); 2144 } 2145 2146 public boolean hasDescription() { 2147 return this.description != null && !this.description.isEmpty(); 2148 } 2149 2150 /** 2151 * @param value {@link #description} (A short 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 2152 */ 2153 public PlanDefinitionActionComponent setDescriptionElement(StringType value) { 2154 this.description = value; 2155 return this; 2156 } 2157 2158 /** 2159 * @return A short description of the action used to provide a summary to display to the user. 2160 */ 2161 public String getDescription() { 2162 return this.description == null ? null : this.description.getValue(); 2163 } 2164 2165 /** 2166 * @param value A short description of the action used to provide a summary to display to the user. 2167 */ 2168 public PlanDefinitionActionComponent setDescription(String value) { 2169 if (Utilities.noString(value)) 2170 this.description = null; 2171 else { 2172 if (this.description == null) 2173 this.description = new StringType(); 2174 this.description.setValue(value); 2175 } 2176 return this; 2177 } 2178 2179 /** 2180 * @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 may 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 2181 */ 2182 public StringType getTextEquivalentElement() { 2183 if (this.textEquivalent == null) 2184 if (Configuration.errorOnAutoCreate()) 2185 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.textEquivalent"); 2186 else if (Configuration.doAutoCreate()) 2187 this.textEquivalent = new StringType(); // bb 2188 return this.textEquivalent; 2189 } 2190 2191 public boolean hasTextEquivalentElement() { 2192 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 2193 } 2194 2195 public boolean hasTextEquivalent() { 2196 return this.textEquivalent != null && !this.textEquivalent.isEmpty(); 2197 } 2198 2199 /** 2200 * @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 may 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 2201 */ 2202 public PlanDefinitionActionComponent setTextEquivalentElement(StringType value) { 2203 this.textEquivalent = value; 2204 return this; 2205 } 2206 2207 /** 2208 * @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 may not be capable of interpreting it dynamically. 2209 */ 2210 public String getTextEquivalent() { 2211 return this.textEquivalent == null ? null : this.textEquivalent.getValue(); 2212 } 2213 2214 /** 2215 * @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 may not be capable of interpreting it dynamically. 2216 */ 2217 public PlanDefinitionActionComponent setTextEquivalent(String value) { 2218 if (Utilities.noString(value)) 2219 this.textEquivalent = null; 2220 else { 2221 if (this.textEquivalent == null) 2222 this.textEquivalent = new StringType(); 2223 this.textEquivalent.setValue(value); 2224 } 2225 return this; 2226 } 2227 2228 /** 2229 * @return {@link #code} (A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.) 2230 */ 2231 public List<CodeableConcept> getCode() { 2232 if (this.code == null) 2233 this.code = new ArrayList<CodeableConcept>(); 2234 return this.code; 2235 } 2236 2237 /** 2238 * @return Returns a reference to <code>this</code> for easy method chaining 2239 */ 2240 public PlanDefinitionActionComponent setCode(List<CodeableConcept> theCode) { 2241 this.code = theCode; 2242 return this; 2243 } 2244 2245 public boolean hasCode() { 2246 if (this.code == null) 2247 return false; 2248 for (CodeableConcept item : this.code) 2249 if (!item.isEmpty()) 2250 return true; 2251 return false; 2252 } 2253 2254 public CodeableConcept addCode() { //3 2255 CodeableConcept t = new CodeableConcept(); 2256 if (this.code == null) 2257 this.code = new ArrayList<CodeableConcept>(); 2258 this.code.add(t); 2259 return t; 2260 } 2261 2262 public PlanDefinitionActionComponent addCode(CodeableConcept t) { //3 2263 if (t == null) 2264 return this; 2265 if (this.code == null) 2266 this.code = new ArrayList<CodeableConcept>(); 2267 this.code.add(t); 2268 return this; 2269 } 2270 2271 /** 2272 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 2273 */ 2274 public CodeableConcept getCodeFirstRep() { 2275 if (getCode().isEmpty()) { 2276 addCode(); 2277 } 2278 return getCode().get(0); 2279 } 2280 2281 /** 2282 * @return {@link #reason} (A description of why this action is necessary or appropriate.) 2283 */ 2284 public List<CodeableConcept> getReason() { 2285 if (this.reason == null) 2286 this.reason = new ArrayList<CodeableConcept>(); 2287 return this.reason; 2288 } 2289 2290 /** 2291 * @return Returns a reference to <code>this</code> for easy method chaining 2292 */ 2293 public PlanDefinitionActionComponent setReason(List<CodeableConcept> theReason) { 2294 this.reason = theReason; 2295 return this; 2296 } 2297 2298 public boolean hasReason() { 2299 if (this.reason == null) 2300 return false; 2301 for (CodeableConcept item : this.reason) 2302 if (!item.isEmpty()) 2303 return true; 2304 return false; 2305 } 2306 2307 public CodeableConcept addReason() { //3 2308 CodeableConcept t = new CodeableConcept(); 2309 if (this.reason == null) 2310 this.reason = new ArrayList<CodeableConcept>(); 2311 this.reason.add(t); 2312 return t; 2313 } 2314 2315 public PlanDefinitionActionComponent addReason(CodeableConcept t) { //3 2316 if (t == null) 2317 return this; 2318 if (this.reason == null) 2319 this.reason = new ArrayList<CodeableConcept>(); 2320 this.reason.add(t); 2321 return this; 2322 } 2323 2324 /** 2325 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist 2326 */ 2327 public CodeableConcept getReasonFirstRep() { 2328 if (getReason().isEmpty()) { 2329 addReason(); 2330 } 2331 return getReason().get(0); 2332 } 2333 2334 /** 2335 * @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.) 2336 */ 2337 public List<RelatedArtifact> getDocumentation() { 2338 if (this.documentation == null) 2339 this.documentation = new ArrayList<RelatedArtifact>(); 2340 return this.documentation; 2341 } 2342 2343 /** 2344 * @return Returns a reference to <code>this</code> for easy method chaining 2345 */ 2346 public PlanDefinitionActionComponent setDocumentation(List<RelatedArtifact> theDocumentation) { 2347 this.documentation = theDocumentation; 2348 return this; 2349 } 2350 2351 public boolean hasDocumentation() { 2352 if (this.documentation == null) 2353 return false; 2354 for (RelatedArtifact item : this.documentation) 2355 if (!item.isEmpty()) 2356 return true; 2357 return false; 2358 } 2359 2360 public RelatedArtifact addDocumentation() { //3 2361 RelatedArtifact t = new RelatedArtifact(); 2362 if (this.documentation == null) 2363 this.documentation = new ArrayList<RelatedArtifact>(); 2364 this.documentation.add(t); 2365 return t; 2366 } 2367 2368 public PlanDefinitionActionComponent addDocumentation(RelatedArtifact t) { //3 2369 if (t == null) 2370 return this; 2371 if (this.documentation == null) 2372 this.documentation = new ArrayList<RelatedArtifact>(); 2373 this.documentation.add(t); 2374 return this; 2375 } 2376 2377 /** 2378 * @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist 2379 */ 2380 public RelatedArtifact getDocumentationFirstRep() { 2381 if (getDocumentation().isEmpty()) { 2382 addDocumentation(); 2383 } 2384 return getDocumentation().get(0); 2385 } 2386 2387 /** 2388 * @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2389 */ 2390 public List<IdType> getGoalId() { 2391 if (this.goalId == null) 2392 this.goalId = new ArrayList<IdType>(); 2393 return this.goalId; 2394 } 2395 2396 /** 2397 * @return Returns a reference to <code>this</code> for easy method chaining 2398 */ 2399 public PlanDefinitionActionComponent setGoalId(List<IdType> theGoalId) { 2400 this.goalId = theGoalId; 2401 return this; 2402 } 2403 2404 public boolean hasGoalId() { 2405 if (this.goalId == null) 2406 return false; 2407 for (IdType item : this.goalId) 2408 if (!item.isEmpty()) 2409 return true; 2410 return false; 2411 } 2412 2413 /** 2414 * @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2415 */ 2416 public IdType addGoalIdElement() {//2 2417 IdType t = new IdType(); 2418 if (this.goalId == null) 2419 this.goalId = new ArrayList<IdType>(); 2420 this.goalId.add(t); 2421 return t; 2422 } 2423 2424 /** 2425 * @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2426 */ 2427 public PlanDefinitionActionComponent addGoalId(String value) { //1 2428 IdType t = new IdType(); 2429 t.setValue(value); 2430 if (this.goalId == null) 2431 this.goalId = new ArrayList<IdType>(); 2432 this.goalId.add(t); 2433 return this; 2434 } 2435 2436 /** 2437 * @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.) 2438 */ 2439 public boolean hasGoalId(String value) { 2440 if (this.goalId == null) 2441 return false; 2442 for (IdType v : this.goalId) 2443 if (v.equals(value)) // id 2444 return true; 2445 return false; 2446 } 2447 2448 /** 2449 * @return {@link #triggerDefinition} (A description of when the action should be triggered.) 2450 */ 2451 public List<TriggerDefinition> getTriggerDefinition() { 2452 if (this.triggerDefinition == null) 2453 this.triggerDefinition = new ArrayList<TriggerDefinition>(); 2454 return this.triggerDefinition; 2455 } 2456 2457 /** 2458 * @return Returns a reference to <code>this</code> for easy method chaining 2459 */ 2460 public PlanDefinitionActionComponent setTriggerDefinition(List<TriggerDefinition> theTriggerDefinition) { 2461 this.triggerDefinition = theTriggerDefinition; 2462 return this; 2463 } 2464 2465 public boolean hasTriggerDefinition() { 2466 if (this.triggerDefinition == null) 2467 return false; 2468 for (TriggerDefinition item : this.triggerDefinition) 2469 if (!item.isEmpty()) 2470 return true; 2471 return false; 2472 } 2473 2474 public TriggerDefinition addTriggerDefinition() { //3 2475 TriggerDefinition t = new TriggerDefinition(); 2476 if (this.triggerDefinition == null) 2477 this.triggerDefinition = new ArrayList<TriggerDefinition>(); 2478 this.triggerDefinition.add(t); 2479 return t; 2480 } 2481 2482 public PlanDefinitionActionComponent addTriggerDefinition(TriggerDefinition t) { //3 2483 if (t == null) 2484 return this; 2485 if (this.triggerDefinition == null) 2486 this.triggerDefinition = new ArrayList<TriggerDefinition>(); 2487 this.triggerDefinition.add(t); 2488 return this; 2489 } 2490 2491 /** 2492 * @return The first repetition of repeating field {@link #triggerDefinition}, creating it if it does not already exist 2493 */ 2494 public TriggerDefinition getTriggerDefinitionFirstRep() { 2495 if (getTriggerDefinition().isEmpty()) { 2496 addTriggerDefinition(); 2497 } 2498 return getTriggerDefinition().get(0); 2499 } 2500 2501 /** 2502 * @return {@link #condition} (An expression that describes applicability criteria, or start/stop conditions for the action.) 2503 */ 2504 public List<PlanDefinitionActionConditionComponent> getCondition() { 2505 if (this.condition == null) 2506 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2507 return this.condition; 2508 } 2509 2510 /** 2511 * @return Returns a reference to <code>this</code> for easy method chaining 2512 */ 2513 public PlanDefinitionActionComponent setCondition(List<PlanDefinitionActionConditionComponent> theCondition) { 2514 this.condition = theCondition; 2515 return this; 2516 } 2517 2518 public boolean hasCondition() { 2519 if (this.condition == null) 2520 return false; 2521 for (PlanDefinitionActionConditionComponent item : this.condition) 2522 if (!item.isEmpty()) 2523 return true; 2524 return false; 2525 } 2526 2527 public PlanDefinitionActionConditionComponent addCondition() { //3 2528 PlanDefinitionActionConditionComponent t = new PlanDefinitionActionConditionComponent(); 2529 if (this.condition == null) 2530 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2531 this.condition.add(t); 2532 return t; 2533 } 2534 2535 public PlanDefinitionActionComponent addCondition(PlanDefinitionActionConditionComponent t) { //3 2536 if (t == null) 2537 return this; 2538 if (this.condition == null) 2539 this.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 2540 this.condition.add(t); 2541 return this; 2542 } 2543 2544 /** 2545 * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist 2546 */ 2547 public PlanDefinitionActionConditionComponent getConditionFirstRep() { 2548 if (getCondition().isEmpty()) { 2549 addCondition(); 2550 } 2551 return getCondition().get(0); 2552 } 2553 2554 /** 2555 * @return {@link #input} (Defines input data requirements for the action.) 2556 */ 2557 public List<DataRequirement> getInput() { 2558 if (this.input == null) 2559 this.input = new ArrayList<DataRequirement>(); 2560 return this.input; 2561 } 2562 2563 /** 2564 * @return Returns a reference to <code>this</code> for easy method chaining 2565 */ 2566 public PlanDefinitionActionComponent setInput(List<DataRequirement> theInput) { 2567 this.input = theInput; 2568 return this; 2569 } 2570 2571 public boolean hasInput() { 2572 if (this.input == null) 2573 return false; 2574 for (DataRequirement item : this.input) 2575 if (!item.isEmpty()) 2576 return true; 2577 return false; 2578 } 2579 2580 public DataRequirement addInput() { //3 2581 DataRequirement t = new DataRequirement(); 2582 if (this.input == null) 2583 this.input = new ArrayList<DataRequirement>(); 2584 this.input.add(t); 2585 return t; 2586 } 2587 2588 public PlanDefinitionActionComponent addInput(DataRequirement t) { //3 2589 if (t == null) 2590 return this; 2591 if (this.input == null) 2592 this.input = new ArrayList<DataRequirement>(); 2593 this.input.add(t); 2594 return this; 2595 } 2596 2597 /** 2598 * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist 2599 */ 2600 public DataRequirement getInputFirstRep() { 2601 if (getInput().isEmpty()) { 2602 addInput(); 2603 } 2604 return getInput().get(0); 2605 } 2606 2607 /** 2608 * @return {@link #output} (Defines the outputs of the action, if any.) 2609 */ 2610 public List<DataRequirement> getOutput() { 2611 if (this.output == null) 2612 this.output = new ArrayList<DataRequirement>(); 2613 return this.output; 2614 } 2615 2616 /** 2617 * @return Returns a reference to <code>this</code> for easy method chaining 2618 */ 2619 public PlanDefinitionActionComponent setOutput(List<DataRequirement> theOutput) { 2620 this.output = theOutput; 2621 return this; 2622 } 2623 2624 public boolean hasOutput() { 2625 if (this.output == null) 2626 return false; 2627 for (DataRequirement item : this.output) 2628 if (!item.isEmpty()) 2629 return true; 2630 return false; 2631 } 2632 2633 public DataRequirement addOutput() { //3 2634 DataRequirement t = new DataRequirement(); 2635 if (this.output == null) 2636 this.output = new ArrayList<DataRequirement>(); 2637 this.output.add(t); 2638 return t; 2639 } 2640 2641 public PlanDefinitionActionComponent addOutput(DataRequirement t) { //3 2642 if (t == null) 2643 return this; 2644 if (this.output == null) 2645 this.output = new ArrayList<DataRequirement>(); 2646 this.output.add(t); 2647 return this; 2648 } 2649 2650 /** 2651 * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist 2652 */ 2653 public DataRequirement getOutputFirstRep() { 2654 if (getOutput().isEmpty()) { 2655 addOutput(); 2656 } 2657 return getOutput().get(0); 2658 } 2659 2660 /** 2661 * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) 2662 */ 2663 public List<PlanDefinitionActionRelatedActionComponent> getRelatedAction() { 2664 if (this.relatedAction == null) 2665 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 2666 return this.relatedAction; 2667 } 2668 2669 /** 2670 * @return Returns a reference to <code>this</code> for easy method chaining 2671 */ 2672 public PlanDefinitionActionComponent setRelatedAction(List<PlanDefinitionActionRelatedActionComponent> theRelatedAction) { 2673 this.relatedAction = theRelatedAction; 2674 return this; 2675 } 2676 2677 public boolean hasRelatedAction() { 2678 if (this.relatedAction == null) 2679 return false; 2680 for (PlanDefinitionActionRelatedActionComponent item : this.relatedAction) 2681 if (!item.isEmpty()) 2682 return true; 2683 return false; 2684 } 2685 2686 public PlanDefinitionActionRelatedActionComponent addRelatedAction() { //3 2687 PlanDefinitionActionRelatedActionComponent t = new PlanDefinitionActionRelatedActionComponent(); 2688 if (this.relatedAction == null) 2689 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 2690 this.relatedAction.add(t); 2691 return t; 2692 } 2693 2694 public PlanDefinitionActionComponent addRelatedAction(PlanDefinitionActionRelatedActionComponent t) { //3 2695 if (t == null) 2696 return this; 2697 if (this.relatedAction == null) 2698 this.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 2699 this.relatedAction.add(t); 2700 return this; 2701 } 2702 2703 /** 2704 * @return The first repetition of repeating field {@link #relatedAction}, creating it if it does not already exist 2705 */ 2706 public PlanDefinitionActionRelatedActionComponent getRelatedActionFirstRep() { 2707 if (getRelatedAction().isEmpty()) { 2708 addRelatedAction(); 2709 } 2710 return getRelatedAction().get(0); 2711 } 2712 2713 /** 2714 * @return {@link #timing} (An optional value describing when the action should be performed.) 2715 */ 2716 public Type getTiming() { 2717 return this.timing; 2718 } 2719 2720 /** 2721 * @return {@link #timing} (An optional value describing when the action should be performed.) 2722 */ 2723 public DateTimeType getTimingDateTimeType() throws FHIRException { 2724 if (!(this.timing instanceof DateTimeType)) 2725 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered"); 2726 return (DateTimeType) this.timing; 2727 } 2728 2729 public boolean hasTimingDateTimeType() { 2730 return this.timing instanceof DateTimeType; 2731 } 2732 2733 /** 2734 * @return {@link #timing} (An optional value describing when the action should be performed.) 2735 */ 2736 public Period getTimingPeriod() throws FHIRException { 2737 if (!(this.timing instanceof Period)) 2738 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); 2739 return (Period) this.timing; 2740 } 2741 2742 public boolean hasTimingPeriod() { 2743 return this.timing instanceof Period; 2744 } 2745 2746 /** 2747 * @return {@link #timing} (An optional value describing when the action should be performed.) 2748 */ 2749 public Duration getTimingDuration() throws FHIRException { 2750 if (!(this.timing instanceof Duration)) 2751 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered"); 2752 return (Duration) this.timing; 2753 } 2754 2755 public boolean hasTimingDuration() { 2756 return this.timing instanceof Duration; 2757 } 2758 2759 /** 2760 * @return {@link #timing} (An optional value describing when the action should be performed.) 2761 */ 2762 public Range getTimingRange() throws FHIRException { 2763 if (!(this.timing instanceof Range)) 2764 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered"); 2765 return (Range) this.timing; 2766 } 2767 2768 public boolean hasTimingRange() { 2769 return this.timing instanceof Range; 2770 } 2771 2772 /** 2773 * @return {@link #timing} (An optional value describing when the action should be performed.) 2774 */ 2775 public Timing getTimingTiming() throws FHIRException { 2776 if (!(this.timing instanceof Timing)) 2777 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered"); 2778 return (Timing) this.timing; 2779 } 2780 2781 public boolean hasTimingTiming() { 2782 return this.timing instanceof Timing; 2783 } 2784 2785 public boolean hasTiming() { 2786 return this.timing != null && !this.timing.isEmpty(); 2787 } 2788 2789 /** 2790 * @param value {@link #timing} (An optional value describing when the action should be performed.) 2791 */ 2792 public PlanDefinitionActionComponent setTiming(Type value) { 2793 this.timing = value; 2794 return this; 2795 } 2796 2797 /** 2798 * @return {@link #participant} (Indicates who should participate in performing the action described.) 2799 */ 2800 public List<PlanDefinitionActionParticipantComponent> getParticipant() { 2801 if (this.participant == null) 2802 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 2803 return this.participant; 2804 } 2805 2806 /** 2807 * @return Returns a reference to <code>this</code> for easy method chaining 2808 */ 2809 public PlanDefinitionActionComponent setParticipant(List<PlanDefinitionActionParticipantComponent> theParticipant) { 2810 this.participant = theParticipant; 2811 return this; 2812 } 2813 2814 public boolean hasParticipant() { 2815 if (this.participant == null) 2816 return false; 2817 for (PlanDefinitionActionParticipantComponent item : this.participant) 2818 if (!item.isEmpty()) 2819 return true; 2820 return false; 2821 } 2822 2823 public PlanDefinitionActionParticipantComponent addParticipant() { //3 2824 PlanDefinitionActionParticipantComponent t = new PlanDefinitionActionParticipantComponent(); 2825 if (this.participant == null) 2826 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 2827 this.participant.add(t); 2828 return t; 2829 } 2830 2831 public PlanDefinitionActionComponent addParticipant(PlanDefinitionActionParticipantComponent t) { //3 2832 if (t == null) 2833 return this; 2834 if (this.participant == null) 2835 this.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 2836 this.participant.add(t); 2837 return this; 2838 } 2839 2840 /** 2841 * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist 2842 */ 2843 public PlanDefinitionActionParticipantComponent getParticipantFirstRep() { 2844 if (getParticipant().isEmpty()) { 2845 addParticipant(); 2846 } 2847 return getParticipant().get(0); 2848 } 2849 2850 /** 2851 * @return {@link #type} (The type of action to perform (create, update, remove).) 2852 */ 2853 public Coding getType() { 2854 if (this.type == null) 2855 if (Configuration.errorOnAutoCreate()) 2856 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.type"); 2857 else if (Configuration.doAutoCreate()) 2858 this.type = new Coding(); // cc 2859 return this.type; 2860 } 2861 2862 public boolean hasType() { 2863 return this.type != null && !this.type.isEmpty(); 2864 } 2865 2866 /** 2867 * @param value {@link #type} (The type of action to perform (create, update, remove).) 2868 */ 2869 public PlanDefinitionActionComponent setType(Coding value) { 2870 this.type = value; 2871 return this; 2872 } 2873 2874 /** 2875 * @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 2876 */ 2877 public Enumeration<ActionGroupingBehavior> getGroupingBehaviorElement() { 2878 if (this.groupingBehavior == null) 2879 if (Configuration.errorOnAutoCreate()) 2880 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.groupingBehavior"); 2881 else if (Configuration.doAutoCreate()) 2882 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); // bb 2883 return this.groupingBehavior; 2884 } 2885 2886 public boolean hasGroupingBehaviorElement() { 2887 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 2888 } 2889 2890 public boolean hasGroupingBehavior() { 2891 return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); 2892 } 2893 2894 /** 2895 * @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 2896 */ 2897 public PlanDefinitionActionComponent setGroupingBehaviorElement(Enumeration<ActionGroupingBehavior> value) { 2898 this.groupingBehavior = value; 2899 return this; 2900 } 2901 2902 /** 2903 * @return Defines the grouping behavior for the action and its children. 2904 */ 2905 public ActionGroupingBehavior getGroupingBehavior() { 2906 return this.groupingBehavior == null ? null : this.groupingBehavior.getValue(); 2907 } 2908 2909 /** 2910 * @param value Defines the grouping behavior for the action and its children. 2911 */ 2912 public PlanDefinitionActionComponent setGroupingBehavior(ActionGroupingBehavior value) { 2913 if (value == null) 2914 this.groupingBehavior = null; 2915 else { 2916 if (this.groupingBehavior == null) 2917 this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); 2918 this.groupingBehavior.setValue(value); 2919 } 2920 return this; 2921 } 2922 2923 /** 2924 * @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 2925 */ 2926 public Enumeration<ActionSelectionBehavior> getSelectionBehaviorElement() { 2927 if (this.selectionBehavior == null) 2928 if (Configuration.errorOnAutoCreate()) 2929 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.selectionBehavior"); 2930 else if (Configuration.doAutoCreate()) 2931 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); // bb 2932 return this.selectionBehavior; 2933 } 2934 2935 public boolean hasSelectionBehaviorElement() { 2936 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 2937 } 2938 2939 public boolean hasSelectionBehavior() { 2940 return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); 2941 } 2942 2943 /** 2944 * @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 2945 */ 2946 public PlanDefinitionActionComponent setSelectionBehaviorElement(Enumeration<ActionSelectionBehavior> value) { 2947 this.selectionBehavior = value; 2948 return this; 2949 } 2950 2951 /** 2952 * @return Defines the selection behavior for the action and its children. 2953 */ 2954 public ActionSelectionBehavior getSelectionBehavior() { 2955 return this.selectionBehavior == null ? null : this.selectionBehavior.getValue(); 2956 } 2957 2958 /** 2959 * @param value Defines the selection behavior for the action and its children. 2960 */ 2961 public PlanDefinitionActionComponent setSelectionBehavior(ActionSelectionBehavior value) { 2962 if (value == null) 2963 this.selectionBehavior = null; 2964 else { 2965 if (this.selectionBehavior == null) 2966 this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); 2967 this.selectionBehavior.setValue(value); 2968 } 2969 return this; 2970 } 2971 2972 /** 2973 * @return {@link #requiredBehavior} (Defines the requiredness behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 2974 */ 2975 public Enumeration<ActionRequiredBehavior> getRequiredBehaviorElement() { 2976 if (this.requiredBehavior == null) 2977 if (Configuration.errorOnAutoCreate()) 2978 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.requiredBehavior"); 2979 else if (Configuration.doAutoCreate()) 2980 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); // bb 2981 return this.requiredBehavior; 2982 } 2983 2984 public boolean hasRequiredBehaviorElement() { 2985 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 2986 } 2987 2988 public boolean hasRequiredBehavior() { 2989 return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); 2990 } 2991 2992 /** 2993 * @param value {@link #requiredBehavior} (Defines the requiredness behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value 2994 */ 2995 public PlanDefinitionActionComponent setRequiredBehaviorElement(Enumeration<ActionRequiredBehavior> value) { 2996 this.requiredBehavior = value; 2997 return this; 2998 } 2999 3000 /** 3001 * @return Defines the requiredness behavior for the action. 3002 */ 3003 public ActionRequiredBehavior getRequiredBehavior() { 3004 return this.requiredBehavior == null ? null : this.requiredBehavior.getValue(); 3005 } 3006 3007 /** 3008 * @param value Defines the requiredness behavior for the action. 3009 */ 3010 public PlanDefinitionActionComponent setRequiredBehavior(ActionRequiredBehavior value) { 3011 if (value == null) 3012 this.requiredBehavior = null; 3013 else { 3014 if (this.requiredBehavior == null) 3015 this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); 3016 this.requiredBehavior.setValue(value); 3017 } 3018 return this; 3019 } 3020 3021 /** 3022 * @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 3023 */ 3024 public Enumeration<ActionPrecheckBehavior> getPrecheckBehaviorElement() { 3025 if (this.precheckBehavior == null) 3026 if (Configuration.errorOnAutoCreate()) 3027 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.precheckBehavior"); 3028 else if (Configuration.doAutoCreate()) 3029 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); // bb 3030 return this.precheckBehavior; 3031 } 3032 3033 public boolean hasPrecheckBehaviorElement() { 3034 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 3035 } 3036 3037 public boolean hasPrecheckBehavior() { 3038 return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); 3039 } 3040 3041 /** 3042 * @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 3043 */ 3044 public PlanDefinitionActionComponent setPrecheckBehaviorElement(Enumeration<ActionPrecheckBehavior> value) { 3045 this.precheckBehavior = value; 3046 return this; 3047 } 3048 3049 /** 3050 * @return Defines whether the action should usually be preselected. 3051 */ 3052 public ActionPrecheckBehavior getPrecheckBehavior() { 3053 return this.precheckBehavior == null ? null : this.precheckBehavior.getValue(); 3054 } 3055 3056 /** 3057 * @param value Defines whether the action should usually be preselected. 3058 */ 3059 public PlanDefinitionActionComponent setPrecheckBehavior(ActionPrecheckBehavior value) { 3060 if (value == null) 3061 this.precheckBehavior = null; 3062 else { 3063 if (this.precheckBehavior == null) 3064 this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); 3065 this.precheckBehavior.setValue(value); 3066 } 3067 return this; 3068 } 3069 3070 /** 3071 * @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 3072 */ 3073 public Enumeration<ActionCardinalityBehavior> getCardinalityBehaviorElement() { 3074 if (this.cardinalityBehavior == null) 3075 if (Configuration.errorOnAutoCreate()) 3076 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.cardinalityBehavior"); 3077 else if (Configuration.doAutoCreate()) 3078 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); // bb 3079 return this.cardinalityBehavior; 3080 } 3081 3082 public boolean hasCardinalityBehaviorElement() { 3083 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 3084 } 3085 3086 public boolean hasCardinalityBehavior() { 3087 return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); 3088 } 3089 3090 /** 3091 * @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 3092 */ 3093 public PlanDefinitionActionComponent setCardinalityBehaviorElement(Enumeration<ActionCardinalityBehavior> value) { 3094 this.cardinalityBehavior = value; 3095 return this; 3096 } 3097 3098 /** 3099 * @return Defines whether the action can be selected multiple times. 3100 */ 3101 public ActionCardinalityBehavior getCardinalityBehavior() { 3102 return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue(); 3103 } 3104 3105 /** 3106 * @param value Defines whether the action can be selected multiple times. 3107 */ 3108 public PlanDefinitionActionComponent setCardinalityBehavior(ActionCardinalityBehavior value) { 3109 if (value == null) 3110 this.cardinalityBehavior = null; 3111 else { 3112 if (this.cardinalityBehavior == null) 3113 this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); 3114 this.cardinalityBehavior.setValue(value); 3115 } 3116 return this; 3117 } 3118 3119 /** 3120 * @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.) 3121 */ 3122 public Reference getDefinition() { 3123 if (this.definition == null) 3124 if (Configuration.errorOnAutoCreate()) 3125 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.definition"); 3126 else if (Configuration.doAutoCreate()) 3127 this.definition = new Reference(); // cc 3128 return this.definition; 3129 } 3130 3131 public boolean hasDefinition() { 3132 return this.definition != null && !this.definition.isEmpty(); 3133 } 3134 3135 /** 3136 * @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.) 3137 */ 3138 public PlanDefinitionActionComponent setDefinition(Reference value) { 3139 this.definition = value; 3140 return this; 3141 } 3142 3143 /** 3144 * @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (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.) 3145 */ 3146 public Resource getDefinitionTarget() { 3147 return this.definitionTarget; 3148 } 3149 3150 /** 3151 * @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (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.) 3152 */ 3153 public PlanDefinitionActionComponent setDefinitionTarget(Resource value) { 3154 this.definitionTarget = value; 3155 return this; 3156 } 3157 3158 /** 3159 * @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.) 3160 */ 3161 public Reference getTransform() { 3162 if (this.transform == null) 3163 if (Configuration.errorOnAutoCreate()) 3164 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.transform"); 3165 else if (Configuration.doAutoCreate()) 3166 this.transform = new Reference(); // cc 3167 return this.transform; 3168 } 3169 3170 public boolean hasTransform() { 3171 return this.transform != null && !this.transform.isEmpty(); 3172 } 3173 3174 /** 3175 * @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.) 3176 */ 3177 public PlanDefinitionActionComponent setTransform(Reference value) { 3178 this.transform = value; 3179 return this; 3180 } 3181 3182 /** 3183 * @return {@link #transform} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (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.) 3184 */ 3185 public StructureMap getTransformTarget() { 3186 if (this.transformTarget == null) 3187 if (Configuration.errorOnAutoCreate()) 3188 throw new Error("Attempt to auto-create PlanDefinitionActionComponent.transform"); 3189 else if (Configuration.doAutoCreate()) 3190 this.transformTarget = new StructureMap(); // aa 3191 return this.transformTarget; 3192 } 3193 3194 /** 3195 * @param value {@link #transform} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (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.) 3196 */ 3197 public PlanDefinitionActionComponent setTransformTarget(StructureMap value) { 3198 this.transformTarget = value; 3199 return this; 3200 } 3201 3202 /** 3203 * @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.) 3204 */ 3205 public List<PlanDefinitionActionDynamicValueComponent> getDynamicValue() { 3206 if (this.dynamicValue == null) 3207 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3208 return this.dynamicValue; 3209 } 3210 3211 /** 3212 * @return Returns a reference to <code>this</code> for easy method chaining 3213 */ 3214 public PlanDefinitionActionComponent setDynamicValue(List<PlanDefinitionActionDynamicValueComponent> theDynamicValue) { 3215 this.dynamicValue = theDynamicValue; 3216 return this; 3217 } 3218 3219 public boolean hasDynamicValue() { 3220 if (this.dynamicValue == null) 3221 return false; 3222 for (PlanDefinitionActionDynamicValueComponent item : this.dynamicValue) 3223 if (!item.isEmpty()) 3224 return true; 3225 return false; 3226 } 3227 3228 public PlanDefinitionActionDynamicValueComponent addDynamicValue() { //3 3229 PlanDefinitionActionDynamicValueComponent t = new PlanDefinitionActionDynamicValueComponent(); 3230 if (this.dynamicValue == null) 3231 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3232 this.dynamicValue.add(t); 3233 return t; 3234 } 3235 3236 public PlanDefinitionActionComponent addDynamicValue(PlanDefinitionActionDynamicValueComponent t) { //3 3237 if (t == null) 3238 return this; 3239 if (this.dynamicValue == null) 3240 this.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3241 this.dynamicValue.add(t); 3242 return this; 3243 } 3244 3245 /** 3246 * @return The first repetition of repeating field {@link #dynamicValue}, creating it if it does not already exist 3247 */ 3248 public PlanDefinitionActionDynamicValueComponent getDynamicValueFirstRep() { 3249 if (getDynamicValue().isEmpty()) { 3250 addDynamicValue(); 3251 } 3252 return getDynamicValue().get(0); 3253 } 3254 3255 /** 3256 * @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.) 3257 */ 3258 public List<PlanDefinitionActionComponent> getAction() { 3259 if (this.action == null) 3260 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3261 return this.action; 3262 } 3263 3264 /** 3265 * @return Returns a reference to <code>this</code> for easy method chaining 3266 */ 3267 public PlanDefinitionActionComponent setAction(List<PlanDefinitionActionComponent> theAction) { 3268 this.action = theAction; 3269 return this; 3270 } 3271 3272 public boolean hasAction() { 3273 if (this.action == null) 3274 return false; 3275 for (PlanDefinitionActionComponent item : this.action) 3276 if (!item.isEmpty()) 3277 return true; 3278 return false; 3279 } 3280 3281 public PlanDefinitionActionComponent addAction() { //3 3282 PlanDefinitionActionComponent t = new PlanDefinitionActionComponent(); 3283 if (this.action == null) 3284 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3285 this.action.add(t); 3286 return t; 3287 } 3288 3289 public PlanDefinitionActionComponent addAction(PlanDefinitionActionComponent t) { //3 3290 if (t == null) 3291 return this; 3292 if (this.action == null) 3293 this.action = new ArrayList<PlanDefinitionActionComponent>(); 3294 this.action.add(t); 3295 return this; 3296 } 3297 3298 /** 3299 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 3300 */ 3301 public PlanDefinitionActionComponent getActionFirstRep() { 3302 if (getAction().isEmpty()) { 3303 addAction(); 3304 } 3305 return getAction().get(0); 3306 } 3307 3308 protected void listChildren(List<Property> childrenList) { 3309 super.listChildren(childrenList); 3310 childrenList.add(new Property("label", "string", "A user-visible label for the action.", 0, java.lang.Integer.MAX_VALUE, label)); 3311 childrenList.add(new Property("title", "string", "The title of the action displayed to a user.", 0, java.lang.Integer.MAX_VALUE, title)); 3312 childrenList.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, java.lang.Integer.MAX_VALUE, description)); 3313 childrenList.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 may not be capable of interpreting it dynamically.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); 3314 childrenList.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 a the section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code)); 3315 childrenList.add(new Property("reason", "CodeableConcept", "A description of why this action is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, reason)); 3316 childrenList.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)); 3317 childrenList.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)); 3318 childrenList.add(new Property("triggerDefinition", "TriggerDefinition", "A description of when the action should be triggered.", 0, java.lang.Integer.MAX_VALUE, triggerDefinition)); 3319 childrenList.add(new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition)); 3320 childrenList.add(new Property("input", "DataRequirement", "Defines input data requirements for the action.", 0, java.lang.Integer.MAX_VALUE, input)); 3321 childrenList.add(new Property("output", "DataRequirement", "Defines the outputs of the action, if any.", 0, java.lang.Integer.MAX_VALUE, output)); 3322 childrenList.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)); 3323 childrenList.add(new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, java.lang.Integer.MAX_VALUE, timing)); 3324 childrenList.add(new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant)); 3325 childrenList.add(new Property("type", "Coding", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); 3326 childrenList.add(new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, java.lang.Integer.MAX_VALUE, groupingBehavior)); 3327 childrenList.add(new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, java.lang.Integer.MAX_VALUE, selectionBehavior)); 3328 childrenList.add(new Property("requiredBehavior", "code", "Defines the requiredness behavior for the action.", 0, java.lang.Integer.MAX_VALUE, requiredBehavior)); 3329 childrenList.add(new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, java.lang.Integer.MAX_VALUE, precheckBehavior)); 3330 childrenList.add(new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, java.lang.Integer.MAX_VALUE, cardinalityBehavior)); 3331 childrenList.add(new Property("definition", "Reference(ActivityDefinition|PlanDefinition)", "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, java.lang.Integer.MAX_VALUE, definition)); 3332 childrenList.add(new Property("transform", "Reference(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, java.lang.Integer.MAX_VALUE, transform)); 3333 childrenList.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)); 3334 childrenList.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)); 3335 } 3336 3337 @Override 3338 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3339 switch (hash) { 3340 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 3341 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3342 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3343 case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType 3344 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 3345 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept 3346 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact 3347 case -1240658034: /*goalId*/ return this.goalId == null ? new Base[0] : this.goalId.toArray(new Base[this.goalId.size()]); // IdType 3348 case 1126736171: /*triggerDefinition*/ return this.triggerDefinition == null ? new Base[0] : this.triggerDefinition.toArray(new Base[this.triggerDefinition.size()]); // TriggerDefinition 3349 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // PlanDefinitionActionConditionComponent 3350 case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // DataRequirement 3351 case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // DataRequirement 3352 case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : this.relatedAction.toArray(new Base[this.relatedAction.size()]); // PlanDefinitionActionRelatedActionComponent 3353 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type 3354 case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // PlanDefinitionActionParticipantComponent 3355 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 3356 case 586678389: /*groupingBehavior*/ return this.groupingBehavior == null ? new Base[0] : new Base[] {this.groupingBehavior}; // Enumeration<ActionGroupingBehavior> 3357 case 168639486: /*selectionBehavior*/ return this.selectionBehavior == null ? new Base[0] : new Base[] {this.selectionBehavior}; // Enumeration<ActionSelectionBehavior> 3358 case -1163906287: /*requiredBehavior*/ return this.requiredBehavior == null ? new Base[0] : new Base[] {this.requiredBehavior}; // Enumeration<ActionRequiredBehavior> 3359 case -1174249033: /*precheckBehavior*/ return this.precheckBehavior == null ? new Base[0] : new Base[] {this.precheckBehavior}; // Enumeration<ActionPrecheckBehavior> 3360 case -922577408: /*cardinalityBehavior*/ return this.cardinalityBehavior == null ? new Base[0] : new Base[] {this.cardinalityBehavior}; // Enumeration<ActionCardinalityBehavior> 3361 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference 3362 case 1052666732: /*transform*/ return this.transform == null ? new Base[0] : new Base[] {this.transform}; // Reference 3363 case 572625010: /*dynamicValue*/ return this.dynamicValue == null ? new Base[0] : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // PlanDefinitionActionDynamicValueComponent 3364 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // PlanDefinitionActionComponent 3365 default: return super.getProperty(hash, name, checkValid); 3366 } 3367 3368 } 3369 3370 @Override 3371 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3372 switch (hash) { 3373 case 102727412: // label 3374 this.label = castToString(value); // StringType 3375 return value; 3376 case 110371416: // title 3377 this.title = castToString(value); // StringType 3378 return value; 3379 case -1724546052: // description 3380 this.description = castToString(value); // StringType 3381 return value; 3382 case -900391049: // textEquivalent 3383 this.textEquivalent = castToString(value); // StringType 3384 return value; 3385 case 3059181: // code 3386 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 3387 return value; 3388 case -934964668: // reason 3389 this.getReason().add(castToCodeableConcept(value)); // CodeableConcept 3390 return value; 3391 case 1587405498: // documentation 3392 this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact 3393 return value; 3394 case -1240658034: // goalId 3395 this.getGoalId().add(castToId(value)); // IdType 3396 return value; 3397 case 1126736171: // triggerDefinition 3398 this.getTriggerDefinition().add(castToTriggerDefinition(value)); // TriggerDefinition 3399 return value; 3400 case -861311717: // condition 3401 this.getCondition().add((PlanDefinitionActionConditionComponent) value); // PlanDefinitionActionConditionComponent 3402 return value; 3403 case 100358090: // input 3404 this.getInput().add(castToDataRequirement(value)); // DataRequirement 3405 return value; 3406 case -1005512447: // output 3407 this.getOutput().add(castToDataRequirement(value)); // DataRequirement 3408 return value; 3409 case -384107967: // relatedAction 3410 this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value); // PlanDefinitionActionRelatedActionComponent 3411 return value; 3412 case -873664438: // timing 3413 this.timing = castToType(value); // Type 3414 return value; 3415 case 767422259: // participant 3416 this.getParticipant().add((PlanDefinitionActionParticipantComponent) value); // PlanDefinitionActionParticipantComponent 3417 return value; 3418 case 3575610: // type 3419 this.type = castToCoding(value); // Coding 3420 return value; 3421 case 586678389: // groupingBehavior 3422 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 3423 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 3424 return value; 3425 case 168639486: // selectionBehavior 3426 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 3427 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 3428 return value; 3429 case -1163906287: // requiredBehavior 3430 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 3431 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 3432 return value; 3433 case -1174249033: // precheckBehavior 3434 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 3435 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 3436 return value; 3437 case -922577408: // cardinalityBehavior 3438 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 3439 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 3440 return value; 3441 case -1014418093: // definition 3442 this.definition = castToReference(value); // Reference 3443 return value; 3444 case 1052666732: // transform 3445 this.transform = castToReference(value); // Reference 3446 return value; 3447 case 572625010: // dynamicValue 3448 this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value); // PlanDefinitionActionDynamicValueComponent 3449 return value; 3450 case -1422950858: // action 3451 this.getAction().add((PlanDefinitionActionComponent) value); // PlanDefinitionActionComponent 3452 return value; 3453 default: return super.setProperty(hash, name, value); 3454 } 3455 3456 } 3457 3458 @Override 3459 public Base setProperty(String name, Base value) throws FHIRException { 3460 if (name.equals("label")) { 3461 this.label = castToString(value); // StringType 3462 } else if (name.equals("title")) { 3463 this.title = castToString(value); // StringType 3464 } else if (name.equals("description")) { 3465 this.description = castToString(value); // StringType 3466 } else if (name.equals("textEquivalent")) { 3467 this.textEquivalent = castToString(value); // StringType 3468 } else if (name.equals("code")) { 3469 this.getCode().add(castToCodeableConcept(value)); 3470 } else if (name.equals("reason")) { 3471 this.getReason().add(castToCodeableConcept(value)); 3472 } else if (name.equals("documentation")) { 3473 this.getDocumentation().add(castToRelatedArtifact(value)); 3474 } else if (name.equals("goalId")) { 3475 this.getGoalId().add(castToId(value)); 3476 } else if (name.equals("triggerDefinition")) { 3477 this.getTriggerDefinition().add(castToTriggerDefinition(value)); 3478 } else if (name.equals("condition")) { 3479 this.getCondition().add((PlanDefinitionActionConditionComponent) value); 3480 } else if (name.equals("input")) { 3481 this.getInput().add(castToDataRequirement(value)); 3482 } else if (name.equals("output")) { 3483 this.getOutput().add(castToDataRequirement(value)); 3484 } else if (name.equals("relatedAction")) { 3485 this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value); 3486 } else if (name.equals("timing[x]")) { 3487 this.timing = castToType(value); // Type 3488 } else if (name.equals("participant")) { 3489 this.getParticipant().add((PlanDefinitionActionParticipantComponent) value); 3490 } else if (name.equals("type")) { 3491 this.type = castToCoding(value); // Coding 3492 } else if (name.equals("groupingBehavior")) { 3493 value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value)); 3494 this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior> 3495 } else if (name.equals("selectionBehavior")) { 3496 value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value)); 3497 this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior> 3498 } else if (name.equals("requiredBehavior")) { 3499 value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value)); 3500 this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior> 3501 } else if (name.equals("precheckBehavior")) { 3502 value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value)); 3503 this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior> 3504 } else if (name.equals("cardinalityBehavior")) { 3505 value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value)); 3506 this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior> 3507 } else if (name.equals("definition")) { 3508 this.definition = castToReference(value); // Reference 3509 } else if (name.equals("transform")) { 3510 this.transform = castToReference(value); // Reference 3511 } else if (name.equals("dynamicValue")) { 3512 this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value); 3513 } else if (name.equals("action")) { 3514 this.getAction().add((PlanDefinitionActionComponent) value); 3515 } else 3516 return super.setProperty(name, value); 3517 return value; 3518 } 3519 3520 @Override 3521 public Base makeProperty(int hash, String name) throws FHIRException { 3522 switch (hash) { 3523 case 102727412: return getLabelElement(); 3524 case 110371416: return getTitleElement(); 3525 case -1724546052: return getDescriptionElement(); 3526 case -900391049: return getTextEquivalentElement(); 3527 case 3059181: return addCode(); 3528 case -934964668: return addReason(); 3529 case 1587405498: return addDocumentation(); 3530 case -1240658034: return addGoalIdElement(); 3531 case 1126736171: return addTriggerDefinition(); 3532 case -861311717: return addCondition(); 3533 case 100358090: return addInput(); 3534 case -1005512447: return addOutput(); 3535 case -384107967: return addRelatedAction(); 3536 case 164632566: return getTiming(); 3537 case -873664438: return getTiming(); 3538 case 767422259: return addParticipant(); 3539 case 3575610: return getType(); 3540 case 586678389: return getGroupingBehaviorElement(); 3541 case 168639486: return getSelectionBehaviorElement(); 3542 case -1163906287: return getRequiredBehaviorElement(); 3543 case -1174249033: return getPrecheckBehaviorElement(); 3544 case -922577408: return getCardinalityBehaviorElement(); 3545 case -1014418093: return getDefinition(); 3546 case 1052666732: return getTransform(); 3547 case 572625010: return addDynamicValue(); 3548 case -1422950858: return addAction(); 3549 default: return super.makeProperty(hash, name); 3550 } 3551 3552 } 3553 3554 @Override 3555 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3556 switch (hash) { 3557 case 102727412: /*label*/ return new String[] {"string"}; 3558 case 110371416: /*title*/ return new String[] {"string"}; 3559 case -1724546052: /*description*/ return new String[] {"string"}; 3560 case -900391049: /*textEquivalent*/ return new String[] {"string"}; 3561 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 3562 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 3563 case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"}; 3564 case -1240658034: /*goalId*/ return new String[] {"id"}; 3565 case 1126736171: /*triggerDefinition*/ return new String[] {"TriggerDefinition"}; 3566 case -861311717: /*condition*/ return new String[] {}; 3567 case 100358090: /*input*/ return new String[] {"DataRequirement"}; 3568 case -1005512447: /*output*/ return new String[] {"DataRequirement"}; 3569 case -384107967: /*relatedAction*/ return new String[] {}; 3570 case -873664438: /*timing*/ return new String[] {"dateTime", "Period", "Duration", "Range", "Timing"}; 3571 case 767422259: /*participant*/ return new String[] {}; 3572 case 3575610: /*type*/ return new String[] {"Coding"}; 3573 case 586678389: /*groupingBehavior*/ return new String[] {"code"}; 3574 case 168639486: /*selectionBehavior*/ return new String[] {"code"}; 3575 case -1163906287: /*requiredBehavior*/ return new String[] {"code"}; 3576 case -1174249033: /*precheckBehavior*/ return new String[] {"code"}; 3577 case -922577408: /*cardinalityBehavior*/ return new String[] {"code"}; 3578 case -1014418093: /*definition*/ return new String[] {"Reference"}; 3579 case 1052666732: /*transform*/ return new String[] {"Reference"}; 3580 case 572625010: /*dynamicValue*/ return new String[] {}; 3581 case -1422950858: /*action*/ return new String[] {"@PlanDefinition.action"}; 3582 default: return super.getTypesForProperty(hash, name); 3583 } 3584 3585 } 3586 3587 @Override 3588 public Base addChild(String name) throws FHIRException { 3589 if (name.equals("label")) { 3590 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.label"); 3591 } 3592 else if (name.equals("title")) { 3593 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.title"); 3594 } 3595 else if (name.equals("description")) { 3596 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 3597 } 3598 else if (name.equals("textEquivalent")) { 3599 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.textEquivalent"); 3600 } 3601 else if (name.equals("code")) { 3602 return addCode(); 3603 } 3604 else if (name.equals("reason")) { 3605 return addReason(); 3606 } 3607 else if (name.equals("documentation")) { 3608 return addDocumentation(); 3609 } 3610 else if (name.equals("goalId")) { 3611 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.goalId"); 3612 } 3613 else if (name.equals("triggerDefinition")) { 3614 return addTriggerDefinition(); 3615 } 3616 else if (name.equals("condition")) { 3617 return addCondition(); 3618 } 3619 else if (name.equals("input")) { 3620 return addInput(); 3621 } 3622 else if (name.equals("output")) { 3623 return addOutput(); 3624 } 3625 else if (name.equals("relatedAction")) { 3626 return addRelatedAction(); 3627 } 3628 else if (name.equals("timingDateTime")) { 3629 this.timing = new DateTimeType(); 3630 return this.timing; 3631 } 3632 else if (name.equals("timingPeriod")) { 3633 this.timing = new Period(); 3634 return this.timing; 3635 } 3636 else if (name.equals("timingDuration")) { 3637 this.timing = new Duration(); 3638 return this.timing; 3639 } 3640 else if (name.equals("timingRange")) { 3641 this.timing = new Range(); 3642 return this.timing; 3643 } 3644 else if (name.equals("timingTiming")) { 3645 this.timing = new Timing(); 3646 return this.timing; 3647 } 3648 else if (name.equals("participant")) { 3649 return addParticipant(); 3650 } 3651 else if (name.equals("type")) { 3652 this.type = new Coding(); 3653 return this.type; 3654 } 3655 else if (name.equals("groupingBehavior")) { 3656 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.groupingBehavior"); 3657 } 3658 else if (name.equals("selectionBehavior")) { 3659 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.selectionBehavior"); 3660 } 3661 else if (name.equals("requiredBehavior")) { 3662 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.requiredBehavior"); 3663 } 3664 else if (name.equals("precheckBehavior")) { 3665 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.precheckBehavior"); 3666 } 3667 else if (name.equals("cardinalityBehavior")) { 3668 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.cardinalityBehavior"); 3669 } 3670 else if (name.equals("definition")) { 3671 this.definition = new Reference(); 3672 return this.definition; 3673 } 3674 else if (name.equals("transform")) { 3675 this.transform = new Reference(); 3676 return this.transform; 3677 } 3678 else if (name.equals("dynamicValue")) { 3679 return addDynamicValue(); 3680 } 3681 else if (name.equals("action")) { 3682 return addAction(); 3683 } 3684 else 3685 return super.addChild(name); 3686 } 3687 3688 public PlanDefinitionActionComponent copy() { 3689 PlanDefinitionActionComponent dst = new PlanDefinitionActionComponent(); 3690 copyValues(dst); 3691 dst.label = label == null ? null : label.copy(); 3692 dst.title = title == null ? null : title.copy(); 3693 dst.description = description == null ? null : description.copy(); 3694 dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); 3695 if (code != null) { 3696 dst.code = new ArrayList<CodeableConcept>(); 3697 for (CodeableConcept i : code) 3698 dst.code.add(i.copy()); 3699 }; 3700 if (reason != null) { 3701 dst.reason = new ArrayList<CodeableConcept>(); 3702 for (CodeableConcept i : reason) 3703 dst.reason.add(i.copy()); 3704 }; 3705 if (documentation != null) { 3706 dst.documentation = new ArrayList<RelatedArtifact>(); 3707 for (RelatedArtifact i : documentation) 3708 dst.documentation.add(i.copy()); 3709 }; 3710 if (goalId != null) { 3711 dst.goalId = new ArrayList<IdType>(); 3712 for (IdType i : goalId) 3713 dst.goalId.add(i.copy()); 3714 }; 3715 if (triggerDefinition != null) { 3716 dst.triggerDefinition = new ArrayList<TriggerDefinition>(); 3717 for (TriggerDefinition i : triggerDefinition) 3718 dst.triggerDefinition.add(i.copy()); 3719 }; 3720 if (condition != null) { 3721 dst.condition = new ArrayList<PlanDefinitionActionConditionComponent>(); 3722 for (PlanDefinitionActionConditionComponent i : condition) 3723 dst.condition.add(i.copy()); 3724 }; 3725 if (input != null) { 3726 dst.input = new ArrayList<DataRequirement>(); 3727 for (DataRequirement i : input) 3728 dst.input.add(i.copy()); 3729 }; 3730 if (output != null) { 3731 dst.output = new ArrayList<DataRequirement>(); 3732 for (DataRequirement i : output) 3733 dst.output.add(i.copy()); 3734 }; 3735 if (relatedAction != null) { 3736 dst.relatedAction = new ArrayList<PlanDefinitionActionRelatedActionComponent>(); 3737 for (PlanDefinitionActionRelatedActionComponent i : relatedAction) 3738 dst.relatedAction.add(i.copy()); 3739 }; 3740 dst.timing = timing == null ? null : timing.copy(); 3741 if (participant != null) { 3742 dst.participant = new ArrayList<PlanDefinitionActionParticipantComponent>(); 3743 for (PlanDefinitionActionParticipantComponent i : participant) 3744 dst.participant.add(i.copy()); 3745 }; 3746 dst.type = type == null ? null : type.copy(); 3747 dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy(); 3748 dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy(); 3749 dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy(); 3750 dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy(); 3751 dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy(); 3752 dst.definition = definition == null ? null : definition.copy(); 3753 dst.transform = transform == null ? null : transform.copy(); 3754 if (dynamicValue != null) { 3755 dst.dynamicValue = new ArrayList<PlanDefinitionActionDynamicValueComponent>(); 3756 for (PlanDefinitionActionDynamicValueComponent i : dynamicValue) 3757 dst.dynamicValue.add(i.copy()); 3758 }; 3759 if (action != null) { 3760 dst.action = new ArrayList<PlanDefinitionActionComponent>(); 3761 for (PlanDefinitionActionComponent i : action) 3762 dst.action.add(i.copy()); 3763 }; 3764 return dst; 3765 } 3766 3767 @Override 3768 public boolean equalsDeep(Base other) { 3769 if (!super.equalsDeep(other)) 3770 return false; 3771 if (!(other instanceof PlanDefinitionActionComponent)) 3772 return false; 3773 PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other; 3774 return compareDeep(label, o.label, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) 3775 && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) 3776 && compareDeep(documentation, o.documentation, true) && compareDeep(goalId, o.goalId, true) && compareDeep(triggerDefinition, o.triggerDefinition, true) 3777 && compareDeep(condition, o.condition, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true) 3778 && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true) 3779 && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true) 3780 && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true) 3781 && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(definition, o.definition, true) 3782 && compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true) 3783 && compareDeep(action, o.action, true); 3784 } 3785 3786 @Override 3787 public boolean equalsShallow(Base other) { 3788 if (!super.equalsShallow(other)) 3789 return false; 3790 if (!(other instanceof PlanDefinitionActionComponent)) 3791 return false; 3792 PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other; 3793 return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) 3794 && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(goalId, o.goalId, true) && compareValues(groupingBehavior, o.groupingBehavior, true) 3795 && compareValues(selectionBehavior, o.selectionBehavior, true) && compareValues(requiredBehavior, o.requiredBehavior, true) 3796 && compareValues(precheckBehavior, o.precheckBehavior, true) && compareValues(cardinalityBehavior, o.cardinalityBehavior, true) 3797 ; 3798 } 3799 3800 public boolean isEmpty() { 3801 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, title, description 3802 , textEquivalent, code, reason, documentation, goalId, triggerDefinition, condition 3803 , input, output, relatedAction, timing, participant, type, groupingBehavior, selectionBehavior 3804 , requiredBehavior, precheckBehavior, cardinalityBehavior, definition, transform, dynamicValue 3805 , action); 3806 } 3807 3808 public String fhirType() { 3809 return "PlanDefinition.action"; 3810 3811 } 3812 3813 } 3814 3815 @Block() 3816 public static class PlanDefinitionActionConditionComponent extends BackboneElement implements IBaseBackboneElement { 3817 /** 3818 * The kind of condition. 3819 */ 3820 @Child(name = "kind", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3821 @Description(shortDefinition="applicability | start | stop", formalDefinition="The kind of condition." ) 3822 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-condition-kind") 3823 protected Enumeration<ActionConditionKind> kind; 3824 3825 /** 3826 * A brief, natural language description of the condition that effectively communicates the intended semantics. 3827 */ 3828 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3829 @Description(shortDefinition="Natural language description of the condition", formalDefinition="A brief, natural language description of the condition that effectively communicates the intended semantics." ) 3830 protected StringType description; 3831 3832 /** 3833 * The media type of the language for the expression. 3834 */ 3835 @Child(name = "language", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3836 @Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." ) 3837 protected StringType language; 3838 3839 /** 3840 * An expression that returns true or false, indicating whether or not the condition is satisfied. 3841 */ 3842 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3843 @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether or not the condition is satisfied." ) 3844 protected StringType expression; 3845 3846 private static final long serialVersionUID = 944300105L; 3847 3848 /** 3849 * Constructor 3850 */ 3851 public PlanDefinitionActionConditionComponent() { 3852 super(); 3853 } 3854 3855 /** 3856 * Constructor 3857 */ 3858 public PlanDefinitionActionConditionComponent(Enumeration<ActionConditionKind> kind) { 3859 super(); 3860 this.kind = kind; 3861 } 3862 3863 /** 3864 * @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 3865 */ 3866 public Enumeration<ActionConditionKind> getKindElement() { 3867 if (this.kind == null) 3868 if (Configuration.errorOnAutoCreate()) 3869 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.kind"); 3870 else if (Configuration.doAutoCreate()) 3871 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); // bb 3872 return this.kind; 3873 } 3874 3875 public boolean hasKindElement() { 3876 return this.kind != null && !this.kind.isEmpty(); 3877 } 3878 3879 public boolean hasKind() { 3880 return this.kind != null && !this.kind.isEmpty(); 3881 } 3882 3883 /** 3884 * @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 3885 */ 3886 public PlanDefinitionActionConditionComponent setKindElement(Enumeration<ActionConditionKind> value) { 3887 this.kind = value; 3888 return this; 3889 } 3890 3891 /** 3892 * @return The kind of condition. 3893 */ 3894 public ActionConditionKind getKind() { 3895 return this.kind == null ? null : this.kind.getValue(); 3896 } 3897 3898 /** 3899 * @param value The kind of condition. 3900 */ 3901 public PlanDefinitionActionConditionComponent setKind(ActionConditionKind value) { 3902 if (this.kind == null) 3903 this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); 3904 this.kind.setValue(value); 3905 return this; 3906 } 3907 3908 /** 3909 * @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 3910 */ 3911 public StringType getDescriptionElement() { 3912 if (this.description == null) 3913 if (Configuration.errorOnAutoCreate()) 3914 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.description"); 3915 else if (Configuration.doAutoCreate()) 3916 this.description = new StringType(); // bb 3917 return this.description; 3918 } 3919 3920 public boolean hasDescriptionElement() { 3921 return this.description != null && !this.description.isEmpty(); 3922 } 3923 3924 public boolean hasDescription() { 3925 return this.description != null && !this.description.isEmpty(); 3926 } 3927 3928 /** 3929 * @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 3930 */ 3931 public PlanDefinitionActionConditionComponent setDescriptionElement(StringType value) { 3932 this.description = value; 3933 return this; 3934 } 3935 3936 /** 3937 * @return A brief, natural language description of the condition that effectively communicates the intended semantics. 3938 */ 3939 public String getDescription() { 3940 return this.description == null ? null : this.description.getValue(); 3941 } 3942 3943 /** 3944 * @param value A brief, natural language description of the condition that effectively communicates the intended semantics. 3945 */ 3946 public PlanDefinitionActionConditionComponent setDescription(String value) { 3947 if (Utilities.noString(value)) 3948 this.description = null; 3949 else { 3950 if (this.description == null) 3951 this.description = new StringType(); 3952 this.description.setValue(value); 3953 } 3954 return this; 3955 } 3956 3957 /** 3958 * @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 3959 */ 3960 public StringType getLanguageElement() { 3961 if (this.language == null) 3962 if (Configuration.errorOnAutoCreate()) 3963 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.language"); 3964 else if (Configuration.doAutoCreate()) 3965 this.language = new StringType(); // bb 3966 return this.language; 3967 } 3968 3969 public boolean hasLanguageElement() { 3970 return this.language != null && !this.language.isEmpty(); 3971 } 3972 3973 public boolean hasLanguage() { 3974 return this.language != null && !this.language.isEmpty(); 3975 } 3976 3977 /** 3978 * @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 3979 */ 3980 public PlanDefinitionActionConditionComponent setLanguageElement(StringType value) { 3981 this.language = value; 3982 return this; 3983 } 3984 3985 /** 3986 * @return The media type of the language for the expression. 3987 */ 3988 public String getLanguage() { 3989 return this.language == null ? null : this.language.getValue(); 3990 } 3991 3992 /** 3993 * @param value The media type of the language for the expression. 3994 */ 3995 public PlanDefinitionActionConditionComponent setLanguage(String value) { 3996 if (Utilities.noString(value)) 3997 this.language = null; 3998 else { 3999 if (this.language == null) 4000 this.language = new StringType(); 4001 this.language.setValue(value); 4002 } 4003 return this; 4004 } 4005 4006 /** 4007 * @return {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 4008 */ 4009 public StringType getExpressionElement() { 4010 if (this.expression == null) 4011 if (Configuration.errorOnAutoCreate()) 4012 throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.expression"); 4013 else if (Configuration.doAutoCreate()) 4014 this.expression = new StringType(); // bb 4015 return this.expression; 4016 } 4017 4018 public boolean hasExpressionElement() { 4019 return this.expression != null && !this.expression.isEmpty(); 4020 } 4021 4022 public boolean hasExpression() { 4023 return this.expression != null && !this.expression.isEmpty(); 4024 } 4025 4026 /** 4027 * @param value {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 4028 */ 4029 public PlanDefinitionActionConditionComponent setExpressionElement(StringType value) { 4030 this.expression = value; 4031 return this; 4032 } 4033 4034 /** 4035 * @return An expression that returns true or false, indicating whether or not the condition is satisfied. 4036 */ 4037 public String getExpression() { 4038 return this.expression == null ? null : this.expression.getValue(); 4039 } 4040 4041 /** 4042 * @param value An expression that returns true or false, indicating whether or not the condition is satisfied. 4043 */ 4044 public PlanDefinitionActionConditionComponent setExpression(String value) { 4045 if (Utilities.noString(value)) 4046 this.expression = null; 4047 else { 4048 if (this.expression == null) 4049 this.expression = new StringType(); 4050 this.expression.setValue(value); 4051 } 4052 return this; 4053 } 4054 4055 protected void listChildren(List<Property> childrenList) { 4056 super.listChildren(childrenList); 4057 childrenList.add(new Property("kind", "code", "The kind of condition.", 0, java.lang.Integer.MAX_VALUE, kind)); 4058 childrenList.add(new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, java.lang.Integer.MAX_VALUE, description)); 4059 childrenList.add(new Property("language", "string", "The media type of the language for the expression.", 0, java.lang.Integer.MAX_VALUE, language)); 4060 childrenList.add(new Property("expression", "string", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, java.lang.Integer.MAX_VALUE, expression)); 4061 } 4062 4063 @Override 4064 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4065 switch (hash) { 4066 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<ActionConditionKind> 4067 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 4068 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // StringType 4069 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 4070 default: return super.getProperty(hash, name, checkValid); 4071 } 4072 4073 } 4074 4075 @Override 4076 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4077 switch (hash) { 4078 case 3292052: // kind 4079 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 4080 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 4081 return value; 4082 case -1724546052: // description 4083 this.description = castToString(value); // StringType 4084 return value; 4085 case -1613589672: // language 4086 this.language = castToString(value); // StringType 4087 return value; 4088 case -1795452264: // expression 4089 this.expression = castToString(value); // StringType 4090 return value; 4091 default: return super.setProperty(hash, name, value); 4092 } 4093 4094 } 4095 4096 @Override 4097 public Base setProperty(String name, Base value) throws FHIRException { 4098 if (name.equals("kind")) { 4099 value = new ActionConditionKindEnumFactory().fromType(castToCode(value)); 4100 this.kind = (Enumeration) value; // Enumeration<ActionConditionKind> 4101 } else if (name.equals("description")) { 4102 this.description = castToString(value); // StringType 4103 } else if (name.equals("language")) { 4104 this.language = castToString(value); // StringType 4105 } else if (name.equals("expression")) { 4106 this.expression = castToString(value); // StringType 4107 } else 4108 return super.setProperty(name, value); 4109 return value; 4110 } 4111 4112 @Override 4113 public Base makeProperty(int hash, String name) throws FHIRException { 4114 switch (hash) { 4115 case 3292052: return getKindElement(); 4116 case -1724546052: return getDescriptionElement(); 4117 case -1613589672: return getLanguageElement(); 4118 case -1795452264: return getExpressionElement(); 4119 default: return super.makeProperty(hash, name); 4120 } 4121 4122 } 4123 4124 @Override 4125 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4126 switch (hash) { 4127 case 3292052: /*kind*/ return new String[] {"code"}; 4128 case -1724546052: /*description*/ return new String[] {"string"}; 4129 case -1613589672: /*language*/ return new String[] {"string"}; 4130 case -1795452264: /*expression*/ return new String[] {"string"}; 4131 default: return super.getTypesForProperty(hash, name); 4132 } 4133 4134 } 4135 4136 @Override 4137 public Base addChild(String name) throws FHIRException { 4138 if (name.equals("kind")) { 4139 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.kind"); 4140 } 4141 else if (name.equals("description")) { 4142 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 4143 } 4144 else if (name.equals("language")) { 4145 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.language"); 4146 } 4147 else if (name.equals("expression")) { 4148 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.expression"); 4149 } 4150 else 4151 return super.addChild(name); 4152 } 4153 4154 public PlanDefinitionActionConditionComponent copy() { 4155 PlanDefinitionActionConditionComponent dst = new PlanDefinitionActionConditionComponent(); 4156 copyValues(dst); 4157 dst.kind = kind == null ? null : kind.copy(); 4158 dst.description = description == null ? null : description.copy(); 4159 dst.language = language == null ? null : language.copy(); 4160 dst.expression = expression == null ? null : expression.copy(); 4161 return dst; 4162 } 4163 4164 @Override 4165 public boolean equalsDeep(Base other) { 4166 if (!super.equalsDeep(other)) 4167 return false; 4168 if (!(other instanceof PlanDefinitionActionConditionComponent)) 4169 return false; 4170 PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other; 4171 return compareDeep(kind, o.kind, true) && compareDeep(description, o.description, true) && compareDeep(language, o.language, true) 4172 && compareDeep(expression, o.expression, true); 4173 } 4174 4175 @Override 4176 public boolean equalsShallow(Base other) { 4177 if (!super.equalsShallow(other)) 4178 return false; 4179 if (!(other instanceof PlanDefinitionActionConditionComponent)) 4180 return false; 4181 PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other; 4182 return compareValues(kind, o.kind, true) && compareValues(description, o.description, true) && compareValues(language, o.language, true) 4183 && compareValues(expression, o.expression, true); 4184 } 4185 4186 public boolean isEmpty() { 4187 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, description, language 4188 , expression); 4189 } 4190 4191 public String fhirType() { 4192 return "PlanDefinition.action.condition"; 4193 4194 } 4195 4196 } 4197 4198 @Block() 4199 public static class PlanDefinitionActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement { 4200 /** 4201 * The element id of the related action. 4202 */ 4203 @Child(name = "actionId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4204 @Description(shortDefinition="What action is this related to", formalDefinition="The element id of the related action." ) 4205 protected IdType actionId; 4206 4207 /** 4208 * The relationship of this action to the related action. 4209 */ 4210 @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 4211 @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." ) 4212 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-relationship-type") 4213 protected Enumeration<ActionRelationshipType> relationship; 4214 4215 /** 4216 * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before. 4217 */ 4218 @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false) 4219 @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." ) 4220 protected Type offset; 4221 4222 private static final long serialVersionUID = 1063306770L; 4223 4224 /** 4225 * Constructor 4226 */ 4227 public PlanDefinitionActionRelatedActionComponent() { 4228 super(); 4229 } 4230 4231 /** 4232 * Constructor 4233 */ 4234 public PlanDefinitionActionRelatedActionComponent(IdType actionId, Enumeration<ActionRelationshipType> relationship) { 4235 super(); 4236 this.actionId = actionId; 4237 this.relationship = relationship; 4238 } 4239 4240 /** 4241 * @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 4242 */ 4243 public IdType getActionIdElement() { 4244 if (this.actionId == null) 4245 if (Configuration.errorOnAutoCreate()) 4246 throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.actionId"); 4247 else if (Configuration.doAutoCreate()) 4248 this.actionId = new IdType(); // bb 4249 return this.actionId; 4250 } 4251 4252 public boolean hasActionIdElement() { 4253 return this.actionId != null && !this.actionId.isEmpty(); 4254 } 4255 4256 public boolean hasActionId() { 4257 return this.actionId != null && !this.actionId.isEmpty(); 4258 } 4259 4260 /** 4261 * @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 4262 */ 4263 public PlanDefinitionActionRelatedActionComponent setActionIdElement(IdType value) { 4264 this.actionId = value; 4265 return this; 4266 } 4267 4268 /** 4269 * @return The element id of the related action. 4270 */ 4271 public String getActionId() { 4272 return this.actionId == null ? null : this.actionId.getValue(); 4273 } 4274 4275 /** 4276 * @param value The element id of the related action. 4277 */ 4278 public PlanDefinitionActionRelatedActionComponent setActionId(String value) { 4279 if (this.actionId == null) 4280 this.actionId = new IdType(); 4281 this.actionId.setValue(value); 4282 return this; 4283 } 4284 4285 /** 4286 * @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 4287 */ 4288 public Enumeration<ActionRelationshipType> getRelationshipElement() { 4289 if (this.relationship == null) 4290 if (Configuration.errorOnAutoCreate()) 4291 throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.relationship"); 4292 else if (Configuration.doAutoCreate()) 4293 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); // bb 4294 return this.relationship; 4295 } 4296 4297 public boolean hasRelationshipElement() { 4298 return this.relationship != null && !this.relationship.isEmpty(); 4299 } 4300 4301 public boolean hasRelationship() { 4302 return this.relationship != null && !this.relationship.isEmpty(); 4303 } 4304 4305 /** 4306 * @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 4307 */ 4308 public PlanDefinitionActionRelatedActionComponent setRelationshipElement(Enumeration<ActionRelationshipType> value) { 4309 this.relationship = value; 4310 return this; 4311 } 4312 4313 /** 4314 * @return The relationship of this action to the related action. 4315 */ 4316 public ActionRelationshipType getRelationship() { 4317 return this.relationship == null ? null : this.relationship.getValue(); 4318 } 4319 4320 /** 4321 * @param value The relationship of this action to the related action. 4322 */ 4323 public PlanDefinitionActionRelatedActionComponent setRelationship(ActionRelationshipType value) { 4324 if (this.relationship == null) 4325 this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); 4326 this.relationship.setValue(value); 4327 return this; 4328 } 4329 4330 /** 4331 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4332 */ 4333 public Type getOffset() { 4334 return this.offset; 4335 } 4336 4337 /** 4338 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4339 */ 4340 public Duration getOffsetDuration() throws FHIRException { 4341 if (!(this.offset instanceof Duration)) 4342 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); 4343 return (Duration) this.offset; 4344 } 4345 4346 public boolean hasOffsetDuration() { 4347 return this.offset instanceof Duration; 4348 } 4349 4350 /** 4351 * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4352 */ 4353 public Range getOffsetRange() throws FHIRException { 4354 if (!(this.offset instanceof Range)) 4355 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered"); 4356 return (Range) this.offset; 4357 } 4358 4359 public boolean hasOffsetRange() { 4360 return this.offset instanceof Range; 4361 } 4362 4363 public boolean hasOffset() { 4364 return this.offset != null && !this.offset.isEmpty(); 4365 } 4366 4367 /** 4368 * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) 4369 */ 4370 public PlanDefinitionActionRelatedActionComponent setOffset(Type value) { 4371 this.offset = value; 4372 return this; 4373 } 4374 4375 protected void listChildren(List<Property> childrenList) { 4376 super.listChildren(childrenList); 4377 childrenList.add(new Property("actionId", "id", "The element id of the related action.", 0, java.lang.Integer.MAX_VALUE, actionId)); 4378 childrenList.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, java.lang.Integer.MAX_VALUE, relationship)); 4379 childrenList.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, java.lang.Integer.MAX_VALUE, offset)); 4380 } 4381 4382 @Override 4383 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4384 switch (hash) { 4385 case -1656172047: /*actionId*/ return this.actionId == null ? new Base[0] : new Base[] {this.actionId}; // IdType 4386 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType> 4387 case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type 4388 default: return super.getProperty(hash, name, checkValid); 4389 } 4390 4391 } 4392 4393 @Override 4394 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4395 switch (hash) { 4396 case -1656172047: // actionId 4397 this.actionId = castToId(value); // IdType 4398 return value; 4399 case -261851592: // relationship 4400 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 4401 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 4402 return value; 4403 case -1019779949: // offset 4404 this.offset = castToType(value); // Type 4405 return value; 4406 default: return super.setProperty(hash, name, value); 4407 } 4408 4409 } 4410 4411 @Override 4412 public Base setProperty(String name, Base value) throws FHIRException { 4413 if (name.equals("actionId")) { 4414 this.actionId = castToId(value); // IdType 4415 } else if (name.equals("relationship")) { 4416 value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value)); 4417 this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType> 4418 } else if (name.equals("offset[x]")) { 4419 this.offset = castToType(value); // Type 4420 } else 4421 return super.setProperty(name, value); 4422 return value; 4423 } 4424 4425 @Override 4426 public Base makeProperty(int hash, String name) throws FHIRException { 4427 switch (hash) { 4428 case -1656172047: return getActionIdElement(); 4429 case -261851592: return getRelationshipElement(); 4430 case -1960684787: return getOffset(); 4431 case -1019779949: return getOffset(); 4432 default: return super.makeProperty(hash, name); 4433 } 4434 4435 } 4436 4437 @Override 4438 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4439 switch (hash) { 4440 case -1656172047: /*actionId*/ return new String[] {"id"}; 4441 case -261851592: /*relationship*/ return new String[] {"code"}; 4442 case -1019779949: /*offset*/ return new String[] {"Duration", "Range"}; 4443 default: return super.getTypesForProperty(hash, name); 4444 } 4445 4446 } 4447 4448 @Override 4449 public Base addChild(String name) throws FHIRException { 4450 if (name.equals("actionId")) { 4451 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.actionId"); 4452 } 4453 else if (name.equals("relationship")) { 4454 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.relationship"); 4455 } 4456 else if (name.equals("offsetDuration")) { 4457 this.offset = new Duration(); 4458 return this.offset; 4459 } 4460 else if (name.equals("offsetRange")) { 4461 this.offset = new Range(); 4462 return this.offset; 4463 } 4464 else 4465 return super.addChild(name); 4466 } 4467 4468 public PlanDefinitionActionRelatedActionComponent copy() { 4469 PlanDefinitionActionRelatedActionComponent dst = new PlanDefinitionActionRelatedActionComponent(); 4470 copyValues(dst); 4471 dst.actionId = actionId == null ? null : actionId.copy(); 4472 dst.relationship = relationship == null ? null : relationship.copy(); 4473 dst.offset = offset == null ? null : offset.copy(); 4474 return dst; 4475 } 4476 4477 @Override 4478 public boolean equalsDeep(Base other) { 4479 if (!super.equalsDeep(other)) 4480 return false; 4481 if (!(other instanceof PlanDefinitionActionRelatedActionComponent)) 4482 return false; 4483 PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other; 4484 return compareDeep(actionId, o.actionId, true) && compareDeep(relationship, o.relationship, true) 4485 && compareDeep(offset, o.offset, true); 4486 } 4487 4488 @Override 4489 public boolean equalsShallow(Base other) { 4490 if (!super.equalsShallow(other)) 4491 return false; 4492 if (!(other instanceof PlanDefinitionActionRelatedActionComponent)) 4493 return false; 4494 PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other; 4495 return compareValues(actionId, o.actionId, true) && compareValues(relationship, o.relationship, true) 4496 ; 4497 } 4498 4499 public boolean isEmpty() { 4500 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionId, relationship, offset 4501 ); 4502 } 4503 4504 public String fhirType() { 4505 return "PlanDefinition.action.relatedAction"; 4506 4507 } 4508 4509 } 4510 4511 @Block() 4512 public static class PlanDefinitionActionParticipantComponent extends BackboneElement implements IBaseBackboneElement { 4513 /** 4514 * The type of participant in the action. 4515 */ 4516 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4517 @Description(shortDefinition="patient | practitioner | related-person", formalDefinition="The type of participant in the action." ) 4518 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-type") 4519 protected Enumeration<ActionParticipantType> type; 4520 4521 /** 4522 * The role the participant should play in performing the described action. 4523 */ 4524 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 4525 @Description(shortDefinition="E.g. Nurse, Surgeon, Parent, etc", formalDefinition="The role the participant should play in performing the described action." ) 4526 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-role") 4527 protected CodeableConcept role; 4528 4529 private static final long serialVersionUID = -1152013659L; 4530 4531 /** 4532 * Constructor 4533 */ 4534 public PlanDefinitionActionParticipantComponent() { 4535 super(); 4536 } 4537 4538 /** 4539 * Constructor 4540 */ 4541 public PlanDefinitionActionParticipantComponent(Enumeration<ActionParticipantType> type) { 4542 super(); 4543 this.type = type; 4544 } 4545 4546 /** 4547 * @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 4548 */ 4549 public Enumeration<ActionParticipantType> getTypeElement() { 4550 if (this.type == null) 4551 if (Configuration.errorOnAutoCreate()) 4552 throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.type"); 4553 else if (Configuration.doAutoCreate()) 4554 this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory()); // bb 4555 return this.type; 4556 } 4557 4558 public boolean hasTypeElement() { 4559 return this.type != null && !this.type.isEmpty(); 4560 } 4561 4562 public boolean hasType() { 4563 return this.type != null && !this.type.isEmpty(); 4564 } 4565 4566 /** 4567 * @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 4568 */ 4569 public PlanDefinitionActionParticipantComponent setTypeElement(Enumeration<ActionParticipantType> value) { 4570 this.type = value; 4571 return this; 4572 } 4573 4574 /** 4575 * @return The type of participant in the action. 4576 */ 4577 public ActionParticipantType getType() { 4578 return this.type == null ? null : this.type.getValue(); 4579 } 4580 4581 /** 4582 * @param value The type of participant in the action. 4583 */ 4584 public PlanDefinitionActionParticipantComponent setType(ActionParticipantType value) { 4585 if (this.type == null) 4586 this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory()); 4587 this.type.setValue(value); 4588 return this; 4589 } 4590 4591 /** 4592 * @return {@link #role} (The role the participant should play in performing the described action.) 4593 */ 4594 public CodeableConcept getRole() { 4595 if (this.role == null) 4596 if (Configuration.errorOnAutoCreate()) 4597 throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.role"); 4598 else if (Configuration.doAutoCreate()) 4599 this.role = new CodeableConcept(); // cc 4600 return this.role; 4601 } 4602 4603 public boolean hasRole() { 4604 return this.role != null && !this.role.isEmpty(); 4605 } 4606 4607 /** 4608 * @param value {@link #role} (The role the participant should play in performing the described action.) 4609 */ 4610 public PlanDefinitionActionParticipantComponent setRole(CodeableConcept value) { 4611 this.role = value; 4612 return this; 4613 } 4614 4615 protected void listChildren(List<Property> childrenList) { 4616 super.listChildren(childrenList); 4617 childrenList.add(new Property("type", "code", "The type of participant in the action.", 0, java.lang.Integer.MAX_VALUE, type)); 4618 childrenList.add(new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, java.lang.Integer.MAX_VALUE, role)); 4619 } 4620 4621 @Override 4622 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4623 switch (hash) { 4624 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActionParticipantType> 4625 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 4626 default: return super.getProperty(hash, name, checkValid); 4627 } 4628 4629 } 4630 4631 @Override 4632 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4633 switch (hash) { 4634 case 3575610: // type 4635 value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value)); 4636 this.type = (Enumeration) value; // Enumeration<ActionParticipantType> 4637 return value; 4638 case 3506294: // role 4639 this.role = castToCodeableConcept(value); // CodeableConcept 4640 return value; 4641 default: return super.setProperty(hash, name, value); 4642 } 4643 4644 } 4645 4646 @Override 4647 public Base setProperty(String name, Base value) throws FHIRException { 4648 if (name.equals("type")) { 4649 value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value)); 4650 this.type = (Enumeration) value; // Enumeration<ActionParticipantType> 4651 } else if (name.equals("role")) { 4652 this.role = castToCodeableConcept(value); // CodeableConcept 4653 } else 4654 return super.setProperty(name, value); 4655 return value; 4656 } 4657 4658 @Override 4659 public Base makeProperty(int hash, String name) throws FHIRException { 4660 switch (hash) { 4661 case 3575610: return getTypeElement(); 4662 case 3506294: return getRole(); 4663 default: return super.makeProperty(hash, name); 4664 } 4665 4666 } 4667 4668 @Override 4669 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4670 switch (hash) { 4671 case 3575610: /*type*/ return new String[] {"code"}; 4672 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 4673 default: return super.getTypesForProperty(hash, name); 4674 } 4675 4676 } 4677 4678 @Override 4679 public Base addChild(String name) throws FHIRException { 4680 if (name.equals("type")) { 4681 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.type"); 4682 } 4683 else if (name.equals("role")) { 4684 this.role = new CodeableConcept(); 4685 return this.role; 4686 } 4687 else 4688 return super.addChild(name); 4689 } 4690 4691 public PlanDefinitionActionParticipantComponent copy() { 4692 PlanDefinitionActionParticipantComponent dst = new PlanDefinitionActionParticipantComponent(); 4693 copyValues(dst); 4694 dst.type = type == null ? null : type.copy(); 4695 dst.role = role == null ? null : role.copy(); 4696 return dst; 4697 } 4698 4699 @Override 4700 public boolean equalsDeep(Base other) { 4701 if (!super.equalsDeep(other)) 4702 return false; 4703 if (!(other instanceof PlanDefinitionActionParticipantComponent)) 4704 return false; 4705 PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other; 4706 return compareDeep(type, o.type, true) && compareDeep(role, o.role, true); 4707 } 4708 4709 @Override 4710 public boolean equalsShallow(Base other) { 4711 if (!super.equalsShallow(other)) 4712 return false; 4713 if (!(other instanceof PlanDefinitionActionParticipantComponent)) 4714 return false; 4715 PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other; 4716 return compareValues(type, o.type, true); 4717 } 4718 4719 public boolean isEmpty() { 4720 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role); 4721 } 4722 4723 public String fhirType() { 4724 return "PlanDefinition.action.participant"; 4725 4726 } 4727 4728 } 4729 4730 @Block() 4731 public static class PlanDefinitionActionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement { 4732 /** 4733 * A brief, natural language description of the intended semantics of the dynamic value. 4734 */ 4735 @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 4736 @Description(shortDefinition="Natural language description of the dynamic value", formalDefinition="A brief, natural language description of the intended semantics of the dynamic value." ) 4737 protected StringType description; 4738 4739 /** 4740 * 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. 4741 */ 4742 @Child(name = "path", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4743 @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." ) 4744 protected StringType path; 4745 4746 /** 4747 * The media type of the language for the expression. 4748 */ 4749 @Child(name = "language", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4750 @Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." ) 4751 protected StringType language; 4752 4753 /** 4754 * An expression specifying the value of the customized element. 4755 */ 4756 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4757 @Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." ) 4758 protected StringType expression; 4759 4760 private static final long serialVersionUID = 448404361L; 4761 4762 /** 4763 * Constructor 4764 */ 4765 public PlanDefinitionActionDynamicValueComponent() { 4766 super(); 4767 } 4768 4769 /** 4770 * @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 4771 */ 4772 public StringType getDescriptionElement() { 4773 if (this.description == null) 4774 if (Configuration.errorOnAutoCreate()) 4775 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.description"); 4776 else if (Configuration.doAutoCreate()) 4777 this.description = new StringType(); // bb 4778 return this.description; 4779 } 4780 4781 public boolean hasDescriptionElement() { 4782 return this.description != null && !this.description.isEmpty(); 4783 } 4784 4785 public boolean hasDescription() { 4786 return this.description != null && !this.description.isEmpty(); 4787 } 4788 4789 /** 4790 * @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 4791 */ 4792 public PlanDefinitionActionDynamicValueComponent setDescriptionElement(StringType value) { 4793 this.description = value; 4794 return this; 4795 } 4796 4797 /** 4798 * @return A brief, natural language description of the intended semantics of the dynamic value. 4799 */ 4800 public String getDescription() { 4801 return this.description == null ? null : this.description.getValue(); 4802 } 4803 4804 /** 4805 * @param value A brief, natural language description of the intended semantics of the dynamic value. 4806 */ 4807 public PlanDefinitionActionDynamicValueComponent setDescription(String value) { 4808 if (Utilities.noString(value)) 4809 this.description = null; 4810 else { 4811 if (this.description == null) 4812 this.description = new StringType(); 4813 this.description.setValue(value); 4814 } 4815 return this; 4816 } 4817 4818 /** 4819 * @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 4820 */ 4821 public StringType getPathElement() { 4822 if (this.path == null) 4823 if (Configuration.errorOnAutoCreate()) 4824 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.path"); 4825 else if (Configuration.doAutoCreate()) 4826 this.path = new StringType(); // bb 4827 return this.path; 4828 } 4829 4830 public boolean hasPathElement() { 4831 return this.path != null && !this.path.isEmpty(); 4832 } 4833 4834 public boolean hasPath() { 4835 return this.path != null && !this.path.isEmpty(); 4836 } 4837 4838 /** 4839 * @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 4840 */ 4841 public PlanDefinitionActionDynamicValueComponent setPathElement(StringType value) { 4842 this.path = value; 4843 return this; 4844 } 4845 4846 /** 4847 * @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. 4848 */ 4849 public String getPath() { 4850 return this.path == null ? null : this.path.getValue(); 4851 } 4852 4853 /** 4854 * @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. 4855 */ 4856 public PlanDefinitionActionDynamicValueComponent setPath(String value) { 4857 if (Utilities.noString(value)) 4858 this.path = null; 4859 else { 4860 if (this.path == null) 4861 this.path = new StringType(); 4862 this.path.setValue(value); 4863 } 4864 return this; 4865 } 4866 4867 /** 4868 * @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 4869 */ 4870 public StringType getLanguageElement() { 4871 if (this.language == null) 4872 if (Configuration.errorOnAutoCreate()) 4873 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.language"); 4874 else if (Configuration.doAutoCreate()) 4875 this.language = new StringType(); // bb 4876 return this.language; 4877 } 4878 4879 public boolean hasLanguageElement() { 4880 return this.language != null && !this.language.isEmpty(); 4881 } 4882 4883 public boolean hasLanguage() { 4884 return this.language != null && !this.language.isEmpty(); 4885 } 4886 4887 /** 4888 * @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 4889 */ 4890 public PlanDefinitionActionDynamicValueComponent setLanguageElement(StringType value) { 4891 this.language = value; 4892 return this; 4893 } 4894 4895 /** 4896 * @return The media type of the language for the expression. 4897 */ 4898 public String getLanguage() { 4899 return this.language == null ? null : this.language.getValue(); 4900 } 4901 4902 /** 4903 * @param value The media type of the language for the expression. 4904 */ 4905 public PlanDefinitionActionDynamicValueComponent setLanguage(String value) { 4906 if (Utilities.noString(value)) 4907 this.language = null; 4908 else { 4909 if (this.language == null) 4910 this.language = new StringType(); 4911 this.language.setValue(value); 4912 } 4913 return this; 4914 } 4915 4916 /** 4917 * @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 4918 */ 4919 public StringType getExpressionElement() { 4920 if (this.expression == null) 4921 if (Configuration.errorOnAutoCreate()) 4922 throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.expression"); 4923 else if (Configuration.doAutoCreate()) 4924 this.expression = new StringType(); // bb 4925 return this.expression; 4926 } 4927 4928 public boolean hasExpressionElement() { 4929 return this.expression != null && !this.expression.isEmpty(); 4930 } 4931 4932 public boolean hasExpression() { 4933 return this.expression != null && !this.expression.isEmpty(); 4934 } 4935 4936 /** 4937 * @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 4938 */ 4939 public PlanDefinitionActionDynamicValueComponent setExpressionElement(StringType value) { 4940 this.expression = value; 4941 return this; 4942 } 4943 4944 /** 4945 * @return An expression specifying the value of the customized element. 4946 */ 4947 public String getExpression() { 4948 return this.expression == null ? null : this.expression.getValue(); 4949 } 4950 4951 /** 4952 * @param value An expression specifying the value of the customized element. 4953 */ 4954 public PlanDefinitionActionDynamicValueComponent setExpression(String value) { 4955 if (Utilities.noString(value)) 4956 this.expression = null; 4957 else { 4958 if (this.expression == null) 4959 this.expression = new StringType(); 4960 this.expression.setValue(value); 4961 } 4962 return this; 4963 } 4964 4965 protected void listChildren(List<Property> childrenList) { 4966 super.listChildren(childrenList); 4967 childrenList.add(new Property("description", "string", "A brief, natural language description of the intended semantics of the dynamic value.", 0, java.lang.Integer.MAX_VALUE, description)); 4968 childrenList.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, java.lang.Integer.MAX_VALUE, path)); 4969 childrenList.add(new Property("language", "string", "The media type of the language for the expression.", 0, java.lang.Integer.MAX_VALUE, language)); 4970 childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); 4971 } 4972 4973 @Override 4974 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4975 switch (hash) { 4976 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 4977 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 4978 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // StringType 4979 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 4980 default: return super.getProperty(hash, name, checkValid); 4981 } 4982 4983 } 4984 4985 @Override 4986 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4987 switch (hash) { 4988 case -1724546052: // description 4989 this.description = castToString(value); // StringType 4990 return value; 4991 case 3433509: // path 4992 this.path = castToString(value); // StringType 4993 return value; 4994 case -1613589672: // language 4995 this.language = castToString(value); // StringType 4996 return value; 4997 case -1795452264: // expression 4998 this.expression = castToString(value); // StringType 4999 return value; 5000 default: return super.setProperty(hash, name, value); 5001 } 5002 5003 } 5004 5005 @Override 5006 public Base setProperty(String name, Base value) throws FHIRException { 5007 if (name.equals("description")) { 5008 this.description = castToString(value); // StringType 5009 } else if (name.equals("path")) { 5010 this.path = castToString(value); // StringType 5011 } else if (name.equals("language")) { 5012 this.language = castToString(value); // StringType 5013 } else if (name.equals("expression")) { 5014 this.expression = castToString(value); // StringType 5015 } else 5016 return super.setProperty(name, value); 5017 return value; 5018 } 5019 5020 @Override 5021 public Base makeProperty(int hash, String name) throws FHIRException { 5022 switch (hash) { 5023 case -1724546052: return getDescriptionElement(); 5024 case 3433509: return getPathElement(); 5025 case -1613589672: return getLanguageElement(); 5026 case -1795452264: return getExpressionElement(); 5027 default: return super.makeProperty(hash, name); 5028 } 5029 5030 } 5031 5032 @Override 5033 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5034 switch (hash) { 5035 case -1724546052: /*description*/ return new String[] {"string"}; 5036 case 3433509: /*path*/ return new String[] {"string"}; 5037 case -1613589672: /*language*/ return new String[] {"string"}; 5038 case -1795452264: /*expression*/ return new String[] {"string"}; 5039 default: return super.getTypesForProperty(hash, name); 5040 } 5041 5042 } 5043 5044 @Override 5045 public Base addChild(String name) throws FHIRException { 5046 if (name.equals("description")) { 5047 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 5048 } 5049 else if (name.equals("path")) { 5050 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.path"); 5051 } 5052 else if (name.equals("language")) { 5053 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.language"); 5054 } 5055 else if (name.equals("expression")) { 5056 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.expression"); 5057 } 5058 else 5059 return super.addChild(name); 5060 } 5061 5062 public PlanDefinitionActionDynamicValueComponent copy() { 5063 PlanDefinitionActionDynamicValueComponent dst = new PlanDefinitionActionDynamicValueComponent(); 5064 copyValues(dst); 5065 dst.description = description == null ? null : description.copy(); 5066 dst.path = path == null ? null : path.copy(); 5067 dst.language = language == null ? null : language.copy(); 5068 dst.expression = expression == null ? null : expression.copy(); 5069 return dst; 5070 } 5071 5072 @Override 5073 public boolean equalsDeep(Base other) { 5074 if (!super.equalsDeep(other)) 5075 return false; 5076 if (!(other instanceof PlanDefinitionActionDynamicValueComponent)) 5077 return false; 5078 PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other; 5079 return compareDeep(description, o.description, true) && compareDeep(path, o.path, true) && compareDeep(language, o.language, true) 5080 && compareDeep(expression, o.expression, true); 5081 } 5082 5083 @Override 5084 public boolean equalsShallow(Base other) { 5085 if (!super.equalsShallow(other)) 5086 return false; 5087 if (!(other instanceof PlanDefinitionActionDynamicValueComponent)) 5088 return false; 5089 PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other; 5090 return compareValues(description, o.description, true) && compareValues(path, o.path, true) && compareValues(language, o.language, true) 5091 && compareValues(expression, o.expression, true); 5092 } 5093 5094 public boolean isEmpty() { 5095 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, path, language 5096 , expression); 5097 } 5098 5099 public String fhirType() { 5100 return "PlanDefinition.action.dynamicValue"; 5101 5102 } 5103 5104 } 5105 5106 /** 5107 * 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. 5108 */ 5109 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5110 @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." ) 5111 protected List<Identifier> identifier; 5112 5113 /** 5114 * The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule. 5115 */ 5116 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 5117 @Description(shortDefinition="order-set | protocol | eca-rule", formalDefinition="The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule." ) 5118 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/plan-definition-type") 5119 protected CodeableConcept type; 5120 5121 /** 5122 * Explaination of why this plan definition is needed and why it has been designed as it has. 5123 */ 5124 @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5125 @Description(shortDefinition="Why this plan definition is defined", formalDefinition="Explaination of why this plan definition is needed and why it has been designed as it has." ) 5126 protected MarkdownType purpose; 5127 5128 /** 5129 * A detailed description of how the asset is used from a clinical perspective. 5130 */ 5131 @Child(name = "usage", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5132 @Description(shortDefinition="Describes the clinical usage of the asset", formalDefinition="A detailed description of how the asset is used from a clinical perspective." ) 5133 protected StringType usage; 5134 5135 /** 5136 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 5137 */ 5138 @Child(name = "approvalDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5139 @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." ) 5140 protected DateType approvalDate; 5141 5142 /** 5143 * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 5144 */ 5145 @Child(name = "lastReviewDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5146 @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 doesn't change the original approval date." ) 5147 protected DateType lastReviewDate; 5148 5149 /** 5150 * The period during which the plan definition content was or is planned to be in active use. 5151 */ 5152 @Child(name = "effectivePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) 5153 @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." ) 5154 protected Period effectivePeriod; 5155 5156 /** 5157 * 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. 5158 */ 5159 @Child(name = "topic", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5160 @Description(shortDefinition="E.g. Education, Treatment, Assessment, etc", 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." ) 5161 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic") 5162 protected List<CodeableConcept> topic; 5163 5164 /** 5165 * A contributor to the content of the asset, including authors, editors, reviewers, and endorsers. 5166 */ 5167 @Child(name = "contributor", type = {Contributor.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5168 @Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the asset, including authors, editors, reviewers, and endorsers." ) 5169 protected List<Contributor> contributor; 5170 5171 /** 5172 * 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. 5173 */ 5174 @Child(name = "copyright", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5175 @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." ) 5176 protected MarkdownType copyright; 5177 5178 /** 5179 * Related artifacts such as additional documentation, justification, or bibliographic references. 5180 */ 5181 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5182 @Description(shortDefinition="Related artifacts for the asset", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." ) 5183 protected List<RelatedArtifact> relatedArtifact; 5184 5185 /** 5186 * A reference to a Library resource containing any formal logic used by the plan definition. 5187 */ 5188 @Child(name = "library", type = {Library.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5189 @Description(shortDefinition="Logic used by the plan definition", formalDefinition="A reference to a Library resource containing any formal logic used by the plan definition." ) 5190 protected List<Reference> library; 5191 /** 5192 * The actual objects that are the target of the reference (A reference to a Library resource containing any formal logic used by the plan definition.) 5193 */ 5194 protected List<Library> libraryTarget; 5195 5196 5197 /** 5198 * 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. 5199 */ 5200 @Child(name = "goal", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5201 @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." ) 5202 protected List<PlanDefinitionGoalComponent> goal; 5203 5204 /** 5205 * An action to be taken as part of the plan. 5206 */ 5207 @Child(name = "action", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5208 @Description(shortDefinition="Action defined by the plan", formalDefinition="An action to be taken as part of the plan." ) 5209 protected List<PlanDefinitionActionComponent> action; 5210 5211 private static final long serialVersionUID = -1191108677L; 5212 5213 /** 5214 * Constructor 5215 */ 5216 public PlanDefinition() { 5217 super(); 5218 } 5219 5220 /** 5221 * Constructor 5222 */ 5223 public PlanDefinition(Enumeration<PublicationStatus> status) { 5224 super(); 5225 this.status = status; 5226 } 5227 5228 /** 5229 * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5230 */ 5231 public UriType getUrlElement() { 5232 if (this.url == null) 5233 if (Configuration.errorOnAutoCreate()) 5234 throw new Error("Attempt to auto-create PlanDefinition.url"); 5235 else if (Configuration.doAutoCreate()) 5236 this.url = new UriType(); // bb 5237 return this.url; 5238 } 5239 5240 public boolean hasUrlElement() { 5241 return this.url != null && !this.url.isEmpty(); 5242 } 5243 5244 public boolean hasUrl() { 5245 return this.url != null && !this.url.isEmpty(); 5246 } 5247 5248 /** 5249 * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5250 */ 5251 public PlanDefinition setUrlElement(UriType value) { 5252 this.url = value; 5253 return this; 5254 } 5255 5256 /** 5257 * @return An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions). 5258 */ 5259 public String getUrl() { 5260 return this.url == null ? null : this.url.getValue(); 5261 } 5262 5263 /** 5264 * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions). 5265 */ 5266 public PlanDefinition setUrl(String value) { 5267 if (Utilities.noString(value)) 5268 this.url = null; 5269 else { 5270 if (this.url == null) 5271 this.url = new UriType(); 5272 this.url.setValue(value); 5273 } 5274 return this; 5275 } 5276 5277 /** 5278 * @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.) 5279 */ 5280 public List<Identifier> getIdentifier() { 5281 if (this.identifier == null) 5282 this.identifier = new ArrayList<Identifier>(); 5283 return this.identifier; 5284 } 5285 5286 /** 5287 * @return Returns a reference to <code>this</code> for easy method chaining 5288 */ 5289 public PlanDefinition setIdentifier(List<Identifier> theIdentifier) { 5290 this.identifier = theIdentifier; 5291 return this; 5292 } 5293 5294 public boolean hasIdentifier() { 5295 if (this.identifier == null) 5296 return false; 5297 for (Identifier item : this.identifier) 5298 if (!item.isEmpty()) 5299 return true; 5300 return false; 5301 } 5302 5303 public Identifier addIdentifier() { //3 5304 Identifier t = new Identifier(); 5305 if (this.identifier == null) 5306 this.identifier = new ArrayList<Identifier>(); 5307 this.identifier.add(t); 5308 return t; 5309 } 5310 5311 public PlanDefinition addIdentifier(Identifier t) { //3 5312 if (t == null) 5313 return this; 5314 if (this.identifier == null) 5315 this.identifier = new ArrayList<Identifier>(); 5316 this.identifier.add(t); 5317 return this; 5318 } 5319 5320 /** 5321 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 5322 */ 5323 public Identifier getIdentifierFirstRep() { 5324 if (getIdentifier().isEmpty()) { 5325 addIdentifier(); 5326 } 5327 return getIdentifier().get(0); 5328 } 5329 5330 /** 5331 * @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 5332 */ 5333 public StringType getVersionElement() { 5334 if (this.version == null) 5335 if (Configuration.errorOnAutoCreate()) 5336 throw new Error("Attempt to auto-create PlanDefinition.version"); 5337 else if (Configuration.doAutoCreate()) 5338 this.version = new StringType(); // bb 5339 return this.version; 5340 } 5341 5342 public boolean hasVersionElement() { 5343 return this.version != null && !this.version.isEmpty(); 5344 } 5345 5346 public boolean hasVersion() { 5347 return this.version != null && !this.version.isEmpty(); 5348 } 5349 5350 /** 5351 * @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 5352 */ 5353 public PlanDefinition setVersionElement(StringType value) { 5354 this.version = value; 5355 return this; 5356 } 5357 5358 /** 5359 * @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. 5360 */ 5361 public String getVersion() { 5362 return this.version == null ? null : this.version.getValue(); 5363 } 5364 5365 /** 5366 * @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. 5367 */ 5368 public PlanDefinition setVersion(String value) { 5369 if (Utilities.noString(value)) 5370 this.version = null; 5371 else { 5372 if (this.version == null) 5373 this.version = new StringType(); 5374 this.version.setValue(value); 5375 } 5376 return this; 5377 } 5378 5379 /** 5380 * @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 5381 */ 5382 public StringType getNameElement() { 5383 if (this.name == null) 5384 if (Configuration.errorOnAutoCreate()) 5385 throw new Error("Attempt to auto-create PlanDefinition.name"); 5386 else if (Configuration.doAutoCreate()) 5387 this.name = new StringType(); // bb 5388 return this.name; 5389 } 5390 5391 public boolean hasNameElement() { 5392 return this.name != null && !this.name.isEmpty(); 5393 } 5394 5395 public boolean hasName() { 5396 return this.name != null && !this.name.isEmpty(); 5397 } 5398 5399 /** 5400 * @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 5401 */ 5402 public PlanDefinition setNameElement(StringType value) { 5403 this.name = value; 5404 return this; 5405 } 5406 5407 /** 5408 * @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. 5409 */ 5410 public String getName() { 5411 return this.name == null ? null : this.name.getValue(); 5412 } 5413 5414 /** 5415 * @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. 5416 */ 5417 public PlanDefinition setName(String value) { 5418 if (Utilities.noString(value)) 5419 this.name = null; 5420 else { 5421 if (this.name == null) 5422 this.name = new StringType(); 5423 this.name.setValue(value); 5424 } 5425 return this; 5426 } 5427 5428 /** 5429 * @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 5430 */ 5431 public StringType getTitleElement() { 5432 if (this.title == null) 5433 if (Configuration.errorOnAutoCreate()) 5434 throw new Error("Attempt to auto-create PlanDefinition.title"); 5435 else if (Configuration.doAutoCreate()) 5436 this.title = new StringType(); // bb 5437 return this.title; 5438 } 5439 5440 public boolean hasTitleElement() { 5441 return this.title != null && !this.title.isEmpty(); 5442 } 5443 5444 public boolean hasTitle() { 5445 return this.title != null && !this.title.isEmpty(); 5446 } 5447 5448 /** 5449 * @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 5450 */ 5451 public PlanDefinition setTitleElement(StringType value) { 5452 this.title = value; 5453 return this; 5454 } 5455 5456 /** 5457 * @return A short, descriptive, user-friendly title for the plan definition. 5458 */ 5459 public String getTitle() { 5460 return this.title == null ? null : this.title.getValue(); 5461 } 5462 5463 /** 5464 * @param value A short, descriptive, user-friendly title for the plan definition. 5465 */ 5466 public PlanDefinition setTitle(String value) { 5467 if (Utilities.noString(value)) 5468 this.title = null; 5469 else { 5470 if (this.title == null) 5471 this.title = new StringType(); 5472 this.title.setValue(value); 5473 } 5474 return this; 5475 } 5476 5477 /** 5478 * @return {@link #type} (The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.) 5479 */ 5480 public CodeableConcept getType() { 5481 if (this.type == null) 5482 if (Configuration.errorOnAutoCreate()) 5483 throw new Error("Attempt to auto-create PlanDefinition.type"); 5484 else if (Configuration.doAutoCreate()) 5485 this.type = new CodeableConcept(); // cc 5486 return this.type; 5487 } 5488 5489 public boolean hasType() { 5490 return this.type != null && !this.type.isEmpty(); 5491 } 5492 5493 /** 5494 * @param value {@link #type} (The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.) 5495 */ 5496 public PlanDefinition setType(CodeableConcept value) { 5497 this.type = value; 5498 return this; 5499 } 5500 5501 /** 5502 * @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 5503 */ 5504 public Enumeration<PublicationStatus> getStatusElement() { 5505 if (this.status == null) 5506 if (Configuration.errorOnAutoCreate()) 5507 throw new Error("Attempt to auto-create PlanDefinition.status"); 5508 else if (Configuration.doAutoCreate()) 5509 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 5510 return this.status; 5511 } 5512 5513 public boolean hasStatusElement() { 5514 return this.status != null && !this.status.isEmpty(); 5515 } 5516 5517 public boolean hasStatus() { 5518 return this.status != null && !this.status.isEmpty(); 5519 } 5520 5521 /** 5522 * @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 5523 */ 5524 public PlanDefinition setStatusElement(Enumeration<PublicationStatus> value) { 5525 this.status = value; 5526 return this; 5527 } 5528 5529 /** 5530 * @return The status of this plan definition. Enables tracking the life-cycle of the content. 5531 */ 5532 public PublicationStatus getStatus() { 5533 return this.status == null ? null : this.status.getValue(); 5534 } 5535 5536 /** 5537 * @param value The status of this plan definition. Enables tracking the life-cycle of the content. 5538 */ 5539 public PlanDefinition setStatus(PublicationStatus value) { 5540 if (this.status == null) 5541 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 5542 this.status.setValue(value); 5543 return this; 5544 } 5545 5546 /** 5547 * @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 5548 */ 5549 public BooleanType getExperimentalElement() { 5550 if (this.experimental == null) 5551 if (Configuration.errorOnAutoCreate()) 5552 throw new Error("Attempt to auto-create PlanDefinition.experimental"); 5553 else if (Configuration.doAutoCreate()) 5554 this.experimental = new BooleanType(); // bb 5555 return this.experimental; 5556 } 5557 5558 public boolean hasExperimentalElement() { 5559 return this.experimental != null && !this.experimental.isEmpty(); 5560 } 5561 5562 public boolean hasExperimental() { 5563 return this.experimental != null && !this.experimental.isEmpty(); 5564 } 5565 5566 /** 5567 * @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 5568 */ 5569 public PlanDefinition setExperimentalElement(BooleanType value) { 5570 this.experimental = value; 5571 return this; 5572 } 5573 5574 /** 5575 * @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. 5576 */ 5577 public boolean getExperimental() { 5578 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 5579 } 5580 5581 /** 5582 * @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. 5583 */ 5584 public PlanDefinition setExperimental(boolean value) { 5585 if (this.experimental == null) 5586 this.experimental = new BooleanType(); 5587 this.experimental.setValue(value); 5588 return this; 5589 } 5590 5591 /** 5592 * @return {@link #date} (The date (and optionally time) when the plan definition was published. The date must change if and 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 5593 */ 5594 public DateTimeType getDateElement() { 5595 if (this.date == null) 5596 if (Configuration.errorOnAutoCreate()) 5597 throw new Error("Attempt to auto-create PlanDefinition.date"); 5598 else if (Configuration.doAutoCreate()) 5599 this.date = new DateTimeType(); // bb 5600 return this.date; 5601 } 5602 5603 public boolean hasDateElement() { 5604 return this.date != null && !this.date.isEmpty(); 5605 } 5606 5607 public boolean hasDate() { 5608 return this.date != null && !this.date.isEmpty(); 5609 } 5610 5611 /** 5612 * @param value {@link #date} (The date (and optionally time) when the plan definition was published. The date must change if and 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 5613 */ 5614 public PlanDefinition setDateElement(DateTimeType value) { 5615 this.date = value; 5616 return this; 5617 } 5618 5619 /** 5620 * @return The date (and optionally time) when the plan definition was published. The date must change if and 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. 5621 */ 5622 public Date getDate() { 5623 return this.date == null ? null : this.date.getValue(); 5624 } 5625 5626 /** 5627 * @param value The date (and optionally time) when the plan definition was published. The date must change if and 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. 5628 */ 5629 public PlanDefinition setDate(Date value) { 5630 if (value == null) 5631 this.date = null; 5632 else { 5633 if (this.date == null) 5634 this.date = new DateTimeType(); 5635 this.date.setValue(value); 5636 } 5637 return this; 5638 } 5639 5640 /** 5641 * @return {@link #publisher} (The name of the individual or organization that published the plan definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 5642 */ 5643 public StringType getPublisherElement() { 5644 if (this.publisher == null) 5645 if (Configuration.errorOnAutoCreate()) 5646 throw new Error("Attempt to auto-create PlanDefinition.publisher"); 5647 else if (Configuration.doAutoCreate()) 5648 this.publisher = new StringType(); // bb 5649 return this.publisher; 5650 } 5651 5652 public boolean hasPublisherElement() { 5653 return this.publisher != null && !this.publisher.isEmpty(); 5654 } 5655 5656 public boolean hasPublisher() { 5657 return this.publisher != null && !this.publisher.isEmpty(); 5658 } 5659 5660 /** 5661 * @param value {@link #publisher} (The name of the individual or organization that published the plan definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 5662 */ 5663 public PlanDefinition setPublisherElement(StringType value) { 5664 this.publisher = value; 5665 return this; 5666 } 5667 5668 /** 5669 * @return The name of the individual or organization that published the plan definition. 5670 */ 5671 public String getPublisher() { 5672 return this.publisher == null ? null : this.publisher.getValue(); 5673 } 5674 5675 /** 5676 * @param value The name of the individual or organization that published the plan definition. 5677 */ 5678 public PlanDefinition setPublisher(String value) { 5679 if (Utilities.noString(value)) 5680 this.publisher = null; 5681 else { 5682 if (this.publisher == null) 5683 this.publisher = new StringType(); 5684 this.publisher.setValue(value); 5685 } 5686 return this; 5687 } 5688 5689 /** 5690 * @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 5691 */ 5692 public MarkdownType getDescriptionElement() { 5693 if (this.description == null) 5694 if (Configuration.errorOnAutoCreate()) 5695 throw new Error("Attempt to auto-create PlanDefinition.description"); 5696 else if (Configuration.doAutoCreate()) 5697 this.description = new MarkdownType(); // bb 5698 return this.description; 5699 } 5700 5701 public boolean hasDescriptionElement() { 5702 return this.description != null && !this.description.isEmpty(); 5703 } 5704 5705 public boolean hasDescription() { 5706 return this.description != null && !this.description.isEmpty(); 5707 } 5708 5709 /** 5710 * @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 5711 */ 5712 public PlanDefinition setDescriptionElement(MarkdownType value) { 5713 this.description = value; 5714 return this; 5715 } 5716 5717 /** 5718 * @return A free text natural language description of the plan definition from a consumer's perspective. 5719 */ 5720 public String getDescription() { 5721 return this.description == null ? null : this.description.getValue(); 5722 } 5723 5724 /** 5725 * @param value A free text natural language description of the plan definition from a consumer's perspective. 5726 */ 5727 public PlanDefinition setDescription(String value) { 5728 if (value == null) 5729 this.description = null; 5730 else { 5731 if (this.description == null) 5732 this.description = new MarkdownType(); 5733 this.description.setValue(value); 5734 } 5735 return this; 5736 } 5737 5738 /** 5739 * @return {@link #purpose} (Explaination 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 5740 */ 5741 public MarkdownType getPurposeElement() { 5742 if (this.purpose == null) 5743 if (Configuration.errorOnAutoCreate()) 5744 throw new Error("Attempt to auto-create PlanDefinition.purpose"); 5745 else if (Configuration.doAutoCreate()) 5746 this.purpose = new MarkdownType(); // bb 5747 return this.purpose; 5748 } 5749 5750 public boolean hasPurposeElement() { 5751 return this.purpose != null && !this.purpose.isEmpty(); 5752 } 5753 5754 public boolean hasPurpose() { 5755 return this.purpose != null && !this.purpose.isEmpty(); 5756 } 5757 5758 /** 5759 * @param value {@link #purpose} (Explaination 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 5760 */ 5761 public PlanDefinition setPurposeElement(MarkdownType value) { 5762 this.purpose = value; 5763 return this; 5764 } 5765 5766 /** 5767 * @return Explaination of why this plan definition is needed and why it has been designed as it has. 5768 */ 5769 public String getPurpose() { 5770 return this.purpose == null ? null : this.purpose.getValue(); 5771 } 5772 5773 /** 5774 * @param value Explaination of why this plan definition is needed and why it has been designed as it has. 5775 */ 5776 public PlanDefinition setPurpose(String value) { 5777 if (value == null) 5778 this.purpose = null; 5779 else { 5780 if (this.purpose == null) 5781 this.purpose = new MarkdownType(); 5782 this.purpose.setValue(value); 5783 } 5784 return this; 5785 } 5786 5787 /** 5788 * @return {@link #usage} (A detailed description of how the asset 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 5789 */ 5790 public StringType getUsageElement() { 5791 if (this.usage == null) 5792 if (Configuration.errorOnAutoCreate()) 5793 throw new Error("Attempt to auto-create PlanDefinition.usage"); 5794 else if (Configuration.doAutoCreate()) 5795 this.usage = new StringType(); // bb 5796 return this.usage; 5797 } 5798 5799 public boolean hasUsageElement() { 5800 return this.usage != null && !this.usage.isEmpty(); 5801 } 5802 5803 public boolean hasUsage() { 5804 return this.usage != null && !this.usage.isEmpty(); 5805 } 5806 5807 /** 5808 * @param value {@link #usage} (A detailed description of how the asset 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 5809 */ 5810 public PlanDefinition setUsageElement(StringType value) { 5811 this.usage = value; 5812 return this; 5813 } 5814 5815 /** 5816 * @return A detailed description of how the asset is used from a clinical perspective. 5817 */ 5818 public String getUsage() { 5819 return this.usage == null ? null : this.usage.getValue(); 5820 } 5821 5822 /** 5823 * @param value A detailed description of how the asset is used from a clinical perspective. 5824 */ 5825 public PlanDefinition setUsage(String value) { 5826 if (Utilities.noString(value)) 5827 this.usage = null; 5828 else { 5829 if (this.usage == null) 5830 this.usage = new StringType(); 5831 this.usage.setValue(value); 5832 } 5833 return this; 5834 } 5835 5836 /** 5837 * @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 5838 */ 5839 public DateType getApprovalDateElement() { 5840 if (this.approvalDate == null) 5841 if (Configuration.errorOnAutoCreate()) 5842 throw new Error("Attempt to auto-create PlanDefinition.approvalDate"); 5843 else if (Configuration.doAutoCreate()) 5844 this.approvalDate = new DateType(); // bb 5845 return this.approvalDate; 5846 } 5847 5848 public boolean hasApprovalDateElement() { 5849 return this.approvalDate != null && !this.approvalDate.isEmpty(); 5850 } 5851 5852 public boolean hasApprovalDate() { 5853 return this.approvalDate != null && !this.approvalDate.isEmpty(); 5854 } 5855 5856 /** 5857 * @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 5858 */ 5859 public PlanDefinition setApprovalDateElement(DateType value) { 5860 this.approvalDate = value; 5861 return this; 5862 } 5863 5864 /** 5865 * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 5866 */ 5867 public Date getApprovalDate() { 5868 return this.approvalDate == null ? null : this.approvalDate.getValue(); 5869 } 5870 5871 /** 5872 * @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. 5873 */ 5874 public PlanDefinition setApprovalDate(Date value) { 5875 if (value == null) 5876 this.approvalDate = null; 5877 else { 5878 if (this.approvalDate == null) 5879 this.approvalDate = new DateType(); 5880 this.approvalDate.setValue(value); 5881 } 5882 return this; 5883 } 5884 5885 /** 5886 * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 5887 */ 5888 public DateType getLastReviewDateElement() { 5889 if (this.lastReviewDate == null) 5890 if (Configuration.errorOnAutoCreate()) 5891 throw new Error("Attempt to auto-create PlanDefinition.lastReviewDate"); 5892 else if (Configuration.doAutoCreate()) 5893 this.lastReviewDate = new DateType(); // bb 5894 return this.lastReviewDate; 5895 } 5896 5897 public boolean hasLastReviewDateElement() { 5898 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 5899 } 5900 5901 public boolean hasLastReviewDate() { 5902 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 5903 } 5904 5905 /** 5906 * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 5907 */ 5908 public PlanDefinition setLastReviewDateElement(DateType value) { 5909 this.lastReviewDate = value; 5910 return this; 5911 } 5912 5913 /** 5914 * @return The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 5915 */ 5916 public Date getLastReviewDate() { 5917 return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); 5918 } 5919 5920 /** 5921 * @param value The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 5922 */ 5923 public PlanDefinition setLastReviewDate(Date value) { 5924 if (value == null) 5925 this.lastReviewDate = null; 5926 else { 5927 if (this.lastReviewDate == null) 5928 this.lastReviewDate = new DateType(); 5929 this.lastReviewDate.setValue(value); 5930 } 5931 return this; 5932 } 5933 5934 /** 5935 * @return {@link #effectivePeriod} (The period during which the plan definition content was or is planned to be in active use.) 5936 */ 5937 public Period getEffectivePeriod() { 5938 if (this.effectivePeriod == null) 5939 if (Configuration.errorOnAutoCreate()) 5940 throw new Error("Attempt to auto-create PlanDefinition.effectivePeriod"); 5941 else if (Configuration.doAutoCreate()) 5942 this.effectivePeriod = new Period(); // cc 5943 return this.effectivePeriod; 5944 } 5945 5946 public boolean hasEffectivePeriod() { 5947 return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); 5948 } 5949 5950 /** 5951 * @param value {@link #effectivePeriod} (The period during which the plan definition content was or is planned to be in active use.) 5952 */ 5953 public PlanDefinition setEffectivePeriod(Period value) { 5954 this.effectivePeriod = value; 5955 return this; 5956 } 5957 5958 /** 5959 * @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.) 5960 */ 5961 public List<UsageContext> getUseContext() { 5962 if (this.useContext == null) 5963 this.useContext = new ArrayList<UsageContext>(); 5964 return this.useContext; 5965 } 5966 5967 /** 5968 * @return Returns a reference to <code>this</code> for easy method chaining 5969 */ 5970 public PlanDefinition setUseContext(List<UsageContext> theUseContext) { 5971 this.useContext = theUseContext; 5972 return this; 5973 } 5974 5975 public boolean hasUseContext() { 5976 if (this.useContext == null) 5977 return false; 5978 for (UsageContext item : this.useContext) 5979 if (!item.isEmpty()) 5980 return true; 5981 return false; 5982 } 5983 5984 public UsageContext addUseContext() { //3 5985 UsageContext t = new UsageContext(); 5986 if (this.useContext == null) 5987 this.useContext = new ArrayList<UsageContext>(); 5988 this.useContext.add(t); 5989 return t; 5990 } 5991 5992 public PlanDefinition addUseContext(UsageContext t) { //3 5993 if (t == null) 5994 return this; 5995 if (this.useContext == null) 5996 this.useContext = new ArrayList<UsageContext>(); 5997 this.useContext.add(t); 5998 return this; 5999 } 6000 6001 /** 6002 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 6003 */ 6004 public UsageContext getUseContextFirstRep() { 6005 if (getUseContext().isEmpty()) { 6006 addUseContext(); 6007 } 6008 return getUseContext().get(0); 6009 } 6010 6011 /** 6012 * @return {@link #jurisdiction} (A legal or geographic region in which the plan definition is intended to be used.) 6013 */ 6014 public List<CodeableConcept> getJurisdiction() { 6015 if (this.jurisdiction == null) 6016 this.jurisdiction = new ArrayList<CodeableConcept>(); 6017 return this.jurisdiction; 6018 } 6019 6020 /** 6021 * @return Returns a reference to <code>this</code> for easy method chaining 6022 */ 6023 public PlanDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 6024 this.jurisdiction = theJurisdiction; 6025 return this; 6026 } 6027 6028 public boolean hasJurisdiction() { 6029 if (this.jurisdiction == null) 6030 return false; 6031 for (CodeableConcept item : this.jurisdiction) 6032 if (!item.isEmpty()) 6033 return true; 6034 return false; 6035 } 6036 6037 public CodeableConcept addJurisdiction() { //3 6038 CodeableConcept t = new CodeableConcept(); 6039 if (this.jurisdiction == null) 6040 this.jurisdiction = new ArrayList<CodeableConcept>(); 6041 this.jurisdiction.add(t); 6042 return t; 6043 } 6044 6045 public PlanDefinition addJurisdiction(CodeableConcept t) { //3 6046 if (t == null) 6047 return this; 6048 if (this.jurisdiction == null) 6049 this.jurisdiction = new ArrayList<CodeableConcept>(); 6050 this.jurisdiction.add(t); 6051 return this; 6052 } 6053 6054 /** 6055 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 6056 */ 6057 public CodeableConcept getJurisdictionFirstRep() { 6058 if (getJurisdiction().isEmpty()) { 6059 addJurisdiction(); 6060 } 6061 return getJurisdiction().get(0); 6062 } 6063 6064 /** 6065 * @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.) 6066 */ 6067 public List<CodeableConcept> getTopic() { 6068 if (this.topic == null) 6069 this.topic = new ArrayList<CodeableConcept>(); 6070 return this.topic; 6071 } 6072 6073 /** 6074 * @return Returns a reference to <code>this</code> for easy method chaining 6075 */ 6076 public PlanDefinition setTopic(List<CodeableConcept> theTopic) { 6077 this.topic = theTopic; 6078 return this; 6079 } 6080 6081 public boolean hasTopic() { 6082 if (this.topic == null) 6083 return false; 6084 for (CodeableConcept item : this.topic) 6085 if (!item.isEmpty()) 6086 return true; 6087 return false; 6088 } 6089 6090 public CodeableConcept addTopic() { //3 6091 CodeableConcept t = new CodeableConcept(); 6092 if (this.topic == null) 6093 this.topic = new ArrayList<CodeableConcept>(); 6094 this.topic.add(t); 6095 return t; 6096 } 6097 6098 public PlanDefinition addTopic(CodeableConcept t) { //3 6099 if (t == null) 6100 return this; 6101 if (this.topic == null) 6102 this.topic = new ArrayList<CodeableConcept>(); 6103 this.topic.add(t); 6104 return this; 6105 } 6106 6107 /** 6108 * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist 6109 */ 6110 public CodeableConcept getTopicFirstRep() { 6111 if (getTopic().isEmpty()) { 6112 addTopic(); 6113 } 6114 return getTopic().get(0); 6115 } 6116 6117 /** 6118 * @return {@link #contributor} (A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.) 6119 */ 6120 public List<Contributor> getContributor() { 6121 if (this.contributor == null) 6122 this.contributor = new ArrayList<Contributor>(); 6123 return this.contributor; 6124 } 6125 6126 /** 6127 * @return Returns a reference to <code>this</code> for easy method chaining 6128 */ 6129 public PlanDefinition setContributor(List<Contributor> theContributor) { 6130 this.contributor = theContributor; 6131 return this; 6132 } 6133 6134 public boolean hasContributor() { 6135 if (this.contributor == null) 6136 return false; 6137 for (Contributor item : this.contributor) 6138 if (!item.isEmpty()) 6139 return true; 6140 return false; 6141 } 6142 6143 public Contributor addContributor() { //3 6144 Contributor t = new Contributor(); 6145 if (this.contributor == null) 6146 this.contributor = new ArrayList<Contributor>(); 6147 this.contributor.add(t); 6148 return t; 6149 } 6150 6151 public PlanDefinition addContributor(Contributor t) { //3 6152 if (t == null) 6153 return this; 6154 if (this.contributor == null) 6155 this.contributor = new ArrayList<Contributor>(); 6156 this.contributor.add(t); 6157 return this; 6158 } 6159 6160 /** 6161 * @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist 6162 */ 6163 public Contributor getContributorFirstRep() { 6164 if (getContributor().isEmpty()) { 6165 addContributor(); 6166 } 6167 return getContributor().get(0); 6168 } 6169 6170 /** 6171 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 6172 */ 6173 public List<ContactDetail> getContact() { 6174 if (this.contact == null) 6175 this.contact = new ArrayList<ContactDetail>(); 6176 return this.contact; 6177 } 6178 6179 /** 6180 * @return Returns a reference to <code>this</code> for easy method chaining 6181 */ 6182 public PlanDefinition setContact(List<ContactDetail> theContact) { 6183 this.contact = theContact; 6184 return this; 6185 } 6186 6187 public boolean hasContact() { 6188 if (this.contact == null) 6189 return false; 6190 for (ContactDetail item : this.contact) 6191 if (!item.isEmpty()) 6192 return true; 6193 return false; 6194 } 6195 6196 public ContactDetail addContact() { //3 6197 ContactDetail t = new ContactDetail(); 6198 if (this.contact == null) 6199 this.contact = new ArrayList<ContactDetail>(); 6200 this.contact.add(t); 6201 return t; 6202 } 6203 6204 public PlanDefinition addContact(ContactDetail t) { //3 6205 if (t == null) 6206 return this; 6207 if (this.contact == null) 6208 this.contact = new ArrayList<ContactDetail>(); 6209 this.contact.add(t); 6210 return this; 6211 } 6212 6213 /** 6214 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 6215 */ 6216 public ContactDetail getContactFirstRep() { 6217 if (getContact().isEmpty()) { 6218 addContact(); 6219 } 6220 return getContact().get(0); 6221 } 6222 6223 /** 6224 * @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 6225 */ 6226 public MarkdownType getCopyrightElement() { 6227 if (this.copyright == null) 6228 if (Configuration.errorOnAutoCreate()) 6229 throw new Error("Attempt to auto-create PlanDefinition.copyright"); 6230 else if (Configuration.doAutoCreate()) 6231 this.copyright = new MarkdownType(); // bb 6232 return this.copyright; 6233 } 6234 6235 public boolean hasCopyrightElement() { 6236 return this.copyright != null && !this.copyright.isEmpty(); 6237 } 6238 6239 public boolean hasCopyright() { 6240 return this.copyright != null && !this.copyright.isEmpty(); 6241 } 6242 6243 /** 6244 * @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 6245 */ 6246 public PlanDefinition setCopyrightElement(MarkdownType value) { 6247 this.copyright = value; 6248 return this; 6249 } 6250 6251 /** 6252 * @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. 6253 */ 6254 public String getCopyright() { 6255 return this.copyright == null ? null : this.copyright.getValue(); 6256 } 6257 6258 /** 6259 * @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. 6260 */ 6261 public PlanDefinition setCopyright(String value) { 6262 if (value == null) 6263 this.copyright = null; 6264 else { 6265 if (this.copyright == null) 6266 this.copyright = new MarkdownType(); 6267 this.copyright.setValue(value); 6268 } 6269 return this; 6270 } 6271 6272 /** 6273 * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.) 6274 */ 6275 public List<RelatedArtifact> getRelatedArtifact() { 6276 if (this.relatedArtifact == null) 6277 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6278 return this.relatedArtifact; 6279 } 6280 6281 /** 6282 * @return Returns a reference to <code>this</code> for easy method chaining 6283 */ 6284 public PlanDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 6285 this.relatedArtifact = theRelatedArtifact; 6286 return this; 6287 } 6288 6289 public boolean hasRelatedArtifact() { 6290 if (this.relatedArtifact == null) 6291 return false; 6292 for (RelatedArtifact item : this.relatedArtifact) 6293 if (!item.isEmpty()) 6294 return true; 6295 return false; 6296 } 6297 6298 public RelatedArtifact addRelatedArtifact() { //3 6299 RelatedArtifact t = new RelatedArtifact(); 6300 if (this.relatedArtifact == null) 6301 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6302 this.relatedArtifact.add(t); 6303 return t; 6304 } 6305 6306 public PlanDefinition addRelatedArtifact(RelatedArtifact t) { //3 6307 if (t == null) 6308 return this; 6309 if (this.relatedArtifact == null) 6310 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 6311 this.relatedArtifact.add(t); 6312 return this; 6313 } 6314 6315 /** 6316 * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist 6317 */ 6318 public RelatedArtifact getRelatedArtifactFirstRep() { 6319 if (getRelatedArtifact().isEmpty()) { 6320 addRelatedArtifact(); 6321 } 6322 return getRelatedArtifact().get(0); 6323 } 6324 6325 /** 6326 * @return {@link #library} (A reference to a Library resource containing any formal logic used by the plan definition.) 6327 */ 6328 public List<Reference> getLibrary() { 6329 if (this.library == null) 6330 this.library = new ArrayList<Reference>(); 6331 return this.library; 6332 } 6333 6334 /** 6335 * @return Returns a reference to <code>this</code> for easy method chaining 6336 */ 6337 public PlanDefinition setLibrary(List<Reference> theLibrary) { 6338 this.library = theLibrary; 6339 return this; 6340 } 6341 6342 public boolean hasLibrary() { 6343 if (this.library == null) 6344 return false; 6345 for (Reference item : this.library) 6346 if (!item.isEmpty()) 6347 return true; 6348 return false; 6349 } 6350 6351 public Reference addLibrary() { //3 6352 Reference t = new Reference(); 6353 if (this.library == null) 6354 this.library = new ArrayList<Reference>(); 6355 this.library.add(t); 6356 return t; 6357 } 6358 6359 public PlanDefinition addLibrary(Reference t) { //3 6360 if (t == null) 6361 return this; 6362 if (this.library == null) 6363 this.library = new ArrayList<Reference>(); 6364 this.library.add(t); 6365 return this; 6366 } 6367 6368 /** 6369 * @return The first repetition of repeating field {@link #library}, creating it if it does not already exist 6370 */ 6371 public Reference getLibraryFirstRep() { 6372 if (getLibrary().isEmpty()) { 6373 addLibrary(); 6374 } 6375 return getLibrary().get(0); 6376 } 6377 6378 /** 6379 * @deprecated Use Reference#setResource(IBaseResource) instead 6380 */ 6381 @Deprecated 6382 public List<Library> getLibraryTarget() { 6383 if (this.libraryTarget == null) 6384 this.libraryTarget = new ArrayList<Library>(); 6385 return this.libraryTarget; 6386 } 6387 6388 /** 6389 * @deprecated Use Reference#setResource(IBaseResource) instead 6390 */ 6391 @Deprecated 6392 public Library addLibraryTarget() { 6393 Library r = new Library(); 6394 if (this.libraryTarget == null) 6395 this.libraryTarget = new ArrayList<Library>(); 6396 this.libraryTarget.add(r); 6397 return r; 6398 } 6399 6400 /** 6401 * @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.) 6402 */ 6403 public List<PlanDefinitionGoalComponent> getGoal() { 6404 if (this.goal == null) 6405 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6406 return this.goal; 6407 } 6408 6409 /** 6410 * @return Returns a reference to <code>this</code> for easy method chaining 6411 */ 6412 public PlanDefinition setGoal(List<PlanDefinitionGoalComponent> theGoal) { 6413 this.goal = theGoal; 6414 return this; 6415 } 6416 6417 public boolean hasGoal() { 6418 if (this.goal == null) 6419 return false; 6420 for (PlanDefinitionGoalComponent item : this.goal) 6421 if (!item.isEmpty()) 6422 return true; 6423 return false; 6424 } 6425 6426 public PlanDefinitionGoalComponent addGoal() { //3 6427 PlanDefinitionGoalComponent t = new PlanDefinitionGoalComponent(); 6428 if (this.goal == null) 6429 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6430 this.goal.add(t); 6431 return t; 6432 } 6433 6434 public PlanDefinition addGoal(PlanDefinitionGoalComponent t) { //3 6435 if (t == null) 6436 return this; 6437 if (this.goal == null) 6438 this.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6439 this.goal.add(t); 6440 return this; 6441 } 6442 6443 /** 6444 * @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist 6445 */ 6446 public PlanDefinitionGoalComponent getGoalFirstRep() { 6447 if (getGoal().isEmpty()) { 6448 addGoal(); 6449 } 6450 return getGoal().get(0); 6451 } 6452 6453 /** 6454 * @return {@link #action} (An action to be taken as part of the plan.) 6455 */ 6456 public List<PlanDefinitionActionComponent> getAction() { 6457 if (this.action == null) 6458 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6459 return this.action; 6460 } 6461 6462 /** 6463 * @return Returns a reference to <code>this</code> for easy method chaining 6464 */ 6465 public PlanDefinition setAction(List<PlanDefinitionActionComponent> theAction) { 6466 this.action = theAction; 6467 return this; 6468 } 6469 6470 public boolean hasAction() { 6471 if (this.action == null) 6472 return false; 6473 for (PlanDefinitionActionComponent item : this.action) 6474 if (!item.isEmpty()) 6475 return true; 6476 return false; 6477 } 6478 6479 public PlanDefinitionActionComponent addAction() { //3 6480 PlanDefinitionActionComponent t = new PlanDefinitionActionComponent(); 6481 if (this.action == null) 6482 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6483 this.action.add(t); 6484 return t; 6485 } 6486 6487 public PlanDefinition addAction(PlanDefinitionActionComponent t) { //3 6488 if (t == null) 6489 return this; 6490 if (this.action == null) 6491 this.action = new ArrayList<PlanDefinitionActionComponent>(); 6492 this.action.add(t); 6493 return this; 6494 } 6495 6496 /** 6497 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 6498 */ 6499 public PlanDefinitionActionComponent getActionFirstRep() { 6500 if (getAction().isEmpty()) { 6501 addAction(); 6502 } 6503 return getAction().get(0); 6504 } 6505 6506 protected void listChildren(List<Property> childrenList) { 6507 super.listChildren(childrenList); 6508 childrenList.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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, java.lang.Integer.MAX_VALUE, url)); 6509 childrenList.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)); 6510 childrenList.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, java.lang.Integer.MAX_VALUE, version)); 6511 childrenList.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, java.lang.Integer.MAX_VALUE, name)); 6512 childrenList.add(new Property("title", "string", "A short, descriptive, user-friendly title for the plan definition.", 0, java.lang.Integer.MAX_VALUE, title)); 6513 childrenList.add(new Property("type", "CodeableConcept", "The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.", 0, java.lang.Integer.MAX_VALUE, type)); 6514 childrenList.add(new Property("status", "code", "The status of this plan definition. Enables tracking the life-cycle of the content.", 0, java.lang.Integer.MAX_VALUE, status)); 6515 childrenList.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, java.lang.Integer.MAX_VALUE, experimental)); 6516 childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the plan definition was published. The date must change if and 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, java.lang.Integer.MAX_VALUE, date)); 6517 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the plan definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); 6518 childrenList.add(new Property("description", "markdown", "A free text natural language description of the plan definition from a consumer's perspective.", 0, java.lang.Integer.MAX_VALUE, description)); 6519 childrenList.add(new Property("purpose", "markdown", "Explaination of why this plan definition is needed and why it has been designed as it has.", 0, java.lang.Integer.MAX_VALUE, purpose)); 6520 childrenList.add(new Property("usage", "string", "A detailed description of how the asset is used from a clinical perspective.", 0, java.lang.Integer.MAX_VALUE, usage)); 6521 childrenList.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, java.lang.Integer.MAX_VALUE, approvalDate)); 6522 childrenList.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, java.lang.Integer.MAX_VALUE, lastReviewDate)); 6523 childrenList.add(new Property("effectivePeriod", "Period", "The period during which the plan definition content was or is planned to be in active use.", 0, java.lang.Integer.MAX_VALUE, effectivePeriod)); 6524 childrenList.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)); 6525 childrenList.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)); 6526 childrenList.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)); 6527 childrenList.add(new Property("contributor", "Contributor", "A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor)); 6528 childrenList.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)); 6529 childrenList.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, java.lang.Integer.MAX_VALUE, copyright)); 6530 childrenList.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact)); 6531 childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing any formal logic used by the plan definition.", 0, java.lang.Integer.MAX_VALUE, library)); 6532 childrenList.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)); 6533 childrenList.add(new Property("action", "", "An action to be taken as part of the plan.", 0, java.lang.Integer.MAX_VALUE, action)); 6534 } 6535 6536 @Override 6537 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6538 switch (hash) { 6539 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 6540 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 6541 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 6542 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 6543 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 6544 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 6545 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 6546 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 6547 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 6548 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 6549 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 6550 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 6551 case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType 6552 case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType 6553 case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType 6554 case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period 6555 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 6556 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 6557 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept 6558 case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // Contributor 6559 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 6560 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 6561 case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact 6562 case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // Reference 6563 case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // PlanDefinitionGoalComponent 6564 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // PlanDefinitionActionComponent 6565 default: return super.getProperty(hash, name, checkValid); 6566 } 6567 6568 } 6569 6570 @Override 6571 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6572 switch (hash) { 6573 case 116079: // url 6574 this.url = castToUri(value); // UriType 6575 return value; 6576 case -1618432855: // identifier 6577 this.getIdentifier().add(castToIdentifier(value)); // Identifier 6578 return value; 6579 case 351608024: // version 6580 this.version = castToString(value); // StringType 6581 return value; 6582 case 3373707: // name 6583 this.name = castToString(value); // StringType 6584 return value; 6585 case 110371416: // title 6586 this.title = castToString(value); // StringType 6587 return value; 6588 case 3575610: // type 6589 this.type = castToCodeableConcept(value); // CodeableConcept 6590 return value; 6591 case -892481550: // status 6592 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 6593 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 6594 return value; 6595 case -404562712: // experimental 6596 this.experimental = castToBoolean(value); // BooleanType 6597 return value; 6598 case 3076014: // date 6599 this.date = castToDateTime(value); // DateTimeType 6600 return value; 6601 case 1447404028: // publisher 6602 this.publisher = castToString(value); // StringType 6603 return value; 6604 case -1724546052: // description 6605 this.description = castToMarkdown(value); // MarkdownType 6606 return value; 6607 case -220463842: // purpose 6608 this.purpose = castToMarkdown(value); // MarkdownType 6609 return value; 6610 case 111574433: // usage 6611 this.usage = castToString(value); // StringType 6612 return value; 6613 case 223539345: // approvalDate 6614 this.approvalDate = castToDate(value); // DateType 6615 return value; 6616 case -1687512484: // lastReviewDate 6617 this.lastReviewDate = castToDate(value); // DateType 6618 return value; 6619 case -403934648: // effectivePeriod 6620 this.effectivePeriod = castToPeriod(value); // Period 6621 return value; 6622 case -669707736: // useContext 6623 this.getUseContext().add(castToUsageContext(value)); // UsageContext 6624 return value; 6625 case -507075711: // jurisdiction 6626 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 6627 return value; 6628 case 110546223: // topic 6629 this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept 6630 return value; 6631 case -1895276325: // contributor 6632 this.getContributor().add(castToContributor(value)); // Contributor 6633 return value; 6634 case 951526432: // contact 6635 this.getContact().add(castToContactDetail(value)); // ContactDetail 6636 return value; 6637 case 1522889671: // copyright 6638 this.copyright = castToMarkdown(value); // MarkdownType 6639 return value; 6640 case 666807069: // relatedArtifact 6641 this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact 6642 return value; 6643 case 166208699: // library 6644 this.getLibrary().add(castToReference(value)); // Reference 6645 return value; 6646 case 3178259: // goal 6647 this.getGoal().add((PlanDefinitionGoalComponent) value); // PlanDefinitionGoalComponent 6648 return value; 6649 case -1422950858: // action 6650 this.getAction().add((PlanDefinitionActionComponent) value); // PlanDefinitionActionComponent 6651 return value; 6652 default: return super.setProperty(hash, name, value); 6653 } 6654 6655 } 6656 6657 @Override 6658 public Base setProperty(String name, Base value) throws FHIRException { 6659 if (name.equals("url")) { 6660 this.url = castToUri(value); // UriType 6661 } else if (name.equals("identifier")) { 6662 this.getIdentifier().add(castToIdentifier(value)); 6663 } else if (name.equals("version")) { 6664 this.version = castToString(value); // StringType 6665 } else if (name.equals("name")) { 6666 this.name = castToString(value); // StringType 6667 } else if (name.equals("title")) { 6668 this.title = castToString(value); // StringType 6669 } else if (name.equals("type")) { 6670 this.type = castToCodeableConcept(value); // CodeableConcept 6671 } else if (name.equals("status")) { 6672 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 6673 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 6674 } else if (name.equals("experimental")) { 6675 this.experimental = castToBoolean(value); // BooleanType 6676 } else if (name.equals("date")) { 6677 this.date = castToDateTime(value); // DateTimeType 6678 } else if (name.equals("publisher")) { 6679 this.publisher = castToString(value); // StringType 6680 } else if (name.equals("description")) { 6681 this.description = castToMarkdown(value); // MarkdownType 6682 } else if (name.equals("purpose")) { 6683 this.purpose = castToMarkdown(value); // MarkdownType 6684 } else if (name.equals("usage")) { 6685 this.usage = castToString(value); // StringType 6686 } else if (name.equals("approvalDate")) { 6687 this.approvalDate = castToDate(value); // DateType 6688 } else if (name.equals("lastReviewDate")) { 6689 this.lastReviewDate = castToDate(value); // DateType 6690 } else if (name.equals("effectivePeriod")) { 6691 this.effectivePeriod = castToPeriod(value); // Period 6692 } else if (name.equals("useContext")) { 6693 this.getUseContext().add(castToUsageContext(value)); 6694 } else if (name.equals("jurisdiction")) { 6695 this.getJurisdiction().add(castToCodeableConcept(value)); 6696 } else if (name.equals("topic")) { 6697 this.getTopic().add(castToCodeableConcept(value)); 6698 } else if (name.equals("contributor")) { 6699 this.getContributor().add(castToContributor(value)); 6700 } else if (name.equals("contact")) { 6701 this.getContact().add(castToContactDetail(value)); 6702 } else if (name.equals("copyright")) { 6703 this.copyright = castToMarkdown(value); // MarkdownType 6704 } else if (name.equals("relatedArtifact")) { 6705 this.getRelatedArtifact().add(castToRelatedArtifact(value)); 6706 } else if (name.equals("library")) { 6707 this.getLibrary().add(castToReference(value)); 6708 } else if (name.equals("goal")) { 6709 this.getGoal().add((PlanDefinitionGoalComponent) value); 6710 } else if (name.equals("action")) { 6711 this.getAction().add((PlanDefinitionActionComponent) value); 6712 } else 6713 return super.setProperty(name, value); 6714 return value; 6715 } 6716 6717 @Override 6718 public Base makeProperty(int hash, String name) throws FHIRException { 6719 switch (hash) { 6720 case 116079: return getUrlElement(); 6721 case -1618432855: return addIdentifier(); 6722 case 351608024: return getVersionElement(); 6723 case 3373707: return getNameElement(); 6724 case 110371416: return getTitleElement(); 6725 case 3575610: return getType(); 6726 case -892481550: return getStatusElement(); 6727 case -404562712: return getExperimentalElement(); 6728 case 3076014: return getDateElement(); 6729 case 1447404028: return getPublisherElement(); 6730 case -1724546052: return getDescriptionElement(); 6731 case -220463842: return getPurposeElement(); 6732 case 111574433: return getUsageElement(); 6733 case 223539345: return getApprovalDateElement(); 6734 case -1687512484: return getLastReviewDateElement(); 6735 case -403934648: return getEffectivePeriod(); 6736 case -669707736: return addUseContext(); 6737 case -507075711: return addJurisdiction(); 6738 case 110546223: return addTopic(); 6739 case -1895276325: return addContributor(); 6740 case 951526432: return addContact(); 6741 case 1522889671: return getCopyrightElement(); 6742 case 666807069: return addRelatedArtifact(); 6743 case 166208699: return addLibrary(); 6744 case 3178259: return addGoal(); 6745 case -1422950858: return addAction(); 6746 default: return super.makeProperty(hash, name); 6747 } 6748 6749 } 6750 6751 @Override 6752 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6753 switch (hash) { 6754 case 116079: /*url*/ return new String[] {"uri"}; 6755 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 6756 case 351608024: /*version*/ return new String[] {"string"}; 6757 case 3373707: /*name*/ return new String[] {"string"}; 6758 case 110371416: /*title*/ return new String[] {"string"}; 6759 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 6760 case -892481550: /*status*/ return new String[] {"code"}; 6761 case -404562712: /*experimental*/ return new String[] {"boolean"}; 6762 case 3076014: /*date*/ return new String[] {"dateTime"}; 6763 case 1447404028: /*publisher*/ return new String[] {"string"}; 6764 case -1724546052: /*description*/ return new String[] {"markdown"}; 6765 case -220463842: /*purpose*/ return new String[] {"markdown"}; 6766 case 111574433: /*usage*/ return new String[] {"string"}; 6767 case 223539345: /*approvalDate*/ return new String[] {"date"}; 6768 case -1687512484: /*lastReviewDate*/ return new String[] {"date"}; 6769 case -403934648: /*effectivePeriod*/ return new String[] {"Period"}; 6770 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 6771 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 6772 case 110546223: /*topic*/ return new String[] {"CodeableConcept"}; 6773 case -1895276325: /*contributor*/ return new String[] {"Contributor"}; 6774 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 6775 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 6776 case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"}; 6777 case 166208699: /*library*/ return new String[] {"Reference"}; 6778 case 3178259: /*goal*/ return new String[] {}; 6779 case -1422950858: /*action*/ return new String[] {}; 6780 default: return super.getTypesForProperty(hash, name); 6781 } 6782 6783 } 6784 6785 @Override 6786 public Base addChild(String name) throws FHIRException { 6787 if (name.equals("url")) { 6788 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.url"); 6789 } 6790 else if (name.equals("identifier")) { 6791 return addIdentifier(); 6792 } 6793 else if (name.equals("version")) { 6794 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.version"); 6795 } 6796 else if (name.equals("name")) { 6797 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.name"); 6798 } 6799 else if (name.equals("title")) { 6800 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.title"); 6801 } 6802 else if (name.equals("type")) { 6803 this.type = new CodeableConcept(); 6804 return this.type; 6805 } 6806 else if (name.equals("status")) { 6807 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.status"); 6808 } 6809 else if (name.equals("experimental")) { 6810 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.experimental"); 6811 } 6812 else if (name.equals("date")) { 6813 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.date"); 6814 } 6815 else if (name.equals("publisher")) { 6816 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.publisher"); 6817 } 6818 else if (name.equals("description")) { 6819 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.description"); 6820 } 6821 else if (name.equals("purpose")) { 6822 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.purpose"); 6823 } 6824 else if (name.equals("usage")) { 6825 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.usage"); 6826 } 6827 else if (name.equals("approvalDate")) { 6828 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.approvalDate"); 6829 } 6830 else if (name.equals("lastReviewDate")) { 6831 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.lastReviewDate"); 6832 } 6833 else if (name.equals("effectivePeriod")) { 6834 this.effectivePeriod = new Period(); 6835 return this.effectivePeriod; 6836 } 6837 else if (name.equals("useContext")) { 6838 return addUseContext(); 6839 } 6840 else if (name.equals("jurisdiction")) { 6841 return addJurisdiction(); 6842 } 6843 else if (name.equals("topic")) { 6844 return addTopic(); 6845 } 6846 else if (name.equals("contributor")) { 6847 return addContributor(); 6848 } 6849 else if (name.equals("contact")) { 6850 return addContact(); 6851 } 6852 else if (name.equals("copyright")) { 6853 throw new FHIRException("Cannot call addChild on a primitive type PlanDefinition.copyright"); 6854 } 6855 else if (name.equals("relatedArtifact")) { 6856 return addRelatedArtifact(); 6857 } 6858 else if (name.equals("library")) { 6859 return addLibrary(); 6860 } 6861 else if (name.equals("goal")) { 6862 return addGoal(); 6863 } 6864 else if (name.equals("action")) { 6865 return addAction(); 6866 } 6867 else 6868 return super.addChild(name); 6869 } 6870 6871 public String fhirType() { 6872 return "PlanDefinition"; 6873 6874 } 6875 6876 public PlanDefinition copy() { 6877 PlanDefinition dst = new PlanDefinition(); 6878 copyValues(dst); 6879 dst.url = url == null ? null : url.copy(); 6880 if (identifier != null) { 6881 dst.identifier = new ArrayList<Identifier>(); 6882 for (Identifier i : identifier) 6883 dst.identifier.add(i.copy()); 6884 }; 6885 dst.version = version == null ? null : version.copy(); 6886 dst.name = name == null ? null : name.copy(); 6887 dst.title = title == null ? null : title.copy(); 6888 dst.type = type == null ? null : type.copy(); 6889 dst.status = status == null ? null : status.copy(); 6890 dst.experimental = experimental == null ? null : experimental.copy(); 6891 dst.date = date == null ? null : date.copy(); 6892 dst.publisher = publisher == null ? null : publisher.copy(); 6893 dst.description = description == null ? null : description.copy(); 6894 dst.purpose = purpose == null ? null : purpose.copy(); 6895 dst.usage = usage == null ? null : usage.copy(); 6896 dst.approvalDate = approvalDate == null ? null : approvalDate.copy(); 6897 dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); 6898 dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); 6899 if (useContext != null) { 6900 dst.useContext = new ArrayList<UsageContext>(); 6901 for (UsageContext i : useContext) 6902 dst.useContext.add(i.copy()); 6903 }; 6904 if (jurisdiction != null) { 6905 dst.jurisdiction = new ArrayList<CodeableConcept>(); 6906 for (CodeableConcept i : jurisdiction) 6907 dst.jurisdiction.add(i.copy()); 6908 }; 6909 if (topic != null) { 6910 dst.topic = new ArrayList<CodeableConcept>(); 6911 for (CodeableConcept i : topic) 6912 dst.topic.add(i.copy()); 6913 }; 6914 if (contributor != null) { 6915 dst.contributor = new ArrayList<Contributor>(); 6916 for (Contributor i : contributor) 6917 dst.contributor.add(i.copy()); 6918 }; 6919 if (contact != null) { 6920 dst.contact = new ArrayList<ContactDetail>(); 6921 for (ContactDetail i : contact) 6922 dst.contact.add(i.copy()); 6923 }; 6924 dst.copyright = copyright == null ? null : copyright.copy(); 6925 if (relatedArtifact != null) { 6926 dst.relatedArtifact = new ArrayList<RelatedArtifact>(); 6927 for (RelatedArtifact i : relatedArtifact) 6928 dst.relatedArtifact.add(i.copy()); 6929 }; 6930 if (library != null) { 6931 dst.library = new ArrayList<Reference>(); 6932 for (Reference i : library) 6933 dst.library.add(i.copy()); 6934 }; 6935 if (goal != null) { 6936 dst.goal = new ArrayList<PlanDefinitionGoalComponent>(); 6937 for (PlanDefinitionGoalComponent i : goal) 6938 dst.goal.add(i.copy()); 6939 }; 6940 if (action != null) { 6941 dst.action = new ArrayList<PlanDefinitionActionComponent>(); 6942 for (PlanDefinitionActionComponent i : action) 6943 dst.action.add(i.copy()); 6944 }; 6945 return dst; 6946 } 6947 6948 protected PlanDefinition typedCopy() { 6949 return copy(); 6950 } 6951 6952 @Override 6953 public boolean equalsDeep(Base other) { 6954 if (!super.equalsDeep(other)) 6955 return false; 6956 if (!(other instanceof PlanDefinition)) 6957 return false; 6958 PlanDefinition o = (PlanDefinition) other; 6959 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(purpose, o.purpose, true) 6960 && compareDeep(usage, o.usage, true) && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true) 6961 && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true) && compareDeep(contributor, o.contributor, true) 6962 && compareDeep(copyright, o.copyright, true) && compareDeep(relatedArtifact, o.relatedArtifact, true) 6963 && compareDeep(library, o.library, true) && compareDeep(goal, o.goal, true) && compareDeep(action, o.action, true) 6964 ; 6965 } 6966 6967 @Override 6968 public boolean equalsShallow(Base other) { 6969 if (!super.equalsShallow(other)) 6970 return false; 6971 if (!(other instanceof PlanDefinition)) 6972 return false; 6973 PlanDefinition o = (PlanDefinition) other; 6974 return compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(approvalDate, o.approvalDate, true) 6975 && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(copyright, o.copyright, true) 6976 ; 6977 } 6978 6979 public boolean isEmpty() { 6980 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, purpose 6981 , usage, approvalDate, lastReviewDate, effectivePeriod, topic, contributor, copyright 6982 , relatedArtifact, library, goal, action); 6983 } 6984 6985 @Override 6986 public ResourceType getResourceType() { 6987 return ResourceType.PlanDefinition; 6988 } 6989 6990 /** 6991 * Search parameter: <b>date</b> 6992 * <p> 6993 * Description: <b>The plan definition publication date</b><br> 6994 * Type: <b>date</b><br> 6995 * Path: <b>PlanDefinition.date</b><br> 6996 * </p> 6997 */ 6998 @SearchParamDefinition(name="date", path="PlanDefinition.date", description="The plan definition publication date", type="date" ) 6999 public static final String SP_DATE = "date"; 7000 /** 7001 * <b>Fluent Client</b> search parameter constant for <b>date</b> 7002 * <p> 7003 * Description: <b>The plan definition publication date</b><br> 7004 * Type: <b>date</b><br> 7005 * Path: <b>PlanDefinition.date</b><br> 7006 * </p> 7007 */ 7008 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 7009 7010 /** 7011 * Search parameter: <b>identifier</b> 7012 * <p> 7013 * Description: <b>External identifier for the plan definition</b><br> 7014 * Type: <b>token</b><br> 7015 * Path: <b>PlanDefinition.identifier</b><br> 7016 * </p> 7017 */ 7018 @SearchParamDefinition(name="identifier", path="PlanDefinition.identifier", description="External identifier for the plan definition", type="token" ) 7019 public static final String SP_IDENTIFIER = "identifier"; 7020 /** 7021 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 7022 * <p> 7023 * Description: <b>External identifier for the plan definition</b><br> 7024 * Type: <b>token</b><br> 7025 * Path: <b>PlanDefinition.identifier</b><br> 7026 * </p> 7027 */ 7028 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 7029 7030 /** 7031 * Search parameter: <b>successor</b> 7032 * <p> 7033 * Description: <b>What resource is being referenced</b><br> 7034 * Type: <b>reference</b><br> 7035 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7036 * </p> 7037 */ 7038 @SearchParamDefinition(name="successor", path="PlanDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference" ) 7039 public static final String SP_SUCCESSOR = "successor"; 7040 /** 7041 * <b>Fluent Client</b> search parameter constant for <b>successor</b> 7042 * <p> 7043 * Description: <b>What resource is being referenced</b><br> 7044 * Type: <b>reference</b><br> 7045 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7046 * </p> 7047 */ 7048 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR); 7049 7050/** 7051 * Constant for fluent queries to be used to add include statements. Specifies 7052 * the path value of "<b>PlanDefinition:successor</b>". 7053 */ 7054 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("PlanDefinition:successor").toLocked(); 7055 7056 /** 7057 * Search parameter: <b>jurisdiction</b> 7058 * <p> 7059 * Description: <b>Intended jurisdiction for the plan definition</b><br> 7060 * Type: <b>token</b><br> 7061 * Path: <b>PlanDefinition.jurisdiction</b><br> 7062 * </p> 7063 */ 7064 @SearchParamDefinition(name="jurisdiction", path="PlanDefinition.jurisdiction", description="Intended jurisdiction for the plan definition", type="token" ) 7065 public static final String SP_JURISDICTION = "jurisdiction"; 7066 /** 7067 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 7068 * <p> 7069 * Description: <b>Intended jurisdiction for the plan definition</b><br> 7070 * Type: <b>token</b><br> 7071 * Path: <b>PlanDefinition.jurisdiction</b><br> 7072 * </p> 7073 */ 7074 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 7075 7076 /** 7077 * Search parameter: <b>description</b> 7078 * <p> 7079 * Description: <b>The description of the plan definition</b><br> 7080 * Type: <b>string</b><br> 7081 * Path: <b>PlanDefinition.description</b><br> 7082 * </p> 7083 */ 7084 @SearchParamDefinition(name="description", path="PlanDefinition.description", description="The description of the plan definition", type="string" ) 7085 public static final String SP_DESCRIPTION = "description"; 7086 /** 7087 * <b>Fluent Client</b> search parameter constant for <b>description</b> 7088 * <p> 7089 * Description: <b>The description of the plan definition</b><br> 7090 * Type: <b>string</b><br> 7091 * Path: <b>PlanDefinition.description</b><br> 7092 * </p> 7093 */ 7094 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 7095 7096 /** 7097 * Search parameter: <b>derived-from</b> 7098 * <p> 7099 * Description: <b>What resource is being referenced</b><br> 7100 * Type: <b>reference</b><br> 7101 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7102 * </p> 7103 */ 7104 @SearchParamDefinition(name="derived-from", path="PlanDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference" ) 7105 public static final String SP_DERIVED_FROM = "derived-from"; 7106 /** 7107 * <b>Fluent Client</b> search parameter constant for <b>derived-from</b> 7108 * <p> 7109 * Description: <b>What resource is being referenced</b><br> 7110 * Type: <b>reference</b><br> 7111 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7112 * </p> 7113 */ 7114 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM); 7115 7116/** 7117 * Constant for fluent queries to be used to add include statements. Specifies 7118 * the path value of "<b>PlanDefinition:derived-from</b>". 7119 */ 7120 public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("PlanDefinition:derived-from").toLocked(); 7121 7122 /** 7123 * Search parameter: <b>predecessor</b> 7124 * <p> 7125 * Description: <b>What resource is being referenced</b><br> 7126 * Type: <b>reference</b><br> 7127 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7128 * </p> 7129 */ 7130 @SearchParamDefinition(name="predecessor", path="PlanDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference" ) 7131 public static final String SP_PREDECESSOR = "predecessor"; 7132 /** 7133 * <b>Fluent Client</b> search parameter constant for <b>predecessor</b> 7134 * <p> 7135 * Description: <b>What resource is being referenced</b><br> 7136 * Type: <b>reference</b><br> 7137 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7138 * </p> 7139 */ 7140 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR); 7141 7142/** 7143 * Constant for fluent queries to be used to add include statements. Specifies 7144 * the path value of "<b>PlanDefinition:predecessor</b>". 7145 */ 7146 public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("PlanDefinition:predecessor").toLocked(); 7147 7148 /** 7149 * Search parameter: <b>title</b> 7150 * <p> 7151 * Description: <b>The human-friendly name of the plan definition</b><br> 7152 * Type: <b>string</b><br> 7153 * Path: <b>PlanDefinition.title</b><br> 7154 * </p> 7155 */ 7156 @SearchParamDefinition(name="title", path="PlanDefinition.title", description="The human-friendly name of the plan definition", type="string" ) 7157 public static final String SP_TITLE = "title"; 7158 /** 7159 * <b>Fluent Client</b> search parameter constant for <b>title</b> 7160 * <p> 7161 * Description: <b>The human-friendly name of the plan definition</b><br> 7162 * Type: <b>string</b><br> 7163 * Path: <b>PlanDefinition.title</b><br> 7164 * </p> 7165 */ 7166 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 7167 7168 /** 7169 * Search parameter: <b>composed-of</b> 7170 * <p> 7171 * Description: <b>What resource is being referenced</b><br> 7172 * Type: <b>reference</b><br> 7173 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7174 * </p> 7175 */ 7176 @SearchParamDefinition(name="composed-of", path="PlanDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference" ) 7177 public static final String SP_COMPOSED_OF = "composed-of"; 7178 /** 7179 * <b>Fluent Client</b> search parameter constant for <b>composed-of</b> 7180 * <p> 7181 * Description: <b>What resource is being referenced</b><br> 7182 * Type: <b>reference</b><br> 7183 * Path: <b>PlanDefinition.relatedArtifact.resource</b><br> 7184 * </p> 7185 */ 7186 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF); 7187 7188/** 7189 * Constant for fluent queries to be used to add include statements. Specifies 7190 * the path value of "<b>PlanDefinition:composed-of</b>". 7191 */ 7192 public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("PlanDefinition:composed-of").toLocked(); 7193 7194 /** 7195 * Search parameter: <b>version</b> 7196 * <p> 7197 * Description: <b>The business version of the plan definition</b><br> 7198 * Type: <b>token</b><br> 7199 * Path: <b>PlanDefinition.version</b><br> 7200 * </p> 7201 */ 7202 @SearchParamDefinition(name="version", path="PlanDefinition.version", description="The business version of the plan definition", type="token" ) 7203 public static final String SP_VERSION = "version"; 7204 /** 7205 * <b>Fluent Client</b> search parameter constant for <b>version</b> 7206 * <p> 7207 * Description: <b>The business version of the plan definition</b><br> 7208 * Type: <b>token</b><br> 7209 * Path: <b>PlanDefinition.version</b><br> 7210 * </p> 7211 */ 7212 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 7213 7214 /** 7215 * Search parameter: <b>url</b> 7216 * <p> 7217 * Description: <b>The uri that identifies the plan definition</b><br> 7218 * Type: <b>uri</b><br> 7219 * Path: <b>PlanDefinition.url</b><br> 7220 * </p> 7221 */ 7222 @SearchParamDefinition(name="url", path="PlanDefinition.url", description="The uri that identifies the plan definition", type="uri" ) 7223 public static final String SP_URL = "url"; 7224 /** 7225 * <b>Fluent Client</b> search parameter constant for <b>url</b> 7226 * <p> 7227 * Description: <b>The uri that identifies the plan definition</b><br> 7228 * Type: <b>uri</b><br> 7229 * Path: <b>PlanDefinition.url</b><br> 7230 * </p> 7231 */ 7232 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 7233 7234 /** 7235 * Search parameter: <b>effective</b> 7236 * <p> 7237 * Description: <b>The time during which the plan definition is intended to be in use</b><br> 7238 * Type: <b>date</b><br> 7239 * Path: <b>PlanDefinition.effectivePeriod</b><br> 7240 * </p> 7241 */ 7242 @SearchParamDefinition(name="effective", path="PlanDefinition.effectivePeriod", description="The time during which the plan definition is intended to be in use", type="date" ) 7243 public static final String SP_EFFECTIVE = "effective"; 7244 /** 7245 * <b>Fluent Client</b> search parameter constant for <b>effective</b> 7246 * <p> 7247 * Description: <b>The time during which the plan definition is intended to be in use</b><br> 7248 * Type: <b>date</b><br> 7249 * Path: <b>PlanDefinition.effectivePeriod</b><br> 7250 * </p> 7251 */ 7252 public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE); 7253 7254 /** 7255 * Search parameter: <b>depends-on</b> 7256 * <p> 7257 * Description: <b>What resource is being referenced</b><br> 7258 * Type: <b>reference</b><br> 7259 * Path: <b>PlanDefinition.relatedArtifact.resource, PlanDefinition.library</b><br> 7260 * </p> 7261 */ 7262 @SearchParamDefinition(name="depends-on", path="PlanDefinition.relatedArtifact.where(type='depends-on').resource | PlanDefinition.library", description="What resource is being referenced", type="reference" ) 7263 public static final String SP_DEPENDS_ON = "depends-on"; 7264 /** 7265 * <b>Fluent Client</b> search parameter constant for <b>depends-on</b> 7266 * <p> 7267 * Description: <b>What resource is being referenced</b><br> 7268 * Type: <b>reference</b><br> 7269 * Path: <b>PlanDefinition.relatedArtifact.resource, PlanDefinition.library</b><br> 7270 * </p> 7271 */ 7272 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON); 7273 7274/** 7275 * Constant for fluent queries to be used to add include statements. Specifies 7276 * the path value of "<b>PlanDefinition:depends-on</b>". 7277 */ 7278 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("PlanDefinition:depends-on").toLocked(); 7279 7280 /** 7281 * Search parameter: <b>name</b> 7282 * <p> 7283 * Description: <b>Computationally friendly name of the plan definition</b><br> 7284 * Type: <b>string</b><br> 7285 * Path: <b>PlanDefinition.name</b><br> 7286 * </p> 7287 */ 7288 @SearchParamDefinition(name="name", path="PlanDefinition.name", description="Computationally friendly name of the plan definition", type="string" ) 7289 public static final String SP_NAME = "name"; 7290 /** 7291 * <b>Fluent Client</b> search parameter constant for <b>name</b> 7292 * <p> 7293 * Description: <b>Computationally friendly name of the plan definition</b><br> 7294 * Type: <b>string</b><br> 7295 * Path: <b>PlanDefinition.name</b><br> 7296 * </p> 7297 */ 7298 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 7299 7300 /** 7301 * Search parameter: <b>publisher</b> 7302 * <p> 7303 * Description: <b>Name of the publisher of the plan definition</b><br> 7304 * Type: <b>string</b><br> 7305 * Path: <b>PlanDefinition.publisher</b><br> 7306 * </p> 7307 */ 7308 @SearchParamDefinition(name="publisher", path="PlanDefinition.publisher", description="Name of the publisher of the plan definition", type="string" ) 7309 public static final String SP_PUBLISHER = "publisher"; 7310 /** 7311 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 7312 * <p> 7313 * Description: <b>Name of the publisher of the plan definition</b><br> 7314 * Type: <b>string</b><br> 7315 * Path: <b>PlanDefinition.publisher</b><br> 7316 * </p> 7317 */ 7318 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 7319 7320 /** 7321 * Search parameter: <b>topic</b> 7322 * <p> 7323 * Description: <b>Topics associated with the module</b><br> 7324 * Type: <b>token</b><br> 7325 * Path: <b>PlanDefinition.topic</b><br> 7326 * </p> 7327 */ 7328 @SearchParamDefinition(name="topic", path="PlanDefinition.topic", description="Topics associated with the module", type="token" ) 7329 public static final String SP_TOPIC = "topic"; 7330 /** 7331 * <b>Fluent Client</b> search parameter constant for <b>topic</b> 7332 * <p> 7333 * Description: <b>Topics associated with the module</b><br> 7334 * Type: <b>token</b><br> 7335 * Path: <b>PlanDefinition.topic</b><br> 7336 * </p> 7337 */ 7338 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); 7339 7340 /** 7341 * Search parameter: <b>status</b> 7342 * <p> 7343 * Description: <b>The current status of the plan definition</b><br> 7344 * Type: <b>token</b><br> 7345 * Path: <b>PlanDefinition.status</b><br> 7346 * </p> 7347 */ 7348 @SearchParamDefinition(name="status", path="PlanDefinition.status", description="The current status of the plan definition", type="token" ) 7349 public static final String SP_STATUS = "status"; 7350 /** 7351 * <b>Fluent Client</b> search parameter constant for <b>status</b> 7352 * <p> 7353 * Description: <b>The current status of the plan definition</b><br> 7354 * Type: <b>token</b><br> 7355 * Path: <b>PlanDefinition.status</b><br> 7356 * </p> 7357 */ 7358 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 7359 7360 7361} 7362