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