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