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