001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 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/Profile/ProcessRequest") 050public class ProcessRequest extends DomainResource { 051 052 public enum ActionList { 053 /** 054 * Cancel, reverse or nullify the target resource. 055 */ 056 CANCEL, 057 /** 058 * Check for previously un-read/ not-retrieved resources. 059 */ 060 POLL, 061 /** 062 * Re-process the target resource. 063 */ 064 REPROCESS, 065 /** 066 * Retrieve the processing status of the target resource. 067 */ 068 STATUS, 069 /** 070 * added to help the parsers 071 */ 072 NULL; 073 public static ActionList fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("cancel".equals(codeString)) 077 return CANCEL; 078 if ("poll".equals(codeString)) 079 return POLL; 080 if ("reprocess".equals(codeString)) 081 return REPROCESS; 082 if ("status".equals(codeString)) 083 return STATUS; 084 throw new FHIRException("Unknown ActionList code '"+codeString+"'"); 085 } 086 public String toCode() { 087 switch (this) { 088 case CANCEL: return "cancel"; 089 case POLL: return "poll"; 090 case REPROCESS: return "reprocess"; 091 case STATUS: return "status"; 092 default: return "?"; 093 } 094 } 095 public String getSystem() { 096 switch (this) { 097 case CANCEL: return "http://hl7.org/fhir/actionlist"; 098 case POLL: return "http://hl7.org/fhir/actionlist"; 099 case REPROCESS: return "http://hl7.org/fhir/actionlist"; 100 case STATUS: return "http://hl7.org/fhir/actionlist"; 101 default: return "?"; 102 } 103 } 104 public String getDefinition() { 105 switch (this) { 106 case CANCEL: return "Cancel, reverse or nullify the target resource."; 107 case POLL: return "Check for previously un-read/ not-retrieved resources."; 108 case REPROCESS: return "Re-process the target resource."; 109 case STATUS: return "Retrieve the processing status of the target resource."; 110 default: return "?"; 111 } 112 } 113 public String getDisplay() { 114 switch (this) { 115 case CANCEL: return "Cancel, Reverse or Nullify"; 116 case POLL: return "Poll"; 117 case REPROCESS: return "Re-Process"; 118 case STATUS: return "Status Check"; 119 default: return "?"; 120 } 121 } 122 } 123 124 public static class ActionListEnumFactory implements EnumFactory<ActionList> { 125 public ActionList fromCode(String codeString) throws IllegalArgumentException { 126 if (codeString == null || "".equals(codeString)) 127 if (codeString == null || "".equals(codeString)) 128 return null; 129 if ("cancel".equals(codeString)) 130 return ActionList.CANCEL; 131 if ("poll".equals(codeString)) 132 return ActionList.POLL; 133 if ("reprocess".equals(codeString)) 134 return ActionList.REPROCESS; 135 if ("status".equals(codeString)) 136 return ActionList.STATUS; 137 throw new IllegalArgumentException("Unknown ActionList code '"+codeString+"'"); 138 } 139 public Enumeration<ActionList> fromType(Base code) throws FHIRException { 140 if (code == null || code.isEmpty()) 141 return null; 142 String codeString = ((PrimitiveType) code).asStringValue(); 143 if (codeString == null || "".equals(codeString)) 144 return null; 145 if ("cancel".equals(codeString)) 146 return new Enumeration<ActionList>(this, ActionList.CANCEL); 147 if ("poll".equals(codeString)) 148 return new Enumeration<ActionList>(this, ActionList.POLL); 149 if ("reprocess".equals(codeString)) 150 return new Enumeration<ActionList>(this, ActionList.REPROCESS); 151 if ("status".equals(codeString)) 152 return new Enumeration<ActionList>(this, ActionList.STATUS); 153 throw new FHIRException("Unknown ActionList code '"+codeString+"'"); 154 } 155 public String toCode(ActionList code) { 156 if (code == ActionList.CANCEL) 157 return "cancel"; 158 if (code == ActionList.POLL) 159 return "poll"; 160 if (code == ActionList.REPROCESS) 161 return "reprocess"; 162 if (code == ActionList.STATUS) 163 return "status"; 164 return "?"; 165 } 166 public String toSystem(ActionList code) { 167 return code.getSystem(); 168 } 169 } 170 171 @Block() 172 public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { 173 /** 174 * A service line number. 175 */ 176 @Child(name = "sequenceLinkId", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=true) 177 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 178 protected IntegerType sequenceLinkId; 179 180 private static final long serialVersionUID = -1598360600L; 181 182 /** 183 * Constructor 184 */ 185 public ItemsComponent() { 186 super(); 187 } 188 189 /** 190 * Constructor 191 */ 192 public ItemsComponent(IntegerType sequenceLinkId) { 193 super(); 194 this.sequenceLinkId = sequenceLinkId; 195 } 196 197 /** 198 * @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 199 */ 200 public IntegerType getSequenceLinkIdElement() { 201 if (this.sequenceLinkId == null) 202 if (Configuration.errorOnAutoCreate()) 203 throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); 204 else if (Configuration.doAutoCreate()) 205 this.sequenceLinkId = new IntegerType(); // bb 206 return this.sequenceLinkId; 207 } 208 209 public boolean hasSequenceLinkIdElement() { 210 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 211 } 212 213 public boolean hasSequenceLinkId() { 214 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 215 } 216 217 /** 218 * @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 219 */ 220 public ItemsComponent setSequenceLinkIdElement(IntegerType value) { 221 this.sequenceLinkId = value; 222 return this; 223 } 224 225 /** 226 * @return A service line number. 227 */ 228 public int getSequenceLinkId() { 229 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 230 } 231 232 /** 233 * @param value A service line number. 234 */ 235 public ItemsComponent setSequenceLinkId(int value) { 236 if (this.sequenceLinkId == null) 237 this.sequenceLinkId = new IntegerType(); 238 this.sequenceLinkId.setValue(value); 239 return this; 240 } 241 242 protected void listChildren(List<Property> childrenList) { 243 super.listChildren(childrenList); 244 childrenList.add(new Property("sequenceLinkId", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); 245 } 246 247 @Override 248 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 249 switch (hash) { 250 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // IntegerType 251 default: return super.getProperty(hash, name, checkValid); 252 } 253 254 } 255 256 @Override 257 public void setProperty(int hash, String name, Base value) throws FHIRException { 258 switch (hash) { 259 case -1422298666: // sequenceLinkId 260 this.sequenceLinkId = castToInteger(value); // IntegerType 261 break; 262 default: super.setProperty(hash, name, value); 263 } 264 265 } 266 267 @Override 268 public void setProperty(String name, Base value) throws FHIRException { 269 if (name.equals("sequenceLinkId")) 270 this.sequenceLinkId = castToInteger(value); // IntegerType 271 else 272 super.setProperty(name, value); 273 } 274 275 @Override 276 public Base makeProperty(int hash, String name) throws FHIRException { 277 switch (hash) { 278 case -1422298666: throw new FHIRException("Cannot make property sequenceLinkId as it is not a complex type"); // IntegerType 279 default: return super.makeProperty(hash, name); 280 } 281 282 } 283 284 @Override 285 public Base addChild(String name) throws FHIRException { 286 if (name.equals("sequenceLinkId")) { 287 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.sequenceLinkId"); 288 } 289 else 290 return super.addChild(name); 291 } 292 293 public ItemsComponent copy() { 294 ItemsComponent dst = new ItemsComponent(); 295 copyValues(dst); 296 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 297 return dst; 298 } 299 300 @Override 301 public boolean equalsDeep(Base other) { 302 if (!super.equalsDeep(other)) 303 return false; 304 if (!(other instanceof ItemsComponent)) 305 return false; 306 ItemsComponent o = (ItemsComponent) other; 307 return compareDeep(sequenceLinkId, o.sequenceLinkId, true); 308 } 309 310 @Override 311 public boolean equalsShallow(Base other) { 312 if (!super.equalsShallow(other)) 313 return false; 314 if (!(other instanceof ItemsComponent)) 315 return false; 316 ItemsComponent o = (ItemsComponent) other; 317 return compareValues(sequenceLinkId, o.sequenceLinkId, true); 318 } 319 320 public boolean isEmpty() { 321 return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()); 322 } 323 324 public String fhirType() { 325 return "ProcessRequest.item"; 326 327 } 328 329 } 330 331 /** 332 * The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 333 */ 334 @Child(name = "action", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) 335 @Description(shortDefinition="cancel | poll | reprocess | status", formalDefinition="The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest." ) 336 protected Enumeration<ActionList> action; 337 338 /** 339 * The ProcessRequest business identifier. 340 */ 341 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 342 @Description(shortDefinition="Business Identifier", formalDefinition="The ProcessRequest business identifier." ) 343 protected List<Identifier> identifier; 344 345 /** 346 * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. 347 */ 348 @Child(name = "ruleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 349 @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) 350 protected Coding ruleset; 351 352 /** 353 * The style (standard) and version of the original material which was converted into this resource. 354 */ 355 @Child(name = "originalRuleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) 356 @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) 357 protected Coding originalRuleset; 358 359 /** 360 * The date when this resource was created. 361 */ 362 @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) 363 @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) 364 protected DateTimeType created; 365 366 /** 367 * The organization which is the target of the request. 368 */ 369 @Child(name = "target", type = {Identifier.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) 370 @Description(shortDefinition="Target of the request", formalDefinition="The organization which is the target of the request." ) 371 protected Type target; 372 373 /** 374 * The practitioner who is responsible for the action specified in thise request. 375 */ 376 @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) 377 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the action specified in thise request." ) 378 protected Type provider; 379 380 /** 381 * The organization which is responsible for the action speccified in thise request. 382 */ 383 @Child(name = "organization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) 384 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the action speccified in thise request." ) 385 protected Type organization; 386 387 /** 388 * Reference of resource which is the target or subject of this action. 389 */ 390 @Child(name = "request", type = {Identifier.class}, order=8, min=0, max=1, modifier=false, summary=true) 391 @Description(shortDefinition="Request reference", formalDefinition="Reference of resource which is the target or subject of this action." ) 392 protected Type request; 393 394 /** 395 * Reference of a prior response to resource which is the target or subject of this action. 396 */ 397 @Child(name = "response", type = {Identifier.class}, order=9, min=0, max=1, modifier=false, summary=true) 398 @Description(shortDefinition="Response reference", formalDefinition="Reference of a prior response to resource which is the target or subject of this action." ) 399 protected Type response; 400 401 /** 402 * If true remove all history excluding audit. 403 */ 404 @Child(name = "nullify", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=true) 405 @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) 406 protected BooleanType nullify; 407 408 /** 409 * A reference to supply which authenticates the process. 410 */ 411 @Child(name = "reference", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true) 412 @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticates the process." ) 413 protected StringType reference; 414 415 /** 416 * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. 417 */ 418 @Child(name = "item", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 419 @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." ) 420 protected List<ItemsComponent> item; 421 422 /** 423 * Names of resource types to include. 424 */ 425 @Child(name = "include", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 426 @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) 427 protected List<StringType> include; 428 429 /** 430 * Names of resource types to exclude. 431 */ 432 @Child(name = "exclude", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 433 @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) 434 protected List<StringType> exclude; 435 436 /** 437 * A period of time during which the fulfilling resources would have been created. 438 */ 439 @Child(name = "period", type = {Period.class}, order=15, min=0, max=1, modifier=false, summary=true) 440 @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) 441 protected Period period; 442 443 private static final long serialVersionUID = -1557088159L; 444 445 /** 446 * Constructor 447 */ 448 public ProcessRequest() { 449 super(); 450 } 451 452 /** 453 * Constructor 454 */ 455 public ProcessRequest(Enumeration<ActionList> action) { 456 super(); 457 this.action = action; 458 } 459 460 /** 461 * @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 462 */ 463 public Enumeration<ActionList> getActionElement() { 464 if (this.action == null) 465 if (Configuration.errorOnAutoCreate()) 466 throw new Error("Attempt to auto-create ProcessRequest.action"); 467 else if (Configuration.doAutoCreate()) 468 this.action = new Enumeration<ActionList>(new ActionListEnumFactory()); // bb 469 return this.action; 470 } 471 472 public boolean hasActionElement() { 473 return this.action != null && !this.action.isEmpty(); 474 } 475 476 public boolean hasAction() { 477 return this.action != null && !this.action.isEmpty(); 478 } 479 480 /** 481 * @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 482 */ 483 public ProcessRequest setActionElement(Enumeration<ActionList> value) { 484 this.action = value; 485 return this; 486 } 487 488 /** 489 * @return The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 490 */ 491 public ActionList getAction() { 492 return this.action == null ? null : this.action.getValue(); 493 } 494 495 /** 496 * @param value The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. 497 */ 498 public ProcessRequest setAction(ActionList value) { 499 if (this.action == null) 500 this.action = new Enumeration<ActionList>(new ActionListEnumFactory()); 501 this.action.setValue(value); 502 return this; 503 } 504 505 /** 506 * @return {@link #identifier} (The ProcessRequest business identifier.) 507 */ 508 public List<Identifier> getIdentifier() { 509 if (this.identifier == null) 510 this.identifier = new ArrayList<Identifier>(); 511 return this.identifier; 512 } 513 514 public boolean hasIdentifier() { 515 if (this.identifier == null) 516 return false; 517 for (Identifier item : this.identifier) 518 if (!item.isEmpty()) 519 return true; 520 return false; 521 } 522 523 /** 524 * @return {@link #identifier} (The ProcessRequest business identifier.) 525 */ 526 // syntactic sugar 527 public Identifier addIdentifier() { //3 528 Identifier t = new Identifier(); 529 if (this.identifier == null) 530 this.identifier = new ArrayList<Identifier>(); 531 this.identifier.add(t); 532 return t; 533 } 534 535 // syntactic sugar 536 public ProcessRequest addIdentifier(Identifier t) { //3 537 if (t == null) 538 return this; 539 if (this.identifier == null) 540 this.identifier = new ArrayList<Identifier>(); 541 this.identifier.add(t); 542 return this; 543 } 544 545 /** 546 * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 547 */ 548 public Coding getRuleset() { 549 if (this.ruleset == null) 550 if (Configuration.errorOnAutoCreate()) 551 throw new Error("Attempt to auto-create ProcessRequest.ruleset"); 552 else if (Configuration.doAutoCreate()) 553 this.ruleset = new Coding(); // cc 554 return this.ruleset; 555 } 556 557 public boolean hasRuleset() { 558 return this.ruleset != null && !this.ruleset.isEmpty(); 559 } 560 561 /** 562 * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 563 */ 564 public ProcessRequest setRuleset(Coding value) { 565 this.ruleset = value; 566 return this; 567 } 568 569 /** 570 * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 571 */ 572 public Coding getOriginalRuleset() { 573 if (this.originalRuleset == null) 574 if (Configuration.errorOnAutoCreate()) 575 throw new Error("Attempt to auto-create ProcessRequest.originalRuleset"); 576 else if (Configuration.doAutoCreate()) 577 this.originalRuleset = new Coding(); // cc 578 return this.originalRuleset; 579 } 580 581 public boolean hasOriginalRuleset() { 582 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 583 } 584 585 /** 586 * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 587 */ 588 public ProcessRequest setOriginalRuleset(Coding value) { 589 this.originalRuleset = value; 590 return this; 591 } 592 593 /** 594 * @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 595 */ 596 public DateTimeType getCreatedElement() { 597 if (this.created == null) 598 if (Configuration.errorOnAutoCreate()) 599 throw new Error("Attempt to auto-create ProcessRequest.created"); 600 else if (Configuration.doAutoCreate()) 601 this.created = new DateTimeType(); // bb 602 return this.created; 603 } 604 605 public boolean hasCreatedElement() { 606 return this.created != null && !this.created.isEmpty(); 607 } 608 609 public boolean hasCreated() { 610 return this.created != null && !this.created.isEmpty(); 611 } 612 613 /** 614 * @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 615 */ 616 public ProcessRequest setCreatedElement(DateTimeType value) { 617 this.created = value; 618 return this; 619 } 620 621 /** 622 * @return The date when this resource was created. 623 */ 624 public Date getCreated() { 625 return this.created == null ? null : this.created.getValue(); 626 } 627 628 /** 629 * @param value The date when this resource was created. 630 */ 631 public ProcessRequest setCreated(Date value) { 632 if (value == null) 633 this.created = null; 634 else { 635 if (this.created == null) 636 this.created = new DateTimeType(); 637 this.created.setValue(value); 638 } 639 return this; 640 } 641 642 /** 643 * @return {@link #target} (The organization which is the target of the request.) 644 */ 645 public Type getTarget() { 646 return this.target; 647 } 648 649 /** 650 * @return {@link #target} (The organization which is the target of the request.) 651 */ 652 public Identifier getTargetIdentifier() throws FHIRException { 653 if (!(this.target instanceof Identifier)) 654 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); 655 return (Identifier) this.target; 656 } 657 658 public boolean hasTargetIdentifier() { 659 return this.target instanceof Identifier; 660 } 661 662 /** 663 * @return {@link #target} (The organization which is the target of the request.) 664 */ 665 public Reference getTargetReference() throws FHIRException { 666 if (!(this.target instanceof Reference)) 667 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); 668 return (Reference) this.target; 669 } 670 671 public boolean hasTargetReference() { 672 return this.target instanceof Reference; 673 } 674 675 public boolean hasTarget() { 676 return this.target != null && !this.target.isEmpty(); 677 } 678 679 /** 680 * @param value {@link #target} (The organization which is the target of the request.) 681 */ 682 public ProcessRequest setTarget(Type value) { 683 this.target = value; 684 return this; 685 } 686 687 /** 688 * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) 689 */ 690 public Type getProvider() { 691 return this.provider; 692 } 693 694 /** 695 * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) 696 */ 697 public Identifier getProviderIdentifier() throws FHIRException { 698 if (!(this.provider instanceof Identifier)) 699 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); 700 return (Identifier) this.provider; 701 } 702 703 public boolean hasProviderIdentifier() { 704 return this.provider instanceof Identifier; 705 } 706 707 /** 708 * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) 709 */ 710 public Reference getProviderReference() throws FHIRException { 711 if (!(this.provider instanceof Reference)) 712 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); 713 return (Reference) this.provider; 714 } 715 716 public boolean hasProviderReference() { 717 return this.provider instanceof Reference; 718 } 719 720 public boolean hasProvider() { 721 return this.provider != null && !this.provider.isEmpty(); 722 } 723 724 /** 725 * @param value {@link #provider} (The practitioner who is responsible for the action specified in thise request.) 726 */ 727 public ProcessRequest setProvider(Type value) { 728 this.provider = value; 729 return this; 730 } 731 732 /** 733 * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) 734 */ 735 public Type getOrganization() { 736 return this.organization; 737 } 738 739 /** 740 * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) 741 */ 742 public Identifier getOrganizationIdentifier() throws FHIRException { 743 if (!(this.organization instanceof Identifier)) 744 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); 745 return (Identifier) this.organization; 746 } 747 748 public boolean hasOrganizationIdentifier() { 749 return this.organization instanceof Identifier; 750 } 751 752 /** 753 * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) 754 */ 755 public Reference getOrganizationReference() throws FHIRException { 756 if (!(this.organization instanceof Reference)) 757 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); 758 return (Reference) this.organization; 759 } 760 761 public boolean hasOrganizationReference() { 762 return this.organization instanceof Reference; 763 } 764 765 public boolean hasOrganization() { 766 return this.organization != null && !this.organization.isEmpty(); 767 } 768 769 /** 770 * @param value {@link #organization} (The organization which is responsible for the action speccified in thise request.) 771 */ 772 public ProcessRequest setOrganization(Type value) { 773 this.organization = value; 774 return this; 775 } 776 777 /** 778 * @return {@link #request} (Reference of resource which is the target or subject of this action.) 779 */ 780 public Type getRequest() { 781 return this.request; 782 } 783 784 /** 785 * @return {@link #request} (Reference of resource which is the target or subject of this action.) 786 */ 787 public Identifier getRequestIdentifier() throws FHIRException { 788 if (!(this.request instanceof Identifier)) 789 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); 790 return (Identifier) this.request; 791 } 792 793 public boolean hasRequestIdentifier() { 794 return this.request instanceof Identifier; 795 } 796 797 /** 798 * @return {@link #request} (Reference of resource which is the target or subject of this action.) 799 */ 800 public Reference getRequestReference() throws FHIRException { 801 if (!(this.request instanceof Reference)) 802 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); 803 return (Reference) this.request; 804 } 805 806 public boolean hasRequestReference() { 807 return this.request instanceof Reference; 808 } 809 810 public boolean hasRequest() { 811 return this.request != null && !this.request.isEmpty(); 812 } 813 814 /** 815 * @param value {@link #request} (Reference of resource which is the target or subject of this action.) 816 */ 817 public ProcessRequest setRequest(Type value) { 818 this.request = value; 819 return this; 820 } 821 822 /** 823 * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 824 */ 825 public Type getResponse() { 826 return this.response; 827 } 828 829 /** 830 * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 831 */ 832 public Identifier getResponseIdentifier() throws FHIRException { 833 if (!(this.response instanceof Identifier)) 834 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.response.getClass().getName()+" was encountered"); 835 return (Identifier) this.response; 836 } 837 838 public boolean hasResponseIdentifier() { 839 return this.response instanceof Identifier; 840 } 841 842 /** 843 * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 844 */ 845 public Reference getResponseReference() throws FHIRException { 846 if (!(this.response instanceof Reference)) 847 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.response.getClass().getName()+" was encountered"); 848 return (Reference) this.response; 849 } 850 851 public boolean hasResponseReference() { 852 return this.response instanceof Reference; 853 } 854 855 public boolean hasResponse() { 856 return this.response != null && !this.response.isEmpty(); 857 } 858 859 /** 860 * @param value {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) 861 */ 862 public ProcessRequest setResponse(Type value) { 863 this.response = value; 864 return this; 865 } 866 867 /** 868 * @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 869 */ 870 public BooleanType getNullifyElement() { 871 if (this.nullify == null) 872 if (Configuration.errorOnAutoCreate()) 873 throw new Error("Attempt to auto-create ProcessRequest.nullify"); 874 else if (Configuration.doAutoCreate()) 875 this.nullify = new BooleanType(); // bb 876 return this.nullify; 877 } 878 879 public boolean hasNullifyElement() { 880 return this.nullify != null && !this.nullify.isEmpty(); 881 } 882 883 public boolean hasNullify() { 884 return this.nullify != null && !this.nullify.isEmpty(); 885 } 886 887 /** 888 * @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 889 */ 890 public ProcessRequest setNullifyElement(BooleanType value) { 891 this.nullify = value; 892 return this; 893 } 894 895 /** 896 * @return If true remove all history excluding audit. 897 */ 898 public boolean getNullify() { 899 return this.nullify == null || this.nullify.isEmpty() ? false : this.nullify.getValue(); 900 } 901 902 /** 903 * @param value If true remove all history excluding audit. 904 */ 905 public ProcessRequest setNullify(boolean value) { 906 if (this.nullify == null) 907 this.nullify = new BooleanType(); 908 this.nullify.setValue(value); 909 return this; 910 } 911 912 /** 913 * @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 914 */ 915 public StringType getReferenceElement() { 916 if (this.reference == null) 917 if (Configuration.errorOnAutoCreate()) 918 throw new Error("Attempt to auto-create ProcessRequest.reference"); 919 else if (Configuration.doAutoCreate()) 920 this.reference = new StringType(); // bb 921 return this.reference; 922 } 923 924 public boolean hasReferenceElement() { 925 return this.reference != null && !this.reference.isEmpty(); 926 } 927 928 public boolean hasReference() { 929 return this.reference != null && !this.reference.isEmpty(); 930 } 931 932 /** 933 * @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 934 */ 935 public ProcessRequest setReferenceElement(StringType value) { 936 this.reference = value; 937 return this; 938 } 939 940 /** 941 * @return A reference to supply which authenticates the process. 942 */ 943 public String getReference() { 944 return this.reference == null ? null : this.reference.getValue(); 945 } 946 947 /** 948 * @param value A reference to supply which authenticates the process. 949 */ 950 public ProcessRequest setReference(String value) { 951 if (Utilities.noString(value)) 952 this.reference = null; 953 else { 954 if (this.reference == null) 955 this.reference = new StringType(); 956 this.reference.setValue(value); 957 } 958 return this; 959 } 960 961 /** 962 * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) 963 */ 964 public List<ItemsComponent> getItem() { 965 if (this.item == null) 966 this.item = new ArrayList<ItemsComponent>(); 967 return this.item; 968 } 969 970 public boolean hasItem() { 971 if (this.item == null) 972 return false; 973 for (ItemsComponent item : this.item) 974 if (!item.isEmpty()) 975 return true; 976 return false; 977 } 978 979 /** 980 * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) 981 */ 982 // syntactic sugar 983 public ItemsComponent addItem() { //3 984 ItemsComponent t = new ItemsComponent(); 985 if (this.item == null) 986 this.item = new ArrayList<ItemsComponent>(); 987 this.item.add(t); 988 return t; 989 } 990 991 // syntactic sugar 992 public ProcessRequest addItem(ItemsComponent t) { //3 993 if (t == null) 994 return this; 995 if (this.item == null) 996 this.item = new ArrayList<ItemsComponent>(); 997 this.item.add(t); 998 return this; 999 } 1000 1001 /** 1002 * @return {@link #include} (Names of resource types to include.) 1003 */ 1004 public List<StringType> getInclude() { 1005 if (this.include == null) 1006 this.include = new ArrayList<StringType>(); 1007 return this.include; 1008 } 1009 1010 public boolean hasInclude() { 1011 if (this.include == null) 1012 return false; 1013 for (StringType item : this.include) 1014 if (!item.isEmpty()) 1015 return true; 1016 return false; 1017 } 1018 1019 /** 1020 * @return {@link #include} (Names of resource types to include.) 1021 */ 1022 // syntactic sugar 1023 public StringType addIncludeElement() {//2 1024 StringType t = new StringType(); 1025 if (this.include == null) 1026 this.include = new ArrayList<StringType>(); 1027 this.include.add(t); 1028 return t; 1029 } 1030 1031 /** 1032 * @param value {@link #include} (Names of resource types to include.) 1033 */ 1034 public ProcessRequest addInclude(String value) { //1 1035 StringType t = new StringType(); 1036 t.setValue(value); 1037 if (this.include == null) 1038 this.include = new ArrayList<StringType>(); 1039 this.include.add(t); 1040 return this; 1041 } 1042 1043 /** 1044 * @param value {@link #include} (Names of resource types to include.) 1045 */ 1046 public boolean hasInclude(String value) { 1047 if (this.include == null) 1048 return false; 1049 for (StringType v : this.include) 1050 if (v.equals(value)) // string 1051 return true; 1052 return false; 1053 } 1054 1055 /** 1056 * @return {@link #exclude} (Names of resource types to exclude.) 1057 */ 1058 public List<StringType> getExclude() { 1059 if (this.exclude == null) 1060 this.exclude = new ArrayList<StringType>(); 1061 return this.exclude; 1062 } 1063 1064 public boolean hasExclude() { 1065 if (this.exclude == null) 1066 return false; 1067 for (StringType item : this.exclude) 1068 if (!item.isEmpty()) 1069 return true; 1070 return false; 1071 } 1072 1073 /** 1074 * @return {@link #exclude} (Names of resource types to exclude.) 1075 */ 1076 // syntactic sugar 1077 public StringType addExcludeElement() {//2 1078 StringType t = new StringType(); 1079 if (this.exclude == null) 1080 this.exclude = new ArrayList<StringType>(); 1081 this.exclude.add(t); 1082 return t; 1083 } 1084 1085 /** 1086 * @param value {@link #exclude} (Names of resource types to exclude.) 1087 */ 1088 public ProcessRequest addExclude(String value) { //1 1089 StringType t = new StringType(); 1090 t.setValue(value); 1091 if (this.exclude == null) 1092 this.exclude = new ArrayList<StringType>(); 1093 this.exclude.add(t); 1094 return this; 1095 } 1096 1097 /** 1098 * @param value {@link #exclude} (Names of resource types to exclude.) 1099 */ 1100 public boolean hasExclude(String value) { 1101 if (this.exclude == null) 1102 return false; 1103 for (StringType v : this.exclude) 1104 if (v.equals(value)) // string 1105 return true; 1106 return false; 1107 } 1108 1109 /** 1110 * @return {@link #period} (A period of time during which the fulfilling resources would have been created.) 1111 */ 1112 public Period getPeriod() { 1113 if (this.period == null) 1114 if (Configuration.errorOnAutoCreate()) 1115 throw new Error("Attempt to auto-create ProcessRequest.period"); 1116 else if (Configuration.doAutoCreate()) 1117 this.period = new Period(); // cc 1118 return this.period; 1119 } 1120 1121 public boolean hasPeriod() { 1122 return this.period != null && !this.period.isEmpty(); 1123 } 1124 1125 /** 1126 * @param value {@link #period} (A period of time during which the fulfilling resources would have been created.) 1127 */ 1128 public ProcessRequest setPeriod(Period value) { 1129 this.period = value; 1130 return this; 1131 } 1132 1133 protected void listChildren(List<Property> childrenList) { 1134 super.listChildren(childrenList); 1135 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)); 1136 childrenList.add(new Property("identifier", "Identifier", "The ProcessRequest business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1137 childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 1138 childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); 1139 childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); 1140 childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "The organization which is the target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); 1141 childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the action specified in thise request.", 0, java.lang.Integer.MAX_VALUE, provider)); 1142 childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the action speccified in thise request.", 0, java.lang.Integer.MAX_VALUE, organization)); 1143 childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); 1144 childrenList.add(new Property("response[x]", "Identifier|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)); 1145 childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); 1146 childrenList.add(new Property("reference", "string", "A reference to supply which authenticates the process.", 0, java.lang.Integer.MAX_VALUE, reference)); 1147 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)); 1148 childrenList.add(new Property("include", "string", "Names of resource types to include.", 0, java.lang.Integer.MAX_VALUE, include)); 1149 childrenList.add(new Property("exclude", "string", "Names of resource types to exclude.", 0, java.lang.Integer.MAX_VALUE, exclude)); 1150 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)); 1151 } 1152 1153 @Override 1154 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1155 switch (hash) { 1156 case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // Enumeration<ActionList> 1157 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1158 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding 1159 case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding 1160 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 1161 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type 1162 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Type 1163 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type 1164 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type 1165 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Type 1166 case -2001137643: /*nullify*/ return this.nullify == null ? new Base[0] : new Base[] {this.nullify}; // BooleanType 1167 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType 1168 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemsComponent 1169 case 1942574248: /*include*/ return this.include == null ? new Base[0] : this.include.toArray(new Base[this.include.size()]); // StringType 1170 case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : this.exclude.toArray(new Base[this.exclude.size()]); // StringType 1171 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1172 default: return super.getProperty(hash, name, checkValid); 1173 } 1174 1175 } 1176 1177 @Override 1178 public void setProperty(int hash, String name, Base value) throws FHIRException { 1179 switch (hash) { 1180 case -1422950858: // action 1181 this.action = new ActionListEnumFactory().fromType(value); // Enumeration<ActionList> 1182 break; 1183 case -1618432855: // identifier 1184 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1185 break; 1186 case 1548678118: // ruleset 1187 this.ruleset = castToCoding(value); // Coding 1188 break; 1189 case 1089373397: // originalRuleset 1190 this.originalRuleset = castToCoding(value); // Coding 1191 break; 1192 case 1028554472: // created 1193 this.created = castToDateTime(value); // DateTimeType 1194 break; 1195 case -880905839: // target 1196 this.target = (Type) value; // Type 1197 break; 1198 case -987494927: // provider 1199 this.provider = (Type) value; // Type 1200 break; 1201 case 1178922291: // organization 1202 this.organization = (Type) value; // Type 1203 break; 1204 case 1095692943: // request 1205 this.request = (Type) value; // Type 1206 break; 1207 case -340323263: // response 1208 this.response = (Type) value; // Type 1209 break; 1210 case -2001137643: // nullify 1211 this.nullify = castToBoolean(value); // BooleanType 1212 break; 1213 case -925155509: // reference 1214 this.reference = castToString(value); // StringType 1215 break; 1216 case 3242771: // item 1217 this.getItem().add((ItemsComponent) value); // ItemsComponent 1218 break; 1219 case 1942574248: // include 1220 this.getInclude().add(castToString(value)); // StringType 1221 break; 1222 case -1321148966: // exclude 1223 this.getExclude().add(castToString(value)); // StringType 1224 break; 1225 case -991726143: // period 1226 this.period = castToPeriod(value); // Period 1227 break; 1228 default: super.setProperty(hash, name, value); 1229 } 1230 1231 } 1232 1233 @Override 1234 public void setProperty(String name, Base value) throws FHIRException { 1235 if (name.equals("action")) 1236 this.action = new ActionListEnumFactory().fromType(value); // Enumeration<ActionList> 1237 else if (name.equals("identifier")) 1238 this.getIdentifier().add(castToIdentifier(value)); 1239 else if (name.equals("ruleset")) 1240 this.ruleset = castToCoding(value); // Coding 1241 else if (name.equals("originalRuleset")) 1242 this.originalRuleset = castToCoding(value); // Coding 1243 else if (name.equals("created")) 1244 this.created = castToDateTime(value); // DateTimeType 1245 else if (name.equals("target[x]")) 1246 this.target = (Type) value; // Type 1247 else if (name.equals("provider[x]")) 1248 this.provider = (Type) value; // Type 1249 else if (name.equals("organization[x]")) 1250 this.organization = (Type) value; // Type 1251 else if (name.equals("request[x]")) 1252 this.request = (Type) value; // Type 1253 else if (name.equals("response[x]")) 1254 this.response = (Type) value; // Type 1255 else if (name.equals("nullify")) 1256 this.nullify = castToBoolean(value); // BooleanType 1257 else if (name.equals("reference")) 1258 this.reference = castToString(value); // StringType 1259 else if (name.equals("item")) 1260 this.getItem().add((ItemsComponent) value); 1261 else if (name.equals("include")) 1262 this.getInclude().add(castToString(value)); 1263 else if (name.equals("exclude")) 1264 this.getExclude().add(castToString(value)); 1265 else if (name.equals("period")) 1266 this.period = castToPeriod(value); // Period 1267 else 1268 super.setProperty(name, value); 1269 } 1270 1271 @Override 1272 public Base makeProperty(int hash, String name) throws FHIRException { 1273 switch (hash) { 1274 case -1422950858: throw new FHIRException("Cannot make property action as it is not a complex type"); // Enumeration<ActionList> 1275 case -1618432855: return addIdentifier(); // Identifier 1276 case 1548678118: return getRuleset(); // Coding 1277 case 1089373397: return getOriginalRuleset(); // Coding 1278 case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType 1279 case -815579825: return getTarget(); // Type 1280 case 2064698607: return getProvider(); // Type 1281 case 1326483053: return getOrganization(); // Type 1282 case 37106577: return getRequest(); // Type 1283 case 1847549087: return getResponse(); // Type 1284 case -2001137643: throw new FHIRException("Cannot make property nullify as it is not a complex type"); // BooleanType 1285 case -925155509: throw new FHIRException("Cannot make property reference as it is not a complex type"); // StringType 1286 case 3242771: return addItem(); // ItemsComponent 1287 case 1942574248: throw new FHIRException("Cannot make property include as it is not a complex type"); // StringType 1288 case -1321148966: throw new FHIRException("Cannot make property exclude as it is not a complex type"); // StringType 1289 case -991726143: return getPeriod(); // Period 1290 default: return super.makeProperty(hash, name); 1291 } 1292 1293 } 1294 1295 @Override 1296 public Base addChild(String name) throws FHIRException { 1297 if (name.equals("action")) { 1298 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.action"); 1299 } 1300 else if (name.equals("identifier")) { 1301 return addIdentifier(); 1302 } 1303 else if (name.equals("ruleset")) { 1304 this.ruleset = new Coding(); 1305 return this.ruleset; 1306 } 1307 else if (name.equals("originalRuleset")) { 1308 this.originalRuleset = new Coding(); 1309 return this.originalRuleset; 1310 } 1311 else if (name.equals("created")) { 1312 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.created"); 1313 } 1314 else if (name.equals("targetIdentifier")) { 1315 this.target = new Identifier(); 1316 return this.target; 1317 } 1318 else if (name.equals("targetReference")) { 1319 this.target = new Reference(); 1320 return this.target; 1321 } 1322 else if (name.equals("providerIdentifier")) { 1323 this.provider = new Identifier(); 1324 return this.provider; 1325 } 1326 else if (name.equals("providerReference")) { 1327 this.provider = new Reference(); 1328 return this.provider; 1329 } 1330 else if (name.equals("organizationIdentifier")) { 1331 this.organization = new Identifier(); 1332 return this.organization; 1333 } 1334 else if (name.equals("organizationReference")) { 1335 this.organization = new Reference(); 1336 return this.organization; 1337 } 1338 else if (name.equals("requestIdentifier")) { 1339 this.request = new Identifier(); 1340 return this.request; 1341 } 1342 else if (name.equals("requestReference")) { 1343 this.request = new Reference(); 1344 return this.request; 1345 } 1346 else if (name.equals("responseIdentifier")) { 1347 this.response = new Identifier(); 1348 return this.response; 1349 } 1350 else if (name.equals("responseReference")) { 1351 this.response = new Reference(); 1352 return this.response; 1353 } 1354 else if (name.equals("nullify")) { 1355 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.nullify"); 1356 } 1357 else if (name.equals("reference")) { 1358 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.reference"); 1359 } 1360 else if (name.equals("item")) { 1361 return addItem(); 1362 } 1363 else if (name.equals("include")) { 1364 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.include"); 1365 } 1366 else if (name.equals("exclude")) { 1367 throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.exclude"); 1368 } 1369 else if (name.equals("period")) { 1370 this.period = new Period(); 1371 return this.period; 1372 } 1373 else 1374 return super.addChild(name); 1375 } 1376 1377 public String fhirType() { 1378 return "ProcessRequest"; 1379 1380 } 1381 1382 public ProcessRequest copy() { 1383 ProcessRequest dst = new ProcessRequest(); 1384 copyValues(dst); 1385 dst.action = action == null ? null : action.copy(); 1386 if (identifier != null) { 1387 dst.identifier = new ArrayList<Identifier>(); 1388 for (Identifier i : identifier) 1389 dst.identifier.add(i.copy()); 1390 }; 1391 dst.ruleset = ruleset == null ? null : ruleset.copy(); 1392 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 1393 dst.created = created == null ? null : created.copy(); 1394 dst.target = target == null ? null : target.copy(); 1395 dst.provider = provider == null ? null : provider.copy(); 1396 dst.organization = organization == null ? null : organization.copy(); 1397 dst.request = request == null ? null : request.copy(); 1398 dst.response = response == null ? null : response.copy(); 1399 dst.nullify = nullify == null ? null : nullify.copy(); 1400 dst.reference = reference == null ? null : reference.copy(); 1401 if (item != null) { 1402 dst.item = new ArrayList<ItemsComponent>(); 1403 for (ItemsComponent i : item) 1404 dst.item.add(i.copy()); 1405 }; 1406 if (include != null) { 1407 dst.include = new ArrayList<StringType>(); 1408 for (StringType i : include) 1409 dst.include.add(i.copy()); 1410 }; 1411 if (exclude != null) { 1412 dst.exclude = new ArrayList<StringType>(); 1413 for (StringType i : exclude) 1414 dst.exclude.add(i.copy()); 1415 }; 1416 dst.period = period == null ? null : period.copy(); 1417 return dst; 1418 } 1419 1420 protected ProcessRequest typedCopy() { 1421 return copy(); 1422 } 1423 1424 @Override 1425 public boolean equalsDeep(Base other) { 1426 if (!super.equalsDeep(other)) 1427 return false; 1428 if (!(other instanceof ProcessRequest)) 1429 return false; 1430 ProcessRequest o = (ProcessRequest) other; 1431 return compareDeep(action, o.action, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) 1432 && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) 1433 && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) 1434 && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) && compareDeep(nullify, o.nullify, true) 1435 && compareDeep(reference, o.reference, true) && compareDeep(item, o.item, true) && compareDeep(include, o.include, true) 1436 && compareDeep(exclude, o.exclude, true) && compareDeep(period, o.period, true); 1437 } 1438 1439 @Override 1440 public boolean equalsShallow(Base other) { 1441 if (!super.equalsShallow(other)) 1442 return false; 1443 if (!(other instanceof ProcessRequest)) 1444 return false; 1445 ProcessRequest o = (ProcessRequest) other; 1446 return compareValues(action, o.action, true) && compareValues(created, o.created, true) && compareValues(nullify, o.nullify, true) 1447 && compareValues(reference, o.reference, true) && compareValues(include, o.include, true) && compareValues(exclude, o.exclude, true) 1448 ; 1449 } 1450 1451 public boolean isEmpty() { 1452 return super.isEmpty() && (action == null || action.isEmpty()) && (identifier == null || identifier.isEmpty()) 1453 && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) 1454 && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) 1455 && (organization == null || organization.isEmpty()) && (request == null || request.isEmpty()) 1456 && (response == null || response.isEmpty()) && (nullify == null || nullify.isEmpty()) && (reference == null || reference.isEmpty()) 1457 && (item == null || item.isEmpty()) && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) 1458 && (period == null || period.isEmpty()); 1459 } 1460 1461 @Override 1462 public ResourceType getResourceType() { 1463 return ResourceType.ProcessRequest; 1464 } 1465 1466 /** 1467 * Search parameter: <b>action</b> 1468 * <p> 1469 * Description: <b>The action requested by this resource</b><br> 1470 * Type: <b>token</b><br> 1471 * Path: <b>ProcessRequest.action</b><br> 1472 * </p> 1473 */ 1474 @SearchParamDefinition(name="action", path="ProcessRequest.action", description="The action requested by this resource", type="token" ) 1475 public static final String SP_ACTION = "action"; 1476 /** 1477 * <b>Fluent Client</b> search parameter constant for <b>action</b> 1478 * <p> 1479 * Description: <b>The action requested by this resource</b><br> 1480 * Type: <b>token</b><br> 1481 * Path: <b>ProcessRequest.action</b><br> 1482 * </p> 1483 */ 1484 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTION); 1485 1486 /** 1487 * Search parameter: <b>providerreference</b> 1488 * <p> 1489 * Description: <b>The provider who regenerated this request</b><br> 1490 * Type: <b>reference</b><br> 1491 * Path: <b>ProcessRequest.providerReference</b><br> 1492 * </p> 1493 */ 1494 @SearchParamDefinition(name="providerreference", path="ProcessRequest.provider.as(Reference)", description="The provider who regenerated this request", type="reference" ) 1495 public static final String SP_PROVIDERREFERENCE = "providerreference"; 1496 /** 1497 * <b>Fluent Client</b> search parameter constant for <b>providerreference</b> 1498 * <p> 1499 * Description: <b>The provider who regenerated this request</b><br> 1500 * Type: <b>reference</b><br> 1501 * Path: <b>ProcessRequest.providerReference</b><br> 1502 * </p> 1503 */ 1504 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); 1505 1506/** 1507 * Constant for fluent queries to be used to add include statements. Specifies 1508 * the path value of "<b>ProcessRequest:providerreference</b>". 1509 */ 1510 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessRequest:providerreference").toLocked(); 1511 1512 /** 1513 * Search parameter: <b>organizationidentifier</b> 1514 * <p> 1515 * Description: <b>The organization who generated this request</b><br> 1516 * Type: <b>token</b><br> 1517 * Path: <b>ProcessRequest.organizationIdentifier</b><br> 1518 * </p> 1519 */ 1520 @SearchParamDefinition(name="organizationidentifier", path="ProcessRequest.organization.as(Identifier)", description="The organization who generated this request", type="token" ) 1521 public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; 1522 /** 1523 * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b> 1524 * <p> 1525 * Description: <b>The organization who generated this request</b><br> 1526 * Type: <b>token</b><br> 1527 * Path: <b>ProcessRequest.organizationIdentifier</b><br> 1528 * </p> 1529 */ 1530 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); 1531 1532 /** 1533 * Search parameter: <b>organizationreference</b> 1534 * <p> 1535 * Description: <b>The organization who generated this request</b><br> 1536 * Type: <b>reference</b><br> 1537 * Path: <b>ProcessRequest.organizationReference</b><br> 1538 * </p> 1539 */ 1540 @SearchParamDefinition(name="organizationreference", path="ProcessRequest.organization.as(Reference)", description="The organization who generated this request", type="reference" ) 1541 public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; 1542 /** 1543 * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b> 1544 * <p> 1545 * Description: <b>The organization who generated this request</b><br> 1546 * Type: <b>reference</b><br> 1547 * Path: <b>ProcessRequest.organizationReference</b><br> 1548 * </p> 1549 */ 1550 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); 1551 1552/** 1553 * Constant for fluent queries to be used to add include statements. Specifies 1554 * the path value of "<b>ProcessRequest:organizationreference</b>". 1555 */ 1556 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessRequest:organizationreference").toLocked(); 1557 1558 /** 1559 * Search parameter: <b>identifier</b> 1560 * <p> 1561 * Description: <b>The business identifier of the ProcessRequest</b><br> 1562 * Type: <b>token</b><br> 1563 * Path: <b>ProcessRequest.identifier</b><br> 1564 * </p> 1565 */ 1566 @SearchParamDefinition(name="identifier", path="ProcessRequest.identifier", description="The business identifier of the ProcessRequest", type="token" ) 1567 public static final String SP_IDENTIFIER = "identifier"; 1568 /** 1569 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1570 * <p> 1571 * Description: <b>The business identifier of the ProcessRequest</b><br> 1572 * Type: <b>token</b><br> 1573 * Path: <b>ProcessRequest.identifier</b><br> 1574 * </p> 1575 */ 1576 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1577 1578 /** 1579 * Search parameter: <b>provideridentifier</b> 1580 * <p> 1581 * Description: <b>The provider who regenerated this request</b><br> 1582 * Type: <b>token</b><br> 1583 * Path: <b>ProcessRequest.providerIdentifier</b><br> 1584 * </p> 1585 */ 1586 @SearchParamDefinition(name="provideridentifier", path="ProcessRequest.provider.as(Identifier)", description="The provider who regenerated this request", type="token" ) 1587 public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; 1588 /** 1589 * <b>Fluent Client</b> search parameter constant for <b>provideridentifier</b> 1590 * <p> 1591 * Description: <b>The provider who regenerated this request</b><br> 1592 * Type: <b>token</b><br> 1593 * Path: <b>ProcessRequest.providerIdentifier</b><br> 1594 * </p> 1595 */ 1596 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); 1597 1598 1599} 1600