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 ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. 047 */ 048@ResourceDef(name="ProcessRequest", profile="http://hl7.org/fhir/Profile/ProcessRequest") 049public class ProcessRequest extends DomainResource { 050 051 public enum ProcessRequestStatus { 052 /** 053 * The instance is currently in-force. 054 */ 055 ACTIVE, 056 /** 057 * The instance is withdrawn, rescinded or reversed. 058 */ 059 CANCELLED, 060 /** 061 * A new instance the contents of which is not complete. 062 */ 063 DRAFT, 064 /** 065 * The instance was entered in error. 066 */ 067 ENTEREDINERROR, 068 /** 069 * added to help the parsers with the generic types 070 */ 071 NULL; 072 public static ProcessRequestStatus fromCode(String codeString) throws FHIRException { 073 if (codeString == null || "".equals(codeString)) 074 return null; 075 if ("active".equals(codeString)) 076 return ACTIVE; 077 if ("cancelled".equals(codeString)) 078 return CANCELLED; 079 if ("draft".equals(codeString)) 080 return DRAFT; 081 if ("entered-in-error".equals(codeString)) 082 return ENTEREDINERROR; 083 if (Configuration.isAcceptInvalidEnums()) 084 return null; 085 else 086 throw new FHIRException("Unknown ProcessRequestStatus code '"+codeString+"'"); 087 } 088 public String toCode() { 089 switch (this) { 090 case ACTIVE: return "active"; 091 case CANCELLED: return "cancelled"; 092 case DRAFT: return "draft"; 093 case ENTEREDINERROR: return "entered-in-error"; 094 default: return "?"; 095 } 096 } 097 public String getSystem() { 098 switch (this) { 099 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 100 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 101 case DRAFT: return "http://hl7.org/fhir/fm-status"; 102 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 103 default: return "?"; 104 } 105 } 106 public String getDefinition() { 107 switch (this) { 108 case ACTIVE: return "The instance is currently in-force."; 109 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 110 case DRAFT: return "A new instance the contents of which is not complete."; 111 case ENTEREDINERROR: return "The instance was entered in error."; 112 default: return "?"; 113 } 114 } 115 public String getDisplay() { 116 switch (this) { 117 case ACTIVE: return "Active"; 118 case CANCELLED: return "Cancelled"; 119 case DRAFT: return "Draft"; 120 case ENTEREDINERROR: return "Entered in Error"; 121 default: return "?"; 122 } 123 } 124 } 125 126 public static class ProcessRequestStatusEnumFactory implements EnumFactory<ProcessRequestStatus> { 127 public ProcessRequestStatus fromCode(String codeString) throws IllegalArgumentException { 128 if (codeString == null || "".equals(codeString)) 129 if (codeString == null || "".equals(codeString)) 130 return null; 131 if ("active".equals(codeString)) 132 return ProcessRequestStatus.ACTIVE; 133 if ("cancelled".equals(codeString)) 134 return ProcessRequestStatus.CANCELLED; 135 if ("draft".equals(codeString)) 136 return ProcessRequestStatus.DRAFT; 137 if ("entered-in-error".equals(codeString)) 138 return ProcessRequestStatus.ENTEREDINERROR; 139 throw new IllegalArgumentException("Unknown ProcessRequestStatus code '"+codeString+"'"); 140 } 141 public Enumeration<ProcessRequestStatus> fromType(Base code) throws FHIRException { 142 if (code == null) 143 return null; 144 if (code.isEmpty()) 145 return new Enumeration<ProcessRequestStatus>(this); 146 String codeString = ((PrimitiveType) code).asStringValue(); 147 if (codeString == null || "".equals(codeString)) 148 return null; 149 if ("active".equals(codeString)) 150 return new Enumeration<ProcessRequestStatus>(this, ProcessRequestStatus.ACTIVE); 151 if ("cancelled".equals(codeString)) 152 return new Enumeration<ProcessRequestStatus>(this, ProcessRequestStatus.CANCELLED); 153 if ("draft".equals(codeString)) 154 return new Enumeration<ProcessRequestStatus>(this, ProcessRequestStatus.DRAFT); 155 if ("entered-in-error".equals(codeString)) 156 return new Enumeration<ProcessRequestStatus>(this, ProcessRequestStatus.ENTEREDINERROR); 157 throw new FHIRException("Unknown ProcessRequestStatus code '"+codeString+"'"); 158 } 159 public String toCode(ProcessRequestStatus code) { 160 if (code == ProcessRequestStatus.ACTIVE) 161 return "active"; 162 if (code == ProcessRequestStatus.CANCELLED) 163 return "cancelled"; 164 if (code == ProcessRequestStatus.DRAFT) 165 return "draft"; 166 if (code == ProcessRequestStatus.ENTEREDINERROR) 167 return "entered-in-error"; 168 return "?"; 169 } 170 public String toSystem(ProcessRequestStatus code) { 171 return code.getSystem(); 172 } 173 } 174 175 public enum ActionList { 176 /** 177 * Cancel, reverse or nullify the target resource. 178 */ 179 CANCEL, 180 /** 181 * Check for previously un-read/ not-retrieved resources. 182 */ 183 POLL, 184 /** 185 * Re-process the target resource. 186 */ 187 REPROCESS, 188 /** 189 * Retrieve the processing status of the target resource. 190 */ 191 STATUS, 192 /** 193 * added to help the parsers with the generic types 194 */ 195 NULL; 196 public static ActionList fromCode(String codeString) throws FHIRException { 197 if (codeString == null || "".equals(codeString)) 198 return null; 199 if ("cancel".equals(codeString)) 200 return CANCEL; 201 if ("poll".equals(codeString)) 202 return POLL; 203 if ("reprocess".equals(codeString)) 204 return REPROCESS; 205 if ("status".equals(codeString)) 206 return STATUS; 207 if (Configuration.isAcceptInvalidEnums()) 208 return null; 209 else 210 throw new FHIRException("Unknown ActionList code '"+codeString+"'"); 211 } 212 public String toCode() { 213 switch (this) { 214 case CANCEL: return "cancel"; 215 case POLL: return "poll"; 216 case REPROCESS: return "reprocess"; 217 case STATUS: return "status"; 218 default: return "?"; 219 } 220 } 221 public String getSystem() { 222 switch (this) { 223 case CANCEL: return "http://hl7.org/fhir/actionlist"; 224 case POLL: return "http://hl7.org/fhir/actionlist"; 225 case REPROCESS: return "http://hl7.org/fhir/actionlist"; 226 case STATUS: return "http://hl7.org/fhir/actionlist"; 227 default: return "?"; 228 } 229 } 230 public String getDefinition() { 231 switch (this) { 232 case CANCEL: return "Cancel, reverse or nullify the target resource."; 233 case POLL: return "Check for previously un-read/ not-retrieved resources."; 234 case REPROCESS: return "Re-process the target resource."; 235 case STATUS: return "Retrieve the processing status of the target resource."; 236 default: return "?"; 237 } 238 } 239 public String getDisplay() { 240 switch (this) { 241 case CANCEL: return "Cancel, Reverse or Nullify"; 242 case POLL: return "Poll"; 243 case REPROCESS: return "Re-Process"; 244 case STATUS: return "Status Check"; 245 default: return "?"; 246 } 247 } 248 } 249 250 public static class ActionListEnumFactory implements EnumFactory<ActionList> { 251 public ActionList fromCode(String codeString) throws IllegalArgumentException { 252 if (codeString == null || "".equals(codeString)) 253 if (codeString == null || "".equals(codeString)) 254 return null; 255 if ("cancel".equals(codeString)) 256 return ActionList.CANCEL; 257 if ("poll".equals(codeString)) 258 return ActionList.POLL; 259 if ("reprocess".equals(codeString)) 260 return ActionList.REPROCESS; 261 if ("status".equals(codeString)) 262 return ActionList.STATUS; 263 throw new IllegalArgumentException("Unknown ActionList code '"+codeString+"'"); 264 } 265 public Enumeration<ActionList> fromType(Base code) throws FHIRException { 266 if (code == null) 267 return null; 268 if (code.isEmpty()) 269 return new Enumeration<ActionList>(this); 270 String codeString = ((PrimitiveType) code).asStringValue(); 271 if (codeString == null || "".equals(codeString)) 272 return null; 273 if ("cancel".equals(codeString)) 274 return new Enumeration<ActionList>(this, ActionList.CANCEL); 275 if ("poll".equals(codeString)) 276 return new Enumeration<ActionList>(this, ActionList.POLL); 277 if ("reprocess".equals(codeString)) 278 return new Enumeration<ActionList>(this, ActionList.REPROCESS); 279 if ("status".equals(codeString)) 280 return new Enumeration<ActionList>(this, ActionList.STATUS); 281 throw new FHIRException("Unknown ActionList code '"+codeString+"'"); 282 } 283 public String toCode(ActionList code) { 284 if (code == ActionList.CANCEL) 285 return "cancel"; 286 if (code == ActionList.POLL) 287 return "poll"; 288 if (code == ActionList.REPROCESS) 289 return "reprocess"; 290 if (code == ActionList.STATUS) 291 return "status"; 292 return "?"; 293 } 294 public String toSystem(ActionList code) { 295 return code.getSystem(); 296 } 297 } 298 299 @Block() 300 public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { 301 /** 302 * A service line number. 303 */ 304 @Child(name = "sequenceLinkId", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 305 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 306 protected IntegerType sequenceLinkId; 307 308 private static final long serialVersionUID = -1598360600L; 309 310 /** 311 * Constructor 312 */ 313 public ItemsComponent() { 314 super(); 315 } 316 317 /** 318 * Constructor 319 */ 320 public ItemsComponent(IntegerType sequenceLinkId) { 321 super(); 322 this.sequenceLinkId = sequenceLinkId; 323 } 324 325 /** 326 * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 327 */ 328 public IntegerType getSequenceLinkIdElement() { 329 if (this.sequenceLinkId == null) 330 if (Configuration.errorOnAutoCreate()) 331 throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); 332 else if (Configuration.doAutoCreate()) 333 this.sequenceLinkId = new IntegerType(); // bb 334 return this.sequenceLinkId; 335 } 336 337 public boolean hasSequenceLinkIdElement() { 338 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 339 } 340 341 public boolean hasSequenceLinkId() { 342 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 343 } 344 345 /** 346 * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 347 */ 348 public ItemsComponent setSequenceLinkIdElement(IntegerType value) { 349 this.sequenceLinkId = value; 350 return this; 351 } 352 353 /** 354 * @return A service line number. 355 */ 356 public int getSequenceLinkId() { 357 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 358 } 359 360 /** 361 * @param value A service line number. 362 */ 363 public ItemsComponent setSequenceLinkId(int value) { 364 if (this.sequenceLinkId == null) 365 this.sequenceLinkId = new IntegerType(); 366 this.sequenceLinkId.setValue(value); 367 return this; 368 } 369 370 protected void listChildren(List<Property> childrenList) { 371 super.listChildren(childrenList); 372 childrenList.add(new Property("sequenceLinkId", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); 373 } 374 375 @Override 376 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 377 switch (hash) { 378 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // IntegerType 379 default: return super.getProperty(hash, name, checkValid); 380 } 381 382 } 383 384 @Override 385 public Base setProperty(int hash, String name, Base value) throws FHIRException { 386 switch (hash) { 387 case -1422298666: // sequenceLinkId 388 this.sequenceLinkId = castToInteger(value); // IntegerType 389 return value; 390 default: return super.setProperty(hash, name, value); 391 } 392 393 } 394 395 @Override 396 public Base setProperty(String name, Base value) throws FHIRException { 397 if (name.equals("sequenceLinkId")) { 398 this.sequenceLinkId = castToInteger(value); // IntegerType 399 } else 400 return super.setProperty(name, value); 401 return value; 402 } 403 404 @Override 405 public Base makeProperty(int hash, String name) throws FHIRException { 406 switch (hash) { 407 case -1422298666: return getSequenceLinkIdElement(); 408 default: return super.makeProperty(hash, name); 409 } 410 411 } 412 413 @Override 414 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 415 switch (hash) { 416 case -1422298666: /*sequenceLinkId*/ return new String[] {"integer"}; 417 default: return super.getTypesForProperty(hash, name); 418 } 419 420 } 421 422 @Override 423 public Base addChild(String name) throws FHIRException { 424 if (name.equals("sequenceLinkId")) { 425 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.sequenceLinkId"); 426 } 427 else 428 return super.addChild(name); 429 } 430 431 public ItemsComponent copy() { 432 ItemsComponent dst = new ItemsComponent(); 433 copyValues(dst); 434 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 435 return dst; 436 } 437 438 @Override 439 public boolean equalsDeep(Base other) { 440 if (!super.equalsDeep(other)) 441 return false; 442 if (!(other instanceof ItemsComponent)) 443 return false; 444 ItemsComponent o = (ItemsComponent) other; 445 return compareDeep(sequenceLinkId, o.sequenceLinkId, true); 446 } 447 448 @Override 449 public boolean equalsShallow(Base other) { 450 if (!super.equalsShallow(other)) 451 return false; 452 if (!(other instanceof ItemsComponent)) 453 return false; 454 ItemsComponent o = (ItemsComponent) other; 455 return compareValues(sequenceLinkId, o.sequenceLinkId, true); 456 } 457 458 public boolean isEmpty() { 459 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId); 460 } 461 462 public String fhirType() { 463 return "ProcessRequest.item"; 464 465 } 466 467 } 468 469 /** 470 * The ProcessRequest business identifier. 471 */ 472 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 473 @Description(shortDefinition="Business Identifier", formalDefinition="The ProcessRequest business identifier." ) 474 protected List<Identifier> identifier; 475 476 /** 477 * The status of the resource instance. 478 */ 479 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 480 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 481 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 482 protected Enumeration<ProcessRequestStatus> status; 483 484 /** 485 * The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 486 */ 487 @Child(name = "action", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 488 @Description(shortDefinition="cancel | poll | reprocess | status", formalDefinition="The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest." ) 489 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/actionlist") 490 protected Enumeration<ActionList> action; 491 492 /** 493 * The organization which is the target of the request. 494 */ 495 @Child(name = "target", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 496 @Description(shortDefinition="Party which is the target of the request", formalDefinition="The organization which is the target of the request." ) 497 protected Reference target; 498 499 /** 500 * The actual object that is the target of the reference (The organization which is the target of the request.) 501 */ 502 protected Organization targetTarget; 503 504 /** 505 * The date when this resource was created. 506 */ 507 @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 508 @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) 509 protected DateTimeType created; 510 511 /** 512 * The practitioner who is responsible for the action specified in this request. 513 */ 514 @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=false) 515 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the action specified in this request." ) 516 protected Reference provider; 517 518 /** 519 * The actual object that is the target of the reference (The practitioner who is responsible for the action specified in this request.) 520 */ 521 protected Practitioner providerTarget; 522 523 /** 524 * The organization which is responsible for the action speccified in this request. 525 */ 526 @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) 527 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the action speccified in this request." ) 528 protected Reference organization; 529 530 /** 531 * The actual object that is the target of the reference (The organization which is responsible for the action speccified in this request.) 532 */ 533 protected Organization organizationTarget; 534 535 /** 536 * Reference of resource which is the target or subject of this action. 537 */ 538 @Child(name = "request", type = {Reference.class}, order=7, min=0, max=1, modifier=false, summary=false) 539 @Description(shortDefinition="Reference to the Request resource", formalDefinition="Reference of resource which is the target or subject of this action." ) 540 protected Reference request; 541 542 /** 543 * The actual object that is the target of the reference (Reference of resource which is the target or subject of this action.) 544 */ 545 protected Resource requestTarget; 546 547 /** 548 * Reference of a prior response to resource which is the target or subject of this action. 549 */ 550 @Child(name = "response", type = {Reference.class}, order=8, min=0, max=1, modifier=false, summary=false) 551 @Description(shortDefinition="Reference to the Response resource", formalDefinition="Reference of a prior response to resource which is the target or subject of this action." ) 552 protected Reference response; 553 554 /** 555 * The actual object that is the target of the reference (Reference of a prior response to resource which is the target or subject of this action.) 556 */ 557 protected Resource responseTarget; 558 559 /** 560 * If true remove all history excluding audit. 561 */ 562 @Child(name = "nullify", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 563 @Description(shortDefinition="Remove history", formalDefinition="If true remove all history excluding audit." ) 564 protected BooleanType nullify; 565 566 /** 567 * A reference to supply which authenticates the process. 568 */ 569 @Child(name = "reference", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 570 @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticates the process." ) 571 protected StringType reference; 572 573 /** 574 * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. 575 */ 576 @Child(name = "item", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 577 @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) 578 protected List<ItemsComponent> item; 579 580 /** 581 * Names of resource types to include. 582 */ 583 @Child(name = "include", type = {StringType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 584 @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) 585 protected List<StringType> include; 586 587 /** 588 * Names of resource types to exclude. 589 */ 590 @Child(name = "exclude", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 591 @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) 592 protected List<StringType> exclude; 593 594 /** 595 * A period of time during which the fulfilling resources would have been created. 596 */ 597 @Child(name = "period", type = {Period.class}, order=14, min=0, max=1, modifier=false, summary=false) 598 @Description(shortDefinition="Selection period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) 599 protected Period period; 600 601 private static final long serialVersionUID = -346692020L; 602 603 /** 604 * Constructor 605 */ 606 public ProcessRequest() { 607 super(); 608 } 609 610 /** 611 * @return {@link #identifier} (The ProcessRequest business identifier.) 612 */ 613 public List<Identifier> getIdentifier() { 614 if (this.identifier == null) 615 this.identifier = new ArrayList<Identifier>(); 616 return this.identifier; 617 } 618 619 /** 620 * @return Returns a reference to <code>this</code> for easy method chaining 621 */ 622 public ProcessRequest setIdentifier(List<Identifier> theIdentifier) { 623 this.identifier = theIdentifier; 624 return this; 625 } 626 627 public boolean hasIdentifier() { 628 if (this.identifier == null) 629 return false; 630 for (Identifier item : this.identifier) 631 if (!item.isEmpty()) 632 return true; 633 return false; 634 } 635 636 public Identifier addIdentifier() { //3 637 Identifier t = new Identifier(); 638 if (this.identifier == null) 639 this.identifier = new ArrayList<Identifier>(); 640 this.identifier.add(t); 641 return t; 642 } 643 644 public ProcessRequest addIdentifier(Identifier t) { //3 645 if (t == null) 646 return this; 647 if (this.identifier == null) 648 this.identifier = new ArrayList<Identifier>(); 649 this.identifier.add(t); 650 return this; 651 } 652 653 /** 654 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 655 */ 656 public Identifier getIdentifierFirstRep() { 657 if (getIdentifier().isEmpty()) { 658 addIdentifier(); 659 } 660 return getIdentifier().get(0); 661 } 662 663 /** 664 * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 665 */ 666 public Enumeration<ProcessRequestStatus> getStatusElement() { 667 if (this.status == null) 668 if (Configuration.errorOnAutoCreate()) 669 throw new Error("Attempt to auto-create ProcessRequest.status"); 670 else if (Configuration.doAutoCreate()) 671 this.status = new Enumeration<ProcessRequestStatus>(new ProcessRequestStatusEnumFactory()); // bb 672 return this.status; 673 } 674 675 public boolean hasStatusElement() { 676 return this.status != null && !this.status.isEmpty(); 677 } 678 679 public boolean hasStatus() { 680 return this.status != null && !this.status.isEmpty(); 681 } 682 683 /** 684 * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 685 */ 686 public ProcessRequest setStatusElement(Enumeration<ProcessRequestStatus> value) { 687 this.status = value; 688 return this; 689 } 690 691 /** 692 * @return The status of the resource instance. 693 */ 694 public ProcessRequestStatus getStatus() { 695 return this.status == null ? null : this.status.getValue(); 696 } 697 698 /** 699 * @param value The status of the resource instance. 700 */ 701 public ProcessRequest setStatus(ProcessRequestStatus value) { 702 if (value == null) 703 this.status = null; 704 else { 705 if (this.status == null) 706 this.status = new Enumeration<ProcessRequestStatus>(new ProcessRequestStatusEnumFactory()); 707 this.status.setValue(value); 708 } 709 return this; 710 } 711 712 /** 713 * @return {@link #action} (The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value 714 */ 715 public Enumeration<ActionList> getActionElement() { 716 if (this.action == null) 717 if (Configuration.errorOnAutoCreate()) 718 throw new Error("Attempt to auto-create ProcessRequest.action"); 719 else if (Configuration.doAutoCreate()) 720 this.action = new Enumeration<ActionList>(new ActionListEnumFactory()); // bb 721 return this.action; 722 } 723 724 public boolean hasActionElement() { 725 return this.action != null && !this.action.isEmpty(); 726 } 727 728 public boolean hasAction() { 729 return this.action != null && !this.action.isEmpty(); 730 } 731 732 /** 733 * @param value {@link #action} (The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value 734 */ 735 public ProcessRequest setActionElement(Enumeration<ActionList> value) { 736 this.action = value; 737 return this; 738 } 739 740 /** 741 * @return The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 742 */ 743 public ActionList getAction() { 744 return this.action == null ? null : this.action.getValue(); 745 } 746 747 /** 748 * @param value The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 749 */ 750 public ProcessRequest setAction(ActionList value) { 751 if (value == null) 752 this.action = null; 753 else { 754 if (this.action == null) 755 this.action = new Enumeration<ActionList>(new ActionListEnumFactory()); 756 this.action.setValue(value); 757 } 758 return this; 759 } 760 761 /** 762 * @return {@link #target} (The organization which is the target of the request.) 763 */ 764 public Reference getTarget() { 765 if (this.target == null) 766 if (Configuration.errorOnAutoCreate()) 767 throw new Error("Attempt to auto-create ProcessRequest.target"); 768 else if (Configuration.doAutoCreate()) 769 this.target = new Reference(); // cc 770 return this.target; 771 } 772 773 public boolean hasTarget() { 774 return this.target != null && !this.target.isEmpty(); 775 } 776 777 /** 778 * @param value {@link #target} (The organization which is the target of the request.) 779 */ 780 public ProcessRequest setTarget(Reference value) { 781 this.target = value; 782 return this; 783 } 784 785 /** 786 * @return {@link #target} 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. (The organization which is the target of the request.) 787 */ 788 public Organization getTargetTarget() { 789 if (this.targetTarget == null) 790 if (Configuration.errorOnAutoCreate()) 791 throw new Error("Attempt to auto-create ProcessRequest.target"); 792 else if (Configuration.doAutoCreate()) 793 this.targetTarget = new Organization(); // aa 794 return this.targetTarget; 795 } 796 797 /** 798 * @param value {@link #target} 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. (The organization which is the target of the request.) 799 */ 800 public ProcessRequest setTargetTarget(Organization value) { 801 this.targetTarget = value; 802 return this; 803 } 804 805 /** 806 * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 807 */ 808 public DateTimeType getCreatedElement() { 809 if (this.created == null) 810 if (Configuration.errorOnAutoCreate()) 811 throw new Error("Attempt to auto-create ProcessRequest.created"); 812 else if (Configuration.doAutoCreate()) 813 this.created = new DateTimeType(); // bb 814 return this.created; 815 } 816 817 public boolean hasCreatedElement() { 818 return this.created != null && !this.created.isEmpty(); 819 } 820 821 public boolean hasCreated() { 822 return this.created != null && !this.created.isEmpty(); 823 } 824 825 /** 826 * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 827 */ 828 public ProcessRequest setCreatedElement(DateTimeType value) { 829 this.created = value; 830 return this; 831 } 832 833 /** 834 * @return The date when this resource was created. 835 */ 836 public Date getCreated() { 837 return this.created == null ? null : this.created.getValue(); 838 } 839 840 /** 841 * @param value The date when this resource was created. 842 */ 843 public ProcessRequest setCreated(Date value) { 844 if (value == null) 845 this.created = null; 846 else { 847 if (this.created == null) 848 this.created = new DateTimeType(); 849 this.created.setValue(value); 850 } 851 return this; 852 } 853 854 /** 855 * @return {@link #provider} (The practitioner who is responsible for the action specified in this request.) 856 */ 857 public Reference getProvider() { 858 if (this.provider == null) 859 if (Configuration.errorOnAutoCreate()) 860 throw new Error("Attempt to auto-create ProcessRequest.provider"); 861 else if (Configuration.doAutoCreate()) 862 this.provider = new Reference(); // cc 863 return this.provider; 864 } 865 866 public boolean hasProvider() { 867 return this.provider != null && !this.provider.isEmpty(); 868 } 869 870 /** 871 * @param value {@link #provider} (The practitioner who is responsible for the action specified in this request.) 872 */ 873 public ProcessRequest setProvider(Reference value) { 874 this.provider = value; 875 return this; 876 } 877 878 /** 879 * @return {@link #provider} 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. (The practitioner who is responsible for the action specified in this request.) 880 */ 881 public Practitioner getProviderTarget() { 882 if (this.providerTarget == null) 883 if (Configuration.errorOnAutoCreate()) 884 throw new Error("Attempt to auto-create ProcessRequest.provider"); 885 else if (Configuration.doAutoCreate()) 886 this.providerTarget = new Practitioner(); // aa 887 return this.providerTarget; 888 } 889 890 /** 891 * @param value {@link #provider} 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. (The practitioner who is responsible for the action specified in this request.) 892 */ 893 public ProcessRequest setProviderTarget(Practitioner value) { 894 this.providerTarget = value; 895 return this; 896 } 897 898 /** 899 * @return {@link #organization} (The organization which is responsible for the action speccified in this request.) 900 */ 901 public Reference getOrganization() { 902 if (this.organization == null) 903 if (Configuration.errorOnAutoCreate()) 904 throw new Error("Attempt to auto-create ProcessRequest.organization"); 905 else if (Configuration.doAutoCreate()) 906 this.organization = new Reference(); // cc 907 return this.organization; 908 } 909 910 public boolean hasOrganization() { 911 return this.organization != null && !this.organization.isEmpty(); 912 } 913 914 /** 915 * @param value {@link #organization} (The organization which is responsible for the action speccified in this request.) 916 */ 917 public ProcessRequest setOrganization(Reference value) { 918 this.organization = value; 919 return this; 920 } 921 922 /** 923 * @return {@link #organization} 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. (The organization which is responsible for the action speccified in this request.) 924 */ 925 public Organization getOrganizationTarget() { 926 if (this.organizationTarget == null) 927 if (Configuration.errorOnAutoCreate()) 928 throw new Error("Attempt to auto-create ProcessRequest.organization"); 929 else if (Configuration.doAutoCreate()) 930 this.organizationTarget = new Organization(); // aa 931 return this.organizationTarget; 932 } 933 934 /** 935 * @param value {@link #organization} 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. (The organization which is responsible for the action speccified in this request.) 936 */ 937 public ProcessRequest setOrganizationTarget(Organization value) { 938 this.organizationTarget = value; 939 return this; 940 } 941 942 /** 943 * @return {@link #request} (Reference of resource which is the target or subject of this action.) 944 */ 945 public Reference getRequest() { 946 if (this.request == null) 947 if (Configuration.errorOnAutoCreate()) 948 throw new Error("Attempt to auto-create ProcessRequest.request"); 949 else if (Configuration.doAutoCreate()) 950 this.request = new Reference(); // cc 951 return this.request; 952 } 953 954 public boolean hasRequest() { 955 return this.request != null && !this.request.isEmpty(); 956 } 957 958 /** 959 * @param value {@link #request} (Reference of resource which is the target or subject of this action.) 960 */ 961 public ProcessRequest setRequest(Reference value) { 962 this.request = value; 963 return this; 964 } 965 966 /** 967 * @return {@link #request} 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. (Reference of resource which is the target or subject of this action.) 968 */ 969 public Resource getRequestTarget() { 970 return this.requestTarget; 971 } 972 973 /** 974 * @param value {@link #request} 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. (Reference of resource which is the target or subject of this action.) 975 */ 976 public ProcessRequest setRequestTarget(Resource value) { 977 this.requestTarget = value; 978 return this; 979 } 980 981 /** 982 * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 983 */ 984 public Reference getResponse() { 985 if (this.response == null) 986 if (Configuration.errorOnAutoCreate()) 987 throw new Error("Attempt to auto-create ProcessRequest.response"); 988 else if (Configuration.doAutoCreate()) 989 this.response = new Reference(); // cc 990 return this.response; 991 } 992 993 public boolean hasResponse() { 994 return this.response != null && !this.response.isEmpty(); 995 } 996 997 /** 998 * @param value {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 999 */ 1000 public ProcessRequest setResponse(Reference value) { 1001 this.response = value; 1002 return this; 1003 } 1004 1005 /** 1006 * @return {@link #response} 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. (Reference of a prior response to resource which is the target or subject of this action.) 1007 */ 1008 public Resource getResponseTarget() { 1009 return this.responseTarget; 1010 } 1011 1012 /** 1013 * @param value {@link #response} 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. (Reference of a prior response to resource which is the target or subject of this action.) 1014 */ 1015 public ProcessRequest setResponseTarget(Resource value) { 1016 this.responseTarget = value; 1017 return this; 1018 } 1019 1020 /** 1021 * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value 1022 */ 1023 public BooleanType getNullifyElement() { 1024 if (this.nullify == null) 1025 if (Configuration.errorOnAutoCreate()) 1026 throw new Error("Attempt to auto-create ProcessRequest.nullify"); 1027 else if (Configuration.doAutoCreate()) 1028 this.nullify = new BooleanType(); // bb 1029 return this.nullify; 1030 } 1031 1032 public boolean hasNullifyElement() { 1033 return this.nullify != null && !this.nullify.isEmpty(); 1034 } 1035 1036 public boolean hasNullify() { 1037 return this.nullify != null && !this.nullify.isEmpty(); 1038 } 1039 1040 /** 1041 * @param value {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value 1042 */ 1043 public ProcessRequest setNullifyElement(BooleanType value) { 1044 this.nullify = value; 1045 return this; 1046 } 1047 1048 /** 1049 * @return If true remove all history excluding audit. 1050 */ 1051 public boolean getNullify() { 1052 return this.nullify == null || this.nullify.isEmpty() ? false : this.nullify.getValue(); 1053 } 1054 1055 /** 1056 * @param value If true remove all history excluding audit. 1057 */ 1058 public ProcessRequest setNullify(boolean value) { 1059 if (this.nullify == null) 1060 this.nullify = new BooleanType(); 1061 this.nullify.setValue(value); 1062 return this; 1063 } 1064 1065 /** 1066 * @return {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value 1067 */ 1068 public StringType getReferenceElement() { 1069 if (this.reference == null) 1070 if (Configuration.errorOnAutoCreate()) 1071 throw new Error("Attempt to auto-create ProcessRequest.reference"); 1072 else if (Configuration.doAutoCreate()) 1073 this.reference = new StringType(); // bb 1074 return this.reference; 1075 } 1076 1077 public boolean hasReferenceElement() { 1078 return this.reference != null && !this.reference.isEmpty(); 1079 } 1080 1081 public boolean hasReference() { 1082 return this.reference != null && !this.reference.isEmpty(); 1083 } 1084 1085 /** 1086 * @param value {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value 1087 */ 1088 public ProcessRequest setReferenceElement(StringType value) { 1089 this.reference = value; 1090 return this; 1091 } 1092 1093 /** 1094 * @return A reference to supply which authenticates the process. 1095 */ 1096 public String getReference() { 1097 return this.reference == null ? null : this.reference.getValue(); 1098 } 1099 1100 /** 1101 * @param value A reference to supply which authenticates the process. 1102 */ 1103 public ProcessRequest setReference(String value) { 1104 if (Utilities.noString(value)) 1105 this.reference = null; 1106 else { 1107 if (this.reference == null) 1108 this.reference = new StringType(); 1109 this.reference.setValue(value); 1110 } 1111 return this; 1112 } 1113 1114 /** 1115 * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) 1116 */ 1117 public List<ItemsComponent> getItem() { 1118 if (this.item == null) 1119 this.item = new ArrayList<ItemsComponent>(); 1120 return this.item; 1121 } 1122 1123 /** 1124 * @return Returns a reference to <code>this</code> for easy method chaining 1125 */ 1126 public ProcessRequest setItem(List<ItemsComponent> theItem) { 1127 this.item = theItem; 1128 return this; 1129 } 1130 1131 public boolean hasItem() { 1132 if (this.item == null) 1133 return false; 1134 for (ItemsComponent item : this.item) 1135 if (!item.isEmpty()) 1136 return true; 1137 return false; 1138 } 1139 1140 public ItemsComponent addItem() { //3 1141 ItemsComponent t = new ItemsComponent(); 1142 if (this.item == null) 1143 this.item = new ArrayList<ItemsComponent>(); 1144 this.item.add(t); 1145 return t; 1146 } 1147 1148 public ProcessRequest addItem(ItemsComponent t) { //3 1149 if (t == null) 1150 return this; 1151 if (this.item == null) 1152 this.item = new ArrayList<ItemsComponent>(); 1153 this.item.add(t); 1154 return this; 1155 } 1156 1157 /** 1158 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 1159 */ 1160 public ItemsComponent getItemFirstRep() { 1161 if (getItem().isEmpty()) { 1162 addItem(); 1163 } 1164 return getItem().get(0); 1165 } 1166 1167 /** 1168 * @return {@link #include} (Names of resource types to include.) 1169 */ 1170 public List<StringType> getInclude() { 1171 if (this.include == null) 1172 this.include = new ArrayList<StringType>(); 1173 return this.include; 1174 } 1175 1176 /** 1177 * @return Returns a reference to <code>this</code> for easy method chaining 1178 */ 1179 public ProcessRequest setInclude(List<StringType> theInclude) { 1180 this.include = theInclude; 1181 return this; 1182 } 1183 1184 public boolean hasInclude() { 1185 if (this.include == null) 1186 return false; 1187 for (StringType item : this.include) 1188 if (!item.isEmpty()) 1189 return true; 1190 return false; 1191 } 1192 1193 /** 1194 * @return {@link #include} (Names of resource types to include.) 1195 */ 1196 public StringType addIncludeElement() {//2 1197 StringType t = new StringType(); 1198 if (this.include == null) 1199 this.include = new ArrayList<StringType>(); 1200 this.include.add(t); 1201 return t; 1202 } 1203 1204 /** 1205 * @param value {@link #include} (Names of resource types to include.) 1206 */ 1207 public ProcessRequest addInclude(String value) { //1 1208 StringType t = new StringType(); 1209 t.setValue(value); 1210 if (this.include == null) 1211 this.include = new ArrayList<StringType>(); 1212 this.include.add(t); 1213 return this; 1214 } 1215 1216 /** 1217 * @param value {@link #include} (Names of resource types to include.) 1218 */ 1219 public boolean hasInclude(String value) { 1220 if (this.include == null) 1221 return false; 1222 for (StringType v : this.include) 1223 if (v.equals(value)) // string 1224 return true; 1225 return false; 1226 } 1227 1228 /** 1229 * @return {@link #exclude} (Names of resource types to exclude.) 1230 */ 1231 public List<StringType> getExclude() { 1232 if (this.exclude == null) 1233 this.exclude = new ArrayList<StringType>(); 1234 return this.exclude; 1235 } 1236 1237 /** 1238 * @return Returns a reference to <code>this</code> for easy method chaining 1239 */ 1240 public ProcessRequest setExclude(List<StringType> theExclude) { 1241 this.exclude = theExclude; 1242 return this; 1243 } 1244 1245 public boolean hasExclude() { 1246 if (this.exclude == null) 1247 return false; 1248 for (StringType item : this.exclude) 1249 if (!item.isEmpty()) 1250 return true; 1251 return false; 1252 } 1253 1254 /** 1255 * @return {@link #exclude} (Names of resource types to exclude.) 1256 */ 1257 public StringType addExcludeElement() {//2 1258 StringType t = new StringType(); 1259 if (this.exclude == null) 1260 this.exclude = new ArrayList<StringType>(); 1261 this.exclude.add(t); 1262 return t; 1263 } 1264 1265 /** 1266 * @param value {@link #exclude} (Names of resource types to exclude.) 1267 */ 1268 public ProcessRequest addExclude(String value) { //1 1269 StringType t = new StringType(); 1270 t.setValue(value); 1271 if (this.exclude == null) 1272 this.exclude = new ArrayList<StringType>(); 1273 this.exclude.add(t); 1274 return this; 1275 } 1276 1277 /** 1278 * @param value {@link #exclude} (Names of resource types to exclude.) 1279 */ 1280 public boolean hasExclude(String value) { 1281 if (this.exclude == null) 1282 return false; 1283 for (StringType v : this.exclude) 1284 if (v.equals(value)) // string 1285 return true; 1286 return false; 1287 } 1288 1289 /** 1290 * @return {@link #period} (A period of time during which the fulfilling resources would have been created.) 1291 */ 1292 public Period getPeriod() { 1293 if (this.period == null) 1294 if (Configuration.errorOnAutoCreate()) 1295 throw new Error("Attempt to auto-create ProcessRequest.period"); 1296 else if (Configuration.doAutoCreate()) 1297 this.period = new Period(); // cc 1298 return this.period; 1299 } 1300 1301 public boolean hasPeriod() { 1302 return this.period != null && !this.period.isEmpty(); 1303 } 1304 1305 /** 1306 * @param value {@link #period} (A period of time during which the fulfilling resources would have been created.) 1307 */ 1308 public ProcessRequest setPeriod(Period value) { 1309 this.period = value; 1310 return this; 1311 } 1312 1313 protected void listChildren(List<Property> childrenList) { 1314 super.listChildren(childrenList); 1315 childrenList.add(new Property("identifier", "Identifier", "The ProcessRequest business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1316 childrenList.add(new Property("status", "code", "The status of the resource instance.", 0, java.lang.Integer.MAX_VALUE, status)); 1317 childrenList.add(new Property("action", "code", "The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.", 0, java.lang.Integer.MAX_VALUE, action)); 1318 childrenList.add(new Property("target", "Reference(Organization)", "The organization which is the target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); 1319 childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); 1320 childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the action specified in this request.", 0, java.lang.Integer.MAX_VALUE, provider)); 1321 childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the action speccified in this request.", 0, java.lang.Integer.MAX_VALUE, organization)); 1322 childrenList.add(new Property("request", "Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); 1323 childrenList.add(new Property("response", "Reference(Any)", "Reference of a prior response to resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, response)); 1324 childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); 1325 childrenList.add(new Property("reference", "string", "A reference to supply which authenticates the process.", 0, java.lang.Integer.MAX_VALUE, reference)); 1326 childrenList.add(new Property("item", "", "List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.", 0, java.lang.Integer.MAX_VALUE, item)); 1327 childrenList.add(new Property("include", "string", "Names of resource types to include.", 0, java.lang.Integer.MAX_VALUE, include)); 1328 childrenList.add(new Property("exclude", "string", "Names of resource types to exclude.", 0, java.lang.Integer.MAX_VALUE, exclude)); 1329 childrenList.add(new Property("period", "Period", "A period of time during which the fulfilling resources would have been created.", 0, java.lang.Integer.MAX_VALUE, period)); 1330 } 1331 1332 @Override 1333 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1334 switch (hash) { 1335 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1336 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ProcessRequestStatus> 1337 case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // Enumeration<ActionList> 1338 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference 1339 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 1340 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference 1341 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference 1342 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 1343 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Reference 1344 case -2001137643: /*nullify*/ return this.nullify == null ? new Base[0] : new Base[] {this.nullify}; // BooleanType 1345 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType 1346 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemsComponent 1347 case 1942574248: /*include*/ return this.include == null ? new Base[0] : this.include.toArray(new Base[this.include.size()]); // StringType 1348 case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : this.exclude.toArray(new Base[this.exclude.size()]); // StringType 1349 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1350 default: return super.getProperty(hash, name, checkValid); 1351 } 1352 1353 } 1354 1355 @Override 1356 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1357 switch (hash) { 1358 case -1618432855: // identifier 1359 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1360 return value; 1361 case -892481550: // status 1362 value = new ProcessRequestStatusEnumFactory().fromType(castToCode(value)); 1363 this.status = (Enumeration) value; // Enumeration<ProcessRequestStatus> 1364 return value; 1365 case -1422950858: // action 1366 value = new ActionListEnumFactory().fromType(castToCode(value)); 1367 this.action = (Enumeration) value; // Enumeration<ActionList> 1368 return value; 1369 case -880905839: // target 1370 this.target = castToReference(value); // Reference 1371 return value; 1372 case 1028554472: // created 1373 this.created = castToDateTime(value); // DateTimeType 1374 return value; 1375 case -987494927: // provider 1376 this.provider = castToReference(value); // Reference 1377 return value; 1378 case 1178922291: // organization 1379 this.organization = castToReference(value); // Reference 1380 return value; 1381 case 1095692943: // request 1382 this.request = castToReference(value); // Reference 1383 return value; 1384 case -340323263: // response 1385 this.response = castToReference(value); // Reference 1386 return value; 1387 case -2001137643: // nullify 1388 this.nullify = castToBoolean(value); // BooleanType 1389 return value; 1390 case -925155509: // reference 1391 this.reference = castToString(value); // StringType 1392 return value; 1393 case 3242771: // item 1394 this.getItem().add((ItemsComponent) value); // ItemsComponent 1395 return value; 1396 case 1942574248: // include 1397 this.getInclude().add(castToString(value)); // StringType 1398 return value; 1399 case -1321148966: // exclude 1400 this.getExclude().add(castToString(value)); // StringType 1401 return value; 1402 case -991726143: // period 1403 this.period = castToPeriod(value); // Period 1404 return value; 1405 default: return super.setProperty(hash, name, value); 1406 } 1407 1408 } 1409 1410 @Override 1411 public Base setProperty(String name, Base value) throws FHIRException { 1412 if (name.equals("identifier")) { 1413 this.getIdentifier().add(castToIdentifier(value)); 1414 } else if (name.equals("status")) { 1415 value = new ProcessRequestStatusEnumFactory().fromType(castToCode(value)); 1416 this.status = (Enumeration) value; // Enumeration<ProcessRequestStatus> 1417 } else if (name.equals("action")) { 1418 value = new ActionListEnumFactory().fromType(castToCode(value)); 1419 this.action = (Enumeration) value; // Enumeration<ActionList> 1420 } else if (name.equals("target")) { 1421 this.target = castToReference(value); // Reference 1422 } else if (name.equals("created")) { 1423 this.created = castToDateTime(value); // DateTimeType 1424 } else if (name.equals("provider")) { 1425 this.provider = castToReference(value); // Reference 1426 } else if (name.equals("organization")) { 1427 this.organization = castToReference(value); // Reference 1428 } else if (name.equals("request")) { 1429 this.request = castToReference(value); // Reference 1430 } else if (name.equals("response")) { 1431 this.response = castToReference(value); // Reference 1432 } else if (name.equals("nullify")) { 1433 this.nullify = castToBoolean(value); // BooleanType 1434 } else if (name.equals("reference")) { 1435 this.reference = castToString(value); // StringType 1436 } else if (name.equals("item")) { 1437 this.getItem().add((ItemsComponent) value); 1438 } else if (name.equals("include")) { 1439 this.getInclude().add(castToString(value)); 1440 } else if (name.equals("exclude")) { 1441 this.getExclude().add(castToString(value)); 1442 } else if (name.equals("period")) { 1443 this.period = castToPeriod(value); // Period 1444 } else 1445 return super.setProperty(name, value); 1446 return value; 1447 } 1448 1449 @Override 1450 public Base makeProperty(int hash, String name) throws FHIRException { 1451 switch (hash) { 1452 case -1618432855: return addIdentifier(); 1453 case -892481550: return getStatusElement(); 1454 case -1422950858: return getActionElement(); 1455 case -880905839: return getTarget(); 1456 case 1028554472: return getCreatedElement(); 1457 case -987494927: return getProvider(); 1458 case 1178922291: return getOrganization(); 1459 case 1095692943: return getRequest(); 1460 case -340323263: return getResponse(); 1461 case -2001137643: return getNullifyElement(); 1462 case -925155509: return getReferenceElement(); 1463 case 3242771: return addItem(); 1464 case 1942574248: return addIncludeElement(); 1465 case -1321148966: return addExcludeElement(); 1466 case -991726143: return getPeriod(); 1467 default: return super.makeProperty(hash, name); 1468 } 1469 1470 } 1471 1472 @Override 1473 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1474 switch (hash) { 1475 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1476 case -892481550: /*status*/ return new String[] {"code"}; 1477 case -1422950858: /*action*/ return new String[] {"code"}; 1478 case -880905839: /*target*/ return new String[] {"Reference"}; 1479 case 1028554472: /*created*/ return new String[] {"dateTime"}; 1480 case -987494927: /*provider*/ return new String[] {"Reference"}; 1481 case 1178922291: /*organization*/ return new String[] {"Reference"}; 1482 case 1095692943: /*request*/ return new String[] {"Reference"}; 1483 case -340323263: /*response*/ return new String[] {"Reference"}; 1484 case -2001137643: /*nullify*/ return new String[] {"boolean"}; 1485 case -925155509: /*reference*/ return new String[] {"string"}; 1486 case 3242771: /*item*/ return new String[] {}; 1487 case 1942574248: /*include*/ return new String[] {"string"}; 1488 case -1321148966: /*exclude*/ return new String[] {"string"}; 1489 case -991726143: /*period*/ return new String[] {"Period"}; 1490 default: return super.getTypesForProperty(hash, name); 1491 } 1492 1493 } 1494 1495 @Override 1496 public Base addChild(String name) throws FHIRException { 1497 if (name.equals("identifier")) { 1498 return addIdentifier(); 1499 } 1500 else if (name.equals("status")) { 1501 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.status"); 1502 } 1503 else if (name.equals("action")) { 1504 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.action"); 1505 } 1506 else if (name.equals("target")) { 1507 this.target = new Reference(); 1508 return this.target; 1509 } 1510 else if (name.equals("created")) { 1511 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.created"); 1512 } 1513 else if (name.equals("provider")) { 1514 this.provider = new Reference(); 1515 return this.provider; 1516 } 1517 else if (name.equals("organization")) { 1518 this.organization = new Reference(); 1519 return this.organization; 1520 } 1521 else if (name.equals("request")) { 1522 this.request = new Reference(); 1523 return this.request; 1524 } 1525 else if (name.equals("response")) { 1526 this.response = new Reference(); 1527 return this.response; 1528 } 1529 else if (name.equals("nullify")) { 1530 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.nullify"); 1531 } 1532 else if (name.equals("reference")) { 1533 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.reference"); 1534 } 1535 else if (name.equals("item")) { 1536 return addItem(); 1537 } 1538 else if (name.equals("include")) { 1539 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.include"); 1540 } 1541 else if (name.equals("exclude")) { 1542 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.exclude"); 1543 } 1544 else if (name.equals("period")) { 1545 this.period = new Period(); 1546 return this.period; 1547 } 1548 else 1549 return super.addChild(name); 1550 } 1551 1552 public String fhirType() { 1553 return "ProcessRequest"; 1554 1555 } 1556 1557 public ProcessRequest copy() { 1558 ProcessRequest dst = new ProcessRequest(); 1559 copyValues(dst); 1560 if (identifier != null) { 1561 dst.identifier = new ArrayList<Identifier>(); 1562 for (Identifier i : identifier) 1563 dst.identifier.add(i.copy()); 1564 }; 1565 dst.status = status == null ? null : status.copy(); 1566 dst.action = action == null ? null : action.copy(); 1567 dst.target = target == null ? null : target.copy(); 1568 dst.created = created == null ? null : created.copy(); 1569 dst.provider = provider == null ? null : provider.copy(); 1570 dst.organization = organization == null ? null : organization.copy(); 1571 dst.request = request == null ? null : request.copy(); 1572 dst.response = response == null ? null : response.copy(); 1573 dst.nullify = nullify == null ? null : nullify.copy(); 1574 dst.reference = reference == null ? null : reference.copy(); 1575 if (item != null) { 1576 dst.item = new ArrayList<ItemsComponent>(); 1577 for (ItemsComponent i : item) 1578 dst.item.add(i.copy()); 1579 }; 1580 if (include != null) { 1581 dst.include = new ArrayList<StringType>(); 1582 for (StringType i : include) 1583 dst.include.add(i.copy()); 1584 }; 1585 if (exclude != null) { 1586 dst.exclude = new ArrayList<StringType>(); 1587 for (StringType i : exclude) 1588 dst.exclude.add(i.copy()); 1589 }; 1590 dst.period = period == null ? null : period.copy(); 1591 return dst; 1592 } 1593 1594 protected ProcessRequest typedCopy() { 1595 return copy(); 1596 } 1597 1598 @Override 1599 public boolean equalsDeep(Base other) { 1600 if (!super.equalsDeep(other)) 1601 return false; 1602 if (!(other instanceof ProcessRequest)) 1603 return false; 1604 ProcessRequest o = (ProcessRequest) other; 1605 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(action, o.action, true) 1606 && compareDeep(target, o.target, true) && compareDeep(created, o.created, true) && compareDeep(provider, o.provider, true) 1607 && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 1608 && compareDeep(nullify, o.nullify, true) && compareDeep(reference, o.reference, true) && compareDeep(item, o.item, true) 1609 && compareDeep(include, o.include, true) && compareDeep(exclude, o.exclude, true) && compareDeep(period, o.period, true) 1610 ; 1611 } 1612 1613 @Override 1614 public boolean equalsShallow(Base other) { 1615 if (!super.equalsShallow(other)) 1616 return false; 1617 if (!(other instanceof ProcessRequest)) 1618 return false; 1619 ProcessRequest o = (ProcessRequest) other; 1620 return compareValues(status, o.status, true) && compareValues(action, o.action, true) && compareValues(created, o.created, true) 1621 && compareValues(nullify, o.nullify, true) && compareValues(reference, o.reference, true) && compareValues(include, o.include, true) 1622 && compareValues(exclude, o.exclude, true); 1623 } 1624 1625 public boolean isEmpty() { 1626 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, action 1627 , target, created, provider, organization, request, response, nullify, reference 1628 , item, include, exclude, period); 1629 } 1630 1631 @Override 1632 public ResourceType getResourceType() { 1633 return ResourceType.ProcessRequest; 1634 } 1635 1636 /** 1637 * Search parameter: <b>identifier</b> 1638 * <p> 1639 * Description: <b>The business identifier of the ProcessRequest</b><br> 1640 * Type: <b>token</b><br> 1641 * Path: <b>ProcessRequest.identifier</b><br> 1642 * </p> 1643 */ 1644 @SearchParamDefinition(name="identifier", path="ProcessRequest.identifier", description="The business identifier of the ProcessRequest", type="token" ) 1645 public static final String SP_IDENTIFIER = "identifier"; 1646 /** 1647 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1648 * <p> 1649 * Description: <b>The business identifier of the ProcessRequest</b><br> 1650 * Type: <b>token</b><br> 1651 * Path: <b>ProcessRequest.identifier</b><br> 1652 * </p> 1653 */ 1654 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1655 1656 /** 1657 * Search parameter: <b>provider</b> 1658 * <p> 1659 * Description: <b>The provider who regenerated this request</b><br> 1660 * Type: <b>reference</b><br> 1661 * Path: <b>ProcessRequest.provider</b><br> 1662 * </p> 1663 */ 1664 @SearchParamDefinition(name="provider", path="ProcessRequest.provider", description="The provider who regenerated this request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 1665 public static final String SP_PROVIDER = "provider"; 1666 /** 1667 * <b>Fluent Client</b> search parameter constant for <b>provider</b> 1668 * <p> 1669 * Description: <b>The provider who regenerated this request</b><br> 1670 * Type: <b>reference</b><br> 1671 * Path: <b>ProcessRequest.provider</b><br> 1672 * </p> 1673 */ 1674 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); 1675 1676/** 1677 * Constant for fluent queries to be used to add include statements. Specifies 1678 * the path value of "<b>ProcessRequest:provider</b>". 1679 */ 1680 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("ProcessRequest:provider").toLocked(); 1681 1682 /** 1683 * Search parameter: <b>organization</b> 1684 * <p> 1685 * Description: <b>The organization who generated this request</b><br> 1686 * Type: <b>reference</b><br> 1687 * Path: <b>ProcessRequest.organization</b><br> 1688 * </p> 1689 */ 1690 @SearchParamDefinition(name="organization", path="ProcessRequest.organization", description="The organization who generated this request", type="reference", target={Organization.class } ) 1691 public static final String SP_ORGANIZATION = "organization"; 1692 /** 1693 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 1694 * <p> 1695 * Description: <b>The organization who generated this request</b><br> 1696 * Type: <b>reference</b><br> 1697 * Path: <b>ProcessRequest.organization</b><br> 1698 * </p> 1699 */ 1700 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 1701 1702/** 1703 * Constant for fluent queries to be used to add include statements. Specifies 1704 * the path value of "<b>ProcessRequest:organization</b>". 1705 */ 1706 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessRequest:organization").toLocked(); 1707 1708 /** 1709 * Search parameter: <b>action</b> 1710 * <p> 1711 * Description: <b>The action requested by this resource</b><br> 1712 * Type: <b>token</b><br> 1713 * Path: <b>ProcessRequest.action</b><br> 1714 * </p> 1715 */ 1716 @SearchParamDefinition(name="action", path="ProcessRequest.action", description="The action requested by this resource", type="token" ) 1717 public static final String SP_ACTION = "action"; 1718 /** 1719 * <b>Fluent Client</b> search parameter constant for <b>action</b> 1720 * <p> 1721 * Description: <b>The action requested by this resource</b><br> 1722 * Type: <b>token</b><br> 1723 * Path: <b>ProcessRequest.action</b><br> 1724 * </p> 1725 */ 1726 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTION); 1727 1728 1729} 1730