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