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