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