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