001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import org.hl7.fhir.r4.model.Enumerations.*; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource. 051 */ 052@ResourceDef(name="EnrollmentResponse", profile="http://hl7.org/fhir/StructureDefinition/EnrollmentResponse") 053public class EnrollmentResponse extends DomainResource { 054 055 public enum EnrollmentResponseStatus { 056 /** 057 * The instance is currently in-force. 058 */ 059 ACTIVE, 060 /** 061 * The instance is withdrawn, rescinded or reversed. 062 */ 063 CANCELLED, 064 /** 065 * A new instance the contents of which is not complete. 066 */ 067 DRAFT, 068 /** 069 * The instance was entered in error. 070 */ 071 ENTEREDINERROR, 072 /** 073 * added to help the parsers with the generic types 074 */ 075 NULL; 076 public static EnrollmentResponseStatus fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("active".equals(codeString)) 080 return ACTIVE; 081 if ("cancelled".equals(codeString)) 082 return CANCELLED; 083 if ("draft".equals(codeString)) 084 return DRAFT; 085 if ("entered-in-error".equals(codeString)) 086 return ENTEREDINERROR; 087 if (Configuration.isAcceptInvalidEnums()) 088 return null; 089 else 090 throw new FHIRException("Unknown EnrollmentResponseStatus code '"+codeString+"'"); 091 } 092 public String toCode() { 093 switch (this) { 094 case ACTIVE: return "active"; 095 case CANCELLED: return "cancelled"; 096 case DRAFT: return "draft"; 097 case ENTEREDINERROR: return "entered-in-error"; 098 case NULL: return null; 099 default: return "?"; 100 } 101 } 102 public String getSystem() { 103 switch (this) { 104 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 105 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 106 case DRAFT: return "http://hl7.org/fhir/fm-status"; 107 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 108 case NULL: return null; 109 default: return "?"; 110 } 111 } 112 public String getDefinition() { 113 switch (this) { 114 case ACTIVE: return "The instance is currently in-force."; 115 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 116 case DRAFT: return "A new instance the contents of which is not complete."; 117 case ENTEREDINERROR: return "The instance was entered in error."; 118 case NULL: return null; 119 default: return "?"; 120 } 121 } 122 public String getDisplay() { 123 switch (this) { 124 case ACTIVE: return "Active"; 125 case CANCELLED: return "Cancelled"; 126 case DRAFT: return "Draft"; 127 case ENTEREDINERROR: return "Entered in Error"; 128 case NULL: return null; 129 default: return "?"; 130 } 131 } 132 } 133 134 public static class EnrollmentResponseStatusEnumFactory implements EnumFactory<EnrollmentResponseStatus> { 135 public EnrollmentResponseStatus fromCode(String codeString) throws IllegalArgumentException { 136 if (codeString == null || "".equals(codeString)) 137 if (codeString == null || "".equals(codeString)) 138 return null; 139 if ("active".equals(codeString)) 140 return EnrollmentResponseStatus.ACTIVE; 141 if ("cancelled".equals(codeString)) 142 return EnrollmentResponseStatus.CANCELLED; 143 if ("draft".equals(codeString)) 144 return EnrollmentResponseStatus.DRAFT; 145 if ("entered-in-error".equals(codeString)) 146 return EnrollmentResponseStatus.ENTEREDINERROR; 147 throw new IllegalArgumentException("Unknown EnrollmentResponseStatus code '"+codeString+"'"); 148 } 149 public Enumeration<EnrollmentResponseStatus> fromType(Base code) throws FHIRException { 150 if (code == null) 151 return null; 152 if (code.isEmpty()) 153 return new Enumeration<EnrollmentResponseStatus>(this); 154 String codeString = ((PrimitiveType) code).asStringValue(); 155 if (codeString == null || "".equals(codeString)) 156 return null; 157 if ("active".equals(codeString)) 158 return new Enumeration<EnrollmentResponseStatus>(this, EnrollmentResponseStatus.ACTIVE); 159 if ("cancelled".equals(codeString)) 160 return new Enumeration<EnrollmentResponseStatus>(this, EnrollmentResponseStatus.CANCELLED); 161 if ("draft".equals(codeString)) 162 return new Enumeration<EnrollmentResponseStatus>(this, EnrollmentResponseStatus.DRAFT); 163 if ("entered-in-error".equals(codeString)) 164 return new Enumeration<EnrollmentResponseStatus>(this, EnrollmentResponseStatus.ENTEREDINERROR); 165 throw new FHIRException("Unknown EnrollmentResponseStatus code '"+codeString+"'"); 166 } 167 public String toCode(EnrollmentResponseStatus code) { 168 if (code == EnrollmentResponseStatus.ACTIVE) 169 return "active"; 170 if (code == EnrollmentResponseStatus.CANCELLED) 171 return "cancelled"; 172 if (code == EnrollmentResponseStatus.DRAFT) 173 return "draft"; 174 if (code == EnrollmentResponseStatus.ENTEREDINERROR) 175 return "entered-in-error"; 176 return "?"; 177 } 178 public String toSystem(EnrollmentResponseStatus code) { 179 return code.getSystem(); 180 } 181 } 182 183 /** 184 * The Response business identifier. 185 */ 186 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 187 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 188 protected List<Identifier> identifier; 189 190 /** 191 * The status of the resource instance. 192 */ 193 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 194 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 195 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 196 protected Enumeration<EnrollmentResponseStatus> status; 197 198 /** 199 * Original request resource reference. 200 */ 201 @Child(name = "request", type = {EnrollmentRequest.class}, order=2, min=0, max=1, modifier=false, summary=false) 202 @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) 203 protected Reference request; 204 205 /** 206 * The actual object that is the target of the reference (Original request resource reference.) 207 */ 208 protected EnrollmentRequest requestTarget; 209 210 /** 211 * Processing status: error, complete. 212 */ 213 @Child(name = "outcome", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 214 @Description(shortDefinition="queued | complete | error | partial", formalDefinition="Processing status: error, complete." ) 215 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") 216 protected Enumeration<RemittanceOutcome> outcome; 217 218 /** 219 * A description of the status of the adjudication. 220 */ 221 @Child(name = "disposition", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 222 @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) 223 protected StringType disposition; 224 225 /** 226 * The date when the enclosed suite of services were performed or completed. 227 */ 228 @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 229 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 230 protected DateTimeType created; 231 232 /** 233 * The Insurer who produced this adjudicated response. 234 */ 235 @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) 236 @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) 237 protected Reference organization; 238 239 /** 240 * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) 241 */ 242 protected Organization organizationTarget; 243 244 /** 245 * The practitioner who is responsible for the services rendered to the patient. 246 */ 247 @Child(name = "requestProvider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=false) 248 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 249 protected Reference requestProvider; 250 251 /** 252 * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) 253 */ 254 protected Resource requestProviderTarget; 255 256 private static final long serialVersionUID = -1759921458L; 257 258 /** 259 * Constructor 260 */ 261 public EnrollmentResponse() { 262 super(); 263 } 264 265 /** 266 * @return {@link #identifier} (The Response business identifier.) 267 */ 268 public List<Identifier> getIdentifier() { 269 if (this.identifier == null) 270 this.identifier = new ArrayList<Identifier>(); 271 return this.identifier; 272 } 273 274 /** 275 * @return Returns a reference to <code>this</code> for easy method chaining 276 */ 277 public EnrollmentResponse setIdentifier(List<Identifier> theIdentifier) { 278 this.identifier = theIdentifier; 279 return this; 280 } 281 282 public boolean hasIdentifier() { 283 if (this.identifier == null) 284 return false; 285 for (Identifier item : this.identifier) 286 if (!item.isEmpty()) 287 return true; 288 return false; 289 } 290 291 public Identifier addIdentifier() { //3 292 Identifier t = new Identifier(); 293 if (this.identifier == null) 294 this.identifier = new ArrayList<Identifier>(); 295 this.identifier.add(t); 296 return t; 297 } 298 299 public EnrollmentResponse addIdentifier(Identifier t) { //3 300 if (t == null) 301 return this; 302 if (this.identifier == null) 303 this.identifier = new ArrayList<Identifier>(); 304 this.identifier.add(t); 305 return this; 306 } 307 308 /** 309 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 310 */ 311 public Identifier getIdentifierFirstRep() { 312 if (getIdentifier().isEmpty()) { 313 addIdentifier(); 314 } 315 return getIdentifier().get(0); 316 } 317 318 /** 319 * @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 320 */ 321 public Enumeration<EnrollmentResponseStatus> getStatusElement() { 322 if (this.status == null) 323 if (Configuration.errorOnAutoCreate()) 324 throw new Error("Attempt to auto-create EnrollmentResponse.status"); 325 else if (Configuration.doAutoCreate()) 326 this.status = new Enumeration<EnrollmentResponseStatus>(new EnrollmentResponseStatusEnumFactory()); // bb 327 return this.status; 328 } 329 330 public boolean hasStatusElement() { 331 return this.status != null && !this.status.isEmpty(); 332 } 333 334 public boolean hasStatus() { 335 return this.status != null && !this.status.isEmpty(); 336 } 337 338 /** 339 * @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 340 */ 341 public EnrollmentResponse setStatusElement(Enumeration<EnrollmentResponseStatus> value) { 342 this.status = value; 343 return this; 344 } 345 346 /** 347 * @return The status of the resource instance. 348 */ 349 public EnrollmentResponseStatus getStatus() { 350 return this.status == null ? null : this.status.getValue(); 351 } 352 353 /** 354 * @param value The status of the resource instance. 355 */ 356 public EnrollmentResponse setStatus(EnrollmentResponseStatus value) { 357 if (value == null) 358 this.status = null; 359 else { 360 if (this.status == null) 361 this.status = new Enumeration<EnrollmentResponseStatus>(new EnrollmentResponseStatusEnumFactory()); 362 this.status.setValue(value); 363 } 364 return this; 365 } 366 367 /** 368 * @return {@link #request} (Original request resource reference.) 369 */ 370 public Reference getRequest() { 371 if (this.request == null) 372 if (Configuration.errorOnAutoCreate()) 373 throw new Error("Attempt to auto-create EnrollmentResponse.request"); 374 else if (Configuration.doAutoCreate()) 375 this.request = new Reference(); // cc 376 return this.request; 377 } 378 379 public boolean hasRequest() { 380 return this.request != null && !this.request.isEmpty(); 381 } 382 383 /** 384 * @param value {@link #request} (Original request resource reference.) 385 */ 386 public EnrollmentResponse setRequest(Reference value) { 387 this.request = value; 388 return this; 389 } 390 391 /** 392 * @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.) 393 */ 394 public EnrollmentRequest getRequestTarget() { 395 if (this.requestTarget == null) 396 if (Configuration.errorOnAutoCreate()) 397 throw new Error("Attempt to auto-create EnrollmentResponse.request"); 398 else if (Configuration.doAutoCreate()) 399 this.requestTarget = new EnrollmentRequest(); // aa 400 return this.requestTarget; 401 } 402 403 /** 404 * @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.) 405 */ 406 public EnrollmentResponse setRequestTarget(EnrollmentRequest value) { 407 this.requestTarget = value; 408 return this; 409 } 410 411 /** 412 * @return {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 413 */ 414 public Enumeration<RemittanceOutcome> getOutcomeElement() { 415 if (this.outcome == null) 416 if (Configuration.errorOnAutoCreate()) 417 throw new Error("Attempt to auto-create EnrollmentResponse.outcome"); 418 else if (Configuration.doAutoCreate()) 419 this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); // bb 420 return this.outcome; 421 } 422 423 public boolean hasOutcomeElement() { 424 return this.outcome != null && !this.outcome.isEmpty(); 425 } 426 427 public boolean hasOutcome() { 428 return this.outcome != null && !this.outcome.isEmpty(); 429 } 430 431 /** 432 * @param value {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 433 */ 434 public EnrollmentResponse setOutcomeElement(Enumeration<RemittanceOutcome> value) { 435 this.outcome = value; 436 return this; 437 } 438 439 /** 440 * @return Processing status: error, complete. 441 */ 442 public RemittanceOutcome getOutcome() { 443 return this.outcome == null ? null : this.outcome.getValue(); 444 } 445 446 /** 447 * @param value Processing status: error, complete. 448 */ 449 public EnrollmentResponse setOutcome(RemittanceOutcome value) { 450 if (value == null) 451 this.outcome = null; 452 else { 453 if (this.outcome == null) 454 this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); 455 this.outcome.setValue(value); 456 } 457 return this; 458 } 459 460 /** 461 * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 462 */ 463 public StringType getDispositionElement() { 464 if (this.disposition == null) 465 if (Configuration.errorOnAutoCreate()) 466 throw new Error("Attempt to auto-create EnrollmentResponse.disposition"); 467 else if (Configuration.doAutoCreate()) 468 this.disposition = new StringType(); // bb 469 return this.disposition; 470 } 471 472 public boolean hasDispositionElement() { 473 return this.disposition != null && !this.disposition.isEmpty(); 474 } 475 476 public boolean hasDisposition() { 477 return this.disposition != null && !this.disposition.isEmpty(); 478 } 479 480 /** 481 * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 482 */ 483 public EnrollmentResponse setDispositionElement(StringType value) { 484 this.disposition = value; 485 return this; 486 } 487 488 /** 489 * @return A description of the status of the adjudication. 490 */ 491 public String getDisposition() { 492 return this.disposition == null ? null : this.disposition.getValue(); 493 } 494 495 /** 496 * @param value A description of the status of the adjudication. 497 */ 498 public EnrollmentResponse setDisposition(String value) { 499 if (Utilities.noString(value)) 500 this.disposition = null; 501 else { 502 if (this.disposition == null) 503 this.disposition = new StringType(); 504 this.disposition.setValue(value); 505 } 506 return this; 507 } 508 509 /** 510 * @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 511 */ 512 public DateTimeType getCreatedElement() { 513 if (this.created == null) 514 if (Configuration.errorOnAutoCreate()) 515 throw new Error("Attempt to auto-create EnrollmentResponse.created"); 516 else if (Configuration.doAutoCreate()) 517 this.created = new DateTimeType(); // bb 518 return this.created; 519 } 520 521 public boolean hasCreatedElement() { 522 return this.created != null && !this.created.isEmpty(); 523 } 524 525 public boolean hasCreated() { 526 return this.created != null && !this.created.isEmpty(); 527 } 528 529 /** 530 * @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 531 */ 532 public EnrollmentResponse setCreatedElement(DateTimeType value) { 533 this.created = value; 534 return this; 535 } 536 537 /** 538 * @return The date when the enclosed suite of services were performed or completed. 539 */ 540 public Date getCreated() { 541 return this.created == null ? null : this.created.getValue(); 542 } 543 544 /** 545 * @param value The date when the enclosed suite of services were performed or completed. 546 */ 547 public EnrollmentResponse setCreated(Date value) { 548 if (value == null) 549 this.created = null; 550 else { 551 if (this.created == null) 552 this.created = new DateTimeType(); 553 this.created.setValue(value); 554 } 555 return this; 556 } 557 558 /** 559 * @return {@link #organization} (The Insurer who produced this adjudicated response.) 560 */ 561 public Reference getOrganization() { 562 if (this.organization == null) 563 if (Configuration.errorOnAutoCreate()) 564 throw new Error("Attempt to auto-create EnrollmentResponse.organization"); 565 else if (Configuration.doAutoCreate()) 566 this.organization = new Reference(); // cc 567 return this.organization; 568 } 569 570 public boolean hasOrganization() { 571 return this.organization != null && !this.organization.isEmpty(); 572 } 573 574 /** 575 * @param value {@link #organization} (The Insurer who produced this adjudicated response.) 576 */ 577 public EnrollmentResponse setOrganization(Reference value) { 578 this.organization = value; 579 return this; 580 } 581 582 /** 583 * @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 Insurer who produced this adjudicated response.) 584 */ 585 public Organization getOrganizationTarget() { 586 if (this.organizationTarget == null) 587 if (Configuration.errorOnAutoCreate()) 588 throw new Error("Attempt to auto-create EnrollmentResponse.organization"); 589 else if (Configuration.doAutoCreate()) 590 this.organizationTarget = new Organization(); // aa 591 return this.organizationTarget; 592 } 593 594 /** 595 * @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 Insurer who produced this adjudicated response.) 596 */ 597 public EnrollmentResponse setOrganizationTarget(Organization value) { 598 this.organizationTarget = value; 599 return this; 600 } 601 602 /** 603 * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 604 */ 605 public Reference getRequestProvider() { 606 if (this.requestProvider == null) 607 if (Configuration.errorOnAutoCreate()) 608 throw new Error("Attempt to auto-create EnrollmentResponse.requestProvider"); 609 else if (Configuration.doAutoCreate()) 610 this.requestProvider = new Reference(); // cc 611 return this.requestProvider; 612 } 613 614 public boolean hasRequestProvider() { 615 return this.requestProvider != null && !this.requestProvider.isEmpty(); 616 } 617 618 /** 619 * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 620 */ 621 public EnrollmentResponse setRequestProvider(Reference value) { 622 this.requestProvider = value; 623 return this; 624 } 625 626 /** 627 * @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.) 628 */ 629 public Resource getRequestProviderTarget() { 630 return this.requestProviderTarget; 631 } 632 633 /** 634 * @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.) 635 */ 636 public EnrollmentResponse setRequestProviderTarget(Resource value) { 637 this.requestProviderTarget = value; 638 return this; 639 } 640 641 protected void listChildren(List<Property> children) { 642 super.listChildren(children); 643 children.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 644 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 645 children.add(new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request)); 646 children.add(new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome)); 647 children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); 648 children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); 649 children.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization)); 650 children.add(new Property("requestProvider", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); 651 } 652 653 @Override 654 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 655 switch (_hash) { 656 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier); 657 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 658 case 1095692943: /*request*/ return new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request); 659 case -1106507950: /*outcome*/ return new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome); 660 case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); 661 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); 662 case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization); 663 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); 664 default: return super.getNamedProperty(_hash, _name, _checkValid); 665 } 666 667 } 668 669 @Override 670 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 671 switch (hash) { 672 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 673 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EnrollmentResponseStatus> 674 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 675 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome> 676 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 677 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 678 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference 679 case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference 680 default: return super.getProperty(hash, name, checkValid); 681 } 682 683 } 684 685 @Override 686 public Base setProperty(int hash, String name, Base value) throws FHIRException { 687 switch (hash) { 688 case -1618432855: // identifier 689 this.getIdentifier().add(castToIdentifier(value)); // Identifier 690 return value; 691 case -892481550: // status 692 value = new EnrollmentResponseStatusEnumFactory().fromType(castToCode(value)); 693 this.status = (Enumeration) value; // Enumeration<EnrollmentResponseStatus> 694 return value; 695 case 1095692943: // request 696 this.request = castToReference(value); // Reference 697 return value; 698 case -1106507950: // outcome 699 value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); 700 this.outcome = (Enumeration) value; // Enumeration<RemittanceOutcome> 701 return value; 702 case 583380919: // disposition 703 this.disposition = castToString(value); // StringType 704 return value; 705 case 1028554472: // created 706 this.created = castToDateTime(value); // DateTimeType 707 return value; 708 case 1178922291: // organization 709 this.organization = castToReference(value); // Reference 710 return value; 711 case 1601527200: // requestProvider 712 this.requestProvider = castToReference(value); // Reference 713 return value; 714 default: return super.setProperty(hash, name, value); 715 } 716 717 } 718 719 @Override 720 public Base setProperty(String name, Base value) throws FHIRException { 721 if (name.equals("identifier")) { 722 this.getIdentifier().add(castToIdentifier(value)); 723 } else if (name.equals("status")) { 724 value = new EnrollmentResponseStatusEnumFactory().fromType(castToCode(value)); 725 this.status = (Enumeration) value; // Enumeration<EnrollmentResponseStatus> 726 } else if (name.equals("request")) { 727 this.request = castToReference(value); // Reference 728 } else if (name.equals("outcome")) { 729 value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value)); 730 this.outcome = (Enumeration) value; // Enumeration<RemittanceOutcome> 731 } else if (name.equals("disposition")) { 732 this.disposition = castToString(value); // StringType 733 } else if (name.equals("created")) { 734 this.created = castToDateTime(value); // DateTimeType 735 } else if (name.equals("organization")) { 736 this.organization = castToReference(value); // Reference 737 } else if (name.equals("requestProvider")) { 738 this.requestProvider = castToReference(value); // Reference 739 } else 740 return super.setProperty(name, value); 741 return value; 742 } 743 744 @Override 745 public Base makeProperty(int hash, String name) throws FHIRException { 746 switch (hash) { 747 case -1618432855: return addIdentifier(); 748 case -892481550: return getStatusElement(); 749 case 1095692943: return getRequest(); 750 case -1106507950: return getOutcomeElement(); 751 case 583380919: return getDispositionElement(); 752 case 1028554472: return getCreatedElement(); 753 case 1178922291: return getOrganization(); 754 case 1601527200: return getRequestProvider(); 755 default: return super.makeProperty(hash, name); 756 } 757 758 } 759 760 @Override 761 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 762 switch (hash) { 763 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 764 case -892481550: /*status*/ return new String[] {"code"}; 765 case 1095692943: /*request*/ return new String[] {"Reference"}; 766 case -1106507950: /*outcome*/ return new String[] {"code"}; 767 case 583380919: /*disposition*/ return new String[] {"string"}; 768 case 1028554472: /*created*/ return new String[] {"dateTime"}; 769 case 1178922291: /*organization*/ return new String[] {"Reference"}; 770 case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; 771 default: return super.getTypesForProperty(hash, name); 772 } 773 774 } 775 776 @Override 777 public Base addChild(String name) throws FHIRException { 778 if (name.equals("identifier")) { 779 return addIdentifier(); 780 } 781 else if (name.equals("status")) { 782 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.status"); 783 } 784 else if (name.equals("request")) { 785 this.request = new Reference(); 786 return this.request; 787 } 788 else if (name.equals("outcome")) { 789 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.outcome"); 790 } 791 else if (name.equals("disposition")) { 792 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.disposition"); 793 } 794 else if (name.equals("created")) { 795 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.created"); 796 } 797 else if (name.equals("organization")) { 798 this.organization = new Reference(); 799 return this.organization; 800 } 801 else if (name.equals("requestProvider")) { 802 this.requestProvider = new Reference(); 803 return this.requestProvider; 804 } 805 else 806 return super.addChild(name); 807 } 808 809 public String fhirType() { 810 return "EnrollmentResponse"; 811 812 } 813 814 public EnrollmentResponse copy() { 815 EnrollmentResponse dst = new EnrollmentResponse(); 816 copyValues(dst); 817 return dst; 818 } 819 820 public void copyValues(EnrollmentResponse dst) { 821 super.copyValues(dst); 822 if (identifier != null) { 823 dst.identifier = new ArrayList<Identifier>(); 824 for (Identifier i : identifier) 825 dst.identifier.add(i.copy()); 826 }; 827 dst.status = status == null ? null : status.copy(); 828 dst.request = request == null ? null : request.copy(); 829 dst.outcome = outcome == null ? null : outcome.copy(); 830 dst.disposition = disposition == null ? null : disposition.copy(); 831 dst.created = created == null ? null : created.copy(); 832 dst.organization = organization == null ? null : organization.copy(); 833 dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); 834 } 835 836 protected EnrollmentResponse typedCopy() { 837 return copy(); 838 } 839 840 @Override 841 public boolean equalsDeep(Base other_) { 842 if (!super.equalsDeep(other_)) 843 return false; 844 if (!(other_ instanceof EnrollmentResponse)) 845 return false; 846 EnrollmentResponse o = (EnrollmentResponse) other_; 847 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(request, o.request, true) 848 && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true) && compareDeep(created, o.created, true) 849 && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) 850 ; 851 } 852 853 @Override 854 public boolean equalsShallow(Base other_) { 855 if (!super.equalsShallow(other_)) 856 return false; 857 if (!(other_ instanceof EnrollmentResponse)) 858 return false; 859 EnrollmentResponse o = (EnrollmentResponse) other_; 860 return compareValues(status, o.status, true) && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) 861 && compareValues(created, o.created, true); 862 } 863 864 public boolean isEmpty() { 865 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, request 866 , outcome, disposition, created, organization, requestProvider); 867 } 868 869 @Override 870 public ResourceType getResourceType() { 871 return ResourceType.EnrollmentResponse; 872 } 873 874 /** 875 * Search parameter: <b>identifier</b> 876 * <p> 877 * Description: <b>The business identifier of the EnrollmentResponse</b><br> 878 * Type: <b>token</b><br> 879 * Path: <b>EnrollmentResponse.identifier</b><br> 880 * </p> 881 */ 882 @SearchParamDefinition(name="identifier", path="EnrollmentResponse.identifier", description="The business identifier of the EnrollmentResponse", type="token" ) 883 public static final String SP_IDENTIFIER = "identifier"; 884 /** 885 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 886 * <p> 887 * Description: <b>The business identifier of the EnrollmentResponse</b><br> 888 * Type: <b>token</b><br> 889 * Path: <b>EnrollmentResponse.identifier</b><br> 890 * </p> 891 */ 892 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 893 894 /** 895 * Search parameter: <b>request</b> 896 * <p> 897 * Description: <b>The reference to the claim</b><br> 898 * Type: <b>reference</b><br> 899 * Path: <b>EnrollmentResponse.request</b><br> 900 * </p> 901 */ 902 @SearchParamDefinition(name="request", path="EnrollmentResponse.request", description="The reference to the claim", type="reference", target={EnrollmentRequest.class } ) 903 public static final String SP_REQUEST = "request"; 904 /** 905 * <b>Fluent Client</b> search parameter constant for <b>request</b> 906 * <p> 907 * Description: <b>The reference to the claim</b><br> 908 * Type: <b>reference</b><br> 909 * Path: <b>EnrollmentResponse.request</b><br> 910 * </p> 911 */ 912 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); 913 914/** 915 * Constant for fluent queries to be used to add include statements. Specifies 916 * the path value of "<b>EnrollmentResponse:request</b>". 917 */ 918 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("EnrollmentResponse:request").toLocked(); 919 920 /** 921 * Search parameter: <b>status</b> 922 * <p> 923 * Description: <b>The status of the enrollment response</b><br> 924 * Type: <b>token</b><br> 925 * Path: <b>EnrollmentResponse.status</b><br> 926 * </p> 927 */ 928 @SearchParamDefinition(name="status", path="EnrollmentResponse.status", description="The status of the enrollment response", type="token" ) 929 public static final String SP_STATUS = "status"; 930 /** 931 * <b>Fluent Client</b> search parameter constant for <b>status</b> 932 * <p> 933 * Description: <b>The status of the enrollment response</b><br> 934 * Type: <b>token</b><br> 935 * Path: <b>EnrollmentResponse.status</b><br> 936 * </p> 937 */ 938 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 939 940 941}