001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import ca.uhn.fhir.model.api.annotation.ResourceDef; 041import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.ChildOrder; 044import ca.uhn.fhir.model.api.annotation.Description; 045import ca.uhn.fhir.model.api.annotation.Block; 046import org.hl7.fhir.instance.model.api.*; 047import org.hl7.fhir.exceptions.FHIRException; 048/** 049 * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment. 050 */ 051@ResourceDef(name="Coverage", profile="http://hl7.org/fhir/StructureDefinition/Coverage") 052public class Coverage extends DomainResource { 053 054 public enum CoverageStatus { 055 /** 056 * The instance is currently in-force. 057 */ 058 ACTIVE, 059 /** 060 * The instance is withdrawn, rescinded or reversed. 061 */ 062 CANCELLED, 063 /** 064 * A new instance the contents of which is not complete. 065 */ 066 DRAFT, 067 /** 068 * The instance was entered in error. 069 */ 070 ENTEREDINERROR, 071 /** 072 * added to help the parsers with the generic types 073 */ 074 NULL; 075 public static CoverageStatus fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("active".equals(codeString)) 079 return ACTIVE; 080 if ("cancelled".equals(codeString)) 081 return CANCELLED; 082 if ("draft".equals(codeString)) 083 return DRAFT; 084 if ("entered-in-error".equals(codeString)) 085 return ENTEREDINERROR; 086 if (Configuration.isAcceptInvalidEnums()) 087 return null; 088 else 089 throw new FHIRException("Unknown CoverageStatus code '"+codeString+"'"); 090 } 091 public String toCode() { 092 switch (this) { 093 case ACTIVE: return "active"; 094 case CANCELLED: return "cancelled"; 095 case DRAFT: return "draft"; 096 case ENTEREDINERROR: return "entered-in-error"; 097 default: return "?"; 098 } 099 } 100 public String getSystem() { 101 switch (this) { 102 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 103 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 104 case DRAFT: return "http://hl7.org/fhir/fm-status"; 105 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 106 default: return "?"; 107 } 108 } 109 public String getDefinition() { 110 switch (this) { 111 case ACTIVE: return "The instance is currently in-force."; 112 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 113 case DRAFT: return "A new instance the contents of which is not complete."; 114 case ENTEREDINERROR: return "The instance was entered in error."; 115 default: return "?"; 116 } 117 } 118 public String getDisplay() { 119 switch (this) { 120 case ACTIVE: return "Active"; 121 case CANCELLED: return "Cancelled"; 122 case DRAFT: return "Draft"; 123 case ENTEREDINERROR: return "Entered in Error"; 124 default: return "?"; 125 } 126 } 127 } 128 129 public static class CoverageStatusEnumFactory implements EnumFactory<CoverageStatus> { 130 public CoverageStatus fromCode(String codeString) throws IllegalArgumentException { 131 if (codeString == null || "".equals(codeString)) 132 if (codeString == null || "".equals(codeString)) 133 return null; 134 if ("active".equals(codeString)) 135 return CoverageStatus.ACTIVE; 136 if ("cancelled".equals(codeString)) 137 return CoverageStatus.CANCELLED; 138 if ("draft".equals(codeString)) 139 return CoverageStatus.DRAFT; 140 if ("entered-in-error".equals(codeString)) 141 return CoverageStatus.ENTEREDINERROR; 142 throw new IllegalArgumentException("Unknown CoverageStatus code '"+codeString+"'"); 143 } 144 public Enumeration<CoverageStatus> fromType(Base code) throws FHIRException { 145 if (code == null) 146 return null; 147 if (code.isEmpty()) 148 return new Enumeration<CoverageStatus>(this); 149 String codeString = ((PrimitiveType) code).asStringValue(); 150 if (codeString == null || "".equals(codeString)) 151 return null; 152 if ("active".equals(codeString)) 153 return new Enumeration<CoverageStatus>(this, CoverageStatus.ACTIVE); 154 if ("cancelled".equals(codeString)) 155 return new Enumeration<CoverageStatus>(this, CoverageStatus.CANCELLED); 156 if ("draft".equals(codeString)) 157 return new Enumeration<CoverageStatus>(this, CoverageStatus.DRAFT); 158 if ("entered-in-error".equals(codeString)) 159 return new Enumeration<CoverageStatus>(this, CoverageStatus.ENTEREDINERROR); 160 throw new FHIRException("Unknown CoverageStatus code '"+codeString+"'"); 161 } 162 public String toCode(CoverageStatus code) { 163 if (code == CoverageStatus.ACTIVE) 164 return "active"; 165 if (code == CoverageStatus.CANCELLED) 166 return "cancelled"; 167 if (code == CoverageStatus.DRAFT) 168 return "draft"; 169 if (code == CoverageStatus.ENTEREDINERROR) 170 return "entered-in-error"; 171 return "?"; 172 } 173 public String toSystem(CoverageStatus code) { 174 return code.getSystem(); 175 } 176 } 177 178 @Block() 179 public static class ClassComponent extends BackboneElement implements IBaseBackboneElement { 180 /** 181 * The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan. 182 */ 183 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 184 @Description(shortDefinition="Type of class such as 'group' or 'plan'", formalDefinition="The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan." ) 185 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/coverage-class") 186 protected CodeableConcept type; 187 188 /** 189 * The alphanumeric string value associated with the insurer issued label. 190 */ 191 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 192 @Description(shortDefinition="Value associated with the type", formalDefinition="The alphanumeric string value associated with the insurer issued label." ) 193 protected StringType value; 194 195 /** 196 * A short description for the class. 197 */ 198 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 199 @Description(shortDefinition="Human readable description of the type and value", formalDefinition="A short description for the class." ) 200 protected StringType name; 201 202 private static final long serialVersionUID = -1501519769L; 203 204 /** 205 * Constructor 206 */ 207 public ClassComponent() { 208 super(); 209 } 210 211 /** 212 * Constructor 213 */ 214 public ClassComponent(CodeableConcept type, StringType value) { 215 super(); 216 this.type = type; 217 this.value = value; 218 } 219 220 /** 221 * @return {@link #type} (The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.) 222 */ 223 public CodeableConcept getType() { 224 if (this.type == null) 225 if (Configuration.errorOnAutoCreate()) 226 throw new Error("Attempt to auto-create ClassComponent.type"); 227 else if (Configuration.doAutoCreate()) 228 this.type = new CodeableConcept(); // cc 229 return this.type; 230 } 231 232 public boolean hasType() { 233 return this.type != null && !this.type.isEmpty(); 234 } 235 236 /** 237 * @param value {@link #type} (The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.) 238 */ 239 public ClassComponent setType(CodeableConcept value) { 240 this.type = value; 241 return this; 242 } 243 244 /** 245 * @return {@link #value} (The alphanumeric string value associated with the insurer issued label.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 246 */ 247 public StringType getValueElement() { 248 if (this.value == null) 249 if (Configuration.errorOnAutoCreate()) 250 throw new Error("Attempt to auto-create ClassComponent.value"); 251 else if (Configuration.doAutoCreate()) 252 this.value = new StringType(); // bb 253 return this.value; 254 } 255 256 public boolean hasValueElement() { 257 return this.value != null && !this.value.isEmpty(); 258 } 259 260 public boolean hasValue() { 261 return this.value != null && !this.value.isEmpty(); 262 } 263 264 /** 265 * @param value {@link #value} (The alphanumeric string value associated with the insurer issued label.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 266 */ 267 public ClassComponent setValueElement(StringType value) { 268 this.value = value; 269 return this; 270 } 271 272 /** 273 * @return The alphanumeric string value associated with the insurer issued label. 274 */ 275 public String getValue() { 276 return this.value == null ? null : this.value.getValue(); 277 } 278 279 /** 280 * @param value The alphanumeric string value associated with the insurer issued label. 281 */ 282 public ClassComponent setValue(String value) { 283 if (this.value == null) 284 this.value = new StringType(); 285 this.value.setValue(value); 286 return this; 287 } 288 289 /** 290 * @return {@link #name} (A short description for the class.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 291 */ 292 public StringType getNameElement() { 293 if (this.name == null) 294 if (Configuration.errorOnAutoCreate()) 295 throw new Error("Attempt to auto-create ClassComponent.name"); 296 else if (Configuration.doAutoCreate()) 297 this.name = new StringType(); // bb 298 return this.name; 299 } 300 301 public boolean hasNameElement() { 302 return this.name != null && !this.name.isEmpty(); 303 } 304 305 public boolean hasName() { 306 return this.name != null && !this.name.isEmpty(); 307 } 308 309 /** 310 * @param value {@link #name} (A short description for the class.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 311 */ 312 public ClassComponent setNameElement(StringType value) { 313 this.name = value; 314 return this; 315 } 316 317 /** 318 * @return A short description for the class. 319 */ 320 public String getName() { 321 return this.name == null ? null : this.name.getValue(); 322 } 323 324 /** 325 * @param value A short description for the class. 326 */ 327 public ClassComponent setName(String value) { 328 if (Utilities.noString(value)) 329 this.name = null; 330 else { 331 if (this.name == null) 332 this.name = new StringType(); 333 this.name.setValue(value); 334 } 335 return this; 336 } 337 338 protected void listChildren(List<Property> children) { 339 super.listChildren(children); 340 children.add(new Property("type", "CodeableConcept", "The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.", 0, 1, type)); 341 children.add(new Property("value", "string", "The alphanumeric string value associated with the insurer issued label.", 0, 1, value)); 342 children.add(new Property("name", "string", "A short description for the class.", 0, 1, name)); 343 } 344 345 @Override 346 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 347 switch (_hash) { 348 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.", 0, 1, type); 349 case 111972721: /*value*/ return new Property("value", "string", "The alphanumeric string value associated with the insurer issued label.", 0, 1, value); 350 case 3373707: /*name*/ return new Property("name", "string", "A short description for the class.", 0, 1, name); 351 default: return super.getNamedProperty(_hash, _name, _checkValid); 352 } 353 354 } 355 356 @Override 357 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 358 switch (hash) { 359 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 360 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 361 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 362 default: return super.getProperty(hash, name, checkValid); 363 } 364 365 } 366 367 @Override 368 public Base setProperty(int hash, String name, Base value) throws FHIRException { 369 switch (hash) { 370 case 3575610: // type 371 this.type = castToCodeableConcept(value); // CodeableConcept 372 return value; 373 case 111972721: // value 374 this.value = castToString(value); // StringType 375 return value; 376 case 3373707: // name 377 this.name = castToString(value); // StringType 378 return value; 379 default: return super.setProperty(hash, name, value); 380 } 381 382 } 383 384 @Override 385 public Base setProperty(String name, Base value) throws FHIRException { 386 if (name.equals("type")) { 387 this.type = castToCodeableConcept(value); // CodeableConcept 388 } else if (name.equals("value")) { 389 this.value = castToString(value); // StringType 390 } else if (name.equals("name")) { 391 this.name = castToString(value); // StringType 392 } else 393 return super.setProperty(name, value); 394 return value; 395 } 396 397 @Override 398 public Base makeProperty(int hash, String name) throws FHIRException { 399 switch (hash) { 400 case 3575610: return getType(); 401 case 111972721: return getValueElement(); 402 case 3373707: return getNameElement(); 403 default: return super.makeProperty(hash, name); 404 } 405 406 } 407 408 @Override 409 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 410 switch (hash) { 411 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 412 case 111972721: /*value*/ return new String[] {"string"}; 413 case 3373707: /*name*/ return new String[] {"string"}; 414 default: return super.getTypesForProperty(hash, name); 415 } 416 417 } 418 419 @Override 420 public Base addChild(String name) throws FHIRException { 421 if (name.equals("type")) { 422 this.type = new CodeableConcept(); 423 return this.type; 424 } 425 else if (name.equals("value")) { 426 throw new FHIRException("Cannot call addChild on a primitive type Coverage.value"); 427 } 428 else if (name.equals("name")) { 429 throw new FHIRException("Cannot call addChild on a primitive type Coverage.name"); 430 } 431 else 432 return super.addChild(name); 433 } 434 435 public ClassComponent copy() { 436 ClassComponent dst = new ClassComponent(); 437 copyValues(dst); 438 return dst; 439 } 440 441 public void copyValues(ClassComponent dst) { 442 super.copyValues(dst); 443 dst.type = type == null ? null : type.copy(); 444 dst.value = value == null ? null : value.copy(); 445 dst.name = name == null ? null : name.copy(); 446 } 447 448 @Override 449 public boolean equalsDeep(Base other_) { 450 if (!super.equalsDeep(other_)) 451 return false; 452 if (!(other_ instanceof ClassComponent)) 453 return false; 454 ClassComponent o = (ClassComponent) other_; 455 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(name, o.name, true) 456 ; 457 } 458 459 @Override 460 public boolean equalsShallow(Base other_) { 461 if (!super.equalsShallow(other_)) 462 return false; 463 if (!(other_ instanceof ClassComponent)) 464 return false; 465 ClassComponent o = (ClassComponent) other_; 466 return compareValues(value, o.value, true) && compareValues(name, o.name, true); 467 } 468 469 public boolean isEmpty() { 470 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value, name); 471 } 472 473 public String fhirType() { 474 return "Coverage.class"; 475 476 } 477 478 } 479 480 @Block() 481 public static class CostToBeneficiaryComponent extends BackboneElement implements IBaseBackboneElement { 482 /** 483 * The category of patient centric costs associated with treatment. 484 */ 485 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 486 @Description(shortDefinition="Cost category", formalDefinition="The category of patient centric costs associated with treatment." ) 487 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/coverage-copay-type") 488 protected CodeableConcept type; 489 490 /** 491 * The amount due from the patient for the cost category. 492 */ 493 @Child(name = "value", type = {Quantity.class, Money.class}, order=2, min=1, max=1, modifier=false, summary=true) 494 @Description(shortDefinition="The amount or percentage due from the beneficiary", formalDefinition="The amount due from the patient for the cost category." ) 495 protected Type value; 496 497 /** 498 * A suite of codes indicating exceptions or reductions to patient costs and their effective periods. 499 */ 500 @Child(name = "exception", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 501 @Description(shortDefinition="Exceptions for patient payments", formalDefinition="A suite of codes indicating exceptions or reductions to patient costs and their effective periods." ) 502 protected List<ExemptionComponent> exception; 503 504 private static final long serialVersionUID = -1302829059L; 505 506 /** 507 * Constructor 508 */ 509 public CostToBeneficiaryComponent() { 510 super(); 511 } 512 513 /** 514 * Constructor 515 */ 516 public CostToBeneficiaryComponent(Type value) { 517 super(); 518 this.value = value; 519 } 520 521 /** 522 * @return {@link #type} (The category of patient centric costs associated with treatment.) 523 */ 524 public CodeableConcept getType() { 525 if (this.type == null) 526 if (Configuration.errorOnAutoCreate()) 527 throw new Error("Attempt to auto-create CostToBeneficiaryComponent.type"); 528 else if (Configuration.doAutoCreate()) 529 this.type = new CodeableConcept(); // cc 530 return this.type; 531 } 532 533 public boolean hasType() { 534 return this.type != null && !this.type.isEmpty(); 535 } 536 537 /** 538 * @param value {@link #type} (The category of patient centric costs associated with treatment.) 539 */ 540 public CostToBeneficiaryComponent setType(CodeableConcept value) { 541 this.type = value; 542 return this; 543 } 544 545 /** 546 * @return {@link #value} (The amount due from the patient for the cost category.) 547 */ 548 public Type getValue() { 549 return this.value; 550 } 551 552 /** 553 * @return {@link #value} (The amount due from the patient for the cost category.) 554 */ 555 public Quantity getValueQuantity() throws FHIRException { 556 if (this.value == null) 557 this.value = new Quantity(); 558 if (!(this.value instanceof Quantity)) 559 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 560 return (Quantity) this.value; 561 } 562 563 public boolean hasValueQuantity() { 564 return this != null && this.value instanceof Quantity; 565 } 566 567 /** 568 * @return {@link #value} (The amount due from the patient for the cost category.) 569 */ 570 public Money getValueMoney() throws FHIRException { 571 if (this.value == null) 572 this.value = new Money(); 573 if (!(this.value instanceof Money)) 574 throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered"); 575 return (Money) this.value; 576 } 577 578 public boolean hasValueMoney() { 579 return this != null && this.value instanceof Money; 580 } 581 582 public boolean hasValue() { 583 return this.value != null && !this.value.isEmpty(); 584 } 585 586 /** 587 * @param value {@link #value} (The amount due from the patient for the cost category.) 588 */ 589 public CostToBeneficiaryComponent setValue(Type value) { 590 if (value != null && !(value instanceof Quantity || value instanceof Money)) 591 throw new Error("Not the right type for Coverage.costToBeneficiary.value[x]: "+value.fhirType()); 592 this.value = value; 593 return this; 594 } 595 596 /** 597 * @return {@link #exception} (A suite of codes indicating exceptions or reductions to patient costs and their effective periods.) 598 */ 599 public List<ExemptionComponent> getException() { 600 if (this.exception == null) 601 this.exception = new ArrayList<ExemptionComponent>(); 602 return this.exception; 603 } 604 605 /** 606 * @return Returns a reference to <code>this</code> for easy method chaining 607 */ 608 public CostToBeneficiaryComponent setException(List<ExemptionComponent> theException) { 609 this.exception = theException; 610 return this; 611 } 612 613 public boolean hasException() { 614 if (this.exception == null) 615 return false; 616 for (ExemptionComponent item : this.exception) 617 if (!item.isEmpty()) 618 return true; 619 return false; 620 } 621 622 public ExemptionComponent addException() { //3 623 ExemptionComponent t = new ExemptionComponent(); 624 if (this.exception == null) 625 this.exception = new ArrayList<ExemptionComponent>(); 626 this.exception.add(t); 627 return t; 628 } 629 630 public CostToBeneficiaryComponent addException(ExemptionComponent t) { //3 631 if (t == null) 632 return this; 633 if (this.exception == null) 634 this.exception = new ArrayList<ExemptionComponent>(); 635 this.exception.add(t); 636 return this; 637 } 638 639 /** 640 * @return The first repetition of repeating field {@link #exception}, creating it if it does not already exist 641 */ 642 public ExemptionComponent getExceptionFirstRep() { 643 if (getException().isEmpty()) { 644 addException(); 645 } 646 return getException().get(0); 647 } 648 649 protected void listChildren(List<Property> children) { 650 super.listChildren(children); 651 children.add(new Property("type", "CodeableConcept", "The category of patient centric costs associated with treatment.", 0, 1, type)); 652 children.add(new Property("value[x]", "SimpleQuantity|Money", "The amount due from the patient for the cost category.", 0, 1, value)); 653 children.add(new Property("exception", "", "A suite of codes indicating exceptions or reductions to patient costs and their effective periods.", 0, java.lang.Integer.MAX_VALUE, exception)); 654 } 655 656 @Override 657 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 658 switch (_hash) { 659 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The category of patient centric costs associated with treatment.", 0, 1, type); 660 case -1410166417: /*value[x]*/ return new Property("value[x]", "SimpleQuantity|Money", "The amount due from the patient for the cost category.", 0, 1, value); 661 case 111972721: /*value*/ return new Property("value[x]", "SimpleQuantity|Money", "The amount due from the patient for the cost category.", 0, 1, value); 662 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "SimpleQuantity|Money", "The amount due from the patient for the cost category.", 0, 1, value); 663 case 2026560975: /*valueMoney*/ return new Property("value[x]", "SimpleQuantity|Money", "The amount due from the patient for the cost category.", 0, 1, value); 664 case 1481625679: /*exception*/ return new Property("exception", "", "A suite of codes indicating exceptions or reductions to patient costs and their effective periods.", 0, java.lang.Integer.MAX_VALUE, exception); 665 default: return super.getNamedProperty(_hash, _name, _checkValid); 666 } 667 668 } 669 670 @Override 671 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 672 switch (hash) { 673 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 674 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 675 case 1481625679: /*exception*/ return this.exception == null ? new Base[0] : this.exception.toArray(new Base[this.exception.size()]); // ExemptionComponent 676 default: return super.getProperty(hash, name, checkValid); 677 } 678 679 } 680 681 @Override 682 public Base setProperty(int hash, String name, Base value) throws FHIRException { 683 switch (hash) { 684 case 3575610: // type 685 this.type = castToCodeableConcept(value); // CodeableConcept 686 return value; 687 case 111972721: // value 688 this.value = castToType(value); // Type 689 return value; 690 case 1481625679: // exception 691 this.getException().add((ExemptionComponent) value); // ExemptionComponent 692 return value; 693 default: return super.setProperty(hash, name, value); 694 } 695 696 } 697 698 @Override 699 public Base setProperty(String name, Base value) throws FHIRException { 700 if (name.equals("type")) { 701 this.type = castToCodeableConcept(value); // CodeableConcept 702 } else if (name.equals("value[x]")) { 703 this.value = castToType(value); // Type 704 } else if (name.equals("exception")) { 705 this.getException().add((ExemptionComponent) value); 706 } else 707 return super.setProperty(name, value); 708 return value; 709 } 710 711 @Override 712 public Base makeProperty(int hash, String name) throws FHIRException { 713 switch (hash) { 714 case 3575610: return getType(); 715 case -1410166417: return getValue(); 716 case 111972721: return getValue(); 717 case 1481625679: return addException(); 718 default: return super.makeProperty(hash, name); 719 } 720 721 } 722 723 @Override 724 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 725 switch (hash) { 726 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 727 case 111972721: /*value*/ return new String[] {"SimpleQuantity", "Money"}; 728 case 1481625679: /*exception*/ return new String[] {}; 729 default: return super.getTypesForProperty(hash, name); 730 } 731 732 } 733 734 @Override 735 public Base addChild(String name) throws FHIRException { 736 if (name.equals("type")) { 737 this.type = new CodeableConcept(); 738 return this.type; 739 } 740 else if (name.equals("valueQuantity")) { 741 this.value = new Quantity(); 742 return this.value; 743 } 744 else if (name.equals("valueMoney")) { 745 this.value = new Money(); 746 return this.value; 747 } 748 else if (name.equals("exception")) { 749 return addException(); 750 } 751 else 752 return super.addChild(name); 753 } 754 755 public CostToBeneficiaryComponent copy() { 756 CostToBeneficiaryComponent dst = new CostToBeneficiaryComponent(); 757 copyValues(dst); 758 return dst; 759 } 760 761 public void copyValues(CostToBeneficiaryComponent dst) { 762 super.copyValues(dst); 763 dst.type = type == null ? null : type.copy(); 764 dst.value = value == null ? null : value.copy(); 765 if (exception != null) { 766 dst.exception = new ArrayList<ExemptionComponent>(); 767 for (ExemptionComponent i : exception) 768 dst.exception.add(i.copy()); 769 }; 770 } 771 772 @Override 773 public boolean equalsDeep(Base other_) { 774 if (!super.equalsDeep(other_)) 775 return false; 776 if (!(other_ instanceof CostToBeneficiaryComponent)) 777 return false; 778 CostToBeneficiaryComponent o = (CostToBeneficiaryComponent) other_; 779 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(exception, o.exception, true) 780 ; 781 } 782 783 @Override 784 public boolean equalsShallow(Base other_) { 785 if (!super.equalsShallow(other_)) 786 return false; 787 if (!(other_ instanceof CostToBeneficiaryComponent)) 788 return false; 789 CostToBeneficiaryComponent o = (CostToBeneficiaryComponent) other_; 790 return true; 791 } 792 793 public boolean isEmpty() { 794 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value, exception); 795 } 796 797 public String fhirType() { 798 return "Coverage.costToBeneficiary"; 799 800 } 801 802 } 803 804 @Block() 805 public static class ExemptionComponent extends BackboneElement implements IBaseBackboneElement { 806 /** 807 * The code for the specific exception. 808 */ 809 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 810 @Description(shortDefinition="Exception category", formalDefinition="The code for the specific exception." ) 811 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/coverage-financial-exception") 812 protected CodeableConcept type; 813 814 /** 815 * The timeframe during when the exception is in force. 816 */ 817 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 818 @Description(shortDefinition="The effective period of the exception", formalDefinition="The timeframe during when the exception is in force." ) 819 protected Period period; 820 821 private static final long serialVersionUID = 523191991L; 822 823 /** 824 * Constructor 825 */ 826 public ExemptionComponent() { 827 super(); 828 } 829 830 /** 831 * Constructor 832 */ 833 public ExemptionComponent(CodeableConcept type) { 834 super(); 835 this.type = type; 836 } 837 838 /** 839 * @return {@link #type} (The code for the specific exception.) 840 */ 841 public CodeableConcept getType() { 842 if (this.type == null) 843 if (Configuration.errorOnAutoCreate()) 844 throw new Error("Attempt to auto-create ExemptionComponent.type"); 845 else if (Configuration.doAutoCreate()) 846 this.type = new CodeableConcept(); // cc 847 return this.type; 848 } 849 850 public boolean hasType() { 851 return this.type != null && !this.type.isEmpty(); 852 } 853 854 /** 855 * @param value {@link #type} (The code for the specific exception.) 856 */ 857 public ExemptionComponent setType(CodeableConcept value) { 858 this.type = value; 859 return this; 860 } 861 862 /** 863 * @return {@link #period} (The timeframe during when the exception is in force.) 864 */ 865 public Period getPeriod() { 866 if (this.period == null) 867 if (Configuration.errorOnAutoCreate()) 868 throw new Error("Attempt to auto-create ExemptionComponent.period"); 869 else if (Configuration.doAutoCreate()) 870 this.period = new Period(); // cc 871 return this.period; 872 } 873 874 public boolean hasPeriod() { 875 return this.period != null && !this.period.isEmpty(); 876 } 877 878 /** 879 * @param value {@link #period} (The timeframe during when the exception is in force.) 880 */ 881 public ExemptionComponent setPeriod(Period value) { 882 this.period = value; 883 return this; 884 } 885 886 protected void listChildren(List<Property> children) { 887 super.listChildren(children); 888 children.add(new Property("type", "CodeableConcept", "The code for the specific exception.", 0, 1, type)); 889 children.add(new Property("period", "Period", "The timeframe during when the exception is in force.", 0, 1, period)); 890 } 891 892 @Override 893 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 894 switch (_hash) { 895 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The code for the specific exception.", 0, 1, type); 896 case -991726143: /*period*/ return new Property("period", "Period", "The timeframe during when the exception is in force.", 0, 1, period); 897 default: return super.getNamedProperty(_hash, _name, _checkValid); 898 } 899 900 } 901 902 @Override 903 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 904 switch (hash) { 905 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 906 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 907 default: return super.getProperty(hash, name, checkValid); 908 } 909 910 } 911 912 @Override 913 public Base setProperty(int hash, String name, Base value) throws FHIRException { 914 switch (hash) { 915 case 3575610: // type 916 this.type = castToCodeableConcept(value); // CodeableConcept 917 return value; 918 case -991726143: // period 919 this.period = castToPeriod(value); // Period 920 return value; 921 default: return super.setProperty(hash, name, value); 922 } 923 924 } 925 926 @Override 927 public Base setProperty(String name, Base value) throws FHIRException { 928 if (name.equals("type")) { 929 this.type = castToCodeableConcept(value); // CodeableConcept 930 } else if (name.equals("period")) { 931 this.period = castToPeriod(value); // Period 932 } else 933 return super.setProperty(name, value); 934 return value; 935 } 936 937 @Override 938 public Base makeProperty(int hash, String name) throws FHIRException { 939 switch (hash) { 940 case 3575610: return getType(); 941 case -991726143: return getPeriod(); 942 default: return super.makeProperty(hash, name); 943 } 944 945 } 946 947 @Override 948 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 949 switch (hash) { 950 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 951 case -991726143: /*period*/ return new String[] {"Period"}; 952 default: return super.getTypesForProperty(hash, name); 953 } 954 955 } 956 957 @Override 958 public Base addChild(String name) throws FHIRException { 959 if (name.equals("type")) { 960 this.type = new CodeableConcept(); 961 return this.type; 962 } 963 else if (name.equals("period")) { 964 this.period = new Period(); 965 return this.period; 966 } 967 else 968 return super.addChild(name); 969 } 970 971 public ExemptionComponent copy() { 972 ExemptionComponent dst = new ExemptionComponent(); 973 copyValues(dst); 974 return dst; 975 } 976 977 public void copyValues(ExemptionComponent dst) { 978 super.copyValues(dst); 979 dst.type = type == null ? null : type.copy(); 980 dst.period = period == null ? null : period.copy(); 981 } 982 983 @Override 984 public boolean equalsDeep(Base other_) { 985 if (!super.equalsDeep(other_)) 986 return false; 987 if (!(other_ instanceof ExemptionComponent)) 988 return false; 989 ExemptionComponent o = (ExemptionComponent) other_; 990 return compareDeep(type, o.type, true) && compareDeep(period, o.period, true); 991 } 992 993 @Override 994 public boolean equalsShallow(Base other_) { 995 if (!super.equalsShallow(other_)) 996 return false; 997 if (!(other_ instanceof ExemptionComponent)) 998 return false; 999 ExemptionComponent o = (ExemptionComponent) other_; 1000 return true; 1001 } 1002 1003 public boolean isEmpty() { 1004 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period); 1005 } 1006 1007 public String fhirType() { 1008 return "Coverage.costToBeneficiary.exception"; 1009 1010 } 1011 1012 } 1013 1014 /** 1015 * A unique identifier assigned to this coverage. 1016 */ 1017 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1018 @Description(shortDefinition="Business Identifier for the coverage", formalDefinition="A unique identifier assigned to this coverage." ) 1019 protected List<Identifier> identifier; 1020 1021 /** 1022 * The status of the resource instance. 1023 */ 1024 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1025 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 1026 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 1027 protected Enumeration<CoverageStatus> status; 1028 1029 /** 1030 * The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization. 1031 */ 1032 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1033 @Description(shortDefinition="Coverage category such as medical or accident", formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization." ) 1034 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/coverage-type") 1035 protected CodeableConcept type; 1036 1037 /** 1038 * The party who 'owns' the insurance policy. 1039 */ 1040 @Child(name = "policyHolder", type = {Patient.class, RelatedPerson.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) 1041 @Description(shortDefinition="Owner of the policy", formalDefinition="The party who 'owns' the insurance policy." ) 1042 protected Reference policyHolder; 1043 1044 /** 1045 * The actual object that is the target of the reference (The party who 'owns' the insurance policy.) 1046 */ 1047 protected Resource policyHolderTarget; 1048 1049 /** 1050 * The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due. 1051 */ 1052 @Child(name = "subscriber", type = {Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) 1053 @Description(shortDefinition="Subscriber to the policy", formalDefinition="The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due." ) 1054 protected Reference subscriber; 1055 1056 /** 1057 * The actual object that is the target of the reference (The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.) 1058 */ 1059 protected Resource subscriberTarget; 1060 1061 /** 1062 * The insurer assigned ID for the Subscriber. 1063 */ 1064 @Child(name = "subscriberId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1065 @Description(shortDefinition="ID assigned to the subscriber", formalDefinition="The insurer assigned ID for the Subscriber." ) 1066 protected StringType subscriberId; 1067 1068 /** 1069 * The party who benefits from the insurance coverage; the patient when products and/or services are provided. 1070 */ 1071 @Child(name = "beneficiary", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true) 1072 @Description(shortDefinition="Plan beneficiary", formalDefinition="The party who benefits from the insurance coverage; the patient when products and/or services are provided." ) 1073 protected Reference beneficiary; 1074 1075 /** 1076 * The actual object that is the target of the reference (The party who benefits from the insurance coverage; the patient when products and/or services are provided.) 1077 */ 1078 protected Patient beneficiaryTarget; 1079 1080 /** 1081 * A unique identifier for a dependent under the coverage. 1082 */ 1083 @Child(name = "dependent", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1084 @Description(shortDefinition="Dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) 1085 protected StringType dependent; 1086 1087 /** 1088 * The relationship of beneficiary (patient) to the subscriber. 1089 */ 1090 @Child(name = "relationship", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 1091 @Description(shortDefinition="Beneficiary relationship to the subscriber", formalDefinition="The relationship of beneficiary (patient) to the subscriber." ) 1092 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscriber-relationship") 1093 protected CodeableConcept relationship; 1094 1095 /** 1096 * Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. 1097 */ 1098 @Child(name = "period", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 1099 @Description(shortDefinition="Coverage start and end dates", formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." ) 1100 protected Period period; 1101 1102 /** 1103 * The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. 1104 */ 1105 @Child(name = "payor", type = {Organization.class, Patient.class, RelatedPerson.class}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1106 @Description(shortDefinition="Issuer of the policy", formalDefinition="The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements." ) 1107 protected List<Reference> payor; 1108 /** 1109 * The actual objects that are the target of the reference (The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.) 1110 */ 1111 protected List<Resource> payorTarget; 1112 1113 1114 /** 1115 * A suite of underwriter specific classifiers. 1116 */ 1117 @Child(name = "class", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1118 @Description(shortDefinition="Additional coverage classifications", formalDefinition="A suite of underwriter specific classifiers." ) 1119 protected List<ClassComponent> class_; 1120 1121 /** 1122 * The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. 1123 */ 1124 @Child(name = "order", type = {PositiveIntType.class}, order=12, min=0, max=1, modifier=false, summary=true) 1125 @Description(shortDefinition="Relative order of the coverage", formalDefinition="The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care." ) 1126 protected PositiveIntType order; 1127 1128 /** 1129 * The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply. 1130 */ 1131 @Child(name = "network", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true) 1132 @Description(shortDefinition="Insurer network", formalDefinition="The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply." ) 1133 protected StringType network; 1134 1135 /** 1136 * A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card. 1137 */ 1138 @Child(name = "costToBeneficiary", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1139 @Description(shortDefinition="Patient payments for services/products", formalDefinition="A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card." ) 1140 protected List<CostToBeneficiaryComponent> costToBeneficiary; 1141 1142 /** 1143 * When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs. 1144 */ 1145 @Child(name = "subrogation", type = {BooleanType.class}, order=15, min=0, max=1, modifier=false, summary=false) 1146 @Description(shortDefinition="Reimbursement to insurer", formalDefinition="When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs." ) 1147 protected BooleanType subrogation; 1148 1149 /** 1150 * The policy(s) which constitute this insurance coverage. 1151 */ 1152 @Child(name = "contract", type = {Contract.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1153 @Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." ) 1154 protected List<Reference> contract; 1155 /** 1156 * The actual objects that are the target of the reference (The policy(s) which constitute this insurance coverage.) 1157 */ 1158 protected List<Contract> contractTarget; 1159 1160 1161 private static final long serialVersionUID = 212315315L; 1162 1163 /** 1164 * Constructor 1165 */ 1166 public Coverage() { 1167 super(); 1168 } 1169 1170 /** 1171 * Constructor 1172 */ 1173 public Coverage(Enumeration<CoverageStatus> status, Reference beneficiary) { 1174 super(); 1175 this.status = status; 1176 this.beneficiary = beneficiary; 1177 } 1178 1179 /** 1180 * @return {@link #identifier} (A unique identifier assigned to this coverage.) 1181 */ 1182 public List<Identifier> getIdentifier() { 1183 if (this.identifier == null) 1184 this.identifier = new ArrayList<Identifier>(); 1185 return this.identifier; 1186 } 1187 1188 /** 1189 * @return Returns a reference to <code>this</code> for easy method chaining 1190 */ 1191 public Coverage setIdentifier(List<Identifier> theIdentifier) { 1192 this.identifier = theIdentifier; 1193 return this; 1194 } 1195 1196 public boolean hasIdentifier() { 1197 if (this.identifier == null) 1198 return false; 1199 for (Identifier item : this.identifier) 1200 if (!item.isEmpty()) 1201 return true; 1202 return false; 1203 } 1204 1205 public Identifier addIdentifier() { //3 1206 Identifier t = new Identifier(); 1207 if (this.identifier == null) 1208 this.identifier = new ArrayList<Identifier>(); 1209 this.identifier.add(t); 1210 return t; 1211 } 1212 1213 public Coverage addIdentifier(Identifier t) { //3 1214 if (t == null) 1215 return this; 1216 if (this.identifier == null) 1217 this.identifier = new ArrayList<Identifier>(); 1218 this.identifier.add(t); 1219 return this; 1220 } 1221 1222 /** 1223 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1224 */ 1225 public Identifier getIdentifierFirstRep() { 1226 if (getIdentifier().isEmpty()) { 1227 addIdentifier(); 1228 } 1229 return getIdentifier().get(0); 1230 } 1231 1232 /** 1233 * @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 1234 */ 1235 public Enumeration<CoverageStatus> getStatusElement() { 1236 if (this.status == null) 1237 if (Configuration.errorOnAutoCreate()) 1238 throw new Error("Attempt to auto-create Coverage.status"); 1239 else if (Configuration.doAutoCreate()) 1240 this.status = new Enumeration<CoverageStatus>(new CoverageStatusEnumFactory()); // bb 1241 return this.status; 1242 } 1243 1244 public boolean hasStatusElement() { 1245 return this.status != null && !this.status.isEmpty(); 1246 } 1247 1248 public boolean hasStatus() { 1249 return this.status != null && !this.status.isEmpty(); 1250 } 1251 1252 /** 1253 * @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 1254 */ 1255 public Coverage setStatusElement(Enumeration<CoverageStatus> value) { 1256 this.status = value; 1257 return this; 1258 } 1259 1260 /** 1261 * @return The status of the resource instance. 1262 */ 1263 public CoverageStatus getStatus() { 1264 return this.status == null ? null : this.status.getValue(); 1265 } 1266 1267 /** 1268 * @param value The status of the resource instance. 1269 */ 1270 public Coverage setStatus(CoverageStatus value) { 1271 if (this.status == null) 1272 this.status = new Enumeration<CoverageStatus>(new CoverageStatusEnumFactory()); 1273 this.status.setValue(value); 1274 return this; 1275 } 1276 1277 /** 1278 * @return {@link #type} (The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.) 1279 */ 1280 public CodeableConcept getType() { 1281 if (this.type == null) 1282 if (Configuration.errorOnAutoCreate()) 1283 throw new Error("Attempt to auto-create Coverage.type"); 1284 else if (Configuration.doAutoCreate()) 1285 this.type = new CodeableConcept(); // cc 1286 return this.type; 1287 } 1288 1289 public boolean hasType() { 1290 return this.type != null && !this.type.isEmpty(); 1291 } 1292 1293 /** 1294 * @param value {@link #type} (The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.) 1295 */ 1296 public Coverage setType(CodeableConcept value) { 1297 this.type = value; 1298 return this; 1299 } 1300 1301 /** 1302 * @return {@link #policyHolder} (The party who 'owns' the insurance policy.) 1303 */ 1304 public Reference getPolicyHolder() { 1305 if (this.policyHolder == null) 1306 if (Configuration.errorOnAutoCreate()) 1307 throw new Error("Attempt to auto-create Coverage.policyHolder"); 1308 else if (Configuration.doAutoCreate()) 1309 this.policyHolder = new Reference(); // cc 1310 return this.policyHolder; 1311 } 1312 1313 public boolean hasPolicyHolder() { 1314 return this.policyHolder != null && !this.policyHolder.isEmpty(); 1315 } 1316 1317 /** 1318 * @param value {@link #policyHolder} (The party who 'owns' the insurance policy.) 1319 */ 1320 public Coverage setPolicyHolder(Reference value) { 1321 this.policyHolder = value; 1322 return this; 1323 } 1324 1325 /** 1326 * @return {@link #policyHolder} 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 party who 'owns' the insurance policy.) 1327 */ 1328 public Resource getPolicyHolderTarget() { 1329 return this.policyHolderTarget; 1330 } 1331 1332 /** 1333 * @param value {@link #policyHolder} 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 party who 'owns' the insurance policy.) 1334 */ 1335 public Coverage setPolicyHolderTarget(Resource value) { 1336 this.policyHolderTarget = value; 1337 return this; 1338 } 1339 1340 /** 1341 * @return {@link #subscriber} (The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.) 1342 */ 1343 public Reference getSubscriber() { 1344 if (this.subscriber == null) 1345 if (Configuration.errorOnAutoCreate()) 1346 throw new Error("Attempt to auto-create Coverage.subscriber"); 1347 else if (Configuration.doAutoCreate()) 1348 this.subscriber = new Reference(); // cc 1349 return this.subscriber; 1350 } 1351 1352 public boolean hasSubscriber() { 1353 return this.subscriber != null && !this.subscriber.isEmpty(); 1354 } 1355 1356 /** 1357 * @param value {@link #subscriber} (The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.) 1358 */ 1359 public Coverage setSubscriber(Reference value) { 1360 this.subscriber = value; 1361 return this; 1362 } 1363 1364 /** 1365 * @return {@link #subscriber} 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 party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.) 1366 */ 1367 public Resource getSubscriberTarget() { 1368 return this.subscriberTarget; 1369 } 1370 1371 /** 1372 * @param value {@link #subscriber} 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 party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.) 1373 */ 1374 public Coverage setSubscriberTarget(Resource value) { 1375 this.subscriberTarget = value; 1376 return this; 1377 } 1378 1379 /** 1380 * @return {@link #subscriberId} (The insurer assigned ID for the Subscriber.). This is the underlying object with id, value and extensions. The accessor "getSubscriberId" gives direct access to the value 1381 */ 1382 public StringType getSubscriberIdElement() { 1383 if (this.subscriberId == null) 1384 if (Configuration.errorOnAutoCreate()) 1385 throw new Error("Attempt to auto-create Coverage.subscriberId"); 1386 else if (Configuration.doAutoCreate()) 1387 this.subscriberId = new StringType(); // bb 1388 return this.subscriberId; 1389 } 1390 1391 public boolean hasSubscriberIdElement() { 1392 return this.subscriberId != null && !this.subscriberId.isEmpty(); 1393 } 1394 1395 public boolean hasSubscriberId() { 1396 return this.subscriberId != null && !this.subscriberId.isEmpty(); 1397 } 1398 1399 /** 1400 * @param value {@link #subscriberId} (The insurer assigned ID for the Subscriber.). This is the underlying object with id, value and extensions. The accessor "getSubscriberId" gives direct access to the value 1401 */ 1402 public Coverage setSubscriberIdElement(StringType value) { 1403 this.subscriberId = value; 1404 return this; 1405 } 1406 1407 /** 1408 * @return The insurer assigned ID for the Subscriber. 1409 */ 1410 public String getSubscriberId() { 1411 return this.subscriberId == null ? null : this.subscriberId.getValue(); 1412 } 1413 1414 /** 1415 * @param value The insurer assigned ID for the Subscriber. 1416 */ 1417 public Coverage setSubscriberId(String value) { 1418 if (Utilities.noString(value)) 1419 this.subscriberId = null; 1420 else { 1421 if (this.subscriberId == null) 1422 this.subscriberId = new StringType(); 1423 this.subscriberId.setValue(value); 1424 } 1425 return this; 1426 } 1427 1428 /** 1429 * @return {@link #beneficiary} (The party who benefits from the insurance coverage; the patient when products and/or services are provided.) 1430 */ 1431 public Reference getBeneficiary() { 1432 if (this.beneficiary == null) 1433 if (Configuration.errorOnAutoCreate()) 1434 throw new Error("Attempt to auto-create Coverage.beneficiary"); 1435 else if (Configuration.doAutoCreate()) 1436 this.beneficiary = new Reference(); // cc 1437 return this.beneficiary; 1438 } 1439 1440 public boolean hasBeneficiary() { 1441 return this.beneficiary != null && !this.beneficiary.isEmpty(); 1442 } 1443 1444 /** 1445 * @param value {@link #beneficiary} (The party who benefits from the insurance coverage; the patient when products and/or services are provided.) 1446 */ 1447 public Coverage setBeneficiary(Reference value) { 1448 this.beneficiary = value; 1449 return this; 1450 } 1451 1452 /** 1453 * @return {@link #beneficiary} 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 party who benefits from the insurance coverage; the patient when products and/or services are provided.) 1454 */ 1455 public Patient getBeneficiaryTarget() { 1456 if (this.beneficiaryTarget == null) 1457 if (Configuration.errorOnAutoCreate()) 1458 throw new Error("Attempt to auto-create Coverage.beneficiary"); 1459 else if (Configuration.doAutoCreate()) 1460 this.beneficiaryTarget = new Patient(); // aa 1461 return this.beneficiaryTarget; 1462 } 1463 1464 /** 1465 * @param value {@link #beneficiary} 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 party who benefits from the insurance coverage; the patient when products and/or services are provided.) 1466 */ 1467 public Coverage setBeneficiaryTarget(Patient value) { 1468 this.beneficiaryTarget = value; 1469 return this; 1470 } 1471 1472 /** 1473 * @return {@link #dependent} (A unique identifier for a dependent under the coverage.). This is the underlying object with id, value and extensions. The accessor "getDependent" gives direct access to the value 1474 */ 1475 public StringType getDependentElement() { 1476 if (this.dependent == null) 1477 if (Configuration.errorOnAutoCreate()) 1478 throw new Error("Attempt to auto-create Coverage.dependent"); 1479 else if (Configuration.doAutoCreate()) 1480 this.dependent = new StringType(); // bb 1481 return this.dependent; 1482 } 1483 1484 public boolean hasDependentElement() { 1485 return this.dependent != null && !this.dependent.isEmpty(); 1486 } 1487 1488 public boolean hasDependent() { 1489 return this.dependent != null && !this.dependent.isEmpty(); 1490 } 1491 1492 /** 1493 * @param value {@link #dependent} (A unique identifier for a dependent under the coverage.). This is the underlying object with id, value and extensions. The accessor "getDependent" gives direct access to the value 1494 */ 1495 public Coverage setDependentElement(StringType value) { 1496 this.dependent = value; 1497 return this; 1498 } 1499 1500 /** 1501 * @return A unique identifier for a dependent under the coverage. 1502 */ 1503 public String getDependent() { 1504 return this.dependent == null ? null : this.dependent.getValue(); 1505 } 1506 1507 /** 1508 * @param value A unique identifier for a dependent under the coverage. 1509 */ 1510 public Coverage setDependent(String value) { 1511 if (Utilities.noString(value)) 1512 this.dependent = null; 1513 else { 1514 if (this.dependent == null) 1515 this.dependent = new StringType(); 1516 this.dependent.setValue(value); 1517 } 1518 return this; 1519 } 1520 1521 /** 1522 * @return {@link #relationship} (The relationship of beneficiary (patient) to the subscriber.) 1523 */ 1524 public CodeableConcept getRelationship() { 1525 if (this.relationship == null) 1526 if (Configuration.errorOnAutoCreate()) 1527 throw new Error("Attempt to auto-create Coverage.relationship"); 1528 else if (Configuration.doAutoCreate()) 1529 this.relationship = new CodeableConcept(); // cc 1530 return this.relationship; 1531 } 1532 1533 public boolean hasRelationship() { 1534 return this.relationship != null && !this.relationship.isEmpty(); 1535 } 1536 1537 /** 1538 * @param value {@link #relationship} (The relationship of beneficiary (patient) to the subscriber.) 1539 */ 1540 public Coverage setRelationship(CodeableConcept value) { 1541 this.relationship = value; 1542 return this; 1543 } 1544 1545 /** 1546 * @return {@link #period} (Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.) 1547 */ 1548 public Period getPeriod() { 1549 if (this.period == null) 1550 if (Configuration.errorOnAutoCreate()) 1551 throw new Error("Attempt to auto-create Coverage.period"); 1552 else if (Configuration.doAutoCreate()) 1553 this.period = new Period(); // cc 1554 return this.period; 1555 } 1556 1557 public boolean hasPeriod() { 1558 return this.period != null && !this.period.isEmpty(); 1559 } 1560 1561 /** 1562 * @param value {@link #period} (Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.) 1563 */ 1564 public Coverage setPeriod(Period value) { 1565 this.period = value; 1566 return this; 1567 } 1568 1569 /** 1570 * @return {@link #payor} (The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.) 1571 */ 1572 public List<Reference> getPayor() { 1573 if (this.payor == null) 1574 this.payor = new ArrayList<Reference>(); 1575 return this.payor; 1576 } 1577 1578 /** 1579 * @return Returns a reference to <code>this</code> for easy method chaining 1580 */ 1581 public Coverage setPayor(List<Reference> thePayor) { 1582 this.payor = thePayor; 1583 return this; 1584 } 1585 1586 public boolean hasPayor() { 1587 if (this.payor == null) 1588 return false; 1589 for (Reference item : this.payor) 1590 if (!item.isEmpty()) 1591 return true; 1592 return false; 1593 } 1594 1595 public Reference addPayor() { //3 1596 Reference t = new Reference(); 1597 if (this.payor == null) 1598 this.payor = new ArrayList<Reference>(); 1599 this.payor.add(t); 1600 return t; 1601 } 1602 1603 public Coverage addPayor(Reference t) { //3 1604 if (t == null) 1605 return this; 1606 if (this.payor == null) 1607 this.payor = new ArrayList<Reference>(); 1608 this.payor.add(t); 1609 return this; 1610 } 1611 1612 /** 1613 * @return The first repetition of repeating field {@link #payor}, creating it if it does not already exist 1614 */ 1615 public Reference getPayorFirstRep() { 1616 if (getPayor().isEmpty()) { 1617 addPayor(); 1618 } 1619 return getPayor().get(0); 1620 } 1621 1622 /** 1623 * @deprecated Use Reference#setResource(IBaseResource) instead 1624 */ 1625 @Deprecated 1626 public List<Resource> getPayorTarget() { 1627 if (this.payorTarget == null) 1628 this.payorTarget = new ArrayList<Resource>(); 1629 return this.payorTarget; 1630 } 1631 1632 /** 1633 * @return {@link #class_} (A suite of underwriter specific classifiers.) 1634 */ 1635 public List<ClassComponent> getClass_() { 1636 if (this.class_ == null) 1637 this.class_ = new ArrayList<ClassComponent>(); 1638 return this.class_; 1639 } 1640 1641 /** 1642 * @return Returns a reference to <code>this</code> for easy method chaining 1643 */ 1644 public Coverage setClass_(List<ClassComponent> theClass_) { 1645 this.class_ = theClass_; 1646 return this; 1647 } 1648 1649 public boolean hasClass_() { 1650 if (this.class_ == null) 1651 return false; 1652 for (ClassComponent item : this.class_) 1653 if (!item.isEmpty()) 1654 return true; 1655 return false; 1656 } 1657 1658 public ClassComponent addClass_() { //3 1659 ClassComponent t = new ClassComponent(); 1660 if (this.class_ == null) 1661 this.class_ = new ArrayList<ClassComponent>(); 1662 this.class_.add(t); 1663 return t; 1664 } 1665 1666 public Coverage addClass_(ClassComponent t) { //3 1667 if (t == null) 1668 return this; 1669 if (this.class_ == null) 1670 this.class_ = new ArrayList<ClassComponent>(); 1671 this.class_.add(t); 1672 return this; 1673 } 1674 1675 /** 1676 * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist 1677 */ 1678 public ClassComponent getClass_FirstRep() { 1679 if (getClass_().isEmpty()) { 1680 addClass_(); 1681 } 1682 return getClass_().get(0); 1683 } 1684 1685 /** 1686 * @return {@link #order} (The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.). This is the underlying object with id, value and extensions. The accessor "getOrder" gives direct access to the value 1687 */ 1688 public PositiveIntType getOrderElement() { 1689 if (this.order == null) 1690 if (Configuration.errorOnAutoCreate()) 1691 throw new Error("Attempt to auto-create Coverage.order"); 1692 else if (Configuration.doAutoCreate()) 1693 this.order = new PositiveIntType(); // bb 1694 return this.order; 1695 } 1696 1697 public boolean hasOrderElement() { 1698 return this.order != null && !this.order.isEmpty(); 1699 } 1700 1701 public boolean hasOrder() { 1702 return this.order != null && !this.order.isEmpty(); 1703 } 1704 1705 /** 1706 * @param value {@link #order} (The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.). This is the underlying object with id, value and extensions. The accessor "getOrder" gives direct access to the value 1707 */ 1708 public Coverage setOrderElement(PositiveIntType value) { 1709 this.order = value; 1710 return this; 1711 } 1712 1713 /** 1714 * @return The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. 1715 */ 1716 public int getOrder() { 1717 return this.order == null || this.order.isEmpty() ? 0 : this.order.getValue(); 1718 } 1719 1720 /** 1721 * @param value The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. 1722 */ 1723 public Coverage setOrder(int value) { 1724 if (this.order == null) 1725 this.order = new PositiveIntType(); 1726 this.order.setValue(value); 1727 return this; 1728 } 1729 1730 /** 1731 * @return {@link #network} (The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.). This is the underlying object with id, value and extensions. The accessor "getNetwork" gives direct access to the value 1732 */ 1733 public StringType getNetworkElement() { 1734 if (this.network == null) 1735 if (Configuration.errorOnAutoCreate()) 1736 throw new Error("Attempt to auto-create Coverage.network"); 1737 else if (Configuration.doAutoCreate()) 1738 this.network = new StringType(); // bb 1739 return this.network; 1740 } 1741 1742 public boolean hasNetworkElement() { 1743 return this.network != null && !this.network.isEmpty(); 1744 } 1745 1746 public boolean hasNetwork() { 1747 return this.network != null && !this.network.isEmpty(); 1748 } 1749 1750 /** 1751 * @param value {@link #network} (The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.). This is the underlying object with id, value and extensions. The accessor "getNetwork" gives direct access to the value 1752 */ 1753 public Coverage setNetworkElement(StringType value) { 1754 this.network = value; 1755 return this; 1756 } 1757 1758 /** 1759 * @return The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply. 1760 */ 1761 public String getNetwork() { 1762 return this.network == null ? null : this.network.getValue(); 1763 } 1764 1765 /** 1766 * @param value The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply. 1767 */ 1768 public Coverage setNetwork(String value) { 1769 if (Utilities.noString(value)) 1770 this.network = null; 1771 else { 1772 if (this.network == null) 1773 this.network = new StringType(); 1774 this.network.setValue(value); 1775 } 1776 return this; 1777 } 1778 1779 /** 1780 * @return {@link #costToBeneficiary} (A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.) 1781 */ 1782 public List<CostToBeneficiaryComponent> getCostToBeneficiary() { 1783 if (this.costToBeneficiary == null) 1784 this.costToBeneficiary = new ArrayList<CostToBeneficiaryComponent>(); 1785 return this.costToBeneficiary; 1786 } 1787 1788 /** 1789 * @return Returns a reference to <code>this</code> for easy method chaining 1790 */ 1791 public Coverage setCostToBeneficiary(List<CostToBeneficiaryComponent> theCostToBeneficiary) { 1792 this.costToBeneficiary = theCostToBeneficiary; 1793 return this; 1794 } 1795 1796 public boolean hasCostToBeneficiary() { 1797 if (this.costToBeneficiary == null) 1798 return false; 1799 for (CostToBeneficiaryComponent item : this.costToBeneficiary) 1800 if (!item.isEmpty()) 1801 return true; 1802 return false; 1803 } 1804 1805 public CostToBeneficiaryComponent addCostToBeneficiary() { //3 1806 CostToBeneficiaryComponent t = new CostToBeneficiaryComponent(); 1807 if (this.costToBeneficiary == null) 1808 this.costToBeneficiary = new ArrayList<CostToBeneficiaryComponent>(); 1809 this.costToBeneficiary.add(t); 1810 return t; 1811 } 1812 1813 public Coverage addCostToBeneficiary(CostToBeneficiaryComponent t) { //3 1814 if (t == null) 1815 return this; 1816 if (this.costToBeneficiary == null) 1817 this.costToBeneficiary = new ArrayList<CostToBeneficiaryComponent>(); 1818 this.costToBeneficiary.add(t); 1819 return this; 1820 } 1821 1822 /** 1823 * @return The first repetition of repeating field {@link #costToBeneficiary}, creating it if it does not already exist 1824 */ 1825 public CostToBeneficiaryComponent getCostToBeneficiaryFirstRep() { 1826 if (getCostToBeneficiary().isEmpty()) { 1827 addCostToBeneficiary(); 1828 } 1829 return getCostToBeneficiary().get(0); 1830 } 1831 1832 /** 1833 * @return {@link #subrogation} (When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.). This is the underlying object with id, value and extensions. The accessor "getSubrogation" gives direct access to the value 1834 */ 1835 public BooleanType getSubrogationElement() { 1836 if (this.subrogation == null) 1837 if (Configuration.errorOnAutoCreate()) 1838 throw new Error("Attempt to auto-create Coverage.subrogation"); 1839 else if (Configuration.doAutoCreate()) 1840 this.subrogation = new BooleanType(); // bb 1841 return this.subrogation; 1842 } 1843 1844 public boolean hasSubrogationElement() { 1845 return this.subrogation != null && !this.subrogation.isEmpty(); 1846 } 1847 1848 public boolean hasSubrogation() { 1849 return this.subrogation != null && !this.subrogation.isEmpty(); 1850 } 1851 1852 /** 1853 * @param value {@link #subrogation} (When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.). This is the underlying object with id, value and extensions. The accessor "getSubrogation" gives direct access to the value 1854 */ 1855 public Coverage setSubrogationElement(BooleanType value) { 1856 this.subrogation = value; 1857 return this; 1858 } 1859 1860 /** 1861 * @return When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs. 1862 */ 1863 public boolean getSubrogation() { 1864 return this.subrogation == null || this.subrogation.isEmpty() ? false : this.subrogation.getValue(); 1865 } 1866 1867 /** 1868 * @param value When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs. 1869 */ 1870 public Coverage setSubrogation(boolean value) { 1871 if (this.subrogation == null) 1872 this.subrogation = new BooleanType(); 1873 this.subrogation.setValue(value); 1874 return this; 1875 } 1876 1877 /** 1878 * @return {@link #contract} (The policy(s) which constitute this insurance coverage.) 1879 */ 1880 public List<Reference> getContract() { 1881 if (this.contract == null) 1882 this.contract = new ArrayList<Reference>(); 1883 return this.contract; 1884 } 1885 1886 /** 1887 * @return Returns a reference to <code>this</code> for easy method chaining 1888 */ 1889 public Coverage setContract(List<Reference> theContract) { 1890 this.contract = theContract; 1891 return this; 1892 } 1893 1894 public boolean hasContract() { 1895 if (this.contract == null) 1896 return false; 1897 for (Reference item : this.contract) 1898 if (!item.isEmpty()) 1899 return true; 1900 return false; 1901 } 1902 1903 public Reference addContract() { //3 1904 Reference t = new Reference(); 1905 if (this.contract == null) 1906 this.contract = new ArrayList<Reference>(); 1907 this.contract.add(t); 1908 return t; 1909 } 1910 1911 public Coverage addContract(Reference t) { //3 1912 if (t == null) 1913 return this; 1914 if (this.contract == null) 1915 this.contract = new ArrayList<Reference>(); 1916 this.contract.add(t); 1917 return this; 1918 } 1919 1920 /** 1921 * @return The first repetition of repeating field {@link #contract}, creating it if it does not already exist 1922 */ 1923 public Reference getContractFirstRep() { 1924 if (getContract().isEmpty()) { 1925 addContract(); 1926 } 1927 return getContract().get(0); 1928 } 1929 1930 /** 1931 * @deprecated Use Reference#setResource(IBaseResource) instead 1932 */ 1933 @Deprecated 1934 public List<Contract> getContractTarget() { 1935 if (this.contractTarget == null) 1936 this.contractTarget = new ArrayList<Contract>(); 1937 return this.contractTarget; 1938 } 1939 1940 /** 1941 * @deprecated Use Reference#setResource(IBaseResource) instead 1942 */ 1943 @Deprecated 1944 public Contract addContractTarget() { 1945 Contract r = new Contract(); 1946 if (this.contractTarget == null) 1947 this.contractTarget = new ArrayList<Contract>(); 1948 this.contractTarget.add(r); 1949 return r; 1950 } 1951 1952 protected void listChildren(List<Property> children) { 1953 super.listChildren(children); 1954 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this coverage.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1955 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 1956 children.add(new Property("type", "CodeableConcept", "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.", 0, 1, type)); 1957 children.add(new Property("policyHolder", "Reference(Patient|RelatedPerson|Organization)", "The party who 'owns' the insurance policy.", 0, 1, policyHolder)); 1958 children.add(new Property("subscriber", "Reference(Patient|RelatedPerson)", "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", 0, 1, subscriber)); 1959 children.add(new Property("subscriberId", "string", "The insurer assigned ID for the Subscriber.", 0, 1, subscriberId)); 1960 children.add(new Property("beneficiary", "Reference(Patient)", "The party who benefits from the insurance coverage; the patient when products and/or services are provided.", 0, 1, beneficiary)); 1961 children.add(new Property("dependent", "string", "A unique identifier for a dependent under the coverage.", 0, 1, dependent)); 1962 children.add(new Property("relationship", "CodeableConcept", "The relationship of beneficiary (patient) to the subscriber.", 0, 1, relationship)); 1963 children.add(new Property("period", "Period", "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", 0, 1, period)); 1964 children.add(new Property("payor", "Reference(Organization|Patient|RelatedPerson)", "The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.", 0, java.lang.Integer.MAX_VALUE, payor)); 1965 children.add(new Property("class", "", "A suite of underwriter specific classifiers.", 0, java.lang.Integer.MAX_VALUE, class_)); 1966 children.add(new Property("order", "positiveInt", "The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.", 0, 1, order)); 1967 children.add(new Property("network", "string", "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", 0, 1, network)); 1968 children.add(new Property("costToBeneficiary", "", "A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.", 0, java.lang.Integer.MAX_VALUE, costToBeneficiary)); 1969 children.add(new Property("subrogation", "boolean", "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", 0, 1, subrogation)); 1970 children.add(new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract)); 1971 } 1972 1973 @Override 1974 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1975 switch (_hash) { 1976 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier assigned to this coverage.", 0, java.lang.Integer.MAX_VALUE, identifier); 1977 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 1978 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.", 0, 1, type); 1979 case 2046898558: /*policyHolder*/ return new Property("policyHolder", "Reference(Patient|RelatedPerson|Organization)", "The party who 'owns' the insurance policy.", 0, 1, policyHolder); 1980 case -1219769240: /*subscriber*/ return new Property("subscriber", "Reference(Patient|RelatedPerson)", "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", 0, 1, subscriber); 1981 case 327834531: /*subscriberId*/ return new Property("subscriberId", "string", "The insurer assigned ID for the Subscriber.", 0, 1, subscriberId); 1982 case -565102875: /*beneficiary*/ return new Property("beneficiary", "Reference(Patient)", "The party who benefits from the insurance coverage; the patient when products and/or services are provided.", 0, 1, beneficiary); 1983 case -1109226753: /*dependent*/ return new Property("dependent", "string", "A unique identifier for a dependent under the coverage.", 0, 1, dependent); 1984 case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "The relationship of beneficiary (patient) to the subscriber.", 0, 1, relationship); 1985 case -991726143: /*period*/ return new Property("period", "Period", "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", 0, 1, period); 1986 case 106443915: /*payor*/ return new Property("payor", "Reference(Organization|Patient|RelatedPerson)", "The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.", 0, java.lang.Integer.MAX_VALUE, payor); 1987 case 94742904: /*class*/ return new Property("class", "", "A suite of underwriter specific classifiers.", 0, java.lang.Integer.MAX_VALUE, class_); 1988 case 106006350: /*order*/ return new Property("order", "positiveInt", "The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.", 0, 1, order); 1989 case 1843485230: /*network*/ return new Property("network", "string", "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", 0, 1, network); 1990 case -1866474851: /*costToBeneficiary*/ return new Property("costToBeneficiary", "", "A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.", 0, java.lang.Integer.MAX_VALUE, costToBeneficiary); 1991 case 837389739: /*subrogation*/ return new Property("subrogation", "boolean", "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", 0, 1, subrogation); 1992 case -566947566: /*contract*/ return new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract); 1993 default: return super.getNamedProperty(_hash, _name, _checkValid); 1994 } 1995 1996 } 1997 1998 @Override 1999 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2000 switch (hash) { 2001 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2002 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CoverageStatus> 2003 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2004 case 2046898558: /*policyHolder*/ return this.policyHolder == null ? new Base[0] : new Base[] {this.policyHolder}; // Reference 2005 case -1219769240: /*subscriber*/ return this.subscriber == null ? new Base[0] : new Base[] {this.subscriber}; // Reference 2006 case 327834531: /*subscriberId*/ return this.subscriberId == null ? new Base[0] : new Base[] {this.subscriberId}; // StringType 2007 case -565102875: /*beneficiary*/ return this.beneficiary == null ? new Base[0] : new Base[] {this.beneficiary}; // Reference 2008 case -1109226753: /*dependent*/ return this.dependent == null ? new Base[0] : new Base[] {this.dependent}; // StringType 2009 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept 2010 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 2011 case 106443915: /*payor*/ return this.payor == null ? new Base[0] : this.payor.toArray(new Base[this.payor.size()]); // Reference 2012 case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // ClassComponent 2013 case 106006350: /*order*/ return this.order == null ? new Base[0] : new Base[] {this.order}; // PositiveIntType 2014 case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // StringType 2015 case -1866474851: /*costToBeneficiary*/ return this.costToBeneficiary == null ? new Base[0] : this.costToBeneficiary.toArray(new Base[this.costToBeneficiary.size()]); // CostToBeneficiaryComponent 2016 case 837389739: /*subrogation*/ return this.subrogation == null ? new Base[0] : new Base[] {this.subrogation}; // BooleanType 2017 case -566947566: /*contract*/ return this.contract == null ? new Base[0] : this.contract.toArray(new Base[this.contract.size()]); // Reference 2018 default: return super.getProperty(hash, name, checkValid); 2019 } 2020 2021 } 2022 2023 @Override 2024 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2025 switch (hash) { 2026 case -1618432855: // identifier 2027 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2028 return value; 2029 case -892481550: // status 2030 value = new CoverageStatusEnumFactory().fromType(castToCode(value)); 2031 this.status = (Enumeration) value; // Enumeration<CoverageStatus> 2032 return value; 2033 case 3575610: // type 2034 this.type = castToCodeableConcept(value); // CodeableConcept 2035 return value; 2036 case 2046898558: // policyHolder 2037 this.policyHolder = castToReference(value); // Reference 2038 return value; 2039 case -1219769240: // subscriber 2040 this.subscriber = castToReference(value); // Reference 2041 return value; 2042 case 327834531: // subscriberId 2043 this.subscriberId = castToString(value); // StringType 2044 return value; 2045 case -565102875: // beneficiary 2046 this.beneficiary = castToReference(value); // Reference 2047 return value; 2048 case -1109226753: // dependent 2049 this.dependent = castToString(value); // StringType 2050 return value; 2051 case -261851592: // relationship 2052 this.relationship = castToCodeableConcept(value); // CodeableConcept 2053 return value; 2054 case -991726143: // period 2055 this.period = castToPeriod(value); // Period 2056 return value; 2057 case 106443915: // payor 2058 this.getPayor().add(castToReference(value)); // Reference 2059 return value; 2060 case 94742904: // class 2061 this.getClass_().add((ClassComponent) value); // ClassComponent 2062 return value; 2063 case 106006350: // order 2064 this.order = castToPositiveInt(value); // PositiveIntType 2065 return value; 2066 case 1843485230: // network 2067 this.network = castToString(value); // StringType 2068 return value; 2069 case -1866474851: // costToBeneficiary 2070 this.getCostToBeneficiary().add((CostToBeneficiaryComponent) value); // CostToBeneficiaryComponent 2071 return value; 2072 case 837389739: // subrogation 2073 this.subrogation = castToBoolean(value); // BooleanType 2074 return value; 2075 case -566947566: // contract 2076 this.getContract().add(castToReference(value)); // Reference 2077 return value; 2078 default: return super.setProperty(hash, name, value); 2079 } 2080 2081 } 2082 2083 @Override 2084 public Base setProperty(String name, Base value) throws FHIRException { 2085 if (name.equals("identifier")) { 2086 this.getIdentifier().add(castToIdentifier(value)); 2087 } else if (name.equals("status")) { 2088 value = new CoverageStatusEnumFactory().fromType(castToCode(value)); 2089 this.status = (Enumeration) value; // Enumeration<CoverageStatus> 2090 } else if (name.equals("type")) { 2091 this.type = castToCodeableConcept(value); // CodeableConcept 2092 } else if (name.equals("policyHolder")) { 2093 this.policyHolder = castToReference(value); // Reference 2094 } else if (name.equals("subscriber")) { 2095 this.subscriber = castToReference(value); // Reference 2096 } else if (name.equals("subscriberId")) { 2097 this.subscriberId = castToString(value); // StringType 2098 } else if (name.equals("beneficiary")) { 2099 this.beneficiary = castToReference(value); // Reference 2100 } else if (name.equals("dependent")) { 2101 this.dependent = castToString(value); // StringType 2102 } else if (name.equals("relationship")) { 2103 this.relationship = castToCodeableConcept(value); // CodeableConcept 2104 } else if (name.equals("period")) { 2105 this.period = castToPeriod(value); // Period 2106 } else if (name.equals("payor")) { 2107 this.getPayor().add(castToReference(value)); 2108 } else if (name.equals("class")) { 2109 this.getClass_().add((ClassComponent) value); 2110 } else if (name.equals("order")) { 2111 this.order = castToPositiveInt(value); // PositiveIntType 2112 } else if (name.equals("network")) { 2113 this.network = castToString(value); // StringType 2114 } else if (name.equals("costToBeneficiary")) { 2115 this.getCostToBeneficiary().add((CostToBeneficiaryComponent) value); 2116 } else if (name.equals("subrogation")) { 2117 this.subrogation = castToBoolean(value); // BooleanType 2118 } else if (name.equals("contract")) { 2119 this.getContract().add(castToReference(value)); 2120 } else 2121 return super.setProperty(name, value); 2122 return value; 2123 } 2124 2125 @Override 2126 public Base makeProperty(int hash, String name) throws FHIRException { 2127 switch (hash) { 2128 case -1618432855: return addIdentifier(); 2129 case -892481550: return getStatusElement(); 2130 case 3575610: return getType(); 2131 case 2046898558: return getPolicyHolder(); 2132 case -1219769240: return getSubscriber(); 2133 case 327834531: return getSubscriberIdElement(); 2134 case -565102875: return getBeneficiary(); 2135 case -1109226753: return getDependentElement(); 2136 case -261851592: return getRelationship(); 2137 case -991726143: return getPeriod(); 2138 case 106443915: return addPayor(); 2139 case 94742904: return addClass_(); 2140 case 106006350: return getOrderElement(); 2141 case 1843485230: return getNetworkElement(); 2142 case -1866474851: return addCostToBeneficiary(); 2143 case 837389739: return getSubrogationElement(); 2144 case -566947566: return addContract(); 2145 default: return super.makeProperty(hash, name); 2146 } 2147 2148 } 2149 2150 @Override 2151 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2152 switch (hash) { 2153 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2154 case -892481550: /*status*/ return new String[] {"code"}; 2155 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2156 case 2046898558: /*policyHolder*/ return new String[] {"Reference"}; 2157 case -1219769240: /*subscriber*/ return new String[] {"Reference"}; 2158 case 327834531: /*subscriberId*/ return new String[] {"string"}; 2159 case -565102875: /*beneficiary*/ return new String[] {"Reference"}; 2160 case -1109226753: /*dependent*/ return new String[] {"string"}; 2161 case -261851592: /*relationship*/ return new String[] {"CodeableConcept"}; 2162 case -991726143: /*period*/ return new String[] {"Period"}; 2163 case 106443915: /*payor*/ return new String[] {"Reference"}; 2164 case 94742904: /*class*/ return new String[] {}; 2165 case 106006350: /*order*/ return new String[] {"positiveInt"}; 2166 case 1843485230: /*network*/ return new String[] {"string"}; 2167 case -1866474851: /*costToBeneficiary*/ return new String[] {}; 2168 case 837389739: /*subrogation*/ return new String[] {"boolean"}; 2169 case -566947566: /*contract*/ return new String[] {"Reference"}; 2170 default: return super.getTypesForProperty(hash, name); 2171 } 2172 2173 } 2174 2175 @Override 2176 public Base addChild(String name) throws FHIRException { 2177 if (name.equals("identifier")) { 2178 return addIdentifier(); 2179 } 2180 else if (name.equals("status")) { 2181 throw new FHIRException("Cannot call addChild on a primitive type Coverage.status"); 2182 } 2183 else if (name.equals("type")) { 2184 this.type = new CodeableConcept(); 2185 return this.type; 2186 } 2187 else if (name.equals("policyHolder")) { 2188 this.policyHolder = new Reference(); 2189 return this.policyHolder; 2190 } 2191 else if (name.equals("subscriber")) { 2192 this.subscriber = new Reference(); 2193 return this.subscriber; 2194 } 2195 else if (name.equals("subscriberId")) { 2196 throw new FHIRException("Cannot call addChild on a primitive type Coverage.subscriberId"); 2197 } 2198 else if (name.equals("beneficiary")) { 2199 this.beneficiary = new Reference(); 2200 return this.beneficiary; 2201 } 2202 else if (name.equals("dependent")) { 2203 throw new FHIRException("Cannot call addChild on a primitive type Coverage.dependent"); 2204 } 2205 else if (name.equals("relationship")) { 2206 this.relationship = new CodeableConcept(); 2207 return this.relationship; 2208 } 2209 else if (name.equals("period")) { 2210 this.period = new Period(); 2211 return this.period; 2212 } 2213 else if (name.equals("payor")) { 2214 return addPayor(); 2215 } 2216 else if (name.equals("class")) { 2217 return addClass_(); 2218 } 2219 else if (name.equals("order")) { 2220 throw new FHIRException("Cannot call addChild on a primitive type Coverage.order"); 2221 } 2222 else if (name.equals("network")) { 2223 throw new FHIRException("Cannot call addChild on a primitive type Coverage.network"); 2224 } 2225 else if (name.equals("costToBeneficiary")) { 2226 return addCostToBeneficiary(); 2227 } 2228 else if (name.equals("subrogation")) { 2229 throw new FHIRException("Cannot call addChild on a primitive type Coverage.subrogation"); 2230 } 2231 else if (name.equals("contract")) { 2232 return addContract(); 2233 } 2234 else 2235 return super.addChild(name); 2236 } 2237 2238 public String fhirType() { 2239 return "Coverage"; 2240 2241 } 2242 2243 public Coverage copy() { 2244 Coverage dst = new Coverage(); 2245 copyValues(dst); 2246 return dst; 2247 } 2248 2249 public void copyValues(Coverage dst) { 2250 super.copyValues(dst); 2251 if (identifier != null) { 2252 dst.identifier = new ArrayList<Identifier>(); 2253 for (Identifier i : identifier) 2254 dst.identifier.add(i.copy()); 2255 }; 2256 dst.status = status == null ? null : status.copy(); 2257 dst.type = type == null ? null : type.copy(); 2258 dst.policyHolder = policyHolder == null ? null : policyHolder.copy(); 2259 dst.subscriber = subscriber == null ? null : subscriber.copy(); 2260 dst.subscriberId = subscriberId == null ? null : subscriberId.copy(); 2261 dst.beneficiary = beneficiary == null ? null : beneficiary.copy(); 2262 dst.dependent = dependent == null ? null : dependent.copy(); 2263 dst.relationship = relationship == null ? null : relationship.copy(); 2264 dst.period = period == null ? null : period.copy(); 2265 if (payor != null) { 2266 dst.payor = new ArrayList<Reference>(); 2267 for (Reference i : payor) 2268 dst.payor.add(i.copy()); 2269 }; 2270 if (class_ != null) { 2271 dst.class_ = new ArrayList<ClassComponent>(); 2272 for (ClassComponent i : class_) 2273 dst.class_.add(i.copy()); 2274 }; 2275 dst.order = order == null ? null : order.copy(); 2276 dst.network = network == null ? null : network.copy(); 2277 if (costToBeneficiary != null) { 2278 dst.costToBeneficiary = new ArrayList<CostToBeneficiaryComponent>(); 2279 for (CostToBeneficiaryComponent i : costToBeneficiary) 2280 dst.costToBeneficiary.add(i.copy()); 2281 }; 2282 dst.subrogation = subrogation == null ? null : subrogation.copy(); 2283 if (contract != null) { 2284 dst.contract = new ArrayList<Reference>(); 2285 for (Reference i : contract) 2286 dst.contract.add(i.copy()); 2287 }; 2288 } 2289 2290 protected Coverage typedCopy() { 2291 return copy(); 2292 } 2293 2294 @Override 2295 public boolean equalsDeep(Base other_) { 2296 if (!super.equalsDeep(other_)) 2297 return false; 2298 if (!(other_ instanceof Coverage)) 2299 return false; 2300 Coverage o = (Coverage) other_; 2301 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) 2302 && compareDeep(policyHolder, o.policyHolder, true) && compareDeep(subscriber, o.subscriber, true) 2303 && compareDeep(subscriberId, o.subscriberId, true) && compareDeep(beneficiary, o.beneficiary, true) 2304 && compareDeep(dependent, o.dependent, true) && compareDeep(relationship, o.relationship, true) 2305 && compareDeep(period, o.period, true) && compareDeep(payor, o.payor, true) && compareDeep(class_, o.class_, true) 2306 && compareDeep(order, o.order, true) && compareDeep(network, o.network, true) && compareDeep(costToBeneficiary, o.costToBeneficiary, true) 2307 && compareDeep(subrogation, o.subrogation, true) && compareDeep(contract, o.contract, true); 2308 } 2309 2310 @Override 2311 public boolean equalsShallow(Base other_) { 2312 if (!super.equalsShallow(other_)) 2313 return false; 2314 if (!(other_ instanceof Coverage)) 2315 return false; 2316 Coverage o = (Coverage) other_; 2317 return compareValues(status, o.status, true) && compareValues(subscriberId, o.subscriberId, true) && compareValues(dependent, o.dependent, true) 2318 && compareValues(order, o.order, true) && compareValues(network, o.network, true) && compareValues(subrogation, o.subrogation, true) 2319 ; 2320 } 2321 2322 public boolean isEmpty() { 2323 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type 2324 , policyHolder, subscriber, subscriberId, beneficiary, dependent, relationship, period 2325 , payor, class_, order, network, costToBeneficiary, subrogation, contract); 2326 } 2327 2328 @Override 2329 public ResourceType getResourceType() { 2330 return ResourceType.Coverage; 2331 } 2332 2333 /** 2334 * Search parameter: <b>identifier</b> 2335 * <p> 2336 * Description: <b>The primary identifier of the insured and the coverage</b><br> 2337 * Type: <b>token</b><br> 2338 * Path: <b>Coverage.identifier</b><br> 2339 * </p> 2340 */ 2341 @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured and the coverage", type="token" ) 2342 public static final String SP_IDENTIFIER = "identifier"; 2343 /** 2344 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2345 * <p> 2346 * Description: <b>The primary identifier of the insured and the coverage</b><br> 2347 * Type: <b>token</b><br> 2348 * Path: <b>Coverage.identifier</b><br> 2349 * </p> 2350 */ 2351 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2352 2353 /** 2354 * Search parameter: <b>payor</b> 2355 * <p> 2356 * Description: <b>The identity of the insurer or party paying for services</b><br> 2357 * Type: <b>reference</b><br> 2358 * Path: <b>Coverage.payor</b><br> 2359 * </p> 2360 */ 2361 @SearchParamDefinition(name="payor", path="Coverage.payor", description="The identity of the insurer or party paying for services", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Organization.class, Patient.class, RelatedPerson.class } ) 2362 public static final String SP_PAYOR = "payor"; 2363 /** 2364 * <b>Fluent Client</b> search parameter constant for <b>payor</b> 2365 * <p> 2366 * Description: <b>The identity of the insurer or party paying for services</b><br> 2367 * Type: <b>reference</b><br> 2368 * Path: <b>Coverage.payor</b><br> 2369 * </p> 2370 */ 2371 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PAYOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PAYOR); 2372 2373/** 2374 * Constant for fluent queries to be used to add include statements. Specifies 2375 * the path value of "<b>Coverage:payor</b>". 2376 */ 2377 public static final ca.uhn.fhir.model.api.Include INCLUDE_PAYOR = new ca.uhn.fhir.model.api.Include("Coverage:payor").toLocked(); 2378 2379 /** 2380 * Search parameter: <b>subscriber</b> 2381 * <p> 2382 * Description: <b>Reference to the subscriber</b><br> 2383 * Type: <b>reference</b><br> 2384 * Path: <b>Coverage.subscriber</b><br> 2385 * </p> 2386 */ 2387 @SearchParamDefinition(name="subscriber", path="Coverage.subscriber", description="Reference to the subscriber", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Patient.class, RelatedPerson.class } ) 2388 public static final String SP_SUBSCRIBER = "subscriber"; 2389 /** 2390 * <b>Fluent Client</b> search parameter constant for <b>subscriber</b> 2391 * <p> 2392 * Description: <b>Reference to the subscriber</b><br> 2393 * Type: <b>reference</b><br> 2394 * Path: <b>Coverage.subscriber</b><br> 2395 * </p> 2396 */ 2397 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBSCRIBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBSCRIBER); 2398 2399/** 2400 * Constant for fluent queries to be used to add include statements. Specifies 2401 * the path value of "<b>Coverage:subscriber</b>". 2402 */ 2403 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBSCRIBER = new ca.uhn.fhir.model.api.Include("Coverage:subscriber").toLocked(); 2404 2405 /** 2406 * Search parameter: <b>beneficiary</b> 2407 * <p> 2408 * Description: <b>Covered party</b><br> 2409 * Type: <b>reference</b><br> 2410 * Path: <b>Coverage.beneficiary</b><br> 2411 * </p> 2412 */ 2413 @SearchParamDefinition(name="beneficiary", path="Coverage.beneficiary", description="Covered party", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 2414 public static final String SP_BENEFICIARY = "beneficiary"; 2415 /** 2416 * <b>Fluent Client</b> search parameter constant for <b>beneficiary</b> 2417 * <p> 2418 * Description: <b>Covered party</b><br> 2419 * Type: <b>reference</b><br> 2420 * Path: <b>Coverage.beneficiary</b><br> 2421 * </p> 2422 */ 2423 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BENEFICIARY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BENEFICIARY); 2424 2425/** 2426 * Constant for fluent queries to be used to add include statements. Specifies 2427 * the path value of "<b>Coverage:beneficiary</b>". 2428 */ 2429 public static final ca.uhn.fhir.model.api.Include INCLUDE_BENEFICIARY = new ca.uhn.fhir.model.api.Include("Coverage:beneficiary").toLocked(); 2430 2431 /** 2432 * Search parameter: <b>patient</b> 2433 * <p> 2434 * Description: <b>Retrieve coverages for a patient</b><br> 2435 * Type: <b>reference</b><br> 2436 * Path: <b>Coverage.beneficiary</b><br> 2437 * </p> 2438 */ 2439 @SearchParamDefinition(name="patient", path="Coverage.beneficiary", description="Retrieve coverages for a patient", type="reference", target={Patient.class } ) 2440 public static final String SP_PATIENT = "patient"; 2441 /** 2442 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2443 * <p> 2444 * Description: <b>Retrieve coverages for a patient</b><br> 2445 * Type: <b>reference</b><br> 2446 * Path: <b>Coverage.beneficiary</b><br> 2447 * </p> 2448 */ 2449 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2450 2451/** 2452 * Constant for fluent queries to be used to add include statements. Specifies 2453 * the path value of "<b>Coverage:patient</b>". 2454 */ 2455 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Coverage:patient").toLocked(); 2456 2457 /** 2458 * Search parameter: <b>class-value</b> 2459 * <p> 2460 * Description: <b>Value of the class (eg. Plan number, group number)</b><br> 2461 * Type: <b>string</b><br> 2462 * Path: <b>Coverage.class.value</b><br> 2463 * </p> 2464 */ 2465 @SearchParamDefinition(name="class-value", path="Coverage.class.value", description="Value of the class (eg. Plan number, group number)", type="string" ) 2466 public static final String SP_CLASS_VALUE = "class-value"; 2467 /** 2468 * <b>Fluent Client</b> search parameter constant for <b>class-value</b> 2469 * <p> 2470 * Description: <b>Value of the class (eg. Plan number, group number)</b><br> 2471 * Type: <b>string</b><br> 2472 * Path: <b>Coverage.class.value</b><br> 2473 * </p> 2474 */ 2475 public static final ca.uhn.fhir.rest.gclient.StringClientParam CLASS_VALUE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_CLASS_VALUE); 2476 2477 /** 2478 * Search parameter: <b>type</b> 2479 * <p> 2480 * Description: <b>The kind of coverage (health plan, auto, Workers Compensation)</b><br> 2481 * Type: <b>token</b><br> 2482 * Path: <b>Coverage.type</b><br> 2483 * </p> 2484 */ 2485 @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage (health plan, auto, Workers Compensation)", type="token" ) 2486 public static final String SP_TYPE = "type"; 2487 /** 2488 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2489 * <p> 2490 * Description: <b>The kind of coverage (health plan, auto, Workers Compensation)</b><br> 2491 * Type: <b>token</b><br> 2492 * Path: <b>Coverage.type</b><br> 2493 * </p> 2494 */ 2495 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 2496 2497 /** 2498 * Search parameter: <b>dependent</b> 2499 * <p> 2500 * Description: <b>Dependent number</b><br> 2501 * Type: <b>string</b><br> 2502 * Path: <b>Coverage.dependent</b><br> 2503 * </p> 2504 */ 2505 @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="string" ) 2506 public static final String SP_DEPENDENT = "dependent"; 2507 /** 2508 * <b>Fluent Client</b> search parameter constant for <b>dependent</b> 2509 * <p> 2510 * Description: <b>Dependent number</b><br> 2511 * Type: <b>string</b><br> 2512 * Path: <b>Coverage.dependent</b><br> 2513 * </p> 2514 */ 2515 public static final ca.uhn.fhir.rest.gclient.StringClientParam DEPENDENT = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DEPENDENT); 2516 2517 /** 2518 * Search parameter: <b>class-type</b> 2519 * <p> 2520 * Description: <b>Coverage class (eg. plan, group)</b><br> 2521 * Type: <b>token</b><br> 2522 * Path: <b>Coverage.class.type</b><br> 2523 * </p> 2524 */ 2525 @SearchParamDefinition(name="class-type", path="Coverage.class.type", description="Coverage class (eg. plan, group)", type="token" ) 2526 public static final String SP_CLASS_TYPE = "class-type"; 2527 /** 2528 * <b>Fluent Client</b> search parameter constant for <b>class-type</b> 2529 * <p> 2530 * Description: <b>Coverage class (eg. plan, group)</b><br> 2531 * Type: <b>token</b><br> 2532 * Path: <b>Coverage.class.type</b><br> 2533 * </p> 2534 */ 2535 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLASS_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLASS_TYPE); 2536 2537 /** 2538 * Search parameter: <b>policy-holder</b> 2539 * <p> 2540 * Description: <b>Reference to the policyholder</b><br> 2541 * Type: <b>reference</b><br> 2542 * Path: <b>Coverage.policyHolder</b><br> 2543 * </p> 2544 */ 2545 @SearchParamDefinition(name="policy-holder", path="Coverage.policyHolder", description="Reference to the policyholder", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Organization.class, Patient.class, RelatedPerson.class } ) 2546 public static final String SP_POLICY_HOLDER = "policy-holder"; 2547 /** 2548 * <b>Fluent Client</b> search parameter constant for <b>policy-holder</b> 2549 * <p> 2550 * Description: <b>Reference to the policyholder</b><br> 2551 * Type: <b>reference</b><br> 2552 * Path: <b>Coverage.policyHolder</b><br> 2553 * </p> 2554 */ 2555 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam POLICY_HOLDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_POLICY_HOLDER); 2556 2557/** 2558 * Constant for fluent queries to be used to add include statements. Specifies 2559 * the path value of "<b>Coverage:policy-holder</b>". 2560 */ 2561 public static final ca.uhn.fhir.model.api.Include INCLUDE_POLICY_HOLDER = new ca.uhn.fhir.model.api.Include("Coverage:policy-holder").toLocked(); 2562 2563 /** 2564 * Search parameter: <b>status</b> 2565 * <p> 2566 * Description: <b>The status of the Coverage</b><br> 2567 * Type: <b>token</b><br> 2568 * Path: <b>Coverage.status</b><br> 2569 * </p> 2570 */ 2571 @SearchParamDefinition(name="status", path="Coverage.status", description="The status of the Coverage", type="token" ) 2572 public static final String SP_STATUS = "status"; 2573 /** 2574 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2575 * <p> 2576 * Description: <b>The status of the Coverage</b><br> 2577 * Type: <b>token</b><br> 2578 * Path: <b>Coverage.status</b><br> 2579 * </p> 2580 */ 2581 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2582 2583 2584}