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