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