001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * This resource provides processing status, errors and notes from the processing of a resource. 048 */ 049@ResourceDef(name="ProcessResponse", profile="http://hl7.org/fhir/Profile/ProcessResponse") 050public class ProcessResponse extends DomainResource { 051 052 public enum ProcessResponseStatus { 053 /** 054 * The instance is currently in-force. 055 */ 056 ACTIVE, 057 /** 058 * The instance is withdrawn, rescinded or reversed. 059 */ 060 CANCELLED, 061 /** 062 * A new instance the contents of which is not complete. 063 */ 064 DRAFT, 065 /** 066 * The instance was entered in error. 067 */ 068 ENTEREDINERROR, 069 /** 070 * added to help the parsers with the generic types 071 */ 072 NULL; 073 public static ProcessResponseStatus fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("active".equals(codeString)) 077 return ACTIVE; 078 if ("cancelled".equals(codeString)) 079 return CANCELLED; 080 if ("draft".equals(codeString)) 081 return DRAFT; 082 if ("entered-in-error".equals(codeString)) 083 return ENTEREDINERROR; 084 if (Configuration.isAcceptInvalidEnums()) 085 return null; 086 else 087 throw new FHIRException("Unknown ProcessResponseStatus code '"+codeString+"'"); 088 } 089 public String toCode() { 090 switch (this) { 091 case ACTIVE: return "active"; 092 case CANCELLED: return "cancelled"; 093 case DRAFT: return "draft"; 094 case ENTEREDINERROR: return "entered-in-error"; 095 default: return "?"; 096 } 097 } 098 public String getSystem() { 099 switch (this) { 100 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 101 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 102 case DRAFT: return "http://hl7.org/fhir/fm-status"; 103 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 104 default: return "?"; 105 } 106 } 107 public String getDefinition() { 108 switch (this) { 109 case ACTIVE: return "The instance is currently in-force."; 110 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 111 case DRAFT: return "A new instance the contents of which is not complete."; 112 case ENTEREDINERROR: return "The instance was entered in error."; 113 default: return "?"; 114 } 115 } 116 public String getDisplay() { 117 switch (this) { 118 case ACTIVE: return "Active"; 119 case CANCELLED: return "Cancelled"; 120 case DRAFT: return "Draft"; 121 case ENTEREDINERROR: return "Entered in Error"; 122 default: return "?"; 123 } 124 } 125 } 126 127 public static class ProcessResponseStatusEnumFactory implements EnumFactory<ProcessResponseStatus> { 128 public ProcessResponseStatus fromCode(String codeString) throws IllegalArgumentException { 129 if (codeString == null || "".equals(codeString)) 130 if (codeString == null || "".equals(codeString)) 131 return null; 132 if ("active".equals(codeString)) 133 return ProcessResponseStatus.ACTIVE; 134 if ("cancelled".equals(codeString)) 135 return ProcessResponseStatus.CANCELLED; 136 if ("draft".equals(codeString)) 137 return ProcessResponseStatus.DRAFT; 138 if ("entered-in-error".equals(codeString)) 139 return ProcessResponseStatus.ENTEREDINERROR; 140 throw new IllegalArgumentException("Unknown ProcessResponseStatus code '"+codeString+"'"); 141 } 142 public Enumeration<ProcessResponseStatus> fromType(Base code) throws FHIRException { 143 if (code == null) 144 return null; 145 if (code.isEmpty()) 146 return new Enumeration<ProcessResponseStatus>(this); 147 String codeString = ((PrimitiveType) code).asStringValue(); 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("active".equals(codeString)) 151 return new Enumeration<ProcessResponseStatus>(this, ProcessResponseStatus.ACTIVE); 152 if ("cancelled".equals(codeString)) 153 return new Enumeration<ProcessResponseStatus>(this, ProcessResponseStatus.CANCELLED); 154 if ("draft".equals(codeString)) 155 return new Enumeration<ProcessResponseStatus>(this, ProcessResponseStatus.DRAFT); 156 if ("entered-in-error".equals(codeString)) 157 return new Enumeration<ProcessResponseStatus>(this, ProcessResponseStatus.ENTEREDINERROR); 158 throw new FHIRException("Unknown ProcessResponseStatus code '"+codeString+"'"); 159 } 160 public String toCode(ProcessResponseStatus code) { 161 if (code == ProcessResponseStatus.ACTIVE) 162 return "active"; 163 if (code == ProcessResponseStatus.CANCELLED) 164 return "cancelled"; 165 if (code == ProcessResponseStatus.DRAFT) 166 return "draft"; 167 if (code == ProcessResponseStatus.ENTEREDINERROR) 168 return "entered-in-error"; 169 return "?"; 170 } 171 public String toSystem(ProcessResponseStatus code) { 172 return code.getSystem(); 173 } 174 } 175 176 @Block() 177 public static class ProcessResponseProcessNoteComponent extends BackboneElement implements IBaseBackboneElement { 178 /** 179 * The note purpose: Print/Display. 180 */ 181 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 182 @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) 183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") 184 protected CodeableConcept type; 185 186 /** 187 * The note text. 188 */ 189 @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 190 @Description(shortDefinition="Comment on the processing", formalDefinition="The note text." ) 191 protected StringType text; 192 193 private static final long serialVersionUID = 874830709L; 194 195 /** 196 * Constructor 197 */ 198 public ProcessResponseProcessNoteComponent() { 199 super(); 200 } 201 202 /** 203 * @return {@link #type} (The note purpose: Print/Display.) 204 */ 205 public CodeableConcept getType() { 206 if (this.type == null) 207 if (Configuration.errorOnAutoCreate()) 208 throw new Error("Attempt to auto-create ProcessResponseProcessNoteComponent.type"); 209 else if (Configuration.doAutoCreate()) 210 this.type = new CodeableConcept(); // cc 211 return this.type; 212 } 213 214 public boolean hasType() { 215 return this.type != null && !this.type.isEmpty(); 216 } 217 218 /** 219 * @param value {@link #type} (The note purpose: Print/Display.) 220 */ 221 public ProcessResponseProcessNoteComponent setType(CodeableConcept value) { 222 this.type = value; 223 return this; 224 } 225 226 /** 227 * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 228 */ 229 public StringType getTextElement() { 230 if (this.text == null) 231 if (Configuration.errorOnAutoCreate()) 232 throw new Error("Attempt to auto-create ProcessResponseProcessNoteComponent.text"); 233 else if (Configuration.doAutoCreate()) 234 this.text = new StringType(); // bb 235 return this.text; 236 } 237 238 public boolean hasTextElement() { 239 return this.text != null && !this.text.isEmpty(); 240 } 241 242 public boolean hasText() { 243 return this.text != null && !this.text.isEmpty(); 244 } 245 246 /** 247 * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 248 */ 249 public ProcessResponseProcessNoteComponent setTextElement(StringType value) { 250 this.text = value; 251 return this; 252 } 253 254 /** 255 * @return The note text. 256 */ 257 public String getText() { 258 return this.text == null ? null : this.text.getValue(); 259 } 260 261 /** 262 * @param value The note text. 263 */ 264 public ProcessResponseProcessNoteComponent setText(String value) { 265 if (Utilities.noString(value)) 266 this.text = null; 267 else { 268 if (this.text == null) 269 this.text = new StringType(); 270 this.text.setValue(value); 271 } 272 return this; 273 } 274 275 protected void listChildren(List<Property> childrenList) { 276 super.listChildren(childrenList); 277 childrenList.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); 278 childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); 279 } 280 281 @Override 282 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 283 switch (hash) { 284 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 285 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 286 default: return super.getProperty(hash, name, checkValid); 287 } 288 289 } 290 291 @Override 292 public Base setProperty(int hash, String name, Base value) throws FHIRException { 293 switch (hash) { 294 case 3575610: // type 295 this.type = castToCodeableConcept(value); // CodeableConcept 296 return value; 297 case 3556653: // text 298 this.text = castToString(value); // StringType 299 return value; 300 default: return super.setProperty(hash, name, value); 301 } 302 303 } 304 305 @Override 306 public Base setProperty(String name, Base value) throws FHIRException { 307 if (name.equals("type")) { 308 this.type = castToCodeableConcept(value); // CodeableConcept 309 } else if (name.equals("text")) { 310 this.text = castToString(value); // StringType 311 } else 312 return super.setProperty(name, value); 313 return value; 314 } 315 316 @Override 317 public Base makeProperty(int hash, String name) throws FHIRException { 318 switch (hash) { 319 case 3575610: return getType(); 320 case 3556653: return getTextElement(); 321 default: return super.makeProperty(hash, name); 322 } 323 324 } 325 326 @Override 327 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 328 switch (hash) { 329 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 330 case 3556653: /*text*/ return new String[] {"string"}; 331 default: return super.getTypesForProperty(hash, name); 332 } 333 334 } 335 336 @Override 337 public Base addChild(String name) throws FHIRException { 338 if (name.equals("type")) { 339 this.type = new CodeableConcept(); 340 return this.type; 341 } 342 else if (name.equals("text")) { 343 throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.text"); 344 } 345 else 346 return super.addChild(name); 347 } 348 349 public ProcessResponseProcessNoteComponent copy() { 350 ProcessResponseProcessNoteComponent dst = new ProcessResponseProcessNoteComponent(); 351 copyValues(dst); 352 dst.type = type == null ? null : type.copy(); 353 dst.text = text == null ? null : text.copy(); 354 return dst; 355 } 356 357 @Override 358 public boolean equalsDeep(Base other) { 359 if (!super.equalsDeep(other)) 360 return false; 361 if (!(other instanceof ProcessResponseProcessNoteComponent)) 362 return false; 363 ProcessResponseProcessNoteComponent o = (ProcessResponseProcessNoteComponent) other; 364 return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); 365 } 366 367 @Override 368 public boolean equalsShallow(Base other) { 369 if (!super.equalsShallow(other)) 370 return false; 371 if (!(other instanceof ProcessResponseProcessNoteComponent)) 372 return false; 373 ProcessResponseProcessNoteComponent o = (ProcessResponseProcessNoteComponent) other; 374 return compareValues(text, o.text, true); 375 } 376 377 public boolean isEmpty() { 378 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, text); 379 } 380 381 public String fhirType() { 382 return "ProcessResponse.processNote"; 383 384 } 385 386 } 387 388 /** 389 * The Response business identifier. 390 */ 391 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 392 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 393 protected List<Identifier> identifier; 394 395 /** 396 * The status of the resource instance. 397 */ 398 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 399 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 400 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 401 protected Enumeration<ProcessResponseStatus> status; 402 403 /** 404 * The date when the enclosed suite of services were performed or completed. 405 */ 406 @Child(name = "created", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 407 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 408 protected DateTimeType created; 409 410 /** 411 * The organization who produced this adjudicated response. 412 */ 413 @Child(name = "organization", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 414 @Description(shortDefinition="Authoring Organization", formalDefinition="The organization who produced this adjudicated response." ) 415 protected Reference organization; 416 417 /** 418 * The actual object that is the target of the reference (The organization who produced this adjudicated response.) 419 */ 420 protected Organization organizationTarget; 421 422 /** 423 * Original request resource reference. 424 */ 425 @Child(name = "request", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 426 @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) 427 protected Reference request; 428 429 /** 430 * The actual object that is the target of the reference (Original request resource reference.) 431 */ 432 protected Resource requestTarget; 433 434 /** 435 * Transaction status: error, complete, held. 436 */ 437 @Child(name = "outcome", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 438 @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) 439 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/process-outcome") 440 protected CodeableConcept outcome; 441 442 /** 443 * A description of the status of the adjudication or processing. 444 */ 445 @Child(name = "disposition", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 446 @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication or processing." ) 447 protected StringType disposition; 448 449 /** 450 * The practitioner who is responsible for the services rendered to the patient. 451 */ 452 @Child(name = "requestProvider", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=false) 453 @Description(shortDefinition="Responsible Practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 454 protected Reference requestProvider; 455 456 /** 457 * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) 458 */ 459 protected Practitioner requestProviderTarget; 460 461 /** 462 * The organization which is responsible for the services rendered to the patient. 463 */ 464 @Child(name = "requestOrganization", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=false) 465 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) 466 protected Reference requestOrganization; 467 468 /** 469 * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) 470 */ 471 protected Organization requestOrganizationTarget; 472 473 /** 474 * The form to be used for printing the content. 475 */ 476 @Child(name = "form", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false) 477 @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) 478 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms") 479 protected CodeableConcept form; 480 481 /** 482 * Suite of processing notes or additional requirements if the processing has been held. 483 */ 484 @Child(name = "processNote", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 485 @Description(shortDefinition="Processing comments or additional requirements", formalDefinition="Suite of processing notes or additional requirements if the processing has been held." ) 486 protected List<ProcessResponseProcessNoteComponent> processNote; 487 488 /** 489 * Processing errors. 490 */ 491 @Child(name = "error", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 492 @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) 493 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-error") 494 protected List<CodeableConcept> error; 495 496 /** 497 * Request for additional supporting or authorizing information, such as: documents, images or resources. 498 */ 499 @Child(name = "communicationRequest", type = {CommunicationRequest.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 500 @Description(shortDefinition="Request for additional information", formalDefinition="Request for additional supporting or authorizing information, such as: documents, images or resources." ) 501 protected List<Reference> communicationRequest; 502 /** 503 * The actual objects that are the target of the reference (Request for additional supporting or authorizing information, such as: documents, images or resources.) 504 */ 505 protected List<CommunicationRequest> communicationRequestTarget; 506 507 508 private static final long serialVersionUID = -2058462467L; 509 510 /** 511 * Constructor 512 */ 513 public ProcessResponse() { 514 super(); 515 } 516 517 /** 518 * @return {@link #identifier} (The Response business identifier.) 519 */ 520 public List<Identifier> getIdentifier() { 521 if (this.identifier == null) 522 this.identifier = new ArrayList<Identifier>(); 523 return this.identifier; 524 } 525 526 /** 527 * @return Returns a reference to <code>this</code> for easy method chaining 528 */ 529 public ProcessResponse setIdentifier(List<Identifier> theIdentifier) { 530 this.identifier = theIdentifier; 531 return this; 532 } 533 534 public boolean hasIdentifier() { 535 if (this.identifier == null) 536 return false; 537 for (Identifier item : this.identifier) 538 if (!item.isEmpty()) 539 return true; 540 return false; 541 } 542 543 public Identifier addIdentifier() { //3 544 Identifier t = new Identifier(); 545 if (this.identifier == null) 546 this.identifier = new ArrayList<Identifier>(); 547 this.identifier.add(t); 548 return t; 549 } 550 551 public ProcessResponse addIdentifier(Identifier t) { //3 552 if (t == null) 553 return this; 554 if (this.identifier == null) 555 this.identifier = new ArrayList<Identifier>(); 556 this.identifier.add(t); 557 return this; 558 } 559 560 /** 561 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 562 */ 563 public Identifier getIdentifierFirstRep() { 564 if (getIdentifier().isEmpty()) { 565 addIdentifier(); 566 } 567 return getIdentifier().get(0); 568 } 569 570 /** 571 * @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 572 */ 573 public Enumeration<ProcessResponseStatus> getStatusElement() { 574 if (this.status == null) 575 if (Configuration.errorOnAutoCreate()) 576 throw new Error("Attempt to auto-create ProcessResponse.status"); 577 else if (Configuration.doAutoCreate()) 578 this.status = new Enumeration<ProcessResponseStatus>(new ProcessResponseStatusEnumFactory()); // bb 579 return this.status; 580 } 581 582 public boolean hasStatusElement() { 583 return this.status != null && !this.status.isEmpty(); 584 } 585 586 public boolean hasStatus() { 587 return this.status != null && !this.status.isEmpty(); 588 } 589 590 /** 591 * @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 592 */ 593 public ProcessResponse setStatusElement(Enumeration<ProcessResponseStatus> value) { 594 this.status = value; 595 return this; 596 } 597 598 /** 599 * @return The status of the resource instance. 600 */ 601 public ProcessResponseStatus getStatus() { 602 return this.status == null ? null : this.status.getValue(); 603 } 604 605 /** 606 * @param value The status of the resource instance. 607 */ 608 public ProcessResponse setStatus(ProcessResponseStatus value) { 609 if (value == null) 610 this.status = null; 611 else { 612 if (this.status == null) 613 this.status = new Enumeration<ProcessResponseStatus>(new ProcessResponseStatusEnumFactory()); 614 this.status.setValue(value); 615 } 616 return this; 617 } 618 619 /** 620 * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 621 */ 622 public DateTimeType getCreatedElement() { 623 if (this.created == null) 624 if (Configuration.errorOnAutoCreate()) 625 throw new Error("Attempt to auto-create ProcessResponse.created"); 626 else if (Configuration.doAutoCreate()) 627 this.created = new DateTimeType(); // bb 628 return this.created; 629 } 630 631 public boolean hasCreatedElement() { 632 return this.created != null && !this.created.isEmpty(); 633 } 634 635 public boolean hasCreated() { 636 return this.created != null && !this.created.isEmpty(); 637 } 638 639 /** 640 * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 641 */ 642 public ProcessResponse setCreatedElement(DateTimeType value) { 643 this.created = value; 644 return this; 645 } 646 647 /** 648 * @return The date when the enclosed suite of services were performed or completed. 649 */ 650 public Date getCreated() { 651 return this.created == null ? null : this.created.getValue(); 652 } 653 654 /** 655 * @param value The date when the enclosed suite of services were performed or completed. 656 */ 657 public ProcessResponse setCreated(Date value) { 658 if (value == null) 659 this.created = null; 660 else { 661 if (this.created == null) 662 this.created = new DateTimeType(); 663 this.created.setValue(value); 664 } 665 return this; 666 } 667 668 /** 669 * @return {@link #organization} (The organization who produced this adjudicated response.) 670 */ 671 public Reference getOrganization() { 672 if (this.organization == null) 673 if (Configuration.errorOnAutoCreate()) 674 throw new Error("Attempt to auto-create ProcessResponse.organization"); 675 else if (Configuration.doAutoCreate()) 676 this.organization = new Reference(); // cc 677 return this.organization; 678 } 679 680 public boolean hasOrganization() { 681 return this.organization != null && !this.organization.isEmpty(); 682 } 683 684 /** 685 * @param value {@link #organization} (The organization who produced this adjudicated response.) 686 */ 687 public ProcessResponse setOrganization(Reference value) { 688 this.organization = value; 689 return this; 690 } 691 692 /** 693 * @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 who produced this adjudicated response.) 694 */ 695 public Organization getOrganizationTarget() { 696 if (this.organizationTarget == null) 697 if (Configuration.errorOnAutoCreate()) 698 throw new Error("Attempt to auto-create ProcessResponse.organization"); 699 else if (Configuration.doAutoCreate()) 700 this.organizationTarget = new Organization(); // aa 701 return this.organizationTarget; 702 } 703 704 /** 705 * @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 who produced this adjudicated response.) 706 */ 707 public ProcessResponse setOrganizationTarget(Organization value) { 708 this.organizationTarget = value; 709 return this; 710 } 711 712 /** 713 * @return {@link #request} (Original request resource reference.) 714 */ 715 public Reference getRequest() { 716 if (this.request == null) 717 if (Configuration.errorOnAutoCreate()) 718 throw new Error("Attempt to auto-create ProcessResponse.request"); 719 else if (Configuration.doAutoCreate()) 720 this.request = new Reference(); // cc 721 return this.request; 722 } 723 724 public boolean hasRequest() { 725 return this.request != null && !this.request.isEmpty(); 726 } 727 728 /** 729 * @param value {@link #request} (Original request resource reference.) 730 */ 731 public ProcessResponse setRequest(Reference value) { 732 this.request = value; 733 return this; 734 } 735 736 /** 737 * @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. (Original request resource reference.) 738 */ 739 public Resource getRequestTarget() { 740 return this.requestTarget; 741 } 742 743 /** 744 * @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. (Original request resource reference.) 745 */ 746 public ProcessResponse setRequestTarget(Resource value) { 747 this.requestTarget = value; 748 return this; 749 } 750 751 /** 752 * @return {@link #outcome} (Transaction status: error, complete, held.) 753 */ 754 public CodeableConcept getOutcome() { 755 if (this.outcome == null) 756 if (Configuration.errorOnAutoCreate()) 757 throw new Error("Attempt to auto-create ProcessResponse.outcome"); 758 else if (Configuration.doAutoCreate()) 759 this.outcome = new CodeableConcept(); // cc 760 return this.outcome; 761 } 762 763 public boolean hasOutcome() { 764 return this.outcome != null && !this.outcome.isEmpty(); 765 } 766 767 /** 768 * @param value {@link #outcome} (Transaction status: error, complete, held.) 769 */ 770 public ProcessResponse setOutcome(CodeableConcept value) { 771 this.outcome = value; 772 return this; 773 } 774 775 /** 776 * @return {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 777 */ 778 public StringType getDispositionElement() { 779 if (this.disposition == null) 780 if (Configuration.errorOnAutoCreate()) 781 throw new Error("Attempt to auto-create ProcessResponse.disposition"); 782 else if (Configuration.doAutoCreate()) 783 this.disposition = new StringType(); // bb 784 return this.disposition; 785 } 786 787 public boolean hasDispositionElement() { 788 return this.disposition != null && !this.disposition.isEmpty(); 789 } 790 791 public boolean hasDisposition() { 792 return this.disposition != null && !this.disposition.isEmpty(); 793 } 794 795 /** 796 * @param value {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 797 */ 798 public ProcessResponse setDispositionElement(StringType value) { 799 this.disposition = value; 800 return this; 801 } 802 803 /** 804 * @return A description of the status of the adjudication or processing. 805 */ 806 public String getDisposition() { 807 return this.disposition == null ? null : this.disposition.getValue(); 808 } 809 810 /** 811 * @param value A description of the status of the adjudication or processing. 812 */ 813 public ProcessResponse setDisposition(String value) { 814 if (Utilities.noString(value)) 815 this.disposition = null; 816 else { 817 if (this.disposition == null) 818 this.disposition = new StringType(); 819 this.disposition.setValue(value); 820 } 821 return this; 822 } 823 824 /** 825 * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 826 */ 827 public Reference getRequestProvider() { 828 if (this.requestProvider == null) 829 if (Configuration.errorOnAutoCreate()) 830 throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); 831 else if (Configuration.doAutoCreate()) 832 this.requestProvider = new Reference(); // cc 833 return this.requestProvider; 834 } 835 836 public boolean hasRequestProvider() { 837 return this.requestProvider != null && !this.requestProvider.isEmpty(); 838 } 839 840 /** 841 * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 842 */ 843 public ProcessResponse setRequestProvider(Reference value) { 844 this.requestProvider = value; 845 return this; 846 } 847 848 /** 849 * @return {@link #requestProvider} 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 services rendered to the patient.) 850 */ 851 public Practitioner getRequestProviderTarget() { 852 if (this.requestProviderTarget == null) 853 if (Configuration.errorOnAutoCreate()) 854 throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); 855 else if (Configuration.doAutoCreate()) 856 this.requestProviderTarget = new Practitioner(); // aa 857 return this.requestProviderTarget; 858 } 859 860 /** 861 * @param value {@link #requestProvider} 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 services rendered to the patient.) 862 */ 863 public ProcessResponse setRequestProviderTarget(Practitioner value) { 864 this.requestProviderTarget = value; 865 return this; 866 } 867 868 /** 869 * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 870 */ 871 public Reference getRequestOrganization() { 872 if (this.requestOrganization == null) 873 if (Configuration.errorOnAutoCreate()) 874 throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); 875 else if (Configuration.doAutoCreate()) 876 this.requestOrganization = new Reference(); // cc 877 return this.requestOrganization; 878 } 879 880 public boolean hasRequestOrganization() { 881 return this.requestOrganization != null && !this.requestOrganization.isEmpty(); 882 } 883 884 /** 885 * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 886 */ 887 public ProcessResponse setRequestOrganization(Reference value) { 888 this.requestOrganization = value; 889 return this; 890 } 891 892 /** 893 * @return {@link #requestOrganization} 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 services rendered to the patient.) 894 */ 895 public Organization getRequestOrganizationTarget() { 896 if (this.requestOrganizationTarget == null) 897 if (Configuration.errorOnAutoCreate()) 898 throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); 899 else if (Configuration.doAutoCreate()) 900 this.requestOrganizationTarget = new Organization(); // aa 901 return this.requestOrganizationTarget; 902 } 903 904 /** 905 * @param value {@link #requestOrganization} 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 services rendered to the patient.) 906 */ 907 public ProcessResponse setRequestOrganizationTarget(Organization value) { 908 this.requestOrganizationTarget = value; 909 return this; 910 } 911 912 /** 913 * @return {@link #form} (The form to be used for printing the content.) 914 */ 915 public CodeableConcept getForm() { 916 if (this.form == null) 917 if (Configuration.errorOnAutoCreate()) 918 throw new Error("Attempt to auto-create ProcessResponse.form"); 919 else if (Configuration.doAutoCreate()) 920 this.form = new CodeableConcept(); // cc 921 return this.form; 922 } 923 924 public boolean hasForm() { 925 return this.form != null && !this.form.isEmpty(); 926 } 927 928 /** 929 * @param value {@link #form} (The form to be used for printing the content.) 930 */ 931 public ProcessResponse setForm(CodeableConcept value) { 932 this.form = value; 933 return this; 934 } 935 936 /** 937 * @return {@link #processNote} (Suite of processing notes or additional requirements if the processing has been held.) 938 */ 939 public List<ProcessResponseProcessNoteComponent> getProcessNote() { 940 if (this.processNote == null) 941 this.processNote = new ArrayList<ProcessResponseProcessNoteComponent>(); 942 return this.processNote; 943 } 944 945 /** 946 * @return Returns a reference to <code>this</code> for easy method chaining 947 */ 948 public ProcessResponse setProcessNote(List<ProcessResponseProcessNoteComponent> theProcessNote) { 949 this.processNote = theProcessNote; 950 return this; 951 } 952 953 public boolean hasProcessNote() { 954 if (this.processNote == null) 955 return false; 956 for (ProcessResponseProcessNoteComponent item : this.processNote) 957 if (!item.isEmpty()) 958 return true; 959 return false; 960 } 961 962 public ProcessResponseProcessNoteComponent addProcessNote() { //3 963 ProcessResponseProcessNoteComponent t = new ProcessResponseProcessNoteComponent(); 964 if (this.processNote == null) 965 this.processNote = new ArrayList<ProcessResponseProcessNoteComponent>(); 966 this.processNote.add(t); 967 return t; 968 } 969 970 public ProcessResponse addProcessNote(ProcessResponseProcessNoteComponent t) { //3 971 if (t == null) 972 return this; 973 if (this.processNote == null) 974 this.processNote = new ArrayList<ProcessResponseProcessNoteComponent>(); 975 this.processNote.add(t); 976 return this; 977 } 978 979 /** 980 * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist 981 */ 982 public ProcessResponseProcessNoteComponent getProcessNoteFirstRep() { 983 if (getProcessNote().isEmpty()) { 984 addProcessNote(); 985 } 986 return getProcessNote().get(0); 987 } 988 989 /** 990 * @return {@link #error} (Processing errors.) 991 */ 992 public List<CodeableConcept> getError() { 993 if (this.error == null) 994 this.error = new ArrayList<CodeableConcept>(); 995 return this.error; 996 } 997 998 /** 999 * @return Returns a reference to <code>this</code> for easy method chaining 1000 */ 1001 public ProcessResponse setError(List<CodeableConcept> theError) { 1002 this.error = theError; 1003 return this; 1004 } 1005 1006 public boolean hasError() { 1007 if (this.error == null) 1008 return false; 1009 for (CodeableConcept item : this.error) 1010 if (!item.isEmpty()) 1011 return true; 1012 return false; 1013 } 1014 1015 public CodeableConcept addError() { //3 1016 CodeableConcept t = new CodeableConcept(); 1017 if (this.error == null) 1018 this.error = new ArrayList<CodeableConcept>(); 1019 this.error.add(t); 1020 return t; 1021 } 1022 1023 public ProcessResponse addError(CodeableConcept t) { //3 1024 if (t == null) 1025 return this; 1026 if (this.error == null) 1027 this.error = new ArrayList<CodeableConcept>(); 1028 this.error.add(t); 1029 return this; 1030 } 1031 1032 /** 1033 * @return The first repetition of repeating field {@link #error}, creating it if it does not already exist 1034 */ 1035 public CodeableConcept getErrorFirstRep() { 1036 if (getError().isEmpty()) { 1037 addError(); 1038 } 1039 return getError().get(0); 1040 } 1041 1042 /** 1043 * @return {@link #communicationRequest} (Request for additional supporting or authorizing information, such as: documents, images or resources.) 1044 */ 1045 public List<Reference> getCommunicationRequest() { 1046 if (this.communicationRequest == null) 1047 this.communicationRequest = new ArrayList<Reference>(); 1048 return this.communicationRequest; 1049 } 1050 1051 /** 1052 * @return Returns a reference to <code>this</code> for easy method chaining 1053 */ 1054 public ProcessResponse setCommunicationRequest(List<Reference> theCommunicationRequest) { 1055 this.communicationRequest = theCommunicationRequest; 1056 return this; 1057 } 1058 1059 public boolean hasCommunicationRequest() { 1060 if (this.communicationRequest == null) 1061 return false; 1062 for (Reference item : this.communicationRequest) 1063 if (!item.isEmpty()) 1064 return true; 1065 return false; 1066 } 1067 1068 public Reference addCommunicationRequest() { //3 1069 Reference t = new Reference(); 1070 if (this.communicationRequest == null) 1071 this.communicationRequest = new ArrayList<Reference>(); 1072 this.communicationRequest.add(t); 1073 return t; 1074 } 1075 1076 public ProcessResponse addCommunicationRequest(Reference t) { //3 1077 if (t == null) 1078 return this; 1079 if (this.communicationRequest == null) 1080 this.communicationRequest = new ArrayList<Reference>(); 1081 this.communicationRequest.add(t); 1082 return this; 1083 } 1084 1085 /** 1086 * @return The first repetition of repeating field {@link #communicationRequest}, creating it if it does not already exist 1087 */ 1088 public Reference getCommunicationRequestFirstRep() { 1089 if (getCommunicationRequest().isEmpty()) { 1090 addCommunicationRequest(); 1091 } 1092 return getCommunicationRequest().get(0); 1093 } 1094 1095 /** 1096 * @deprecated Use Reference#setResource(IBaseResource) instead 1097 */ 1098 @Deprecated 1099 public List<CommunicationRequest> getCommunicationRequestTarget() { 1100 if (this.communicationRequestTarget == null) 1101 this.communicationRequestTarget = new ArrayList<CommunicationRequest>(); 1102 return this.communicationRequestTarget; 1103 } 1104 1105 /** 1106 * @deprecated Use Reference#setResource(IBaseResource) instead 1107 */ 1108 @Deprecated 1109 public CommunicationRequest addCommunicationRequestTarget() { 1110 CommunicationRequest r = new CommunicationRequest(); 1111 if (this.communicationRequestTarget == null) 1112 this.communicationRequestTarget = new ArrayList<CommunicationRequest>(); 1113 this.communicationRequestTarget.add(r); 1114 return r; 1115 } 1116 1117 protected void listChildren(List<Property> childrenList) { 1118 super.listChildren(childrenList); 1119 childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1120 childrenList.add(new Property("status", "code", "The status of the resource instance.", 0, java.lang.Integer.MAX_VALUE, status)); 1121 childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); 1122 childrenList.add(new Property("organization", "Reference(Organization)", "The organization who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); 1123 childrenList.add(new Property("request", "Reference(Any)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); 1124 childrenList.add(new Property("outcome", "CodeableConcept", "Transaction status: error, complete, held.", 0, java.lang.Integer.MAX_VALUE, outcome)); 1125 childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, java.lang.Integer.MAX_VALUE, disposition)); 1126 childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); 1127 childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); 1128 childrenList.add(new Property("form", "CodeableConcept", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); 1129 childrenList.add(new Property("processNote", "", "Suite of processing notes or additional requirements if the processing has been held.", 0, java.lang.Integer.MAX_VALUE, processNote)); 1130 childrenList.add(new Property("error", "CodeableConcept", "Processing errors.", 0, java.lang.Integer.MAX_VALUE, error)); 1131 childrenList.add(new Property("communicationRequest", "Reference(CommunicationRequest)", "Request for additional supporting or authorizing information, such as: documents, images or resources.", 0, java.lang.Integer.MAX_VALUE, communicationRequest)); 1132 } 1133 1134 @Override 1135 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1136 switch (hash) { 1137 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1138 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ProcessResponseStatus> 1139 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 1140 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference 1141 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 1142 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 1143 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 1144 case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference 1145 case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference 1146 case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept 1147 case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // ProcessResponseProcessNoteComponent 1148 case 96784904: /*error*/ return this.error == null ? new Base[0] : this.error.toArray(new Base[this.error.size()]); // CodeableConcept 1149 case -2071896615: /*communicationRequest*/ return this.communicationRequest == null ? new Base[0] : this.communicationRequest.toArray(new Base[this.communicationRequest.size()]); // Reference 1150 default: return super.getProperty(hash, name, checkValid); 1151 } 1152 1153 } 1154 1155 @Override 1156 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1157 switch (hash) { 1158 case -1618432855: // identifier 1159 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1160 return value; 1161 case -892481550: // status 1162 value = new ProcessResponseStatusEnumFactory().fromType(castToCode(value)); 1163 this.status = (Enumeration) value; // Enumeration<ProcessResponseStatus> 1164 return value; 1165 case 1028554472: // created 1166 this.created = castToDateTime(value); // DateTimeType 1167 return value; 1168 case 1178922291: // organization 1169 this.organization = castToReference(value); // Reference 1170 return value; 1171 case 1095692943: // request 1172 this.request = castToReference(value); // Reference 1173 return value; 1174 case -1106507950: // outcome 1175 this.outcome = castToCodeableConcept(value); // CodeableConcept 1176 return value; 1177 case 583380919: // disposition 1178 this.disposition = castToString(value); // StringType 1179 return value; 1180 case 1601527200: // requestProvider 1181 this.requestProvider = castToReference(value); // Reference 1182 return value; 1183 case 599053666: // requestOrganization 1184 this.requestOrganization = castToReference(value); // Reference 1185 return value; 1186 case 3148996: // form 1187 this.form = castToCodeableConcept(value); // CodeableConcept 1188 return value; 1189 case 202339073: // processNote 1190 this.getProcessNote().add((ProcessResponseProcessNoteComponent) value); // ProcessResponseProcessNoteComponent 1191 return value; 1192 case 96784904: // error 1193 this.getError().add(castToCodeableConcept(value)); // CodeableConcept 1194 return value; 1195 case -2071896615: // communicationRequest 1196 this.getCommunicationRequest().add(castToReference(value)); // Reference 1197 return value; 1198 default: return super.setProperty(hash, name, value); 1199 } 1200 1201 } 1202 1203 @Override 1204 public Base setProperty(String name, Base value) throws FHIRException { 1205 if (name.equals("identifier")) { 1206 this.getIdentifier().add(castToIdentifier(value)); 1207 } else if (name.equals("status")) { 1208 value = new ProcessResponseStatusEnumFactory().fromType(castToCode(value)); 1209 this.status = (Enumeration) value; // Enumeration<ProcessResponseStatus> 1210 } else if (name.equals("created")) { 1211 this.created = castToDateTime(value); // DateTimeType 1212 } else if (name.equals("organization")) { 1213 this.organization = castToReference(value); // Reference 1214 } else if (name.equals("request")) { 1215 this.request = castToReference(value); // Reference 1216 } else if (name.equals("outcome")) { 1217 this.outcome = castToCodeableConcept(value); // CodeableConcept 1218 } else if (name.equals("disposition")) { 1219 this.disposition = castToString(value); // StringType 1220 } else if (name.equals("requestProvider")) { 1221 this.requestProvider = castToReference(value); // Reference 1222 } else if (name.equals("requestOrganization")) { 1223 this.requestOrganization = castToReference(value); // Reference 1224 } else if (name.equals("form")) { 1225 this.form = castToCodeableConcept(value); // CodeableConcept 1226 } else if (name.equals("processNote")) { 1227 this.getProcessNote().add((ProcessResponseProcessNoteComponent) value); 1228 } else if (name.equals("error")) { 1229 this.getError().add(castToCodeableConcept(value)); 1230 } else if (name.equals("communicationRequest")) { 1231 this.getCommunicationRequest().add(castToReference(value)); 1232 } else 1233 return super.setProperty(name, value); 1234 return value; 1235 } 1236 1237 @Override 1238 public Base makeProperty(int hash, String name) throws FHIRException { 1239 switch (hash) { 1240 case -1618432855: return addIdentifier(); 1241 case -892481550: return getStatusElement(); 1242 case 1028554472: return getCreatedElement(); 1243 case 1178922291: return getOrganization(); 1244 case 1095692943: return getRequest(); 1245 case -1106507950: return getOutcome(); 1246 case 583380919: return getDispositionElement(); 1247 case 1601527200: return getRequestProvider(); 1248 case 599053666: return getRequestOrganization(); 1249 case 3148996: return getForm(); 1250 case 202339073: return addProcessNote(); 1251 case 96784904: return addError(); 1252 case -2071896615: return addCommunicationRequest(); 1253 default: return super.makeProperty(hash, name); 1254 } 1255 1256 } 1257 1258 @Override 1259 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1260 switch (hash) { 1261 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1262 case -892481550: /*status*/ return new String[] {"code"}; 1263 case 1028554472: /*created*/ return new String[] {"dateTime"}; 1264 case 1178922291: /*organization*/ return new String[] {"Reference"}; 1265 case 1095692943: /*request*/ return new String[] {"Reference"}; 1266 case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; 1267 case 583380919: /*disposition*/ return new String[] {"string"}; 1268 case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; 1269 case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; 1270 case 3148996: /*form*/ return new String[] {"CodeableConcept"}; 1271 case 202339073: /*processNote*/ return new String[] {}; 1272 case 96784904: /*error*/ return new String[] {"CodeableConcept"}; 1273 case -2071896615: /*communicationRequest*/ return new String[] {"Reference"}; 1274 default: return super.getTypesForProperty(hash, name); 1275 } 1276 1277 } 1278 1279 @Override 1280 public Base addChild(String name) throws FHIRException { 1281 if (name.equals("identifier")) { 1282 return addIdentifier(); 1283 } 1284 else if (name.equals("status")) { 1285 throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.status"); 1286 } 1287 else if (name.equals("created")) { 1288 throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.created"); 1289 } 1290 else if (name.equals("organization")) { 1291 this.organization = new Reference(); 1292 return this.organization; 1293 } 1294 else if (name.equals("request")) { 1295 this.request = new Reference(); 1296 return this.request; 1297 } 1298 else if (name.equals("outcome")) { 1299 this.outcome = new CodeableConcept(); 1300 return this.outcome; 1301 } 1302 else if (name.equals("disposition")) { 1303 throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.disposition"); 1304 } 1305 else if (name.equals("requestProvider")) { 1306 this.requestProvider = new Reference(); 1307 return this.requestProvider; 1308 } 1309 else if (name.equals("requestOrganization")) { 1310 this.requestOrganization = new Reference(); 1311 return this.requestOrganization; 1312 } 1313 else if (name.equals("form")) { 1314 this.form = new CodeableConcept(); 1315 return this.form; 1316 } 1317 else if (name.equals("processNote")) { 1318 return addProcessNote(); 1319 } 1320 else if (name.equals("error")) { 1321 return addError(); 1322 } 1323 else if (name.equals("communicationRequest")) { 1324 return addCommunicationRequest(); 1325 } 1326 else 1327 return super.addChild(name); 1328 } 1329 1330 public String fhirType() { 1331 return "ProcessResponse"; 1332 1333 } 1334 1335 public ProcessResponse copy() { 1336 ProcessResponse dst = new ProcessResponse(); 1337 copyValues(dst); 1338 if (identifier != null) { 1339 dst.identifier = new ArrayList<Identifier>(); 1340 for (Identifier i : identifier) 1341 dst.identifier.add(i.copy()); 1342 }; 1343 dst.status = status == null ? null : status.copy(); 1344 dst.created = created == null ? null : created.copy(); 1345 dst.organization = organization == null ? null : organization.copy(); 1346 dst.request = request == null ? null : request.copy(); 1347 dst.outcome = outcome == null ? null : outcome.copy(); 1348 dst.disposition = disposition == null ? null : disposition.copy(); 1349 dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); 1350 dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); 1351 dst.form = form == null ? null : form.copy(); 1352 if (processNote != null) { 1353 dst.processNote = new ArrayList<ProcessResponseProcessNoteComponent>(); 1354 for (ProcessResponseProcessNoteComponent i : processNote) 1355 dst.processNote.add(i.copy()); 1356 }; 1357 if (error != null) { 1358 dst.error = new ArrayList<CodeableConcept>(); 1359 for (CodeableConcept i : error) 1360 dst.error.add(i.copy()); 1361 }; 1362 if (communicationRequest != null) { 1363 dst.communicationRequest = new ArrayList<Reference>(); 1364 for (Reference i : communicationRequest) 1365 dst.communicationRequest.add(i.copy()); 1366 }; 1367 return dst; 1368 } 1369 1370 protected ProcessResponse typedCopy() { 1371 return copy(); 1372 } 1373 1374 @Override 1375 public boolean equalsDeep(Base other) { 1376 if (!super.equalsDeep(other)) 1377 return false; 1378 if (!(other instanceof ProcessResponse)) 1379 return false; 1380 ProcessResponse o = (ProcessResponse) other; 1381 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(created, o.created, true) 1382 && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) 1383 && compareDeep(disposition, o.disposition, true) && compareDeep(requestProvider, o.requestProvider, true) 1384 && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(form, o.form, true) 1385 && compareDeep(processNote, o.processNote, true) && compareDeep(error, o.error, true) && compareDeep(communicationRequest, o.communicationRequest, true) 1386 ; 1387 } 1388 1389 @Override 1390 public boolean equalsShallow(Base other) { 1391 if (!super.equalsShallow(other)) 1392 return false; 1393 if (!(other instanceof ProcessResponse)) 1394 return false; 1395 ProcessResponse o = (ProcessResponse) other; 1396 return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) 1397 ; 1398 } 1399 1400 public boolean isEmpty() { 1401 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, created 1402 , organization, request, outcome, disposition, requestProvider, requestOrganization 1403 , form, processNote, error, communicationRequest); 1404 } 1405 1406 @Override 1407 public ResourceType getResourceType() { 1408 return ResourceType.ProcessResponse; 1409 } 1410 1411 /** 1412 * Search parameter: <b>identifier</b> 1413 * <p> 1414 * Description: <b>The business identifier of the Explanation of Benefit</b><br> 1415 * Type: <b>token</b><br> 1416 * Path: <b>ProcessResponse.identifier</b><br> 1417 * </p> 1418 */ 1419 @SearchParamDefinition(name="identifier", path="ProcessResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) 1420 public static final String SP_IDENTIFIER = "identifier"; 1421 /** 1422 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1423 * <p> 1424 * Description: <b>The business identifier of the Explanation of Benefit</b><br> 1425 * Type: <b>token</b><br> 1426 * Path: <b>ProcessResponse.identifier</b><br> 1427 * </p> 1428 */ 1429 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1430 1431 /** 1432 * Search parameter: <b>request</b> 1433 * <p> 1434 * Description: <b>The reference to the claim</b><br> 1435 * Type: <b>reference</b><br> 1436 * Path: <b>ProcessResponse.request</b><br> 1437 * </p> 1438 */ 1439 @SearchParamDefinition(name="request", path="ProcessResponse.request", description="The reference to the claim", type="reference" ) 1440 public static final String SP_REQUEST = "request"; 1441 /** 1442 * <b>Fluent Client</b> search parameter constant for <b>request</b> 1443 * <p> 1444 * Description: <b>The reference to the claim</b><br> 1445 * Type: <b>reference</b><br> 1446 * Path: <b>ProcessResponse.request</b><br> 1447 * </p> 1448 */ 1449 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); 1450 1451/** 1452 * Constant for fluent queries to be used to add include statements. Specifies 1453 * the path value of "<b>ProcessResponse:request</b>". 1454 */ 1455 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("ProcessResponse:request").toLocked(); 1456 1457 /** 1458 * Search parameter: <b>organization</b> 1459 * <p> 1460 * Description: <b>The organization who generated this resource</b><br> 1461 * Type: <b>reference</b><br> 1462 * Path: <b>ProcessResponse.organization</b><br> 1463 * </p> 1464 */ 1465 @SearchParamDefinition(name="organization", path="ProcessResponse.organization", description="The organization who generated this resource", type="reference", target={Organization.class } ) 1466 public static final String SP_ORGANIZATION = "organization"; 1467 /** 1468 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 1469 * <p> 1470 * Description: <b>The organization who generated this resource</b><br> 1471 * Type: <b>reference</b><br> 1472 * Path: <b>ProcessResponse.organization</b><br> 1473 * </p> 1474 */ 1475 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 1476 1477/** 1478 * Constant for fluent queries to be used to add include statements. Specifies 1479 * the path value of "<b>ProcessResponse:organization</b>". 1480 */ 1481 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessResponse:organization").toLocked(); 1482 1483 /** 1484 * Search parameter: <b>request-organization</b> 1485 * <p> 1486 * Description: <b>The Organization who is responsible the request transaction</b><br> 1487 * Type: <b>reference</b><br> 1488 * Path: <b>ProcessResponse.requestOrganization</b><br> 1489 * </p> 1490 */ 1491 @SearchParamDefinition(name="request-organization", path="ProcessResponse.requestOrganization", description="The Organization who is responsible the request transaction", type="reference", target={Organization.class } ) 1492 public static final String SP_REQUEST_ORGANIZATION = "request-organization"; 1493 /** 1494 * <b>Fluent Client</b> search parameter constant for <b>request-organization</b> 1495 * <p> 1496 * Description: <b>The Organization who is responsible the request transaction</b><br> 1497 * Type: <b>reference</b><br> 1498 * Path: <b>ProcessResponse.requestOrganization</b><br> 1499 * </p> 1500 */ 1501 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST_ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST_ORGANIZATION); 1502 1503/** 1504 * Constant for fluent queries to be used to add include statements. Specifies 1505 * the path value of "<b>ProcessResponse:request-organization</b>". 1506 */ 1507 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessResponse:request-organization").toLocked(); 1508 1509 /** 1510 * Search parameter: <b>request-provider</b> 1511 * <p> 1512 * Description: <b>The Provider who is responsible the request transaction</b><br> 1513 * Type: <b>reference</b><br> 1514 * Path: <b>ProcessResponse.requestProvider</b><br> 1515 * </p> 1516 */ 1517 @SearchParamDefinition(name="request-provider", path="ProcessResponse.requestProvider", description="The Provider who is responsible the request transaction", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 1518 public static final String SP_REQUEST_PROVIDER = "request-provider"; 1519 /** 1520 * <b>Fluent Client</b> search parameter constant for <b>request-provider</b> 1521 * <p> 1522 * Description: <b>The Provider who is responsible the request transaction</b><br> 1523 * Type: <b>reference</b><br> 1524 * Path: <b>ProcessResponse.requestProvider</b><br> 1525 * </p> 1526 */ 1527 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST_PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST_PROVIDER); 1528 1529/** 1530 * Constant for fluent queries to be used to add include statements. Specifies 1531 * the path value of "<b>ProcessResponse:request-provider</b>". 1532 */ 1533 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST_PROVIDER = new ca.uhn.fhir.model.api.Include("ProcessResponse:request-provider").toLocked(); 1534 1535 1536} 1537