![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import java.math.*; 038import org.hl7.fhir.utilities.Utilities; 039import org.hl7.fhir.r5.model.Enumerations.*; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.exceptions.FHIRException; 042import org.hl7.fhir.instance.model.api.ICompositeType; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import ca.uhn.fhir.model.api.annotation.Child; 047import ca.uhn.fhir.model.api.annotation.ChildOrder; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.Block; 050 051/** 052 * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. 053 */ 054@ResourceDef(name="ExplanationOfBenefit", profile="http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit") 055public class ExplanationOfBenefit extends DomainResource { 056 057 public enum ExplanationOfBenefitStatus { 058 /** 059 * The resource instance is currently in-force. 060 */ 061 ACTIVE, 062 /** 063 * The resource instance is withdrawn, rescinded or reversed. 064 */ 065 CANCELLED, 066 /** 067 * A new resource instance the contents of which is not complete. 068 */ 069 DRAFT, 070 /** 071 * The resource instance was entered in error. 072 */ 073 ENTEREDINERROR, 074 /** 075 * added to help the parsers with the generic types 076 */ 077 NULL; 078 public static ExplanationOfBenefitStatus fromCode(String codeString) throws FHIRException { 079 if (codeString == null || "".equals(codeString)) 080 return null; 081 if ("active".equals(codeString)) 082 return ACTIVE; 083 if ("cancelled".equals(codeString)) 084 return CANCELLED; 085 if ("draft".equals(codeString)) 086 return DRAFT; 087 if ("entered-in-error".equals(codeString)) 088 return ENTEREDINERROR; 089 if (Configuration.isAcceptInvalidEnums()) 090 return null; 091 else 092 throw new FHIRException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case ACTIVE: return "active"; 097 case CANCELLED: return "cancelled"; 098 case DRAFT: return "draft"; 099 case ENTEREDINERROR: return "entered-in-error"; 100 case NULL: return null; 101 default: return "?"; 102 } 103 } 104 public String getSystem() { 105 switch (this) { 106 case ACTIVE: return "http://hl7.org/fhir/explanationofbenefit-status"; 107 case CANCELLED: return "http://hl7.org/fhir/explanationofbenefit-status"; 108 case DRAFT: return "http://hl7.org/fhir/explanationofbenefit-status"; 109 case ENTEREDINERROR: return "http://hl7.org/fhir/explanationofbenefit-status"; 110 case NULL: return null; 111 default: return "?"; 112 } 113 } 114 public String getDefinition() { 115 switch (this) { 116 case ACTIVE: return "The resource instance is currently in-force."; 117 case CANCELLED: return "The resource instance is withdrawn, rescinded or reversed."; 118 case DRAFT: return "A new resource instance the contents of which is not complete."; 119 case ENTEREDINERROR: return "The resource instance was entered in error."; 120 case NULL: return null; 121 default: return "?"; 122 } 123 } 124 public String getDisplay() { 125 switch (this) { 126 case ACTIVE: return "Active"; 127 case CANCELLED: return "Cancelled"; 128 case DRAFT: return "Draft"; 129 case ENTEREDINERROR: return "Entered In Error"; 130 case NULL: return null; 131 default: return "?"; 132 } 133 } 134 } 135 136 public static class ExplanationOfBenefitStatusEnumFactory implements EnumFactory<ExplanationOfBenefitStatus> { 137 public ExplanationOfBenefitStatus fromCode(String codeString) throws IllegalArgumentException { 138 if (codeString == null || "".equals(codeString)) 139 if (codeString == null || "".equals(codeString)) 140 return null; 141 if ("active".equals(codeString)) 142 return ExplanationOfBenefitStatus.ACTIVE; 143 if ("cancelled".equals(codeString)) 144 return ExplanationOfBenefitStatus.CANCELLED; 145 if ("draft".equals(codeString)) 146 return ExplanationOfBenefitStatus.DRAFT; 147 if ("entered-in-error".equals(codeString)) 148 return ExplanationOfBenefitStatus.ENTEREDINERROR; 149 throw new IllegalArgumentException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); 150 } 151 public Enumeration<ExplanationOfBenefitStatus> fromType(PrimitiveType<?> code) throws FHIRException { 152 if (code == null) 153 return null; 154 if (code.isEmpty()) 155 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.NULL, code); 156 String codeString = ((PrimitiveType) code).asStringValue(); 157 if (codeString == null || "".equals(codeString)) 158 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.NULL, code); 159 if ("active".equals(codeString)) 160 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.ACTIVE, code); 161 if ("cancelled".equals(codeString)) 162 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.CANCELLED, code); 163 if ("draft".equals(codeString)) 164 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.DRAFT, code); 165 if ("entered-in-error".equals(codeString)) 166 return new Enumeration<ExplanationOfBenefitStatus>(this, ExplanationOfBenefitStatus.ENTEREDINERROR, code); 167 throw new FHIRException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); 168 } 169 public String toCode(ExplanationOfBenefitStatus code) { 170 if (code == ExplanationOfBenefitStatus.ACTIVE) 171 return "active"; 172 if (code == ExplanationOfBenefitStatus.CANCELLED) 173 return "cancelled"; 174 if (code == ExplanationOfBenefitStatus.DRAFT) 175 return "draft"; 176 if (code == ExplanationOfBenefitStatus.ENTEREDINERROR) 177 return "entered-in-error"; 178 return "?"; 179 } 180 public String toSystem(ExplanationOfBenefitStatus code) { 181 return code.getSystem(); 182 } 183 } 184 185 @Block() 186 public static class RelatedClaimComponent extends BackboneElement implements IBaseBackboneElement { 187 /** 188 * Reference to a related claim. 189 */ 190 @Child(name = "claim", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=false) 191 @Description(shortDefinition="Reference to the related claim", formalDefinition="Reference to a related claim." ) 192 protected Reference claim; 193 194 /** 195 * A code to convey how the claims are related. 196 */ 197 @Child(name = "relationship", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 198 @Description(shortDefinition="How the reference claim is related", formalDefinition="A code to convey how the claims are related." ) 199 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/related-claim-relationship") 200 protected CodeableConcept relationship; 201 202 /** 203 * An alternate organizational reference to the case or file to which this particular claim pertains. 204 */ 205 @Child(name = "reference", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=false) 206 @Description(shortDefinition="File or case reference", formalDefinition="An alternate organizational reference to the case or file to which this particular claim pertains." ) 207 protected Identifier reference; 208 209 private static final long serialVersionUID = 1047077926L; 210 211 /** 212 * Constructor 213 */ 214 public RelatedClaimComponent() { 215 super(); 216 } 217 218 /** 219 * @return {@link #claim} (Reference to a related claim.) 220 */ 221 public Reference getClaim() { 222 if (this.claim == null) 223 if (Configuration.errorOnAutoCreate()) 224 throw new Error("Attempt to auto-create RelatedClaimComponent.claim"); 225 else if (Configuration.doAutoCreate()) 226 this.claim = new Reference(); // cc 227 return this.claim; 228 } 229 230 public boolean hasClaim() { 231 return this.claim != null && !this.claim.isEmpty(); 232 } 233 234 /** 235 * @param value {@link #claim} (Reference to a related claim.) 236 */ 237 public RelatedClaimComponent setClaim(Reference value) { 238 this.claim = value; 239 return this; 240 } 241 242 /** 243 * @return {@link #relationship} (A code to convey how the claims are related.) 244 */ 245 public CodeableConcept getRelationship() { 246 if (this.relationship == null) 247 if (Configuration.errorOnAutoCreate()) 248 throw new Error("Attempt to auto-create RelatedClaimComponent.relationship"); 249 else if (Configuration.doAutoCreate()) 250 this.relationship = new CodeableConcept(); // cc 251 return this.relationship; 252 } 253 254 public boolean hasRelationship() { 255 return this.relationship != null && !this.relationship.isEmpty(); 256 } 257 258 /** 259 * @param value {@link #relationship} (A code to convey how the claims are related.) 260 */ 261 public RelatedClaimComponent setRelationship(CodeableConcept value) { 262 this.relationship = value; 263 return this; 264 } 265 266 /** 267 * @return {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains.) 268 */ 269 public Identifier getReference() { 270 if (this.reference == null) 271 if (Configuration.errorOnAutoCreate()) 272 throw new Error("Attempt to auto-create RelatedClaimComponent.reference"); 273 else if (Configuration.doAutoCreate()) 274 this.reference = new Identifier(); // cc 275 return this.reference; 276 } 277 278 public boolean hasReference() { 279 return this.reference != null && !this.reference.isEmpty(); 280 } 281 282 /** 283 * @param value {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains.) 284 */ 285 public RelatedClaimComponent setReference(Identifier value) { 286 this.reference = value; 287 return this; 288 } 289 290 protected void listChildren(List<Property> children) { 291 super.listChildren(children); 292 children.add(new Property("claim", "Reference(Claim)", "Reference to a related claim.", 0, 1, claim)); 293 children.add(new Property("relationship", "CodeableConcept", "A code to convey how the claims are related.", 0, 1, relationship)); 294 children.add(new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains.", 0, 1, reference)); 295 } 296 297 @Override 298 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 299 switch (_hash) { 300 case 94742588: /*claim*/ return new Property("claim", "Reference(Claim)", "Reference to a related claim.", 0, 1, claim); 301 case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "A code to convey how the claims are related.", 0, 1, relationship); 302 case -925155509: /*reference*/ return new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains.", 0, 1, reference); 303 default: return super.getNamedProperty(_hash, _name, _checkValid); 304 } 305 306 } 307 308 @Override 309 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 310 switch (hash) { 311 case 94742588: /*claim*/ return this.claim == null ? new Base[0] : new Base[] {this.claim}; // Reference 312 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept 313 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Identifier 314 default: return super.getProperty(hash, name, checkValid); 315 } 316 317 } 318 319 @Override 320 public Base setProperty(int hash, String name, Base value) throws FHIRException { 321 switch (hash) { 322 case 94742588: // claim 323 this.claim = TypeConvertor.castToReference(value); // Reference 324 return value; 325 case -261851592: // relationship 326 this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 327 return value; 328 case -925155509: // reference 329 this.reference = TypeConvertor.castToIdentifier(value); // Identifier 330 return value; 331 default: return super.setProperty(hash, name, value); 332 } 333 334 } 335 336 @Override 337 public Base setProperty(String name, Base value) throws FHIRException { 338 if (name.equals("claim")) { 339 this.claim = TypeConvertor.castToReference(value); // Reference 340 } else if (name.equals("relationship")) { 341 this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 342 } else if (name.equals("reference")) { 343 this.reference = TypeConvertor.castToIdentifier(value); // Identifier 344 } else 345 return super.setProperty(name, value); 346 return value; 347 } 348 349 @Override 350 public void removeChild(String name, Base value) throws FHIRException { 351 if (name.equals("claim")) { 352 this.claim = null; 353 } else if (name.equals("relationship")) { 354 this.relationship = null; 355 } else if (name.equals("reference")) { 356 this.reference = null; 357 } else 358 super.removeChild(name, value); 359 360 } 361 362 @Override 363 public Base makeProperty(int hash, String name) throws FHIRException { 364 switch (hash) { 365 case 94742588: return getClaim(); 366 case -261851592: return getRelationship(); 367 case -925155509: return getReference(); 368 default: return super.makeProperty(hash, name); 369 } 370 371 } 372 373 @Override 374 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 375 switch (hash) { 376 case 94742588: /*claim*/ return new String[] {"Reference"}; 377 case -261851592: /*relationship*/ return new String[] {"CodeableConcept"}; 378 case -925155509: /*reference*/ return new String[] {"Identifier"}; 379 default: return super.getTypesForProperty(hash, name); 380 } 381 382 } 383 384 @Override 385 public Base addChild(String name) throws FHIRException { 386 if (name.equals("claim")) { 387 this.claim = new Reference(); 388 return this.claim; 389 } 390 else if (name.equals("relationship")) { 391 this.relationship = new CodeableConcept(); 392 return this.relationship; 393 } 394 else if (name.equals("reference")) { 395 this.reference = new Identifier(); 396 return this.reference; 397 } 398 else 399 return super.addChild(name); 400 } 401 402 public RelatedClaimComponent copy() { 403 RelatedClaimComponent dst = new RelatedClaimComponent(); 404 copyValues(dst); 405 return dst; 406 } 407 408 public void copyValues(RelatedClaimComponent dst) { 409 super.copyValues(dst); 410 dst.claim = claim == null ? null : claim.copy(); 411 dst.relationship = relationship == null ? null : relationship.copy(); 412 dst.reference = reference == null ? null : reference.copy(); 413 } 414 415 @Override 416 public boolean equalsDeep(Base other_) { 417 if (!super.equalsDeep(other_)) 418 return false; 419 if (!(other_ instanceof RelatedClaimComponent)) 420 return false; 421 RelatedClaimComponent o = (RelatedClaimComponent) other_; 422 return compareDeep(claim, o.claim, true) && compareDeep(relationship, o.relationship, true) && compareDeep(reference, o.reference, true) 423 ; 424 } 425 426 @Override 427 public boolean equalsShallow(Base other_) { 428 if (!super.equalsShallow(other_)) 429 return false; 430 if (!(other_ instanceof RelatedClaimComponent)) 431 return false; 432 RelatedClaimComponent o = (RelatedClaimComponent) other_; 433 return true; 434 } 435 436 public boolean isEmpty() { 437 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(claim, relationship, reference 438 ); 439 } 440 441 public String fhirType() { 442 return "ExplanationOfBenefit.related"; 443 444 } 445 446 } 447 448 @Block() 449 public static class ExplanationOfBenefitEventComponent extends BackboneElement implements IBaseBackboneElement { 450 /** 451 * A coded event such as when a service is expected or a card printed. 452 */ 453 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 454 @Description(shortDefinition="Specific event", formalDefinition="A coded event such as when a service is expected or a card printed." ) 455 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/datestype") 456 protected CodeableConcept type; 457 458 /** 459 * A date or period in the past or future indicating when the event occurred or is expectd to occur. 460 */ 461 @Child(name = "when", type = {DateTimeType.class, Period.class}, order=2, min=1, max=1, modifier=false, summary=false) 462 @Description(shortDefinition="Occurance date or period", formalDefinition="A date or period in the past or future indicating when the event occurred or is expectd to occur." ) 463 protected DataType when; 464 465 private static final long serialVersionUID = -634897375L; 466 467 /** 468 * Constructor 469 */ 470 public ExplanationOfBenefitEventComponent() { 471 super(); 472 } 473 474 /** 475 * Constructor 476 */ 477 public ExplanationOfBenefitEventComponent(CodeableConcept type, DataType when) { 478 super(); 479 this.setType(type); 480 this.setWhen(when); 481 } 482 483 /** 484 * @return {@link #type} (A coded event such as when a service is expected or a card printed.) 485 */ 486 public CodeableConcept getType() { 487 if (this.type == null) 488 if (Configuration.errorOnAutoCreate()) 489 throw new Error("Attempt to auto-create ExplanationOfBenefitEventComponent.type"); 490 else if (Configuration.doAutoCreate()) 491 this.type = new CodeableConcept(); // cc 492 return this.type; 493 } 494 495 public boolean hasType() { 496 return this.type != null && !this.type.isEmpty(); 497 } 498 499 /** 500 * @param value {@link #type} (A coded event such as when a service is expected or a card printed.) 501 */ 502 public ExplanationOfBenefitEventComponent setType(CodeableConcept value) { 503 this.type = value; 504 return this; 505 } 506 507 /** 508 * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.) 509 */ 510 public DataType getWhen() { 511 return this.when; 512 } 513 514 /** 515 * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.) 516 */ 517 public DateTimeType getWhenDateTimeType() throws FHIRException { 518 if (this.when == null) 519 this.when = new DateTimeType(); 520 if (!(this.when instanceof DateTimeType)) 521 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.when.getClass().getName()+" was encountered"); 522 return (DateTimeType) this.when; 523 } 524 525 public boolean hasWhenDateTimeType() { 526 return this != null && this.when instanceof DateTimeType; 527 } 528 529 /** 530 * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.) 531 */ 532 public Period getWhenPeriod() throws FHIRException { 533 if (this.when == null) 534 this.when = new Period(); 535 if (!(this.when instanceof Period)) 536 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered"); 537 return (Period) this.when; 538 } 539 540 public boolean hasWhenPeriod() { 541 return this != null && this.when instanceof Period; 542 } 543 544 public boolean hasWhen() { 545 return this.when != null && !this.when.isEmpty(); 546 } 547 548 /** 549 * @param value {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.) 550 */ 551 public ExplanationOfBenefitEventComponent setWhen(DataType value) { 552 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 553 throw new FHIRException("Not the right type for ExplanationOfBenefit.event.when[x]: "+value.fhirType()); 554 this.when = value; 555 return this; 556 } 557 558 protected void listChildren(List<Property> children) { 559 super.listChildren(children); 560 children.add(new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type)); 561 children.add(new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when)); 562 } 563 564 @Override 565 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 566 switch (_hash) { 567 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type); 568 case 1312831238: /*when[x]*/ return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when); 569 case 3648314: /*when*/ return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when); 570 case -1785502475: /*whenDateTime*/ return new Property("when[x]", "dateTime", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when); 571 case 251476379: /*whenPeriod*/ return new Property("when[x]", "Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when); 572 default: return super.getNamedProperty(_hash, _name, _checkValid); 573 } 574 575 } 576 577 @Override 578 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 579 switch (hash) { 580 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 581 case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // DataType 582 default: return super.getProperty(hash, name, checkValid); 583 } 584 585 } 586 587 @Override 588 public Base setProperty(int hash, String name, Base value) throws FHIRException { 589 switch (hash) { 590 case 3575610: // type 591 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 592 return value; 593 case 3648314: // when 594 this.when = TypeConvertor.castToType(value); // DataType 595 return value; 596 default: return super.setProperty(hash, name, value); 597 } 598 599 } 600 601 @Override 602 public Base setProperty(String name, Base value) throws FHIRException { 603 if (name.equals("type")) { 604 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 605 } else if (name.equals("when[x]")) { 606 this.when = TypeConvertor.castToType(value); // DataType 607 } else 608 return super.setProperty(name, value); 609 return value; 610 } 611 612 @Override 613 public void removeChild(String name, Base value) throws FHIRException { 614 if (name.equals("type")) { 615 this.type = null; 616 } else if (name.equals("when[x]")) { 617 this.when = null; 618 } else 619 super.removeChild(name, value); 620 621 } 622 623 @Override 624 public Base makeProperty(int hash, String name) throws FHIRException { 625 switch (hash) { 626 case 3575610: return getType(); 627 case 1312831238: return getWhen(); 628 case 3648314: return getWhen(); 629 default: return super.makeProperty(hash, name); 630 } 631 632 } 633 634 @Override 635 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 636 switch (hash) { 637 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 638 case 3648314: /*when*/ return new String[] {"dateTime", "Period"}; 639 default: return super.getTypesForProperty(hash, name); 640 } 641 642 } 643 644 @Override 645 public Base addChild(String name) throws FHIRException { 646 if (name.equals("type")) { 647 this.type = new CodeableConcept(); 648 return this.type; 649 } 650 else if (name.equals("whenDateTime")) { 651 this.when = new DateTimeType(); 652 return this.when; 653 } 654 else if (name.equals("whenPeriod")) { 655 this.when = new Period(); 656 return this.when; 657 } 658 else 659 return super.addChild(name); 660 } 661 662 public ExplanationOfBenefitEventComponent copy() { 663 ExplanationOfBenefitEventComponent dst = new ExplanationOfBenefitEventComponent(); 664 copyValues(dst); 665 return dst; 666 } 667 668 public void copyValues(ExplanationOfBenefitEventComponent dst) { 669 super.copyValues(dst); 670 dst.type = type == null ? null : type.copy(); 671 dst.when = when == null ? null : when.copy(); 672 } 673 674 @Override 675 public boolean equalsDeep(Base other_) { 676 if (!super.equalsDeep(other_)) 677 return false; 678 if (!(other_ instanceof ExplanationOfBenefitEventComponent)) 679 return false; 680 ExplanationOfBenefitEventComponent o = (ExplanationOfBenefitEventComponent) other_; 681 return compareDeep(type, o.type, true) && compareDeep(when, o.when, true); 682 } 683 684 @Override 685 public boolean equalsShallow(Base other_) { 686 if (!super.equalsShallow(other_)) 687 return false; 688 if (!(other_ instanceof ExplanationOfBenefitEventComponent)) 689 return false; 690 ExplanationOfBenefitEventComponent o = (ExplanationOfBenefitEventComponent) other_; 691 return true; 692 } 693 694 public boolean isEmpty() { 695 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, when); 696 } 697 698 public String fhirType() { 699 return "ExplanationOfBenefit.event"; 700 701 } 702 703 } 704 705 @Block() 706 public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement { 707 /** 708 * Type of Party to be reimbursed: Subscriber, provider, other. 709 */ 710 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 711 @Description(shortDefinition="Category of recipient", formalDefinition="Type of Party to be reimbursed: Subscriber, provider, other." ) 712 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payeetype") 713 protected CodeableConcept type; 714 715 /** 716 * Reference to the individual or organization to whom any payment will be made. 717 */ 718 @Child(name = "party", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=false) 719 @Description(shortDefinition="Recipient reference", formalDefinition="Reference to the individual or organization to whom any payment will be made." ) 720 protected Reference party; 721 722 private static final long serialVersionUID = -1948897146L; 723 724 /** 725 * Constructor 726 */ 727 public PayeeComponent() { 728 super(); 729 } 730 731 /** 732 * @return {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) 733 */ 734 public CodeableConcept getType() { 735 if (this.type == null) 736 if (Configuration.errorOnAutoCreate()) 737 throw new Error("Attempt to auto-create PayeeComponent.type"); 738 else if (Configuration.doAutoCreate()) 739 this.type = new CodeableConcept(); // cc 740 return this.type; 741 } 742 743 public boolean hasType() { 744 return this.type != null && !this.type.isEmpty(); 745 } 746 747 /** 748 * @param value {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) 749 */ 750 public PayeeComponent setType(CodeableConcept value) { 751 this.type = value; 752 return this; 753 } 754 755 /** 756 * @return {@link #party} (Reference to the individual or organization to whom any payment will be made.) 757 */ 758 public Reference getParty() { 759 if (this.party == null) 760 if (Configuration.errorOnAutoCreate()) 761 throw new Error("Attempt to auto-create PayeeComponent.party"); 762 else if (Configuration.doAutoCreate()) 763 this.party = new Reference(); // cc 764 return this.party; 765 } 766 767 public boolean hasParty() { 768 return this.party != null && !this.party.isEmpty(); 769 } 770 771 /** 772 * @param value {@link #party} (Reference to the individual or organization to whom any payment will be made.) 773 */ 774 public PayeeComponent setParty(Reference value) { 775 this.party = value; 776 return this; 777 } 778 779 protected void listChildren(List<Property> children) { 780 super.listChildren(children); 781 children.add(new Property("type", "CodeableConcept", "Type of Party to be reimbursed: Subscriber, provider, other.", 0, 1, type)); 782 children.add(new Property("party", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "Reference to the individual or organization to whom any payment will be made.", 0, 1, party)); 783 } 784 785 @Override 786 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 787 switch (_hash) { 788 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of Party to be reimbursed: Subscriber, provider, other.", 0, 1, type); 789 case 106437350: /*party*/ return new Property("party", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "Reference to the individual or organization to whom any payment will be made.", 0, 1, party); 790 default: return super.getNamedProperty(_hash, _name, _checkValid); 791 } 792 793 } 794 795 @Override 796 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 797 switch (hash) { 798 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 799 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference 800 default: return super.getProperty(hash, name, checkValid); 801 } 802 803 } 804 805 @Override 806 public Base setProperty(int hash, String name, Base value) throws FHIRException { 807 switch (hash) { 808 case 3575610: // type 809 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 810 return value; 811 case 106437350: // party 812 this.party = TypeConvertor.castToReference(value); // Reference 813 return value; 814 default: return super.setProperty(hash, name, value); 815 } 816 817 } 818 819 @Override 820 public Base setProperty(String name, Base value) throws FHIRException { 821 if (name.equals("type")) { 822 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 823 } else if (name.equals("party")) { 824 this.party = TypeConvertor.castToReference(value); // Reference 825 } else 826 return super.setProperty(name, value); 827 return value; 828 } 829 830 @Override 831 public void removeChild(String name, Base value) throws FHIRException { 832 if (name.equals("type")) { 833 this.type = null; 834 } else if (name.equals("party")) { 835 this.party = null; 836 } else 837 super.removeChild(name, value); 838 839 } 840 841 @Override 842 public Base makeProperty(int hash, String name) throws FHIRException { 843 switch (hash) { 844 case 3575610: return getType(); 845 case 106437350: return getParty(); 846 default: return super.makeProperty(hash, name); 847 } 848 849 } 850 851 @Override 852 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 853 switch (hash) { 854 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 855 case 106437350: /*party*/ return new String[] {"Reference"}; 856 default: return super.getTypesForProperty(hash, name); 857 } 858 859 } 860 861 @Override 862 public Base addChild(String name) throws FHIRException { 863 if (name.equals("type")) { 864 this.type = new CodeableConcept(); 865 return this.type; 866 } 867 else if (name.equals("party")) { 868 this.party = new Reference(); 869 return this.party; 870 } 871 else 872 return super.addChild(name); 873 } 874 875 public PayeeComponent copy() { 876 PayeeComponent dst = new PayeeComponent(); 877 copyValues(dst); 878 return dst; 879 } 880 881 public void copyValues(PayeeComponent dst) { 882 super.copyValues(dst); 883 dst.type = type == null ? null : type.copy(); 884 dst.party = party == null ? null : party.copy(); 885 } 886 887 @Override 888 public boolean equalsDeep(Base other_) { 889 if (!super.equalsDeep(other_)) 890 return false; 891 if (!(other_ instanceof PayeeComponent)) 892 return false; 893 PayeeComponent o = (PayeeComponent) other_; 894 return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); 895 } 896 897 @Override 898 public boolean equalsShallow(Base other_) { 899 if (!super.equalsShallow(other_)) 900 return false; 901 if (!(other_ instanceof PayeeComponent)) 902 return false; 903 PayeeComponent o = (PayeeComponent) other_; 904 return true; 905 } 906 907 public boolean isEmpty() { 908 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party); 909 } 910 911 public String fhirType() { 912 return "ExplanationOfBenefit.payee"; 913 914 } 915 916 } 917 918 @Block() 919 public static class CareTeamComponent extends BackboneElement implements IBaseBackboneElement { 920 /** 921 * A number to uniquely identify care team entries. 922 */ 923 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 924 @Description(shortDefinition="Order of care team", formalDefinition="A number to uniquely identify care team entries." ) 925 protected PositiveIntType sequence; 926 927 /** 928 * Member of the team who provided the product or service. 929 */ 930 @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=false) 931 @Description(shortDefinition="Practitioner or organization", formalDefinition="Member of the team who provided the product or service." ) 932 protected Reference provider; 933 934 /** 935 * The party who is billing and/or responsible for the claimed products or services. 936 */ 937 @Child(name = "responsible", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 938 @Description(shortDefinition="Indicator of the lead practitioner", formalDefinition="The party who is billing and/or responsible for the claimed products or services." ) 939 protected BooleanType responsible; 940 941 /** 942 * The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. 943 */ 944 @Child(name = "role", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 945 @Description(shortDefinition="Function within the team", formalDefinition="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." ) 946 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-careteamrole") 947 protected CodeableConcept role; 948 949 /** 950 * The specialization of the practitioner or provider which is applicable for this service. 951 */ 952 @Child(name = "specialty", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 953 @Description(shortDefinition="Practitioner or provider specialization", formalDefinition="The specialization of the practitioner or provider which is applicable for this service." ) 954 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provider-qualification") 955 protected CodeableConcept specialty; 956 957 private static final long serialVersionUID = 1238813503L; 958 959 /** 960 * Constructor 961 */ 962 public CareTeamComponent() { 963 super(); 964 } 965 966 /** 967 * Constructor 968 */ 969 public CareTeamComponent(int sequence, Reference provider) { 970 super(); 971 this.setSequence(sequence); 972 this.setProvider(provider); 973 } 974 975 /** 976 * @return {@link #sequence} (A number to uniquely identify care team entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 977 */ 978 public PositiveIntType getSequenceElement() { 979 if (this.sequence == null) 980 if (Configuration.errorOnAutoCreate()) 981 throw new Error("Attempt to auto-create CareTeamComponent.sequence"); 982 else if (Configuration.doAutoCreate()) 983 this.sequence = new PositiveIntType(); // bb 984 return this.sequence; 985 } 986 987 public boolean hasSequenceElement() { 988 return this.sequence != null && !this.sequence.isEmpty(); 989 } 990 991 public boolean hasSequence() { 992 return this.sequence != null && !this.sequence.isEmpty(); 993 } 994 995 /** 996 * @param value {@link #sequence} (A number to uniquely identify care team entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 997 */ 998 public CareTeamComponent setSequenceElement(PositiveIntType value) { 999 this.sequence = value; 1000 return this; 1001 } 1002 1003 /** 1004 * @return A number to uniquely identify care team entries. 1005 */ 1006 public int getSequence() { 1007 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 1008 } 1009 1010 /** 1011 * @param value A number to uniquely identify care team entries. 1012 */ 1013 public CareTeamComponent setSequence(int value) { 1014 if (this.sequence == null) 1015 this.sequence = new PositiveIntType(); 1016 this.sequence.setValue(value); 1017 return this; 1018 } 1019 1020 /** 1021 * @return {@link #provider} (Member of the team who provided the product or service.) 1022 */ 1023 public Reference getProvider() { 1024 if (this.provider == null) 1025 if (Configuration.errorOnAutoCreate()) 1026 throw new Error("Attempt to auto-create CareTeamComponent.provider"); 1027 else if (Configuration.doAutoCreate()) 1028 this.provider = new Reference(); // cc 1029 return this.provider; 1030 } 1031 1032 public boolean hasProvider() { 1033 return this.provider != null && !this.provider.isEmpty(); 1034 } 1035 1036 /** 1037 * @param value {@link #provider} (Member of the team who provided the product or service.) 1038 */ 1039 public CareTeamComponent setProvider(Reference value) { 1040 this.provider = value; 1041 return this; 1042 } 1043 1044 /** 1045 * @return {@link #responsible} (The party who is billing and/or responsible for the claimed products or services.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value 1046 */ 1047 public BooleanType getResponsibleElement() { 1048 if (this.responsible == null) 1049 if (Configuration.errorOnAutoCreate()) 1050 throw new Error("Attempt to auto-create CareTeamComponent.responsible"); 1051 else if (Configuration.doAutoCreate()) 1052 this.responsible = new BooleanType(); // bb 1053 return this.responsible; 1054 } 1055 1056 public boolean hasResponsibleElement() { 1057 return this.responsible != null && !this.responsible.isEmpty(); 1058 } 1059 1060 public boolean hasResponsible() { 1061 return this.responsible != null && !this.responsible.isEmpty(); 1062 } 1063 1064 /** 1065 * @param value {@link #responsible} (The party who is billing and/or responsible for the claimed products or services.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value 1066 */ 1067 public CareTeamComponent setResponsibleElement(BooleanType value) { 1068 this.responsible = value; 1069 return this; 1070 } 1071 1072 /** 1073 * @return The party who is billing and/or responsible for the claimed products or services. 1074 */ 1075 public boolean getResponsible() { 1076 return this.responsible == null || this.responsible.isEmpty() ? false : this.responsible.getValue(); 1077 } 1078 1079 /** 1080 * @param value The party who is billing and/or responsible for the claimed products or services. 1081 */ 1082 public CareTeamComponent setResponsible(boolean value) { 1083 if (this.responsible == null) 1084 this.responsible = new BooleanType(); 1085 this.responsible.setValue(value); 1086 return this; 1087 } 1088 1089 /** 1090 * @return {@link #role} (The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.) 1091 */ 1092 public CodeableConcept getRole() { 1093 if (this.role == null) 1094 if (Configuration.errorOnAutoCreate()) 1095 throw new Error("Attempt to auto-create CareTeamComponent.role"); 1096 else if (Configuration.doAutoCreate()) 1097 this.role = new CodeableConcept(); // cc 1098 return this.role; 1099 } 1100 1101 public boolean hasRole() { 1102 return this.role != null && !this.role.isEmpty(); 1103 } 1104 1105 /** 1106 * @param value {@link #role} (The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.) 1107 */ 1108 public CareTeamComponent setRole(CodeableConcept value) { 1109 this.role = value; 1110 return this; 1111 } 1112 1113 /** 1114 * @return {@link #specialty} (The specialization of the practitioner or provider which is applicable for this service.) 1115 */ 1116 public CodeableConcept getSpecialty() { 1117 if (this.specialty == null) 1118 if (Configuration.errorOnAutoCreate()) 1119 throw new Error("Attempt to auto-create CareTeamComponent.specialty"); 1120 else if (Configuration.doAutoCreate()) 1121 this.specialty = new CodeableConcept(); // cc 1122 return this.specialty; 1123 } 1124 1125 public boolean hasSpecialty() { 1126 return this.specialty != null && !this.specialty.isEmpty(); 1127 } 1128 1129 /** 1130 * @param value {@link #specialty} (The specialization of the practitioner or provider which is applicable for this service.) 1131 */ 1132 public CareTeamComponent setSpecialty(CodeableConcept value) { 1133 this.specialty = value; 1134 return this; 1135 } 1136 1137 protected void listChildren(List<Property> children) { 1138 super.listChildren(children); 1139 children.add(new Property("sequence", "positiveInt", "A number to uniquely identify care team entries.", 0, 1, sequence)); 1140 children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "Member of the team who provided the product or service.", 0, 1, provider)); 1141 children.add(new Property("responsible", "boolean", "The party who is billing and/or responsible for the claimed products or services.", 0, 1, responsible)); 1142 children.add(new Property("role", "CodeableConcept", "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", 0, 1, role)); 1143 children.add(new Property("specialty", "CodeableConcept", "The specialization of the practitioner or provider which is applicable for this service.", 0, 1, specialty)); 1144 } 1145 1146 @Override 1147 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1148 switch (_hash) { 1149 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify care team entries.", 0, 1, sequence); 1150 case -987494927: /*provider*/ return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "Member of the team who provided the product or service.", 0, 1, provider); 1151 case 1847674614: /*responsible*/ return new Property("responsible", "boolean", "The party who is billing and/or responsible for the claimed products or services.", 0, 1, responsible); 1152 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", 0, 1, role); 1153 case -1694759682: /*specialty*/ return new Property("specialty", "CodeableConcept", "The specialization of the practitioner or provider which is applicable for this service.", 0, 1, specialty); 1154 default: return super.getNamedProperty(_hash, _name, _checkValid); 1155 } 1156 1157 } 1158 1159 @Override 1160 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1161 switch (hash) { 1162 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 1163 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference 1164 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // BooleanType 1165 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 1166 case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : new Base[] {this.specialty}; // CodeableConcept 1167 default: return super.getProperty(hash, name, checkValid); 1168 } 1169 1170 } 1171 1172 @Override 1173 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1174 switch (hash) { 1175 case 1349547969: // sequence 1176 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1177 return value; 1178 case -987494927: // provider 1179 this.provider = TypeConvertor.castToReference(value); // Reference 1180 return value; 1181 case 1847674614: // responsible 1182 this.responsible = TypeConvertor.castToBoolean(value); // BooleanType 1183 return value; 1184 case 3506294: // role 1185 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1186 return value; 1187 case -1694759682: // specialty 1188 this.specialty = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1189 return value; 1190 default: return super.setProperty(hash, name, value); 1191 } 1192 1193 } 1194 1195 @Override 1196 public Base setProperty(String name, Base value) throws FHIRException { 1197 if (name.equals("sequence")) { 1198 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1199 } else if (name.equals("provider")) { 1200 this.provider = TypeConvertor.castToReference(value); // Reference 1201 } else if (name.equals("responsible")) { 1202 this.responsible = TypeConvertor.castToBoolean(value); // BooleanType 1203 } else if (name.equals("role")) { 1204 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1205 } else if (name.equals("specialty")) { 1206 this.specialty = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1207 } else 1208 return super.setProperty(name, value); 1209 return value; 1210 } 1211 1212 @Override 1213 public void removeChild(String name, Base value) throws FHIRException { 1214 if (name.equals("sequence")) { 1215 this.sequence = null; 1216 } else if (name.equals("provider")) { 1217 this.provider = null; 1218 } else if (name.equals("responsible")) { 1219 this.responsible = null; 1220 } else if (name.equals("role")) { 1221 this.role = null; 1222 } else if (name.equals("specialty")) { 1223 this.specialty = null; 1224 } else 1225 super.removeChild(name, value); 1226 1227 } 1228 1229 @Override 1230 public Base makeProperty(int hash, String name) throws FHIRException { 1231 switch (hash) { 1232 case 1349547969: return getSequenceElement(); 1233 case -987494927: return getProvider(); 1234 case 1847674614: return getResponsibleElement(); 1235 case 3506294: return getRole(); 1236 case -1694759682: return getSpecialty(); 1237 default: return super.makeProperty(hash, name); 1238 } 1239 1240 } 1241 1242 @Override 1243 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1244 switch (hash) { 1245 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 1246 case -987494927: /*provider*/ return new String[] {"Reference"}; 1247 case 1847674614: /*responsible*/ return new String[] {"boolean"}; 1248 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 1249 case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"}; 1250 default: return super.getTypesForProperty(hash, name); 1251 } 1252 1253 } 1254 1255 @Override 1256 public Base addChild(String name) throws FHIRException { 1257 if (name.equals("sequence")) { 1258 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.careTeam.sequence"); 1259 } 1260 else if (name.equals("provider")) { 1261 this.provider = new Reference(); 1262 return this.provider; 1263 } 1264 else if (name.equals("responsible")) { 1265 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.careTeam.responsible"); 1266 } 1267 else if (name.equals("role")) { 1268 this.role = new CodeableConcept(); 1269 return this.role; 1270 } 1271 else if (name.equals("specialty")) { 1272 this.specialty = new CodeableConcept(); 1273 return this.specialty; 1274 } 1275 else 1276 return super.addChild(name); 1277 } 1278 1279 public CareTeamComponent copy() { 1280 CareTeamComponent dst = new CareTeamComponent(); 1281 copyValues(dst); 1282 return dst; 1283 } 1284 1285 public void copyValues(CareTeamComponent dst) { 1286 super.copyValues(dst); 1287 dst.sequence = sequence == null ? null : sequence.copy(); 1288 dst.provider = provider == null ? null : provider.copy(); 1289 dst.responsible = responsible == null ? null : responsible.copy(); 1290 dst.role = role == null ? null : role.copy(); 1291 dst.specialty = specialty == null ? null : specialty.copy(); 1292 } 1293 1294 @Override 1295 public boolean equalsDeep(Base other_) { 1296 if (!super.equalsDeep(other_)) 1297 return false; 1298 if (!(other_ instanceof CareTeamComponent)) 1299 return false; 1300 CareTeamComponent o = (CareTeamComponent) other_; 1301 return compareDeep(sequence, o.sequence, true) && compareDeep(provider, o.provider, true) && compareDeep(responsible, o.responsible, true) 1302 && compareDeep(role, o.role, true) && compareDeep(specialty, o.specialty, true); 1303 } 1304 1305 @Override 1306 public boolean equalsShallow(Base other_) { 1307 if (!super.equalsShallow(other_)) 1308 return false; 1309 if (!(other_ instanceof CareTeamComponent)) 1310 return false; 1311 CareTeamComponent o = (CareTeamComponent) other_; 1312 return compareValues(sequence, o.sequence, true) && compareValues(responsible, o.responsible, true) 1313 ; 1314 } 1315 1316 public boolean isEmpty() { 1317 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, provider, responsible 1318 , role, specialty); 1319 } 1320 1321 public String fhirType() { 1322 return "ExplanationOfBenefit.careTeam"; 1323 1324 } 1325 1326 } 1327 1328 @Block() 1329 public static class SupportingInformationComponent extends BackboneElement implements IBaseBackboneElement { 1330 /** 1331 * A number to uniquely identify supporting information entries. 1332 */ 1333 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1334 @Description(shortDefinition="Information instance identifier", formalDefinition="A number to uniquely identify supporting information entries." ) 1335 protected PositiveIntType sequence; 1336 1337 /** 1338 * The general class of the information supplied: information; exception; accident, employment; onset, etc. 1339 */ 1340 @Child(name = "category", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 1341 @Description(shortDefinition="Classification of the supplied information", formalDefinition="The general class of the information supplied: information; exception; accident, employment; onset, etc." ) 1342 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-informationcategory") 1343 protected CodeableConcept category; 1344 1345 /** 1346 * System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. 1347 */ 1348 @Child(name = "code", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1349 @Description(shortDefinition="Type of information", formalDefinition="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought." ) 1350 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-exception") 1351 protected CodeableConcept code; 1352 1353 /** 1354 * The date when or period to which this information refers. 1355 */ 1356 @Child(name = "timing", type = {DateType.class, Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 1357 @Description(shortDefinition="When it occurred", formalDefinition="The date when or period to which this information refers." ) 1358 protected DataType timing; 1359 1360 /** 1361 * Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. 1362 */ 1363 @Child(name = "value", type = {BooleanType.class, StringType.class, Quantity.class, Attachment.class, Reference.class, Identifier.class}, order=5, min=0, max=1, modifier=false, summary=false) 1364 @Description(shortDefinition="Data to be provided", formalDefinition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." ) 1365 protected DataType value; 1366 1367 /** 1368 * Provides the reason in the situation where a reason code is required in addition to the content. 1369 */ 1370 @Child(name = "reason", type = {Coding.class}, order=6, min=0, max=1, modifier=false, summary=false) 1371 @Description(shortDefinition="Explanation for the information", formalDefinition="Provides the reason in the situation where a reason code is required in addition to the content." ) 1372 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/missing-tooth-reason") 1373 protected Coding reason; 1374 1375 private static final long serialVersionUID = 1577205655L; 1376 1377 /** 1378 * Constructor 1379 */ 1380 public SupportingInformationComponent() { 1381 super(); 1382 } 1383 1384 /** 1385 * Constructor 1386 */ 1387 public SupportingInformationComponent(int sequence, CodeableConcept category) { 1388 super(); 1389 this.setSequence(sequence); 1390 this.setCategory(category); 1391 } 1392 1393 /** 1394 * @return {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1395 */ 1396 public PositiveIntType getSequenceElement() { 1397 if (this.sequence == null) 1398 if (Configuration.errorOnAutoCreate()) 1399 throw new Error("Attempt to auto-create SupportingInformationComponent.sequence"); 1400 else if (Configuration.doAutoCreate()) 1401 this.sequence = new PositiveIntType(); // bb 1402 return this.sequence; 1403 } 1404 1405 public boolean hasSequenceElement() { 1406 return this.sequence != null && !this.sequence.isEmpty(); 1407 } 1408 1409 public boolean hasSequence() { 1410 return this.sequence != null && !this.sequence.isEmpty(); 1411 } 1412 1413 /** 1414 * @param value {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1415 */ 1416 public SupportingInformationComponent setSequenceElement(PositiveIntType value) { 1417 this.sequence = value; 1418 return this; 1419 } 1420 1421 /** 1422 * @return A number to uniquely identify supporting information entries. 1423 */ 1424 public int getSequence() { 1425 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 1426 } 1427 1428 /** 1429 * @param value A number to uniquely identify supporting information entries. 1430 */ 1431 public SupportingInformationComponent setSequence(int value) { 1432 if (this.sequence == null) 1433 this.sequence = new PositiveIntType(); 1434 this.sequence.setValue(value); 1435 return this; 1436 } 1437 1438 /** 1439 * @return {@link #category} (The general class of the information supplied: information; exception; accident, employment; onset, etc.) 1440 */ 1441 public CodeableConcept getCategory() { 1442 if (this.category == null) 1443 if (Configuration.errorOnAutoCreate()) 1444 throw new Error("Attempt to auto-create SupportingInformationComponent.category"); 1445 else if (Configuration.doAutoCreate()) 1446 this.category = new CodeableConcept(); // cc 1447 return this.category; 1448 } 1449 1450 public boolean hasCategory() { 1451 return this.category != null && !this.category.isEmpty(); 1452 } 1453 1454 /** 1455 * @param value {@link #category} (The general class of the information supplied: information; exception; accident, employment; onset, etc.) 1456 */ 1457 public SupportingInformationComponent setCategory(CodeableConcept value) { 1458 this.category = value; 1459 return this; 1460 } 1461 1462 /** 1463 * @return {@link #code} (System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.) 1464 */ 1465 public CodeableConcept getCode() { 1466 if (this.code == null) 1467 if (Configuration.errorOnAutoCreate()) 1468 throw new Error("Attempt to auto-create SupportingInformationComponent.code"); 1469 else if (Configuration.doAutoCreate()) 1470 this.code = new CodeableConcept(); // cc 1471 return this.code; 1472 } 1473 1474 public boolean hasCode() { 1475 return this.code != null && !this.code.isEmpty(); 1476 } 1477 1478 /** 1479 * @param value {@link #code} (System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.) 1480 */ 1481 public SupportingInformationComponent setCode(CodeableConcept value) { 1482 this.code = value; 1483 return this; 1484 } 1485 1486 /** 1487 * @return {@link #timing} (The date when or period to which this information refers.) 1488 */ 1489 public DataType getTiming() { 1490 return this.timing; 1491 } 1492 1493 /** 1494 * @return {@link #timing} (The date when or period to which this information refers.) 1495 */ 1496 public DateType getTimingDateType() throws FHIRException { 1497 if (this.timing == null) 1498 this.timing = new DateType(); 1499 if (!(this.timing instanceof DateType)) 1500 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.timing.getClass().getName()+" was encountered"); 1501 return (DateType) this.timing; 1502 } 1503 1504 public boolean hasTimingDateType() { 1505 return this != null && this.timing instanceof DateType; 1506 } 1507 1508 /** 1509 * @return {@link #timing} (The date when or period to which this information refers.) 1510 */ 1511 public Period getTimingPeriod() throws FHIRException { 1512 if (this.timing == null) 1513 this.timing = new Period(); 1514 if (!(this.timing instanceof Period)) 1515 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered"); 1516 return (Period) this.timing; 1517 } 1518 1519 public boolean hasTimingPeriod() { 1520 return this != null && this.timing instanceof Period; 1521 } 1522 1523 public boolean hasTiming() { 1524 return this.timing != null && !this.timing.isEmpty(); 1525 } 1526 1527 /** 1528 * @param value {@link #timing} (The date when or period to which this information refers.) 1529 */ 1530 public SupportingInformationComponent setTiming(DataType value) { 1531 if (value != null && !(value instanceof DateType || value instanceof Period)) 1532 throw new FHIRException("Not the right type for ExplanationOfBenefit.supportingInfo.timing[x]: "+value.fhirType()); 1533 this.timing = value; 1534 return this; 1535 } 1536 1537 /** 1538 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1539 */ 1540 public DataType getValue() { 1541 return this.value; 1542 } 1543 1544 /** 1545 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1546 */ 1547 public BooleanType getValueBooleanType() throws FHIRException { 1548 if (this.value == null) 1549 this.value = new BooleanType(); 1550 if (!(this.value instanceof BooleanType)) 1551 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 1552 return (BooleanType) this.value; 1553 } 1554 1555 public boolean hasValueBooleanType() { 1556 return this != null && this.value instanceof BooleanType; 1557 } 1558 1559 /** 1560 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1561 */ 1562 public StringType getValueStringType() throws FHIRException { 1563 if (this.value == null) 1564 this.value = new StringType(); 1565 if (!(this.value instanceof StringType)) 1566 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 1567 return (StringType) this.value; 1568 } 1569 1570 public boolean hasValueStringType() { 1571 return this != null && this.value instanceof StringType; 1572 } 1573 1574 /** 1575 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1576 */ 1577 public Quantity getValueQuantity() throws FHIRException { 1578 if (this.value == null) 1579 this.value = new Quantity(); 1580 if (!(this.value instanceof Quantity)) 1581 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 1582 return (Quantity) this.value; 1583 } 1584 1585 public boolean hasValueQuantity() { 1586 return this != null && this.value instanceof Quantity; 1587 } 1588 1589 /** 1590 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1591 */ 1592 public Attachment getValueAttachment() throws FHIRException { 1593 if (this.value == null) 1594 this.value = new Attachment(); 1595 if (!(this.value instanceof Attachment)) 1596 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 1597 return (Attachment) this.value; 1598 } 1599 1600 public boolean hasValueAttachment() { 1601 return this != null && this.value instanceof Attachment; 1602 } 1603 1604 /** 1605 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1606 */ 1607 public Reference getValueReference() throws FHIRException { 1608 if (this.value == null) 1609 this.value = new Reference(); 1610 if (!(this.value instanceof Reference)) 1611 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 1612 return (Reference) this.value; 1613 } 1614 1615 public boolean hasValueReference() { 1616 return this != null && this.value instanceof Reference; 1617 } 1618 1619 /** 1620 * @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1621 */ 1622 public Identifier getValueIdentifier() throws FHIRException { 1623 if (this.value == null) 1624 this.value = new Identifier(); 1625 if (!(this.value instanceof Identifier)) 1626 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered"); 1627 return (Identifier) this.value; 1628 } 1629 1630 public boolean hasValueIdentifier() { 1631 return this != null && this.value instanceof Identifier; 1632 } 1633 1634 public boolean hasValue() { 1635 return this.value != null && !this.value.isEmpty(); 1636 } 1637 1638 /** 1639 * @param value {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.) 1640 */ 1641 public SupportingInformationComponent setValue(DataType value) { 1642 if (value != null && !(value instanceof BooleanType || value instanceof StringType || value instanceof Quantity || value instanceof Attachment || value instanceof Reference || value instanceof Identifier)) 1643 throw new FHIRException("Not the right type for ExplanationOfBenefit.supportingInfo.value[x]: "+value.fhirType()); 1644 this.value = value; 1645 return this; 1646 } 1647 1648 /** 1649 * @return {@link #reason} (Provides the reason in the situation where a reason code is required in addition to the content.) 1650 */ 1651 public Coding getReason() { 1652 if (this.reason == null) 1653 if (Configuration.errorOnAutoCreate()) 1654 throw new Error("Attempt to auto-create SupportingInformationComponent.reason"); 1655 else if (Configuration.doAutoCreate()) 1656 this.reason = new Coding(); // cc 1657 return this.reason; 1658 } 1659 1660 public boolean hasReason() { 1661 return this.reason != null && !this.reason.isEmpty(); 1662 } 1663 1664 /** 1665 * @param value {@link #reason} (Provides the reason in the situation where a reason code is required in addition to the content.) 1666 */ 1667 public SupportingInformationComponent setReason(Coding value) { 1668 this.reason = value; 1669 return this; 1670 } 1671 1672 protected void listChildren(List<Property> children) { 1673 super.listChildren(children); 1674 children.add(new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence)); 1675 children.add(new Property("category", "CodeableConcept", "The general class of the information supplied: information; exception; accident, employment; onset, etc.", 0, 1, category)); 1676 children.add(new Property("code", "CodeableConcept", "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", 0, 1, code)); 1677 children.add(new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing)); 1678 children.add(new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value)); 1679 children.add(new Property("reason", "Coding", "Provides the reason in the situation where a reason code is required in addition to the content.", 0, 1, reason)); 1680 } 1681 1682 @Override 1683 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1684 switch (_hash) { 1685 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence); 1686 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "The general class of the information supplied: information; exception; accident, employment; onset, etc.", 0, 1, category); 1687 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", 0, 1, code); 1688 case 164632566: /*timing[x]*/ return new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing); 1689 case -873664438: /*timing*/ return new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing); 1690 case 807935768: /*timingDate*/ return new Property("timing[x]", "date", "The date when or period to which this information refers.", 0, 1, timing); 1691 case -615615829: /*timingPeriod*/ return new Property("timing[x]", "Period", "The date when or period to which this information refers.", 0, 1, timing); 1692 case -1410166417: /*value[x]*/ return new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1693 case 111972721: /*value*/ return new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1694 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1695 case -1424603934: /*valueString*/ return new Property("value[x]", "string", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1696 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1697 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1698 case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference(Any)", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1699 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value); 1700 case -934964668: /*reason*/ return new Property("reason", "Coding", "Provides the reason in the situation where a reason code is required in addition to the content.", 0, 1, reason); 1701 default: return super.getNamedProperty(_hash, _name, _checkValid); 1702 } 1703 1704 } 1705 1706 @Override 1707 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1708 switch (hash) { 1709 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 1710 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1711 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1712 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // DataType 1713 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 1714 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // Coding 1715 default: return super.getProperty(hash, name, checkValid); 1716 } 1717 1718 } 1719 1720 @Override 1721 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1722 switch (hash) { 1723 case 1349547969: // sequence 1724 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1725 return value; 1726 case 50511102: // category 1727 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1728 return value; 1729 case 3059181: // code 1730 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1731 return value; 1732 case -873664438: // timing 1733 this.timing = TypeConvertor.castToType(value); // DataType 1734 return value; 1735 case 111972721: // value 1736 this.value = TypeConvertor.castToType(value); // DataType 1737 return value; 1738 case -934964668: // reason 1739 this.reason = TypeConvertor.castToCoding(value); // Coding 1740 return value; 1741 default: return super.setProperty(hash, name, value); 1742 } 1743 1744 } 1745 1746 @Override 1747 public Base setProperty(String name, Base value) throws FHIRException { 1748 if (name.equals("sequence")) { 1749 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1750 } else if (name.equals("category")) { 1751 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1752 } else if (name.equals("code")) { 1753 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1754 } else if (name.equals("timing[x]")) { 1755 this.timing = TypeConvertor.castToType(value); // DataType 1756 } else if (name.equals("value[x]")) { 1757 this.value = TypeConvertor.castToType(value); // DataType 1758 } else if (name.equals("reason")) { 1759 this.reason = TypeConvertor.castToCoding(value); // Coding 1760 } else 1761 return super.setProperty(name, value); 1762 return value; 1763 } 1764 1765 @Override 1766 public void removeChild(String name, Base value) throws FHIRException { 1767 if (name.equals("sequence")) { 1768 this.sequence = null; 1769 } else if (name.equals("category")) { 1770 this.category = null; 1771 } else if (name.equals("code")) { 1772 this.code = null; 1773 } else if (name.equals("timing[x]")) { 1774 this.timing = null; 1775 } else if (name.equals("value[x]")) { 1776 this.value = null; 1777 } else if (name.equals("reason")) { 1778 this.reason = null; 1779 } else 1780 super.removeChild(name, value); 1781 1782 } 1783 1784 @Override 1785 public Base makeProperty(int hash, String name) throws FHIRException { 1786 switch (hash) { 1787 case 1349547969: return getSequenceElement(); 1788 case 50511102: return getCategory(); 1789 case 3059181: return getCode(); 1790 case 164632566: return getTiming(); 1791 case -873664438: return getTiming(); 1792 case -1410166417: return getValue(); 1793 case 111972721: return getValue(); 1794 case -934964668: return getReason(); 1795 default: return super.makeProperty(hash, name); 1796 } 1797 1798 } 1799 1800 @Override 1801 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1802 switch (hash) { 1803 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 1804 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1805 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1806 case -873664438: /*timing*/ return new String[] {"date", "Period"}; 1807 case 111972721: /*value*/ return new String[] {"boolean", "string", "Quantity", "Attachment", "Reference", "Identifier"}; 1808 case -934964668: /*reason*/ return new String[] {"Coding"}; 1809 default: return super.getTypesForProperty(hash, name); 1810 } 1811 1812 } 1813 1814 @Override 1815 public Base addChild(String name) throws FHIRException { 1816 if (name.equals("sequence")) { 1817 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.supportingInfo.sequence"); 1818 } 1819 else if (name.equals("category")) { 1820 this.category = new CodeableConcept(); 1821 return this.category; 1822 } 1823 else if (name.equals("code")) { 1824 this.code = new CodeableConcept(); 1825 return this.code; 1826 } 1827 else if (name.equals("timingDate")) { 1828 this.timing = new DateType(); 1829 return this.timing; 1830 } 1831 else if (name.equals("timingPeriod")) { 1832 this.timing = new Period(); 1833 return this.timing; 1834 } 1835 else if (name.equals("valueBoolean")) { 1836 this.value = new BooleanType(); 1837 return this.value; 1838 } 1839 else if (name.equals("valueString")) { 1840 this.value = new StringType(); 1841 return this.value; 1842 } 1843 else if (name.equals("valueQuantity")) { 1844 this.value = new Quantity(); 1845 return this.value; 1846 } 1847 else if (name.equals("valueAttachment")) { 1848 this.value = new Attachment(); 1849 return this.value; 1850 } 1851 else if (name.equals("valueReference")) { 1852 this.value = new Reference(); 1853 return this.value; 1854 } 1855 else if (name.equals("valueIdentifier")) { 1856 this.value = new Identifier(); 1857 return this.value; 1858 } 1859 else if (name.equals("reason")) { 1860 this.reason = new Coding(); 1861 return this.reason; 1862 } 1863 else 1864 return super.addChild(name); 1865 } 1866 1867 public SupportingInformationComponent copy() { 1868 SupportingInformationComponent dst = new SupportingInformationComponent(); 1869 copyValues(dst); 1870 return dst; 1871 } 1872 1873 public void copyValues(SupportingInformationComponent dst) { 1874 super.copyValues(dst); 1875 dst.sequence = sequence == null ? null : sequence.copy(); 1876 dst.category = category == null ? null : category.copy(); 1877 dst.code = code == null ? null : code.copy(); 1878 dst.timing = timing == null ? null : timing.copy(); 1879 dst.value = value == null ? null : value.copy(); 1880 dst.reason = reason == null ? null : reason.copy(); 1881 } 1882 1883 @Override 1884 public boolean equalsDeep(Base other_) { 1885 if (!super.equalsDeep(other_)) 1886 return false; 1887 if (!(other_ instanceof SupportingInformationComponent)) 1888 return false; 1889 SupportingInformationComponent o = (SupportingInformationComponent) other_; 1890 return compareDeep(sequence, o.sequence, true) && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) 1891 && compareDeep(timing, o.timing, true) && compareDeep(value, o.value, true) && compareDeep(reason, o.reason, true) 1892 ; 1893 } 1894 1895 @Override 1896 public boolean equalsShallow(Base other_) { 1897 if (!super.equalsShallow(other_)) 1898 return false; 1899 if (!(other_ instanceof SupportingInformationComponent)) 1900 return false; 1901 SupportingInformationComponent o = (SupportingInformationComponent) other_; 1902 return compareValues(sequence, o.sequence, true); 1903 } 1904 1905 public boolean isEmpty() { 1906 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, category, code 1907 , timing, value, reason); 1908 } 1909 1910 public String fhirType() { 1911 return "ExplanationOfBenefit.supportingInfo"; 1912 1913 } 1914 1915 } 1916 1917 @Block() 1918 public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement { 1919 /** 1920 * A number to uniquely identify diagnosis entries. 1921 */ 1922 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1923 @Description(shortDefinition="Diagnosis instance identifier", formalDefinition="A number to uniquely identify diagnosis entries." ) 1924 protected PositiveIntType sequence; 1925 1926 /** 1927 * The nature of illness or problem in a coded form or as a reference to an external defined Condition. 1928 */ 1929 @Child(name = "diagnosis", type = {CodeableConcept.class, Condition.class}, order=2, min=1, max=1, modifier=false, summary=false) 1930 @Description(shortDefinition="Nature of illness or problem", formalDefinition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." ) 1931 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10") 1932 protected DataType diagnosis; 1933 1934 /** 1935 * When the condition was observed or the relative ranking. 1936 */ 1937 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1938 @Description(shortDefinition="Timing or nature of the diagnosis", formalDefinition="When the condition was observed or the relative ranking." ) 1939 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-diagnosistype") 1940 protected List<CodeableConcept> type; 1941 1942 /** 1943 * Indication of whether the diagnosis was present on admission to a facility. 1944 */ 1945 @Child(name = "onAdmission", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 1946 @Description(shortDefinition="Present on admission", formalDefinition="Indication of whether the diagnosis was present on admission to a facility." ) 1947 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission") 1948 protected CodeableConcept onAdmission; 1949 1950 private static final long serialVersionUID = -320261526L; 1951 1952 /** 1953 * Constructor 1954 */ 1955 public DiagnosisComponent() { 1956 super(); 1957 } 1958 1959 /** 1960 * Constructor 1961 */ 1962 public DiagnosisComponent(int sequence, DataType diagnosis) { 1963 super(); 1964 this.setSequence(sequence); 1965 this.setDiagnosis(diagnosis); 1966 } 1967 1968 /** 1969 * @return {@link #sequence} (A number to uniquely identify diagnosis entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1970 */ 1971 public PositiveIntType getSequenceElement() { 1972 if (this.sequence == null) 1973 if (Configuration.errorOnAutoCreate()) 1974 throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); 1975 else if (Configuration.doAutoCreate()) 1976 this.sequence = new PositiveIntType(); // bb 1977 return this.sequence; 1978 } 1979 1980 public boolean hasSequenceElement() { 1981 return this.sequence != null && !this.sequence.isEmpty(); 1982 } 1983 1984 public boolean hasSequence() { 1985 return this.sequence != null && !this.sequence.isEmpty(); 1986 } 1987 1988 /** 1989 * @param value {@link #sequence} (A number to uniquely identify diagnosis entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1990 */ 1991 public DiagnosisComponent setSequenceElement(PositiveIntType value) { 1992 this.sequence = value; 1993 return this; 1994 } 1995 1996 /** 1997 * @return A number to uniquely identify diagnosis entries. 1998 */ 1999 public int getSequence() { 2000 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 2001 } 2002 2003 /** 2004 * @param value A number to uniquely identify diagnosis entries. 2005 */ 2006 public DiagnosisComponent setSequence(int value) { 2007 if (this.sequence == null) 2008 this.sequence = new PositiveIntType(); 2009 this.sequence.setValue(value); 2010 return this; 2011 } 2012 2013 /** 2014 * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.) 2015 */ 2016 public DataType getDiagnosis() { 2017 return this.diagnosis; 2018 } 2019 2020 /** 2021 * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.) 2022 */ 2023 public CodeableConcept getDiagnosisCodeableConcept() throws FHIRException { 2024 if (this.diagnosis == null) 2025 this.diagnosis = new CodeableConcept(); 2026 if (!(this.diagnosis instanceof CodeableConcept)) 2027 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.diagnosis.getClass().getName()+" was encountered"); 2028 return (CodeableConcept) this.diagnosis; 2029 } 2030 2031 public boolean hasDiagnosisCodeableConcept() { 2032 return this != null && this.diagnosis instanceof CodeableConcept; 2033 } 2034 2035 /** 2036 * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.) 2037 */ 2038 public Reference getDiagnosisReference() throws FHIRException { 2039 if (this.diagnosis == null) 2040 this.diagnosis = new Reference(); 2041 if (!(this.diagnosis instanceof Reference)) 2042 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.diagnosis.getClass().getName()+" was encountered"); 2043 return (Reference) this.diagnosis; 2044 } 2045 2046 public boolean hasDiagnosisReference() { 2047 return this != null && this.diagnosis instanceof Reference; 2048 } 2049 2050 public boolean hasDiagnosis() { 2051 return this.diagnosis != null && !this.diagnosis.isEmpty(); 2052 } 2053 2054 /** 2055 * @param value {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.) 2056 */ 2057 public DiagnosisComponent setDiagnosis(DataType value) { 2058 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 2059 throw new FHIRException("Not the right type for ExplanationOfBenefit.diagnosis.diagnosis[x]: "+value.fhirType()); 2060 this.diagnosis = value; 2061 return this; 2062 } 2063 2064 /** 2065 * @return {@link #type} (When the condition was observed or the relative ranking.) 2066 */ 2067 public List<CodeableConcept> getType() { 2068 if (this.type == null) 2069 this.type = new ArrayList<CodeableConcept>(); 2070 return this.type; 2071 } 2072 2073 /** 2074 * @return Returns a reference to <code>this</code> for easy method chaining 2075 */ 2076 public DiagnosisComponent setType(List<CodeableConcept> theType) { 2077 this.type = theType; 2078 return this; 2079 } 2080 2081 public boolean hasType() { 2082 if (this.type == null) 2083 return false; 2084 for (CodeableConcept item : this.type) 2085 if (!item.isEmpty()) 2086 return true; 2087 return false; 2088 } 2089 2090 public CodeableConcept addType() { //3 2091 CodeableConcept t = new CodeableConcept(); 2092 if (this.type == null) 2093 this.type = new ArrayList<CodeableConcept>(); 2094 this.type.add(t); 2095 return t; 2096 } 2097 2098 public DiagnosisComponent addType(CodeableConcept t) { //3 2099 if (t == null) 2100 return this; 2101 if (this.type == null) 2102 this.type = new ArrayList<CodeableConcept>(); 2103 this.type.add(t); 2104 return this; 2105 } 2106 2107 /** 2108 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 2109 */ 2110 public CodeableConcept getTypeFirstRep() { 2111 if (getType().isEmpty()) { 2112 addType(); 2113 } 2114 return getType().get(0); 2115 } 2116 2117 /** 2118 * @return {@link #onAdmission} (Indication of whether the diagnosis was present on admission to a facility.) 2119 */ 2120 public CodeableConcept getOnAdmission() { 2121 if (this.onAdmission == null) 2122 if (Configuration.errorOnAutoCreate()) 2123 throw new Error("Attempt to auto-create DiagnosisComponent.onAdmission"); 2124 else if (Configuration.doAutoCreate()) 2125 this.onAdmission = new CodeableConcept(); // cc 2126 return this.onAdmission; 2127 } 2128 2129 public boolean hasOnAdmission() { 2130 return this.onAdmission != null && !this.onAdmission.isEmpty(); 2131 } 2132 2133 /** 2134 * @param value {@link #onAdmission} (Indication of whether the diagnosis was present on admission to a facility.) 2135 */ 2136 public DiagnosisComponent setOnAdmission(CodeableConcept value) { 2137 this.onAdmission = value; 2138 return this; 2139 } 2140 2141 protected void listChildren(List<Property> children) { 2142 super.listChildren(children); 2143 children.add(new Property("sequence", "positiveInt", "A number to uniquely identify diagnosis entries.", 0, 1, sequence)); 2144 children.add(new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis)); 2145 children.add(new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type)); 2146 children.add(new Property("onAdmission", "CodeableConcept", "Indication of whether the diagnosis was present on admission to a facility.", 0, 1, onAdmission)); 2147 } 2148 2149 @Override 2150 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2151 switch (_hash) { 2152 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify diagnosis entries.", 0, 1, sequence); 2153 case -1487009809: /*diagnosis[x]*/ return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis); 2154 case 1196993265: /*diagnosis*/ return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis); 2155 case 277781616: /*diagnosisCodeableConcept*/ return new Property("diagnosis[x]", "CodeableConcept", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis); 2156 case 2050454362: /*diagnosisReference*/ return new Property("diagnosis[x]", "Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis); 2157 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type); 2158 case -3386134: /*onAdmission*/ return new Property("onAdmission", "CodeableConcept", "Indication of whether the diagnosis was present on admission to a facility.", 0, 1, onAdmission); 2159 default: return super.getNamedProperty(_hash, _name, _checkValid); 2160 } 2161 2162 } 2163 2164 @Override 2165 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2166 switch (hash) { 2167 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 2168 case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : new Base[] {this.diagnosis}; // DataType 2169 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 2170 case -3386134: /*onAdmission*/ return this.onAdmission == null ? new Base[0] : new Base[] {this.onAdmission}; // CodeableConcept 2171 default: return super.getProperty(hash, name, checkValid); 2172 } 2173 2174 } 2175 2176 @Override 2177 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2178 switch (hash) { 2179 case 1349547969: // sequence 2180 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2181 return value; 2182 case 1196993265: // diagnosis 2183 this.diagnosis = TypeConvertor.castToType(value); // DataType 2184 return value; 2185 case 3575610: // type 2186 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2187 return value; 2188 case -3386134: // onAdmission 2189 this.onAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2190 return value; 2191 default: return super.setProperty(hash, name, value); 2192 } 2193 2194 } 2195 2196 @Override 2197 public Base setProperty(String name, Base value) throws FHIRException { 2198 if (name.equals("sequence")) { 2199 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2200 } else if (name.equals("diagnosis[x]")) { 2201 this.diagnosis = TypeConvertor.castToType(value); // DataType 2202 } else if (name.equals("type")) { 2203 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 2204 } else if (name.equals("onAdmission")) { 2205 this.onAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2206 } else 2207 return super.setProperty(name, value); 2208 return value; 2209 } 2210 2211 @Override 2212 public void removeChild(String name, Base value) throws FHIRException { 2213 if (name.equals("sequence")) { 2214 this.sequence = null; 2215 } else if (name.equals("diagnosis[x]")) { 2216 this.diagnosis = null; 2217 } else if (name.equals("type")) { 2218 this.getType().remove(value); 2219 } else if (name.equals("onAdmission")) { 2220 this.onAdmission = null; 2221 } else 2222 super.removeChild(name, value); 2223 2224 } 2225 2226 @Override 2227 public Base makeProperty(int hash, String name) throws FHIRException { 2228 switch (hash) { 2229 case 1349547969: return getSequenceElement(); 2230 case -1487009809: return getDiagnosis(); 2231 case 1196993265: return getDiagnosis(); 2232 case 3575610: return addType(); 2233 case -3386134: return getOnAdmission(); 2234 default: return super.makeProperty(hash, name); 2235 } 2236 2237 } 2238 2239 @Override 2240 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2241 switch (hash) { 2242 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 2243 case 1196993265: /*diagnosis*/ return new String[] {"CodeableConcept", "Reference"}; 2244 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2245 case -3386134: /*onAdmission*/ return new String[] {"CodeableConcept"}; 2246 default: return super.getTypesForProperty(hash, name); 2247 } 2248 2249 } 2250 2251 @Override 2252 public Base addChild(String name) throws FHIRException { 2253 if (name.equals("sequence")) { 2254 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.diagnosis.sequence"); 2255 } 2256 else if (name.equals("diagnosisCodeableConcept")) { 2257 this.diagnosis = new CodeableConcept(); 2258 return this.diagnosis; 2259 } 2260 else if (name.equals("diagnosisReference")) { 2261 this.diagnosis = new Reference(); 2262 return this.diagnosis; 2263 } 2264 else if (name.equals("type")) { 2265 return addType(); 2266 } 2267 else if (name.equals("onAdmission")) { 2268 this.onAdmission = new CodeableConcept(); 2269 return this.onAdmission; 2270 } 2271 else 2272 return super.addChild(name); 2273 } 2274 2275 public DiagnosisComponent copy() { 2276 DiagnosisComponent dst = new DiagnosisComponent(); 2277 copyValues(dst); 2278 return dst; 2279 } 2280 2281 public void copyValues(DiagnosisComponent dst) { 2282 super.copyValues(dst); 2283 dst.sequence = sequence == null ? null : sequence.copy(); 2284 dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); 2285 if (type != null) { 2286 dst.type = new ArrayList<CodeableConcept>(); 2287 for (CodeableConcept i : type) 2288 dst.type.add(i.copy()); 2289 }; 2290 dst.onAdmission = onAdmission == null ? null : onAdmission.copy(); 2291 } 2292 2293 @Override 2294 public boolean equalsDeep(Base other_) { 2295 if (!super.equalsDeep(other_)) 2296 return false; 2297 if (!(other_ instanceof DiagnosisComponent)) 2298 return false; 2299 DiagnosisComponent o = (DiagnosisComponent) other_; 2300 return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(type, o.type, true) 2301 && compareDeep(onAdmission, o.onAdmission, true); 2302 } 2303 2304 @Override 2305 public boolean equalsShallow(Base other_) { 2306 if (!super.equalsShallow(other_)) 2307 return false; 2308 if (!(other_ instanceof DiagnosisComponent)) 2309 return false; 2310 DiagnosisComponent o = (DiagnosisComponent) other_; 2311 return compareValues(sequence, o.sequence, true); 2312 } 2313 2314 public boolean isEmpty() { 2315 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, diagnosis, type 2316 , onAdmission); 2317 } 2318 2319 public String fhirType() { 2320 return "ExplanationOfBenefit.diagnosis"; 2321 2322 } 2323 2324 } 2325 2326 @Block() 2327 public static class ProcedureComponent extends BackboneElement implements IBaseBackboneElement { 2328 /** 2329 * A number to uniquely identify procedure entries. 2330 */ 2331 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2332 @Description(shortDefinition="Procedure instance identifier", formalDefinition="A number to uniquely identify procedure entries." ) 2333 protected PositiveIntType sequence; 2334 2335 /** 2336 * When the condition was observed or the relative ranking. 2337 */ 2338 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2339 @Description(shortDefinition="Category of Procedure", formalDefinition="When the condition was observed or the relative ranking." ) 2340 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-procedure-type") 2341 protected List<CodeableConcept> type; 2342 2343 /** 2344 * Date and optionally time the procedure was performed. 2345 */ 2346 @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2347 @Description(shortDefinition="When the procedure was performed", formalDefinition="Date and optionally time the procedure was performed." ) 2348 protected DateTimeType date; 2349 2350 /** 2351 * The code or reference to a Procedure resource which identifies the clinical intervention performed. 2352 */ 2353 @Child(name = "procedure", type = {CodeableConcept.class, Procedure.class}, order=4, min=1, max=1, modifier=false, summary=false) 2354 @Description(shortDefinition="Specific clinical procedure", formalDefinition="The code or reference to a Procedure resource which identifies the clinical intervention performed." ) 2355 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10-procedures") 2356 protected DataType procedure; 2357 2358 /** 2359 * Unique Device Identifiers associated with this line item. 2360 */ 2361 @Child(name = "udi", type = {Device.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2362 @Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." ) 2363 protected List<Reference> udi; 2364 2365 private static final long serialVersionUID = 1165684715L; 2366 2367 /** 2368 * Constructor 2369 */ 2370 public ProcedureComponent() { 2371 super(); 2372 } 2373 2374 /** 2375 * Constructor 2376 */ 2377 public ProcedureComponent(int sequence, DataType procedure) { 2378 super(); 2379 this.setSequence(sequence); 2380 this.setProcedure(procedure); 2381 } 2382 2383 /** 2384 * @return {@link #sequence} (A number to uniquely identify procedure entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 2385 */ 2386 public PositiveIntType getSequenceElement() { 2387 if (this.sequence == null) 2388 if (Configuration.errorOnAutoCreate()) 2389 throw new Error("Attempt to auto-create ProcedureComponent.sequence"); 2390 else if (Configuration.doAutoCreate()) 2391 this.sequence = new PositiveIntType(); // bb 2392 return this.sequence; 2393 } 2394 2395 public boolean hasSequenceElement() { 2396 return this.sequence != null && !this.sequence.isEmpty(); 2397 } 2398 2399 public boolean hasSequence() { 2400 return this.sequence != null && !this.sequence.isEmpty(); 2401 } 2402 2403 /** 2404 * @param value {@link #sequence} (A number to uniquely identify procedure entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 2405 */ 2406 public ProcedureComponent setSequenceElement(PositiveIntType value) { 2407 this.sequence = value; 2408 return this; 2409 } 2410 2411 /** 2412 * @return A number to uniquely identify procedure entries. 2413 */ 2414 public int getSequence() { 2415 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 2416 } 2417 2418 /** 2419 * @param value A number to uniquely identify procedure entries. 2420 */ 2421 public ProcedureComponent setSequence(int value) { 2422 if (this.sequence == null) 2423 this.sequence = new PositiveIntType(); 2424 this.sequence.setValue(value); 2425 return this; 2426 } 2427 2428 /** 2429 * @return {@link #type} (When the condition was observed or the relative ranking.) 2430 */ 2431 public List<CodeableConcept> getType() { 2432 if (this.type == null) 2433 this.type = new ArrayList<CodeableConcept>(); 2434 return this.type; 2435 } 2436 2437 /** 2438 * @return Returns a reference to <code>this</code> for easy method chaining 2439 */ 2440 public ProcedureComponent setType(List<CodeableConcept> theType) { 2441 this.type = theType; 2442 return this; 2443 } 2444 2445 public boolean hasType() { 2446 if (this.type == null) 2447 return false; 2448 for (CodeableConcept item : this.type) 2449 if (!item.isEmpty()) 2450 return true; 2451 return false; 2452 } 2453 2454 public CodeableConcept addType() { //3 2455 CodeableConcept t = new CodeableConcept(); 2456 if (this.type == null) 2457 this.type = new ArrayList<CodeableConcept>(); 2458 this.type.add(t); 2459 return t; 2460 } 2461 2462 public ProcedureComponent addType(CodeableConcept t) { //3 2463 if (t == null) 2464 return this; 2465 if (this.type == null) 2466 this.type = new ArrayList<CodeableConcept>(); 2467 this.type.add(t); 2468 return this; 2469 } 2470 2471 /** 2472 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 2473 */ 2474 public CodeableConcept getTypeFirstRep() { 2475 if (getType().isEmpty()) { 2476 addType(); 2477 } 2478 return getType().get(0); 2479 } 2480 2481 /** 2482 * @return {@link #date} (Date and optionally time the procedure was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2483 */ 2484 public DateTimeType getDateElement() { 2485 if (this.date == null) 2486 if (Configuration.errorOnAutoCreate()) 2487 throw new Error("Attempt to auto-create ProcedureComponent.date"); 2488 else if (Configuration.doAutoCreate()) 2489 this.date = new DateTimeType(); // bb 2490 return this.date; 2491 } 2492 2493 public boolean hasDateElement() { 2494 return this.date != null && !this.date.isEmpty(); 2495 } 2496 2497 public boolean hasDate() { 2498 return this.date != null && !this.date.isEmpty(); 2499 } 2500 2501 /** 2502 * @param value {@link #date} (Date and optionally time the procedure was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2503 */ 2504 public ProcedureComponent setDateElement(DateTimeType value) { 2505 this.date = value; 2506 return this; 2507 } 2508 2509 /** 2510 * @return Date and optionally time the procedure was performed. 2511 */ 2512 public Date getDate() { 2513 return this.date == null ? null : this.date.getValue(); 2514 } 2515 2516 /** 2517 * @param value Date and optionally time the procedure was performed. 2518 */ 2519 public ProcedureComponent setDate(Date value) { 2520 if (value == null) 2521 this.date = null; 2522 else { 2523 if (this.date == null) 2524 this.date = new DateTimeType(); 2525 this.date.setValue(value); 2526 } 2527 return this; 2528 } 2529 2530 /** 2531 * @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.) 2532 */ 2533 public DataType getProcedure() { 2534 return this.procedure; 2535 } 2536 2537 /** 2538 * @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.) 2539 */ 2540 public CodeableConcept getProcedureCodeableConcept() throws FHIRException { 2541 if (this.procedure == null) 2542 this.procedure = new CodeableConcept(); 2543 if (!(this.procedure instanceof CodeableConcept)) 2544 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.procedure.getClass().getName()+" was encountered"); 2545 return (CodeableConcept) this.procedure; 2546 } 2547 2548 public boolean hasProcedureCodeableConcept() { 2549 return this != null && this.procedure instanceof CodeableConcept; 2550 } 2551 2552 /** 2553 * @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.) 2554 */ 2555 public Reference getProcedureReference() throws FHIRException { 2556 if (this.procedure == null) 2557 this.procedure = new Reference(); 2558 if (!(this.procedure instanceof Reference)) 2559 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.procedure.getClass().getName()+" was encountered"); 2560 return (Reference) this.procedure; 2561 } 2562 2563 public boolean hasProcedureReference() { 2564 return this != null && this.procedure instanceof Reference; 2565 } 2566 2567 public boolean hasProcedure() { 2568 return this.procedure != null && !this.procedure.isEmpty(); 2569 } 2570 2571 /** 2572 * @param value {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.) 2573 */ 2574 public ProcedureComponent setProcedure(DataType value) { 2575 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 2576 throw new FHIRException("Not the right type for ExplanationOfBenefit.procedure.procedure[x]: "+value.fhirType()); 2577 this.procedure = value; 2578 return this; 2579 } 2580 2581 /** 2582 * @return {@link #udi} (Unique Device Identifiers associated with this line item.) 2583 */ 2584 public List<Reference> getUdi() { 2585 if (this.udi == null) 2586 this.udi = new ArrayList<Reference>(); 2587 return this.udi; 2588 } 2589 2590 /** 2591 * @return Returns a reference to <code>this</code> for easy method chaining 2592 */ 2593 public ProcedureComponent setUdi(List<Reference> theUdi) { 2594 this.udi = theUdi; 2595 return this; 2596 } 2597 2598 public boolean hasUdi() { 2599 if (this.udi == null) 2600 return false; 2601 for (Reference item : this.udi) 2602 if (!item.isEmpty()) 2603 return true; 2604 return false; 2605 } 2606 2607 public Reference addUdi() { //3 2608 Reference t = new Reference(); 2609 if (this.udi == null) 2610 this.udi = new ArrayList<Reference>(); 2611 this.udi.add(t); 2612 return t; 2613 } 2614 2615 public ProcedureComponent addUdi(Reference t) { //3 2616 if (t == null) 2617 return this; 2618 if (this.udi == null) 2619 this.udi = new ArrayList<Reference>(); 2620 this.udi.add(t); 2621 return this; 2622 } 2623 2624 /** 2625 * @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3} 2626 */ 2627 public Reference getUdiFirstRep() { 2628 if (getUdi().isEmpty()) { 2629 addUdi(); 2630 } 2631 return getUdi().get(0); 2632 } 2633 2634 protected void listChildren(List<Property> children) { 2635 super.listChildren(children); 2636 children.add(new Property("sequence", "positiveInt", "A number to uniquely identify procedure entries.", 0, 1, sequence)); 2637 children.add(new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type)); 2638 children.add(new Property("date", "dateTime", "Date and optionally time the procedure was performed.", 0, 1, date)); 2639 children.add(new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure)); 2640 children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 2641 } 2642 2643 @Override 2644 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2645 switch (_hash) { 2646 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify procedure entries.", 0, 1, sequence); 2647 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type); 2648 case 3076014: /*date*/ return new Property("date", "dateTime", "Date and optionally time the procedure was performed.", 0, 1, date); 2649 case 1640074445: /*procedure[x]*/ return new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure); 2650 case -1095204141: /*procedure*/ return new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure); 2651 case -1284783026: /*procedureCodeableConcept*/ return new Property("procedure[x]", "CodeableConcept", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure); 2652 case 881809848: /*procedureReference*/ return new Property("procedure[x]", "Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure); 2653 case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi); 2654 default: return super.getNamedProperty(_hash, _name, _checkValid); 2655 } 2656 2657 } 2658 2659 @Override 2660 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2661 switch (hash) { 2662 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 2663 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 2664 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2665 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : new Base[] {this.procedure}; // DataType 2666 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 2667 default: return super.getProperty(hash, name, checkValid); 2668 } 2669 2670 } 2671 2672 @Override 2673 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2674 switch (hash) { 2675 case 1349547969: // sequence 2676 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2677 return value; 2678 case 3575610: // type 2679 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2680 return value; 2681 case 3076014: // date 2682 this.date = TypeConvertor.castToDateTime(value); // DateTimeType 2683 return value; 2684 case -1095204141: // procedure 2685 this.procedure = TypeConvertor.castToType(value); // DataType 2686 return value; 2687 case 115642: // udi 2688 this.getUdi().add(TypeConvertor.castToReference(value)); // Reference 2689 return value; 2690 default: return super.setProperty(hash, name, value); 2691 } 2692 2693 } 2694 2695 @Override 2696 public Base setProperty(String name, Base value) throws FHIRException { 2697 if (name.equals("sequence")) { 2698 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2699 } else if (name.equals("type")) { 2700 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 2701 } else if (name.equals("date")) { 2702 this.date = TypeConvertor.castToDateTime(value); // DateTimeType 2703 } else if (name.equals("procedure[x]")) { 2704 this.procedure = TypeConvertor.castToType(value); // DataType 2705 } else if (name.equals("udi")) { 2706 this.getUdi().add(TypeConvertor.castToReference(value)); 2707 } else 2708 return super.setProperty(name, value); 2709 return value; 2710 } 2711 2712 @Override 2713 public void removeChild(String name, Base value) throws FHIRException { 2714 if (name.equals("sequence")) { 2715 this.sequence = null; 2716 } else if (name.equals("type")) { 2717 this.getType().remove(value); 2718 } else if (name.equals("date")) { 2719 this.date = null; 2720 } else if (name.equals("procedure[x]")) { 2721 this.procedure = null; 2722 } else if (name.equals("udi")) { 2723 this.getUdi().remove(value); 2724 } else 2725 super.removeChild(name, value); 2726 2727 } 2728 2729 @Override 2730 public Base makeProperty(int hash, String name) throws FHIRException { 2731 switch (hash) { 2732 case 1349547969: return getSequenceElement(); 2733 case 3575610: return addType(); 2734 case 3076014: return getDateElement(); 2735 case 1640074445: return getProcedure(); 2736 case -1095204141: return getProcedure(); 2737 case 115642: return addUdi(); 2738 default: return super.makeProperty(hash, name); 2739 } 2740 2741 } 2742 2743 @Override 2744 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2745 switch (hash) { 2746 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 2747 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2748 case 3076014: /*date*/ return new String[] {"dateTime"}; 2749 case -1095204141: /*procedure*/ return new String[] {"CodeableConcept", "Reference"}; 2750 case 115642: /*udi*/ return new String[] {"Reference"}; 2751 default: return super.getTypesForProperty(hash, name); 2752 } 2753 2754 } 2755 2756 @Override 2757 public Base addChild(String name) throws FHIRException { 2758 if (name.equals("sequence")) { 2759 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.procedure.sequence"); 2760 } 2761 else if (name.equals("type")) { 2762 return addType(); 2763 } 2764 else if (name.equals("date")) { 2765 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.procedure.date"); 2766 } 2767 else if (name.equals("procedureCodeableConcept")) { 2768 this.procedure = new CodeableConcept(); 2769 return this.procedure; 2770 } 2771 else if (name.equals("procedureReference")) { 2772 this.procedure = new Reference(); 2773 return this.procedure; 2774 } 2775 else if (name.equals("udi")) { 2776 return addUdi(); 2777 } 2778 else 2779 return super.addChild(name); 2780 } 2781 2782 public ProcedureComponent copy() { 2783 ProcedureComponent dst = new ProcedureComponent(); 2784 copyValues(dst); 2785 return dst; 2786 } 2787 2788 public void copyValues(ProcedureComponent dst) { 2789 super.copyValues(dst); 2790 dst.sequence = sequence == null ? null : sequence.copy(); 2791 if (type != null) { 2792 dst.type = new ArrayList<CodeableConcept>(); 2793 for (CodeableConcept i : type) 2794 dst.type.add(i.copy()); 2795 }; 2796 dst.date = date == null ? null : date.copy(); 2797 dst.procedure = procedure == null ? null : procedure.copy(); 2798 if (udi != null) { 2799 dst.udi = new ArrayList<Reference>(); 2800 for (Reference i : udi) 2801 dst.udi.add(i.copy()); 2802 }; 2803 } 2804 2805 @Override 2806 public boolean equalsDeep(Base other_) { 2807 if (!super.equalsDeep(other_)) 2808 return false; 2809 if (!(other_ instanceof ProcedureComponent)) 2810 return false; 2811 ProcedureComponent o = (ProcedureComponent) other_; 2812 return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(date, o.date, true) 2813 && compareDeep(procedure, o.procedure, true) && compareDeep(udi, o.udi, true); 2814 } 2815 2816 @Override 2817 public boolean equalsShallow(Base other_) { 2818 if (!super.equalsShallow(other_)) 2819 return false; 2820 if (!(other_ instanceof ProcedureComponent)) 2821 return false; 2822 ProcedureComponent o = (ProcedureComponent) other_; 2823 return compareValues(sequence, o.sequence, true) && compareValues(date, o.date, true); 2824 } 2825 2826 public boolean isEmpty() { 2827 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, date, procedure 2828 , udi); 2829 } 2830 2831 public String fhirType() { 2832 return "ExplanationOfBenefit.procedure"; 2833 2834 } 2835 2836 } 2837 2838 @Block() 2839 public static class InsuranceComponent extends BackboneElement implements IBaseBackboneElement { 2840 /** 2841 * A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. 2842 */ 2843 @Child(name = "focal", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2844 @Description(shortDefinition="Coverage to be used for adjudication", formalDefinition="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true." ) 2845 protected BooleanType focal; 2846 2847 /** 2848 * Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. 2849 */ 2850 @Child(name = "coverage", type = {Coverage.class}, order=2, min=1, max=1, modifier=false, summary=true) 2851 @Description(shortDefinition="Insurance information", formalDefinition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." ) 2852 protected Reference coverage; 2853 2854 /** 2855 * Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization. 2856 */ 2857 @Child(name = "preAuthRef", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2858 @Description(shortDefinition="Prior authorization reference number", formalDefinition="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization." ) 2859 protected List<StringType> preAuthRef; 2860 2861 private static final long serialVersionUID = 1519900285L; 2862 2863 /** 2864 * Constructor 2865 */ 2866 public InsuranceComponent() { 2867 super(); 2868 } 2869 2870 /** 2871 * Constructor 2872 */ 2873 public InsuranceComponent(boolean focal, Reference coverage) { 2874 super(); 2875 this.setFocal(focal); 2876 this.setCoverage(coverage); 2877 } 2878 2879 /** 2880 * @return {@link #focal} (A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 2881 */ 2882 public BooleanType getFocalElement() { 2883 if (this.focal == null) 2884 if (Configuration.errorOnAutoCreate()) 2885 throw new Error("Attempt to auto-create InsuranceComponent.focal"); 2886 else if (Configuration.doAutoCreate()) 2887 this.focal = new BooleanType(); // bb 2888 return this.focal; 2889 } 2890 2891 public boolean hasFocalElement() { 2892 return this.focal != null && !this.focal.isEmpty(); 2893 } 2894 2895 public boolean hasFocal() { 2896 return this.focal != null && !this.focal.isEmpty(); 2897 } 2898 2899 /** 2900 * @param value {@link #focal} (A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 2901 */ 2902 public InsuranceComponent setFocalElement(BooleanType value) { 2903 this.focal = value; 2904 return this; 2905 } 2906 2907 /** 2908 * @return A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. 2909 */ 2910 public boolean getFocal() { 2911 return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); 2912 } 2913 2914 /** 2915 * @param value A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. 2916 */ 2917 public InsuranceComponent setFocal(boolean value) { 2918 if (this.focal == null) 2919 this.focal = new BooleanType(); 2920 this.focal.setValue(value); 2921 return this; 2922 } 2923 2924 /** 2925 * @return {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.) 2926 */ 2927 public Reference getCoverage() { 2928 if (this.coverage == null) 2929 if (Configuration.errorOnAutoCreate()) 2930 throw new Error("Attempt to auto-create InsuranceComponent.coverage"); 2931 else if (Configuration.doAutoCreate()) 2932 this.coverage = new Reference(); // cc 2933 return this.coverage; 2934 } 2935 2936 public boolean hasCoverage() { 2937 return this.coverage != null && !this.coverage.isEmpty(); 2938 } 2939 2940 /** 2941 * @param value {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.) 2942 */ 2943 public InsuranceComponent setCoverage(Reference value) { 2944 this.coverage = value; 2945 return this; 2946 } 2947 2948 /** 2949 * @return {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.) 2950 */ 2951 public List<StringType> getPreAuthRef() { 2952 if (this.preAuthRef == null) 2953 this.preAuthRef = new ArrayList<StringType>(); 2954 return this.preAuthRef; 2955 } 2956 2957 /** 2958 * @return Returns a reference to <code>this</code> for easy method chaining 2959 */ 2960 public InsuranceComponent setPreAuthRef(List<StringType> thePreAuthRef) { 2961 this.preAuthRef = thePreAuthRef; 2962 return this; 2963 } 2964 2965 public boolean hasPreAuthRef() { 2966 if (this.preAuthRef == null) 2967 return false; 2968 for (StringType item : this.preAuthRef) 2969 if (!item.isEmpty()) 2970 return true; 2971 return false; 2972 } 2973 2974 /** 2975 * @return {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.) 2976 */ 2977 public StringType addPreAuthRefElement() {//2 2978 StringType t = new StringType(); 2979 if (this.preAuthRef == null) 2980 this.preAuthRef = new ArrayList<StringType>(); 2981 this.preAuthRef.add(t); 2982 return t; 2983 } 2984 2985 /** 2986 * @param value {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.) 2987 */ 2988 public InsuranceComponent addPreAuthRef(String value) { //1 2989 StringType t = new StringType(); 2990 t.setValue(value); 2991 if (this.preAuthRef == null) 2992 this.preAuthRef = new ArrayList<StringType>(); 2993 this.preAuthRef.add(t); 2994 return this; 2995 } 2996 2997 /** 2998 * @param value {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.) 2999 */ 3000 public boolean hasPreAuthRef(String value) { 3001 if (this.preAuthRef == null) 3002 return false; 3003 for (StringType v : this.preAuthRef) 3004 if (v.getValue().equals(value)) // string 3005 return true; 3006 return false; 3007 } 3008 3009 protected void listChildren(List<Property> children) { 3010 super.listChildren(children); 3011 children.add(new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", 0, 1, focal)); 3012 children.add(new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage)); 3013 children.add(new Property("preAuthRef", "string", "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); 3014 } 3015 3016 @Override 3017 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3018 switch (_hash) { 3019 case 97604197: /*focal*/ return new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", 0, 1, focal); 3020 case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage); 3021 case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", 0, java.lang.Integer.MAX_VALUE, preAuthRef); 3022 default: return super.getNamedProperty(_hash, _name, _checkValid); 3023 } 3024 3025 } 3026 3027 @Override 3028 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3029 switch (hash) { 3030 case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType 3031 case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference 3032 case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType 3033 default: return super.getProperty(hash, name, checkValid); 3034 } 3035 3036 } 3037 3038 @Override 3039 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3040 switch (hash) { 3041 case 97604197: // focal 3042 this.focal = TypeConvertor.castToBoolean(value); // BooleanType 3043 return value; 3044 case -351767064: // coverage 3045 this.coverage = TypeConvertor.castToReference(value); // Reference 3046 return value; 3047 case 522246568: // preAuthRef 3048 this.getPreAuthRef().add(TypeConvertor.castToString(value)); // StringType 3049 return value; 3050 default: return super.setProperty(hash, name, value); 3051 } 3052 3053 } 3054 3055 @Override 3056 public Base setProperty(String name, Base value) throws FHIRException { 3057 if (name.equals("focal")) { 3058 this.focal = TypeConvertor.castToBoolean(value); // BooleanType 3059 } else if (name.equals("coverage")) { 3060 this.coverage = TypeConvertor.castToReference(value); // Reference 3061 } else if (name.equals("preAuthRef")) { 3062 this.getPreAuthRef().add(TypeConvertor.castToString(value)); 3063 } else 3064 return super.setProperty(name, value); 3065 return value; 3066 } 3067 3068 @Override 3069 public void removeChild(String name, Base value) throws FHIRException { 3070 if (name.equals("focal")) { 3071 this.focal = null; 3072 } else if (name.equals("coverage")) { 3073 this.coverage = null; 3074 } else if (name.equals("preAuthRef")) { 3075 this.getPreAuthRef().remove(value); 3076 } else 3077 super.removeChild(name, value); 3078 3079 } 3080 3081 @Override 3082 public Base makeProperty(int hash, String name) throws FHIRException { 3083 switch (hash) { 3084 case 97604197: return getFocalElement(); 3085 case -351767064: return getCoverage(); 3086 case 522246568: return addPreAuthRefElement(); 3087 default: return super.makeProperty(hash, name); 3088 } 3089 3090 } 3091 3092 @Override 3093 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3094 switch (hash) { 3095 case 97604197: /*focal*/ return new String[] {"boolean"}; 3096 case -351767064: /*coverage*/ return new String[] {"Reference"}; 3097 case 522246568: /*preAuthRef*/ return new String[] {"string"}; 3098 default: return super.getTypesForProperty(hash, name); 3099 } 3100 3101 } 3102 3103 @Override 3104 public Base addChild(String name) throws FHIRException { 3105 if (name.equals("focal")) { 3106 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.insurance.focal"); 3107 } 3108 else if (name.equals("coverage")) { 3109 this.coverage = new Reference(); 3110 return this.coverage; 3111 } 3112 else if (name.equals("preAuthRef")) { 3113 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.insurance.preAuthRef"); 3114 } 3115 else 3116 return super.addChild(name); 3117 } 3118 3119 public InsuranceComponent copy() { 3120 InsuranceComponent dst = new InsuranceComponent(); 3121 copyValues(dst); 3122 return dst; 3123 } 3124 3125 public void copyValues(InsuranceComponent dst) { 3126 super.copyValues(dst); 3127 dst.focal = focal == null ? null : focal.copy(); 3128 dst.coverage = coverage == null ? null : coverage.copy(); 3129 if (preAuthRef != null) { 3130 dst.preAuthRef = new ArrayList<StringType>(); 3131 for (StringType i : preAuthRef) 3132 dst.preAuthRef.add(i.copy()); 3133 }; 3134 } 3135 3136 @Override 3137 public boolean equalsDeep(Base other_) { 3138 if (!super.equalsDeep(other_)) 3139 return false; 3140 if (!(other_ instanceof InsuranceComponent)) 3141 return false; 3142 InsuranceComponent o = (InsuranceComponent) other_; 3143 return compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) && compareDeep(preAuthRef, o.preAuthRef, true) 3144 ; 3145 } 3146 3147 @Override 3148 public boolean equalsShallow(Base other_) { 3149 if (!super.equalsShallow(other_)) 3150 return false; 3151 if (!(other_ instanceof InsuranceComponent)) 3152 return false; 3153 InsuranceComponent o = (InsuranceComponent) other_; 3154 return compareValues(focal, o.focal, true) && compareValues(preAuthRef, o.preAuthRef, true); 3155 } 3156 3157 public boolean isEmpty() { 3158 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(focal, coverage, preAuthRef 3159 ); 3160 } 3161 3162 public String fhirType() { 3163 return "ExplanationOfBenefit.insurance"; 3164 3165 } 3166 3167 } 3168 3169 @Block() 3170 public static class AccidentComponent extends BackboneElement implements IBaseBackboneElement { 3171 /** 3172 * Date of an accident event related to the products and services contained in the claim. 3173 */ 3174 @Child(name = "date", type = {DateType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3175 @Description(shortDefinition="When the incident occurred", formalDefinition="Date of an accident event related to the products and services contained in the claim." ) 3176 protected DateType date; 3177 3178 /** 3179 * The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers. 3180 */ 3181 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 3182 @Description(shortDefinition="The nature of the accident", formalDefinition="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." ) 3183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActIncidentCode") 3184 protected CodeableConcept type; 3185 3186 /** 3187 * The physical location of the accident event. 3188 */ 3189 @Child(name = "location", type = {Address.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=false) 3190 @Description(shortDefinition="Where the event occurred", formalDefinition="The physical location of the accident event." ) 3191 protected DataType location; 3192 3193 private static final long serialVersionUID = 11882722L; 3194 3195 /** 3196 * Constructor 3197 */ 3198 public AccidentComponent() { 3199 super(); 3200 } 3201 3202 /** 3203 * @return {@link #date} (Date of an accident event related to the products and services contained in the claim.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3204 */ 3205 public DateType getDateElement() { 3206 if (this.date == null) 3207 if (Configuration.errorOnAutoCreate()) 3208 throw new Error("Attempt to auto-create AccidentComponent.date"); 3209 else if (Configuration.doAutoCreate()) 3210 this.date = new DateType(); // bb 3211 return this.date; 3212 } 3213 3214 public boolean hasDateElement() { 3215 return this.date != null && !this.date.isEmpty(); 3216 } 3217 3218 public boolean hasDate() { 3219 return this.date != null && !this.date.isEmpty(); 3220 } 3221 3222 /** 3223 * @param value {@link #date} (Date of an accident event related to the products and services contained in the claim.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3224 */ 3225 public AccidentComponent setDateElement(DateType value) { 3226 this.date = value; 3227 return this; 3228 } 3229 3230 /** 3231 * @return Date of an accident event related to the products and services contained in the claim. 3232 */ 3233 public Date getDate() { 3234 return this.date == null ? null : this.date.getValue(); 3235 } 3236 3237 /** 3238 * @param value Date of an accident event related to the products and services contained in the claim. 3239 */ 3240 public AccidentComponent setDate(Date value) { 3241 if (value == null) 3242 this.date = null; 3243 else { 3244 if (this.date == null) 3245 this.date = new DateType(); 3246 this.date.setValue(value); 3247 } 3248 return this; 3249 } 3250 3251 /** 3252 * @return {@link #type} (The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.) 3253 */ 3254 public CodeableConcept getType() { 3255 if (this.type == null) 3256 if (Configuration.errorOnAutoCreate()) 3257 throw new Error("Attempt to auto-create AccidentComponent.type"); 3258 else if (Configuration.doAutoCreate()) 3259 this.type = new CodeableConcept(); // cc 3260 return this.type; 3261 } 3262 3263 public boolean hasType() { 3264 return this.type != null && !this.type.isEmpty(); 3265 } 3266 3267 /** 3268 * @param value {@link #type} (The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.) 3269 */ 3270 public AccidentComponent setType(CodeableConcept value) { 3271 this.type = value; 3272 return this; 3273 } 3274 3275 /** 3276 * @return {@link #location} (The physical location of the accident event.) 3277 */ 3278 public DataType getLocation() { 3279 return this.location; 3280 } 3281 3282 /** 3283 * @return {@link #location} (The physical location of the accident event.) 3284 */ 3285 public Address getLocationAddress() throws FHIRException { 3286 if (this.location == null) 3287 this.location = new Address(); 3288 if (!(this.location instanceof Address)) 3289 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.location.getClass().getName()+" was encountered"); 3290 return (Address) this.location; 3291 } 3292 3293 public boolean hasLocationAddress() { 3294 return this != null && this.location instanceof Address; 3295 } 3296 3297 /** 3298 * @return {@link #location} (The physical location of the accident event.) 3299 */ 3300 public Reference getLocationReference() throws FHIRException { 3301 if (this.location == null) 3302 this.location = new Reference(); 3303 if (!(this.location instanceof Reference)) 3304 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.location.getClass().getName()+" was encountered"); 3305 return (Reference) this.location; 3306 } 3307 3308 public boolean hasLocationReference() { 3309 return this != null && this.location instanceof Reference; 3310 } 3311 3312 public boolean hasLocation() { 3313 return this.location != null && !this.location.isEmpty(); 3314 } 3315 3316 /** 3317 * @param value {@link #location} (The physical location of the accident event.) 3318 */ 3319 public AccidentComponent setLocation(DataType value) { 3320 if (value != null && !(value instanceof Address || value instanceof Reference)) 3321 throw new FHIRException("Not the right type for ExplanationOfBenefit.accident.location[x]: "+value.fhirType()); 3322 this.location = value; 3323 return this; 3324 } 3325 3326 protected void listChildren(List<Property> children) { 3327 super.listChildren(children); 3328 children.add(new Property("date", "date", "Date of an accident event related to the products and services contained in the claim.", 0, 1, date)); 3329 children.add(new Property("type", "CodeableConcept", "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", 0, 1, type)); 3330 children.add(new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location)); 3331 } 3332 3333 @Override 3334 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3335 switch (_hash) { 3336 case 3076014: /*date*/ return new Property("date", "date", "Date of an accident event related to the products and services contained in the claim.", 0, 1, date); 3337 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", 0, 1, type); 3338 case 552316075: /*location[x]*/ return new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location); 3339 case 1901043637: /*location*/ return new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location); 3340 case -1280020865: /*locationAddress*/ return new Property("location[x]", "Address", "The physical location of the accident event.", 0, 1, location); 3341 case 755866390: /*locationReference*/ return new Property("location[x]", "Reference(Location)", "The physical location of the accident event.", 0, 1, location); 3342 default: return super.getNamedProperty(_hash, _name, _checkValid); 3343 } 3344 3345 } 3346 3347 @Override 3348 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3349 switch (hash) { 3350 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType 3351 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3352 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // DataType 3353 default: return super.getProperty(hash, name, checkValid); 3354 } 3355 3356 } 3357 3358 @Override 3359 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3360 switch (hash) { 3361 case 3076014: // date 3362 this.date = TypeConvertor.castToDate(value); // DateType 3363 return value; 3364 case 3575610: // type 3365 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3366 return value; 3367 case 1901043637: // location 3368 this.location = TypeConvertor.castToType(value); // DataType 3369 return value; 3370 default: return super.setProperty(hash, name, value); 3371 } 3372 3373 } 3374 3375 @Override 3376 public Base setProperty(String name, Base value) throws FHIRException { 3377 if (name.equals("date")) { 3378 this.date = TypeConvertor.castToDate(value); // DateType 3379 } else if (name.equals("type")) { 3380 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3381 } else if (name.equals("location[x]")) { 3382 this.location = TypeConvertor.castToType(value); // DataType 3383 } else 3384 return super.setProperty(name, value); 3385 return value; 3386 } 3387 3388 @Override 3389 public void removeChild(String name, Base value) throws FHIRException { 3390 if (name.equals("date")) { 3391 this.date = null; 3392 } else if (name.equals("type")) { 3393 this.type = null; 3394 } else if (name.equals("location[x]")) { 3395 this.location = null; 3396 } else 3397 super.removeChild(name, value); 3398 3399 } 3400 3401 @Override 3402 public Base makeProperty(int hash, String name) throws FHIRException { 3403 switch (hash) { 3404 case 3076014: return getDateElement(); 3405 case 3575610: return getType(); 3406 case 552316075: return getLocation(); 3407 case 1901043637: return getLocation(); 3408 default: return super.makeProperty(hash, name); 3409 } 3410 3411 } 3412 3413 @Override 3414 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3415 switch (hash) { 3416 case 3076014: /*date*/ return new String[] {"date"}; 3417 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3418 case 1901043637: /*location*/ return new String[] {"Address", "Reference"}; 3419 default: return super.getTypesForProperty(hash, name); 3420 } 3421 3422 } 3423 3424 @Override 3425 public Base addChild(String name) throws FHIRException { 3426 if (name.equals("date")) { 3427 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.accident.date"); 3428 } 3429 else if (name.equals("type")) { 3430 this.type = new CodeableConcept(); 3431 return this.type; 3432 } 3433 else if (name.equals("locationAddress")) { 3434 this.location = new Address(); 3435 return this.location; 3436 } 3437 else if (name.equals("locationReference")) { 3438 this.location = new Reference(); 3439 return this.location; 3440 } 3441 else 3442 return super.addChild(name); 3443 } 3444 3445 public AccidentComponent copy() { 3446 AccidentComponent dst = new AccidentComponent(); 3447 copyValues(dst); 3448 return dst; 3449 } 3450 3451 public void copyValues(AccidentComponent dst) { 3452 super.copyValues(dst); 3453 dst.date = date == null ? null : date.copy(); 3454 dst.type = type == null ? null : type.copy(); 3455 dst.location = location == null ? null : location.copy(); 3456 } 3457 3458 @Override 3459 public boolean equalsDeep(Base other_) { 3460 if (!super.equalsDeep(other_)) 3461 return false; 3462 if (!(other_ instanceof AccidentComponent)) 3463 return false; 3464 AccidentComponent o = (AccidentComponent) other_; 3465 return compareDeep(date, o.date, true) && compareDeep(type, o.type, true) && compareDeep(location, o.location, true) 3466 ; 3467 } 3468 3469 @Override 3470 public boolean equalsShallow(Base other_) { 3471 if (!super.equalsShallow(other_)) 3472 return false; 3473 if (!(other_ instanceof AccidentComponent)) 3474 return false; 3475 AccidentComponent o = (AccidentComponent) other_; 3476 return compareValues(date, o.date, true); 3477 } 3478 3479 public boolean isEmpty() { 3480 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, type, location); 3481 } 3482 3483 public String fhirType() { 3484 return "ExplanationOfBenefit.accident"; 3485 3486 } 3487 3488 } 3489 3490 @Block() 3491 public static class ItemComponent extends BackboneElement implements IBaseBackboneElement { 3492 /** 3493 * A number to uniquely identify item entries. 3494 */ 3495 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3496 @Description(shortDefinition="Item instance identifier", formalDefinition="A number to uniquely identify item entries." ) 3497 protected PositiveIntType sequence; 3498 3499 /** 3500 * Care team members related to this service or product. 3501 */ 3502 @Child(name = "careTeamSequence", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3503 @Description(shortDefinition="Applicable care team members", formalDefinition="Care team members related to this service or product." ) 3504 protected List<PositiveIntType> careTeamSequence; 3505 3506 /** 3507 * Diagnoses applicable for this service or product. 3508 */ 3509 @Child(name = "diagnosisSequence", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3510 @Description(shortDefinition="Applicable diagnoses", formalDefinition="Diagnoses applicable for this service or product." ) 3511 protected List<PositiveIntType> diagnosisSequence; 3512 3513 /** 3514 * Procedures applicable for this service or product. 3515 */ 3516 @Child(name = "procedureSequence", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3517 @Description(shortDefinition="Applicable procedures", formalDefinition="Procedures applicable for this service or product." ) 3518 protected List<PositiveIntType> procedureSequence; 3519 3520 /** 3521 * Exceptions, special conditions and supporting information applicable for this service or product. 3522 */ 3523 @Child(name = "informationSequence", type = {PositiveIntType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3524 @Description(shortDefinition="Applicable exception and supporting information", formalDefinition="Exceptions, special conditions and supporting information applicable for this service or product." ) 3525 protected List<PositiveIntType> informationSequence; 3526 3527 /** 3528 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 3529 */ 3530 @Child(name = "traceNumber", type = {Identifier.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3531 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 3532 protected List<Identifier> traceNumber; 3533 3534 /** 3535 * The type of revenue or cost center providing the product and/or service. 3536 */ 3537 @Child(name = "revenue", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 3538 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 3539 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 3540 protected CodeableConcept revenue; 3541 3542 /** 3543 * Code to identify the general type of benefits under which products and services are provided. 3544 */ 3545 @Child(name = "category", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 3546 @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." ) 3547 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory") 3548 protected CodeableConcept category; 3549 3550 /** 3551 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 3552 */ 3553 @Child(name = "productOrService", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false) 3554 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 3555 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 3556 protected CodeableConcept productOrService; 3557 3558 /** 3559 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 3560 */ 3561 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) 3562 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 3563 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 3564 protected CodeableConcept productOrServiceEnd; 3565 3566 /** 3567 * Request or Referral for Goods or Service to be rendered. 3568 */ 3569 @Child(name = "request", type = {DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class, SupplyRequest.class, VisionPrescription.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3570 @Description(shortDefinition="Request or Referral for Service", formalDefinition="Request or Referral for Goods or Service to be rendered." ) 3571 protected List<Reference> request; 3572 3573 /** 3574 * Item typification or modifiers codes to convey additional context for the product or service. 3575 */ 3576 @Child(name = "modifier", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3577 @Description(shortDefinition="Product or service billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 3578 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 3579 protected List<CodeableConcept> modifier; 3580 3581 /** 3582 * Identifies the program under which this may be recovered. 3583 */ 3584 @Child(name = "programCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3585 @Description(shortDefinition="Program the product or service is provided under", formalDefinition="Identifies the program under which this may be recovered." ) 3586 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") 3587 protected List<CodeableConcept> programCode; 3588 3589 /** 3590 * The date or dates when the service or product was supplied, performed or completed. 3591 */ 3592 @Child(name = "serviced", type = {DateType.class, Period.class}, order=14, min=0, max=1, modifier=false, summary=false) 3593 @Description(shortDefinition="Date or dates of service or product delivery", formalDefinition="The date or dates when the service or product was supplied, performed or completed." ) 3594 protected DataType serviced; 3595 3596 /** 3597 * Where the product or service was provided. 3598 */ 3599 @Child(name = "location", type = {CodeableConcept.class, Address.class, Location.class}, order=15, min=0, max=1, modifier=false, summary=false) 3600 @Description(shortDefinition="Place of service or where product was supplied", formalDefinition="Where the product or service was provided." ) 3601 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-place") 3602 protected DataType location; 3603 3604 /** 3605 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 3606 */ 3607 @Child(name = "patientPaid", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=false) 3608 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 3609 protected Money patientPaid; 3610 3611 /** 3612 * The number of repetitions of a service or product. 3613 */ 3614 @Child(name = "quantity", type = {Quantity.class}, order=17, min=0, max=1, modifier=false, summary=false) 3615 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 3616 protected Quantity quantity; 3617 3618 /** 3619 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 3620 */ 3621 @Child(name = "unitPrice", type = {Money.class}, order=18, min=0, max=1, modifier=false, summary=false) 3622 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 3623 protected Money unitPrice; 3624 3625 /** 3626 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3627 */ 3628 @Child(name = "factor", type = {DecimalType.class}, order=19, min=0, max=1, modifier=false, summary=false) 3629 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 3630 protected DecimalType factor; 3631 3632 /** 3633 * The total of taxes applicable for this product or service. 3634 */ 3635 @Child(name = "tax", type = {Money.class}, order=20, min=0, max=1, modifier=false, summary=false) 3636 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 3637 protected Money tax; 3638 3639 /** 3640 * The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor. 3641 */ 3642 @Child(name = "net", type = {Money.class}, order=21, min=0, max=1, modifier=false, summary=false) 3643 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor." ) 3644 protected Money net; 3645 3646 /** 3647 * Unique Device Identifiers associated with this line item. 3648 */ 3649 @Child(name = "udi", type = {Device.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3650 @Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." ) 3651 protected List<Reference> udi; 3652 3653 /** 3654 * Physical location where the service is performed or applies. 3655 */ 3656 @Child(name = "bodySite", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3657 @Description(shortDefinition="Anatomical location", formalDefinition="Physical location where the service is performed or applies." ) 3658 protected List<ItemBodySiteComponent> bodySite; 3659 3660 /** 3661 * Healthcare encounters related to this claim. 3662 */ 3663 @Child(name = "encounter", type = {Encounter.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3664 @Description(shortDefinition="Encounters associated with the listed treatments", formalDefinition="Healthcare encounters related to this claim." ) 3665 protected List<Reference> encounter; 3666 3667 /** 3668 * The numbers associated with notes below which apply to the adjudication of this item. 3669 */ 3670 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3671 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 3672 protected List<PositiveIntType> noteNumber; 3673 3674 /** 3675 * The high-level results of the adjudication if adjudication has been performed. 3676 */ 3677 @Child(name = "reviewOutcome", type = {}, order=26, min=0, max=1, modifier=false, summary=false) 3678 @Description(shortDefinition="Adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 3679 protected ItemReviewOutcomeComponent reviewOutcome; 3680 3681 /** 3682 * If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item. 3683 */ 3684 @Child(name = "adjudication", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3685 @Description(shortDefinition="Adjudication details", formalDefinition="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item." ) 3686 protected List<AdjudicationComponent> adjudication; 3687 3688 /** 3689 * Second-tier of goods and services. 3690 */ 3691 @Child(name = "detail", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3692 @Description(shortDefinition="Additional items", formalDefinition="Second-tier of goods and services." ) 3693 protected List<DetailComponent> detail; 3694 3695 private static final long serialVersionUID = -1905277239L; 3696 3697 /** 3698 * Constructor 3699 */ 3700 public ItemComponent() { 3701 super(); 3702 } 3703 3704 /** 3705 * Constructor 3706 */ 3707 public ItemComponent(int sequence) { 3708 super(); 3709 this.setSequence(sequence); 3710 } 3711 3712 /** 3713 * @return {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 3714 */ 3715 public PositiveIntType getSequenceElement() { 3716 if (this.sequence == null) 3717 if (Configuration.errorOnAutoCreate()) 3718 throw new Error("Attempt to auto-create ItemComponent.sequence"); 3719 else if (Configuration.doAutoCreate()) 3720 this.sequence = new PositiveIntType(); // bb 3721 return this.sequence; 3722 } 3723 3724 public boolean hasSequenceElement() { 3725 return this.sequence != null && !this.sequence.isEmpty(); 3726 } 3727 3728 public boolean hasSequence() { 3729 return this.sequence != null && !this.sequence.isEmpty(); 3730 } 3731 3732 /** 3733 * @param value {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 3734 */ 3735 public ItemComponent setSequenceElement(PositiveIntType value) { 3736 this.sequence = value; 3737 return this; 3738 } 3739 3740 /** 3741 * @return A number to uniquely identify item entries. 3742 */ 3743 public int getSequence() { 3744 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 3745 } 3746 3747 /** 3748 * @param value A number to uniquely identify item entries. 3749 */ 3750 public ItemComponent setSequence(int value) { 3751 if (this.sequence == null) 3752 this.sequence = new PositiveIntType(); 3753 this.sequence.setValue(value); 3754 return this; 3755 } 3756 3757 /** 3758 * @return {@link #careTeamSequence} (Care team members related to this service or product.) 3759 */ 3760 public List<PositiveIntType> getCareTeamSequence() { 3761 if (this.careTeamSequence == null) 3762 this.careTeamSequence = new ArrayList<PositiveIntType>(); 3763 return this.careTeamSequence; 3764 } 3765 3766 /** 3767 * @return Returns a reference to <code>this</code> for easy method chaining 3768 */ 3769 public ItemComponent setCareTeamSequence(List<PositiveIntType> theCareTeamSequence) { 3770 this.careTeamSequence = theCareTeamSequence; 3771 return this; 3772 } 3773 3774 public boolean hasCareTeamSequence() { 3775 if (this.careTeamSequence == null) 3776 return false; 3777 for (PositiveIntType item : this.careTeamSequence) 3778 if (!item.isEmpty()) 3779 return true; 3780 return false; 3781 } 3782 3783 /** 3784 * @return {@link #careTeamSequence} (Care team members related to this service or product.) 3785 */ 3786 public PositiveIntType addCareTeamSequenceElement() {//2 3787 PositiveIntType t = new PositiveIntType(); 3788 if (this.careTeamSequence == null) 3789 this.careTeamSequence = new ArrayList<PositiveIntType>(); 3790 this.careTeamSequence.add(t); 3791 return t; 3792 } 3793 3794 /** 3795 * @param value {@link #careTeamSequence} (Care team members related to this service or product.) 3796 */ 3797 public ItemComponent addCareTeamSequence(int value) { //1 3798 PositiveIntType t = new PositiveIntType(); 3799 t.setValue(value); 3800 if (this.careTeamSequence == null) 3801 this.careTeamSequence = new ArrayList<PositiveIntType>(); 3802 this.careTeamSequence.add(t); 3803 return this; 3804 } 3805 3806 /** 3807 * @param value {@link #careTeamSequence} (Care team members related to this service or product.) 3808 */ 3809 public boolean hasCareTeamSequence(int value) { 3810 if (this.careTeamSequence == null) 3811 return false; 3812 for (PositiveIntType v : this.careTeamSequence) 3813 if (v.getValue().equals(value)) // positiveInt 3814 return true; 3815 return false; 3816 } 3817 3818 /** 3819 * @return {@link #diagnosisSequence} (Diagnoses applicable for this service or product.) 3820 */ 3821 public List<PositiveIntType> getDiagnosisSequence() { 3822 if (this.diagnosisSequence == null) 3823 this.diagnosisSequence = new ArrayList<PositiveIntType>(); 3824 return this.diagnosisSequence; 3825 } 3826 3827 /** 3828 * @return Returns a reference to <code>this</code> for easy method chaining 3829 */ 3830 public ItemComponent setDiagnosisSequence(List<PositiveIntType> theDiagnosisSequence) { 3831 this.diagnosisSequence = theDiagnosisSequence; 3832 return this; 3833 } 3834 3835 public boolean hasDiagnosisSequence() { 3836 if (this.diagnosisSequence == null) 3837 return false; 3838 for (PositiveIntType item : this.diagnosisSequence) 3839 if (!item.isEmpty()) 3840 return true; 3841 return false; 3842 } 3843 3844 /** 3845 * @return {@link #diagnosisSequence} (Diagnoses applicable for this service or product.) 3846 */ 3847 public PositiveIntType addDiagnosisSequenceElement() {//2 3848 PositiveIntType t = new PositiveIntType(); 3849 if (this.diagnosisSequence == null) 3850 this.diagnosisSequence = new ArrayList<PositiveIntType>(); 3851 this.diagnosisSequence.add(t); 3852 return t; 3853 } 3854 3855 /** 3856 * @param value {@link #diagnosisSequence} (Diagnoses applicable for this service or product.) 3857 */ 3858 public ItemComponent addDiagnosisSequence(int value) { //1 3859 PositiveIntType t = new PositiveIntType(); 3860 t.setValue(value); 3861 if (this.diagnosisSequence == null) 3862 this.diagnosisSequence = new ArrayList<PositiveIntType>(); 3863 this.diagnosisSequence.add(t); 3864 return this; 3865 } 3866 3867 /** 3868 * @param value {@link #diagnosisSequence} (Diagnoses applicable for this service or product.) 3869 */ 3870 public boolean hasDiagnosisSequence(int value) { 3871 if (this.diagnosisSequence == null) 3872 return false; 3873 for (PositiveIntType v : this.diagnosisSequence) 3874 if (v.getValue().equals(value)) // positiveInt 3875 return true; 3876 return false; 3877 } 3878 3879 /** 3880 * @return {@link #procedureSequence} (Procedures applicable for this service or product.) 3881 */ 3882 public List<PositiveIntType> getProcedureSequence() { 3883 if (this.procedureSequence == null) 3884 this.procedureSequence = new ArrayList<PositiveIntType>(); 3885 return this.procedureSequence; 3886 } 3887 3888 /** 3889 * @return Returns a reference to <code>this</code> for easy method chaining 3890 */ 3891 public ItemComponent setProcedureSequence(List<PositiveIntType> theProcedureSequence) { 3892 this.procedureSequence = theProcedureSequence; 3893 return this; 3894 } 3895 3896 public boolean hasProcedureSequence() { 3897 if (this.procedureSequence == null) 3898 return false; 3899 for (PositiveIntType item : this.procedureSequence) 3900 if (!item.isEmpty()) 3901 return true; 3902 return false; 3903 } 3904 3905 /** 3906 * @return {@link #procedureSequence} (Procedures applicable for this service or product.) 3907 */ 3908 public PositiveIntType addProcedureSequenceElement() {//2 3909 PositiveIntType t = new PositiveIntType(); 3910 if (this.procedureSequence == null) 3911 this.procedureSequence = new ArrayList<PositiveIntType>(); 3912 this.procedureSequence.add(t); 3913 return t; 3914 } 3915 3916 /** 3917 * @param value {@link #procedureSequence} (Procedures applicable for this service or product.) 3918 */ 3919 public ItemComponent addProcedureSequence(int value) { //1 3920 PositiveIntType t = new PositiveIntType(); 3921 t.setValue(value); 3922 if (this.procedureSequence == null) 3923 this.procedureSequence = new ArrayList<PositiveIntType>(); 3924 this.procedureSequence.add(t); 3925 return this; 3926 } 3927 3928 /** 3929 * @param value {@link #procedureSequence} (Procedures applicable for this service or product.) 3930 */ 3931 public boolean hasProcedureSequence(int value) { 3932 if (this.procedureSequence == null) 3933 return false; 3934 for (PositiveIntType v : this.procedureSequence) 3935 if (v.getValue().equals(value)) // positiveInt 3936 return true; 3937 return false; 3938 } 3939 3940 /** 3941 * @return {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.) 3942 */ 3943 public List<PositiveIntType> getInformationSequence() { 3944 if (this.informationSequence == null) 3945 this.informationSequence = new ArrayList<PositiveIntType>(); 3946 return this.informationSequence; 3947 } 3948 3949 /** 3950 * @return Returns a reference to <code>this</code> for easy method chaining 3951 */ 3952 public ItemComponent setInformationSequence(List<PositiveIntType> theInformationSequence) { 3953 this.informationSequence = theInformationSequence; 3954 return this; 3955 } 3956 3957 public boolean hasInformationSequence() { 3958 if (this.informationSequence == null) 3959 return false; 3960 for (PositiveIntType item : this.informationSequence) 3961 if (!item.isEmpty()) 3962 return true; 3963 return false; 3964 } 3965 3966 /** 3967 * @return {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.) 3968 */ 3969 public PositiveIntType addInformationSequenceElement() {//2 3970 PositiveIntType t = new PositiveIntType(); 3971 if (this.informationSequence == null) 3972 this.informationSequence = new ArrayList<PositiveIntType>(); 3973 this.informationSequence.add(t); 3974 return t; 3975 } 3976 3977 /** 3978 * @param value {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.) 3979 */ 3980 public ItemComponent addInformationSequence(int value) { //1 3981 PositiveIntType t = new PositiveIntType(); 3982 t.setValue(value); 3983 if (this.informationSequence == null) 3984 this.informationSequence = new ArrayList<PositiveIntType>(); 3985 this.informationSequence.add(t); 3986 return this; 3987 } 3988 3989 /** 3990 * @param value {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.) 3991 */ 3992 public boolean hasInformationSequence(int value) { 3993 if (this.informationSequence == null) 3994 return false; 3995 for (PositiveIntType v : this.informationSequence) 3996 if (v.getValue().equals(value)) // positiveInt 3997 return true; 3998 return false; 3999 } 4000 4001 /** 4002 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 4003 */ 4004 public List<Identifier> getTraceNumber() { 4005 if (this.traceNumber == null) 4006 this.traceNumber = new ArrayList<Identifier>(); 4007 return this.traceNumber; 4008 } 4009 4010 /** 4011 * @return Returns a reference to <code>this</code> for easy method chaining 4012 */ 4013 public ItemComponent setTraceNumber(List<Identifier> theTraceNumber) { 4014 this.traceNumber = theTraceNumber; 4015 return this; 4016 } 4017 4018 public boolean hasTraceNumber() { 4019 if (this.traceNumber == null) 4020 return false; 4021 for (Identifier item : this.traceNumber) 4022 if (!item.isEmpty()) 4023 return true; 4024 return false; 4025 } 4026 4027 public Identifier addTraceNumber() { //3 4028 Identifier t = new Identifier(); 4029 if (this.traceNumber == null) 4030 this.traceNumber = new ArrayList<Identifier>(); 4031 this.traceNumber.add(t); 4032 return t; 4033 } 4034 4035 public ItemComponent addTraceNumber(Identifier t) { //3 4036 if (t == null) 4037 return this; 4038 if (this.traceNumber == null) 4039 this.traceNumber = new ArrayList<Identifier>(); 4040 this.traceNumber.add(t); 4041 return this; 4042 } 4043 4044 /** 4045 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 4046 */ 4047 public Identifier getTraceNumberFirstRep() { 4048 if (getTraceNumber().isEmpty()) { 4049 addTraceNumber(); 4050 } 4051 return getTraceNumber().get(0); 4052 } 4053 4054 /** 4055 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 4056 */ 4057 public CodeableConcept getRevenue() { 4058 if (this.revenue == null) 4059 if (Configuration.errorOnAutoCreate()) 4060 throw new Error("Attempt to auto-create ItemComponent.revenue"); 4061 else if (Configuration.doAutoCreate()) 4062 this.revenue = new CodeableConcept(); // cc 4063 return this.revenue; 4064 } 4065 4066 public boolean hasRevenue() { 4067 return this.revenue != null && !this.revenue.isEmpty(); 4068 } 4069 4070 /** 4071 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 4072 */ 4073 public ItemComponent setRevenue(CodeableConcept value) { 4074 this.revenue = value; 4075 return this; 4076 } 4077 4078 /** 4079 * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 4080 */ 4081 public CodeableConcept getCategory() { 4082 if (this.category == null) 4083 if (Configuration.errorOnAutoCreate()) 4084 throw new Error("Attempt to auto-create ItemComponent.category"); 4085 else if (Configuration.doAutoCreate()) 4086 this.category = new CodeableConcept(); // cc 4087 return this.category; 4088 } 4089 4090 public boolean hasCategory() { 4091 return this.category != null && !this.category.isEmpty(); 4092 } 4093 4094 /** 4095 * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 4096 */ 4097 public ItemComponent setCategory(CodeableConcept value) { 4098 this.category = value; 4099 return this; 4100 } 4101 4102 /** 4103 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 4104 */ 4105 public CodeableConcept getProductOrService() { 4106 if (this.productOrService == null) 4107 if (Configuration.errorOnAutoCreate()) 4108 throw new Error("Attempt to auto-create ItemComponent.productOrService"); 4109 else if (Configuration.doAutoCreate()) 4110 this.productOrService = new CodeableConcept(); // cc 4111 return this.productOrService; 4112 } 4113 4114 public boolean hasProductOrService() { 4115 return this.productOrService != null && !this.productOrService.isEmpty(); 4116 } 4117 4118 /** 4119 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 4120 */ 4121 public ItemComponent setProductOrService(CodeableConcept value) { 4122 this.productOrService = value; 4123 return this; 4124 } 4125 4126 /** 4127 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 4128 */ 4129 public CodeableConcept getProductOrServiceEnd() { 4130 if (this.productOrServiceEnd == null) 4131 if (Configuration.errorOnAutoCreate()) 4132 throw new Error("Attempt to auto-create ItemComponent.productOrServiceEnd"); 4133 else if (Configuration.doAutoCreate()) 4134 this.productOrServiceEnd = new CodeableConcept(); // cc 4135 return this.productOrServiceEnd; 4136 } 4137 4138 public boolean hasProductOrServiceEnd() { 4139 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 4140 } 4141 4142 /** 4143 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 4144 */ 4145 public ItemComponent setProductOrServiceEnd(CodeableConcept value) { 4146 this.productOrServiceEnd = value; 4147 return this; 4148 } 4149 4150 /** 4151 * @return {@link #request} (Request or Referral for Goods or Service to be rendered.) 4152 */ 4153 public List<Reference> getRequest() { 4154 if (this.request == null) 4155 this.request = new ArrayList<Reference>(); 4156 return this.request; 4157 } 4158 4159 /** 4160 * @return Returns a reference to <code>this</code> for easy method chaining 4161 */ 4162 public ItemComponent setRequest(List<Reference> theRequest) { 4163 this.request = theRequest; 4164 return this; 4165 } 4166 4167 public boolean hasRequest() { 4168 if (this.request == null) 4169 return false; 4170 for (Reference item : this.request) 4171 if (!item.isEmpty()) 4172 return true; 4173 return false; 4174 } 4175 4176 public Reference addRequest() { //3 4177 Reference t = new Reference(); 4178 if (this.request == null) 4179 this.request = new ArrayList<Reference>(); 4180 this.request.add(t); 4181 return t; 4182 } 4183 4184 public ItemComponent addRequest(Reference t) { //3 4185 if (t == null) 4186 return this; 4187 if (this.request == null) 4188 this.request = new ArrayList<Reference>(); 4189 this.request.add(t); 4190 return this; 4191 } 4192 4193 /** 4194 * @return The first repetition of repeating field {@link #request}, creating it if it does not already exist {3} 4195 */ 4196 public Reference getRequestFirstRep() { 4197 if (getRequest().isEmpty()) { 4198 addRequest(); 4199 } 4200 return getRequest().get(0); 4201 } 4202 4203 /** 4204 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 4205 */ 4206 public List<CodeableConcept> getModifier() { 4207 if (this.modifier == null) 4208 this.modifier = new ArrayList<CodeableConcept>(); 4209 return this.modifier; 4210 } 4211 4212 /** 4213 * @return Returns a reference to <code>this</code> for easy method chaining 4214 */ 4215 public ItemComponent setModifier(List<CodeableConcept> theModifier) { 4216 this.modifier = theModifier; 4217 return this; 4218 } 4219 4220 public boolean hasModifier() { 4221 if (this.modifier == null) 4222 return false; 4223 for (CodeableConcept item : this.modifier) 4224 if (!item.isEmpty()) 4225 return true; 4226 return false; 4227 } 4228 4229 public CodeableConcept addModifier() { //3 4230 CodeableConcept t = new CodeableConcept(); 4231 if (this.modifier == null) 4232 this.modifier = new ArrayList<CodeableConcept>(); 4233 this.modifier.add(t); 4234 return t; 4235 } 4236 4237 public ItemComponent addModifier(CodeableConcept t) { //3 4238 if (t == null) 4239 return this; 4240 if (this.modifier == null) 4241 this.modifier = new ArrayList<CodeableConcept>(); 4242 this.modifier.add(t); 4243 return this; 4244 } 4245 4246 /** 4247 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 4248 */ 4249 public CodeableConcept getModifierFirstRep() { 4250 if (getModifier().isEmpty()) { 4251 addModifier(); 4252 } 4253 return getModifier().get(0); 4254 } 4255 4256 /** 4257 * @return {@link #programCode} (Identifies the program under which this may be recovered.) 4258 */ 4259 public List<CodeableConcept> getProgramCode() { 4260 if (this.programCode == null) 4261 this.programCode = new ArrayList<CodeableConcept>(); 4262 return this.programCode; 4263 } 4264 4265 /** 4266 * @return Returns a reference to <code>this</code> for easy method chaining 4267 */ 4268 public ItemComponent setProgramCode(List<CodeableConcept> theProgramCode) { 4269 this.programCode = theProgramCode; 4270 return this; 4271 } 4272 4273 public boolean hasProgramCode() { 4274 if (this.programCode == null) 4275 return false; 4276 for (CodeableConcept item : this.programCode) 4277 if (!item.isEmpty()) 4278 return true; 4279 return false; 4280 } 4281 4282 public CodeableConcept addProgramCode() { //3 4283 CodeableConcept t = new CodeableConcept(); 4284 if (this.programCode == null) 4285 this.programCode = new ArrayList<CodeableConcept>(); 4286 this.programCode.add(t); 4287 return t; 4288 } 4289 4290 public ItemComponent addProgramCode(CodeableConcept t) { //3 4291 if (t == null) 4292 return this; 4293 if (this.programCode == null) 4294 this.programCode = new ArrayList<CodeableConcept>(); 4295 this.programCode.add(t); 4296 return this; 4297 } 4298 4299 /** 4300 * @return The first repetition of repeating field {@link #programCode}, creating it if it does not already exist {3} 4301 */ 4302 public CodeableConcept getProgramCodeFirstRep() { 4303 if (getProgramCode().isEmpty()) { 4304 addProgramCode(); 4305 } 4306 return getProgramCode().get(0); 4307 } 4308 4309 /** 4310 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 4311 */ 4312 public DataType getServiced() { 4313 return this.serviced; 4314 } 4315 4316 /** 4317 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 4318 */ 4319 public DateType getServicedDateType() throws FHIRException { 4320 if (this.serviced == null) 4321 this.serviced = new DateType(); 4322 if (!(this.serviced instanceof DateType)) 4323 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered"); 4324 return (DateType) this.serviced; 4325 } 4326 4327 public boolean hasServicedDateType() { 4328 return this != null && this.serviced instanceof DateType; 4329 } 4330 4331 /** 4332 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 4333 */ 4334 public Period getServicedPeriod() throws FHIRException { 4335 if (this.serviced == null) 4336 this.serviced = new Period(); 4337 if (!(this.serviced instanceof Period)) 4338 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered"); 4339 return (Period) this.serviced; 4340 } 4341 4342 public boolean hasServicedPeriod() { 4343 return this != null && this.serviced instanceof Period; 4344 } 4345 4346 public boolean hasServiced() { 4347 return this.serviced != null && !this.serviced.isEmpty(); 4348 } 4349 4350 /** 4351 * @param value {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 4352 */ 4353 public ItemComponent setServiced(DataType value) { 4354 if (value != null && !(value instanceof DateType || value instanceof Period)) 4355 throw new FHIRException("Not the right type for ExplanationOfBenefit.item.serviced[x]: "+value.fhirType()); 4356 this.serviced = value; 4357 return this; 4358 } 4359 4360 /** 4361 * @return {@link #location} (Where the product or service was provided.) 4362 */ 4363 public DataType getLocation() { 4364 return this.location; 4365 } 4366 4367 /** 4368 * @return {@link #location} (Where the product or service was provided.) 4369 */ 4370 public CodeableConcept getLocationCodeableConcept() throws FHIRException { 4371 if (this.location == null) 4372 this.location = new CodeableConcept(); 4373 if (!(this.location instanceof CodeableConcept)) 4374 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.location.getClass().getName()+" was encountered"); 4375 return (CodeableConcept) this.location; 4376 } 4377 4378 public boolean hasLocationCodeableConcept() { 4379 return this != null && this.location instanceof CodeableConcept; 4380 } 4381 4382 /** 4383 * @return {@link #location} (Where the product or service was provided.) 4384 */ 4385 public Address getLocationAddress() throws FHIRException { 4386 if (this.location == null) 4387 this.location = new Address(); 4388 if (!(this.location instanceof Address)) 4389 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.location.getClass().getName()+" was encountered"); 4390 return (Address) this.location; 4391 } 4392 4393 public boolean hasLocationAddress() { 4394 return this != null && this.location instanceof Address; 4395 } 4396 4397 /** 4398 * @return {@link #location} (Where the product or service was provided.) 4399 */ 4400 public Reference getLocationReference() throws FHIRException { 4401 if (this.location == null) 4402 this.location = new Reference(); 4403 if (!(this.location instanceof Reference)) 4404 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.location.getClass().getName()+" was encountered"); 4405 return (Reference) this.location; 4406 } 4407 4408 public boolean hasLocationReference() { 4409 return this != null && this.location instanceof Reference; 4410 } 4411 4412 public boolean hasLocation() { 4413 return this.location != null && !this.location.isEmpty(); 4414 } 4415 4416 /** 4417 * @param value {@link #location} (Where the product or service was provided.) 4418 */ 4419 public ItemComponent setLocation(DataType value) { 4420 if (value != null && !(value instanceof CodeableConcept || value instanceof Address || value instanceof Reference)) 4421 throw new FHIRException("Not the right type for ExplanationOfBenefit.item.location[x]: "+value.fhirType()); 4422 this.location = value; 4423 return this; 4424 } 4425 4426 /** 4427 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 4428 */ 4429 public Money getPatientPaid() { 4430 if (this.patientPaid == null) 4431 if (Configuration.errorOnAutoCreate()) 4432 throw new Error("Attempt to auto-create ItemComponent.patientPaid"); 4433 else if (Configuration.doAutoCreate()) 4434 this.patientPaid = new Money(); // cc 4435 return this.patientPaid; 4436 } 4437 4438 public boolean hasPatientPaid() { 4439 return this.patientPaid != null && !this.patientPaid.isEmpty(); 4440 } 4441 4442 /** 4443 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 4444 */ 4445 public ItemComponent setPatientPaid(Money value) { 4446 this.patientPaid = value; 4447 return this; 4448 } 4449 4450 /** 4451 * @return {@link #quantity} (The number of repetitions of a service or product.) 4452 */ 4453 public Quantity getQuantity() { 4454 if (this.quantity == null) 4455 if (Configuration.errorOnAutoCreate()) 4456 throw new Error("Attempt to auto-create ItemComponent.quantity"); 4457 else if (Configuration.doAutoCreate()) 4458 this.quantity = new Quantity(); // cc 4459 return this.quantity; 4460 } 4461 4462 public boolean hasQuantity() { 4463 return this.quantity != null && !this.quantity.isEmpty(); 4464 } 4465 4466 /** 4467 * @param value {@link #quantity} (The number of repetitions of a service or product.) 4468 */ 4469 public ItemComponent setQuantity(Quantity value) { 4470 this.quantity = value; 4471 return this; 4472 } 4473 4474 /** 4475 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 4476 */ 4477 public Money getUnitPrice() { 4478 if (this.unitPrice == null) 4479 if (Configuration.errorOnAutoCreate()) 4480 throw new Error("Attempt to auto-create ItemComponent.unitPrice"); 4481 else if (Configuration.doAutoCreate()) 4482 this.unitPrice = new Money(); // cc 4483 return this.unitPrice; 4484 } 4485 4486 public boolean hasUnitPrice() { 4487 return this.unitPrice != null && !this.unitPrice.isEmpty(); 4488 } 4489 4490 /** 4491 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 4492 */ 4493 public ItemComponent setUnitPrice(Money value) { 4494 this.unitPrice = value; 4495 return this; 4496 } 4497 4498 /** 4499 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 4500 */ 4501 public DecimalType getFactorElement() { 4502 if (this.factor == null) 4503 if (Configuration.errorOnAutoCreate()) 4504 throw new Error("Attempt to auto-create ItemComponent.factor"); 4505 else if (Configuration.doAutoCreate()) 4506 this.factor = new DecimalType(); // bb 4507 return this.factor; 4508 } 4509 4510 public boolean hasFactorElement() { 4511 return this.factor != null && !this.factor.isEmpty(); 4512 } 4513 4514 public boolean hasFactor() { 4515 return this.factor != null && !this.factor.isEmpty(); 4516 } 4517 4518 /** 4519 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 4520 */ 4521 public ItemComponent setFactorElement(DecimalType value) { 4522 this.factor = value; 4523 return this; 4524 } 4525 4526 /** 4527 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4528 */ 4529 public BigDecimal getFactor() { 4530 return this.factor == null ? null : this.factor.getValue(); 4531 } 4532 4533 /** 4534 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4535 */ 4536 public ItemComponent setFactor(BigDecimal value) { 4537 if (value == null) 4538 this.factor = null; 4539 else { 4540 if (this.factor == null) 4541 this.factor = new DecimalType(); 4542 this.factor.setValue(value); 4543 } 4544 return this; 4545 } 4546 4547 /** 4548 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4549 */ 4550 public ItemComponent setFactor(long value) { 4551 this.factor = new DecimalType(); 4552 this.factor.setValue(value); 4553 return this; 4554 } 4555 4556 /** 4557 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4558 */ 4559 public ItemComponent setFactor(double value) { 4560 this.factor = new DecimalType(); 4561 this.factor.setValue(value); 4562 return this; 4563 } 4564 4565 /** 4566 * @return {@link #tax} (The total of taxes applicable for this product or service.) 4567 */ 4568 public Money getTax() { 4569 if (this.tax == null) 4570 if (Configuration.errorOnAutoCreate()) 4571 throw new Error("Attempt to auto-create ItemComponent.tax"); 4572 else if (Configuration.doAutoCreate()) 4573 this.tax = new Money(); // cc 4574 return this.tax; 4575 } 4576 4577 public boolean hasTax() { 4578 return this.tax != null && !this.tax.isEmpty(); 4579 } 4580 4581 /** 4582 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 4583 */ 4584 public ItemComponent setTax(Money value) { 4585 this.tax = value; 4586 return this; 4587 } 4588 4589 /** 4590 * @return {@link #net} (The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.) 4591 */ 4592 public Money getNet() { 4593 if (this.net == null) 4594 if (Configuration.errorOnAutoCreate()) 4595 throw new Error("Attempt to auto-create ItemComponent.net"); 4596 else if (Configuration.doAutoCreate()) 4597 this.net = new Money(); // cc 4598 return this.net; 4599 } 4600 4601 public boolean hasNet() { 4602 return this.net != null && !this.net.isEmpty(); 4603 } 4604 4605 /** 4606 * @param value {@link #net} (The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.) 4607 */ 4608 public ItemComponent setNet(Money value) { 4609 this.net = value; 4610 return this; 4611 } 4612 4613 /** 4614 * @return {@link #udi} (Unique Device Identifiers associated with this line item.) 4615 */ 4616 public List<Reference> getUdi() { 4617 if (this.udi == null) 4618 this.udi = new ArrayList<Reference>(); 4619 return this.udi; 4620 } 4621 4622 /** 4623 * @return Returns a reference to <code>this</code> for easy method chaining 4624 */ 4625 public ItemComponent setUdi(List<Reference> theUdi) { 4626 this.udi = theUdi; 4627 return this; 4628 } 4629 4630 public boolean hasUdi() { 4631 if (this.udi == null) 4632 return false; 4633 for (Reference item : this.udi) 4634 if (!item.isEmpty()) 4635 return true; 4636 return false; 4637 } 4638 4639 public Reference addUdi() { //3 4640 Reference t = new Reference(); 4641 if (this.udi == null) 4642 this.udi = new ArrayList<Reference>(); 4643 this.udi.add(t); 4644 return t; 4645 } 4646 4647 public ItemComponent addUdi(Reference t) { //3 4648 if (t == null) 4649 return this; 4650 if (this.udi == null) 4651 this.udi = new ArrayList<Reference>(); 4652 this.udi.add(t); 4653 return this; 4654 } 4655 4656 /** 4657 * @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3} 4658 */ 4659 public Reference getUdiFirstRep() { 4660 if (getUdi().isEmpty()) { 4661 addUdi(); 4662 } 4663 return getUdi().get(0); 4664 } 4665 4666 /** 4667 * @return {@link #bodySite} (Physical location where the service is performed or applies.) 4668 */ 4669 public List<ItemBodySiteComponent> getBodySite() { 4670 if (this.bodySite == null) 4671 this.bodySite = new ArrayList<ItemBodySiteComponent>(); 4672 return this.bodySite; 4673 } 4674 4675 /** 4676 * @return Returns a reference to <code>this</code> for easy method chaining 4677 */ 4678 public ItemComponent setBodySite(List<ItemBodySiteComponent> theBodySite) { 4679 this.bodySite = theBodySite; 4680 return this; 4681 } 4682 4683 public boolean hasBodySite() { 4684 if (this.bodySite == null) 4685 return false; 4686 for (ItemBodySiteComponent item : this.bodySite) 4687 if (!item.isEmpty()) 4688 return true; 4689 return false; 4690 } 4691 4692 public ItemBodySiteComponent addBodySite() { //3 4693 ItemBodySiteComponent t = new ItemBodySiteComponent(); 4694 if (this.bodySite == null) 4695 this.bodySite = new ArrayList<ItemBodySiteComponent>(); 4696 this.bodySite.add(t); 4697 return t; 4698 } 4699 4700 public ItemComponent addBodySite(ItemBodySiteComponent t) { //3 4701 if (t == null) 4702 return this; 4703 if (this.bodySite == null) 4704 this.bodySite = new ArrayList<ItemBodySiteComponent>(); 4705 this.bodySite.add(t); 4706 return this; 4707 } 4708 4709 /** 4710 * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist {3} 4711 */ 4712 public ItemBodySiteComponent getBodySiteFirstRep() { 4713 if (getBodySite().isEmpty()) { 4714 addBodySite(); 4715 } 4716 return getBodySite().get(0); 4717 } 4718 4719 /** 4720 * @return {@link #encounter} (Healthcare encounters related to this claim.) 4721 */ 4722 public List<Reference> getEncounter() { 4723 if (this.encounter == null) 4724 this.encounter = new ArrayList<Reference>(); 4725 return this.encounter; 4726 } 4727 4728 /** 4729 * @return Returns a reference to <code>this</code> for easy method chaining 4730 */ 4731 public ItemComponent setEncounter(List<Reference> theEncounter) { 4732 this.encounter = theEncounter; 4733 return this; 4734 } 4735 4736 public boolean hasEncounter() { 4737 if (this.encounter == null) 4738 return false; 4739 for (Reference item : this.encounter) 4740 if (!item.isEmpty()) 4741 return true; 4742 return false; 4743 } 4744 4745 public Reference addEncounter() { //3 4746 Reference t = new Reference(); 4747 if (this.encounter == null) 4748 this.encounter = new ArrayList<Reference>(); 4749 this.encounter.add(t); 4750 return t; 4751 } 4752 4753 public ItemComponent addEncounter(Reference t) { //3 4754 if (t == null) 4755 return this; 4756 if (this.encounter == null) 4757 this.encounter = new ArrayList<Reference>(); 4758 this.encounter.add(t); 4759 return this; 4760 } 4761 4762 /** 4763 * @return The first repetition of repeating field {@link #encounter}, creating it if it does not already exist {3} 4764 */ 4765 public Reference getEncounterFirstRep() { 4766 if (getEncounter().isEmpty()) { 4767 addEncounter(); 4768 } 4769 return getEncounter().get(0); 4770 } 4771 4772 /** 4773 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 4774 */ 4775 public List<PositiveIntType> getNoteNumber() { 4776 if (this.noteNumber == null) 4777 this.noteNumber = new ArrayList<PositiveIntType>(); 4778 return this.noteNumber; 4779 } 4780 4781 /** 4782 * @return Returns a reference to <code>this</code> for easy method chaining 4783 */ 4784 public ItemComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 4785 this.noteNumber = theNoteNumber; 4786 return this; 4787 } 4788 4789 public boolean hasNoteNumber() { 4790 if (this.noteNumber == null) 4791 return false; 4792 for (PositiveIntType item : this.noteNumber) 4793 if (!item.isEmpty()) 4794 return true; 4795 return false; 4796 } 4797 4798 /** 4799 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 4800 */ 4801 public PositiveIntType addNoteNumberElement() {//2 4802 PositiveIntType t = new PositiveIntType(); 4803 if (this.noteNumber == null) 4804 this.noteNumber = new ArrayList<PositiveIntType>(); 4805 this.noteNumber.add(t); 4806 return t; 4807 } 4808 4809 /** 4810 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 4811 */ 4812 public ItemComponent addNoteNumber(int value) { //1 4813 PositiveIntType t = new PositiveIntType(); 4814 t.setValue(value); 4815 if (this.noteNumber == null) 4816 this.noteNumber = new ArrayList<PositiveIntType>(); 4817 this.noteNumber.add(t); 4818 return this; 4819 } 4820 4821 /** 4822 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 4823 */ 4824 public boolean hasNoteNumber(int value) { 4825 if (this.noteNumber == null) 4826 return false; 4827 for (PositiveIntType v : this.noteNumber) 4828 if (v.getValue().equals(value)) // positiveInt 4829 return true; 4830 return false; 4831 } 4832 4833 /** 4834 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 4835 */ 4836 public ItemReviewOutcomeComponent getReviewOutcome() { 4837 if (this.reviewOutcome == null) 4838 if (Configuration.errorOnAutoCreate()) 4839 throw new Error("Attempt to auto-create ItemComponent.reviewOutcome"); 4840 else if (Configuration.doAutoCreate()) 4841 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 4842 return this.reviewOutcome; 4843 } 4844 4845 public boolean hasReviewOutcome() { 4846 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 4847 } 4848 4849 /** 4850 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 4851 */ 4852 public ItemComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 4853 this.reviewOutcome = value; 4854 return this; 4855 } 4856 4857 /** 4858 * @return {@link #adjudication} (If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.) 4859 */ 4860 public List<AdjudicationComponent> getAdjudication() { 4861 if (this.adjudication == null) 4862 this.adjudication = new ArrayList<AdjudicationComponent>(); 4863 return this.adjudication; 4864 } 4865 4866 /** 4867 * @return Returns a reference to <code>this</code> for easy method chaining 4868 */ 4869 public ItemComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 4870 this.adjudication = theAdjudication; 4871 return this; 4872 } 4873 4874 public boolean hasAdjudication() { 4875 if (this.adjudication == null) 4876 return false; 4877 for (AdjudicationComponent item : this.adjudication) 4878 if (!item.isEmpty()) 4879 return true; 4880 return false; 4881 } 4882 4883 public AdjudicationComponent addAdjudication() { //3 4884 AdjudicationComponent t = new AdjudicationComponent(); 4885 if (this.adjudication == null) 4886 this.adjudication = new ArrayList<AdjudicationComponent>(); 4887 this.adjudication.add(t); 4888 return t; 4889 } 4890 4891 public ItemComponent addAdjudication(AdjudicationComponent t) { //3 4892 if (t == null) 4893 return this; 4894 if (this.adjudication == null) 4895 this.adjudication = new ArrayList<AdjudicationComponent>(); 4896 this.adjudication.add(t); 4897 return this; 4898 } 4899 4900 /** 4901 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 4902 */ 4903 public AdjudicationComponent getAdjudicationFirstRep() { 4904 if (getAdjudication().isEmpty()) { 4905 addAdjudication(); 4906 } 4907 return getAdjudication().get(0); 4908 } 4909 4910 /** 4911 * @return {@link #detail} (Second-tier of goods and services.) 4912 */ 4913 public List<DetailComponent> getDetail() { 4914 if (this.detail == null) 4915 this.detail = new ArrayList<DetailComponent>(); 4916 return this.detail; 4917 } 4918 4919 /** 4920 * @return Returns a reference to <code>this</code> for easy method chaining 4921 */ 4922 public ItemComponent setDetail(List<DetailComponent> theDetail) { 4923 this.detail = theDetail; 4924 return this; 4925 } 4926 4927 public boolean hasDetail() { 4928 if (this.detail == null) 4929 return false; 4930 for (DetailComponent item : this.detail) 4931 if (!item.isEmpty()) 4932 return true; 4933 return false; 4934 } 4935 4936 public DetailComponent addDetail() { //3 4937 DetailComponent t = new DetailComponent(); 4938 if (this.detail == null) 4939 this.detail = new ArrayList<DetailComponent>(); 4940 this.detail.add(t); 4941 return t; 4942 } 4943 4944 public ItemComponent addDetail(DetailComponent t) { //3 4945 if (t == null) 4946 return this; 4947 if (this.detail == null) 4948 this.detail = new ArrayList<DetailComponent>(); 4949 this.detail.add(t); 4950 return this; 4951 } 4952 4953 /** 4954 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3} 4955 */ 4956 public DetailComponent getDetailFirstRep() { 4957 if (getDetail().isEmpty()) { 4958 addDetail(); 4959 } 4960 return getDetail().get(0); 4961 } 4962 4963 protected void listChildren(List<Property> children) { 4964 super.listChildren(children); 4965 children.add(new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence)); 4966 children.add(new Property("careTeamSequence", "positiveInt", "Care team members related to this service or product.", 0, java.lang.Integer.MAX_VALUE, careTeamSequence)); 4967 children.add(new Property("diagnosisSequence", "positiveInt", "Diagnoses applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, diagnosisSequence)); 4968 children.add(new Property("procedureSequence", "positiveInt", "Procedures applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, procedureSequence)); 4969 children.add(new Property("informationSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, informationSequence)); 4970 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 4971 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 4972 children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category)); 4973 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 4974 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 4975 children.add(new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request)); 4976 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 4977 children.add(new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode)); 4978 children.add(new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced)); 4979 children.add(new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location)); 4980 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 4981 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 4982 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 4983 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 4984 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 4985 children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.", 0, 1, net)); 4986 children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 4987 children.add(new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite)); 4988 children.add(new Property("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter)); 4989 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 4990 children.add(new Property("reviewOutcome", "", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 4991 children.add(new Property("adjudication", "", "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 4992 children.add(new Property("detail", "", "Second-tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); 4993 } 4994 4995 @Override 4996 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4997 switch (_hash) { 4998 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence); 4999 case 1070083823: /*careTeamSequence*/ return new Property("careTeamSequence", "positiveInt", "Care team members related to this service or product.", 0, java.lang.Integer.MAX_VALUE, careTeamSequence); 5000 case -909769262: /*diagnosisSequence*/ return new Property("diagnosisSequence", "positiveInt", "Diagnoses applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, diagnosisSequence); 5001 case -808920140: /*procedureSequence*/ return new Property("procedureSequence", "positiveInt", "Procedures applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, procedureSequence); 5002 case -702585587: /*informationSequence*/ return new Property("informationSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, informationSequence); 5003 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 5004 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 5005 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category); 5006 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 5007 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 5008 case 1095692943: /*request*/ return new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request); 5009 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 5010 case 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode); 5011 case -1927922223: /*serviced[x]*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 5012 case 1379209295: /*serviced*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 5013 case 363246749: /*servicedDate*/ return new Property("serviced[x]", "date", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 5014 case 1534966512: /*servicedPeriod*/ return new Property("serviced[x]", "Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 5015 case 552316075: /*location[x]*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location); 5016 case 1901043637: /*location*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location); 5017 case -1224800468: /*locationCodeableConcept*/ return new Property("location[x]", "CodeableConcept", "Where the product or service was provided.", 0, 1, location); 5018 case -1280020865: /*locationAddress*/ return new Property("location[x]", "Address", "Where the product or service was provided.", 0, 1, location); 5019 case 755866390: /*locationReference*/ return new Property("location[x]", "Reference(Location)", "Where the product or service was provided.", 0, 1, location); 5020 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 5021 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 5022 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 5023 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 5024 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 5025 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.", 0, 1, net); 5026 case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi); 5027 case 1702620169: /*bodySite*/ return new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite); 5028 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter); 5029 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 5030 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 5031 case -231349275: /*adjudication*/ return new Property("adjudication", "", "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, adjudication); 5032 case -1335224239: /*detail*/ return new Property("detail", "", "Second-tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail); 5033 default: return super.getNamedProperty(_hash, _name, _checkValid); 5034 } 5035 5036 } 5037 5038 @Override 5039 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5040 switch (hash) { 5041 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 5042 case 1070083823: /*careTeamSequence*/ return this.careTeamSequence == null ? new Base[0] : this.careTeamSequence.toArray(new Base[this.careTeamSequence.size()]); // PositiveIntType 5043 case -909769262: /*diagnosisSequence*/ return this.diagnosisSequence == null ? new Base[0] : this.diagnosisSequence.toArray(new Base[this.diagnosisSequence.size()]); // PositiveIntType 5044 case -808920140: /*procedureSequence*/ return this.procedureSequence == null ? new Base[0] : this.procedureSequence.toArray(new Base[this.procedureSequence.size()]); // PositiveIntType 5045 case -702585587: /*informationSequence*/ return this.informationSequence == null ? new Base[0] : this.informationSequence.toArray(new Base[this.informationSequence.size()]); // PositiveIntType 5046 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 5047 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 5048 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 5049 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 5050 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 5051 case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference 5052 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 5053 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept 5054 case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType 5055 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // DataType 5056 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 5057 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 5058 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 5059 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 5060 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 5061 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 5062 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 5063 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // ItemBodySiteComponent 5064 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : this.encounter.toArray(new Base[this.encounter.size()]); // Reference 5065 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 5066 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 5067 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 5068 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailComponent 5069 default: return super.getProperty(hash, name, checkValid); 5070 } 5071 5072 } 5073 5074 @Override 5075 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5076 switch (hash) { 5077 case 1349547969: // sequence 5078 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 5079 return value; 5080 case 1070083823: // careTeamSequence 5081 this.getCareTeamSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 5082 return value; 5083 case -909769262: // diagnosisSequence 5084 this.getDiagnosisSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 5085 return value; 5086 case -808920140: // procedureSequence 5087 this.getProcedureSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 5088 return value; 5089 case -702585587: // informationSequence 5090 this.getInformationSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 5091 return value; 5092 case 82505966: // traceNumber 5093 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 5094 return value; 5095 case 1099842588: // revenue 5096 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5097 return value; 5098 case 50511102: // category 5099 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5100 return value; 5101 case 1957227299: // productOrService 5102 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5103 return value; 5104 case -717476168: // productOrServiceEnd 5105 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5106 return value; 5107 case 1095692943: // request 5108 this.getRequest().add(TypeConvertor.castToReference(value)); // Reference 5109 return value; 5110 case -615513385: // modifier 5111 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 5112 return value; 5113 case 1010065041: // programCode 5114 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 5115 return value; 5116 case 1379209295: // serviced 5117 this.serviced = TypeConvertor.castToType(value); // DataType 5118 return value; 5119 case 1901043637: // location 5120 this.location = TypeConvertor.castToType(value); // DataType 5121 return value; 5122 case 525514609: // patientPaid 5123 this.patientPaid = TypeConvertor.castToMoney(value); // Money 5124 return value; 5125 case -1285004149: // quantity 5126 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 5127 return value; 5128 case -486196699: // unitPrice 5129 this.unitPrice = TypeConvertor.castToMoney(value); // Money 5130 return value; 5131 case -1282148017: // factor 5132 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 5133 return value; 5134 case 114603: // tax 5135 this.tax = TypeConvertor.castToMoney(value); // Money 5136 return value; 5137 case 108957: // net 5138 this.net = TypeConvertor.castToMoney(value); // Money 5139 return value; 5140 case 115642: // udi 5141 this.getUdi().add(TypeConvertor.castToReference(value)); // Reference 5142 return value; 5143 case 1702620169: // bodySite 5144 this.getBodySite().add((ItemBodySiteComponent) value); // ItemBodySiteComponent 5145 return value; 5146 case 1524132147: // encounter 5147 this.getEncounter().add(TypeConvertor.castToReference(value)); // Reference 5148 return value; 5149 case -1110033957: // noteNumber 5150 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 5151 return value; 5152 case -51825446: // reviewOutcome 5153 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 5154 return value; 5155 case -231349275: // adjudication 5156 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 5157 return value; 5158 case -1335224239: // detail 5159 this.getDetail().add((DetailComponent) value); // DetailComponent 5160 return value; 5161 default: return super.setProperty(hash, name, value); 5162 } 5163 5164 } 5165 5166 @Override 5167 public Base setProperty(String name, Base value) throws FHIRException { 5168 if (name.equals("sequence")) { 5169 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 5170 } else if (name.equals("careTeamSequence")) { 5171 this.getCareTeamSequence().add(TypeConvertor.castToPositiveInt(value)); 5172 } else if (name.equals("diagnosisSequence")) { 5173 this.getDiagnosisSequence().add(TypeConvertor.castToPositiveInt(value)); 5174 } else if (name.equals("procedureSequence")) { 5175 this.getProcedureSequence().add(TypeConvertor.castToPositiveInt(value)); 5176 } else if (name.equals("informationSequence")) { 5177 this.getInformationSequence().add(TypeConvertor.castToPositiveInt(value)); 5178 } else if (name.equals("traceNumber")) { 5179 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 5180 } else if (name.equals("revenue")) { 5181 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5182 } else if (name.equals("category")) { 5183 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5184 } else if (name.equals("productOrService")) { 5185 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5186 } else if (name.equals("productOrServiceEnd")) { 5187 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 5188 } else if (name.equals("request")) { 5189 this.getRequest().add(TypeConvertor.castToReference(value)); 5190 } else if (name.equals("modifier")) { 5191 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 5192 } else if (name.equals("programCode")) { 5193 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); 5194 } else if (name.equals("serviced[x]")) { 5195 this.serviced = TypeConvertor.castToType(value); // DataType 5196 } else if (name.equals("location[x]")) { 5197 this.location = TypeConvertor.castToType(value); // DataType 5198 } else if (name.equals("patientPaid")) { 5199 this.patientPaid = TypeConvertor.castToMoney(value); // Money 5200 } else if (name.equals("quantity")) { 5201 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 5202 } else if (name.equals("unitPrice")) { 5203 this.unitPrice = TypeConvertor.castToMoney(value); // Money 5204 } else if (name.equals("factor")) { 5205 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 5206 } else if (name.equals("tax")) { 5207 this.tax = TypeConvertor.castToMoney(value); // Money 5208 } else if (name.equals("net")) { 5209 this.net = TypeConvertor.castToMoney(value); // Money 5210 } else if (name.equals("udi")) { 5211 this.getUdi().add(TypeConvertor.castToReference(value)); 5212 } else if (name.equals("bodySite")) { 5213 this.getBodySite().add((ItemBodySiteComponent) value); 5214 } else if (name.equals("encounter")) { 5215 this.getEncounter().add(TypeConvertor.castToReference(value)); 5216 } else if (name.equals("noteNumber")) { 5217 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 5218 } else if (name.equals("reviewOutcome")) { 5219 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 5220 } else if (name.equals("adjudication")) { 5221 this.getAdjudication().add((AdjudicationComponent) value); 5222 } else if (name.equals("detail")) { 5223 this.getDetail().add((DetailComponent) value); 5224 } else 5225 return super.setProperty(name, value); 5226 return value; 5227 } 5228 5229 @Override 5230 public void removeChild(String name, Base value) throws FHIRException { 5231 if (name.equals("sequence")) { 5232 this.sequence = null; 5233 } else if (name.equals("careTeamSequence")) { 5234 this.getCareTeamSequence().remove(value); 5235 } else if (name.equals("diagnosisSequence")) { 5236 this.getDiagnosisSequence().remove(value); 5237 } else if (name.equals("procedureSequence")) { 5238 this.getProcedureSequence().remove(value); 5239 } else if (name.equals("informationSequence")) { 5240 this.getInformationSequence().remove(value); 5241 } else if (name.equals("traceNumber")) { 5242 this.getTraceNumber().remove(value); 5243 } else if (name.equals("revenue")) { 5244 this.revenue = null; 5245 } else if (name.equals("category")) { 5246 this.category = null; 5247 } else if (name.equals("productOrService")) { 5248 this.productOrService = null; 5249 } else if (name.equals("productOrServiceEnd")) { 5250 this.productOrServiceEnd = null; 5251 } else if (name.equals("request")) { 5252 this.getRequest().remove(value); 5253 } else if (name.equals("modifier")) { 5254 this.getModifier().remove(value); 5255 } else if (name.equals("programCode")) { 5256 this.getProgramCode().remove(value); 5257 } else if (name.equals("serviced[x]")) { 5258 this.serviced = null; 5259 } else if (name.equals("location[x]")) { 5260 this.location = null; 5261 } else if (name.equals("patientPaid")) { 5262 this.patientPaid = null; 5263 } else if (name.equals("quantity")) { 5264 this.quantity = null; 5265 } else if (name.equals("unitPrice")) { 5266 this.unitPrice = null; 5267 } else if (name.equals("factor")) { 5268 this.factor = null; 5269 } else if (name.equals("tax")) { 5270 this.tax = null; 5271 } else if (name.equals("net")) { 5272 this.net = null; 5273 } else if (name.equals("udi")) { 5274 this.getUdi().remove(value); 5275 } else if (name.equals("bodySite")) { 5276 this.getBodySite().remove((ItemBodySiteComponent) value); 5277 } else if (name.equals("encounter")) { 5278 this.getEncounter().remove(value); 5279 } else if (name.equals("noteNumber")) { 5280 this.getNoteNumber().remove(value); 5281 } else if (name.equals("reviewOutcome")) { 5282 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 5283 } else if (name.equals("adjudication")) { 5284 this.getAdjudication().remove((AdjudicationComponent) value); 5285 } else if (name.equals("detail")) { 5286 this.getDetail().remove((DetailComponent) value); 5287 } else 5288 super.removeChild(name, value); 5289 5290 } 5291 5292 @Override 5293 public Base makeProperty(int hash, String name) throws FHIRException { 5294 switch (hash) { 5295 case 1349547969: return getSequenceElement(); 5296 case 1070083823: return addCareTeamSequenceElement(); 5297 case -909769262: return addDiagnosisSequenceElement(); 5298 case -808920140: return addProcedureSequenceElement(); 5299 case -702585587: return addInformationSequenceElement(); 5300 case 82505966: return addTraceNumber(); 5301 case 1099842588: return getRevenue(); 5302 case 50511102: return getCategory(); 5303 case 1957227299: return getProductOrService(); 5304 case -717476168: return getProductOrServiceEnd(); 5305 case 1095692943: return addRequest(); 5306 case -615513385: return addModifier(); 5307 case 1010065041: return addProgramCode(); 5308 case -1927922223: return getServiced(); 5309 case 1379209295: return getServiced(); 5310 case 552316075: return getLocation(); 5311 case 1901043637: return getLocation(); 5312 case 525514609: return getPatientPaid(); 5313 case -1285004149: return getQuantity(); 5314 case -486196699: return getUnitPrice(); 5315 case -1282148017: return getFactorElement(); 5316 case 114603: return getTax(); 5317 case 108957: return getNet(); 5318 case 115642: return addUdi(); 5319 case 1702620169: return addBodySite(); 5320 case 1524132147: return addEncounter(); 5321 case -1110033957: return addNoteNumberElement(); 5322 case -51825446: return getReviewOutcome(); 5323 case -231349275: return addAdjudication(); 5324 case -1335224239: return addDetail(); 5325 default: return super.makeProperty(hash, name); 5326 } 5327 5328 } 5329 5330 @Override 5331 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5332 switch (hash) { 5333 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 5334 case 1070083823: /*careTeamSequence*/ return new String[] {"positiveInt"}; 5335 case -909769262: /*diagnosisSequence*/ return new String[] {"positiveInt"}; 5336 case -808920140: /*procedureSequence*/ return new String[] {"positiveInt"}; 5337 case -702585587: /*informationSequence*/ return new String[] {"positiveInt"}; 5338 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 5339 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 5340 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 5341 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 5342 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 5343 case 1095692943: /*request*/ return new String[] {"Reference"}; 5344 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 5345 case 1010065041: /*programCode*/ return new String[] {"CodeableConcept"}; 5346 case 1379209295: /*serviced*/ return new String[] {"date", "Period"}; 5347 case 1901043637: /*location*/ return new String[] {"CodeableConcept", "Address", "Reference"}; 5348 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 5349 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 5350 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 5351 case -1282148017: /*factor*/ return new String[] {"decimal"}; 5352 case 114603: /*tax*/ return new String[] {"Money"}; 5353 case 108957: /*net*/ return new String[] {"Money"}; 5354 case 115642: /*udi*/ return new String[] {"Reference"}; 5355 case 1702620169: /*bodySite*/ return new String[] {}; 5356 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 5357 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 5358 case -51825446: /*reviewOutcome*/ return new String[] {}; 5359 case -231349275: /*adjudication*/ return new String[] {}; 5360 case -1335224239: /*detail*/ return new String[] {}; 5361 default: return super.getTypesForProperty(hash, name); 5362 } 5363 5364 } 5365 5366 @Override 5367 public Base addChild(String name) throws FHIRException { 5368 if (name.equals("sequence")) { 5369 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.sequence"); 5370 } 5371 else if (name.equals("careTeamSequence")) { 5372 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.careTeamSequence"); 5373 } 5374 else if (name.equals("diagnosisSequence")) { 5375 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.diagnosisSequence"); 5376 } 5377 else if (name.equals("procedureSequence")) { 5378 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.procedureSequence"); 5379 } 5380 else if (name.equals("informationSequence")) { 5381 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.informationSequence"); 5382 } 5383 else if (name.equals("traceNumber")) { 5384 return addTraceNumber(); 5385 } 5386 else if (name.equals("revenue")) { 5387 this.revenue = new CodeableConcept(); 5388 return this.revenue; 5389 } 5390 else if (name.equals("category")) { 5391 this.category = new CodeableConcept(); 5392 return this.category; 5393 } 5394 else if (name.equals("productOrService")) { 5395 this.productOrService = new CodeableConcept(); 5396 return this.productOrService; 5397 } 5398 else if (name.equals("productOrServiceEnd")) { 5399 this.productOrServiceEnd = new CodeableConcept(); 5400 return this.productOrServiceEnd; 5401 } 5402 else if (name.equals("request")) { 5403 return addRequest(); 5404 } 5405 else if (name.equals("modifier")) { 5406 return addModifier(); 5407 } 5408 else if (name.equals("programCode")) { 5409 return addProgramCode(); 5410 } 5411 else if (name.equals("servicedDate")) { 5412 this.serviced = new DateType(); 5413 return this.serviced; 5414 } 5415 else if (name.equals("servicedPeriod")) { 5416 this.serviced = new Period(); 5417 return this.serviced; 5418 } 5419 else if (name.equals("locationCodeableConcept")) { 5420 this.location = new CodeableConcept(); 5421 return this.location; 5422 } 5423 else if (name.equals("locationAddress")) { 5424 this.location = new Address(); 5425 return this.location; 5426 } 5427 else if (name.equals("locationReference")) { 5428 this.location = new Reference(); 5429 return this.location; 5430 } 5431 else if (name.equals("patientPaid")) { 5432 this.patientPaid = new Money(); 5433 return this.patientPaid; 5434 } 5435 else if (name.equals("quantity")) { 5436 this.quantity = new Quantity(); 5437 return this.quantity; 5438 } 5439 else if (name.equals("unitPrice")) { 5440 this.unitPrice = new Money(); 5441 return this.unitPrice; 5442 } 5443 else if (name.equals("factor")) { 5444 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.factor"); 5445 } 5446 else if (name.equals("tax")) { 5447 this.tax = new Money(); 5448 return this.tax; 5449 } 5450 else if (name.equals("net")) { 5451 this.net = new Money(); 5452 return this.net; 5453 } 5454 else if (name.equals("udi")) { 5455 return addUdi(); 5456 } 5457 else if (name.equals("bodySite")) { 5458 return addBodySite(); 5459 } 5460 else if (name.equals("encounter")) { 5461 return addEncounter(); 5462 } 5463 else if (name.equals("noteNumber")) { 5464 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.noteNumber"); 5465 } 5466 else if (name.equals("reviewOutcome")) { 5467 this.reviewOutcome = new ItemReviewOutcomeComponent(); 5468 return this.reviewOutcome; 5469 } 5470 else if (name.equals("adjudication")) { 5471 return addAdjudication(); 5472 } 5473 else if (name.equals("detail")) { 5474 return addDetail(); 5475 } 5476 else 5477 return super.addChild(name); 5478 } 5479 5480 public ItemComponent copy() { 5481 ItemComponent dst = new ItemComponent(); 5482 copyValues(dst); 5483 return dst; 5484 } 5485 5486 public void copyValues(ItemComponent dst) { 5487 super.copyValues(dst); 5488 dst.sequence = sequence == null ? null : sequence.copy(); 5489 if (careTeamSequence != null) { 5490 dst.careTeamSequence = new ArrayList<PositiveIntType>(); 5491 for (PositiveIntType i : careTeamSequence) 5492 dst.careTeamSequence.add(i.copy()); 5493 }; 5494 if (diagnosisSequence != null) { 5495 dst.diagnosisSequence = new ArrayList<PositiveIntType>(); 5496 for (PositiveIntType i : diagnosisSequence) 5497 dst.diagnosisSequence.add(i.copy()); 5498 }; 5499 if (procedureSequence != null) { 5500 dst.procedureSequence = new ArrayList<PositiveIntType>(); 5501 for (PositiveIntType i : procedureSequence) 5502 dst.procedureSequence.add(i.copy()); 5503 }; 5504 if (informationSequence != null) { 5505 dst.informationSequence = new ArrayList<PositiveIntType>(); 5506 for (PositiveIntType i : informationSequence) 5507 dst.informationSequence.add(i.copy()); 5508 }; 5509 if (traceNumber != null) { 5510 dst.traceNumber = new ArrayList<Identifier>(); 5511 for (Identifier i : traceNumber) 5512 dst.traceNumber.add(i.copy()); 5513 }; 5514 dst.revenue = revenue == null ? null : revenue.copy(); 5515 dst.category = category == null ? null : category.copy(); 5516 dst.productOrService = productOrService == null ? null : productOrService.copy(); 5517 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 5518 if (request != null) { 5519 dst.request = new ArrayList<Reference>(); 5520 for (Reference i : request) 5521 dst.request.add(i.copy()); 5522 }; 5523 if (modifier != null) { 5524 dst.modifier = new ArrayList<CodeableConcept>(); 5525 for (CodeableConcept i : modifier) 5526 dst.modifier.add(i.copy()); 5527 }; 5528 if (programCode != null) { 5529 dst.programCode = new ArrayList<CodeableConcept>(); 5530 for (CodeableConcept i : programCode) 5531 dst.programCode.add(i.copy()); 5532 }; 5533 dst.serviced = serviced == null ? null : serviced.copy(); 5534 dst.location = location == null ? null : location.copy(); 5535 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 5536 dst.quantity = quantity == null ? null : quantity.copy(); 5537 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 5538 dst.factor = factor == null ? null : factor.copy(); 5539 dst.tax = tax == null ? null : tax.copy(); 5540 dst.net = net == null ? null : net.copy(); 5541 if (udi != null) { 5542 dst.udi = new ArrayList<Reference>(); 5543 for (Reference i : udi) 5544 dst.udi.add(i.copy()); 5545 }; 5546 if (bodySite != null) { 5547 dst.bodySite = new ArrayList<ItemBodySiteComponent>(); 5548 for (ItemBodySiteComponent i : bodySite) 5549 dst.bodySite.add(i.copy()); 5550 }; 5551 if (encounter != null) { 5552 dst.encounter = new ArrayList<Reference>(); 5553 for (Reference i : encounter) 5554 dst.encounter.add(i.copy()); 5555 }; 5556 if (noteNumber != null) { 5557 dst.noteNumber = new ArrayList<PositiveIntType>(); 5558 for (PositiveIntType i : noteNumber) 5559 dst.noteNumber.add(i.copy()); 5560 }; 5561 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 5562 if (adjudication != null) { 5563 dst.adjudication = new ArrayList<AdjudicationComponent>(); 5564 for (AdjudicationComponent i : adjudication) 5565 dst.adjudication.add(i.copy()); 5566 }; 5567 if (detail != null) { 5568 dst.detail = new ArrayList<DetailComponent>(); 5569 for (DetailComponent i : detail) 5570 dst.detail.add(i.copy()); 5571 }; 5572 } 5573 5574 @Override 5575 public boolean equalsDeep(Base other_) { 5576 if (!super.equalsDeep(other_)) 5577 return false; 5578 if (!(other_ instanceof ItemComponent)) 5579 return false; 5580 ItemComponent o = (ItemComponent) other_; 5581 return compareDeep(sequence, o.sequence, true) && compareDeep(careTeamSequence, o.careTeamSequence, true) 5582 && compareDeep(diagnosisSequence, o.diagnosisSequence, true) && compareDeep(procedureSequence, o.procedureSequence, true) 5583 && compareDeep(informationSequence, o.informationSequence, true) && compareDeep(traceNumber, o.traceNumber, true) 5584 && compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true) 5585 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(request, o.request, true) 5586 && compareDeep(modifier, o.modifier, true) && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true) 5587 && compareDeep(location, o.location, true) && compareDeep(patientPaid, o.patientPaid, true) && compareDeep(quantity, o.quantity, true) 5588 && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) && compareDeep(tax, o.tax, true) 5589 && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) 5590 && compareDeep(encounter, o.encounter, true) && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true) 5591 && compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true); 5592 } 5593 5594 @Override 5595 public boolean equalsShallow(Base other_) { 5596 if (!super.equalsShallow(other_)) 5597 return false; 5598 if (!(other_ instanceof ItemComponent)) 5599 return false; 5600 ItemComponent o = (ItemComponent) other_; 5601 return compareValues(sequence, o.sequence, true) && compareValues(careTeamSequence, o.careTeamSequence, true) 5602 && compareValues(diagnosisSequence, o.diagnosisSequence, true) && compareValues(procedureSequence, o.procedureSequence, true) 5603 && compareValues(informationSequence, o.informationSequence, true) && compareValues(factor, o.factor, true) 5604 && compareValues(noteNumber, o.noteNumber, true); 5605 } 5606 5607 public boolean isEmpty() { 5608 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, careTeamSequence 5609 , diagnosisSequence, procedureSequence, informationSequence, traceNumber, revenue 5610 , category, productOrService, productOrServiceEnd, request, modifier, programCode 5611 , serviced, location, patientPaid, quantity, unitPrice, factor, tax, net, udi 5612 , bodySite, encounter, noteNumber, reviewOutcome, adjudication, detail); 5613 } 5614 5615 public String fhirType() { 5616 return "ExplanationOfBenefit.item"; 5617 5618 } 5619 5620 } 5621 5622 @Block() 5623 public static class ItemBodySiteComponent extends BackboneElement implements IBaseBackboneElement { 5624 /** 5625 * Physical service site on the patient (limb, tooth, etc.). 5626 */ 5627 @Child(name = "site", type = {CodeableReference.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5628 @Description(shortDefinition="Location", formalDefinition="Physical service site on the patient (limb, tooth, etc.)." ) 5629 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/tooth") 5630 protected List<CodeableReference> site; 5631 5632 /** 5633 * A region or surface of the bodySite, e.g. limb region or tooth surface(s). 5634 */ 5635 @Child(name = "subSite", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5636 @Description(shortDefinition="Sub-location", formalDefinition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." ) 5637 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/surface") 5638 protected List<CodeableConcept> subSite; 5639 5640 private static final long serialVersionUID = 1190632415L; 5641 5642 /** 5643 * Constructor 5644 */ 5645 public ItemBodySiteComponent() { 5646 super(); 5647 } 5648 5649 /** 5650 * Constructor 5651 */ 5652 public ItemBodySiteComponent(CodeableReference site) { 5653 super(); 5654 this.addSite(site); 5655 } 5656 5657 /** 5658 * @return {@link #site} (Physical service site on the patient (limb, tooth, etc.).) 5659 */ 5660 public List<CodeableReference> getSite() { 5661 if (this.site == null) 5662 this.site = new ArrayList<CodeableReference>(); 5663 return this.site; 5664 } 5665 5666 /** 5667 * @return Returns a reference to <code>this</code> for easy method chaining 5668 */ 5669 public ItemBodySiteComponent setSite(List<CodeableReference> theSite) { 5670 this.site = theSite; 5671 return this; 5672 } 5673 5674 public boolean hasSite() { 5675 if (this.site == null) 5676 return false; 5677 for (CodeableReference item : this.site) 5678 if (!item.isEmpty()) 5679 return true; 5680 return false; 5681 } 5682 5683 public CodeableReference addSite() { //3 5684 CodeableReference t = new CodeableReference(); 5685 if (this.site == null) 5686 this.site = new ArrayList<CodeableReference>(); 5687 this.site.add(t); 5688 return t; 5689 } 5690 5691 public ItemBodySiteComponent addSite(CodeableReference t) { //3 5692 if (t == null) 5693 return this; 5694 if (this.site == null) 5695 this.site = new ArrayList<CodeableReference>(); 5696 this.site.add(t); 5697 return this; 5698 } 5699 5700 /** 5701 * @return The first repetition of repeating field {@link #site}, creating it if it does not already exist {3} 5702 */ 5703 public CodeableReference getSiteFirstRep() { 5704 if (getSite().isEmpty()) { 5705 addSite(); 5706 } 5707 return getSite().get(0); 5708 } 5709 5710 /** 5711 * @return {@link #subSite} (A region or surface of the bodySite, e.g. limb region or tooth surface(s).) 5712 */ 5713 public List<CodeableConcept> getSubSite() { 5714 if (this.subSite == null) 5715 this.subSite = new ArrayList<CodeableConcept>(); 5716 return this.subSite; 5717 } 5718 5719 /** 5720 * @return Returns a reference to <code>this</code> for easy method chaining 5721 */ 5722 public ItemBodySiteComponent setSubSite(List<CodeableConcept> theSubSite) { 5723 this.subSite = theSubSite; 5724 return this; 5725 } 5726 5727 public boolean hasSubSite() { 5728 if (this.subSite == null) 5729 return false; 5730 for (CodeableConcept item : this.subSite) 5731 if (!item.isEmpty()) 5732 return true; 5733 return false; 5734 } 5735 5736 public CodeableConcept addSubSite() { //3 5737 CodeableConcept t = new CodeableConcept(); 5738 if (this.subSite == null) 5739 this.subSite = new ArrayList<CodeableConcept>(); 5740 this.subSite.add(t); 5741 return t; 5742 } 5743 5744 public ItemBodySiteComponent addSubSite(CodeableConcept t) { //3 5745 if (t == null) 5746 return this; 5747 if (this.subSite == null) 5748 this.subSite = new ArrayList<CodeableConcept>(); 5749 this.subSite.add(t); 5750 return this; 5751 } 5752 5753 /** 5754 * @return The first repetition of repeating field {@link #subSite}, creating it if it does not already exist {3} 5755 */ 5756 public CodeableConcept getSubSiteFirstRep() { 5757 if (getSubSite().isEmpty()) { 5758 addSubSite(); 5759 } 5760 return getSubSite().get(0); 5761 } 5762 5763 protected void listChildren(List<Property> children) { 5764 super.listChildren(children); 5765 children.add(new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site)); 5766 children.add(new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); 5767 } 5768 5769 @Override 5770 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5771 switch (_hash) { 5772 case 3530567: /*site*/ return new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site); 5773 case -1868566105: /*subSite*/ return new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite); 5774 default: return super.getNamedProperty(_hash, _name, _checkValid); 5775 } 5776 5777 } 5778 5779 @Override 5780 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5781 switch (hash) { 5782 case 3530567: /*site*/ return this.site == null ? new Base[0] : this.site.toArray(new Base[this.site.size()]); // CodeableReference 5783 case -1868566105: /*subSite*/ return this.subSite == null ? new Base[0] : this.subSite.toArray(new Base[this.subSite.size()]); // CodeableConcept 5784 default: return super.getProperty(hash, name, checkValid); 5785 } 5786 5787 } 5788 5789 @Override 5790 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5791 switch (hash) { 5792 case 3530567: // site 5793 this.getSite().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 5794 return value; 5795 case -1868566105: // subSite 5796 this.getSubSite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 5797 return value; 5798 default: return super.setProperty(hash, name, value); 5799 } 5800 5801 } 5802 5803 @Override 5804 public Base setProperty(String name, Base value) throws FHIRException { 5805 if (name.equals("site")) { 5806 this.getSite().add(TypeConvertor.castToCodeableReference(value)); 5807 } else if (name.equals("subSite")) { 5808 this.getSubSite().add(TypeConvertor.castToCodeableConcept(value)); 5809 } else 5810 return super.setProperty(name, value); 5811 return value; 5812 } 5813 5814 @Override 5815 public void removeChild(String name, Base value) throws FHIRException { 5816 if (name.equals("site")) { 5817 this.getSite().remove(value); 5818 } else if (name.equals("subSite")) { 5819 this.getSubSite().remove(value); 5820 } else 5821 super.removeChild(name, value); 5822 5823 } 5824 5825 @Override 5826 public Base makeProperty(int hash, String name) throws FHIRException { 5827 switch (hash) { 5828 case 3530567: return addSite(); 5829 case -1868566105: return addSubSite(); 5830 default: return super.makeProperty(hash, name); 5831 } 5832 5833 } 5834 5835 @Override 5836 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5837 switch (hash) { 5838 case 3530567: /*site*/ return new String[] {"CodeableReference"}; 5839 case -1868566105: /*subSite*/ return new String[] {"CodeableConcept"}; 5840 default: return super.getTypesForProperty(hash, name); 5841 } 5842 5843 } 5844 5845 @Override 5846 public Base addChild(String name) throws FHIRException { 5847 if (name.equals("site")) { 5848 return addSite(); 5849 } 5850 else if (name.equals("subSite")) { 5851 return addSubSite(); 5852 } 5853 else 5854 return super.addChild(name); 5855 } 5856 5857 public ItemBodySiteComponent copy() { 5858 ItemBodySiteComponent dst = new ItemBodySiteComponent(); 5859 copyValues(dst); 5860 return dst; 5861 } 5862 5863 public void copyValues(ItemBodySiteComponent dst) { 5864 super.copyValues(dst); 5865 if (site != null) { 5866 dst.site = new ArrayList<CodeableReference>(); 5867 for (CodeableReference i : site) 5868 dst.site.add(i.copy()); 5869 }; 5870 if (subSite != null) { 5871 dst.subSite = new ArrayList<CodeableConcept>(); 5872 for (CodeableConcept i : subSite) 5873 dst.subSite.add(i.copy()); 5874 }; 5875 } 5876 5877 @Override 5878 public boolean equalsDeep(Base other_) { 5879 if (!super.equalsDeep(other_)) 5880 return false; 5881 if (!(other_ instanceof ItemBodySiteComponent)) 5882 return false; 5883 ItemBodySiteComponent o = (ItemBodySiteComponent) other_; 5884 return compareDeep(site, o.site, true) && compareDeep(subSite, o.subSite, true); 5885 } 5886 5887 @Override 5888 public boolean equalsShallow(Base other_) { 5889 if (!super.equalsShallow(other_)) 5890 return false; 5891 if (!(other_ instanceof ItemBodySiteComponent)) 5892 return false; 5893 ItemBodySiteComponent o = (ItemBodySiteComponent) other_; 5894 return true; 5895 } 5896 5897 public boolean isEmpty() { 5898 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, subSite); 5899 } 5900 5901 public String fhirType() { 5902 return "ExplanationOfBenefit.item.bodySite"; 5903 5904 } 5905 5906 } 5907 5908 @Block() 5909 public static class ItemReviewOutcomeComponent extends BackboneElement implements IBaseBackboneElement { 5910 /** 5911 * The result of the claim, predetermination, or preauthorization adjudication. 5912 */ 5913 @Child(name = "decision", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 5914 @Description(shortDefinition="Result of the adjudication", formalDefinition="The result of the claim, predetermination, or preauthorization adjudication." ) 5915 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-decision") 5916 protected CodeableConcept decision; 5917 5918 /** 5919 * The reasons for the result of the claim, predetermination, or preauthorization adjudication. 5920 */ 5921 @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5922 @Description(shortDefinition="Reason for result of the adjudication", formalDefinition="The reasons for the result of the claim, predetermination, or preauthorization adjudication." ) 5923 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-decision-reason") 5924 protected List<CodeableConcept> reason; 5925 5926 /** 5927 * Reference from the Insurer which is used in later communications which refers to this adjudication. 5928 */ 5929 @Child(name = "preAuthRef", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5930 @Description(shortDefinition="Preauthorization reference", formalDefinition="Reference from the Insurer which is used in later communications which refers to this adjudication." ) 5931 protected StringType preAuthRef; 5932 5933 /** 5934 * The time frame during which this authorization is effective. 5935 */ 5936 @Child(name = "preAuthPeriod", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 5937 @Description(shortDefinition="Preauthorization reference effective period", formalDefinition="The time frame during which this authorization is effective." ) 5938 protected Period preAuthPeriod; 5939 5940 private static final long serialVersionUID = 2126097594L; 5941 5942 /** 5943 * Constructor 5944 */ 5945 public ItemReviewOutcomeComponent() { 5946 super(); 5947 } 5948 5949 /** 5950 * @return {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.) 5951 */ 5952 public CodeableConcept getDecision() { 5953 if (this.decision == null) 5954 if (Configuration.errorOnAutoCreate()) 5955 throw new Error("Attempt to auto-create ItemReviewOutcomeComponent.decision"); 5956 else if (Configuration.doAutoCreate()) 5957 this.decision = new CodeableConcept(); // cc 5958 return this.decision; 5959 } 5960 5961 public boolean hasDecision() { 5962 return this.decision != null && !this.decision.isEmpty(); 5963 } 5964 5965 /** 5966 * @param value {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.) 5967 */ 5968 public ItemReviewOutcomeComponent setDecision(CodeableConcept value) { 5969 this.decision = value; 5970 return this; 5971 } 5972 5973 /** 5974 * @return {@link #reason} (The reasons for the result of the claim, predetermination, or preauthorization adjudication.) 5975 */ 5976 public List<CodeableConcept> getReason() { 5977 if (this.reason == null) 5978 this.reason = new ArrayList<CodeableConcept>(); 5979 return this.reason; 5980 } 5981 5982 /** 5983 * @return Returns a reference to <code>this</code> for easy method chaining 5984 */ 5985 public ItemReviewOutcomeComponent setReason(List<CodeableConcept> theReason) { 5986 this.reason = theReason; 5987 return this; 5988 } 5989 5990 public boolean hasReason() { 5991 if (this.reason == null) 5992 return false; 5993 for (CodeableConcept item : this.reason) 5994 if (!item.isEmpty()) 5995 return true; 5996 return false; 5997 } 5998 5999 public CodeableConcept addReason() { //3 6000 CodeableConcept t = new CodeableConcept(); 6001 if (this.reason == null) 6002 this.reason = new ArrayList<CodeableConcept>(); 6003 this.reason.add(t); 6004 return t; 6005 } 6006 6007 public ItemReviewOutcomeComponent addReason(CodeableConcept t) { //3 6008 if (t == null) 6009 return this; 6010 if (this.reason == null) 6011 this.reason = new ArrayList<CodeableConcept>(); 6012 this.reason.add(t); 6013 return this; 6014 } 6015 6016 /** 6017 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} 6018 */ 6019 public CodeableConcept getReasonFirstRep() { 6020 if (getReason().isEmpty()) { 6021 addReason(); 6022 } 6023 return getReason().get(0); 6024 } 6025 6026 /** 6027 * @return {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value 6028 */ 6029 public StringType getPreAuthRefElement() { 6030 if (this.preAuthRef == null) 6031 if (Configuration.errorOnAutoCreate()) 6032 throw new Error("Attempt to auto-create ItemReviewOutcomeComponent.preAuthRef"); 6033 else if (Configuration.doAutoCreate()) 6034 this.preAuthRef = new StringType(); // bb 6035 return this.preAuthRef; 6036 } 6037 6038 public boolean hasPreAuthRefElement() { 6039 return this.preAuthRef != null && !this.preAuthRef.isEmpty(); 6040 } 6041 6042 public boolean hasPreAuthRef() { 6043 return this.preAuthRef != null && !this.preAuthRef.isEmpty(); 6044 } 6045 6046 /** 6047 * @param value {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value 6048 */ 6049 public ItemReviewOutcomeComponent setPreAuthRefElement(StringType value) { 6050 this.preAuthRef = value; 6051 return this; 6052 } 6053 6054 /** 6055 * @return Reference from the Insurer which is used in later communications which refers to this adjudication. 6056 */ 6057 public String getPreAuthRef() { 6058 return this.preAuthRef == null ? null : this.preAuthRef.getValue(); 6059 } 6060 6061 /** 6062 * @param value Reference from the Insurer which is used in later communications which refers to this adjudication. 6063 */ 6064 public ItemReviewOutcomeComponent setPreAuthRef(String value) { 6065 if (Utilities.noString(value)) 6066 this.preAuthRef = null; 6067 else { 6068 if (this.preAuthRef == null) 6069 this.preAuthRef = new StringType(); 6070 this.preAuthRef.setValue(value); 6071 } 6072 return this; 6073 } 6074 6075 /** 6076 * @return {@link #preAuthPeriod} (The time frame during which this authorization is effective.) 6077 */ 6078 public Period getPreAuthPeriod() { 6079 if (this.preAuthPeriod == null) 6080 if (Configuration.errorOnAutoCreate()) 6081 throw new Error("Attempt to auto-create ItemReviewOutcomeComponent.preAuthPeriod"); 6082 else if (Configuration.doAutoCreate()) 6083 this.preAuthPeriod = new Period(); // cc 6084 return this.preAuthPeriod; 6085 } 6086 6087 public boolean hasPreAuthPeriod() { 6088 return this.preAuthPeriod != null && !this.preAuthPeriod.isEmpty(); 6089 } 6090 6091 /** 6092 * @param value {@link #preAuthPeriod} (The time frame during which this authorization is effective.) 6093 */ 6094 public ItemReviewOutcomeComponent setPreAuthPeriod(Period value) { 6095 this.preAuthPeriod = value; 6096 return this; 6097 } 6098 6099 protected void listChildren(List<Property> children) { 6100 super.listChildren(children); 6101 children.add(new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision)); 6102 children.add(new Property("reason", "CodeableConcept", "The reasons for the result of the claim, predetermination, or preauthorization adjudication.", 0, java.lang.Integer.MAX_VALUE, reason)); 6103 children.add(new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, 1, preAuthRef)); 6104 children.add(new Property("preAuthPeriod", "Period", "The time frame during which this authorization is effective.", 0, 1, preAuthPeriod)); 6105 } 6106 6107 @Override 6108 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6109 switch (_hash) { 6110 case 565719004: /*decision*/ return new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision); 6111 case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "The reasons for the result of the claim, predetermination, or preauthorization adjudication.", 0, java.lang.Integer.MAX_VALUE, reason); 6112 case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, 1, preAuthRef); 6113 case 1819164812: /*preAuthPeriod*/ return new Property("preAuthPeriod", "Period", "The time frame during which this authorization is effective.", 0, 1, preAuthPeriod); 6114 default: return super.getNamedProperty(_hash, _name, _checkValid); 6115 } 6116 6117 } 6118 6119 @Override 6120 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6121 switch (hash) { 6122 case 565719004: /*decision*/ return this.decision == null ? new Base[0] : new Base[] {this.decision}; // CodeableConcept 6123 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept 6124 case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : new Base[] {this.preAuthRef}; // StringType 6125 case 1819164812: /*preAuthPeriod*/ return this.preAuthPeriod == null ? new Base[0] : new Base[] {this.preAuthPeriod}; // Period 6126 default: return super.getProperty(hash, name, checkValid); 6127 } 6128 6129 } 6130 6131 @Override 6132 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6133 switch (hash) { 6134 case 565719004: // decision 6135 this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6136 return value; 6137 case -934964668: // reason 6138 this.getReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 6139 return value; 6140 case 522246568: // preAuthRef 6141 this.preAuthRef = TypeConvertor.castToString(value); // StringType 6142 return value; 6143 case 1819164812: // preAuthPeriod 6144 this.preAuthPeriod = TypeConvertor.castToPeriod(value); // Period 6145 return value; 6146 default: return super.setProperty(hash, name, value); 6147 } 6148 6149 } 6150 6151 @Override 6152 public Base setProperty(String name, Base value) throws FHIRException { 6153 if (name.equals("decision")) { 6154 this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6155 } else if (name.equals("reason")) { 6156 this.getReason().add(TypeConvertor.castToCodeableConcept(value)); 6157 } else if (name.equals("preAuthRef")) { 6158 this.preAuthRef = TypeConvertor.castToString(value); // StringType 6159 } else if (name.equals("preAuthPeriod")) { 6160 this.preAuthPeriod = TypeConvertor.castToPeriod(value); // Period 6161 } else 6162 return super.setProperty(name, value); 6163 return value; 6164 } 6165 6166 @Override 6167 public void removeChild(String name, Base value) throws FHIRException { 6168 if (name.equals("decision")) { 6169 this.decision = null; 6170 } else if (name.equals("reason")) { 6171 this.getReason().remove(value); 6172 } else if (name.equals("preAuthRef")) { 6173 this.preAuthRef = null; 6174 } else if (name.equals("preAuthPeriod")) { 6175 this.preAuthPeriod = null; 6176 } else 6177 super.removeChild(name, value); 6178 6179 } 6180 6181 @Override 6182 public Base makeProperty(int hash, String name) throws FHIRException { 6183 switch (hash) { 6184 case 565719004: return getDecision(); 6185 case -934964668: return addReason(); 6186 case 522246568: return getPreAuthRefElement(); 6187 case 1819164812: return getPreAuthPeriod(); 6188 default: return super.makeProperty(hash, name); 6189 } 6190 6191 } 6192 6193 @Override 6194 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6195 switch (hash) { 6196 case 565719004: /*decision*/ return new String[] {"CodeableConcept"}; 6197 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 6198 case 522246568: /*preAuthRef*/ return new String[] {"string"}; 6199 case 1819164812: /*preAuthPeriod*/ return new String[] {"Period"}; 6200 default: return super.getTypesForProperty(hash, name); 6201 } 6202 6203 } 6204 6205 @Override 6206 public Base addChild(String name) throws FHIRException { 6207 if (name.equals("decision")) { 6208 this.decision = new CodeableConcept(); 6209 return this.decision; 6210 } 6211 else if (name.equals("reason")) { 6212 return addReason(); 6213 } 6214 else if (name.equals("preAuthRef")) { 6215 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.reviewOutcome.preAuthRef"); 6216 } 6217 else if (name.equals("preAuthPeriod")) { 6218 this.preAuthPeriod = new Period(); 6219 return this.preAuthPeriod; 6220 } 6221 else 6222 return super.addChild(name); 6223 } 6224 6225 public ItemReviewOutcomeComponent copy() { 6226 ItemReviewOutcomeComponent dst = new ItemReviewOutcomeComponent(); 6227 copyValues(dst); 6228 return dst; 6229 } 6230 6231 public void copyValues(ItemReviewOutcomeComponent dst) { 6232 super.copyValues(dst); 6233 dst.decision = decision == null ? null : decision.copy(); 6234 if (reason != null) { 6235 dst.reason = new ArrayList<CodeableConcept>(); 6236 for (CodeableConcept i : reason) 6237 dst.reason.add(i.copy()); 6238 }; 6239 dst.preAuthRef = preAuthRef == null ? null : preAuthRef.copy(); 6240 dst.preAuthPeriod = preAuthPeriod == null ? null : preAuthPeriod.copy(); 6241 } 6242 6243 @Override 6244 public boolean equalsDeep(Base other_) { 6245 if (!super.equalsDeep(other_)) 6246 return false; 6247 if (!(other_ instanceof ItemReviewOutcomeComponent)) 6248 return false; 6249 ItemReviewOutcomeComponent o = (ItemReviewOutcomeComponent) other_; 6250 return compareDeep(decision, o.decision, true) && compareDeep(reason, o.reason, true) && compareDeep(preAuthRef, o.preAuthRef, true) 6251 && compareDeep(preAuthPeriod, o.preAuthPeriod, true); 6252 } 6253 6254 @Override 6255 public boolean equalsShallow(Base other_) { 6256 if (!super.equalsShallow(other_)) 6257 return false; 6258 if (!(other_ instanceof ItemReviewOutcomeComponent)) 6259 return false; 6260 ItemReviewOutcomeComponent o = (ItemReviewOutcomeComponent) other_; 6261 return compareValues(preAuthRef, o.preAuthRef, true); 6262 } 6263 6264 public boolean isEmpty() { 6265 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(decision, reason, preAuthRef 6266 , preAuthPeriod); 6267 } 6268 6269 public String fhirType() { 6270 return "ExplanationOfBenefit.item.reviewOutcome"; 6271 6272 } 6273 6274 } 6275 6276 @Block() 6277 public static class AdjudicationComponent extends BackboneElement implements IBaseBackboneElement { 6278 /** 6279 * A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. 6280 */ 6281 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 6282 @Description(shortDefinition="Type of adjudication information", formalDefinition="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item." ) 6283 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication") 6284 protected CodeableConcept category; 6285 6286 /** 6287 * A code supporting the understanding of the adjudication result and explaining variance from expected amount. 6288 */ 6289 @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 6290 @Description(shortDefinition="Explanation of adjudication outcome", formalDefinition="A code supporting the understanding of the adjudication result and explaining variance from expected amount." ) 6291 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-reason") 6292 protected CodeableConcept reason; 6293 6294 /** 6295 * Monetary amount associated with the category. 6296 */ 6297 @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=false) 6298 @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the category." ) 6299 protected Money amount; 6300 6301 /** 6302 * A non-monetary value associated with the category. Mutually exclusive to the amount element above. 6303 */ 6304 @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 6305 @Description(shortDefinition="Non-monitary value", formalDefinition="A non-monetary value associated with the category. Mutually exclusive to the amount element above." ) 6306 protected Quantity quantity; 6307 6308 private static final long serialVersionUID = 29312734L; 6309 6310 /** 6311 * Constructor 6312 */ 6313 public AdjudicationComponent() { 6314 super(); 6315 } 6316 6317 /** 6318 * Constructor 6319 */ 6320 public AdjudicationComponent(CodeableConcept category) { 6321 super(); 6322 this.setCategory(category); 6323 } 6324 6325 /** 6326 * @return {@link #category} (A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.) 6327 */ 6328 public CodeableConcept getCategory() { 6329 if (this.category == null) 6330 if (Configuration.errorOnAutoCreate()) 6331 throw new Error("Attempt to auto-create AdjudicationComponent.category"); 6332 else if (Configuration.doAutoCreate()) 6333 this.category = new CodeableConcept(); // cc 6334 return this.category; 6335 } 6336 6337 public boolean hasCategory() { 6338 return this.category != null && !this.category.isEmpty(); 6339 } 6340 6341 /** 6342 * @param value {@link #category} (A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.) 6343 */ 6344 public AdjudicationComponent setCategory(CodeableConcept value) { 6345 this.category = value; 6346 return this; 6347 } 6348 6349 /** 6350 * @return {@link #reason} (A code supporting the understanding of the adjudication result and explaining variance from expected amount.) 6351 */ 6352 public CodeableConcept getReason() { 6353 if (this.reason == null) 6354 if (Configuration.errorOnAutoCreate()) 6355 throw new Error("Attempt to auto-create AdjudicationComponent.reason"); 6356 else if (Configuration.doAutoCreate()) 6357 this.reason = new CodeableConcept(); // cc 6358 return this.reason; 6359 } 6360 6361 public boolean hasReason() { 6362 return this.reason != null && !this.reason.isEmpty(); 6363 } 6364 6365 /** 6366 * @param value {@link #reason} (A code supporting the understanding of the adjudication result and explaining variance from expected amount.) 6367 */ 6368 public AdjudicationComponent setReason(CodeableConcept value) { 6369 this.reason = value; 6370 return this; 6371 } 6372 6373 /** 6374 * @return {@link #amount} (Monetary amount associated with the category.) 6375 */ 6376 public Money getAmount() { 6377 if (this.amount == null) 6378 if (Configuration.errorOnAutoCreate()) 6379 throw new Error("Attempt to auto-create AdjudicationComponent.amount"); 6380 else if (Configuration.doAutoCreate()) 6381 this.amount = new Money(); // cc 6382 return this.amount; 6383 } 6384 6385 public boolean hasAmount() { 6386 return this.amount != null && !this.amount.isEmpty(); 6387 } 6388 6389 /** 6390 * @param value {@link #amount} (Monetary amount associated with the category.) 6391 */ 6392 public AdjudicationComponent setAmount(Money value) { 6393 this.amount = value; 6394 return this; 6395 } 6396 6397 /** 6398 * @return {@link #quantity} (A non-monetary value associated with the category. Mutually exclusive to the amount element above.) 6399 */ 6400 public Quantity getQuantity() { 6401 if (this.quantity == null) 6402 if (Configuration.errorOnAutoCreate()) 6403 throw new Error("Attempt to auto-create AdjudicationComponent.quantity"); 6404 else if (Configuration.doAutoCreate()) 6405 this.quantity = new Quantity(); // cc 6406 return this.quantity; 6407 } 6408 6409 public boolean hasQuantity() { 6410 return this.quantity != null && !this.quantity.isEmpty(); 6411 } 6412 6413 /** 6414 * @param value {@link #quantity} (A non-monetary value associated with the category. Mutually exclusive to the amount element above.) 6415 */ 6416 public AdjudicationComponent setQuantity(Quantity value) { 6417 this.quantity = value; 6418 return this; 6419 } 6420 6421 protected void listChildren(List<Property> children) { 6422 super.listChildren(children); 6423 children.add(new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", 0, 1, category)); 6424 children.add(new Property("reason", "CodeableConcept", "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", 0, 1, reason)); 6425 children.add(new Property("amount", "Money", "Monetary amount associated with the category.", 0, 1, amount)); 6426 children.add(new Property("quantity", "Quantity", "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", 0, 1, quantity)); 6427 } 6428 6429 @Override 6430 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6431 switch (_hash) { 6432 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", 0, 1, category); 6433 case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", 0, 1, reason); 6434 case -1413853096: /*amount*/ return new Property("amount", "Money", "Monetary amount associated with the category.", 0, 1, amount); 6435 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", 0, 1, quantity); 6436 default: return super.getNamedProperty(_hash, _name, _checkValid); 6437 } 6438 6439 } 6440 6441 @Override 6442 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6443 switch (hash) { 6444 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 6445 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept 6446 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 6447 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 6448 default: return super.getProperty(hash, name, checkValid); 6449 } 6450 6451 } 6452 6453 @Override 6454 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6455 switch (hash) { 6456 case 50511102: // category 6457 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6458 return value; 6459 case -934964668: // reason 6460 this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6461 return value; 6462 case -1413853096: // amount 6463 this.amount = TypeConvertor.castToMoney(value); // Money 6464 return value; 6465 case -1285004149: // quantity 6466 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 6467 return value; 6468 default: return super.setProperty(hash, name, value); 6469 } 6470 6471 } 6472 6473 @Override 6474 public Base setProperty(String name, Base value) throws FHIRException { 6475 if (name.equals("category")) { 6476 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6477 } else if (name.equals("reason")) { 6478 this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 6479 } else if (name.equals("amount")) { 6480 this.amount = TypeConvertor.castToMoney(value); // Money 6481 } else if (name.equals("quantity")) { 6482 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 6483 } else 6484 return super.setProperty(name, value); 6485 return value; 6486 } 6487 6488 @Override 6489 public void removeChild(String name, Base value) throws FHIRException { 6490 if (name.equals("category")) { 6491 this.category = null; 6492 } else if (name.equals("reason")) { 6493 this.reason = null; 6494 } else if (name.equals("amount")) { 6495 this.amount = null; 6496 } else if (name.equals("quantity")) { 6497 this.quantity = null; 6498 } else 6499 super.removeChild(name, value); 6500 6501 } 6502 6503 @Override 6504 public Base makeProperty(int hash, String name) throws FHIRException { 6505 switch (hash) { 6506 case 50511102: return getCategory(); 6507 case -934964668: return getReason(); 6508 case -1413853096: return getAmount(); 6509 case -1285004149: return getQuantity(); 6510 default: return super.makeProperty(hash, name); 6511 } 6512 6513 } 6514 6515 @Override 6516 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6517 switch (hash) { 6518 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 6519 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 6520 case -1413853096: /*amount*/ return new String[] {"Money"}; 6521 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 6522 default: return super.getTypesForProperty(hash, name); 6523 } 6524 6525 } 6526 6527 @Override 6528 public Base addChild(String name) throws FHIRException { 6529 if (name.equals("category")) { 6530 this.category = new CodeableConcept(); 6531 return this.category; 6532 } 6533 else if (name.equals("reason")) { 6534 this.reason = new CodeableConcept(); 6535 return this.reason; 6536 } 6537 else if (name.equals("amount")) { 6538 this.amount = new Money(); 6539 return this.amount; 6540 } 6541 else if (name.equals("quantity")) { 6542 this.quantity = new Quantity(); 6543 return this.quantity; 6544 } 6545 else 6546 return super.addChild(name); 6547 } 6548 6549 public AdjudicationComponent copy() { 6550 AdjudicationComponent dst = new AdjudicationComponent(); 6551 copyValues(dst); 6552 return dst; 6553 } 6554 6555 public void copyValues(AdjudicationComponent dst) { 6556 super.copyValues(dst); 6557 dst.category = category == null ? null : category.copy(); 6558 dst.reason = reason == null ? null : reason.copy(); 6559 dst.amount = amount == null ? null : amount.copy(); 6560 dst.quantity = quantity == null ? null : quantity.copy(); 6561 } 6562 6563 @Override 6564 public boolean equalsDeep(Base other_) { 6565 if (!super.equalsDeep(other_)) 6566 return false; 6567 if (!(other_ instanceof AdjudicationComponent)) 6568 return false; 6569 AdjudicationComponent o = (AdjudicationComponent) other_; 6570 return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) 6571 && compareDeep(quantity, o.quantity, true); 6572 } 6573 6574 @Override 6575 public boolean equalsShallow(Base other_) { 6576 if (!super.equalsShallow(other_)) 6577 return false; 6578 if (!(other_ instanceof AdjudicationComponent)) 6579 return false; 6580 AdjudicationComponent o = (AdjudicationComponent) other_; 6581 return true; 6582 } 6583 6584 public boolean isEmpty() { 6585 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount 6586 , quantity); 6587 } 6588 6589 public String fhirType() { 6590 return "ExplanationOfBenefit.item.adjudication"; 6591 6592 } 6593 6594 } 6595 6596 @Block() 6597 public static class DetailComponent extends BackboneElement implements IBaseBackboneElement { 6598 /** 6599 * A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 6600 */ 6601 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 6602 @Description(shortDefinition="Product or service provided", formalDefinition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." ) 6603 protected PositiveIntType sequence; 6604 6605 /** 6606 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 6607 */ 6608 @Child(name = "traceNumber", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6609 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 6610 protected List<Identifier> traceNumber; 6611 6612 /** 6613 * The type of revenue or cost center providing the product and/or service. 6614 */ 6615 @Child(name = "revenue", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 6616 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 6617 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 6618 protected CodeableConcept revenue; 6619 6620 /** 6621 * Code to identify the general type of benefits under which products and services are provided. 6622 */ 6623 @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 6624 @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." ) 6625 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory") 6626 protected CodeableConcept category; 6627 6628 /** 6629 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 6630 */ 6631 @Child(name = "productOrService", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 6632 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 6633 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 6634 protected CodeableConcept productOrService; 6635 6636 /** 6637 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 6638 */ 6639 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 6640 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 6641 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 6642 protected CodeableConcept productOrServiceEnd; 6643 6644 /** 6645 * Item typification or modifiers codes to convey additional context for the product or service. 6646 */ 6647 @Child(name = "modifier", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6648 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 6649 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 6650 protected List<CodeableConcept> modifier; 6651 6652 /** 6653 * Identifies the program under which this may be recovered. 6654 */ 6655 @Child(name = "programCode", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6656 @Description(shortDefinition="Program the product or service is provided under", formalDefinition="Identifies the program under which this may be recovered." ) 6657 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") 6658 protected List<CodeableConcept> programCode; 6659 6660 /** 6661 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 6662 */ 6663 @Child(name = "patientPaid", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false) 6664 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 6665 protected Money patientPaid; 6666 6667 /** 6668 * The number of repetitions of a service or product. 6669 */ 6670 @Child(name = "quantity", type = {Quantity.class}, order=10, min=0, max=1, modifier=false, summary=false) 6671 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 6672 protected Quantity quantity; 6673 6674 /** 6675 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 6676 */ 6677 @Child(name = "unitPrice", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) 6678 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 6679 protected Money unitPrice; 6680 6681 /** 6682 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 6683 */ 6684 @Child(name = "factor", type = {DecimalType.class}, order=12, min=0, max=1, modifier=false, summary=false) 6685 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 6686 protected DecimalType factor; 6687 6688 /** 6689 * The total of taxes applicable for this product or service. 6690 */ 6691 @Child(name = "tax", type = {Money.class}, order=13, min=0, max=1, modifier=false, summary=false) 6692 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 6693 protected Money tax; 6694 6695 /** 6696 * The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor. 6697 */ 6698 @Child(name = "net", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=false) 6699 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor." ) 6700 protected Money net; 6701 6702 /** 6703 * Unique Device Identifiers associated with this line item. 6704 */ 6705 @Child(name = "udi", type = {Device.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6706 @Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." ) 6707 protected List<Reference> udi; 6708 6709 /** 6710 * The numbers associated with notes below which apply to the adjudication of this item. 6711 */ 6712 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6713 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 6714 protected List<PositiveIntType> noteNumber; 6715 6716 /** 6717 * The high-level results of the adjudication if adjudication has been performed. 6718 */ 6719 @Child(name = "reviewOutcome", type = {ItemReviewOutcomeComponent.class}, order=17, min=0, max=1, modifier=false, summary=false) 6720 @Description(shortDefinition="Detail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 6721 protected ItemReviewOutcomeComponent reviewOutcome; 6722 6723 /** 6724 * The adjudication results. 6725 */ 6726 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6727 @Description(shortDefinition="Detail level adjudication details", formalDefinition="The adjudication results." ) 6728 protected List<AdjudicationComponent> adjudication; 6729 6730 /** 6731 * Third-tier of goods and services. 6732 */ 6733 @Child(name = "subDetail", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6734 @Description(shortDefinition="Additional items", formalDefinition="Third-tier of goods and services." ) 6735 protected List<SubDetailComponent> subDetail; 6736 6737 private static final long serialVersionUID = -1951425443L; 6738 6739 /** 6740 * Constructor 6741 */ 6742 public DetailComponent() { 6743 super(); 6744 } 6745 6746 /** 6747 * Constructor 6748 */ 6749 public DetailComponent(int sequence) { 6750 super(); 6751 this.setSequence(sequence); 6752 } 6753 6754 /** 6755 * @return {@link #sequence} (A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 6756 */ 6757 public PositiveIntType getSequenceElement() { 6758 if (this.sequence == null) 6759 if (Configuration.errorOnAutoCreate()) 6760 throw new Error("Attempt to auto-create DetailComponent.sequence"); 6761 else if (Configuration.doAutoCreate()) 6762 this.sequence = new PositiveIntType(); // bb 6763 return this.sequence; 6764 } 6765 6766 public boolean hasSequenceElement() { 6767 return this.sequence != null && !this.sequence.isEmpty(); 6768 } 6769 6770 public boolean hasSequence() { 6771 return this.sequence != null && !this.sequence.isEmpty(); 6772 } 6773 6774 /** 6775 * @param value {@link #sequence} (A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 6776 */ 6777 public DetailComponent setSequenceElement(PositiveIntType value) { 6778 this.sequence = value; 6779 return this; 6780 } 6781 6782 /** 6783 * @return A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 6784 */ 6785 public int getSequence() { 6786 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 6787 } 6788 6789 /** 6790 * @param value A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 6791 */ 6792 public DetailComponent setSequence(int value) { 6793 if (this.sequence == null) 6794 this.sequence = new PositiveIntType(); 6795 this.sequence.setValue(value); 6796 return this; 6797 } 6798 6799 /** 6800 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 6801 */ 6802 public List<Identifier> getTraceNumber() { 6803 if (this.traceNumber == null) 6804 this.traceNumber = new ArrayList<Identifier>(); 6805 return this.traceNumber; 6806 } 6807 6808 /** 6809 * @return Returns a reference to <code>this</code> for easy method chaining 6810 */ 6811 public DetailComponent setTraceNumber(List<Identifier> theTraceNumber) { 6812 this.traceNumber = theTraceNumber; 6813 return this; 6814 } 6815 6816 public boolean hasTraceNumber() { 6817 if (this.traceNumber == null) 6818 return false; 6819 for (Identifier item : this.traceNumber) 6820 if (!item.isEmpty()) 6821 return true; 6822 return false; 6823 } 6824 6825 public Identifier addTraceNumber() { //3 6826 Identifier t = new Identifier(); 6827 if (this.traceNumber == null) 6828 this.traceNumber = new ArrayList<Identifier>(); 6829 this.traceNumber.add(t); 6830 return t; 6831 } 6832 6833 public DetailComponent addTraceNumber(Identifier t) { //3 6834 if (t == null) 6835 return this; 6836 if (this.traceNumber == null) 6837 this.traceNumber = new ArrayList<Identifier>(); 6838 this.traceNumber.add(t); 6839 return this; 6840 } 6841 6842 /** 6843 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 6844 */ 6845 public Identifier getTraceNumberFirstRep() { 6846 if (getTraceNumber().isEmpty()) { 6847 addTraceNumber(); 6848 } 6849 return getTraceNumber().get(0); 6850 } 6851 6852 /** 6853 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 6854 */ 6855 public CodeableConcept getRevenue() { 6856 if (this.revenue == null) 6857 if (Configuration.errorOnAutoCreate()) 6858 throw new Error("Attempt to auto-create DetailComponent.revenue"); 6859 else if (Configuration.doAutoCreate()) 6860 this.revenue = new CodeableConcept(); // cc 6861 return this.revenue; 6862 } 6863 6864 public boolean hasRevenue() { 6865 return this.revenue != null && !this.revenue.isEmpty(); 6866 } 6867 6868 /** 6869 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 6870 */ 6871 public DetailComponent setRevenue(CodeableConcept value) { 6872 this.revenue = value; 6873 return this; 6874 } 6875 6876 /** 6877 * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 6878 */ 6879 public CodeableConcept getCategory() { 6880 if (this.category == null) 6881 if (Configuration.errorOnAutoCreate()) 6882 throw new Error("Attempt to auto-create DetailComponent.category"); 6883 else if (Configuration.doAutoCreate()) 6884 this.category = new CodeableConcept(); // cc 6885 return this.category; 6886 } 6887 6888 public boolean hasCategory() { 6889 return this.category != null && !this.category.isEmpty(); 6890 } 6891 6892 /** 6893 * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 6894 */ 6895 public DetailComponent setCategory(CodeableConcept value) { 6896 this.category = value; 6897 return this; 6898 } 6899 6900 /** 6901 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 6902 */ 6903 public CodeableConcept getProductOrService() { 6904 if (this.productOrService == null) 6905 if (Configuration.errorOnAutoCreate()) 6906 throw new Error("Attempt to auto-create DetailComponent.productOrService"); 6907 else if (Configuration.doAutoCreate()) 6908 this.productOrService = new CodeableConcept(); // cc 6909 return this.productOrService; 6910 } 6911 6912 public boolean hasProductOrService() { 6913 return this.productOrService != null && !this.productOrService.isEmpty(); 6914 } 6915 6916 /** 6917 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 6918 */ 6919 public DetailComponent setProductOrService(CodeableConcept value) { 6920 this.productOrService = value; 6921 return this; 6922 } 6923 6924 /** 6925 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 6926 */ 6927 public CodeableConcept getProductOrServiceEnd() { 6928 if (this.productOrServiceEnd == null) 6929 if (Configuration.errorOnAutoCreate()) 6930 throw new Error("Attempt to auto-create DetailComponent.productOrServiceEnd"); 6931 else if (Configuration.doAutoCreate()) 6932 this.productOrServiceEnd = new CodeableConcept(); // cc 6933 return this.productOrServiceEnd; 6934 } 6935 6936 public boolean hasProductOrServiceEnd() { 6937 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 6938 } 6939 6940 /** 6941 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 6942 */ 6943 public DetailComponent setProductOrServiceEnd(CodeableConcept value) { 6944 this.productOrServiceEnd = value; 6945 return this; 6946 } 6947 6948 /** 6949 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 6950 */ 6951 public List<CodeableConcept> getModifier() { 6952 if (this.modifier == null) 6953 this.modifier = new ArrayList<CodeableConcept>(); 6954 return this.modifier; 6955 } 6956 6957 /** 6958 * @return Returns a reference to <code>this</code> for easy method chaining 6959 */ 6960 public DetailComponent setModifier(List<CodeableConcept> theModifier) { 6961 this.modifier = theModifier; 6962 return this; 6963 } 6964 6965 public boolean hasModifier() { 6966 if (this.modifier == null) 6967 return false; 6968 for (CodeableConcept item : this.modifier) 6969 if (!item.isEmpty()) 6970 return true; 6971 return false; 6972 } 6973 6974 public CodeableConcept addModifier() { //3 6975 CodeableConcept t = new CodeableConcept(); 6976 if (this.modifier == null) 6977 this.modifier = new ArrayList<CodeableConcept>(); 6978 this.modifier.add(t); 6979 return t; 6980 } 6981 6982 public DetailComponent addModifier(CodeableConcept t) { //3 6983 if (t == null) 6984 return this; 6985 if (this.modifier == null) 6986 this.modifier = new ArrayList<CodeableConcept>(); 6987 this.modifier.add(t); 6988 return this; 6989 } 6990 6991 /** 6992 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 6993 */ 6994 public CodeableConcept getModifierFirstRep() { 6995 if (getModifier().isEmpty()) { 6996 addModifier(); 6997 } 6998 return getModifier().get(0); 6999 } 7000 7001 /** 7002 * @return {@link #programCode} (Identifies the program under which this may be recovered.) 7003 */ 7004 public List<CodeableConcept> getProgramCode() { 7005 if (this.programCode == null) 7006 this.programCode = new ArrayList<CodeableConcept>(); 7007 return this.programCode; 7008 } 7009 7010 /** 7011 * @return Returns a reference to <code>this</code> for easy method chaining 7012 */ 7013 public DetailComponent setProgramCode(List<CodeableConcept> theProgramCode) { 7014 this.programCode = theProgramCode; 7015 return this; 7016 } 7017 7018 public boolean hasProgramCode() { 7019 if (this.programCode == null) 7020 return false; 7021 for (CodeableConcept item : this.programCode) 7022 if (!item.isEmpty()) 7023 return true; 7024 return false; 7025 } 7026 7027 public CodeableConcept addProgramCode() { //3 7028 CodeableConcept t = new CodeableConcept(); 7029 if (this.programCode == null) 7030 this.programCode = new ArrayList<CodeableConcept>(); 7031 this.programCode.add(t); 7032 return t; 7033 } 7034 7035 public DetailComponent addProgramCode(CodeableConcept t) { //3 7036 if (t == null) 7037 return this; 7038 if (this.programCode == null) 7039 this.programCode = new ArrayList<CodeableConcept>(); 7040 this.programCode.add(t); 7041 return this; 7042 } 7043 7044 /** 7045 * @return The first repetition of repeating field {@link #programCode}, creating it if it does not already exist {3} 7046 */ 7047 public CodeableConcept getProgramCodeFirstRep() { 7048 if (getProgramCode().isEmpty()) { 7049 addProgramCode(); 7050 } 7051 return getProgramCode().get(0); 7052 } 7053 7054 /** 7055 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 7056 */ 7057 public Money getPatientPaid() { 7058 if (this.patientPaid == null) 7059 if (Configuration.errorOnAutoCreate()) 7060 throw new Error("Attempt to auto-create DetailComponent.patientPaid"); 7061 else if (Configuration.doAutoCreate()) 7062 this.patientPaid = new Money(); // cc 7063 return this.patientPaid; 7064 } 7065 7066 public boolean hasPatientPaid() { 7067 return this.patientPaid != null && !this.patientPaid.isEmpty(); 7068 } 7069 7070 /** 7071 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 7072 */ 7073 public DetailComponent setPatientPaid(Money value) { 7074 this.patientPaid = value; 7075 return this; 7076 } 7077 7078 /** 7079 * @return {@link #quantity} (The number of repetitions of a service or product.) 7080 */ 7081 public Quantity getQuantity() { 7082 if (this.quantity == null) 7083 if (Configuration.errorOnAutoCreate()) 7084 throw new Error("Attempt to auto-create DetailComponent.quantity"); 7085 else if (Configuration.doAutoCreate()) 7086 this.quantity = new Quantity(); // cc 7087 return this.quantity; 7088 } 7089 7090 public boolean hasQuantity() { 7091 return this.quantity != null && !this.quantity.isEmpty(); 7092 } 7093 7094 /** 7095 * @param value {@link #quantity} (The number of repetitions of a service or product.) 7096 */ 7097 public DetailComponent setQuantity(Quantity value) { 7098 this.quantity = value; 7099 return this; 7100 } 7101 7102 /** 7103 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 7104 */ 7105 public Money getUnitPrice() { 7106 if (this.unitPrice == null) 7107 if (Configuration.errorOnAutoCreate()) 7108 throw new Error("Attempt to auto-create DetailComponent.unitPrice"); 7109 else if (Configuration.doAutoCreate()) 7110 this.unitPrice = new Money(); // cc 7111 return this.unitPrice; 7112 } 7113 7114 public boolean hasUnitPrice() { 7115 return this.unitPrice != null && !this.unitPrice.isEmpty(); 7116 } 7117 7118 /** 7119 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 7120 */ 7121 public DetailComponent setUnitPrice(Money value) { 7122 this.unitPrice = value; 7123 return this; 7124 } 7125 7126 /** 7127 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 7128 */ 7129 public DecimalType getFactorElement() { 7130 if (this.factor == null) 7131 if (Configuration.errorOnAutoCreate()) 7132 throw new Error("Attempt to auto-create DetailComponent.factor"); 7133 else if (Configuration.doAutoCreate()) 7134 this.factor = new DecimalType(); // bb 7135 return this.factor; 7136 } 7137 7138 public boolean hasFactorElement() { 7139 return this.factor != null && !this.factor.isEmpty(); 7140 } 7141 7142 public boolean hasFactor() { 7143 return this.factor != null && !this.factor.isEmpty(); 7144 } 7145 7146 /** 7147 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 7148 */ 7149 public DetailComponent setFactorElement(DecimalType value) { 7150 this.factor = value; 7151 return this; 7152 } 7153 7154 /** 7155 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 7156 */ 7157 public BigDecimal getFactor() { 7158 return this.factor == null ? null : this.factor.getValue(); 7159 } 7160 7161 /** 7162 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 7163 */ 7164 public DetailComponent setFactor(BigDecimal value) { 7165 if (value == null) 7166 this.factor = null; 7167 else { 7168 if (this.factor == null) 7169 this.factor = new DecimalType(); 7170 this.factor.setValue(value); 7171 } 7172 return this; 7173 } 7174 7175 /** 7176 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 7177 */ 7178 public DetailComponent setFactor(long value) { 7179 this.factor = new DecimalType(); 7180 this.factor.setValue(value); 7181 return this; 7182 } 7183 7184 /** 7185 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 7186 */ 7187 public DetailComponent setFactor(double value) { 7188 this.factor = new DecimalType(); 7189 this.factor.setValue(value); 7190 return this; 7191 } 7192 7193 /** 7194 * @return {@link #tax} (The total of taxes applicable for this product or service.) 7195 */ 7196 public Money getTax() { 7197 if (this.tax == null) 7198 if (Configuration.errorOnAutoCreate()) 7199 throw new Error("Attempt to auto-create DetailComponent.tax"); 7200 else if (Configuration.doAutoCreate()) 7201 this.tax = new Money(); // cc 7202 return this.tax; 7203 } 7204 7205 public boolean hasTax() { 7206 return this.tax != null && !this.tax.isEmpty(); 7207 } 7208 7209 /** 7210 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 7211 */ 7212 public DetailComponent setTax(Money value) { 7213 this.tax = value; 7214 return this; 7215 } 7216 7217 /** 7218 * @return {@link #net} (The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.) 7219 */ 7220 public Money getNet() { 7221 if (this.net == null) 7222 if (Configuration.errorOnAutoCreate()) 7223 throw new Error("Attempt to auto-create DetailComponent.net"); 7224 else if (Configuration.doAutoCreate()) 7225 this.net = new Money(); // cc 7226 return this.net; 7227 } 7228 7229 public boolean hasNet() { 7230 return this.net != null && !this.net.isEmpty(); 7231 } 7232 7233 /** 7234 * @param value {@link #net} (The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.) 7235 */ 7236 public DetailComponent setNet(Money value) { 7237 this.net = value; 7238 return this; 7239 } 7240 7241 /** 7242 * @return {@link #udi} (Unique Device Identifiers associated with this line item.) 7243 */ 7244 public List<Reference> getUdi() { 7245 if (this.udi == null) 7246 this.udi = new ArrayList<Reference>(); 7247 return this.udi; 7248 } 7249 7250 /** 7251 * @return Returns a reference to <code>this</code> for easy method chaining 7252 */ 7253 public DetailComponent setUdi(List<Reference> theUdi) { 7254 this.udi = theUdi; 7255 return this; 7256 } 7257 7258 public boolean hasUdi() { 7259 if (this.udi == null) 7260 return false; 7261 for (Reference item : this.udi) 7262 if (!item.isEmpty()) 7263 return true; 7264 return false; 7265 } 7266 7267 public Reference addUdi() { //3 7268 Reference t = new Reference(); 7269 if (this.udi == null) 7270 this.udi = new ArrayList<Reference>(); 7271 this.udi.add(t); 7272 return t; 7273 } 7274 7275 public DetailComponent addUdi(Reference t) { //3 7276 if (t == null) 7277 return this; 7278 if (this.udi == null) 7279 this.udi = new ArrayList<Reference>(); 7280 this.udi.add(t); 7281 return this; 7282 } 7283 7284 /** 7285 * @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3} 7286 */ 7287 public Reference getUdiFirstRep() { 7288 if (getUdi().isEmpty()) { 7289 addUdi(); 7290 } 7291 return getUdi().get(0); 7292 } 7293 7294 /** 7295 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 7296 */ 7297 public List<PositiveIntType> getNoteNumber() { 7298 if (this.noteNumber == null) 7299 this.noteNumber = new ArrayList<PositiveIntType>(); 7300 return this.noteNumber; 7301 } 7302 7303 /** 7304 * @return Returns a reference to <code>this</code> for easy method chaining 7305 */ 7306 public DetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 7307 this.noteNumber = theNoteNumber; 7308 return this; 7309 } 7310 7311 public boolean hasNoteNumber() { 7312 if (this.noteNumber == null) 7313 return false; 7314 for (PositiveIntType item : this.noteNumber) 7315 if (!item.isEmpty()) 7316 return true; 7317 return false; 7318 } 7319 7320 /** 7321 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 7322 */ 7323 public PositiveIntType addNoteNumberElement() {//2 7324 PositiveIntType t = new PositiveIntType(); 7325 if (this.noteNumber == null) 7326 this.noteNumber = new ArrayList<PositiveIntType>(); 7327 this.noteNumber.add(t); 7328 return t; 7329 } 7330 7331 /** 7332 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 7333 */ 7334 public DetailComponent addNoteNumber(int value) { //1 7335 PositiveIntType t = new PositiveIntType(); 7336 t.setValue(value); 7337 if (this.noteNumber == null) 7338 this.noteNumber = new ArrayList<PositiveIntType>(); 7339 this.noteNumber.add(t); 7340 return this; 7341 } 7342 7343 /** 7344 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 7345 */ 7346 public boolean hasNoteNumber(int value) { 7347 if (this.noteNumber == null) 7348 return false; 7349 for (PositiveIntType v : this.noteNumber) 7350 if (v.getValue().equals(value)) // positiveInt 7351 return true; 7352 return false; 7353 } 7354 7355 /** 7356 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 7357 */ 7358 public ItemReviewOutcomeComponent getReviewOutcome() { 7359 if (this.reviewOutcome == null) 7360 if (Configuration.errorOnAutoCreate()) 7361 throw new Error("Attempt to auto-create DetailComponent.reviewOutcome"); 7362 else if (Configuration.doAutoCreate()) 7363 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 7364 return this.reviewOutcome; 7365 } 7366 7367 public boolean hasReviewOutcome() { 7368 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 7369 } 7370 7371 /** 7372 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 7373 */ 7374 public DetailComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 7375 this.reviewOutcome = value; 7376 return this; 7377 } 7378 7379 /** 7380 * @return {@link #adjudication} (The adjudication results.) 7381 */ 7382 public List<AdjudicationComponent> getAdjudication() { 7383 if (this.adjudication == null) 7384 this.adjudication = new ArrayList<AdjudicationComponent>(); 7385 return this.adjudication; 7386 } 7387 7388 /** 7389 * @return Returns a reference to <code>this</code> for easy method chaining 7390 */ 7391 public DetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 7392 this.adjudication = theAdjudication; 7393 return this; 7394 } 7395 7396 public boolean hasAdjudication() { 7397 if (this.adjudication == null) 7398 return false; 7399 for (AdjudicationComponent item : this.adjudication) 7400 if (!item.isEmpty()) 7401 return true; 7402 return false; 7403 } 7404 7405 public AdjudicationComponent addAdjudication() { //3 7406 AdjudicationComponent t = new AdjudicationComponent(); 7407 if (this.adjudication == null) 7408 this.adjudication = new ArrayList<AdjudicationComponent>(); 7409 this.adjudication.add(t); 7410 return t; 7411 } 7412 7413 public DetailComponent addAdjudication(AdjudicationComponent t) { //3 7414 if (t == null) 7415 return this; 7416 if (this.adjudication == null) 7417 this.adjudication = new ArrayList<AdjudicationComponent>(); 7418 this.adjudication.add(t); 7419 return this; 7420 } 7421 7422 /** 7423 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 7424 */ 7425 public AdjudicationComponent getAdjudicationFirstRep() { 7426 if (getAdjudication().isEmpty()) { 7427 addAdjudication(); 7428 } 7429 return getAdjudication().get(0); 7430 } 7431 7432 /** 7433 * @return {@link #subDetail} (Third-tier of goods and services.) 7434 */ 7435 public List<SubDetailComponent> getSubDetail() { 7436 if (this.subDetail == null) 7437 this.subDetail = new ArrayList<SubDetailComponent>(); 7438 return this.subDetail; 7439 } 7440 7441 /** 7442 * @return Returns a reference to <code>this</code> for easy method chaining 7443 */ 7444 public DetailComponent setSubDetail(List<SubDetailComponent> theSubDetail) { 7445 this.subDetail = theSubDetail; 7446 return this; 7447 } 7448 7449 public boolean hasSubDetail() { 7450 if (this.subDetail == null) 7451 return false; 7452 for (SubDetailComponent item : this.subDetail) 7453 if (!item.isEmpty()) 7454 return true; 7455 return false; 7456 } 7457 7458 public SubDetailComponent addSubDetail() { //3 7459 SubDetailComponent t = new SubDetailComponent(); 7460 if (this.subDetail == null) 7461 this.subDetail = new ArrayList<SubDetailComponent>(); 7462 this.subDetail.add(t); 7463 return t; 7464 } 7465 7466 public DetailComponent addSubDetail(SubDetailComponent t) { //3 7467 if (t == null) 7468 return this; 7469 if (this.subDetail == null) 7470 this.subDetail = new ArrayList<SubDetailComponent>(); 7471 this.subDetail.add(t); 7472 return this; 7473 } 7474 7475 /** 7476 * @return The first repetition of repeating field {@link #subDetail}, creating it if it does not already exist {3} 7477 */ 7478 public SubDetailComponent getSubDetailFirstRep() { 7479 if (getSubDetail().isEmpty()) { 7480 addSubDetail(); 7481 } 7482 return getSubDetail().get(0); 7483 } 7484 7485 protected void listChildren(List<Property> children) { 7486 super.listChildren(children); 7487 children.add(new Property("sequence", "positiveInt", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, 1, sequence)); 7488 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 7489 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 7490 children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category)); 7491 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 7492 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 7493 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 7494 children.add(new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode)); 7495 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 7496 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 7497 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 7498 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 7499 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 7500 children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.", 0, 1, net)); 7501 children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 7502 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 7503 children.add(new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 7504 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 7505 children.add(new Property("subDetail", "", "Third-tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); 7506 } 7507 7508 @Override 7509 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7510 switch (_hash) { 7511 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, 1, sequence); 7512 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 7513 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 7514 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category); 7515 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 7516 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 7517 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 7518 case 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode); 7519 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 7520 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 7521 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 7522 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 7523 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 7524 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.", 0, 1, net); 7525 case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi); 7526 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 7527 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 7528 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 7529 case -828829007: /*subDetail*/ return new Property("subDetail", "", "Third-tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail); 7530 default: return super.getNamedProperty(_hash, _name, _checkValid); 7531 } 7532 7533 } 7534 7535 @Override 7536 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7537 switch (hash) { 7538 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 7539 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 7540 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 7541 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 7542 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 7543 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 7544 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 7545 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept 7546 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 7547 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 7548 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 7549 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 7550 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 7551 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 7552 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 7553 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 7554 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 7555 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 7556 case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // SubDetailComponent 7557 default: return super.getProperty(hash, name, checkValid); 7558 } 7559 7560 } 7561 7562 @Override 7563 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7564 switch (hash) { 7565 case 1349547969: // sequence 7566 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 7567 return value; 7568 case 82505966: // traceNumber 7569 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 7570 return value; 7571 case 1099842588: // revenue 7572 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7573 return value; 7574 case 50511102: // category 7575 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7576 return value; 7577 case 1957227299: // productOrService 7578 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7579 return value; 7580 case -717476168: // productOrServiceEnd 7581 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7582 return value; 7583 case -615513385: // modifier 7584 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 7585 return value; 7586 case 1010065041: // programCode 7587 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 7588 return value; 7589 case 525514609: // patientPaid 7590 this.patientPaid = TypeConvertor.castToMoney(value); // Money 7591 return value; 7592 case -1285004149: // quantity 7593 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 7594 return value; 7595 case -486196699: // unitPrice 7596 this.unitPrice = TypeConvertor.castToMoney(value); // Money 7597 return value; 7598 case -1282148017: // factor 7599 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 7600 return value; 7601 case 114603: // tax 7602 this.tax = TypeConvertor.castToMoney(value); // Money 7603 return value; 7604 case 108957: // net 7605 this.net = TypeConvertor.castToMoney(value); // Money 7606 return value; 7607 case 115642: // udi 7608 this.getUdi().add(TypeConvertor.castToReference(value)); // Reference 7609 return value; 7610 case -1110033957: // noteNumber 7611 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 7612 return value; 7613 case -51825446: // reviewOutcome 7614 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 7615 return value; 7616 case -231349275: // adjudication 7617 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 7618 return value; 7619 case -828829007: // subDetail 7620 this.getSubDetail().add((SubDetailComponent) value); // SubDetailComponent 7621 return value; 7622 default: return super.setProperty(hash, name, value); 7623 } 7624 7625 } 7626 7627 @Override 7628 public Base setProperty(String name, Base value) throws FHIRException { 7629 if (name.equals("sequence")) { 7630 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 7631 } else if (name.equals("traceNumber")) { 7632 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 7633 } else if (name.equals("revenue")) { 7634 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7635 } else if (name.equals("category")) { 7636 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7637 } else if (name.equals("productOrService")) { 7638 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7639 } else if (name.equals("productOrServiceEnd")) { 7640 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 7641 } else if (name.equals("modifier")) { 7642 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 7643 } else if (name.equals("programCode")) { 7644 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); 7645 } else if (name.equals("patientPaid")) { 7646 this.patientPaid = TypeConvertor.castToMoney(value); // Money 7647 } else if (name.equals("quantity")) { 7648 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 7649 } else if (name.equals("unitPrice")) { 7650 this.unitPrice = TypeConvertor.castToMoney(value); // Money 7651 } else if (name.equals("factor")) { 7652 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 7653 } else if (name.equals("tax")) { 7654 this.tax = TypeConvertor.castToMoney(value); // Money 7655 } else if (name.equals("net")) { 7656 this.net = TypeConvertor.castToMoney(value); // Money 7657 } else if (name.equals("udi")) { 7658 this.getUdi().add(TypeConvertor.castToReference(value)); 7659 } else if (name.equals("noteNumber")) { 7660 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 7661 } else if (name.equals("reviewOutcome")) { 7662 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 7663 } else if (name.equals("adjudication")) { 7664 this.getAdjudication().add((AdjudicationComponent) value); 7665 } else if (name.equals("subDetail")) { 7666 this.getSubDetail().add((SubDetailComponent) value); 7667 } else 7668 return super.setProperty(name, value); 7669 return value; 7670 } 7671 7672 @Override 7673 public void removeChild(String name, Base value) throws FHIRException { 7674 if (name.equals("sequence")) { 7675 this.sequence = null; 7676 } else if (name.equals("traceNumber")) { 7677 this.getTraceNumber().remove(value); 7678 } else if (name.equals("revenue")) { 7679 this.revenue = null; 7680 } else if (name.equals("category")) { 7681 this.category = null; 7682 } else if (name.equals("productOrService")) { 7683 this.productOrService = null; 7684 } else if (name.equals("productOrServiceEnd")) { 7685 this.productOrServiceEnd = null; 7686 } else if (name.equals("modifier")) { 7687 this.getModifier().remove(value); 7688 } else if (name.equals("programCode")) { 7689 this.getProgramCode().remove(value); 7690 } else if (name.equals("patientPaid")) { 7691 this.patientPaid = null; 7692 } else if (name.equals("quantity")) { 7693 this.quantity = null; 7694 } else if (name.equals("unitPrice")) { 7695 this.unitPrice = null; 7696 } else if (name.equals("factor")) { 7697 this.factor = null; 7698 } else if (name.equals("tax")) { 7699 this.tax = null; 7700 } else if (name.equals("net")) { 7701 this.net = null; 7702 } else if (name.equals("udi")) { 7703 this.getUdi().remove(value); 7704 } else if (name.equals("noteNumber")) { 7705 this.getNoteNumber().remove(value); 7706 } else if (name.equals("reviewOutcome")) { 7707 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 7708 } else if (name.equals("adjudication")) { 7709 this.getAdjudication().remove((AdjudicationComponent) value); 7710 } else if (name.equals("subDetail")) { 7711 this.getSubDetail().remove((SubDetailComponent) value); 7712 } else 7713 super.removeChild(name, value); 7714 7715 } 7716 7717 @Override 7718 public Base makeProperty(int hash, String name) throws FHIRException { 7719 switch (hash) { 7720 case 1349547969: return getSequenceElement(); 7721 case 82505966: return addTraceNumber(); 7722 case 1099842588: return getRevenue(); 7723 case 50511102: return getCategory(); 7724 case 1957227299: return getProductOrService(); 7725 case -717476168: return getProductOrServiceEnd(); 7726 case -615513385: return addModifier(); 7727 case 1010065041: return addProgramCode(); 7728 case 525514609: return getPatientPaid(); 7729 case -1285004149: return getQuantity(); 7730 case -486196699: return getUnitPrice(); 7731 case -1282148017: return getFactorElement(); 7732 case 114603: return getTax(); 7733 case 108957: return getNet(); 7734 case 115642: return addUdi(); 7735 case -1110033957: return addNoteNumberElement(); 7736 case -51825446: return getReviewOutcome(); 7737 case -231349275: return addAdjudication(); 7738 case -828829007: return addSubDetail(); 7739 default: return super.makeProperty(hash, name); 7740 } 7741 7742 } 7743 7744 @Override 7745 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7746 switch (hash) { 7747 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 7748 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 7749 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 7750 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 7751 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 7752 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 7753 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 7754 case 1010065041: /*programCode*/ return new String[] {"CodeableConcept"}; 7755 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 7756 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 7757 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 7758 case -1282148017: /*factor*/ return new String[] {"decimal"}; 7759 case 114603: /*tax*/ return new String[] {"Money"}; 7760 case 108957: /*net*/ return new String[] {"Money"}; 7761 case 115642: /*udi*/ return new String[] {"Reference"}; 7762 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 7763 case -51825446: /*reviewOutcome*/ return new String[] {"@ExplanationOfBenefit.item.reviewOutcome"}; 7764 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 7765 case -828829007: /*subDetail*/ return new String[] {}; 7766 default: return super.getTypesForProperty(hash, name); 7767 } 7768 7769 } 7770 7771 @Override 7772 public Base addChild(String name) throws FHIRException { 7773 if (name.equals("sequence")) { 7774 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.sequence"); 7775 } 7776 else if (name.equals("traceNumber")) { 7777 return addTraceNumber(); 7778 } 7779 else if (name.equals("revenue")) { 7780 this.revenue = new CodeableConcept(); 7781 return this.revenue; 7782 } 7783 else if (name.equals("category")) { 7784 this.category = new CodeableConcept(); 7785 return this.category; 7786 } 7787 else if (name.equals("productOrService")) { 7788 this.productOrService = new CodeableConcept(); 7789 return this.productOrService; 7790 } 7791 else if (name.equals("productOrServiceEnd")) { 7792 this.productOrServiceEnd = new CodeableConcept(); 7793 return this.productOrServiceEnd; 7794 } 7795 else if (name.equals("modifier")) { 7796 return addModifier(); 7797 } 7798 else if (name.equals("programCode")) { 7799 return addProgramCode(); 7800 } 7801 else if (name.equals("patientPaid")) { 7802 this.patientPaid = new Money(); 7803 return this.patientPaid; 7804 } 7805 else if (name.equals("quantity")) { 7806 this.quantity = new Quantity(); 7807 return this.quantity; 7808 } 7809 else if (name.equals("unitPrice")) { 7810 this.unitPrice = new Money(); 7811 return this.unitPrice; 7812 } 7813 else if (name.equals("factor")) { 7814 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.factor"); 7815 } 7816 else if (name.equals("tax")) { 7817 this.tax = new Money(); 7818 return this.tax; 7819 } 7820 else if (name.equals("net")) { 7821 this.net = new Money(); 7822 return this.net; 7823 } 7824 else if (name.equals("udi")) { 7825 return addUdi(); 7826 } 7827 else if (name.equals("noteNumber")) { 7828 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.noteNumber"); 7829 } 7830 else if (name.equals("reviewOutcome")) { 7831 this.reviewOutcome = new ItemReviewOutcomeComponent(); 7832 return this.reviewOutcome; 7833 } 7834 else if (name.equals("adjudication")) { 7835 return addAdjudication(); 7836 } 7837 else if (name.equals("subDetail")) { 7838 return addSubDetail(); 7839 } 7840 else 7841 return super.addChild(name); 7842 } 7843 7844 public DetailComponent copy() { 7845 DetailComponent dst = new DetailComponent(); 7846 copyValues(dst); 7847 return dst; 7848 } 7849 7850 public void copyValues(DetailComponent dst) { 7851 super.copyValues(dst); 7852 dst.sequence = sequence == null ? null : sequence.copy(); 7853 if (traceNumber != null) { 7854 dst.traceNumber = new ArrayList<Identifier>(); 7855 for (Identifier i : traceNumber) 7856 dst.traceNumber.add(i.copy()); 7857 }; 7858 dst.revenue = revenue == null ? null : revenue.copy(); 7859 dst.category = category == null ? null : category.copy(); 7860 dst.productOrService = productOrService == null ? null : productOrService.copy(); 7861 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 7862 if (modifier != null) { 7863 dst.modifier = new ArrayList<CodeableConcept>(); 7864 for (CodeableConcept i : modifier) 7865 dst.modifier.add(i.copy()); 7866 }; 7867 if (programCode != null) { 7868 dst.programCode = new ArrayList<CodeableConcept>(); 7869 for (CodeableConcept i : programCode) 7870 dst.programCode.add(i.copy()); 7871 }; 7872 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 7873 dst.quantity = quantity == null ? null : quantity.copy(); 7874 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 7875 dst.factor = factor == null ? null : factor.copy(); 7876 dst.tax = tax == null ? null : tax.copy(); 7877 dst.net = net == null ? null : net.copy(); 7878 if (udi != null) { 7879 dst.udi = new ArrayList<Reference>(); 7880 for (Reference i : udi) 7881 dst.udi.add(i.copy()); 7882 }; 7883 if (noteNumber != null) { 7884 dst.noteNumber = new ArrayList<PositiveIntType>(); 7885 for (PositiveIntType i : noteNumber) 7886 dst.noteNumber.add(i.copy()); 7887 }; 7888 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 7889 if (adjudication != null) { 7890 dst.adjudication = new ArrayList<AdjudicationComponent>(); 7891 for (AdjudicationComponent i : adjudication) 7892 dst.adjudication.add(i.copy()); 7893 }; 7894 if (subDetail != null) { 7895 dst.subDetail = new ArrayList<SubDetailComponent>(); 7896 for (SubDetailComponent i : subDetail) 7897 dst.subDetail.add(i.copy()); 7898 }; 7899 } 7900 7901 @Override 7902 public boolean equalsDeep(Base other_) { 7903 if (!super.equalsDeep(other_)) 7904 return false; 7905 if (!(other_ instanceof DetailComponent)) 7906 return false; 7907 DetailComponent o = (DetailComponent) other_; 7908 return compareDeep(sequence, o.sequence, true) && compareDeep(traceNumber, o.traceNumber, true) 7909 && compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true) 7910 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true) 7911 && compareDeep(programCode, o.programCode, true) && compareDeep(patientPaid, o.patientPaid, true) 7912 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 7913 && compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) 7914 && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true) 7915 && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) 7916 ; 7917 } 7918 7919 @Override 7920 public boolean equalsShallow(Base other_) { 7921 if (!super.equalsShallow(other_)) 7922 return false; 7923 if (!(other_ instanceof DetailComponent)) 7924 return false; 7925 DetailComponent o = (DetailComponent) other_; 7926 return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(noteNumber, o.noteNumber, true) 7927 ; 7928 } 7929 7930 public boolean isEmpty() { 7931 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, traceNumber, revenue 7932 , category, productOrService, productOrServiceEnd, modifier, programCode, patientPaid 7933 , quantity, unitPrice, factor, tax, net, udi, noteNumber, reviewOutcome, adjudication 7934 , subDetail); 7935 } 7936 7937 public String fhirType() { 7938 return "ExplanationOfBenefit.item.detail"; 7939 7940 } 7941 7942 } 7943 7944 @Block() 7945 public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement { 7946 /** 7947 * A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 7948 */ 7949 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 7950 @Description(shortDefinition="Product or service provided", formalDefinition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." ) 7951 protected PositiveIntType sequence; 7952 7953 /** 7954 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 7955 */ 7956 @Child(name = "traceNumber", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7957 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 7958 protected List<Identifier> traceNumber; 7959 7960 /** 7961 * The type of revenue or cost center providing the product and/or service. 7962 */ 7963 @Child(name = "revenue", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 7964 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 7965 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 7966 protected CodeableConcept revenue; 7967 7968 /** 7969 * Code to identify the general type of benefits under which products and services are provided. 7970 */ 7971 @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 7972 @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." ) 7973 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory") 7974 protected CodeableConcept category; 7975 7976 /** 7977 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 7978 */ 7979 @Child(name = "productOrService", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 7980 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 7981 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 7982 protected CodeableConcept productOrService; 7983 7984 /** 7985 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 7986 */ 7987 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 7988 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 7989 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 7990 protected CodeableConcept productOrServiceEnd; 7991 7992 /** 7993 * Item typification or modifiers codes to convey additional context for the product or service. 7994 */ 7995 @Child(name = "modifier", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7996 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 7997 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 7998 protected List<CodeableConcept> modifier; 7999 8000 /** 8001 * Identifies the program under which this may be recovered. 8002 */ 8003 @Child(name = "programCode", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8004 @Description(shortDefinition="Program the product or service is provided under", formalDefinition="Identifies the program under which this may be recovered." ) 8005 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") 8006 protected List<CodeableConcept> programCode; 8007 8008 /** 8009 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 8010 */ 8011 @Child(name = "patientPaid", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false) 8012 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 8013 protected Money patientPaid; 8014 8015 /** 8016 * The number of repetitions of a service or product. 8017 */ 8018 @Child(name = "quantity", type = {Quantity.class}, order=10, min=0, max=1, modifier=false, summary=false) 8019 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 8020 protected Quantity quantity; 8021 8022 /** 8023 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 8024 */ 8025 @Child(name = "unitPrice", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) 8026 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 8027 protected Money unitPrice; 8028 8029 /** 8030 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 8031 */ 8032 @Child(name = "factor", type = {DecimalType.class}, order=12, min=0, max=1, modifier=false, summary=false) 8033 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 8034 protected DecimalType factor; 8035 8036 /** 8037 * The total of taxes applicable for this product or service. 8038 */ 8039 @Child(name = "tax", type = {Money.class}, order=13, min=0, max=1, modifier=false, summary=false) 8040 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 8041 protected Money tax; 8042 8043 /** 8044 * The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor. 8045 */ 8046 @Child(name = "net", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=false) 8047 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor." ) 8048 protected Money net; 8049 8050 /** 8051 * Unique Device Identifiers associated with this line item. 8052 */ 8053 @Child(name = "udi", type = {Device.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8054 @Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." ) 8055 protected List<Reference> udi; 8056 8057 /** 8058 * The numbers associated with notes below which apply to the adjudication of this item. 8059 */ 8060 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8061 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 8062 protected List<PositiveIntType> noteNumber; 8063 8064 /** 8065 * The high-level results of the adjudication if adjudication has been performed. 8066 */ 8067 @Child(name = "reviewOutcome", type = {ItemReviewOutcomeComponent.class}, order=17, min=0, max=1, modifier=false, summary=false) 8068 @Description(shortDefinition="Subdetail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 8069 protected ItemReviewOutcomeComponent reviewOutcome; 8070 8071 /** 8072 * The adjudication results. 8073 */ 8074 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8075 @Description(shortDefinition="Subdetail level adjudication details", formalDefinition="The adjudication results." ) 8076 protected List<AdjudicationComponent> adjudication; 8077 8078 private static final long serialVersionUID = -560048316L; 8079 8080 /** 8081 * Constructor 8082 */ 8083 public SubDetailComponent() { 8084 super(); 8085 } 8086 8087 /** 8088 * Constructor 8089 */ 8090 public SubDetailComponent(int sequence) { 8091 super(); 8092 this.setSequence(sequence); 8093 } 8094 8095 /** 8096 * @return {@link #sequence} (A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 8097 */ 8098 public PositiveIntType getSequenceElement() { 8099 if (this.sequence == null) 8100 if (Configuration.errorOnAutoCreate()) 8101 throw new Error("Attempt to auto-create SubDetailComponent.sequence"); 8102 else if (Configuration.doAutoCreate()) 8103 this.sequence = new PositiveIntType(); // bb 8104 return this.sequence; 8105 } 8106 8107 public boolean hasSequenceElement() { 8108 return this.sequence != null && !this.sequence.isEmpty(); 8109 } 8110 8111 public boolean hasSequence() { 8112 return this.sequence != null && !this.sequence.isEmpty(); 8113 } 8114 8115 /** 8116 * @param value {@link #sequence} (A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 8117 */ 8118 public SubDetailComponent setSequenceElement(PositiveIntType value) { 8119 this.sequence = value; 8120 return this; 8121 } 8122 8123 /** 8124 * @return A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 8125 */ 8126 public int getSequence() { 8127 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 8128 } 8129 8130 /** 8131 * @param value A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. 8132 */ 8133 public SubDetailComponent setSequence(int value) { 8134 if (this.sequence == null) 8135 this.sequence = new PositiveIntType(); 8136 this.sequence.setValue(value); 8137 return this; 8138 } 8139 8140 /** 8141 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 8142 */ 8143 public List<Identifier> getTraceNumber() { 8144 if (this.traceNumber == null) 8145 this.traceNumber = new ArrayList<Identifier>(); 8146 return this.traceNumber; 8147 } 8148 8149 /** 8150 * @return Returns a reference to <code>this</code> for easy method chaining 8151 */ 8152 public SubDetailComponent setTraceNumber(List<Identifier> theTraceNumber) { 8153 this.traceNumber = theTraceNumber; 8154 return this; 8155 } 8156 8157 public boolean hasTraceNumber() { 8158 if (this.traceNumber == null) 8159 return false; 8160 for (Identifier item : this.traceNumber) 8161 if (!item.isEmpty()) 8162 return true; 8163 return false; 8164 } 8165 8166 public Identifier addTraceNumber() { //3 8167 Identifier t = new Identifier(); 8168 if (this.traceNumber == null) 8169 this.traceNumber = new ArrayList<Identifier>(); 8170 this.traceNumber.add(t); 8171 return t; 8172 } 8173 8174 public SubDetailComponent addTraceNumber(Identifier t) { //3 8175 if (t == null) 8176 return this; 8177 if (this.traceNumber == null) 8178 this.traceNumber = new ArrayList<Identifier>(); 8179 this.traceNumber.add(t); 8180 return this; 8181 } 8182 8183 /** 8184 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 8185 */ 8186 public Identifier getTraceNumberFirstRep() { 8187 if (getTraceNumber().isEmpty()) { 8188 addTraceNumber(); 8189 } 8190 return getTraceNumber().get(0); 8191 } 8192 8193 /** 8194 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 8195 */ 8196 public CodeableConcept getRevenue() { 8197 if (this.revenue == null) 8198 if (Configuration.errorOnAutoCreate()) 8199 throw new Error("Attempt to auto-create SubDetailComponent.revenue"); 8200 else if (Configuration.doAutoCreate()) 8201 this.revenue = new CodeableConcept(); // cc 8202 return this.revenue; 8203 } 8204 8205 public boolean hasRevenue() { 8206 return this.revenue != null && !this.revenue.isEmpty(); 8207 } 8208 8209 /** 8210 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 8211 */ 8212 public SubDetailComponent setRevenue(CodeableConcept value) { 8213 this.revenue = value; 8214 return this; 8215 } 8216 8217 /** 8218 * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 8219 */ 8220 public CodeableConcept getCategory() { 8221 if (this.category == null) 8222 if (Configuration.errorOnAutoCreate()) 8223 throw new Error("Attempt to auto-create SubDetailComponent.category"); 8224 else if (Configuration.doAutoCreate()) 8225 this.category = new CodeableConcept(); // cc 8226 return this.category; 8227 } 8228 8229 public boolean hasCategory() { 8230 return this.category != null && !this.category.isEmpty(); 8231 } 8232 8233 /** 8234 * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 8235 */ 8236 public SubDetailComponent setCategory(CodeableConcept value) { 8237 this.category = value; 8238 return this; 8239 } 8240 8241 /** 8242 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 8243 */ 8244 public CodeableConcept getProductOrService() { 8245 if (this.productOrService == null) 8246 if (Configuration.errorOnAutoCreate()) 8247 throw new Error("Attempt to auto-create SubDetailComponent.productOrService"); 8248 else if (Configuration.doAutoCreate()) 8249 this.productOrService = new CodeableConcept(); // cc 8250 return this.productOrService; 8251 } 8252 8253 public boolean hasProductOrService() { 8254 return this.productOrService != null && !this.productOrService.isEmpty(); 8255 } 8256 8257 /** 8258 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 8259 */ 8260 public SubDetailComponent setProductOrService(CodeableConcept value) { 8261 this.productOrService = value; 8262 return this; 8263 } 8264 8265 /** 8266 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 8267 */ 8268 public CodeableConcept getProductOrServiceEnd() { 8269 if (this.productOrServiceEnd == null) 8270 if (Configuration.errorOnAutoCreate()) 8271 throw new Error("Attempt to auto-create SubDetailComponent.productOrServiceEnd"); 8272 else if (Configuration.doAutoCreate()) 8273 this.productOrServiceEnd = new CodeableConcept(); // cc 8274 return this.productOrServiceEnd; 8275 } 8276 8277 public boolean hasProductOrServiceEnd() { 8278 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 8279 } 8280 8281 /** 8282 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 8283 */ 8284 public SubDetailComponent setProductOrServiceEnd(CodeableConcept value) { 8285 this.productOrServiceEnd = value; 8286 return this; 8287 } 8288 8289 /** 8290 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 8291 */ 8292 public List<CodeableConcept> getModifier() { 8293 if (this.modifier == null) 8294 this.modifier = new ArrayList<CodeableConcept>(); 8295 return this.modifier; 8296 } 8297 8298 /** 8299 * @return Returns a reference to <code>this</code> for easy method chaining 8300 */ 8301 public SubDetailComponent setModifier(List<CodeableConcept> theModifier) { 8302 this.modifier = theModifier; 8303 return this; 8304 } 8305 8306 public boolean hasModifier() { 8307 if (this.modifier == null) 8308 return false; 8309 for (CodeableConcept item : this.modifier) 8310 if (!item.isEmpty()) 8311 return true; 8312 return false; 8313 } 8314 8315 public CodeableConcept addModifier() { //3 8316 CodeableConcept t = new CodeableConcept(); 8317 if (this.modifier == null) 8318 this.modifier = new ArrayList<CodeableConcept>(); 8319 this.modifier.add(t); 8320 return t; 8321 } 8322 8323 public SubDetailComponent addModifier(CodeableConcept t) { //3 8324 if (t == null) 8325 return this; 8326 if (this.modifier == null) 8327 this.modifier = new ArrayList<CodeableConcept>(); 8328 this.modifier.add(t); 8329 return this; 8330 } 8331 8332 /** 8333 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 8334 */ 8335 public CodeableConcept getModifierFirstRep() { 8336 if (getModifier().isEmpty()) { 8337 addModifier(); 8338 } 8339 return getModifier().get(0); 8340 } 8341 8342 /** 8343 * @return {@link #programCode} (Identifies the program under which this may be recovered.) 8344 */ 8345 public List<CodeableConcept> getProgramCode() { 8346 if (this.programCode == null) 8347 this.programCode = new ArrayList<CodeableConcept>(); 8348 return this.programCode; 8349 } 8350 8351 /** 8352 * @return Returns a reference to <code>this</code> for easy method chaining 8353 */ 8354 public SubDetailComponent setProgramCode(List<CodeableConcept> theProgramCode) { 8355 this.programCode = theProgramCode; 8356 return this; 8357 } 8358 8359 public boolean hasProgramCode() { 8360 if (this.programCode == null) 8361 return false; 8362 for (CodeableConcept item : this.programCode) 8363 if (!item.isEmpty()) 8364 return true; 8365 return false; 8366 } 8367 8368 public CodeableConcept addProgramCode() { //3 8369 CodeableConcept t = new CodeableConcept(); 8370 if (this.programCode == null) 8371 this.programCode = new ArrayList<CodeableConcept>(); 8372 this.programCode.add(t); 8373 return t; 8374 } 8375 8376 public SubDetailComponent addProgramCode(CodeableConcept t) { //3 8377 if (t == null) 8378 return this; 8379 if (this.programCode == null) 8380 this.programCode = new ArrayList<CodeableConcept>(); 8381 this.programCode.add(t); 8382 return this; 8383 } 8384 8385 /** 8386 * @return The first repetition of repeating field {@link #programCode}, creating it if it does not already exist {3} 8387 */ 8388 public CodeableConcept getProgramCodeFirstRep() { 8389 if (getProgramCode().isEmpty()) { 8390 addProgramCode(); 8391 } 8392 return getProgramCode().get(0); 8393 } 8394 8395 /** 8396 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 8397 */ 8398 public Money getPatientPaid() { 8399 if (this.patientPaid == null) 8400 if (Configuration.errorOnAutoCreate()) 8401 throw new Error("Attempt to auto-create SubDetailComponent.patientPaid"); 8402 else if (Configuration.doAutoCreate()) 8403 this.patientPaid = new Money(); // cc 8404 return this.patientPaid; 8405 } 8406 8407 public boolean hasPatientPaid() { 8408 return this.patientPaid != null && !this.patientPaid.isEmpty(); 8409 } 8410 8411 /** 8412 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 8413 */ 8414 public SubDetailComponent setPatientPaid(Money value) { 8415 this.patientPaid = value; 8416 return this; 8417 } 8418 8419 /** 8420 * @return {@link #quantity} (The number of repetitions of a service or product.) 8421 */ 8422 public Quantity getQuantity() { 8423 if (this.quantity == null) 8424 if (Configuration.errorOnAutoCreate()) 8425 throw new Error("Attempt to auto-create SubDetailComponent.quantity"); 8426 else if (Configuration.doAutoCreate()) 8427 this.quantity = new Quantity(); // cc 8428 return this.quantity; 8429 } 8430 8431 public boolean hasQuantity() { 8432 return this.quantity != null && !this.quantity.isEmpty(); 8433 } 8434 8435 /** 8436 * @param value {@link #quantity} (The number of repetitions of a service or product.) 8437 */ 8438 public SubDetailComponent setQuantity(Quantity value) { 8439 this.quantity = value; 8440 return this; 8441 } 8442 8443 /** 8444 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 8445 */ 8446 public Money getUnitPrice() { 8447 if (this.unitPrice == null) 8448 if (Configuration.errorOnAutoCreate()) 8449 throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); 8450 else if (Configuration.doAutoCreate()) 8451 this.unitPrice = new Money(); // cc 8452 return this.unitPrice; 8453 } 8454 8455 public boolean hasUnitPrice() { 8456 return this.unitPrice != null && !this.unitPrice.isEmpty(); 8457 } 8458 8459 /** 8460 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 8461 */ 8462 public SubDetailComponent setUnitPrice(Money value) { 8463 this.unitPrice = value; 8464 return this; 8465 } 8466 8467 /** 8468 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 8469 */ 8470 public DecimalType getFactorElement() { 8471 if (this.factor == null) 8472 if (Configuration.errorOnAutoCreate()) 8473 throw new Error("Attempt to auto-create SubDetailComponent.factor"); 8474 else if (Configuration.doAutoCreate()) 8475 this.factor = new DecimalType(); // bb 8476 return this.factor; 8477 } 8478 8479 public boolean hasFactorElement() { 8480 return this.factor != null && !this.factor.isEmpty(); 8481 } 8482 8483 public boolean hasFactor() { 8484 return this.factor != null && !this.factor.isEmpty(); 8485 } 8486 8487 /** 8488 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 8489 */ 8490 public SubDetailComponent setFactorElement(DecimalType value) { 8491 this.factor = value; 8492 return this; 8493 } 8494 8495 /** 8496 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 8497 */ 8498 public BigDecimal getFactor() { 8499 return this.factor == null ? null : this.factor.getValue(); 8500 } 8501 8502 /** 8503 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 8504 */ 8505 public SubDetailComponent setFactor(BigDecimal value) { 8506 if (value == null) 8507 this.factor = null; 8508 else { 8509 if (this.factor == null) 8510 this.factor = new DecimalType(); 8511 this.factor.setValue(value); 8512 } 8513 return this; 8514 } 8515 8516 /** 8517 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 8518 */ 8519 public SubDetailComponent setFactor(long value) { 8520 this.factor = new DecimalType(); 8521 this.factor.setValue(value); 8522 return this; 8523 } 8524 8525 /** 8526 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 8527 */ 8528 public SubDetailComponent setFactor(double value) { 8529 this.factor = new DecimalType(); 8530 this.factor.setValue(value); 8531 return this; 8532 } 8533 8534 /** 8535 * @return {@link #tax} (The total of taxes applicable for this product or service.) 8536 */ 8537 public Money getTax() { 8538 if (this.tax == null) 8539 if (Configuration.errorOnAutoCreate()) 8540 throw new Error("Attempt to auto-create SubDetailComponent.tax"); 8541 else if (Configuration.doAutoCreate()) 8542 this.tax = new Money(); // cc 8543 return this.tax; 8544 } 8545 8546 public boolean hasTax() { 8547 return this.tax != null && !this.tax.isEmpty(); 8548 } 8549 8550 /** 8551 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 8552 */ 8553 public SubDetailComponent setTax(Money value) { 8554 this.tax = value; 8555 return this; 8556 } 8557 8558 /** 8559 * @return {@link #net} (The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.) 8560 */ 8561 public Money getNet() { 8562 if (this.net == null) 8563 if (Configuration.errorOnAutoCreate()) 8564 throw new Error("Attempt to auto-create SubDetailComponent.net"); 8565 else if (Configuration.doAutoCreate()) 8566 this.net = new Money(); // cc 8567 return this.net; 8568 } 8569 8570 public boolean hasNet() { 8571 return this.net != null && !this.net.isEmpty(); 8572 } 8573 8574 /** 8575 * @param value {@link #net} (The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.) 8576 */ 8577 public SubDetailComponent setNet(Money value) { 8578 this.net = value; 8579 return this; 8580 } 8581 8582 /** 8583 * @return {@link #udi} (Unique Device Identifiers associated with this line item.) 8584 */ 8585 public List<Reference> getUdi() { 8586 if (this.udi == null) 8587 this.udi = new ArrayList<Reference>(); 8588 return this.udi; 8589 } 8590 8591 /** 8592 * @return Returns a reference to <code>this</code> for easy method chaining 8593 */ 8594 public SubDetailComponent setUdi(List<Reference> theUdi) { 8595 this.udi = theUdi; 8596 return this; 8597 } 8598 8599 public boolean hasUdi() { 8600 if (this.udi == null) 8601 return false; 8602 for (Reference item : this.udi) 8603 if (!item.isEmpty()) 8604 return true; 8605 return false; 8606 } 8607 8608 public Reference addUdi() { //3 8609 Reference t = new Reference(); 8610 if (this.udi == null) 8611 this.udi = new ArrayList<Reference>(); 8612 this.udi.add(t); 8613 return t; 8614 } 8615 8616 public SubDetailComponent addUdi(Reference t) { //3 8617 if (t == null) 8618 return this; 8619 if (this.udi == null) 8620 this.udi = new ArrayList<Reference>(); 8621 this.udi.add(t); 8622 return this; 8623 } 8624 8625 /** 8626 * @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3} 8627 */ 8628 public Reference getUdiFirstRep() { 8629 if (getUdi().isEmpty()) { 8630 addUdi(); 8631 } 8632 return getUdi().get(0); 8633 } 8634 8635 /** 8636 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 8637 */ 8638 public List<PositiveIntType> getNoteNumber() { 8639 if (this.noteNumber == null) 8640 this.noteNumber = new ArrayList<PositiveIntType>(); 8641 return this.noteNumber; 8642 } 8643 8644 /** 8645 * @return Returns a reference to <code>this</code> for easy method chaining 8646 */ 8647 public SubDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 8648 this.noteNumber = theNoteNumber; 8649 return this; 8650 } 8651 8652 public boolean hasNoteNumber() { 8653 if (this.noteNumber == null) 8654 return false; 8655 for (PositiveIntType item : this.noteNumber) 8656 if (!item.isEmpty()) 8657 return true; 8658 return false; 8659 } 8660 8661 /** 8662 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 8663 */ 8664 public PositiveIntType addNoteNumberElement() {//2 8665 PositiveIntType t = new PositiveIntType(); 8666 if (this.noteNumber == null) 8667 this.noteNumber = new ArrayList<PositiveIntType>(); 8668 this.noteNumber.add(t); 8669 return t; 8670 } 8671 8672 /** 8673 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 8674 */ 8675 public SubDetailComponent addNoteNumber(int value) { //1 8676 PositiveIntType t = new PositiveIntType(); 8677 t.setValue(value); 8678 if (this.noteNumber == null) 8679 this.noteNumber = new ArrayList<PositiveIntType>(); 8680 this.noteNumber.add(t); 8681 return this; 8682 } 8683 8684 /** 8685 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 8686 */ 8687 public boolean hasNoteNumber(int value) { 8688 if (this.noteNumber == null) 8689 return false; 8690 for (PositiveIntType v : this.noteNumber) 8691 if (v.getValue().equals(value)) // positiveInt 8692 return true; 8693 return false; 8694 } 8695 8696 /** 8697 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 8698 */ 8699 public ItemReviewOutcomeComponent getReviewOutcome() { 8700 if (this.reviewOutcome == null) 8701 if (Configuration.errorOnAutoCreate()) 8702 throw new Error("Attempt to auto-create SubDetailComponent.reviewOutcome"); 8703 else if (Configuration.doAutoCreate()) 8704 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 8705 return this.reviewOutcome; 8706 } 8707 8708 public boolean hasReviewOutcome() { 8709 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 8710 } 8711 8712 /** 8713 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 8714 */ 8715 public SubDetailComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 8716 this.reviewOutcome = value; 8717 return this; 8718 } 8719 8720 /** 8721 * @return {@link #adjudication} (The adjudication results.) 8722 */ 8723 public List<AdjudicationComponent> getAdjudication() { 8724 if (this.adjudication == null) 8725 this.adjudication = new ArrayList<AdjudicationComponent>(); 8726 return this.adjudication; 8727 } 8728 8729 /** 8730 * @return Returns a reference to <code>this</code> for easy method chaining 8731 */ 8732 public SubDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 8733 this.adjudication = theAdjudication; 8734 return this; 8735 } 8736 8737 public boolean hasAdjudication() { 8738 if (this.adjudication == null) 8739 return false; 8740 for (AdjudicationComponent item : this.adjudication) 8741 if (!item.isEmpty()) 8742 return true; 8743 return false; 8744 } 8745 8746 public AdjudicationComponent addAdjudication() { //3 8747 AdjudicationComponent t = new AdjudicationComponent(); 8748 if (this.adjudication == null) 8749 this.adjudication = new ArrayList<AdjudicationComponent>(); 8750 this.adjudication.add(t); 8751 return t; 8752 } 8753 8754 public SubDetailComponent addAdjudication(AdjudicationComponent t) { //3 8755 if (t == null) 8756 return this; 8757 if (this.adjudication == null) 8758 this.adjudication = new ArrayList<AdjudicationComponent>(); 8759 this.adjudication.add(t); 8760 return this; 8761 } 8762 8763 /** 8764 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 8765 */ 8766 public AdjudicationComponent getAdjudicationFirstRep() { 8767 if (getAdjudication().isEmpty()) { 8768 addAdjudication(); 8769 } 8770 return getAdjudication().get(0); 8771 } 8772 8773 protected void listChildren(List<Property> children) { 8774 super.listChildren(children); 8775 children.add(new Property("sequence", "positiveInt", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, 1, sequence)); 8776 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 8777 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 8778 children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category)); 8779 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 8780 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 8781 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 8782 children.add(new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode)); 8783 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 8784 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 8785 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 8786 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 8787 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 8788 children.add(new Property("net", "Money", "The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net)); 8789 children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 8790 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 8791 children.add(new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 8792 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 8793 } 8794 8795 @Override 8796 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8797 switch (_hash) { 8798 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, 1, sequence); 8799 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 8800 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 8801 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category); 8802 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 8803 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 8804 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 8805 case 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode); 8806 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 8807 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 8808 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 8809 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 8810 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 8811 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net); 8812 case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi); 8813 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 8814 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 8815 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 8816 default: return super.getNamedProperty(_hash, _name, _checkValid); 8817 } 8818 8819 } 8820 8821 @Override 8822 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8823 switch (hash) { 8824 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 8825 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 8826 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 8827 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 8828 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 8829 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 8830 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 8831 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept 8832 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 8833 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 8834 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 8835 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 8836 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 8837 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 8838 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 8839 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 8840 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 8841 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 8842 default: return super.getProperty(hash, name, checkValid); 8843 } 8844 8845 } 8846 8847 @Override 8848 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8849 switch (hash) { 8850 case 1349547969: // sequence 8851 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 8852 return value; 8853 case 82505966: // traceNumber 8854 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 8855 return value; 8856 case 1099842588: // revenue 8857 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8858 return value; 8859 case 50511102: // category 8860 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8861 return value; 8862 case 1957227299: // productOrService 8863 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8864 return value; 8865 case -717476168: // productOrServiceEnd 8866 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8867 return value; 8868 case -615513385: // modifier 8869 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 8870 return value; 8871 case 1010065041: // programCode 8872 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 8873 return value; 8874 case 525514609: // patientPaid 8875 this.patientPaid = TypeConvertor.castToMoney(value); // Money 8876 return value; 8877 case -1285004149: // quantity 8878 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 8879 return value; 8880 case -486196699: // unitPrice 8881 this.unitPrice = TypeConvertor.castToMoney(value); // Money 8882 return value; 8883 case -1282148017: // factor 8884 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 8885 return value; 8886 case 114603: // tax 8887 this.tax = TypeConvertor.castToMoney(value); // Money 8888 return value; 8889 case 108957: // net 8890 this.net = TypeConvertor.castToMoney(value); // Money 8891 return value; 8892 case 115642: // udi 8893 this.getUdi().add(TypeConvertor.castToReference(value)); // Reference 8894 return value; 8895 case -1110033957: // noteNumber 8896 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 8897 return value; 8898 case -51825446: // reviewOutcome 8899 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 8900 return value; 8901 case -231349275: // adjudication 8902 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 8903 return value; 8904 default: return super.setProperty(hash, name, value); 8905 } 8906 8907 } 8908 8909 @Override 8910 public Base setProperty(String name, Base value) throws FHIRException { 8911 if (name.equals("sequence")) { 8912 this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 8913 } else if (name.equals("traceNumber")) { 8914 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 8915 } else if (name.equals("revenue")) { 8916 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8917 } else if (name.equals("category")) { 8918 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8919 } else if (name.equals("productOrService")) { 8920 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8921 } else if (name.equals("productOrServiceEnd")) { 8922 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 8923 } else if (name.equals("modifier")) { 8924 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 8925 } else if (name.equals("programCode")) { 8926 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); 8927 } else if (name.equals("patientPaid")) { 8928 this.patientPaid = TypeConvertor.castToMoney(value); // Money 8929 } else if (name.equals("quantity")) { 8930 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 8931 } else if (name.equals("unitPrice")) { 8932 this.unitPrice = TypeConvertor.castToMoney(value); // Money 8933 } else if (name.equals("factor")) { 8934 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 8935 } else if (name.equals("tax")) { 8936 this.tax = TypeConvertor.castToMoney(value); // Money 8937 } else if (name.equals("net")) { 8938 this.net = TypeConvertor.castToMoney(value); // Money 8939 } else if (name.equals("udi")) { 8940 this.getUdi().add(TypeConvertor.castToReference(value)); 8941 } else if (name.equals("noteNumber")) { 8942 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 8943 } else if (name.equals("reviewOutcome")) { 8944 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 8945 } else if (name.equals("adjudication")) { 8946 this.getAdjudication().add((AdjudicationComponent) value); 8947 } else 8948 return super.setProperty(name, value); 8949 return value; 8950 } 8951 8952 @Override 8953 public void removeChild(String name, Base value) throws FHIRException { 8954 if (name.equals("sequence")) { 8955 this.sequence = null; 8956 } else if (name.equals("traceNumber")) { 8957 this.getTraceNumber().remove(value); 8958 } else if (name.equals("revenue")) { 8959 this.revenue = null; 8960 } else if (name.equals("category")) { 8961 this.category = null; 8962 } else if (name.equals("productOrService")) { 8963 this.productOrService = null; 8964 } else if (name.equals("productOrServiceEnd")) { 8965 this.productOrServiceEnd = null; 8966 } else if (name.equals("modifier")) { 8967 this.getModifier().remove(value); 8968 } else if (name.equals("programCode")) { 8969 this.getProgramCode().remove(value); 8970 } else if (name.equals("patientPaid")) { 8971 this.patientPaid = null; 8972 } else if (name.equals("quantity")) { 8973 this.quantity = null; 8974 } else if (name.equals("unitPrice")) { 8975 this.unitPrice = null; 8976 } else if (name.equals("factor")) { 8977 this.factor = null; 8978 } else if (name.equals("tax")) { 8979 this.tax = null; 8980 } else if (name.equals("net")) { 8981 this.net = null; 8982 } else if (name.equals("udi")) { 8983 this.getUdi().remove(value); 8984 } else if (name.equals("noteNumber")) { 8985 this.getNoteNumber().remove(value); 8986 } else if (name.equals("reviewOutcome")) { 8987 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 8988 } else if (name.equals("adjudication")) { 8989 this.getAdjudication().remove((AdjudicationComponent) value); 8990 } else 8991 super.removeChild(name, value); 8992 8993 } 8994 8995 @Override 8996 public Base makeProperty(int hash, String name) throws FHIRException { 8997 switch (hash) { 8998 case 1349547969: return getSequenceElement(); 8999 case 82505966: return addTraceNumber(); 9000 case 1099842588: return getRevenue(); 9001 case 50511102: return getCategory(); 9002 case 1957227299: return getProductOrService(); 9003 case -717476168: return getProductOrServiceEnd(); 9004 case -615513385: return addModifier(); 9005 case 1010065041: return addProgramCode(); 9006 case 525514609: return getPatientPaid(); 9007 case -1285004149: return getQuantity(); 9008 case -486196699: return getUnitPrice(); 9009 case -1282148017: return getFactorElement(); 9010 case 114603: return getTax(); 9011 case 108957: return getNet(); 9012 case 115642: return addUdi(); 9013 case -1110033957: return addNoteNumberElement(); 9014 case -51825446: return getReviewOutcome(); 9015 case -231349275: return addAdjudication(); 9016 default: return super.makeProperty(hash, name); 9017 } 9018 9019 } 9020 9021 @Override 9022 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9023 switch (hash) { 9024 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 9025 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 9026 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 9027 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 9028 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 9029 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 9030 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 9031 case 1010065041: /*programCode*/ return new String[] {"CodeableConcept"}; 9032 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 9033 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 9034 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 9035 case -1282148017: /*factor*/ return new String[] {"decimal"}; 9036 case 114603: /*tax*/ return new String[] {"Money"}; 9037 case 108957: /*net*/ return new String[] {"Money"}; 9038 case 115642: /*udi*/ return new String[] {"Reference"}; 9039 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 9040 case -51825446: /*reviewOutcome*/ return new String[] {"@ExplanationOfBenefit.item.reviewOutcome"}; 9041 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 9042 default: return super.getTypesForProperty(hash, name); 9043 } 9044 9045 } 9046 9047 @Override 9048 public Base addChild(String name) throws FHIRException { 9049 if (name.equals("sequence")) { 9050 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.subDetail.sequence"); 9051 } 9052 else if (name.equals("traceNumber")) { 9053 return addTraceNumber(); 9054 } 9055 else if (name.equals("revenue")) { 9056 this.revenue = new CodeableConcept(); 9057 return this.revenue; 9058 } 9059 else if (name.equals("category")) { 9060 this.category = new CodeableConcept(); 9061 return this.category; 9062 } 9063 else if (name.equals("productOrService")) { 9064 this.productOrService = new CodeableConcept(); 9065 return this.productOrService; 9066 } 9067 else if (name.equals("productOrServiceEnd")) { 9068 this.productOrServiceEnd = new CodeableConcept(); 9069 return this.productOrServiceEnd; 9070 } 9071 else if (name.equals("modifier")) { 9072 return addModifier(); 9073 } 9074 else if (name.equals("programCode")) { 9075 return addProgramCode(); 9076 } 9077 else if (name.equals("patientPaid")) { 9078 this.patientPaid = new Money(); 9079 return this.patientPaid; 9080 } 9081 else if (name.equals("quantity")) { 9082 this.quantity = new Quantity(); 9083 return this.quantity; 9084 } 9085 else if (name.equals("unitPrice")) { 9086 this.unitPrice = new Money(); 9087 return this.unitPrice; 9088 } 9089 else if (name.equals("factor")) { 9090 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.subDetail.factor"); 9091 } 9092 else if (name.equals("tax")) { 9093 this.tax = new Money(); 9094 return this.tax; 9095 } 9096 else if (name.equals("net")) { 9097 this.net = new Money(); 9098 return this.net; 9099 } 9100 else if (name.equals("udi")) { 9101 return addUdi(); 9102 } 9103 else if (name.equals("noteNumber")) { 9104 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.item.detail.subDetail.noteNumber"); 9105 } 9106 else if (name.equals("reviewOutcome")) { 9107 this.reviewOutcome = new ItemReviewOutcomeComponent(); 9108 return this.reviewOutcome; 9109 } 9110 else if (name.equals("adjudication")) { 9111 return addAdjudication(); 9112 } 9113 else 9114 return super.addChild(name); 9115 } 9116 9117 public SubDetailComponent copy() { 9118 SubDetailComponent dst = new SubDetailComponent(); 9119 copyValues(dst); 9120 return dst; 9121 } 9122 9123 public void copyValues(SubDetailComponent dst) { 9124 super.copyValues(dst); 9125 dst.sequence = sequence == null ? null : sequence.copy(); 9126 if (traceNumber != null) { 9127 dst.traceNumber = new ArrayList<Identifier>(); 9128 for (Identifier i : traceNumber) 9129 dst.traceNumber.add(i.copy()); 9130 }; 9131 dst.revenue = revenue == null ? null : revenue.copy(); 9132 dst.category = category == null ? null : category.copy(); 9133 dst.productOrService = productOrService == null ? null : productOrService.copy(); 9134 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 9135 if (modifier != null) { 9136 dst.modifier = new ArrayList<CodeableConcept>(); 9137 for (CodeableConcept i : modifier) 9138 dst.modifier.add(i.copy()); 9139 }; 9140 if (programCode != null) { 9141 dst.programCode = new ArrayList<CodeableConcept>(); 9142 for (CodeableConcept i : programCode) 9143 dst.programCode.add(i.copy()); 9144 }; 9145 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 9146 dst.quantity = quantity == null ? null : quantity.copy(); 9147 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 9148 dst.factor = factor == null ? null : factor.copy(); 9149 dst.tax = tax == null ? null : tax.copy(); 9150 dst.net = net == null ? null : net.copy(); 9151 if (udi != null) { 9152 dst.udi = new ArrayList<Reference>(); 9153 for (Reference i : udi) 9154 dst.udi.add(i.copy()); 9155 }; 9156 if (noteNumber != null) { 9157 dst.noteNumber = new ArrayList<PositiveIntType>(); 9158 for (PositiveIntType i : noteNumber) 9159 dst.noteNumber.add(i.copy()); 9160 }; 9161 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 9162 if (adjudication != null) { 9163 dst.adjudication = new ArrayList<AdjudicationComponent>(); 9164 for (AdjudicationComponent i : adjudication) 9165 dst.adjudication.add(i.copy()); 9166 }; 9167 } 9168 9169 @Override 9170 public boolean equalsDeep(Base other_) { 9171 if (!super.equalsDeep(other_)) 9172 return false; 9173 if (!(other_ instanceof SubDetailComponent)) 9174 return false; 9175 SubDetailComponent o = (SubDetailComponent) other_; 9176 return compareDeep(sequence, o.sequence, true) && compareDeep(traceNumber, o.traceNumber, true) 9177 && compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true) 9178 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true) 9179 && compareDeep(programCode, o.programCode, true) && compareDeep(patientPaid, o.patientPaid, true) 9180 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 9181 && compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) 9182 && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true) 9183 && compareDeep(adjudication, o.adjudication, true); 9184 } 9185 9186 @Override 9187 public boolean equalsShallow(Base other_) { 9188 if (!super.equalsShallow(other_)) 9189 return false; 9190 if (!(other_ instanceof SubDetailComponent)) 9191 return false; 9192 SubDetailComponent o = (SubDetailComponent) other_; 9193 return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(noteNumber, o.noteNumber, true) 9194 ; 9195 } 9196 9197 public boolean isEmpty() { 9198 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, traceNumber, revenue 9199 , category, productOrService, productOrServiceEnd, modifier, programCode, patientPaid 9200 , quantity, unitPrice, factor, tax, net, udi, noteNumber, reviewOutcome, adjudication 9201 ); 9202 } 9203 9204 public String fhirType() { 9205 return "ExplanationOfBenefit.item.detail.subDetail"; 9206 9207 } 9208 9209 } 9210 9211 @Block() 9212 public static class AddedItemComponent extends BackboneElement implements IBaseBackboneElement { 9213 /** 9214 * Claim items which this service line is intended to replace. 9215 */ 9216 @Child(name = "itemSequence", type = {PositiveIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9217 @Description(shortDefinition="Item sequence number", formalDefinition="Claim items which this service line is intended to replace." ) 9218 protected List<PositiveIntType> itemSequence; 9219 9220 /** 9221 * The sequence number of the details within the claim item which this line is intended to replace. 9222 */ 9223 @Child(name = "detailSequence", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9224 @Description(shortDefinition="Detail sequence number", formalDefinition="The sequence number of the details within the claim item which this line is intended to replace." ) 9225 protected List<PositiveIntType> detailSequence; 9226 9227 /** 9228 * The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace. 9229 */ 9230 @Child(name = "subDetailSequence", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9231 @Description(shortDefinition="Subdetail sequence number", formalDefinition="The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace." ) 9232 protected List<PositiveIntType> subDetailSequence; 9233 9234 /** 9235 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 9236 */ 9237 @Child(name = "traceNumber", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9238 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 9239 protected List<Identifier> traceNumber; 9240 9241 /** 9242 * The providers who are authorized for the services rendered to the patient. 9243 */ 9244 @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9245 @Description(shortDefinition="Authorized providers", formalDefinition="The providers who are authorized for the services rendered to the patient." ) 9246 protected List<Reference> provider; 9247 9248 /** 9249 * The type of revenue or cost center providing the product and/or service. 9250 */ 9251 @Child(name = "revenue", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 9252 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 9253 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 9254 protected CodeableConcept revenue; 9255 9256 /** 9257 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 9258 */ 9259 @Child(name = "productOrService", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 9260 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 9261 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 9262 protected CodeableConcept productOrService; 9263 9264 /** 9265 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 9266 */ 9267 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 9268 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 9269 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 9270 protected CodeableConcept productOrServiceEnd; 9271 9272 /** 9273 * Request or Referral for Goods or Service to be rendered. 9274 */ 9275 @Child(name = "request", type = {DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class, SupplyRequest.class, VisionPrescription.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9276 @Description(shortDefinition="Request or Referral for Service", formalDefinition="Request or Referral for Goods or Service to be rendered." ) 9277 protected List<Reference> request; 9278 9279 /** 9280 * Item typification or modifiers codes to convey additional context for the product or service. 9281 */ 9282 @Child(name = "modifier", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9283 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 9284 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 9285 protected List<CodeableConcept> modifier; 9286 9287 /** 9288 * Identifies the program under which this may be recovered. 9289 */ 9290 @Child(name = "programCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9291 @Description(shortDefinition="Program the product or service is provided under", formalDefinition="Identifies the program under which this may be recovered." ) 9292 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code") 9293 protected List<CodeableConcept> programCode; 9294 9295 /** 9296 * The date or dates when the service or product was supplied, performed or completed. 9297 */ 9298 @Child(name = "serviced", type = {DateType.class, Period.class}, order=12, min=0, max=1, modifier=false, summary=false) 9299 @Description(shortDefinition="Date or dates of service or product delivery", formalDefinition="The date or dates when the service or product was supplied, performed or completed." ) 9300 protected DataType serviced; 9301 9302 /** 9303 * Where the product or service was provided. 9304 */ 9305 @Child(name = "location", type = {CodeableConcept.class, Address.class, Location.class}, order=13, min=0, max=1, modifier=false, summary=false) 9306 @Description(shortDefinition="Place of service or where product was supplied", formalDefinition="Where the product or service was provided." ) 9307 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-place") 9308 protected DataType location; 9309 9310 /** 9311 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 9312 */ 9313 @Child(name = "patientPaid", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=false) 9314 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 9315 protected Money patientPaid; 9316 9317 /** 9318 * The number of repetitions of a service or product. 9319 */ 9320 @Child(name = "quantity", type = {Quantity.class}, order=15, min=0, max=1, modifier=false, summary=false) 9321 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 9322 protected Quantity quantity; 9323 9324 /** 9325 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 9326 */ 9327 @Child(name = "unitPrice", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=false) 9328 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 9329 protected Money unitPrice; 9330 9331 /** 9332 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 9333 */ 9334 @Child(name = "factor", type = {DecimalType.class}, order=17, min=0, max=1, modifier=false, summary=false) 9335 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 9336 protected DecimalType factor; 9337 9338 /** 9339 * The total of taxes applicable for this product or service. 9340 */ 9341 @Child(name = "tax", type = {Money.class}, order=18, min=0, max=1, modifier=false, summary=false) 9342 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 9343 protected Money tax; 9344 9345 /** 9346 * The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor. 9347 */ 9348 @Child(name = "net", type = {Money.class}, order=19, min=0, max=1, modifier=false, summary=false) 9349 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor." ) 9350 protected Money net; 9351 9352 /** 9353 * Physical location where the service is performed or applies. 9354 */ 9355 @Child(name = "bodySite", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9356 @Description(shortDefinition="Anatomical location", formalDefinition="Physical location where the service is performed or applies." ) 9357 protected List<AddedItemBodySiteComponent> bodySite; 9358 9359 /** 9360 * The numbers associated with notes below which apply to the adjudication of this item. 9361 */ 9362 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9363 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 9364 protected List<PositiveIntType> noteNumber; 9365 9366 /** 9367 * The high-level results of the adjudication if adjudication has been performed. 9368 */ 9369 @Child(name = "reviewOutcome", type = {ItemReviewOutcomeComponent.class}, order=22, min=0, max=1, modifier=false, summary=false) 9370 @Description(shortDefinition="Additem level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 9371 protected ItemReviewOutcomeComponent reviewOutcome; 9372 9373 /** 9374 * The adjudication results. 9375 */ 9376 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9377 @Description(shortDefinition="Added items adjudication", formalDefinition="The adjudication results." ) 9378 protected List<AdjudicationComponent> adjudication; 9379 9380 /** 9381 * The second-tier service adjudications for payor added services. 9382 */ 9383 @Child(name = "detail", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9384 @Description(shortDefinition="Insurer added line items", formalDefinition="The second-tier service adjudications for payor added services." ) 9385 protected List<AddedItemDetailComponent> detail; 9386 9387 private static final long serialVersionUID = -1942324543L; 9388 9389 /** 9390 * Constructor 9391 */ 9392 public AddedItemComponent() { 9393 super(); 9394 } 9395 9396 /** 9397 * @return {@link #itemSequence} (Claim items which this service line is intended to replace.) 9398 */ 9399 public List<PositiveIntType> getItemSequence() { 9400 if (this.itemSequence == null) 9401 this.itemSequence = new ArrayList<PositiveIntType>(); 9402 return this.itemSequence; 9403 } 9404 9405 /** 9406 * @return Returns a reference to <code>this</code> for easy method chaining 9407 */ 9408 public AddedItemComponent setItemSequence(List<PositiveIntType> theItemSequence) { 9409 this.itemSequence = theItemSequence; 9410 return this; 9411 } 9412 9413 public boolean hasItemSequence() { 9414 if (this.itemSequence == null) 9415 return false; 9416 for (PositiveIntType item : this.itemSequence) 9417 if (!item.isEmpty()) 9418 return true; 9419 return false; 9420 } 9421 9422 /** 9423 * @return {@link #itemSequence} (Claim items which this service line is intended to replace.) 9424 */ 9425 public PositiveIntType addItemSequenceElement() {//2 9426 PositiveIntType t = new PositiveIntType(); 9427 if (this.itemSequence == null) 9428 this.itemSequence = new ArrayList<PositiveIntType>(); 9429 this.itemSequence.add(t); 9430 return t; 9431 } 9432 9433 /** 9434 * @param value {@link #itemSequence} (Claim items which this service line is intended to replace.) 9435 */ 9436 public AddedItemComponent addItemSequence(int value) { //1 9437 PositiveIntType t = new PositiveIntType(); 9438 t.setValue(value); 9439 if (this.itemSequence == null) 9440 this.itemSequence = new ArrayList<PositiveIntType>(); 9441 this.itemSequence.add(t); 9442 return this; 9443 } 9444 9445 /** 9446 * @param value {@link #itemSequence} (Claim items which this service line is intended to replace.) 9447 */ 9448 public boolean hasItemSequence(int value) { 9449 if (this.itemSequence == null) 9450 return false; 9451 for (PositiveIntType v : this.itemSequence) 9452 if (v.getValue().equals(value)) // positiveInt 9453 return true; 9454 return false; 9455 } 9456 9457 /** 9458 * @return {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.) 9459 */ 9460 public List<PositiveIntType> getDetailSequence() { 9461 if (this.detailSequence == null) 9462 this.detailSequence = new ArrayList<PositiveIntType>(); 9463 return this.detailSequence; 9464 } 9465 9466 /** 9467 * @return Returns a reference to <code>this</code> for easy method chaining 9468 */ 9469 public AddedItemComponent setDetailSequence(List<PositiveIntType> theDetailSequence) { 9470 this.detailSequence = theDetailSequence; 9471 return this; 9472 } 9473 9474 public boolean hasDetailSequence() { 9475 if (this.detailSequence == null) 9476 return false; 9477 for (PositiveIntType item : this.detailSequence) 9478 if (!item.isEmpty()) 9479 return true; 9480 return false; 9481 } 9482 9483 /** 9484 * @return {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.) 9485 */ 9486 public PositiveIntType addDetailSequenceElement() {//2 9487 PositiveIntType t = new PositiveIntType(); 9488 if (this.detailSequence == null) 9489 this.detailSequence = new ArrayList<PositiveIntType>(); 9490 this.detailSequence.add(t); 9491 return t; 9492 } 9493 9494 /** 9495 * @param value {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.) 9496 */ 9497 public AddedItemComponent addDetailSequence(int value) { //1 9498 PositiveIntType t = new PositiveIntType(); 9499 t.setValue(value); 9500 if (this.detailSequence == null) 9501 this.detailSequence = new ArrayList<PositiveIntType>(); 9502 this.detailSequence.add(t); 9503 return this; 9504 } 9505 9506 /** 9507 * @param value {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.) 9508 */ 9509 public boolean hasDetailSequence(int value) { 9510 if (this.detailSequence == null) 9511 return false; 9512 for (PositiveIntType v : this.detailSequence) 9513 if (v.getValue().equals(value)) // positiveInt 9514 return true; 9515 return false; 9516 } 9517 9518 /** 9519 * @return {@link #subDetailSequence} (The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.) 9520 */ 9521 public List<PositiveIntType> getSubDetailSequence() { 9522 if (this.subDetailSequence == null) 9523 this.subDetailSequence = new ArrayList<PositiveIntType>(); 9524 return this.subDetailSequence; 9525 } 9526 9527 /** 9528 * @return Returns a reference to <code>this</code> for easy method chaining 9529 */ 9530 public AddedItemComponent setSubDetailSequence(List<PositiveIntType> theSubDetailSequence) { 9531 this.subDetailSequence = theSubDetailSequence; 9532 return this; 9533 } 9534 9535 public boolean hasSubDetailSequence() { 9536 if (this.subDetailSequence == null) 9537 return false; 9538 for (PositiveIntType item : this.subDetailSequence) 9539 if (!item.isEmpty()) 9540 return true; 9541 return false; 9542 } 9543 9544 /** 9545 * @return {@link #subDetailSequence} (The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.) 9546 */ 9547 public PositiveIntType addSubDetailSequenceElement() {//2 9548 PositiveIntType t = new PositiveIntType(); 9549 if (this.subDetailSequence == null) 9550 this.subDetailSequence = new ArrayList<PositiveIntType>(); 9551 this.subDetailSequence.add(t); 9552 return t; 9553 } 9554 9555 /** 9556 * @param value {@link #subDetailSequence} (The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.) 9557 */ 9558 public AddedItemComponent addSubDetailSequence(int value) { //1 9559 PositiveIntType t = new PositiveIntType(); 9560 t.setValue(value); 9561 if (this.subDetailSequence == null) 9562 this.subDetailSequence = new ArrayList<PositiveIntType>(); 9563 this.subDetailSequence.add(t); 9564 return this; 9565 } 9566 9567 /** 9568 * @param value {@link #subDetailSequence} (The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.) 9569 */ 9570 public boolean hasSubDetailSequence(int value) { 9571 if (this.subDetailSequence == null) 9572 return false; 9573 for (PositiveIntType v : this.subDetailSequence) 9574 if (v.getValue().equals(value)) // positiveInt 9575 return true; 9576 return false; 9577 } 9578 9579 /** 9580 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 9581 */ 9582 public List<Identifier> getTraceNumber() { 9583 if (this.traceNumber == null) 9584 this.traceNumber = new ArrayList<Identifier>(); 9585 return this.traceNumber; 9586 } 9587 9588 /** 9589 * @return Returns a reference to <code>this</code> for easy method chaining 9590 */ 9591 public AddedItemComponent setTraceNumber(List<Identifier> theTraceNumber) { 9592 this.traceNumber = theTraceNumber; 9593 return this; 9594 } 9595 9596 public boolean hasTraceNumber() { 9597 if (this.traceNumber == null) 9598 return false; 9599 for (Identifier item : this.traceNumber) 9600 if (!item.isEmpty()) 9601 return true; 9602 return false; 9603 } 9604 9605 public Identifier addTraceNumber() { //3 9606 Identifier t = new Identifier(); 9607 if (this.traceNumber == null) 9608 this.traceNumber = new ArrayList<Identifier>(); 9609 this.traceNumber.add(t); 9610 return t; 9611 } 9612 9613 public AddedItemComponent addTraceNumber(Identifier t) { //3 9614 if (t == null) 9615 return this; 9616 if (this.traceNumber == null) 9617 this.traceNumber = new ArrayList<Identifier>(); 9618 this.traceNumber.add(t); 9619 return this; 9620 } 9621 9622 /** 9623 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 9624 */ 9625 public Identifier getTraceNumberFirstRep() { 9626 if (getTraceNumber().isEmpty()) { 9627 addTraceNumber(); 9628 } 9629 return getTraceNumber().get(0); 9630 } 9631 9632 /** 9633 * @return {@link #provider} (The providers who are authorized for the services rendered to the patient.) 9634 */ 9635 public List<Reference> getProvider() { 9636 if (this.provider == null) 9637 this.provider = new ArrayList<Reference>(); 9638 return this.provider; 9639 } 9640 9641 /** 9642 * @return Returns a reference to <code>this</code> for easy method chaining 9643 */ 9644 public AddedItemComponent setProvider(List<Reference> theProvider) { 9645 this.provider = theProvider; 9646 return this; 9647 } 9648 9649 public boolean hasProvider() { 9650 if (this.provider == null) 9651 return false; 9652 for (Reference item : this.provider) 9653 if (!item.isEmpty()) 9654 return true; 9655 return false; 9656 } 9657 9658 public Reference addProvider() { //3 9659 Reference t = new Reference(); 9660 if (this.provider == null) 9661 this.provider = new ArrayList<Reference>(); 9662 this.provider.add(t); 9663 return t; 9664 } 9665 9666 public AddedItemComponent addProvider(Reference t) { //3 9667 if (t == null) 9668 return this; 9669 if (this.provider == null) 9670 this.provider = new ArrayList<Reference>(); 9671 this.provider.add(t); 9672 return this; 9673 } 9674 9675 /** 9676 * @return The first repetition of repeating field {@link #provider}, creating it if it does not already exist {3} 9677 */ 9678 public Reference getProviderFirstRep() { 9679 if (getProvider().isEmpty()) { 9680 addProvider(); 9681 } 9682 return getProvider().get(0); 9683 } 9684 9685 /** 9686 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 9687 */ 9688 public CodeableConcept getRevenue() { 9689 if (this.revenue == null) 9690 if (Configuration.errorOnAutoCreate()) 9691 throw new Error("Attempt to auto-create AddedItemComponent.revenue"); 9692 else if (Configuration.doAutoCreate()) 9693 this.revenue = new CodeableConcept(); // cc 9694 return this.revenue; 9695 } 9696 9697 public boolean hasRevenue() { 9698 return this.revenue != null && !this.revenue.isEmpty(); 9699 } 9700 9701 /** 9702 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 9703 */ 9704 public AddedItemComponent setRevenue(CodeableConcept value) { 9705 this.revenue = value; 9706 return this; 9707 } 9708 9709 /** 9710 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 9711 */ 9712 public CodeableConcept getProductOrService() { 9713 if (this.productOrService == null) 9714 if (Configuration.errorOnAutoCreate()) 9715 throw new Error("Attempt to auto-create AddedItemComponent.productOrService"); 9716 else if (Configuration.doAutoCreate()) 9717 this.productOrService = new CodeableConcept(); // cc 9718 return this.productOrService; 9719 } 9720 9721 public boolean hasProductOrService() { 9722 return this.productOrService != null && !this.productOrService.isEmpty(); 9723 } 9724 9725 /** 9726 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 9727 */ 9728 public AddedItemComponent setProductOrService(CodeableConcept value) { 9729 this.productOrService = value; 9730 return this; 9731 } 9732 9733 /** 9734 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 9735 */ 9736 public CodeableConcept getProductOrServiceEnd() { 9737 if (this.productOrServiceEnd == null) 9738 if (Configuration.errorOnAutoCreate()) 9739 throw new Error("Attempt to auto-create AddedItemComponent.productOrServiceEnd"); 9740 else if (Configuration.doAutoCreate()) 9741 this.productOrServiceEnd = new CodeableConcept(); // cc 9742 return this.productOrServiceEnd; 9743 } 9744 9745 public boolean hasProductOrServiceEnd() { 9746 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 9747 } 9748 9749 /** 9750 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 9751 */ 9752 public AddedItemComponent setProductOrServiceEnd(CodeableConcept value) { 9753 this.productOrServiceEnd = value; 9754 return this; 9755 } 9756 9757 /** 9758 * @return {@link #request} (Request or Referral for Goods or Service to be rendered.) 9759 */ 9760 public List<Reference> getRequest() { 9761 if (this.request == null) 9762 this.request = new ArrayList<Reference>(); 9763 return this.request; 9764 } 9765 9766 /** 9767 * @return Returns a reference to <code>this</code> for easy method chaining 9768 */ 9769 public AddedItemComponent setRequest(List<Reference> theRequest) { 9770 this.request = theRequest; 9771 return this; 9772 } 9773 9774 public boolean hasRequest() { 9775 if (this.request == null) 9776 return false; 9777 for (Reference item : this.request) 9778 if (!item.isEmpty()) 9779 return true; 9780 return false; 9781 } 9782 9783 public Reference addRequest() { //3 9784 Reference t = new Reference(); 9785 if (this.request == null) 9786 this.request = new ArrayList<Reference>(); 9787 this.request.add(t); 9788 return t; 9789 } 9790 9791 public AddedItemComponent addRequest(Reference t) { //3 9792 if (t == null) 9793 return this; 9794 if (this.request == null) 9795 this.request = new ArrayList<Reference>(); 9796 this.request.add(t); 9797 return this; 9798 } 9799 9800 /** 9801 * @return The first repetition of repeating field {@link #request}, creating it if it does not already exist {3} 9802 */ 9803 public Reference getRequestFirstRep() { 9804 if (getRequest().isEmpty()) { 9805 addRequest(); 9806 } 9807 return getRequest().get(0); 9808 } 9809 9810 /** 9811 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 9812 */ 9813 public List<CodeableConcept> getModifier() { 9814 if (this.modifier == null) 9815 this.modifier = new ArrayList<CodeableConcept>(); 9816 return this.modifier; 9817 } 9818 9819 /** 9820 * @return Returns a reference to <code>this</code> for easy method chaining 9821 */ 9822 public AddedItemComponent setModifier(List<CodeableConcept> theModifier) { 9823 this.modifier = theModifier; 9824 return this; 9825 } 9826 9827 public boolean hasModifier() { 9828 if (this.modifier == null) 9829 return false; 9830 for (CodeableConcept item : this.modifier) 9831 if (!item.isEmpty()) 9832 return true; 9833 return false; 9834 } 9835 9836 public CodeableConcept addModifier() { //3 9837 CodeableConcept t = new CodeableConcept(); 9838 if (this.modifier == null) 9839 this.modifier = new ArrayList<CodeableConcept>(); 9840 this.modifier.add(t); 9841 return t; 9842 } 9843 9844 public AddedItemComponent addModifier(CodeableConcept t) { //3 9845 if (t == null) 9846 return this; 9847 if (this.modifier == null) 9848 this.modifier = new ArrayList<CodeableConcept>(); 9849 this.modifier.add(t); 9850 return this; 9851 } 9852 9853 /** 9854 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 9855 */ 9856 public CodeableConcept getModifierFirstRep() { 9857 if (getModifier().isEmpty()) { 9858 addModifier(); 9859 } 9860 return getModifier().get(0); 9861 } 9862 9863 /** 9864 * @return {@link #programCode} (Identifies the program under which this may be recovered.) 9865 */ 9866 public List<CodeableConcept> getProgramCode() { 9867 if (this.programCode == null) 9868 this.programCode = new ArrayList<CodeableConcept>(); 9869 return this.programCode; 9870 } 9871 9872 /** 9873 * @return Returns a reference to <code>this</code> for easy method chaining 9874 */ 9875 public AddedItemComponent setProgramCode(List<CodeableConcept> theProgramCode) { 9876 this.programCode = theProgramCode; 9877 return this; 9878 } 9879 9880 public boolean hasProgramCode() { 9881 if (this.programCode == null) 9882 return false; 9883 for (CodeableConcept item : this.programCode) 9884 if (!item.isEmpty()) 9885 return true; 9886 return false; 9887 } 9888 9889 public CodeableConcept addProgramCode() { //3 9890 CodeableConcept t = new CodeableConcept(); 9891 if (this.programCode == null) 9892 this.programCode = new ArrayList<CodeableConcept>(); 9893 this.programCode.add(t); 9894 return t; 9895 } 9896 9897 public AddedItemComponent addProgramCode(CodeableConcept t) { //3 9898 if (t == null) 9899 return this; 9900 if (this.programCode == null) 9901 this.programCode = new ArrayList<CodeableConcept>(); 9902 this.programCode.add(t); 9903 return this; 9904 } 9905 9906 /** 9907 * @return The first repetition of repeating field {@link #programCode}, creating it if it does not already exist {3} 9908 */ 9909 public CodeableConcept getProgramCodeFirstRep() { 9910 if (getProgramCode().isEmpty()) { 9911 addProgramCode(); 9912 } 9913 return getProgramCode().get(0); 9914 } 9915 9916 /** 9917 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 9918 */ 9919 public DataType getServiced() { 9920 return this.serviced; 9921 } 9922 9923 /** 9924 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 9925 */ 9926 public DateType getServicedDateType() throws FHIRException { 9927 if (this.serviced == null) 9928 this.serviced = new DateType(); 9929 if (!(this.serviced instanceof DateType)) 9930 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered"); 9931 return (DateType) this.serviced; 9932 } 9933 9934 public boolean hasServicedDateType() { 9935 return this != null && this.serviced instanceof DateType; 9936 } 9937 9938 /** 9939 * @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 9940 */ 9941 public Period getServicedPeriod() throws FHIRException { 9942 if (this.serviced == null) 9943 this.serviced = new Period(); 9944 if (!(this.serviced instanceof Period)) 9945 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered"); 9946 return (Period) this.serviced; 9947 } 9948 9949 public boolean hasServicedPeriod() { 9950 return this != null && this.serviced instanceof Period; 9951 } 9952 9953 public boolean hasServiced() { 9954 return this.serviced != null && !this.serviced.isEmpty(); 9955 } 9956 9957 /** 9958 * @param value {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.) 9959 */ 9960 public AddedItemComponent setServiced(DataType value) { 9961 if (value != null && !(value instanceof DateType || value instanceof Period)) 9962 throw new FHIRException("Not the right type for ExplanationOfBenefit.addItem.serviced[x]: "+value.fhirType()); 9963 this.serviced = value; 9964 return this; 9965 } 9966 9967 /** 9968 * @return {@link #location} (Where the product or service was provided.) 9969 */ 9970 public DataType getLocation() { 9971 return this.location; 9972 } 9973 9974 /** 9975 * @return {@link #location} (Where the product or service was provided.) 9976 */ 9977 public CodeableConcept getLocationCodeableConcept() throws FHIRException { 9978 if (this.location == null) 9979 this.location = new CodeableConcept(); 9980 if (!(this.location instanceof CodeableConcept)) 9981 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.location.getClass().getName()+" was encountered"); 9982 return (CodeableConcept) this.location; 9983 } 9984 9985 public boolean hasLocationCodeableConcept() { 9986 return this != null && this.location instanceof CodeableConcept; 9987 } 9988 9989 /** 9990 * @return {@link #location} (Where the product or service was provided.) 9991 */ 9992 public Address getLocationAddress() throws FHIRException { 9993 if (this.location == null) 9994 this.location = new Address(); 9995 if (!(this.location instanceof Address)) 9996 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.location.getClass().getName()+" was encountered"); 9997 return (Address) this.location; 9998 } 9999 10000 public boolean hasLocationAddress() { 10001 return this != null && this.location instanceof Address; 10002 } 10003 10004 /** 10005 * @return {@link #location} (Where the product or service was provided.) 10006 */ 10007 public Reference getLocationReference() throws FHIRException { 10008 if (this.location == null) 10009 this.location = new Reference(); 10010 if (!(this.location instanceof Reference)) 10011 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.location.getClass().getName()+" was encountered"); 10012 return (Reference) this.location; 10013 } 10014 10015 public boolean hasLocationReference() { 10016 return this != null && this.location instanceof Reference; 10017 } 10018 10019 public boolean hasLocation() { 10020 return this.location != null && !this.location.isEmpty(); 10021 } 10022 10023 /** 10024 * @param value {@link #location} (Where the product or service was provided.) 10025 */ 10026 public AddedItemComponent setLocation(DataType value) { 10027 if (value != null && !(value instanceof CodeableConcept || value instanceof Address || value instanceof Reference)) 10028 throw new FHIRException("Not the right type for ExplanationOfBenefit.addItem.location[x]: "+value.fhirType()); 10029 this.location = value; 10030 return this; 10031 } 10032 10033 /** 10034 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 10035 */ 10036 public Money getPatientPaid() { 10037 if (this.patientPaid == null) 10038 if (Configuration.errorOnAutoCreate()) 10039 throw new Error("Attempt to auto-create AddedItemComponent.patientPaid"); 10040 else if (Configuration.doAutoCreate()) 10041 this.patientPaid = new Money(); // cc 10042 return this.patientPaid; 10043 } 10044 10045 public boolean hasPatientPaid() { 10046 return this.patientPaid != null && !this.patientPaid.isEmpty(); 10047 } 10048 10049 /** 10050 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 10051 */ 10052 public AddedItemComponent setPatientPaid(Money value) { 10053 this.patientPaid = value; 10054 return this; 10055 } 10056 10057 /** 10058 * @return {@link #quantity} (The number of repetitions of a service or product.) 10059 */ 10060 public Quantity getQuantity() { 10061 if (this.quantity == null) 10062 if (Configuration.errorOnAutoCreate()) 10063 throw new Error("Attempt to auto-create AddedItemComponent.quantity"); 10064 else if (Configuration.doAutoCreate()) 10065 this.quantity = new Quantity(); // cc 10066 return this.quantity; 10067 } 10068 10069 public boolean hasQuantity() { 10070 return this.quantity != null && !this.quantity.isEmpty(); 10071 } 10072 10073 /** 10074 * @param value {@link #quantity} (The number of repetitions of a service or product.) 10075 */ 10076 public AddedItemComponent setQuantity(Quantity value) { 10077 this.quantity = value; 10078 return this; 10079 } 10080 10081 /** 10082 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 10083 */ 10084 public Money getUnitPrice() { 10085 if (this.unitPrice == null) 10086 if (Configuration.errorOnAutoCreate()) 10087 throw new Error("Attempt to auto-create AddedItemComponent.unitPrice"); 10088 else if (Configuration.doAutoCreate()) 10089 this.unitPrice = new Money(); // cc 10090 return this.unitPrice; 10091 } 10092 10093 public boolean hasUnitPrice() { 10094 return this.unitPrice != null && !this.unitPrice.isEmpty(); 10095 } 10096 10097 /** 10098 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 10099 */ 10100 public AddedItemComponent setUnitPrice(Money value) { 10101 this.unitPrice = value; 10102 return this; 10103 } 10104 10105 /** 10106 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 10107 */ 10108 public DecimalType getFactorElement() { 10109 if (this.factor == null) 10110 if (Configuration.errorOnAutoCreate()) 10111 throw new Error("Attempt to auto-create AddedItemComponent.factor"); 10112 else if (Configuration.doAutoCreate()) 10113 this.factor = new DecimalType(); // bb 10114 return this.factor; 10115 } 10116 10117 public boolean hasFactorElement() { 10118 return this.factor != null && !this.factor.isEmpty(); 10119 } 10120 10121 public boolean hasFactor() { 10122 return this.factor != null && !this.factor.isEmpty(); 10123 } 10124 10125 /** 10126 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 10127 */ 10128 public AddedItemComponent setFactorElement(DecimalType value) { 10129 this.factor = value; 10130 return this; 10131 } 10132 10133 /** 10134 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 10135 */ 10136 public BigDecimal getFactor() { 10137 return this.factor == null ? null : this.factor.getValue(); 10138 } 10139 10140 /** 10141 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 10142 */ 10143 public AddedItemComponent setFactor(BigDecimal value) { 10144 if (value == null) 10145 this.factor = null; 10146 else { 10147 if (this.factor == null) 10148 this.factor = new DecimalType(); 10149 this.factor.setValue(value); 10150 } 10151 return this; 10152 } 10153 10154 /** 10155 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 10156 */ 10157 public AddedItemComponent setFactor(long value) { 10158 this.factor = new DecimalType(); 10159 this.factor.setValue(value); 10160 return this; 10161 } 10162 10163 /** 10164 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 10165 */ 10166 public AddedItemComponent setFactor(double value) { 10167 this.factor = new DecimalType(); 10168 this.factor.setValue(value); 10169 return this; 10170 } 10171 10172 /** 10173 * @return {@link #tax} (The total of taxes applicable for this product or service.) 10174 */ 10175 public Money getTax() { 10176 if (this.tax == null) 10177 if (Configuration.errorOnAutoCreate()) 10178 throw new Error("Attempt to auto-create AddedItemComponent.tax"); 10179 else if (Configuration.doAutoCreate()) 10180 this.tax = new Money(); // cc 10181 return this.tax; 10182 } 10183 10184 public boolean hasTax() { 10185 return this.tax != null && !this.tax.isEmpty(); 10186 } 10187 10188 /** 10189 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 10190 */ 10191 public AddedItemComponent setTax(Money value) { 10192 this.tax = value; 10193 return this; 10194 } 10195 10196 /** 10197 * @return {@link #net} (The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.) 10198 */ 10199 public Money getNet() { 10200 if (this.net == null) 10201 if (Configuration.errorOnAutoCreate()) 10202 throw new Error("Attempt to auto-create AddedItemComponent.net"); 10203 else if (Configuration.doAutoCreate()) 10204 this.net = new Money(); // cc 10205 return this.net; 10206 } 10207 10208 public boolean hasNet() { 10209 return this.net != null && !this.net.isEmpty(); 10210 } 10211 10212 /** 10213 * @param value {@link #net} (The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.) 10214 */ 10215 public AddedItemComponent setNet(Money value) { 10216 this.net = value; 10217 return this; 10218 } 10219 10220 /** 10221 * @return {@link #bodySite} (Physical location where the service is performed or applies.) 10222 */ 10223 public List<AddedItemBodySiteComponent> getBodySite() { 10224 if (this.bodySite == null) 10225 this.bodySite = new ArrayList<AddedItemBodySiteComponent>(); 10226 return this.bodySite; 10227 } 10228 10229 /** 10230 * @return Returns a reference to <code>this</code> for easy method chaining 10231 */ 10232 public AddedItemComponent setBodySite(List<AddedItemBodySiteComponent> theBodySite) { 10233 this.bodySite = theBodySite; 10234 return this; 10235 } 10236 10237 public boolean hasBodySite() { 10238 if (this.bodySite == null) 10239 return false; 10240 for (AddedItemBodySiteComponent item : this.bodySite) 10241 if (!item.isEmpty()) 10242 return true; 10243 return false; 10244 } 10245 10246 public AddedItemBodySiteComponent addBodySite() { //3 10247 AddedItemBodySiteComponent t = new AddedItemBodySiteComponent(); 10248 if (this.bodySite == null) 10249 this.bodySite = new ArrayList<AddedItemBodySiteComponent>(); 10250 this.bodySite.add(t); 10251 return t; 10252 } 10253 10254 public AddedItemComponent addBodySite(AddedItemBodySiteComponent t) { //3 10255 if (t == null) 10256 return this; 10257 if (this.bodySite == null) 10258 this.bodySite = new ArrayList<AddedItemBodySiteComponent>(); 10259 this.bodySite.add(t); 10260 return this; 10261 } 10262 10263 /** 10264 * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist {3} 10265 */ 10266 public AddedItemBodySiteComponent getBodySiteFirstRep() { 10267 if (getBodySite().isEmpty()) { 10268 addBodySite(); 10269 } 10270 return getBodySite().get(0); 10271 } 10272 10273 /** 10274 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 10275 */ 10276 public List<PositiveIntType> getNoteNumber() { 10277 if (this.noteNumber == null) 10278 this.noteNumber = new ArrayList<PositiveIntType>(); 10279 return this.noteNumber; 10280 } 10281 10282 /** 10283 * @return Returns a reference to <code>this</code> for easy method chaining 10284 */ 10285 public AddedItemComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 10286 this.noteNumber = theNoteNumber; 10287 return this; 10288 } 10289 10290 public boolean hasNoteNumber() { 10291 if (this.noteNumber == null) 10292 return false; 10293 for (PositiveIntType item : this.noteNumber) 10294 if (!item.isEmpty()) 10295 return true; 10296 return false; 10297 } 10298 10299 /** 10300 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 10301 */ 10302 public PositiveIntType addNoteNumberElement() {//2 10303 PositiveIntType t = new PositiveIntType(); 10304 if (this.noteNumber == null) 10305 this.noteNumber = new ArrayList<PositiveIntType>(); 10306 this.noteNumber.add(t); 10307 return t; 10308 } 10309 10310 /** 10311 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 10312 */ 10313 public AddedItemComponent addNoteNumber(int value) { //1 10314 PositiveIntType t = new PositiveIntType(); 10315 t.setValue(value); 10316 if (this.noteNumber == null) 10317 this.noteNumber = new ArrayList<PositiveIntType>(); 10318 this.noteNumber.add(t); 10319 return this; 10320 } 10321 10322 /** 10323 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 10324 */ 10325 public boolean hasNoteNumber(int value) { 10326 if (this.noteNumber == null) 10327 return false; 10328 for (PositiveIntType v : this.noteNumber) 10329 if (v.getValue().equals(value)) // positiveInt 10330 return true; 10331 return false; 10332 } 10333 10334 /** 10335 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 10336 */ 10337 public ItemReviewOutcomeComponent getReviewOutcome() { 10338 if (this.reviewOutcome == null) 10339 if (Configuration.errorOnAutoCreate()) 10340 throw new Error("Attempt to auto-create AddedItemComponent.reviewOutcome"); 10341 else if (Configuration.doAutoCreate()) 10342 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 10343 return this.reviewOutcome; 10344 } 10345 10346 public boolean hasReviewOutcome() { 10347 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 10348 } 10349 10350 /** 10351 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 10352 */ 10353 public AddedItemComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 10354 this.reviewOutcome = value; 10355 return this; 10356 } 10357 10358 /** 10359 * @return {@link #adjudication} (The adjudication results.) 10360 */ 10361 public List<AdjudicationComponent> getAdjudication() { 10362 if (this.adjudication == null) 10363 this.adjudication = new ArrayList<AdjudicationComponent>(); 10364 return this.adjudication; 10365 } 10366 10367 /** 10368 * @return Returns a reference to <code>this</code> for easy method chaining 10369 */ 10370 public AddedItemComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 10371 this.adjudication = theAdjudication; 10372 return this; 10373 } 10374 10375 public boolean hasAdjudication() { 10376 if (this.adjudication == null) 10377 return false; 10378 for (AdjudicationComponent item : this.adjudication) 10379 if (!item.isEmpty()) 10380 return true; 10381 return false; 10382 } 10383 10384 public AdjudicationComponent addAdjudication() { //3 10385 AdjudicationComponent t = new AdjudicationComponent(); 10386 if (this.adjudication == null) 10387 this.adjudication = new ArrayList<AdjudicationComponent>(); 10388 this.adjudication.add(t); 10389 return t; 10390 } 10391 10392 public AddedItemComponent addAdjudication(AdjudicationComponent t) { //3 10393 if (t == null) 10394 return this; 10395 if (this.adjudication == null) 10396 this.adjudication = new ArrayList<AdjudicationComponent>(); 10397 this.adjudication.add(t); 10398 return this; 10399 } 10400 10401 /** 10402 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 10403 */ 10404 public AdjudicationComponent getAdjudicationFirstRep() { 10405 if (getAdjudication().isEmpty()) { 10406 addAdjudication(); 10407 } 10408 return getAdjudication().get(0); 10409 } 10410 10411 /** 10412 * @return {@link #detail} (The second-tier service adjudications for payor added services.) 10413 */ 10414 public List<AddedItemDetailComponent> getDetail() { 10415 if (this.detail == null) 10416 this.detail = new ArrayList<AddedItemDetailComponent>(); 10417 return this.detail; 10418 } 10419 10420 /** 10421 * @return Returns a reference to <code>this</code> for easy method chaining 10422 */ 10423 public AddedItemComponent setDetail(List<AddedItemDetailComponent> theDetail) { 10424 this.detail = theDetail; 10425 return this; 10426 } 10427 10428 public boolean hasDetail() { 10429 if (this.detail == null) 10430 return false; 10431 for (AddedItemDetailComponent item : this.detail) 10432 if (!item.isEmpty()) 10433 return true; 10434 return false; 10435 } 10436 10437 public AddedItemDetailComponent addDetail() { //3 10438 AddedItemDetailComponent t = new AddedItemDetailComponent(); 10439 if (this.detail == null) 10440 this.detail = new ArrayList<AddedItemDetailComponent>(); 10441 this.detail.add(t); 10442 return t; 10443 } 10444 10445 public AddedItemComponent addDetail(AddedItemDetailComponent t) { //3 10446 if (t == null) 10447 return this; 10448 if (this.detail == null) 10449 this.detail = new ArrayList<AddedItemDetailComponent>(); 10450 this.detail.add(t); 10451 return this; 10452 } 10453 10454 /** 10455 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3} 10456 */ 10457 public AddedItemDetailComponent getDetailFirstRep() { 10458 if (getDetail().isEmpty()) { 10459 addDetail(); 10460 } 10461 return getDetail().get(0); 10462 } 10463 10464 protected void listChildren(List<Property> children) { 10465 super.listChildren(children); 10466 children.add(new Property("itemSequence", "positiveInt", "Claim items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, itemSequence)); 10467 children.add(new Property("detailSequence", "positiveInt", "The sequence number of the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, detailSequence)); 10468 children.add(new Property("subDetailSequence", "positiveInt", "The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, subDetailSequence)); 10469 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 10470 children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The providers who are authorized for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); 10471 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 10472 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 10473 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 10474 children.add(new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request)); 10475 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 10476 children.add(new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode)); 10477 children.add(new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced)); 10478 children.add(new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location)); 10479 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 10480 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 10481 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 10482 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 10483 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 10484 children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.", 0, 1, net)); 10485 children.add(new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite)); 10486 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 10487 children.add(new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 10488 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 10489 children.add(new Property("detail", "", "The second-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail)); 10490 } 10491 10492 @Override 10493 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10494 switch (_hash) { 10495 case 1977979892: /*itemSequence*/ return new Property("itemSequence", "positiveInt", "Claim items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, itemSequence); 10496 case 1321472818: /*detailSequence*/ return new Property("detailSequence", "positiveInt", "The sequence number of the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, detailSequence); 10497 case -855462510: /*subDetailSequence*/ return new Property("subDetailSequence", "positiveInt", "The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, subDetailSequence); 10498 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 10499 case -987494927: /*provider*/ return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The providers who are authorized for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider); 10500 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 10501 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 10502 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 10503 case 1095692943: /*request*/ return new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request); 10504 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 10505 case 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode); 10506 case -1927922223: /*serviced[x]*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 10507 case 1379209295: /*serviced*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 10508 case 363246749: /*servicedDate*/ return new Property("serviced[x]", "date", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 10509 case 1534966512: /*servicedPeriod*/ return new Property("serviced[x]", "Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced); 10510 case 552316075: /*location[x]*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location); 10511 case 1901043637: /*location*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location); 10512 case -1224800468: /*locationCodeableConcept*/ return new Property("location[x]", "CodeableConcept", "Where the product or service was provided.", 0, 1, location); 10513 case -1280020865: /*locationAddress*/ return new Property("location[x]", "Address", "Where the product or service was provided.", 0, 1, location); 10514 case 755866390: /*locationReference*/ return new Property("location[x]", "Reference(Location)", "Where the product or service was provided.", 0, 1, location); 10515 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 10516 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 10517 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 10518 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 10519 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 10520 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.", 0, 1, net); 10521 case 1702620169: /*bodySite*/ return new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite); 10522 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 10523 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 10524 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 10525 case -1335224239: /*detail*/ return new Property("detail", "", "The second-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail); 10526 default: return super.getNamedProperty(_hash, _name, _checkValid); 10527 } 10528 10529 } 10530 10531 @Override 10532 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10533 switch (hash) { 10534 case 1977979892: /*itemSequence*/ return this.itemSequence == null ? new Base[0] : this.itemSequence.toArray(new Base[this.itemSequence.size()]); // PositiveIntType 10535 case 1321472818: /*detailSequence*/ return this.detailSequence == null ? new Base[0] : this.detailSequence.toArray(new Base[this.detailSequence.size()]); // PositiveIntType 10536 case -855462510: /*subDetailSequence*/ return this.subDetailSequence == null ? new Base[0] : this.subDetailSequence.toArray(new Base[this.subDetailSequence.size()]); // PositiveIntType 10537 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 10538 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : this.provider.toArray(new Base[this.provider.size()]); // Reference 10539 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 10540 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 10541 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 10542 case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference 10543 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 10544 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept 10545 case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType 10546 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // DataType 10547 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 10548 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 10549 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 10550 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 10551 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 10552 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 10553 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // AddedItemBodySiteComponent 10554 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 10555 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 10556 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 10557 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // AddedItemDetailComponent 10558 default: return super.getProperty(hash, name, checkValid); 10559 } 10560 10561 } 10562 10563 @Override 10564 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10565 switch (hash) { 10566 case 1977979892: // itemSequence 10567 this.getItemSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 10568 return value; 10569 case 1321472818: // detailSequence 10570 this.getDetailSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 10571 return value; 10572 case -855462510: // subDetailSequence 10573 this.getSubDetailSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 10574 return value; 10575 case 82505966: // traceNumber 10576 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 10577 return value; 10578 case -987494927: // provider 10579 this.getProvider().add(TypeConvertor.castToReference(value)); // Reference 10580 return value; 10581 case 1099842588: // revenue 10582 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10583 return value; 10584 case 1957227299: // productOrService 10585 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10586 return value; 10587 case -717476168: // productOrServiceEnd 10588 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10589 return value; 10590 case 1095692943: // request 10591 this.getRequest().add(TypeConvertor.castToReference(value)); // Reference 10592 return value; 10593 case -615513385: // modifier 10594 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 10595 return value; 10596 case 1010065041: // programCode 10597 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 10598 return value; 10599 case 1379209295: // serviced 10600 this.serviced = TypeConvertor.castToType(value); // DataType 10601 return value; 10602 case 1901043637: // location 10603 this.location = TypeConvertor.castToType(value); // DataType 10604 return value; 10605 case 525514609: // patientPaid 10606 this.patientPaid = TypeConvertor.castToMoney(value); // Money 10607 return value; 10608 case -1285004149: // quantity 10609 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 10610 return value; 10611 case -486196699: // unitPrice 10612 this.unitPrice = TypeConvertor.castToMoney(value); // Money 10613 return value; 10614 case -1282148017: // factor 10615 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 10616 return value; 10617 case 114603: // tax 10618 this.tax = TypeConvertor.castToMoney(value); // Money 10619 return value; 10620 case 108957: // net 10621 this.net = TypeConvertor.castToMoney(value); // Money 10622 return value; 10623 case 1702620169: // bodySite 10624 this.getBodySite().add((AddedItemBodySiteComponent) value); // AddedItemBodySiteComponent 10625 return value; 10626 case -1110033957: // noteNumber 10627 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 10628 return value; 10629 case -51825446: // reviewOutcome 10630 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 10631 return value; 10632 case -231349275: // adjudication 10633 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 10634 return value; 10635 case -1335224239: // detail 10636 this.getDetail().add((AddedItemDetailComponent) value); // AddedItemDetailComponent 10637 return value; 10638 default: return super.setProperty(hash, name, value); 10639 } 10640 10641 } 10642 10643 @Override 10644 public Base setProperty(String name, Base value) throws FHIRException { 10645 if (name.equals("itemSequence")) { 10646 this.getItemSequence().add(TypeConvertor.castToPositiveInt(value)); 10647 } else if (name.equals("detailSequence")) { 10648 this.getDetailSequence().add(TypeConvertor.castToPositiveInt(value)); 10649 } else if (name.equals("subDetailSequence")) { 10650 this.getSubDetailSequence().add(TypeConvertor.castToPositiveInt(value)); 10651 } else if (name.equals("traceNumber")) { 10652 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 10653 } else if (name.equals("provider")) { 10654 this.getProvider().add(TypeConvertor.castToReference(value)); 10655 } else if (name.equals("revenue")) { 10656 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10657 } else if (name.equals("productOrService")) { 10658 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10659 } else if (name.equals("productOrServiceEnd")) { 10660 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 10661 } else if (name.equals("request")) { 10662 this.getRequest().add(TypeConvertor.castToReference(value)); 10663 } else if (name.equals("modifier")) { 10664 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 10665 } else if (name.equals("programCode")) { 10666 this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); 10667 } else if (name.equals("serviced[x]")) { 10668 this.serviced = TypeConvertor.castToType(value); // DataType 10669 } else if (name.equals("location[x]")) { 10670 this.location = TypeConvertor.castToType(value); // DataType 10671 } else if (name.equals("patientPaid")) { 10672 this.patientPaid = TypeConvertor.castToMoney(value); // Money 10673 } else if (name.equals("quantity")) { 10674 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 10675 } else if (name.equals("unitPrice")) { 10676 this.unitPrice = TypeConvertor.castToMoney(value); // Money 10677 } else if (name.equals("factor")) { 10678 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 10679 } else if (name.equals("tax")) { 10680 this.tax = TypeConvertor.castToMoney(value); // Money 10681 } else if (name.equals("net")) { 10682 this.net = TypeConvertor.castToMoney(value); // Money 10683 } else if (name.equals("bodySite")) { 10684 this.getBodySite().add((AddedItemBodySiteComponent) value); 10685 } else if (name.equals("noteNumber")) { 10686 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 10687 } else if (name.equals("reviewOutcome")) { 10688 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 10689 } else if (name.equals("adjudication")) { 10690 this.getAdjudication().add((AdjudicationComponent) value); 10691 } else if (name.equals("detail")) { 10692 this.getDetail().add((AddedItemDetailComponent) value); 10693 } else 10694 return super.setProperty(name, value); 10695 return value; 10696 } 10697 10698 @Override 10699 public void removeChild(String name, Base value) throws FHIRException { 10700 if (name.equals("itemSequence")) { 10701 this.getItemSequence().remove(value); 10702 } else if (name.equals("detailSequence")) { 10703 this.getDetailSequence().remove(value); 10704 } else if (name.equals("subDetailSequence")) { 10705 this.getSubDetailSequence().remove(value); 10706 } else if (name.equals("traceNumber")) { 10707 this.getTraceNumber().remove(value); 10708 } else if (name.equals("provider")) { 10709 this.getProvider().remove(value); 10710 } else if (name.equals("revenue")) { 10711 this.revenue = null; 10712 } else if (name.equals("productOrService")) { 10713 this.productOrService = null; 10714 } else if (name.equals("productOrServiceEnd")) { 10715 this.productOrServiceEnd = null; 10716 } else if (name.equals("request")) { 10717 this.getRequest().remove(value); 10718 } else if (name.equals("modifier")) { 10719 this.getModifier().remove(value); 10720 } else if (name.equals("programCode")) { 10721 this.getProgramCode().remove(value); 10722 } else if (name.equals("serviced[x]")) { 10723 this.serviced = null; 10724 } else if (name.equals("location[x]")) { 10725 this.location = null; 10726 } else if (name.equals("patientPaid")) { 10727 this.patientPaid = null; 10728 } else if (name.equals("quantity")) { 10729 this.quantity = null; 10730 } else if (name.equals("unitPrice")) { 10731 this.unitPrice = null; 10732 } else if (name.equals("factor")) { 10733 this.factor = null; 10734 } else if (name.equals("tax")) { 10735 this.tax = null; 10736 } else if (name.equals("net")) { 10737 this.net = null; 10738 } else if (name.equals("bodySite")) { 10739 this.getBodySite().remove((AddedItemBodySiteComponent) value); 10740 } else if (name.equals("noteNumber")) { 10741 this.getNoteNumber().remove(value); 10742 } else if (name.equals("reviewOutcome")) { 10743 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 10744 } else if (name.equals("adjudication")) { 10745 this.getAdjudication().remove((AdjudicationComponent) value); 10746 } else if (name.equals("detail")) { 10747 this.getDetail().remove((AddedItemDetailComponent) value); 10748 } else 10749 super.removeChild(name, value); 10750 10751 } 10752 10753 @Override 10754 public Base makeProperty(int hash, String name) throws FHIRException { 10755 switch (hash) { 10756 case 1977979892: return addItemSequenceElement(); 10757 case 1321472818: return addDetailSequenceElement(); 10758 case -855462510: return addSubDetailSequenceElement(); 10759 case 82505966: return addTraceNumber(); 10760 case -987494927: return addProvider(); 10761 case 1099842588: return getRevenue(); 10762 case 1957227299: return getProductOrService(); 10763 case -717476168: return getProductOrServiceEnd(); 10764 case 1095692943: return addRequest(); 10765 case -615513385: return addModifier(); 10766 case 1010065041: return addProgramCode(); 10767 case -1927922223: return getServiced(); 10768 case 1379209295: return getServiced(); 10769 case 552316075: return getLocation(); 10770 case 1901043637: return getLocation(); 10771 case 525514609: return getPatientPaid(); 10772 case -1285004149: return getQuantity(); 10773 case -486196699: return getUnitPrice(); 10774 case -1282148017: return getFactorElement(); 10775 case 114603: return getTax(); 10776 case 108957: return getNet(); 10777 case 1702620169: return addBodySite(); 10778 case -1110033957: return addNoteNumberElement(); 10779 case -51825446: return getReviewOutcome(); 10780 case -231349275: return addAdjudication(); 10781 case -1335224239: return addDetail(); 10782 default: return super.makeProperty(hash, name); 10783 } 10784 10785 } 10786 10787 @Override 10788 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10789 switch (hash) { 10790 case 1977979892: /*itemSequence*/ return new String[] {"positiveInt"}; 10791 case 1321472818: /*detailSequence*/ return new String[] {"positiveInt"}; 10792 case -855462510: /*subDetailSequence*/ return new String[] {"positiveInt"}; 10793 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 10794 case -987494927: /*provider*/ return new String[] {"Reference"}; 10795 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 10796 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 10797 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 10798 case 1095692943: /*request*/ return new String[] {"Reference"}; 10799 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 10800 case 1010065041: /*programCode*/ return new String[] {"CodeableConcept"}; 10801 case 1379209295: /*serviced*/ return new String[] {"date", "Period"}; 10802 case 1901043637: /*location*/ return new String[] {"CodeableConcept", "Address", "Reference"}; 10803 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 10804 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 10805 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 10806 case -1282148017: /*factor*/ return new String[] {"decimal"}; 10807 case 114603: /*tax*/ return new String[] {"Money"}; 10808 case 108957: /*net*/ return new String[] {"Money"}; 10809 case 1702620169: /*bodySite*/ return new String[] {}; 10810 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 10811 case -51825446: /*reviewOutcome*/ return new String[] {"@ExplanationOfBenefit.item.reviewOutcome"}; 10812 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 10813 case -1335224239: /*detail*/ return new String[] {}; 10814 default: return super.getTypesForProperty(hash, name); 10815 } 10816 10817 } 10818 10819 @Override 10820 public Base addChild(String name) throws FHIRException { 10821 if (name.equals("itemSequence")) { 10822 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.itemSequence"); 10823 } 10824 else if (name.equals("detailSequence")) { 10825 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.detailSequence"); 10826 } 10827 else if (name.equals("subDetailSequence")) { 10828 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.subDetailSequence"); 10829 } 10830 else if (name.equals("traceNumber")) { 10831 return addTraceNumber(); 10832 } 10833 else if (name.equals("provider")) { 10834 return addProvider(); 10835 } 10836 else if (name.equals("revenue")) { 10837 this.revenue = new CodeableConcept(); 10838 return this.revenue; 10839 } 10840 else if (name.equals("productOrService")) { 10841 this.productOrService = new CodeableConcept(); 10842 return this.productOrService; 10843 } 10844 else if (name.equals("productOrServiceEnd")) { 10845 this.productOrServiceEnd = new CodeableConcept(); 10846 return this.productOrServiceEnd; 10847 } 10848 else if (name.equals("request")) { 10849 return addRequest(); 10850 } 10851 else if (name.equals("modifier")) { 10852 return addModifier(); 10853 } 10854 else if (name.equals("programCode")) { 10855 return addProgramCode(); 10856 } 10857 else if (name.equals("servicedDate")) { 10858 this.serviced = new DateType(); 10859 return this.serviced; 10860 } 10861 else if (name.equals("servicedPeriod")) { 10862 this.serviced = new Period(); 10863 return this.serviced; 10864 } 10865 else if (name.equals("locationCodeableConcept")) { 10866 this.location = new CodeableConcept(); 10867 return this.location; 10868 } 10869 else if (name.equals("locationAddress")) { 10870 this.location = new Address(); 10871 return this.location; 10872 } 10873 else if (name.equals("locationReference")) { 10874 this.location = new Reference(); 10875 return this.location; 10876 } 10877 else if (name.equals("patientPaid")) { 10878 this.patientPaid = new Money(); 10879 return this.patientPaid; 10880 } 10881 else if (name.equals("quantity")) { 10882 this.quantity = new Quantity(); 10883 return this.quantity; 10884 } 10885 else if (name.equals("unitPrice")) { 10886 this.unitPrice = new Money(); 10887 return this.unitPrice; 10888 } 10889 else if (name.equals("factor")) { 10890 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.factor"); 10891 } 10892 else if (name.equals("tax")) { 10893 this.tax = new Money(); 10894 return this.tax; 10895 } 10896 else if (name.equals("net")) { 10897 this.net = new Money(); 10898 return this.net; 10899 } 10900 else if (name.equals("bodySite")) { 10901 return addBodySite(); 10902 } 10903 else if (name.equals("noteNumber")) { 10904 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.noteNumber"); 10905 } 10906 else if (name.equals("reviewOutcome")) { 10907 this.reviewOutcome = new ItemReviewOutcomeComponent(); 10908 return this.reviewOutcome; 10909 } 10910 else if (name.equals("adjudication")) { 10911 return addAdjudication(); 10912 } 10913 else if (name.equals("detail")) { 10914 return addDetail(); 10915 } 10916 else 10917 return super.addChild(name); 10918 } 10919 10920 public AddedItemComponent copy() { 10921 AddedItemComponent dst = new AddedItemComponent(); 10922 copyValues(dst); 10923 return dst; 10924 } 10925 10926 public void copyValues(AddedItemComponent dst) { 10927 super.copyValues(dst); 10928 if (itemSequence != null) { 10929 dst.itemSequence = new ArrayList<PositiveIntType>(); 10930 for (PositiveIntType i : itemSequence) 10931 dst.itemSequence.add(i.copy()); 10932 }; 10933 if (detailSequence != null) { 10934 dst.detailSequence = new ArrayList<PositiveIntType>(); 10935 for (PositiveIntType i : detailSequence) 10936 dst.detailSequence.add(i.copy()); 10937 }; 10938 if (subDetailSequence != null) { 10939 dst.subDetailSequence = new ArrayList<PositiveIntType>(); 10940 for (PositiveIntType i : subDetailSequence) 10941 dst.subDetailSequence.add(i.copy()); 10942 }; 10943 if (traceNumber != null) { 10944 dst.traceNumber = new ArrayList<Identifier>(); 10945 for (Identifier i : traceNumber) 10946 dst.traceNumber.add(i.copy()); 10947 }; 10948 if (provider != null) { 10949 dst.provider = new ArrayList<Reference>(); 10950 for (Reference i : provider) 10951 dst.provider.add(i.copy()); 10952 }; 10953 dst.revenue = revenue == null ? null : revenue.copy(); 10954 dst.productOrService = productOrService == null ? null : productOrService.copy(); 10955 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 10956 if (request != null) { 10957 dst.request = new ArrayList<Reference>(); 10958 for (Reference i : request) 10959 dst.request.add(i.copy()); 10960 }; 10961 if (modifier != null) { 10962 dst.modifier = new ArrayList<CodeableConcept>(); 10963 for (CodeableConcept i : modifier) 10964 dst.modifier.add(i.copy()); 10965 }; 10966 if (programCode != null) { 10967 dst.programCode = new ArrayList<CodeableConcept>(); 10968 for (CodeableConcept i : programCode) 10969 dst.programCode.add(i.copy()); 10970 }; 10971 dst.serviced = serviced == null ? null : serviced.copy(); 10972 dst.location = location == null ? null : location.copy(); 10973 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 10974 dst.quantity = quantity == null ? null : quantity.copy(); 10975 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 10976 dst.factor = factor == null ? null : factor.copy(); 10977 dst.tax = tax == null ? null : tax.copy(); 10978 dst.net = net == null ? null : net.copy(); 10979 if (bodySite != null) { 10980 dst.bodySite = new ArrayList<AddedItemBodySiteComponent>(); 10981 for (AddedItemBodySiteComponent i : bodySite) 10982 dst.bodySite.add(i.copy()); 10983 }; 10984 if (noteNumber != null) { 10985 dst.noteNumber = new ArrayList<PositiveIntType>(); 10986 for (PositiveIntType i : noteNumber) 10987 dst.noteNumber.add(i.copy()); 10988 }; 10989 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 10990 if (adjudication != null) { 10991 dst.adjudication = new ArrayList<AdjudicationComponent>(); 10992 for (AdjudicationComponent i : adjudication) 10993 dst.adjudication.add(i.copy()); 10994 }; 10995 if (detail != null) { 10996 dst.detail = new ArrayList<AddedItemDetailComponent>(); 10997 for (AddedItemDetailComponent i : detail) 10998 dst.detail.add(i.copy()); 10999 }; 11000 } 11001 11002 @Override 11003 public boolean equalsDeep(Base other_) { 11004 if (!super.equalsDeep(other_)) 11005 return false; 11006 if (!(other_ instanceof AddedItemComponent)) 11007 return false; 11008 AddedItemComponent o = (AddedItemComponent) other_; 11009 return compareDeep(itemSequence, o.itemSequence, true) && compareDeep(detailSequence, o.detailSequence, true) 11010 && compareDeep(subDetailSequence, o.subDetailSequence, true) && compareDeep(traceNumber, o.traceNumber, true) 11011 && compareDeep(provider, o.provider, true) && compareDeep(revenue, o.revenue, true) && compareDeep(productOrService, o.productOrService, true) 11012 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(request, o.request, true) 11013 && compareDeep(modifier, o.modifier, true) && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true) 11014 && compareDeep(location, o.location, true) && compareDeep(patientPaid, o.patientPaid, true) && compareDeep(quantity, o.quantity, true) 11015 && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) && compareDeep(tax, o.tax, true) 11016 && compareDeep(net, o.net, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(noteNumber, o.noteNumber, true) 11017 && compareDeep(reviewOutcome, o.reviewOutcome, true) && compareDeep(adjudication, o.adjudication, true) 11018 && compareDeep(detail, o.detail, true); 11019 } 11020 11021 @Override 11022 public boolean equalsShallow(Base other_) { 11023 if (!super.equalsShallow(other_)) 11024 return false; 11025 if (!(other_ instanceof AddedItemComponent)) 11026 return false; 11027 AddedItemComponent o = (AddedItemComponent) other_; 11028 return compareValues(itemSequence, o.itemSequence, true) && compareValues(detailSequence, o.detailSequence, true) 11029 && compareValues(subDetailSequence, o.subDetailSequence, true) && compareValues(factor, o.factor, true) 11030 && compareValues(noteNumber, o.noteNumber, true); 11031 } 11032 11033 public boolean isEmpty() { 11034 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(itemSequence, detailSequence 11035 , subDetailSequence, traceNumber, provider, revenue, productOrService, productOrServiceEnd 11036 , request, modifier, programCode, serviced, location, patientPaid, quantity, unitPrice 11037 , factor, tax, net, bodySite, noteNumber, reviewOutcome, adjudication, detail 11038 ); 11039 } 11040 11041 public String fhirType() { 11042 return "ExplanationOfBenefit.addItem"; 11043 11044 } 11045 11046 } 11047 11048 @Block() 11049 public static class AddedItemBodySiteComponent extends BackboneElement implements IBaseBackboneElement { 11050 /** 11051 * Physical service site on the patient (limb, tooth, etc.). 11052 */ 11053 @Child(name = "site", type = {CodeableReference.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11054 @Description(shortDefinition="Location", formalDefinition="Physical service site on the patient (limb, tooth, etc.)." ) 11055 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/tooth") 11056 protected List<CodeableReference> site; 11057 11058 /** 11059 * A region or surface of the bodySite, e.g. limb region or tooth surface(s). 11060 */ 11061 @Child(name = "subSite", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11062 @Description(shortDefinition="Sub-location", formalDefinition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." ) 11063 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/surface") 11064 protected List<CodeableConcept> subSite; 11065 11066 private static final long serialVersionUID = 1190632415L; 11067 11068 /** 11069 * Constructor 11070 */ 11071 public AddedItemBodySiteComponent() { 11072 super(); 11073 } 11074 11075 /** 11076 * Constructor 11077 */ 11078 public AddedItemBodySiteComponent(CodeableReference site) { 11079 super(); 11080 this.addSite(site); 11081 } 11082 11083 /** 11084 * @return {@link #site} (Physical service site on the patient (limb, tooth, etc.).) 11085 */ 11086 public List<CodeableReference> getSite() { 11087 if (this.site == null) 11088 this.site = new ArrayList<CodeableReference>(); 11089 return this.site; 11090 } 11091 11092 /** 11093 * @return Returns a reference to <code>this</code> for easy method chaining 11094 */ 11095 public AddedItemBodySiteComponent setSite(List<CodeableReference> theSite) { 11096 this.site = theSite; 11097 return this; 11098 } 11099 11100 public boolean hasSite() { 11101 if (this.site == null) 11102 return false; 11103 for (CodeableReference item : this.site) 11104 if (!item.isEmpty()) 11105 return true; 11106 return false; 11107 } 11108 11109 public CodeableReference addSite() { //3 11110 CodeableReference t = new CodeableReference(); 11111 if (this.site == null) 11112 this.site = new ArrayList<CodeableReference>(); 11113 this.site.add(t); 11114 return t; 11115 } 11116 11117 public AddedItemBodySiteComponent addSite(CodeableReference t) { //3 11118 if (t == null) 11119 return this; 11120 if (this.site == null) 11121 this.site = new ArrayList<CodeableReference>(); 11122 this.site.add(t); 11123 return this; 11124 } 11125 11126 /** 11127 * @return The first repetition of repeating field {@link #site}, creating it if it does not already exist {3} 11128 */ 11129 public CodeableReference getSiteFirstRep() { 11130 if (getSite().isEmpty()) { 11131 addSite(); 11132 } 11133 return getSite().get(0); 11134 } 11135 11136 /** 11137 * @return {@link #subSite} (A region or surface of the bodySite, e.g. limb region or tooth surface(s).) 11138 */ 11139 public List<CodeableConcept> getSubSite() { 11140 if (this.subSite == null) 11141 this.subSite = new ArrayList<CodeableConcept>(); 11142 return this.subSite; 11143 } 11144 11145 /** 11146 * @return Returns a reference to <code>this</code> for easy method chaining 11147 */ 11148 public AddedItemBodySiteComponent setSubSite(List<CodeableConcept> theSubSite) { 11149 this.subSite = theSubSite; 11150 return this; 11151 } 11152 11153 public boolean hasSubSite() { 11154 if (this.subSite == null) 11155 return false; 11156 for (CodeableConcept item : this.subSite) 11157 if (!item.isEmpty()) 11158 return true; 11159 return false; 11160 } 11161 11162 public CodeableConcept addSubSite() { //3 11163 CodeableConcept t = new CodeableConcept(); 11164 if (this.subSite == null) 11165 this.subSite = new ArrayList<CodeableConcept>(); 11166 this.subSite.add(t); 11167 return t; 11168 } 11169 11170 public AddedItemBodySiteComponent addSubSite(CodeableConcept t) { //3 11171 if (t == null) 11172 return this; 11173 if (this.subSite == null) 11174 this.subSite = new ArrayList<CodeableConcept>(); 11175 this.subSite.add(t); 11176 return this; 11177 } 11178 11179 /** 11180 * @return The first repetition of repeating field {@link #subSite}, creating it if it does not already exist {3} 11181 */ 11182 public CodeableConcept getSubSiteFirstRep() { 11183 if (getSubSite().isEmpty()) { 11184 addSubSite(); 11185 } 11186 return getSubSite().get(0); 11187 } 11188 11189 protected void listChildren(List<Property> children) { 11190 super.listChildren(children); 11191 children.add(new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site)); 11192 children.add(new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); 11193 } 11194 11195 @Override 11196 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 11197 switch (_hash) { 11198 case 3530567: /*site*/ return new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site); 11199 case -1868566105: /*subSite*/ return new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite); 11200 default: return super.getNamedProperty(_hash, _name, _checkValid); 11201 } 11202 11203 } 11204 11205 @Override 11206 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11207 switch (hash) { 11208 case 3530567: /*site*/ return this.site == null ? new Base[0] : this.site.toArray(new Base[this.site.size()]); // CodeableReference 11209 case -1868566105: /*subSite*/ return this.subSite == null ? new Base[0] : this.subSite.toArray(new Base[this.subSite.size()]); // CodeableConcept 11210 default: return super.getProperty(hash, name, checkValid); 11211 } 11212 11213 } 11214 11215 @Override 11216 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11217 switch (hash) { 11218 case 3530567: // site 11219 this.getSite().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 11220 return value; 11221 case -1868566105: // subSite 11222 this.getSubSite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 11223 return value; 11224 default: return super.setProperty(hash, name, value); 11225 } 11226 11227 } 11228 11229 @Override 11230 public Base setProperty(String name, Base value) throws FHIRException { 11231 if (name.equals("site")) { 11232 this.getSite().add(TypeConvertor.castToCodeableReference(value)); 11233 } else if (name.equals("subSite")) { 11234 this.getSubSite().add(TypeConvertor.castToCodeableConcept(value)); 11235 } else 11236 return super.setProperty(name, value); 11237 return value; 11238 } 11239 11240 @Override 11241 public void removeChild(String name, Base value) throws FHIRException { 11242 if (name.equals("site")) { 11243 this.getSite().remove(value); 11244 } else if (name.equals("subSite")) { 11245 this.getSubSite().remove(value); 11246 } else 11247 super.removeChild(name, value); 11248 11249 } 11250 11251 @Override 11252 public Base makeProperty(int hash, String name) throws FHIRException { 11253 switch (hash) { 11254 case 3530567: return addSite(); 11255 case -1868566105: return addSubSite(); 11256 default: return super.makeProperty(hash, name); 11257 } 11258 11259 } 11260 11261 @Override 11262 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 11263 switch (hash) { 11264 case 3530567: /*site*/ return new String[] {"CodeableReference"}; 11265 case -1868566105: /*subSite*/ return new String[] {"CodeableConcept"}; 11266 default: return super.getTypesForProperty(hash, name); 11267 } 11268 11269 } 11270 11271 @Override 11272 public Base addChild(String name) throws FHIRException { 11273 if (name.equals("site")) { 11274 return addSite(); 11275 } 11276 else if (name.equals("subSite")) { 11277 return addSubSite(); 11278 } 11279 else 11280 return super.addChild(name); 11281 } 11282 11283 public AddedItemBodySiteComponent copy() { 11284 AddedItemBodySiteComponent dst = new AddedItemBodySiteComponent(); 11285 copyValues(dst); 11286 return dst; 11287 } 11288 11289 public void copyValues(AddedItemBodySiteComponent dst) { 11290 super.copyValues(dst); 11291 if (site != null) { 11292 dst.site = new ArrayList<CodeableReference>(); 11293 for (CodeableReference i : site) 11294 dst.site.add(i.copy()); 11295 }; 11296 if (subSite != null) { 11297 dst.subSite = new ArrayList<CodeableConcept>(); 11298 for (CodeableConcept i : subSite) 11299 dst.subSite.add(i.copy()); 11300 }; 11301 } 11302 11303 @Override 11304 public boolean equalsDeep(Base other_) { 11305 if (!super.equalsDeep(other_)) 11306 return false; 11307 if (!(other_ instanceof AddedItemBodySiteComponent)) 11308 return false; 11309 AddedItemBodySiteComponent o = (AddedItemBodySiteComponent) other_; 11310 return compareDeep(site, o.site, true) && compareDeep(subSite, o.subSite, true); 11311 } 11312 11313 @Override 11314 public boolean equalsShallow(Base other_) { 11315 if (!super.equalsShallow(other_)) 11316 return false; 11317 if (!(other_ instanceof AddedItemBodySiteComponent)) 11318 return false; 11319 AddedItemBodySiteComponent o = (AddedItemBodySiteComponent) other_; 11320 return true; 11321 } 11322 11323 public boolean isEmpty() { 11324 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, subSite); 11325 } 11326 11327 public String fhirType() { 11328 return "ExplanationOfBenefit.addItem.bodySite"; 11329 11330 } 11331 11332 } 11333 11334 @Block() 11335 public static class AddedItemDetailComponent extends BackboneElement implements IBaseBackboneElement { 11336 /** 11337 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 11338 */ 11339 @Child(name = "traceNumber", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11340 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 11341 protected List<Identifier> traceNumber; 11342 11343 /** 11344 * The type of revenue or cost center providing the product and/or service. 11345 */ 11346 @Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 11347 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 11348 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 11349 protected CodeableConcept revenue; 11350 11351 /** 11352 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 11353 */ 11354 @Child(name = "productOrService", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 11355 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 11356 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 11357 protected CodeableConcept productOrService; 11358 11359 /** 11360 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 11361 */ 11362 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 11363 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 11364 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 11365 protected CodeableConcept productOrServiceEnd; 11366 11367 /** 11368 * Item typification or modifiers codes to convey additional context for the product or service. 11369 */ 11370 @Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11371 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 11372 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 11373 protected List<CodeableConcept> modifier; 11374 11375 /** 11376 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 11377 */ 11378 @Child(name = "patientPaid", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=false) 11379 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 11380 protected Money patientPaid; 11381 11382 /** 11383 * The number of repetitions of a service or product. 11384 */ 11385 @Child(name = "quantity", type = {Quantity.class}, order=7, min=0, max=1, modifier=false, summary=false) 11386 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 11387 protected Quantity quantity; 11388 11389 /** 11390 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 11391 */ 11392 @Child(name = "unitPrice", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 11393 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 11394 protected Money unitPrice; 11395 11396 /** 11397 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 11398 */ 11399 @Child(name = "factor", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false) 11400 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 11401 protected DecimalType factor; 11402 11403 /** 11404 * The total of taxes applicable for this product or service. 11405 */ 11406 @Child(name = "tax", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false) 11407 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 11408 protected Money tax; 11409 11410 /** 11411 * The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor. 11412 */ 11413 @Child(name = "net", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) 11414 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor." ) 11415 protected Money net; 11416 11417 /** 11418 * The numbers associated with notes below which apply to the adjudication of this item. 11419 */ 11420 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11421 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 11422 protected List<PositiveIntType> noteNumber; 11423 11424 /** 11425 * The high-level results of the adjudication if adjudication has been performed. 11426 */ 11427 @Child(name = "reviewOutcome", type = {ItemReviewOutcomeComponent.class}, order=13, min=0, max=1, modifier=false, summary=false) 11428 @Description(shortDefinition="Additem detail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 11429 protected ItemReviewOutcomeComponent reviewOutcome; 11430 11431 /** 11432 * The adjudication results. 11433 */ 11434 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11435 @Description(shortDefinition="Added items adjudication", formalDefinition="The adjudication results." ) 11436 protected List<AdjudicationComponent> adjudication; 11437 11438 /** 11439 * The third-tier service adjudications for payor added services. 11440 */ 11441 @Child(name = "subDetail", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 11442 @Description(shortDefinition="Insurer added line items", formalDefinition="The third-tier service adjudications for payor added services." ) 11443 protected List<AddedItemDetailSubDetailComponent> subDetail; 11444 11445 private static final long serialVersionUID = 1088072336L; 11446 11447 /** 11448 * Constructor 11449 */ 11450 public AddedItemDetailComponent() { 11451 super(); 11452 } 11453 11454 /** 11455 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 11456 */ 11457 public List<Identifier> getTraceNumber() { 11458 if (this.traceNumber == null) 11459 this.traceNumber = new ArrayList<Identifier>(); 11460 return this.traceNumber; 11461 } 11462 11463 /** 11464 * @return Returns a reference to <code>this</code> for easy method chaining 11465 */ 11466 public AddedItemDetailComponent setTraceNumber(List<Identifier> theTraceNumber) { 11467 this.traceNumber = theTraceNumber; 11468 return this; 11469 } 11470 11471 public boolean hasTraceNumber() { 11472 if (this.traceNumber == null) 11473 return false; 11474 for (Identifier item : this.traceNumber) 11475 if (!item.isEmpty()) 11476 return true; 11477 return false; 11478 } 11479 11480 public Identifier addTraceNumber() { //3 11481 Identifier t = new Identifier(); 11482 if (this.traceNumber == null) 11483 this.traceNumber = new ArrayList<Identifier>(); 11484 this.traceNumber.add(t); 11485 return t; 11486 } 11487 11488 public AddedItemDetailComponent addTraceNumber(Identifier t) { //3 11489 if (t == null) 11490 return this; 11491 if (this.traceNumber == null) 11492 this.traceNumber = new ArrayList<Identifier>(); 11493 this.traceNumber.add(t); 11494 return this; 11495 } 11496 11497 /** 11498 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 11499 */ 11500 public Identifier getTraceNumberFirstRep() { 11501 if (getTraceNumber().isEmpty()) { 11502 addTraceNumber(); 11503 } 11504 return getTraceNumber().get(0); 11505 } 11506 11507 /** 11508 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 11509 */ 11510 public CodeableConcept getRevenue() { 11511 if (this.revenue == null) 11512 if (Configuration.errorOnAutoCreate()) 11513 throw new Error("Attempt to auto-create AddedItemDetailComponent.revenue"); 11514 else if (Configuration.doAutoCreate()) 11515 this.revenue = new CodeableConcept(); // cc 11516 return this.revenue; 11517 } 11518 11519 public boolean hasRevenue() { 11520 return this.revenue != null && !this.revenue.isEmpty(); 11521 } 11522 11523 /** 11524 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 11525 */ 11526 public AddedItemDetailComponent setRevenue(CodeableConcept value) { 11527 this.revenue = value; 11528 return this; 11529 } 11530 11531 /** 11532 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 11533 */ 11534 public CodeableConcept getProductOrService() { 11535 if (this.productOrService == null) 11536 if (Configuration.errorOnAutoCreate()) 11537 throw new Error("Attempt to auto-create AddedItemDetailComponent.productOrService"); 11538 else if (Configuration.doAutoCreate()) 11539 this.productOrService = new CodeableConcept(); // cc 11540 return this.productOrService; 11541 } 11542 11543 public boolean hasProductOrService() { 11544 return this.productOrService != null && !this.productOrService.isEmpty(); 11545 } 11546 11547 /** 11548 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 11549 */ 11550 public AddedItemDetailComponent setProductOrService(CodeableConcept value) { 11551 this.productOrService = value; 11552 return this; 11553 } 11554 11555 /** 11556 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 11557 */ 11558 public CodeableConcept getProductOrServiceEnd() { 11559 if (this.productOrServiceEnd == null) 11560 if (Configuration.errorOnAutoCreate()) 11561 throw new Error("Attempt to auto-create AddedItemDetailComponent.productOrServiceEnd"); 11562 else if (Configuration.doAutoCreate()) 11563 this.productOrServiceEnd = new CodeableConcept(); // cc 11564 return this.productOrServiceEnd; 11565 } 11566 11567 public boolean hasProductOrServiceEnd() { 11568 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 11569 } 11570 11571 /** 11572 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 11573 */ 11574 public AddedItemDetailComponent setProductOrServiceEnd(CodeableConcept value) { 11575 this.productOrServiceEnd = value; 11576 return this; 11577 } 11578 11579 /** 11580 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 11581 */ 11582 public List<CodeableConcept> getModifier() { 11583 if (this.modifier == null) 11584 this.modifier = new ArrayList<CodeableConcept>(); 11585 return this.modifier; 11586 } 11587 11588 /** 11589 * @return Returns a reference to <code>this</code> for easy method chaining 11590 */ 11591 public AddedItemDetailComponent setModifier(List<CodeableConcept> theModifier) { 11592 this.modifier = theModifier; 11593 return this; 11594 } 11595 11596 public boolean hasModifier() { 11597 if (this.modifier == null) 11598 return false; 11599 for (CodeableConcept item : this.modifier) 11600 if (!item.isEmpty()) 11601 return true; 11602 return false; 11603 } 11604 11605 public CodeableConcept addModifier() { //3 11606 CodeableConcept t = new CodeableConcept(); 11607 if (this.modifier == null) 11608 this.modifier = new ArrayList<CodeableConcept>(); 11609 this.modifier.add(t); 11610 return t; 11611 } 11612 11613 public AddedItemDetailComponent addModifier(CodeableConcept t) { //3 11614 if (t == null) 11615 return this; 11616 if (this.modifier == null) 11617 this.modifier = new ArrayList<CodeableConcept>(); 11618 this.modifier.add(t); 11619 return this; 11620 } 11621 11622 /** 11623 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 11624 */ 11625 public CodeableConcept getModifierFirstRep() { 11626 if (getModifier().isEmpty()) { 11627 addModifier(); 11628 } 11629 return getModifier().get(0); 11630 } 11631 11632 /** 11633 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 11634 */ 11635 public Money getPatientPaid() { 11636 if (this.patientPaid == null) 11637 if (Configuration.errorOnAutoCreate()) 11638 throw new Error("Attempt to auto-create AddedItemDetailComponent.patientPaid"); 11639 else if (Configuration.doAutoCreate()) 11640 this.patientPaid = new Money(); // cc 11641 return this.patientPaid; 11642 } 11643 11644 public boolean hasPatientPaid() { 11645 return this.patientPaid != null && !this.patientPaid.isEmpty(); 11646 } 11647 11648 /** 11649 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 11650 */ 11651 public AddedItemDetailComponent setPatientPaid(Money value) { 11652 this.patientPaid = value; 11653 return this; 11654 } 11655 11656 /** 11657 * @return {@link #quantity} (The number of repetitions of a service or product.) 11658 */ 11659 public Quantity getQuantity() { 11660 if (this.quantity == null) 11661 if (Configuration.errorOnAutoCreate()) 11662 throw new Error("Attempt to auto-create AddedItemDetailComponent.quantity"); 11663 else if (Configuration.doAutoCreate()) 11664 this.quantity = new Quantity(); // cc 11665 return this.quantity; 11666 } 11667 11668 public boolean hasQuantity() { 11669 return this.quantity != null && !this.quantity.isEmpty(); 11670 } 11671 11672 /** 11673 * @param value {@link #quantity} (The number of repetitions of a service or product.) 11674 */ 11675 public AddedItemDetailComponent setQuantity(Quantity value) { 11676 this.quantity = value; 11677 return this; 11678 } 11679 11680 /** 11681 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 11682 */ 11683 public Money getUnitPrice() { 11684 if (this.unitPrice == null) 11685 if (Configuration.errorOnAutoCreate()) 11686 throw new Error("Attempt to auto-create AddedItemDetailComponent.unitPrice"); 11687 else if (Configuration.doAutoCreate()) 11688 this.unitPrice = new Money(); // cc 11689 return this.unitPrice; 11690 } 11691 11692 public boolean hasUnitPrice() { 11693 return this.unitPrice != null && !this.unitPrice.isEmpty(); 11694 } 11695 11696 /** 11697 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 11698 */ 11699 public AddedItemDetailComponent setUnitPrice(Money value) { 11700 this.unitPrice = value; 11701 return this; 11702 } 11703 11704 /** 11705 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 11706 */ 11707 public DecimalType getFactorElement() { 11708 if (this.factor == null) 11709 if (Configuration.errorOnAutoCreate()) 11710 throw new Error("Attempt to auto-create AddedItemDetailComponent.factor"); 11711 else if (Configuration.doAutoCreate()) 11712 this.factor = new DecimalType(); // bb 11713 return this.factor; 11714 } 11715 11716 public boolean hasFactorElement() { 11717 return this.factor != null && !this.factor.isEmpty(); 11718 } 11719 11720 public boolean hasFactor() { 11721 return this.factor != null && !this.factor.isEmpty(); 11722 } 11723 11724 /** 11725 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 11726 */ 11727 public AddedItemDetailComponent setFactorElement(DecimalType value) { 11728 this.factor = value; 11729 return this; 11730 } 11731 11732 /** 11733 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 11734 */ 11735 public BigDecimal getFactor() { 11736 return this.factor == null ? null : this.factor.getValue(); 11737 } 11738 11739 /** 11740 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 11741 */ 11742 public AddedItemDetailComponent setFactor(BigDecimal value) { 11743 if (value == null) 11744 this.factor = null; 11745 else { 11746 if (this.factor == null) 11747 this.factor = new DecimalType(); 11748 this.factor.setValue(value); 11749 } 11750 return this; 11751 } 11752 11753 /** 11754 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 11755 */ 11756 public AddedItemDetailComponent setFactor(long value) { 11757 this.factor = new DecimalType(); 11758 this.factor.setValue(value); 11759 return this; 11760 } 11761 11762 /** 11763 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 11764 */ 11765 public AddedItemDetailComponent setFactor(double value) { 11766 this.factor = new DecimalType(); 11767 this.factor.setValue(value); 11768 return this; 11769 } 11770 11771 /** 11772 * @return {@link #tax} (The total of taxes applicable for this product or service.) 11773 */ 11774 public Money getTax() { 11775 if (this.tax == null) 11776 if (Configuration.errorOnAutoCreate()) 11777 throw new Error("Attempt to auto-create AddedItemDetailComponent.tax"); 11778 else if (Configuration.doAutoCreate()) 11779 this.tax = new Money(); // cc 11780 return this.tax; 11781 } 11782 11783 public boolean hasTax() { 11784 return this.tax != null && !this.tax.isEmpty(); 11785 } 11786 11787 /** 11788 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 11789 */ 11790 public AddedItemDetailComponent setTax(Money value) { 11791 this.tax = value; 11792 return this; 11793 } 11794 11795 /** 11796 * @return {@link #net} (The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.) 11797 */ 11798 public Money getNet() { 11799 if (this.net == null) 11800 if (Configuration.errorOnAutoCreate()) 11801 throw new Error("Attempt to auto-create AddedItemDetailComponent.net"); 11802 else if (Configuration.doAutoCreate()) 11803 this.net = new Money(); // cc 11804 return this.net; 11805 } 11806 11807 public boolean hasNet() { 11808 return this.net != null && !this.net.isEmpty(); 11809 } 11810 11811 /** 11812 * @param value {@link #net} (The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.) 11813 */ 11814 public AddedItemDetailComponent setNet(Money value) { 11815 this.net = value; 11816 return this; 11817 } 11818 11819 /** 11820 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 11821 */ 11822 public List<PositiveIntType> getNoteNumber() { 11823 if (this.noteNumber == null) 11824 this.noteNumber = new ArrayList<PositiveIntType>(); 11825 return this.noteNumber; 11826 } 11827 11828 /** 11829 * @return Returns a reference to <code>this</code> for easy method chaining 11830 */ 11831 public AddedItemDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 11832 this.noteNumber = theNoteNumber; 11833 return this; 11834 } 11835 11836 public boolean hasNoteNumber() { 11837 if (this.noteNumber == null) 11838 return false; 11839 for (PositiveIntType item : this.noteNumber) 11840 if (!item.isEmpty()) 11841 return true; 11842 return false; 11843 } 11844 11845 /** 11846 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 11847 */ 11848 public PositiveIntType addNoteNumberElement() {//2 11849 PositiveIntType t = new PositiveIntType(); 11850 if (this.noteNumber == null) 11851 this.noteNumber = new ArrayList<PositiveIntType>(); 11852 this.noteNumber.add(t); 11853 return t; 11854 } 11855 11856 /** 11857 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 11858 */ 11859 public AddedItemDetailComponent addNoteNumber(int value) { //1 11860 PositiveIntType t = new PositiveIntType(); 11861 t.setValue(value); 11862 if (this.noteNumber == null) 11863 this.noteNumber = new ArrayList<PositiveIntType>(); 11864 this.noteNumber.add(t); 11865 return this; 11866 } 11867 11868 /** 11869 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 11870 */ 11871 public boolean hasNoteNumber(int value) { 11872 if (this.noteNumber == null) 11873 return false; 11874 for (PositiveIntType v : this.noteNumber) 11875 if (v.getValue().equals(value)) // positiveInt 11876 return true; 11877 return false; 11878 } 11879 11880 /** 11881 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 11882 */ 11883 public ItemReviewOutcomeComponent getReviewOutcome() { 11884 if (this.reviewOutcome == null) 11885 if (Configuration.errorOnAutoCreate()) 11886 throw new Error("Attempt to auto-create AddedItemDetailComponent.reviewOutcome"); 11887 else if (Configuration.doAutoCreate()) 11888 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 11889 return this.reviewOutcome; 11890 } 11891 11892 public boolean hasReviewOutcome() { 11893 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 11894 } 11895 11896 /** 11897 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 11898 */ 11899 public AddedItemDetailComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 11900 this.reviewOutcome = value; 11901 return this; 11902 } 11903 11904 /** 11905 * @return {@link #adjudication} (The adjudication results.) 11906 */ 11907 public List<AdjudicationComponent> getAdjudication() { 11908 if (this.adjudication == null) 11909 this.adjudication = new ArrayList<AdjudicationComponent>(); 11910 return this.adjudication; 11911 } 11912 11913 /** 11914 * @return Returns a reference to <code>this</code> for easy method chaining 11915 */ 11916 public AddedItemDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 11917 this.adjudication = theAdjudication; 11918 return this; 11919 } 11920 11921 public boolean hasAdjudication() { 11922 if (this.adjudication == null) 11923 return false; 11924 for (AdjudicationComponent item : this.adjudication) 11925 if (!item.isEmpty()) 11926 return true; 11927 return false; 11928 } 11929 11930 public AdjudicationComponent addAdjudication() { //3 11931 AdjudicationComponent t = new AdjudicationComponent(); 11932 if (this.adjudication == null) 11933 this.adjudication = new ArrayList<AdjudicationComponent>(); 11934 this.adjudication.add(t); 11935 return t; 11936 } 11937 11938 public AddedItemDetailComponent addAdjudication(AdjudicationComponent t) { //3 11939 if (t == null) 11940 return this; 11941 if (this.adjudication == null) 11942 this.adjudication = new ArrayList<AdjudicationComponent>(); 11943 this.adjudication.add(t); 11944 return this; 11945 } 11946 11947 /** 11948 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 11949 */ 11950 public AdjudicationComponent getAdjudicationFirstRep() { 11951 if (getAdjudication().isEmpty()) { 11952 addAdjudication(); 11953 } 11954 return getAdjudication().get(0); 11955 } 11956 11957 /** 11958 * @return {@link #subDetail} (The third-tier service adjudications for payor added services.) 11959 */ 11960 public List<AddedItemDetailSubDetailComponent> getSubDetail() { 11961 if (this.subDetail == null) 11962 this.subDetail = new ArrayList<AddedItemDetailSubDetailComponent>(); 11963 return this.subDetail; 11964 } 11965 11966 /** 11967 * @return Returns a reference to <code>this</code> for easy method chaining 11968 */ 11969 public AddedItemDetailComponent setSubDetail(List<AddedItemDetailSubDetailComponent> theSubDetail) { 11970 this.subDetail = theSubDetail; 11971 return this; 11972 } 11973 11974 public boolean hasSubDetail() { 11975 if (this.subDetail == null) 11976 return false; 11977 for (AddedItemDetailSubDetailComponent item : this.subDetail) 11978 if (!item.isEmpty()) 11979 return true; 11980 return false; 11981 } 11982 11983 public AddedItemDetailSubDetailComponent addSubDetail() { //3 11984 AddedItemDetailSubDetailComponent t = new AddedItemDetailSubDetailComponent(); 11985 if (this.subDetail == null) 11986 this.subDetail = new ArrayList<AddedItemDetailSubDetailComponent>(); 11987 this.subDetail.add(t); 11988 return t; 11989 } 11990 11991 public AddedItemDetailComponent addSubDetail(AddedItemDetailSubDetailComponent t) { //3 11992 if (t == null) 11993 return this; 11994 if (this.subDetail == null) 11995 this.subDetail = new ArrayList<AddedItemDetailSubDetailComponent>(); 11996 this.subDetail.add(t); 11997 return this; 11998 } 11999 12000 /** 12001 * @return The first repetition of repeating field {@link #subDetail}, creating it if it does not already exist {3} 12002 */ 12003 public AddedItemDetailSubDetailComponent getSubDetailFirstRep() { 12004 if (getSubDetail().isEmpty()) { 12005 addSubDetail(); 12006 } 12007 return getSubDetail().get(0); 12008 } 12009 12010 protected void listChildren(List<Property> children) { 12011 super.listChildren(children); 12012 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 12013 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 12014 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 12015 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 12016 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 12017 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 12018 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 12019 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 12020 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 12021 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 12022 children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.", 0, 1, net)); 12023 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 12024 children.add(new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 12025 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 12026 children.add(new Property("subDetail", "", "The third-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); 12027 } 12028 12029 @Override 12030 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 12031 switch (_hash) { 12032 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 12033 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 12034 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 12035 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 12036 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 12037 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 12038 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 12039 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 12040 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 12041 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 12042 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.", 0, 1, net); 12043 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 12044 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 12045 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 12046 case -828829007: /*subDetail*/ return new Property("subDetail", "", "The third-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, subDetail); 12047 default: return super.getNamedProperty(_hash, _name, _checkValid); 12048 } 12049 12050 } 12051 12052 @Override 12053 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 12054 switch (hash) { 12055 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 12056 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 12057 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 12058 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 12059 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 12060 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 12061 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 12062 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 12063 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 12064 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 12065 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 12066 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 12067 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 12068 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 12069 case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // AddedItemDetailSubDetailComponent 12070 default: return super.getProperty(hash, name, checkValid); 12071 } 12072 12073 } 12074 12075 @Override 12076 public Base setProperty(int hash, String name, Base value) throws FHIRException { 12077 switch (hash) { 12078 case 82505966: // traceNumber 12079 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 12080 return value; 12081 case 1099842588: // revenue 12082 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12083 return value; 12084 case 1957227299: // productOrService 12085 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12086 return value; 12087 case -717476168: // productOrServiceEnd 12088 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12089 return value; 12090 case -615513385: // modifier 12091 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 12092 return value; 12093 case 525514609: // patientPaid 12094 this.patientPaid = TypeConvertor.castToMoney(value); // Money 12095 return value; 12096 case -1285004149: // quantity 12097 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 12098 return value; 12099 case -486196699: // unitPrice 12100 this.unitPrice = TypeConvertor.castToMoney(value); // Money 12101 return value; 12102 case -1282148017: // factor 12103 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 12104 return value; 12105 case 114603: // tax 12106 this.tax = TypeConvertor.castToMoney(value); // Money 12107 return value; 12108 case 108957: // net 12109 this.net = TypeConvertor.castToMoney(value); // Money 12110 return value; 12111 case -1110033957: // noteNumber 12112 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 12113 return value; 12114 case -51825446: // reviewOutcome 12115 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 12116 return value; 12117 case -231349275: // adjudication 12118 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 12119 return value; 12120 case -828829007: // subDetail 12121 this.getSubDetail().add((AddedItemDetailSubDetailComponent) value); // AddedItemDetailSubDetailComponent 12122 return value; 12123 default: return super.setProperty(hash, name, value); 12124 } 12125 12126 } 12127 12128 @Override 12129 public Base setProperty(String name, Base value) throws FHIRException { 12130 if (name.equals("traceNumber")) { 12131 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 12132 } else if (name.equals("revenue")) { 12133 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12134 } else if (name.equals("productOrService")) { 12135 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12136 } else if (name.equals("productOrServiceEnd")) { 12137 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 12138 } else if (name.equals("modifier")) { 12139 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 12140 } else if (name.equals("patientPaid")) { 12141 this.patientPaid = TypeConvertor.castToMoney(value); // Money 12142 } else if (name.equals("quantity")) { 12143 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 12144 } else if (name.equals("unitPrice")) { 12145 this.unitPrice = TypeConvertor.castToMoney(value); // Money 12146 } else if (name.equals("factor")) { 12147 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 12148 } else if (name.equals("tax")) { 12149 this.tax = TypeConvertor.castToMoney(value); // Money 12150 } else if (name.equals("net")) { 12151 this.net = TypeConvertor.castToMoney(value); // Money 12152 } else if (name.equals("noteNumber")) { 12153 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 12154 } else if (name.equals("reviewOutcome")) { 12155 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 12156 } else if (name.equals("adjudication")) { 12157 this.getAdjudication().add((AdjudicationComponent) value); 12158 } else if (name.equals("subDetail")) { 12159 this.getSubDetail().add((AddedItemDetailSubDetailComponent) value); 12160 } else 12161 return super.setProperty(name, value); 12162 return value; 12163 } 12164 12165 @Override 12166 public void removeChild(String name, Base value) throws FHIRException { 12167 if (name.equals("traceNumber")) { 12168 this.getTraceNumber().remove(value); 12169 } else if (name.equals("revenue")) { 12170 this.revenue = null; 12171 } else if (name.equals("productOrService")) { 12172 this.productOrService = null; 12173 } else if (name.equals("productOrServiceEnd")) { 12174 this.productOrServiceEnd = null; 12175 } else if (name.equals("modifier")) { 12176 this.getModifier().remove(value); 12177 } else if (name.equals("patientPaid")) { 12178 this.patientPaid = null; 12179 } else if (name.equals("quantity")) { 12180 this.quantity = null; 12181 } else if (name.equals("unitPrice")) { 12182 this.unitPrice = null; 12183 } else if (name.equals("factor")) { 12184 this.factor = null; 12185 } else if (name.equals("tax")) { 12186 this.tax = null; 12187 } else if (name.equals("net")) { 12188 this.net = null; 12189 } else if (name.equals("noteNumber")) { 12190 this.getNoteNumber().remove(value); 12191 } else if (name.equals("reviewOutcome")) { 12192 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 12193 } else if (name.equals("adjudication")) { 12194 this.getAdjudication().remove((AdjudicationComponent) value); 12195 } else if (name.equals("subDetail")) { 12196 this.getSubDetail().remove((AddedItemDetailSubDetailComponent) value); 12197 } else 12198 super.removeChild(name, value); 12199 12200 } 12201 12202 @Override 12203 public Base makeProperty(int hash, String name) throws FHIRException { 12204 switch (hash) { 12205 case 82505966: return addTraceNumber(); 12206 case 1099842588: return getRevenue(); 12207 case 1957227299: return getProductOrService(); 12208 case -717476168: return getProductOrServiceEnd(); 12209 case -615513385: return addModifier(); 12210 case 525514609: return getPatientPaid(); 12211 case -1285004149: return getQuantity(); 12212 case -486196699: return getUnitPrice(); 12213 case -1282148017: return getFactorElement(); 12214 case 114603: return getTax(); 12215 case 108957: return getNet(); 12216 case -1110033957: return addNoteNumberElement(); 12217 case -51825446: return getReviewOutcome(); 12218 case -231349275: return addAdjudication(); 12219 case -828829007: return addSubDetail(); 12220 default: return super.makeProperty(hash, name); 12221 } 12222 12223 } 12224 12225 @Override 12226 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 12227 switch (hash) { 12228 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 12229 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 12230 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 12231 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 12232 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 12233 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 12234 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 12235 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 12236 case -1282148017: /*factor*/ return new String[] {"decimal"}; 12237 case 114603: /*tax*/ return new String[] {"Money"}; 12238 case 108957: /*net*/ return new String[] {"Money"}; 12239 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 12240 case -51825446: /*reviewOutcome*/ return new String[] {"@ExplanationOfBenefit.item.reviewOutcome"}; 12241 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 12242 case -828829007: /*subDetail*/ return new String[] {}; 12243 default: return super.getTypesForProperty(hash, name); 12244 } 12245 12246 } 12247 12248 @Override 12249 public Base addChild(String name) throws FHIRException { 12250 if (name.equals("traceNumber")) { 12251 return addTraceNumber(); 12252 } 12253 else if (name.equals("revenue")) { 12254 this.revenue = new CodeableConcept(); 12255 return this.revenue; 12256 } 12257 else if (name.equals("productOrService")) { 12258 this.productOrService = new CodeableConcept(); 12259 return this.productOrService; 12260 } 12261 else if (name.equals("productOrServiceEnd")) { 12262 this.productOrServiceEnd = new CodeableConcept(); 12263 return this.productOrServiceEnd; 12264 } 12265 else if (name.equals("modifier")) { 12266 return addModifier(); 12267 } 12268 else if (name.equals("patientPaid")) { 12269 this.patientPaid = new Money(); 12270 return this.patientPaid; 12271 } 12272 else if (name.equals("quantity")) { 12273 this.quantity = new Quantity(); 12274 return this.quantity; 12275 } 12276 else if (name.equals("unitPrice")) { 12277 this.unitPrice = new Money(); 12278 return this.unitPrice; 12279 } 12280 else if (name.equals("factor")) { 12281 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.detail.factor"); 12282 } 12283 else if (name.equals("tax")) { 12284 this.tax = new Money(); 12285 return this.tax; 12286 } 12287 else if (name.equals("net")) { 12288 this.net = new Money(); 12289 return this.net; 12290 } 12291 else if (name.equals("noteNumber")) { 12292 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.detail.noteNumber"); 12293 } 12294 else if (name.equals("reviewOutcome")) { 12295 this.reviewOutcome = new ItemReviewOutcomeComponent(); 12296 return this.reviewOutcome; 12297 } 12298 else if (name.equals("adjudication")) { 12299 return addAdjudication(); 12300 } 12301 else if (name.equals("subDetail")) { 12302 return addSubDetail(); 12303 } 12304 else 12305 return super.addChild(name); 12306 } 12307 12308 public AddedItemDetailComponent copy() { 12309 AddedItemDetailComponent dst = new AddedItemDetailComponent(); 12310 copyValues(dst); 12311 return dst; 12312 } 12313 12314 public void copyValues(AddedItemDetailComponent dst) { 12315 super.copyValues(dst); 12316 if (traceNumber != null) { 12317 dst.traceNumber = new ArrayList<Identifier>(); 12318 for (Identifier i : traceNumber) 12319 dst.traceNumber.add(i.copy()); 12320 }; 12321 dst.revenue = revenue == null ? null : revenue.copy(); 12322 dst.productOrService = productOrService == null ? null : productOrService.copy(); 12323 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 12324 if (modifier != null) { 12325 dst.modifier = new ArrayList<CodeableConcept>(); 12326 for (CodeableConcept i : modifier) 12327 dst.modifier.add(i.copy()); 12328 }; 12329 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 12330 dst.quantity = quantity == null ? null : quantity.copy(); 12331 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 12332 dst.factor = factor == null ? null : factor.copy(); 12333 dst.tax = tax == null ? null : tax.copy(); 12334 dst.net = net == null ? null : net.copy(); 12335 if (noteNumber != null) { 12336 dst.noteNumber = new ArrayList<PositiveIntType>(); 12337 for (PositiveIntType i : noteNumber) 12338 dst.noteNumber.add(i.copy()); 12339 }; 12340 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 12341 if (adjudication != null) { 12342 dst.adjudication = new ArrayList<AdjudicationComponent>(); 12343 for (AdjudicationComponent i : adjudication) 12344 dst.adjudication.add(i.copy()); 12345 }; 12346 if (subDetail != null) { 12347 dst.subDetail = new ArrayList<AddedItemDetailSubDetailComponent>(); 12348 for (AddedItemDetailSubDetailComponent i : subDetail) 12349 dst.subDetail.add(i.copy()); 12350 }; 12351 } 12352 12353 @Override 12354 public boolean equalsDeep(Base other_) { 12355 if (!super.equalsDeep(other_)) 12356 return false; 12357 if (!(other_ instanceof AddedItemDetailComponent)) 12358 return false; 12359 AddedItemDetailComponent o = (AddedItemDetailComponent) other_; 12360 return compareDeep(traceNumber, o.traceNumber, true) && compareDeep(revenue, o.revenue, true) && compareDeep(productOrService, o.productOrService, true) 12361 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true) 12362 && compareDeep(patientPaid, o.patientPaid, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) 12363 && compareDeep(factor, o.factor, true) && compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true) 12364 && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true) 12365 && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) 12366 ; 12367 } 12368 12369 @Override 12370 public boolean equalsShallow(Base other_) { 12371 if (!super.equalsShallow(other_)) 12372 return false; 12373 if (!(other_ instanceof AddedItemDetailComponent)) 12374 return false; 12375 AddedItemDetailComponent o = (AddedItemDetailComponent) other_; 12376 return compareValues(factor, o.factor, true) && compareValues(noteNumber, o.noteNumber, true); 12377 } 12378 12379 public boolean isEmpty() { 12380 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(traceNumber, revenue, productOrService 12381 , productOrServiceEnd, modifier, patientPaid, quantity, unitPrice, factor, tax 12382 , net, noteNumber, reviewOutcome, adjudication, subDetail); 12383 } 12384 12385 public String fhirType() { 12386 return "ExplanationOfBenefit.addItem.detail"; 12387 12388 } 12389 12390 } 12391 12392 @Block() 12393 public static class AddedItemDetailSubDetailComponent extends BackboneElement implements IBaseBackboneElement { 12394 /** 12395 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 12396 */ 12397 @Child(name = "traceNumber", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 12398 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 12399 protected List<Identifier> traceNumber; 12400 12401 /** 12402 * The type of revenue or cost center providing the product and/or service. 12403 */ 12404 @Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 12405 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." ) 12406 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 12407 protected CodeableConcept revenue; 12408 12409 /** 12410 * When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used. 12411 */ 12412 @Child(name = "productOrService", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 12413 @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." ) 12414 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 12415 protected CodeableConcept productOrService; 12416 12417 /** 12418 * This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims. 12419 */ 12420 @Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 12421 @Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." ) 12422 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 12423 protected CodeableConcept productOrServiceEnd; 12424 12425 /** 12426 * Item typification or modifiers codes to convey additional context for the product or service. 12427 */ 12428 @Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 12429 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." ) 12430 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 12431 protected List<CodeableConcept> modifier; 12432 12433 /** 12434 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 12435 */ 12436 @Child(name = "patientPaid", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=false) 12437 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 12438 protected Money patientPaid; 12439 12440 /** 12441 * The number of repetitions of a service or product. 12442 */ 12443 @Child(name = "quantity", type = {Quantity.class}, order=7, min=0, max=1, modifier=false, summary=false) 12444 @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." ) 12445 protected Quantity quantity; 12446 12447 /** 12448 * If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. 12449 */ 12450 @Child(name = "unitPrice", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 12451 @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." ) 12452 protected Money unitPrice; 12453 12454 /** 12455 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 12456 */ 12457 @Child(name = "factor", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false) 12458 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 12459 protected DecimalType factor; 12460 12461 /** 12462 * The total of taxes applicable for this product or service. 12463 */ 12464 @Child(name = "tax", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false) 12465 @Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." ) 12466 protected Money tax; 12467 12468 /** 12469 * The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor. 12470 */ 12471 @Child(name = "net", type = {Money.class}, order=11, min=0, max=1, modifier=false, summary=false) 12472 @Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor." ) 12473 protected Money net; 12474 12475 /** 12476 * The numbers associated with notes below which apply to the adjudication of this item. 12477 */ 12478 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 12479 @Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." ) 12480 protected List<PositiveIntType> noteNumber; 12481 12482 /** 12483 * The high-level results of the adjudication if adjudication has been performed. 12484 */ 12485 @Child(name = "reviewOutcome", type = {ItemReviewOutcomeComponent.class}, order=13, min=0, max=1, modifier=false, summary=false) 12486 @Description(shortDefinition="Additem subdetail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." ) 12487 protected ItemReviewOutcomeComponent reviewOutcome; 12488 12489 /** 12490 * The adjudication results. 12491 */ 12492 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 12493 @Description(shortDefinition="Added items adjudication", formalDefinition="The adjudication results." ) 12494 protected List<AdjudicationComponent> adjudication; 12495 12496 private static final long serialVersionUID = -71243645L; 12497 12498 /** 12499 * Constructor 12500 */ 12501 public AddedItemDetailSubDetailComponent() { 12502 super(); 12503 } 12504 12505 /** 12506 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 12507 */ 12508 public List<Identifier> getTraceNumber() { 12509 if (this.traceNumber == null) 12510 this.traceNumber = new ArrayList<Identifier>(); 12511 return this.traceNumber; 12512 } 12513 12514 /** 12515 * @return Returns a reference to <code>this</code> for easy method chaining 12516 */ 12517 public AddedItemDetailSubDetailComponent setTraceNumber(List<Identifier> theTraceNumber) { 12518 this.traceNumber = theTraceNumber; 12519 return this; 12520 } 12521 12522 public boolean hasTraceNumber() { 12523 if (this.traceNumber == null) 12524 return false; 12525 for (Identifier item : this.traceNumber) 12526 if (!item.isEmpty()) 12527 return true; 12528 return false; 12529 } 12530 12531 public Identifier addTraceNumber() { //3 12532 Identifier t = new Identifier(); 12533 if (this.traceNumber == null) 12534 this.traceNumber = new ArrayList<Identifier>(); 12535 this.traceNumber.add(t); 12536 return t; 12537 } 12538 12539 public AddedItemDetailSubDetailComponent addTraceNumber(Identifier t) { //3 12540 if (t == null) 12541 return this; 12542 if (this.traceNumber == null) 12543 this.traceNumber = new ArrayList<Identifier>(); 12544 this.traceNumber.add(t); 12545 return this; 12546 } 12547 12548 /** 12549 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 12550 */ 12551 public Identifier getTraceNumberFirstRep() { 12552 if (getTraceNumber().isEmpty()) { 12553 addTraceNumber(); 12554 } 12555 return getTraceNumber().get(0); 12556 } 12557 12558 /** 12559 * @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 12560 */ 12561 public CodeableConcept getRevenue() { 12562 if (this.revenue == null) 12563 if (Configuration.errorOnAutoCreate()) 12564 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.revenue"); 12565 else if (Configuration.doAutoCreate()) 12566 this.revenue = new CodeableConcept(); // cc 12567 return this.revenue; 12568 } 12569 12570 public boolean hasRevenue() { 12571 return this.revenue != null && !this.revenue.isEmpty(); 12572 } 12573 12574 /** 12575 * @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.) 12576 */ 12577 public AddedItemDetailSubDetailComponent setRevenue(CodeableConcept value) { 12578 this.revenue = value; 12579 return this; 12580 } 12581 12582 /** 12583 * @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 12584 */ 12585 public CodeableConcept getProductOrService() { 12586 if (this.productOrService == null) 12587 if (Configuration.errorOnAutoCreate()) 12588 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.productOrService"); 12589 else if (Configuration.doAutoCreate()) 12590 this.productOrService = new CodeableConcept(); // cc 12591 return this.productOrService; 12592 } 12593 12594 public boolean hasProductOrService() { 12595 return this.productOrService != null && !this.productOrService.isEmpty(); 12596 } 12597 12598 /** 12599 * @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.) 12600 */ 12601 public AddedItemDetailSubDetailComponent setProductOrService(CodeableConcept value) { 12602 this.productOrService = value; 12603 return this; 12604 } 12605 12606 /** 12607 * @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 12608 */ 12609 public CodeableConcept getProductOrServiceEnd() { 12610 if (this.productOrServiceEnd == null) 12611 if (Configuration.errorOnAutoCreate()) 12612 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.productOrServiceEnd"); 12613 else if (Configuration.doAutoCreate()) 12614 this.productOrServiceEnd = new CodeableConcept(); // cc 12615 return this.productOrServiceEnd; 12616 } 12617 12618 public boolean hasProductOrServiceEnd() { 12619 return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty(); 12620 } 12621 12622 /** 12623 * @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.) 12624 */ 12625 public AddedItemDetailSubDetailComponent setProductOrServiceEnd(CodeableConcept value) { 12626 this.productOrServiceEnd = value; 12627 return this; 12628 } 12629 12630 /** 12631 * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.) 12632 */ 12633 public List<CodeableConcept> getModifier() { 12634 if (this.modifier == null) 12635 this.modifier = new ArrayList<CodeableConcept>(); 12636 return this.modifier; 12637 } 12638 12639 /** 12640 * @return Returns a reference to <code>this</code> for easy method chaining 12641 */ 12642 public AddedItemDetailSubDetailComponent setModifier(List<CodeableConcept> theModifier) { 12643 this.modifier = theModifier; 12644 return this; 12645 } 12646 12647 public boolean hasModifier() { 12648 if (this.modifier == null) 12649 return false; 12650 for (CodeableConcept item : this.modifier) 12651 if (!item.isEmpty()) 12652 return true; 12653 return false; 12654 } 12655 12656 public CodeableConcept addModifier() { //3 12657 CodeableConcept t = new CodeableConcept(); 12658 if (this.modifier == null) 12659 this.modifier = new ArrayList<CodeableConcept>(); 12660 this.modifier.add(t); 12661 return t; 12662 } 12663 12664 public AddedItemDetailSubDetailComponent addModifier(CodeableConcept t) { //3 12665 if (t == null) 12666 return this; 12667 if (this.modifier == null) 12668 this.modifier = new ArrayList<CodeableConcept>(); 12669 this.modifier.add(t); 12670 return this; 12671 } 12672 12673 /** 12674 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3} 12675 */ 12676 public CodeableConcept getModifierFirstRep() { 12677 if (getModifier().isEmpty()) { 12678 addModifier(); 12679 } 12680 return getModifier().get(0); 12681 } 12682 12683 /** 12684 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 12685 */ 12686 public Money getPatientPaid() { 12687 if (this.patientPaid == null) 12688 if (Configuration.errorOnAutoCreate()) 12689 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.patientPaid"); 12690 else if (Configuration.doAutoCreate()) 12691 this.patientPaid = new Money(); // cc 12692 return this.patientPaid; 12693 } 12694 12695 public boolean hasPatientPaid() { 12696 return this.patientPaid != null && !this.patientPaid.isEmpty(); 12697 } 12698 12699 /** 12700 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 12701 */ 12702 public AddedItemDetailSubDetailComponent setPatientPaid(Money value) { 12703 this.patientPaid = value; 12704 return this; 12705 } 12706 12707 /** 12708 * @return {@link #quantity} (The number of repetitions of a service or product.) 12709 */ 12710 public Quantity getQuantity() { 12711 if (this.quantity == null) 12712 if (Configuration.errorOnAutoCreate()) 12713 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.quantity"); 12714 else if (Configuration.doAutoCreate()) 12715 this.quantity = new Quantity(); // cc 12716 return this.quantity; 12717 } 12718 12719 public boolean hasQuantity() { 12720 return this.quantity != null && !this.quantity.isEmpty(); 12721 } 12722 12723 /** 12724 * @param value {@link #quantity} (The number of repetitions of a service or product.) 12725 */ 12726 public AddedItemDetailSubDetailComponent setQuantity(Quantity value) { 12727 this.quantity = value; 12728 return this; 12729 } 12730 12731 /** 12732 * @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 12733 */ 12734 public Money getUnitPrice() { 12735 if (this.unitPrice == null) 12736 if (Configuration.errorOnAutoCreate()) 12737 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.unitPrice"); 12738 else if (Configuration.doAutoCreate()) 12739 this.unitPrice = new Money(); // cc 12740 return this.unitPrice; 12741 } 12742 12743 public boolean hasUnitPrice() { 12744 return this.unitPrice != null && !this.unitPrice.isEmpty(); 12745 } 12746 12747 /** 12748 * @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.) 12749 */ 12750 public AddedItemDetailSubDetailComponent setUnitPrice(Money value) { 12751 this.unitPrice = value; 12752 return this; 12753 } 12754 12755 /** 12756 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 12757 */ 12758 public DecimalType getFactorElement() { 12759 if (this.factor == null) 12760 if (Configuration.errorOnAutoCreate()) 12761 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.factor"); 12762 else if (Configuration.doAutoCreate()) 12763 this.factor = new DecimalType(); // bb 12764 return this.factor; 12765 } 12766 12767 public boolean hasFactorElement() { 12768 return this.factor != null && !this.factor.isEmpty(); 12769 } 12770 12771 public boolean hasFactor() { 12772 return this.factor != null && !this.factor.isEmpty(); 12773 } 12774 12775 /** 12776 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 12777 */ 12778 public AddedItemDetailSubDetailComponent setFactorElement(DecimalType value) { 12779 this.factor = value; 12780 return this; 12781 } 12782 12783 /** 12784 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 12785 */ 12786 public BigDecimal getFactor() { 12787 return this.factor == null ? null : this.factor.getValue(); 12788 } 12789 12790 /** 12791 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 12792 */ 12793 public AddedItemDetailSubDetailComponent setFactor(BigDecimal value) { 12794 if (value == null) 12795 this.factor = null; 12796 else { 12797 if (this.factor == null) 12798 this.factor = new DecimalType(); 12799 this.factor.setValue(value); 12800 } 12801 return this; 12802 } 12803 12804 /** 12805 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 12806 */ 12807 public AddedItemDetailSubDetailComponent setFactor(long value) { 12808 this.factor = new DecimalType(); 12809 this.factor.setValue(value); 12810 return this; 12811 } 12812 12813 /** 12814 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 12815 */ 12816 public AddedItemDetailSubDetailComponent setFactor(double value) { 12817 this.factor = new DecimalType(); 12818 this.factor.setValue(value); 12819 return this; 12820 } 12821 12822 /** 12823 * @return {@link #tax} (The total of taxes applicable for this product or service.) 12824 */ 12825 public Money getTax() { 12826 if (this.tax == null) 12827 if (Configuration.errorOnAutoCreate()) 12828 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.tax"); 12829 else if (Configuration.doAutoCreate()) 12830 this.tax = new Money(); // cc 12831 return this.tax; 12832 } 12833 12834 public boolean hasTax() { 12835 return this.tax != null && !this.tax.isEmpty(); 12836 } 12837 12838 /** 12839 * @param value {@link #tax} (The total of taxes applicable for this product or service.) 12840 */ 12841 public AddedItemDetailSubDetailComponent setTax(Money value) { 12842 this.tax = value; 12843 return this; 12844 } 12845 12846 /** 12847 * @return {@link #net} (The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.) 12848 */ 12849 public Money getNet() { 12850 if (this.net == null) 12851 if (Configuration.errorOnAutoCreate()) 12852 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.net"); 12853 else if (Configuration.doAutoCreate()) 12854 this.net = new Money(); // cc 12855 return this.net; 12856 } 12857 12858 public boolean hasNet() { 12859 return this.net != null && !this.net.isEmpty(); 12860 } 12861 12862 /** 12863 * @param value {@link #net} (The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.) 12864 */ 12865 public AddedItemDetailSubDetailComponent setNet(Money value) { 12866 this.net = value; 12867 return this; 12868 } 12869 12870 /** 12871 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 12872 */ 12873 public List<PositiveIntType> getNoteNumber() { 12874 if (this.noteNumber == null) 12875 this.noteNumber = new ArrayList<PositiveIntType>(); 12876 return this.noteNumber; 12877 } 12878 12879 /** 12880 * @return Returns a reference to <code>this</code> for easy method chaining 12881 */ 12882 public AddedItemDetailSubDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 12883 this.noteNumber = theNoteNumber; 12884 return this; 12885 } 12886 12887 public boolean hasNoteNumber() { 12888 if (this.noteNumber == null) 12889 return false; 12890 for (PositiveIntType item : this.noteNumber) 12891 if (!item.isEmpty()) 12892 return true; 12893 return false; 12894 } 12895 12896 /** 12897 * @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 12898 */ 12899 public PositiveIntType addNoteNumberElement() {//2 12900 PositiveIntType t = new PositiveIntType(); 12901 if (this.noteNumber == null) 12902 this.noteNumber = new ArrayList<PositiveIntType>(); 12903 this.noteNumber.add(t); 12904 return t; 12905 } 12906 12907 /** 12908 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 12909 */ 12910 public AddedItemDetailSubDetailComponent addNoteNumber(int value) { //1 12911 PositiveIntType t = new PositiveIntType(); 12912 t.setValue(value); 12913 if (this.noteNumber == null) 12914 this.noteNumber = new ArrayList<PositiveIntType>(); 12915 this.noteNumber.add(t); 12916 return this; 12917 } 12918 12919 /** 12920 * @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.) 12921 */ 12922 public boolean hasNoteNumber(int value) { 12923 if (this.noteNumber == null) 12924 return false; 12925 for (PositiveIntType v : this.noteNumber) 12926 if (v.getValue().equals(value)) // positiveInt 12927 return true; 12928 return false; 12929 } 12930 12931 /** 12932 * @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 12933 */ 12934 public ItemReviewOutcomeComponent getReviewOutcome() { 12935 if (this.reviewOutcome == null) 12936 if (Configuration.errorOnAutoCreate()) 12937 throw new Error("Attempt to auto-create AddedItemDetailSubDetailComponent.reviewOutcome"); 12938 else if (Configuration.doAutoCreate()) 12939 this.reviewOutcome = new ItemReviewOutcomeComponent(); // cc 12940 return this.reviewOutcome; 12941 } 12942 12943 public boolean hasReviewOutcome() { 12944 return this.reviewOutcome != null && !this.reviewOutcome.isEmpty(); 12945 } 12946 12947 /** 12948 * @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.) 12949 */ 12950 public AddedItemDetailSubDetailComponent setReviewOutcome(ItemReviewOutcomeComponent value) { 12951 this.reviewOutcome = value; 12952 return this; 12953 } 12954 12955 /** 12956 * @return {@link #adjudication} (The adjudication results.) 12957 */ 12958 public List<AdjudicationComponent> getAdjudication() { 12959 if (this.adjudication == null) 12960 this.adjudication = new ArrayList<AdjudicationComponent>(); 12961 return this.adjudication; 12962 } 12963 12964 /** 12965 * @return Returns a reference to <code>this</code> for easy method chaining 12966 */ 12967 public AddedItemDetailSubDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 12968 this.adjudication = theAdjudication; 12969 return this; 12970 } 12971 12972 public boolean hasAdjudication() { 12973 if (this.adjudication == null) 12974 return false; 12975 for (AdjudicationComponent item : this.adjudication) 12976 if (!item.isEmpty()) 12977 return true; 12978 return false; 12979 } 12980 12981 public AdjudicationComponent addAdjudication() { //3 12982 AdjudicationComponent t = new AdjudicationComponent(); 12983 if (this.adjudication == null) 12984 this.adjudication = new ArrayList<AdjudicationComponent>(); 12985 this.adjudication.add(t); 12986 return t; 12987 } 12988 12989 public AddedItemDetailSubDetailComponent addAdjudication(AdjudicationComponent t) { //3 12990 if (t == null) 12991 return this; 12992 if (this.adjudication == null) 12993 this.adjudication = new ArrayList<AdjudicationComponent>(); 12994 this.adjudication.add(t); 12995 return this; 12996 } 12997 12998 /** 12999 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 13000 */ 13001 public AdjudicationComponent getAdjudicationFirstRep() { 13002 if (getAdjudication().isEmpty()) { 13003 addAdjudication(); 13004 } 13005 return getAdjudication().get(0); 13006 } 13007 13008 protected void listChildren(List<Property> children) { 13009 super.listChildren(children); 13010 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 13011 children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue)); 13012 children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService)); 13013 children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd)); 13014 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier)); 13015 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 13016 children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity)); 13017 children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice)); 13018 children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor)); 13019 children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax)); 13020 children.add(new Property("net", "Money", "The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net)); 13021 children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 13022 children.add(new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome)); 13023 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 13024 } 13025 13026 @Override 13027 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 13028 switch (_hash) { 13029 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 13030 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue); 13031 case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService); 13032 case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd); 13033 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier); 13034 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 13035 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity); 13036 case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice); 13037 case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor); 13038 case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax); 13039 case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net); 13040 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 13041 case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ExplanationOfBenefit.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome); 13042 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 13043 default: return super.getNamedProperty(_hash, _name, _checkValid); 13044 } 13045 13046 } 13047 13048 @Override 13049 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 13050 switch (hash) { 13051 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 13052 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 13053 case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept 13054 case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept 13055 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 13056 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 13057 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 13058 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 13059 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 13060 case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money 13061 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 13062 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 13063 case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ItemReviewOutcomeComponent 13064 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 13065 default: return super.getProperty(hash, name, checkValid); 13066 } 13067 13068 } 13069 13070 @Override 13071 public Base setProperty(int hash, String name, Base value) throws FHIRException { 13072 switch (hash) { 13073 case 82505966: // traceNumber 13074 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 13075 return value; 13076 case 1099842588: // revenue 13077 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13078 return value; 13079 case 1957227299: // productOrService 13080 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13081 return value; 13082 case -717476168: // productOrServiceEnd 13083 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13084 return value; 13085 case -615513385: // modifier 13086 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 13087 return value; 13088 case 525514609: // patientPaid 13089 this.patientPaid = TypeConvertor.castToMoney(value); // Money 13090 return value; 13091 case -1285004149: // quantity 13092 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 13093 return value; 13094 case -486196699: // unitPrice 13095 this.unitPrice = TypeConvertor.castToMoney(value); // Money 13096 return value; 13097 case -1282148017: // factor 13098 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 13099 return value; 13100 case 114603: // tax 13101 this.tax = TypeConvertor.castToMoney(value); // Money 13102 return value; 13103 case 108957: // net 13104 this.net = TypeConvertor.castToMoney(value); // Money 13105 return value; 13106 case -1110033957: // noteNumber 13107 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 13108 return value; 13109 case -51825446: // reviewOutcome 13110 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 13111 return value; 13112 case -231349275: // adjudication 13113 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 13114 return value; 13115 default: return super.setProperty(hash, name, value); 13116 } 13117 13118 } 13119 13120 @Override 13121 public Base setProperty(String name, Base value) throws FHIRException { 13122 if (name.equals("traceNumber")) { 13123 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 13124 } else if (name.equals("revenue")) { 13125 this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13126 } else if (name.equals("productOrService")) { 13127 this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13128 } else if (name.equals("productOrServiceEnd")) { 13129 this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13130 } else if (name.equals("modifier")) { 13131 this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); 13132 } else if (name.equals("patientPaid")) { 13133 this.patientPaid = TypeConvertor.castToMoney(value); // Money 13134 } else if (name.equals("quantity")) { 13135 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 13136 } else if (name.equals("unitPrice")) { 13137 this.unitPrice = TypeConvertor.castToMoney(value); // Money 13138 } else if (name.equals("factor")) { 13139 this.factor = TypeConvertor.castToDecimal(value); // DecimalType 13140 } else if (name.equals("tax")) { 13141 this.tax = TypeConvertor.castToMoney(value); // Money 13142 } else if (name.equals("net")) { 13143 this.net = TypeConvertor.castToMoney(value); // Money 13144 } else if (name.equals("noteNumber")) { 13145 this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); 13146 } else if (name.equals("reviewOutcome")) { 13147 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 13148 } else if (name.equals("adjudication")) { 13149 this.getAdjudication().add((AdjudicationComponent) value); 13150 } else 13151 return super.setProperty(name, value); 13152 return value; 13153 } 13154 13155 @Override 13156 public void removeChild(String name, Base value) throws FHIRException { 13157 if (name.equals("traceNumber")) { 13158 this.getTraceNumber().remove(value); 13159 } else if (name.equals("revenue")) { 13160 this.revenue = null; 13161 } else if (name.equals("productOrService")) { 13162 this.productOrService = null; 13163 } else if (name.equals("productOrServiceEnd")) { 13164 this.productOrServiceEnd = null; 13165 } else if (name.equals("modifier")) { 13166 this.getModifier().remove(value); 13167 } else if (name.equals("patientPaid")) { 13168 this.patientPaid = null; 13169 } else if (name.equals("quantity")) { 13170 this.quantity = null; 13171 } else if (name.equals("unitPrice")) { 13172 this.unitPrice = null; 13173 } else if (name.equals("factor")) { 13174 this.factor = null; 13175 } else if (name.equals("tax")) { 13176 this.tax = null; 13177 } else if (name.equals("net")) { 13178 this.net = null; 13179 } else if (name.equals("noteNumber")) { 13180 this.getNoteNumber().remove(value); 13181 } else if (name.equals("reviewOutcome")) { 13182 this.reviewOutcome = (ItemReviewOutcomeComponent) value; // ItemReviewOutcomeComponent 13183 } else if (name.equals("adjudication")) { 13184 this.getAdjudication().remove((AdjudicationComponent) value); 13185 } else 13186 super.removeChild(name, value); 13187 13188 } 13189 13190 @Override 13191 public Base makeProperty(int hash, String name) throws FHIRException { 13192 switch (hash) { 13193 case 82505966: return addTraceNumber(); 13194 case 1099842588: return getRevenue(); 13195 case 1957227299: return getProductOrService(); 13196 case -717476168: return getProductOrServiceEnd(); 13197 case -615513385: return addModifier(); 13198 case 525514609: return getPatientPaid(); 13199 case -1285004149: return getQuantity(); 13200 case -486196699: return getUnitPrice(); 13201 case -1282148017: return getFactorElement(); 13202 case 114603: return getTax(); 13203 case 108957: return getNet(); 13204 case -1110033957: return addNoteNumberElement(); 13205 case -51825446: return getReviewOutcome(); 13206 case -231349275: return addAdjudication(); 13207 default: return super.makeProperty(hash, name); 13208 } 13209 13210 } 13211 13212 @Override 13213 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 13214 switch (hash) { 13215 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 13216 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 13217 case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"}; 13218 case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"}; 13219 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 13220 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 13221 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 13222 case -486196699: /*unitPrice*/ return new String[] {"Money"}; 13223 case -1282148017: /*factor*/ return new String[] {"decimal"}; 13224 case 114603: /*tax*/ return new String[] {"Money"}; 13225 case 108957: /*net*/ return new String[] {"Money"}; 13226 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 13227 case -51825446: /*reviewOutcome*/ return new String[] {"@ExplanationOfBenefit.item.reviewOutcome"}; 13228 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 13229 default: return super.getTypesForProperty(hash, name); 13230 } 13231 13232 } 13233 13234 @Override 13235 public Base addChild(String name) throws FHIRException { 13236 if (name.equals("traceNumber")) { 13237 return addTraceNumber(); 13238 } 13239 else if (name.equals("revenue")) { 13240 this.revenue = new CodeableConcept(); 13241 return this.revenue; 13242 } 13243 else if (name.equals("productOrService")) { 13244 this.productOrService = new CodeableConcept(); 13245 return this.productOrService; 13246 } 13247 else if (name.equals("productOrServiceEnd")) { 13248 this.productOrServiceEnd = new CodeableConcept(); 13249 return this.productOrServiceEnd; 13250 } 13251 else if (name.equals("modifier")) { 13252 return addModifier(); 13253 } 13254 else if (name.equals("patientPaid")) { 13255 this.patientPaid = new Money(); 13256 return this.patientPaid; 13257 } 13258 else if (name.equals("quantity")) { 13259 this.quantity = new Quantity(); 13260 return this.quantity; 13261 } 13262 else if (name.equals("unitPrice")) { 13263 this.unitPrice = new Money(); 13264 return this.unitPrice; 13265 } 13266 else if (name.equals("factor")) { 13267 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.detail.subDetail.factor"); 13268 } 13269 else if (name.equals("tax")) { 13270 this.tax = new Money(); 13271 return this.tax; 13272 } 13273 else if (name.equals("net")) { 13274 this.net = new Money(); 13275 return this.net; 13276 } 13277 else if (name.equals("noteNumber")) { 13278 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.addItem.detail.subDetail.noteNumber"); 13279 } 13280 else if (name.equals("reviewOutcome")) { 13281 this.reviewOutcome = new ItemReviewOutcomeComponent(); 13282 return this.reviewOutcome; 13283 } 13284 else if (name.equals("adjudication")) { 13285 return addAdjudication(); 13286 } 13287 else 13288 return super.addChild(name); 13289 } 13290 13291 public AddedItemDetailSubDetailComponent copy() { 13292 AddedItemDetailSubDetailComponent dst = new AddedItemDetailSubDetailComponent(); 13293 copyValues(dst); 13294 return dst; 13295 } 13296 13297 public void copyValues(AddedItemDetailSubDetailComponent dst) { 13298 super.copyValues(dst); 13299 if (traceNumber != null) { 13300 dst.traceNumber = new ArrayList<Identifier>(); 13301 for (Identifier i : traceNumber) 13302 dst.traceNumber.add(i.copy()); 13303 }; 13304 dst.revenue = revenue == null ? null : revenue.copy(); 13305 dst.productOrService = productOrService == null ? null : productOrService.copy(); 13306 dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy(); 13307 if (modifier != null) { 13308 dst.modifier = new ArrayList<CodeableConcept>(); 13309 for (CodeableConcept i : modifier) 13310 dst.modifier.add(i.copy()); 13311 }; 13312 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 13313 dst.quantity = quantity == null ? null : quantity.copy(); 13314 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 13315 dst.factor = factor == null ? null : factor.copy(); 13316 dst.tax = tax == null ? null : tax.copy(); 13317 dst.net = net == null ? null : net.copy(); 13318 if (noteNumber != null) { 13319 dst.noteNumber = new ArrayList<PositiveIntType>(); 13320 for (PositiveIntType i : noteNumber) 13321 dst.noteNumber.add(i.copy()); 13322 }; 13323 dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy(); 13324 if (adjudication != null) { 13325 dst.adjudication = new ArrayList<AdjudicationComponent>(); 13326 for (AdjudicationComponent i : adjudication) 13327 dst.adjudication.add(i.copy()); 13328 }; 13329 } 13330 13331 @Override 13332 public boolean equalsDeep(Base other_) { 13333 if (!super.equalsDeep(other_)) 13334 return false; 13335 if (!(other_ instanceof AddedItemDetailSubDetailComponent)) 13336 return false; 13337 AddedItemDetailSubDetailComponent o = (AddedItemDetailSubDetailComponent) other_; 13338 return compareDeep(traceNumber, o.traceNumber, true) && compareDeep(revenue, o.revenue, true) && compareDeep(productOrService, o.productOrService, true) 13339 && compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true) 13340 && compareDeep(patientPaid, o.patientPaid, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) 13341 && compareDeep(factor, o.factor, true) && compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true) 13342 && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true) 13343 && compareDeep(adjudication, o.adjudication, true); 13344 } 13345 13346 @Override 13347 public boolean equalsShallow(Base other_) { 13348 if (!super.equalsShallow(other_)) 13349 return false; 13350 if (!(other_ instanceof AddedItemDetailSubDetailComponent)) 13351 return false; 13352 AddedItemDetailSubDetailComponent o = (AddedItemDetailSubDetailComponent) other_; 13353 return compareValues(factor, o.factor, true) && compareValues(noteNumber, o.noteNumber, true); 13354 } 13355 13356 public boolean isEmpty() { 13357 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(traceNumber, revenue, productOrService 13358 , productOrServiceEnd, modifier, patientPaid, quantity, unitPrice, factor, tax 13359 , net, noteNumber, reviewOutcome, adjudication); 13360 } 13361 13362 public String fhirType() { 13363 return "ExplanationOfBenefit.addItem.detail.subDetail"; 13364 13365 } 13366 13367 } 13368 13369 @Block() 13370 public static class TotalComponent extends BackboneElement implements IBaseBackboneElement { 13371 /** 13372 * A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. 13373 */ 13374 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 13375 @Description(shortDefinition="Type of adjudication information", formalDefinition="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item." ) 13376 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication") 13377 protected CodeableConcept category; 13378 13379 /** 13380 * Monetary total amount associated with the category. 13381 */ 13382 @Child(name = "amount", type = {Money.class}, order=2, min=1, max=1, modifier=false, summary=true) 13383 @Description(shortDefinition="Financial total for the category", formalDefinition="Monetary total amount associated with the category." ) 13384 protected Money amount; 13385 13386 private static final long serialVersionUID = 2012310309L; 13387 13388 /** 13389 * Constructor 13390 */ 13391 public TotalComponent() { 13392 super(); 13393 } 13394 13395 /** 13396 * Constructor 13397 */ 13398 public TotalComponent(CodeableConcept category, Money amount) { 13399 super(); 13400 this.setCategory(category); 13401 this.setAmount(amount); 13402 } 13403 13404 /** 13405 * @return {@link #category} (A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.) 13406 */ 13407 public CodeableConcept getCategory() { 13408 if (this.category == null) 13409 if (Configuration.errorOnAutoCreate()) 13410 throw new Error("Attempt to auto-create TotalComponent.category"); 13411 else if (Configuration.doAutoCreate()) 13412 this.category = new CodeableConcept(); // cc 13413 return this.category; 13414 } 13415 13416 public boolean hasCategory() { 13417 return this.category != null && !this.category.isEmpty(); 13418 } 13419 13420 /** 13421 * @param value {@link #category} (A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.) 13422 */ 13423 public TotalComponent setCategory(CodeableConcept value) { 13424 this.category = value; 13425 return this; 13426 } 13427 13428 /** 13429 * @return {@link #amount} (Monetary total amount associated with the category.) 13430 */ 13431 public Money getAmount() { 13432 if (this.amount == null) 13433 if (Configuration.errorOnAutoCreate()) 13434 throw new Error("Attempt to auto-create TotalComponent.amount"); 13435 else if (Configuration.doAutoCreate()) 13436 this.amount = new Money(); // cc 13437 return this.amount; 13438 } 13439 13440 public boolean hasAmount() { 13441 return this.amount != null && !this.amount.isEmpty(); 13442 } 13443 13444 /** 13445 * @param value {@link #amount} (Monetary total amount associated with the category.) 13446 */ 13447 public TotalComponent setAmount(Money value) { 13448 this.amount = value; 13449 return this; 13450 } 13451 13452 protected void listChildren(List<Property> children) { 13453 super.listChildren(children); 13454 children.add(new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", 0, 1, category)); 13455 children.add(new Property("amount", "Money", "Monetary total amount associated with the category.", 0, 1, amount)); 13456 } 13457 13458 @Override 13459 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 13460 switch (_hash) { 13461 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", 0, 1, category); 13462 case -1413853096: /*amount*/ return new Property("amount", "Money", "Monetary total amount associated with the category.", 0, 1, amount); 13463 default: return super.getNamedProperty(_hash, _name, _checkValid); 13464 } 13465 13466 } 13467 13468 @Override 13469 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 13470 switch (hash) { 13471 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 13472 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 13473 default: return super.getProperty(hash, name, checkValid); 13474 } 13475 13476 } 13477 13478 @Override 13479 public Base setProperty(int hash, String name, Base value) throws FHIRException { 13480 switch (hash) { 13481 case 50511102: // category 13482 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13483 return value; 13484 case -1413853096: // amount 13485 this.amount = TypeConvertor.castToMoney(value); // Money 13486 return value; 13487 default: return super.setProperty(hash, name, value); 13488 } 13489 13490 } 13491 13492 @Override 13493 public Base setProperty(String name, Base value) throws FHIRException { 13494 if (name.equals("category")) { 13495 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13496 } else if (name.equals("amount")) { 13497 this.amount = TypeConvertor.castToMoney(value); // Money 13498 } else 13499 return super.setProperty(name, value); 13500 return value; 13501 } 13502 13503 @Override 13504 public void removeChild(String name, Base value) throws FHIRException { 13505 if (name.equals("category")) { 13506 this.category = null; 13507 } else if (name.equals("amount")) { 13508 this.amount = null; 13509 } else 13510 super.removeChild(name, value); 13511 13512 } 13513 13514 @Override 13515 public Base makeProperty(int hash, String name) throws FHIRException { 13516 switch (hash) { 13517 case 50511102: return getCategory(); 13518 case -1413853096: return getAmount(); 13519 default: return super.makeProperty(hash, name); 13520 } 13521 13522 } 13523 13524 @Override 13525 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 13526 switch (hash) { 13527 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 13528 case -1413853096: /*amount*/ return new String[] {"Money"}; 13529 default: return super.getTypesForProperty(hash, name); 13530 } 13531 13532 } 13533 13534 @Override 13535 public Base addChild(String name) throws FHIRException { 13536 if (name.equals("category")) { 13537 this.category = new CodeableConcept(); 13538 return this.category; 13539 } 13540 else if (name.equals("amount")) { 13541 this.amount = new Money(); 13542 return this.amount; 13543 } 13544 else 13545 return super.addChild(name); 13546 } 13547 13548 public TotalComponent copy() { 13549 TotalComponent dst = new TotalComponent(); 13550 copyValues(dst); 13551 return dst; 13552 } 13553 13554 public void copyValues(TotalComponent dst) { 13555 super.copyValues(dst); 13556 dst.category = category == null ? null : category.copy(); 13557 dst.amount = amount == null ? null : amount.copy(); 13558 } 13559 13560 @Override 13561 public boolean equalsDeep(Base other_) { 13562 if (!super.equalsDeep(other_)) 13563 return false; 13564 if (!(other_ instanceof TotalComponent)) 13565 return false; 13566 TotalComponent o = (TotalComponent) other_; 13567 return compareDeep(category, o.category, true) && compareDeep(amount, o.amount, true); 13568 } 13569 13570 @Override 13571 public boolean equalsShallow(Base other_) { 13572 if (!super.equalsShallow(other_)) 13573 return false; 13574 if (!(other_ instanceof TotalComponent)) 13575 return false; 13576 TotalComponent o = (TotalComponent) other_; 13577 return true; 13578 } 13579 13580 public boolean isEmpty() { 13581 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, amount); 13582 } 13583 13584 public String fhirType() { 13585 return "ExplanationOfBenefit.total"; 13586 13587 } 13588 13589 } 13590 13591 @Block() 13592 public static class PaymentComponent extends BackboneElement implements IBaseBackboneElement { 13593 /** 13594 * Whether this represents partial or complete payment of the benefits payable. 13595 */ 13596 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 13597 @Description(shortDefinition="Partial or complete payment", formalDefinition="Whether this represents partial or complete payment of the benefits payable." ) 13598 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-paymenttype") 13599 protected CodeableConcept type; 13600 13601 /** 13602 * Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication. 13603 */ 13604 @Child(name = "adjustment", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=false) 13605 @Description(shortDefinition="Payment adjustment for non-claim issues", formalDefinition="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication." ) 13606 protected Money adjustment; 13607 13608 /** 13609 * Reason for the payment adjustment. 13610 */ 13611 @Child(name = "adjustmentReason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 13612 @Description(shortDefinition="Explanation for the variance", formalDefinition="Reason for the payment adjustment." ) 13613 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-adjustment-reason") 13614 protected CodeableConcept adjustmentReason; 13615 13616 /** 13617 * Estimated date the payment will be issued or the actual issue date of payment. 13618 */ 13619 @Child(name = "date", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false) 13620 @Description(shortDefinition="Expected date of payment", formalDefinition="Estimated date the payment will be issued or the actual issue date of payment." ) 13621 protected DateType date; 13622 13623 /** 13624 * Benefits payable less any payment adjustment. 13625 */ 13626 @Child(name = "amount", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 13627 @Description(shortDefinition="Payable amount after adjustment", formalDefinition="Benefits payable less any payment adjustment." ) 13628 protected Money amount; 13629 13630 /** 13631 * Issuer's unique identifier for the payment instrument. 13632 */ 13633 @Child(name = "identifier", type = {Identifier.class}, order=6, min=0, max=1, modifier=false, summary=false) 13634 @Description(shortDefinition="Business identifier for the payment", formalDefinition="Issuer's unique identifier for the payment instrument." ) 13635 protected Identifier identifier; 13636 13637 private static final long serialVersionUID = 1539906026L; 13638 13639 /** 13640 * Constructor 13641 */ 13642 public PaymentComponent() { 13643 super(); 13644 } 13645 13646 /** 13647 * @return {@link #type} (Whether this represents partial or complete payment of the benefits payable.) 13648 */ 13649 public CodeableConcept getType() { 13650 if (this.type == null) 13651 if (Configuration.errorOnAutoCreate()) 13652 throw new Error("Attempt to auto-create PaymentComponent.type"); 13653 else if (Configuration.doAutoCreate()) 13654 this.type = new CodeableConcept(); // cc 13655 return this.type; 13656 } 13657 13658 public boolean hasType() { 13659 return this.type != null && !this.type.isEmpty(); 13660 } 13661 13662 /** 13663 * @param value {@link #type} (Whether this represents partial or complete payment of the benefits payable.) 13664 */ 13665 public PaymentComponent setType(CodeableConcept value) { 13666 this.type = value; 13667 return this; 13668 } 13669 13670 /** 13671 * @return {@link #adjustment} (Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.) 13672 */ 13673 public Money getAdjustment() { 13674 if (this.adjustment == null) 13675 if (Configuration.errorOnAutoCreate()) 13676 throw new Error("Attempt to auto-create PaymentComponent.adjustment"); 13677 else if (Configuration.doAutoCreate()) 13678 this.adjustment = new Money(); // cc 13679 return this.adjustment; 13680 } 13681 13682 public boolean hasAdjustment() { 13683 return this.adjustment != null && !this.adjustment.isEmpty(); 13684 } 13685 13686 /** 13687 * @param value {@link #adjustment} (Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.) 13688 */ 13689 public PaymentComponent setAdjustment(Money value) { 13690 this.adjustment = value; 13691 return this; 13692 } 13693 13694 /** 13695 * @return {@link #adjustmentReason} (Reason for the payment adjustment.) 13696 */ 13697 public CodeableConcept getAdjustmentReason() { 13698 if (this.adjustmentReason == null) 13699 if (Configuration.errorOnAutoCreate()) 13700 throw new Error("Attempt to auto-create PaymentComponent.adjustmentReason"); 13701 else if (Configuration.doAutoCreate()) 13702 this.adjustmentReason = new CodeableConcept(); // cc 13703 return this.adjustmentReason; 13704 } 13705 13706 public boolean hasAdjustmentReason() { 13707 return this.adjustmentReason != null && !this.adjustmentReason.isEmpty(); 13708 } 13709 13710 /** 13711 * @param value {@link #adjustmentReason} (Reason for the payment adjustment.) 13712 */ 13713 public PaymentComponent setAdjustmentReason(CodeableConcept value) { 13714 this.adjustmentReason = value; 13715 return this; 13716 } 13717 13718 /** 13719 * @return {@link #date} (Estimated date the payment will be issued or the actual issue date of payment.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 13720 */ 13721 public DateType getDateElement() { 13722 if (this.date == null) 13723 if (Configuration.errorOnAutoCreate()) 13724 throw new Error("Attempt to auto-create PaymentComponent.date"); 13725 else if (Configuration.doAutoCreate()) 13726 this.date = new DateType(); // bb 13727 return this.date; 13728 } 13729 13730 public boolean hasDateElement() { 13731 return this.date != null && !this.date.isEmpty(); 13732 } 13733 13734 public boolean hasDate() { 13735 return this.date != null && !this.date.isEmpty(); 13736 } 13737 13738 /** 13739 * @param value {@link #date} (Estimated date the payment will be issued or the actual issue date of payment.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 13740 */ 13741 public PaymentComponent setDateElement(DateType value) { 13742 this.date = value; 13743 return this; 13744 } 13745 13746 /** 13747 * @return Estimated date the payment will be issued or the actual issue date of payment. 13748 */ 13749 public Date getDate() { 13750 return this.date == null ? null : this.date.getValue(); 13751 } 13752 13753 /** 13754 * @param value Estimated date the payment will be issued or the actual issue date of payment. 13755 */ 13756 public PaymentComponent setDate(Date value) { 13757 if (value == null) 13758 this.date = null; 13759 else { 13760 if (this.date == null) 13761 this.date = new DateType(); 13762 this.date.setValue(value); 13763 } 13764 return this; 13765 } 13766 13767 /** 13768 * @return {@link #amount} (Benefits payable less any payment adjustment.) 13769 */ 13770 public Money getAmount() { 13771 if (this.amount == null) 13772 if (Configuration.errorOnAutoCreate()) 13773 throw new Error("Attempt to auto-create PaymentComponent.amount"); 13774 else if (Configuration.doAutoCreate()) 13775 this.amount = new Money(); // cc 13776 return this.amount; 13777 } 13778 13779 public boolean hasAmount() { 13780 return this.amount != null && !this.amount.isEmpty(); 13781 } 13782 13783 /** 13784 * @param value {@link #amount} (Benefits payable less any payment adjustment.) 13785 */ 13786 public PaymentComponent setAmount(Money value) { 13787 this.amount = value; 13788 return this; 13789 } 13790 13791 /** 13792 * @return {@link #identifier} (Issuer's unique identifier for the payment instrument.) 13793 */ 13794 public Identifier getIdentifier() { 13795 if (this.identifier == null) 13796 if (Configuration.errorOnAutoCreate()) 13797 throw new Error("Attempt to auto-create PaymentComponent.identifier"); 13798 else if (Configuration.doAutoCreate()) 13799 this.identifier = new Identifier(); // cc 13800 return this.identifier; 13801 } 13802 13803 public boolean hasIdentifier() { 13804 return this.identifier != null && !this.identifier.isEmpty(); 13805 } 13806 13807 /** 13808 * @param value {@link #identifier} (Issuer's unique identifier for the payment instrument.) 13809 */ 13810 public PaymentComponent setIdentifier(Identifier value) { 13811 this.identifier = value; 13812 return this; 13813 } 13814 13815 protected void listChildren(List<Property> children) { 13816 super.listChildren(children); 13817 children.add(new Property("type", "CodeableConcept", "Whether this represents partial or complete payment of the benefits payable.", 0, 1, type)); 13818 children.add(new Property("adjustment", "Money", "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", 0, 1, adjustment)); 13819 children.add(new Property("adjustmentReason", "CodeableConcept", "Reason for the payment adjustment.", 0, 1, adjustmentReason)); 13820 children.add(new Property("date", "date", "Estimated date the payment will be issued or the actual issue date of payment.", 0, 1, date)); 13821 children.add(new Property("amount", "Money", "Benefits payable less any payment adjustment.", 0, 1, amount)); 13822 children.add(new Property("identifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, identifier)); 13823 } 13824 13825 @Override 13826 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 13827 switch (_hash) { 13828 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Whether this represents partial or complete payment of the benefits payable.", 0, 1, type); 13829 case 1977085293: /*adjustment*/ return new Property("adjustment", "Money", "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", 0, 1, adjustment); 13830 case -1255938543: /*adjustmentReason*/ return new Property("adjustmentReason", "CodeableConcept", "Reason for the payment adjustment.", 0, 1, adjustmentReason); 13831 case 3076014: /*date*/ return new Property("date", "date", "Estimated date the payment will be issued or the actual issue date of payment.", 0, 1, date); 13832 case -1413853096: /*amount*/ return new Property("amount", "Money", "Benefits payable less any payment adjustment.", 0, 1, amount); 13833 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, identifier); 13834 default: return super.getNamedProperty(_hash, _name, _checkValid); 13835 } 13836 13837 } 13838 13839 @Override 13840 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 13841 switch (hash) { 13842 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 13843 case 1977085293: /*adjustment*/ return this.adjustment == null ? new Base[0] : new Base[] {this.adjustment}; // Money 13844 case -1255938543: /*adjustmentReason*/ return this.adjustmentReason == null ? new Base[0] : new Base[] {this.adjustmentReason}; // CodeableConcept 13845 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType 13846 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 13847 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 13848 default: return super.getProperty(hash, name, checkValid); 13849 } 13850 13851 } 13852 13853 @Override 13854 public Base setProperty(int hash, String name, Base value) throws FHIRException { 13855 switch (hash) { 13856 case 3575610: // type 13857 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13858 return value; 13859 case 1977085293: // adjustment 13860 this.adjustment = TypeConvertor.castToMoney(value); // Money 13861 return value; 13862 case -1255938543: // adjustmentReason 13863 this.adjustmentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13864 return value; 13865 case 3076014: // date 13866 this.date = TypeConvertor.castToDate(value); // DateType 13867 return value; 13868 case -1413853096: // amount 13869 this.amount = TypeConvertor.castToMoney(value); // Money 13870 return value; 13871 case -1618432855: // identifier 13872 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 13873 return value; 13874 default: return super.setProperty(hash, name, value); 13875 } 13876 13877 } 13878 13879 @Override 13880 public Base setProperty(String name, Base value) throws FHIRException { 13881 if (name.equals("type")) { 13882 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13883 } else if (name.equals("adjustment")) { 13884 this.adjustment = TypeConvertor.castToMoney(value); // Money 13885 } else if (name.equals("adjustmentReason")) { 13886 this.adjustmentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 13887 } else if (name.equals("date")) { 13888 this.date = TypeConvertor.castToDate(value); // DateType 13889 } else if (name.equals("amount")) { 13890 this.amount = TypeConvertor.castToMoney(value); // Money 13891 } else if (name.equals("identifier")) { 13892 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 13893 } else 13894 return super.setProperty(name, value); 13895 return value; 13896 } 13897 13898 @Override 13899 public void removeChild(String name, Base value) throws FHIRException { 13900 if (name.equals("type")) { 13901 this.type = null; 13902 } else if (name.equals("adjustment")) { 13903 this.adjustment = null; 13904 } else if (name.equals("adjustmentReason")) { 13905 this.adjustmentReason = null; 13906 } else if (name.equals("date")) { 13907 this.date = null; 13908 } else if (name.equals("amount")) { 13909 this.amount = null; 13910 } else if (name.equals("identifier")) { 13911 this.identifier = null; 13912 } else 13913 super.removeChild(name, value); 13914 13915 } 13916 13917 @Override 13918 public Base makeProperty(int hash, String name) throws FHIRException { 13919 switch (hash) { 13920 case 3575610: return getType(); 13921 case 1977085293: return getAdjustment(); 13922 case -1255938543: return getAdjustmentReason(); 13923 case 3076014: return getDateElement(); 13924 case -1413853096: return getAmount(); 13925 case -1618432855: return getIdentifier(); 13926 default: return super.makeProperty(hash, name); 13927 } 13928 13929 } 13930 13931 @Override 13932 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 13933 switch (hash) { 13934 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 13935 case 1977085293: /*adjustment*/ return new String[] {"Money"}; 13936 case -1255938543: /*adjustmentReason*/ return new String[] {"CodeableConcept"}; 13937 case 3076014: /*date*/ return new String[] {"date"}; 13938 case -1413853096: /*amount*/ return new String[] {"Money"}; 13939 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 13940 default: return super.getTypesForProperty(hash, name); 13941 } 13942 13943 } 13944 13945 @Override 13946 public Base addChild(String name) throws FHIRException { 13947 if (name.equals("type")) { 13948 this.type = new CodeableConcept(); 13949 return this.type; 13950 } 13951 else if (name.equals("adjustment")) { 13952 this.adjustment = new Money(); 13953 return this.adjustment; 13954 } 13955 else if (name.equals("adjustmentReason")) { 13956 this.adjustmentReason = new CodeableConcept(); 13957 return this.adjustmentReason; 13958 } 13959 else if (name.equals("date")) { 13960 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.payment.date"); 13961 } 13962 else if (name.equals("amount")) { 13963 this.amount = new Money(); 13964 return this.amount; 13965 } 13966 else if (name.equals("identifier")) { 13967 this.identifier = new Identifier(); 13968 return this.identifier; 13969 } 13970 else 13971 return super.addChild(name); 13972 } 13973 13974 public PaymentComponent copy() { 13975 PaymentComponent dst = new PaymentComponent(); 13976 copyValues(dst); 13977 return dst; 13978 } 13979 13980 public void copyValues(PaymentComponent dst) { 13981 super.copyValues(dst); 13982 dst.type = type == null ? null : type.copy(); 13983 dst.adjustment = adjustment == null ? null : adjustment.copy(); 13984 dst.adjustmentReason = adjustmentReason == null ? null : adjustmentReason.copy(); 13985 dst.date = date == null ? null : date.copy(); 13986 dst.amount = amount == null ? null : amount.copy(); 13987 dst.identifier = identifier == null ? null : identifier.copy(); 13988 } 13989 13990 @Override 13991 public boolean equalsDeep(Base other_) { 13992 if (!super.equalsDeep(other_)) 13993 return false; 13994 if (!(other_ instanceof PaymentComponent)) 13995 return false; 13996 PaymentComponent o = (PaymentComponent) other_; 13997 return compareDeep(type, o.type, true) && compareDeep(adjustment, o.adjustment, true) && compareDeep(adjustmentReason, o.adjustmentReason, true) 13998 && compareDeep(date, o.date, true) && compareDeep(amount, o.amount, true) && compareDeep(identifier, o.identifier, true) 13999 ; 14000 } 14001 14002 @Override 14003 public boolean equalsShallow(Base other_) { 14004 if (!super.equalsShallow(other_)) 14005 return false; 14006 if (!(other_ instanceof PaymentComponent)) 14007 return false; 14008 PaymentComponent o = (PaymentComponent) other_; 14009 return compareValues(date, o.date, true); 14010 } 14011 14012 public boolean isEmpty() { 14013 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, adjustment, adjustmentReason 14014 , date, amount, identifier); 14015 } 14016 14017 public String fhirType() { 14018 return "ExplanationOfBenefit.payment"; 14019 14020 } 14021 14022 } 14023 14024 @Block() 14025 public static class NoteComponent extends BackboneElement implements IBaseBackboneElement { 14026 /** 14027 * A number to uniquely identify a note entry. 14028 */ 14029 @Child(name = "number", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 14030 @Description(shortDefinition="Note instance identifier", formalDefinition="A number to uniquely identify a note entry." ) 14031 protected PositiveIntType number; 14032 14033 /** 14034 * The business purpose of the note text. 14035 */ 14036 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 14037 @Description(shortDefinition="Note purpose", formalDefinition="The business purpose of the note text." ) 14038 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") 14039 protected CodeableConcept type; 14040 14041 /** 14042 * The explanation or description associated with the processing. 14043 */ 14044 @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 14045 @Description(shortDefinition="Note explanatory text", formalDefinition="The explanation or description associated with the processing." ) 14046 protected StringType text; 14047 14048 /** 14049 * A code to define the language used in the text of the note. 14050 */ 14051 @Child(name = "language", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 14052 @Description(shortDefinition="Language of the text", formalDefinition="A code to define the language used in the text of the note." ) 14053 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-languages") 14054 protected CodeableConcept language; 14055 14056 private static final long serialVersionUID = -944255449L; 14057 14058 /** 14059 * Constructor 14060 */ 14061 public NoteComponent() { 14062 super(); 14063 } 14064 14065 /** 14066 * @return {@link #number} (A number to uniquely identify a note entry.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 14067 */ 14068 public PositiveIntType getNumberElement() { 14069 if (this.number == null) 14070 if (Configuration.errorOnAutoCreate()) 14071 throw new Error("Attempt to auto-create NoteComponent.number"); 14072 else if (Configuration.doAutoCreate()) 14073 this.number = new PositiveIntType(); // bb 14074 return this.number; 14075 } 14076 14077 public boolean hasNumberElement() { 14078 return this.number != null && !this.number.isEmpty(); 14079 } 14080 14081 public boolean hasNumber() { 14082 return this.number != null && !this.number.isEmpty(); 14083 } 14084 14085 /** 14086 * @param value {@link #number} (A number to uniquely identify a note entry.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 14087 */ 14088 public NoteComponent setNumberElement(PositiveIntType value) { 14089 this.number = value; 14090 return this; 14091 } 14092 14093 /** 14094 * @return A number to uniquely identify a note entry. 14095 */ 14096 public int getNumber() { 14097 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 14098 } 14099 14100 /** 14101 * @param value A number to uniquely identify a note entry. 14102 */ 14103 public NoteComponent setNumber(int value) { 14104 if (this.number == null) 14105 this.number = new PositiveIntType(); 14106 this.number.setValue(value); 14107 return this; 14108 } 14109 14110 /** 14111 * @return {@link #type} (The business purpose of the note text.) 14112 */ 14113 public CodeableConcept getType() { 14114 if (this.type == null) 14115 if (Configuration.errorOnAutoCreate()) 14116 throw new Error("Attempt to auto-create NoteComponent.type"); 14117 else if (Configuration.doAutoCreate()) 14118 this.type = new CodeableConcept(); // cc 14119 return this.type; 14120 } 14121 14122 public boolean hasType() { 14123 return this.type != null && !this.type.isEmpty(); 14124 } 14125 14126 /** 14127 * @param value {@link #type} (The business purpose of the note text.) 14128 */ 14129 public NoteComponent setType(CodeableConcept value) { 14130 this.type = value; 14131 return this; 14132 } 14133 14134 /** 14135 * @return {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 14136 */ 14137 public StringType getTextElement() { 14138 if (this.text == null) 14139 if (Configuration.errorOnAutoCreate()) 14140 throw new Error("Attempt to auto-create NoteComponent.text"); 14141 else if (Configuration.doAutoCreate()) 14142 this.text = new StringType(); // bb 14143 return this.text; 14144 } 14145 14146 public boolean hasTextElement() { 14147 return this.text != null && !this.text.isEmpty(); 14148 } 14149 14150 public boolean hasText() { 14151 return this.text != null && !this.text.isEmpty(); 14152 } 14153 14154 /** 14155 * @param value {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 14156 */ 14157 public NoteComponent setTextElement(StringType value) { 14158 this.text = value; 14159 return this; 14160 } 14161 14162 /** 14163 * @return The explanation or description associated with the processing. 14164 */ 14165 public String getText() { 14166 return this.text == null ? null : this.text.getValue(); 14167 } 14168 14169 /** 14170 * @param value The explanation or description associated with the processing. 14171 */ 14172 public NoteComponent setText(String value) { 14173 if (Utilities.noString(value)) 14174 this.text = null; 14175 else { 14176 if (this.text == null) 14177 this.text = new StringType(); 14178 this.text.setValue(value); 14179 } 14180 return this; 14181 } 14182 14183 /** 14184 * @return {@link #language} (A code to define the language used in the text of the note.) 14185 */ 14186 public CodeableConcept getLanguage() { 14187 if (this.language == null) 14188 if (Configuration.errorOnAutoCreate()) 14189 throw new Error("Attempt to auto-create NoteComponent.language"); 14190 else if (Configuration.doAutoCreate()) 14191 this.language = new CodeableConcept(); // cc 14192 return this.language; 14193 } 14194 14195 public boolean hasLanguage() { 14196 return this.language != null && !this.language.isEmpty(); 14197 } 14198 14199 /** 14200 * @param value {@link #language} (A code to define the language used in the text of the note.) 14201 */ 14202 public NoteComponent setLanguage(CodeableConcept value) { 14203 this.language = value; 14204 return this; 14205 } 14206 14207 protected void listChildren(List<Property> children) { 14208 super.listChildren(children); 14209 children.add(new Property("number", "positiveInt", "A number to uniquely identify a note entry.", 0, 1, number)); 14210 children.add(new Property("type", "CodeableConcept", "The business purpose of the note text.", 0, 1, type)); 14211 children.add(new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text)); 14212 children.add(new Property("language", "CodeableConcept", "A code to define the language used in the text of the note.", 0, 1, language)); 14213 } 14214 14215 @Override 14216 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 14217 switch (_hash) { 14218 case -1034364087: /*number*/ return new Property("number", "positiveInt", "A number to uniquely identify a note entry.", 0, 1, number); 14219 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The business purpose of the note text.", 0, 1, type); 14220 case 3556653: /*text*/ return new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text); 14221 case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "A code to define the language used in the text of the note.", 0, 1, language); 14222 default: return super.getNamedProperty(_hash, _name, _checkValid); 14223 } 14224 14225 } 14226 14227 @Override 14228 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 14229 switch (hash) { 14230 case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // PositiveIntType 14231 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 14232 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 14233 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept 14234 default: return super.getProperty(hash, name, checkValid); 14235 } 14236 14237 } 14238 14239 @Override 14240 public Base setProperty(int hash, String name, Base value) throws FHIRException { 14241 switch (hash) { 14242 case -1034364087: // number 14243 this.number = TypeConvertor.castToPositiveInt(value); // PositiveIntType 14244 return value; 14245 case 3575610: // type 14246 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14247 return value; 14248 case 3556653: // text 14249 this.text = TypeConvertor.castToString(value); // StringType 14250 return value; 14251 case -1613589672: // language 14252 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14253 return value; 14254 default: return super.setProperty(hash, name, value); 14255 } 14256 14257 } 14258 14259 @Override 14260 public Base setProperty(String name, Base value) throws FHIRException { 14261 if (name.equals("number")) { 14262 this.number = TypeConvertor.castToPositiveInt(value); // PositiveIntType 14263 } else if (name.equals("type")) { 14264 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14265 } else if (name.equals("text")) { 14266 this.text = TypeConvertor.castToString(value); // StringType 14267 } else if (name.equals("language")) { 14268 this.language = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14269 } else 14270 return super.setProperty(name, value); 14271 return value; 14272 } 14273 14274 @Override 14275 public void removeChild(String name, Base value) throws FHIRException { 14276 if (name.equals("number")) { 14277 this.number = null; 14278 } else if (name.equals("type")) { 14279 this.type = null; 14280 } else if (name.equals("text")) { 14281 this.text = null; 14282 } else if (name.equals("language")) { 14283 this.language = null; 14284 } else 14285 super.removeChild(name, value); 14286 14287 } 14288 14289 @Override 14290 public Base makeProperty(int hash, String name) throws FHIRException { 14291 switch (hash) { 14292 case -1034364087: return getNumberElement(); 14293 case 3575610: return getType(); 14294 case 3556653: return getTextElement(); 14295 case -1613589672: return getLanguage(); 14296 default: return super.makeProperty(hash, name); 14297 } 14298 14299 } 14300 14301 @Override 14302 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 14303 switch (hash) { 14304 case -1034364087: /*number*/ return new String[] {"positiveInt"}; 14305 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 14306 case 3556653: /*text*/ return new String[] {"string"}; 14307 case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; 14308 default: return super.getTypesForProperty(hash, name); 14309 } 14310 14311 } 14312 14313 @Override 14314 public Base addChild(String name) throws FHIRException { 14315 if (name.equals("number")) { 14316 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.processNote.number"); 14317 } 14318 else if (name.equals("type")) { 14319 this.type = new CodeableConcept(); 14320 return this.type; 14321 } 14322 else if (name.equals("text")) { 14323 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.processNote.text"); 14324 } 14325 else if (name.equals("language")) { 14326 this.language = new CodeableConcept(); 14327 return this.language; 14328 } 14329 else 14330 return super.addChild(name); 14331 } 14332 14333 public NoteComponent copy() { 14334 NoteComponent dst = new NoteComponent(); 14335 copyValues(dst); 14336 return dst; 14337 } 14338 14339 public void copyValues(NoteComponent dst) { 14340 super.copyValues(dst); 14341 dst.number = number == null ? null : number.copy(); 14342 dst.type = type == null ? null : type.copy(); 14343 dst.text = text == null ? null : text.copy(); 14344 dst.language = language == null ? null : language.copy(); 14345 } 14346 14347 @Override 14348 public boolean equalsDeep(Base other_) { 14349 if (!super.equalsDeep(other_)) 14350 return false; 14351 if (!(other_ instanceof NoteComponent)) 14352 return false; 14353 NoteComponent o = (NoteComponent) other_; 14354 return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(text, o.text, true) 14355 && compareDeep(language, o.language, true); 14356 } 14357 14358 @Override 14359 public boolean equalsShallow(Base other_) { 14360 if (!super.equalsShallow(other_)) 14361 return false; 14362 if (!(other_ instanceof NoteComponent)) 14363 return false; 14364 NoteComponent o = (NoteComponent) other_; 14365 return compareValues(number, o.number, true) && compareValues(text, o.text, true); 14366 } 14367 14368 public boolean isEmpty() { 14369 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, text, language 14370 ); 14371 } 14372 14373 public String fhirType() { 14374 return "ExplanationOfBenefit.processNote"; 14375 14376 } 14377 14378 } 14379 14380 @Block() 14381 public static class BenefitBalanceComponent extends BackboneElement implements IBaseBackboneElement { 14382 /** 14383 * Code to identify the general type of benefits under which products and services are provided. 14384 */ 14385 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 14386 @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." ) 14387 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory") 14388 protected CodeableConcept category; 14389 14390 /** 14391 * True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage. 14392 */ 14393 @Child(name = "excluded", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 14394 @Description(shortDefinition="Excluded from the plan", formalDefinition="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." ) 14395 protected BooleanType excluded; 14396 14397 /** 14398 * A short name or tag for the benefit. 14399 */ 14400 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 14401 @Description(shortDefinition="Short name for the benefit", formalDefinition="A short name or tag for the benefit." ) 14402 protected StringType name; 14403 14404 /** 14405 * A richer description of the benefit or services covered. 14406 */ 14407 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 14408 @Description(shortDefinition="Description of the benefit or services covered", formalDefinition="A richer description of the benefit or services covered." ) 14409 protected StringType description; 14410 14411 /** 14412 * Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers. 14413 */ 14414 @Child(name = "network", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 14415 @Description(shortDefinition="In or out of network", formalDefinition="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." ) 14416 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-network") 14417 protected CodeableConcept network; 14418 14419 /** 14420 * Indicates if the benefits apply to an individual or to the family. 14421 */ 14422 @Child(name = "unit", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 14423 @Description(shortDefinition="Individual or family", formalDefinition="Indicates if the benefits apply to an individual or to the family." ) 14424 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-unit") 14425 protected CodeableConcept unit; 14426 14427 /** 14428 * The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'. 14429 */ 14430 @Child(name = "term", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 14431 @Description(shortDefinition="Annual or lifetime", formalDefinition="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." ) 14432 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-term") 14433 protected CodeableConcept term; 14434 14435 /** 14436 * Benefits Used to date. 14437 */ 14438 @Child(name = "financial", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 14439 @Description(shortDefinition="Benefit Summary", formalDefinition="Benefits Used to date." ) 14440 protected List<BenefitComponent> financial; 14441 14442 private static final long serialVersionUID = -1889655824L; 14443 14444 /** 14445 * Constructor 14446 */ 14447 public BenefitBalanceComponent() { 14448 super(); 14449 } 14450 14451 /** 14452 * Constructor 14453 */ 14454 public BenefitBalanceComponent(CodeableConcept category) { 14455 super(); 14456 this.setCategory(category); 14457 } 14458 14459 /** 14460 * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 14461 */ 14462 public CodeableConcept getCategory() { 14463 if (this.category == null) 14464 if (Configuration.errorOnAutoCreate()) 14465 throw new Error("Attempt to auto-create BenefitBalanceComponent.category"); 14466 else if (Configuration.doAutoCreate()) 14467 this.category = new CodeableConcept(); // cc 14468 return this.category; 14469 } 14470 14471 public boolean hasCategory() { 14472 return this.category != null && !this.category.isEmpty(); 14473 } 14474 14475 /** 14476 * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.) 14477 */ 14478 public BenefitBalanceComponent setCategory(CodeableConcept value) { 14479 this.category = value; 14480 return this; 14481 } 14482 14483 /** 14484 * @return {@link #excluded} (True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.). This is the underlying object with id, value and extensions. The accessor "getExcluded" gives direct access to the value 14485 */ 14486 public BooleanType getExcludedElement() { 14487 if (this.excluded == null) 14488 if (Configuration.errorOnAutoCreate()) 14489 throw new Error("Attempt to auto-create BenefitBalanceComponent.excluded"); 14490 else if (Configuration.doAutoCreate()) 14491 this.excluded = new BooleanType(); // bb 14492 return this.excluded; 14493 } 14494 14495 public boolean hasExcludedElement() { 14496 return this.excluded != null && !this.excluded.isEmpty(); 14497 } 14498 14499 public boolean hasExcluded() { 14500 return this.excluded != null && !this.excluded.isEmpty(); 14501 } 14502 14503 /** 14504 * @param value {@link #excluded} (True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.). This is the underlying object with id, value and extensions. The accessor "getExcluded" gives direct access to the value 14505 */ 14506 public BenefitBalanceComponent setExcludedElement(BooleanType value) { 14507 this.excluded = value; 14508 return this; 14509 } 14510 14511 /** 14512 * @return True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage. 14513 */ 14514 public boolean getExcluded() { 14515 return this.excluded == null || this.excluded.isEmpty() ? false : this.excluded.getValue(); 14516 } 14517 14518 /** 14519 * @param value True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage. 14520 */ 14521 public BenefitBalanceComponent setExcluded(boolean value) { 14522 if (this.excluded == null) 14523 this.excluded = new BooleanType(); 14524 this.excluded.setValue(value); 14525 return this; 14526 } 14527 14528 /** 14529 * @return {@link #name} (A short name or tag for the benefit.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 14530 */ 14531 public StringType getNameElement() { 14532 if (this.name == null) 14533 if (Configuration.errorOnAutoCreate()) 14534 throw new Error("Attempt to auto-create BenefitBalanceComponent.name"); 14535 else if (Configuration.doAutoCreate()) 14536 this.name = new StringType(); // bb 14537 return this.name; 14538 } 14539 14540 public boolean hasNameElement() { 14541 return this.name != null && !this.name.isEmpty(); 14542 } 14543 14544 public boolean hasName() { 14545 return this.name != null && !this.name.isEmpty(); 14546 } 14547 14548 /** 14549 * @param value {@link #name} (A short name or tag for the benefit.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 14550 */ 14551 public BenefitBalanceComponent setNameElement(StringType value) { 14552 this.name = value; 14553 return this; 14554 } 14555 14556 /** 14557 * @return A short name or tag for the benefit. 14558 */ 14559 public String getName() { 14560 return this.name == null ? null : this.name.getValue(); 14561 } 14562 14563 /** 14564 * @param value A short name or tag for the benefit. 14565 */ 14566 public BenefitBalanceComponent setName(String value) { 14567 if (Utilities.noString(value)) 14568 this.name = null; 14569 else { 14570 if (this.name == null) 14571 this.name = new StringType(); 14572 this.name.setValue(value); 14573 } 14574 return this; 14575 } 14576 14577 /** 14578 * @return {@link #description} (A richer description of the benefit or services covered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 14579 */ 14580 public StringType getDescriptionElement() { 14581 if (this.description == null) 14582 if (Configuration.errorOnAutoCreate()) 14583 throw new Error("Attempt to auto-create BenefitBalanceComponent.description"); 14584 else if (Configuration.doAutoCreate()) 14585 this.description = new StringType(); // bb 14586 return this.description; 14587 } 14588 14589 public boolean hasDescriptionElement() { 14590 return this.description != null && !this.description.isEmpty(); 14591 } 14592 14593 public boolean hasDescription() { 14594 return this.description != null && !this.description.isEmpty(); 14595 } 14596 14597 /** 14598 * @param value {@link #description} (A richer description of the benefit or services covered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 14599 */ 14600 public BenefitBalanceComponent setDescriptionElement(StringType value) { 14601 this.description = value; 14602 return this; 14603 } 14604 14605 /** 14606 * @return A richer description of the benefit or services covered. 14607 */ 14608 public String getDescription() { 14609 return this.description == null ? null : this.description.getValue(); 14610 } 14611 14612 /** 14613 * @param value A richer description of the benefit or services covered. 14614 */ 14615 public BenefitBalanceComponent setDescription(String value) { 14616 if (Utilities.noString(value)) 14617 this.description = null; 14618 else { 14619 if (this.description == null) 14620 this.description = new StringType(); 14621 this.description.setValue(value); 14622 } 14623 return this; 14624 } 14625 14626 /** 14627 * @return {@link #network} (Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.) 14628 */ 14629 public CodeableConcept getNetwork() { 14630 if (this.network == null) 14631 if (Configuration.errorOnAutoCreate()) 14632 throw new Error("Attempt to auto-create BenefitBalanceComponent.network"); 14633 else if (Configuration.doAutoCreate()) 14634 this.network = new CodeableConcept(); // cc 14635 return this.network; 14636 } 14637 14638 public boolean hasNetwork() { 14639 return this.network != null && !this.network.isEmpty(); 14640 } 14641 14642 /** 14643 * @param value {@link #network} (Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.) 14644 */ 14645 public BenefitBalanceComponent setNetwork(CodeableConcept value) { 14646 this.network = value; 14647 return this; 14648 } 14649 14650 /** 14651 * @return {@link #unit} (Indicates if the benefits apply to an individual or to the family.) 14652 */ 14653 public CodeableConcept getUnit() { 14654 if (this.unit == null) 14655 if (Configuration.errorOnAutoCreate()) 14656 throw new Error("Attempt to auto-create BenefitBalanceComponent.unit"); 14657 else if (Configuration.doAutoCreate()) 14658 this.unit = new CodeableConcept(); // cc 14659 return this.unit; 14660 } 14661 14662 public boolean hasUnit() { 14663 return this.unit != null && !this.unit.isEmpty(); 14664 } 14665 14666 /** 14667 * @param value {@link #unit} (Indicates if the benefits apply to an individual or to the family.) 14668 */ 14669 public BenefitBalanceComponent setUnit(CodeableConcept value) { 14670 this.unit = value; 14671 return this; 14672 } 14673 14674 /** 14675 * @return {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.) 14676 */ 14677 public CodeableConcept getTerm() { 14678 if (this.term == null) 14679 if (Configuration.errorOnAutoCreate()) 14680 throw new Error("Attempt to auto-create BenefitBalanceComponent.term"); 14681 else if (Configuration.doAutoCreate()) 14682 this.term = new CodeableConcept(); // cc 14683 return this.term; 14684 } 14685 14686 public boolean hasTerm() { 14687 return this.term != null && !this.term.isEmpty(); 14688 } 14689 14690 /** 14691 * @param value {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.) 14692 */ 14693 public BenefitBalanceComponent setTerm(CodeableConcept value) { 14694 this.term = value; 14695 return this; 14696 } 14697 14698 /** 14699 * @return {@link #financial} (Benefits Used to date.) 14700 */ 14701 public List<BenefitComponent> getFinancial() { 14702 if (this.financial == null) 14703 this.financial = new ArrayList<BenefitComponent>(); 14704 return this.financial; 14705 } 14706 14707 /** 14708 * @return Returns a reference to <code>this</code> for easy method chaining 14709 */ 14710 public BenefitBalanceComponent setFinancial(List<BenefitComponent> theFinancial) { 14711 this.financial = theFinancial; 14712 return this; 14713 } 14714 14715 public boolean hasFinancial() { 14716 if (this.financial == null) 14717 return false; 14718 for (BenefitComponent item : this.financial) 14719 if (!item.isEmpty()) 14720 return true; 14721 return false; 14722 } 14723 14724 public BenefitComponent addFinancial() { //3 14725 BenefitComponent t = new BenefitComponent(); 14726 if (this.financial == null) 14727 this.financial = new ArrayList<BenefitComponent>(); 14728 this.financial.add(t); 14729 return t; 14730 } 14731 14732 public BenefitBalanceComponent addFinancial(BenefitComponent t) { //3 14733 if (t == null) 14734 return this; 14735 if (this.financial == null) 14736 this.financial = new ArrayList<BenefitComponent>(); 14737 this.financial.add(t); 14738 return this; 14739 } 14740 14741 /** 14742 * @return The first repetition of repeating field {@link #financial}, creating it if it does not already exist {3} 14743 */ 14744 public BenefitComponent getFinancialFirstRep() { 14745 if (getFinancial().isEmpty()) { 14746 addFinancial(); 14747 } 14748 return getFinancial().get(0); 14749 } 14750 14751 protected void listChildren(List<Property> children) { 14752 super.listChildren(children); 14753 children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category)); 14754 children.add(new Property("excluded", "boolean", "True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", 0, 1, excluded)); 14755 children.add(new Property("name", "string", "A short name or tag for the benefit.", 0, 1, name)); 14756 children.add(new Property("description", "string", "A richer description of the benefit or services covered.", 0, 1, description)); 14757 children.add(new Property("network", "CodeableConcept", "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", 0, 1, network)); 14758 children.add(new Property("unit", "CodeableConcept", "Indicates if the benefits apply to an individual or to the family.", 0, 1, unit)); 14759 children.add(new Property("term", "CodeableConcept", "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", 0, 1, term)); 14760 children.add(new Property("financial", "", "Benefits Used to date.", 0, java.lang.Integer.MAX_VALUE, financial)); 14761 } 14762 14763 @Override 14764 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 14765 switch (_hash) { 14766 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category); 14767 case 1994055114: /*excluded*/ return new Property("excluded", "boolean", "True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", 0, 1, excluded); 14768 case 3373707: /*name*/ return new Property("name", "string", "A short name or tag for the benefit.", 0, 1, name); 14769 case -1724546052: /*description*/ return new Property("description", "string", "A richer description of the benefit or services covered.", 0, 1, description); 14770 case 1843485230: /*network*/ return new Property("network", "CodeableConcept", "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", 0, 1, network); 14771 case 3594628: /*unit*/ return new Property("unit", "CodeableConcept", "Indicates if the benefits apply to an individual or to the family.", 0, 1, unit); 14772 case 3556460: /*term*/ return new Property("term", "CodeableConcept", "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", 0, 1, term); 14773 case 357555337: /*financial*/ return new Property("financial", "", "Benefits Used to date.", 0, java.lang.Integer.MAX_VALUE, financial); 14774 default: return super.getNamedProperty(_hash, _name, _checkValid); 14775 } 14776 14777 } 14778 14779 @Override 14780 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 14781 switch (hash) { 14782 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 14783 case 1994055114: /*excluded*/ return this.excluded == null ? new Base[0] : new Base[] {this.excluded}; // BooleanType 14784 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 14785 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 14786 case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // CodeableConcept 14787 case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // CodeableConcept 14788 case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // CodeableConcept 14789 case 357555337: /*financial*/ return this.financial == null ? new Base[0] : this.financial.toArray(new Base[this.financial.size()]); // BenefitComponent 14790 default: return super.getProperty(hash, name, checkValid); 14791 } 14792 14793 } 14794 14795 @Override 14796 public Base setProperty(int hash, String name, Base value) throws FHIRException { 14797 switch (hash) { 14798 case 50511102: // category 14799 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14800 return value; 14801 case 1994055114: // excluded 14802 this.excluded = TypeConvertor.castToBoolean(value); // BooleanType 14803 return value; 14804 case 3373707: // name 14805 this.name = TypeConvertor.castToString(value); // StringType 14806 return value; 14807 case -1724546052: // description 14808 this.description = TypeConvertor.castToString(value); // StringType 14809 return value; 14810 case 1843485230: // network 14811 this.network = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14812 return value; 14813 case 3594628: // unit 14814 this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14815 return value; 14816 case 3556460: // term 14817 this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14818 return value; 14819 case 357555337: // financial 14820 this.getFinancial().add((BenefitComponent) value); // BenefitComponent 14821 return value; 14822 default: return super.setProperty(hash, name, value); 14823 } 14824 14825 } 14826 14827 @Override 14828 public Base setProperty(String name, Base value) throws FHIRException { 14829 if (name.equals("category")) { 14830 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14831 } else if (name.equals("excluded")) { 14832 this.excluded = TypeConvertor.castToBoolean(value); // BooleanType 14833 } else if (name.equals("name")) { 14834 this.name = TypeConvertor.castToString(value); // StringType 14835 } else if (name.equals("description")) { 14836 this.description = TypeConvertor.castToString(value); // StringType 14837 } else if (name.equals("network")) { 14838 this.network = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14839 } else if (name.equals("unit")) { 14840 this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14841 } else if (name.equals("term")) { 14842 this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 14843 } else if (name.equals("financial")) { 14844 this.getFinancial().add((BenefitComponent) value); 14845 } else 14846 return super.setProperty(name, value); 14847 return value; 14848 } 14849 14850 @Override 14851 public void removeChild(String name, Base value) throws FHIRException { 14852 if (name.equals("category")) { 14853 this.category = null; 14854 } else if (name.equals("excluded")) { 14855 this.excluded = null; 14856 } else if (name.equals("name")) { 14857 this.name = null; 14858 } else if (name.equals("description")) { 14859 this.description = null; 14860 } else if (name.equals("network")) { 14861 this.network = null; 14862 } else if (name.equals("unit")) { 14863 this.unit = null; 14864 } else if (name.equals("term")) { 14865 this.term = null; 14866 } else if (name.equals("financial")) { 14867 this.getFinancial().remove((BenefitComponent) value); 14868 } else 14869 super.removeChild(name, value); 14870 14871 } 14872 14873 @Override 14874 public Base makeProperty(int hash, String name) throws FHIRException { 14875 switch (hash) { 14876 case 50511102: return getCategory(); 14877 case 1994055114: return getExcludedElement(); 14878 case 3373707: return getNameElement(); 14879 case -1724546052: return getDescriptionElement(); 14880 case 1843485230: return getNetwork(); 14881 case 3594628: return getUnit(); 14882 case 3556460: return getTerm(); 14883 case 357555337: return addFinancial(); 14884 default: return super.makeProperty(hash, name); 14885 } 14886 14887 } 14888 14889 @Override 14890 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 14891 switch (hash) { 14892 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 14893 case 1994055114: /*excluded*/ return new String[] {"boolean"}; 14894 case 3373707: /*name*/ return new String[] {"string"}; 14895 case -1724546052: /*description*/ return new String[] {"string"}; 14896 case 1843485230: /*network*/ return new String[] {"CodeableConcept"}; 14897 case 3594628: /*unit*/ return new String[] {"CodeableConcept"}; 14898 case 3556460: /*term*/ return new String[] {"CodeableConcept"}; 14899 case 357555337: /*financial*/ return new String[] {}; 14900 default: return super.getTypesForProperty(hash, name); 14901 } 14902 14903 } 14904 14905 @Override 14906 public Base addChild(String name) throws FHIRException { 14907 if (name.equals("category")) { 14908 this.category = new CodeableConcept(); 14909 return this.category; 14910 } 14911 else if (name.equals("excluded")) { 14912 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.benefitBalance.excluded"); 14913 } 14914 else if (name.equals("name")) { 14915 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.benefitBalance.name"); 14916 } 14917 else if (name.equals("description")) { 14918 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.benefitBalance.description"); 14919 } 14920 else if (name.equals("network")) { 14921 this.network = new CodeableConcept(); 14922 return this.network; 14923 } 14924 else if (name.equals("unit")) { 14925 this.unit = new CodeableConcept(); 14926 return this.unit; 14927 } 14928 else if (name.equals("term")) { 14929 this.term = new CodeableConcept(); 14930 return this.term; 14931 } 14932 else if (name.equals("financial")) { 14933 return addFinancial(); 14934 } 14935 else 14936 return super.addChild(name); 14937 } 14938 14939 public BenefitBalanceComponent copy() { 14940 BenefitBalanceComponent dst = new BenefitBalanceComponent(); 14941 copyValues(dst); 14942 return dst; 14943 } 14944 14945 public void copyValues(BenefitBalanceComponent dst) { 14946 super.copyValues(dst); 14947 dst.category = category == null ? null : category.copy(); 14948 dst.excluded = excluded == null ? null : excluded.copy(); 14949 dst.name = name == null ? null : name.copy(); 14950 dst.description = description == null ? null : description.copy(); 14951 dst.network = network == null ? null : network.copy(); 14952 dst.unit = unit == null ? null : unit.copy(); 14953 dst.term = term == null ? null : term.copy(); 14954 if (financial != null) { 14955 dst.financial = new ArrayList<BenefitComponent>(); 14956 for (BenefitComponent i : financial) 14957 dst.financial.add(i.copy()); 14958 }; 14959 } 14960 14961 @Override 14962 public boolean equalsDeep(Base other_) { 14963 if (!super.equalsDeep(other_)) 14964 return false; 14965 if (!(other_ instanceof BenefitBalanceComponent)) 14966 return false; 14967 BenefitBalanceComponent o = (BenefitBalanceComponent) other_; 14968 return compareDeep(category, o.category, true) && compareDeep(excluded, o.excluded, true) && compareDeep(name, o.name, true) 14969 && compareDeep(description, o.description, true) && compareDeep(network, o.network, true) && compareDeep(unit, o.unit, true) 14970 && compareDeep(term, o.term, true) && compareDeep(financial, o.financial, true); 14971 } 14972 14973 @Override 14974 public boolean equalsShallow(Base other_) { 14975 if (!super.equalsShallow(other_)) 14976 return false; 14977 if (!(other_ instanceof BenefitBalanceComponent)) 14978 return false; 14979 BenefitBalanceComponent o = (BenefitBalanceComponent) other_; 14980 return compareValues(excluded, o.excluded, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) 14981 ; 14982 } 14983 14984 public boolean isEmpty() { 14985 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, excluded, name 14986 , description, network, unit, term, financial); 14987 } 14988 14989 public String fhirType() { 14990 return "ExplanationOfBenefit.benefitBalance"; 14991 14992 } 14993 14994 } 14995 14996 @Block() 14997 public static class BenefitComponent extends BackboneElement implements IBaseBackboneElement { 14998 /** 14999 * Classification of benefit being provided. 15000 */ 15001 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 15002 @Description(shortDefinition="Benefit classification", formalDefinition="Classification of benefit being provided." ) 15003 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-type") 15004 protected CodeableConcept type; 15005 15006 /** 15007 * The quantity of the benefit which is permitted under the coverage. 15008 */ 15009 @Child(name = "allowed", type = {UnsignedIntType.class, StringType.class, Money.class}, order=2, min=0, max=1, modifier=false, summary=false) 15010 @Description(shortDefinition="Benefits allowed", formalDefinition="The quantity of the benefit which is permitted under the coverage." ) 15011 protected DataType allowed; 15012 15013 /** 15014 * The quantity of the benefit which have been consumed to date. 15015 */ 15016 @Child(name = "used", type = {UnsignedIntType.class, Money.class}, order=3, min=0, max=1, modifier=false, summary=false) 15017 @Description(shortDefinition="Benefits used", formalDefinition="The quantity of the benefit which have been consumed to date." ) 15018 protected DataType used; 15019 15020 private static final long serialVersionUID = 1900247614L; 15021 15022 /** 15023 * Constructor 15024 */ 15025 public BenefitComponent() { 15026 super(); 15027 } 15028 15029 /** 15030 * Constructor 15031 */ 15032 public BenefitComponent(CodeableConcept type) { 15033 super(); 15034 this.setType(type); 15035 } 15036 15037 /** 15038 * @return {@link #type} (Classification of benefit being provided.) 15039 */ 15040 public CodeableConcept getType() { 15041 if (this.type == null) 15042 if (Configuration.errorOnAutoCreate()) 15043 throw new Error("Attempt to auto-create BenefitComponent.type"); 15044 else if (Configuration.doAutoCreate()) 15045 this.type = new CodeableConcept(); // cc 15046 return this.type; 15047 } 15048 15049 public boolean hasType() { 15050 return this.type != null && !this.type.isEmpty(); 15051 } 15052 15053 /** 15054 * @param value {@link #type} (Classification of benefit being provided.) 15055 */ 15056 public BenefitComponent setType(CodeableConcept value) { 15057 this.type = value; 15058 return this; 15059 } 15060 15061 /** 15062 * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) 15063 */ 15064 public DataType getAllowed() { 15065 return this.allowed; 15066 } 15067 15068 /** 15069 * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) 15070 */ 15071 public UnsignedIntType getAllowedUnsignedIntType() throws FHIRException { 15072 if (this.allowed == null) 15073 this.allowed = new UnsignedIntType(); 15074 if (!(this.allowed instanceof UnsignedIntType)) 15075 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.allowed.getClass().getName()+" was encountered"); 15076 return (UnsignedIntType) this.allowed; 15077 } 15078 15079 public boolean hasAllowedUnsignedIntType() { 15080 return this != null && this.allowed instanceof UnsignedIntType; 15081 } 15082 15083 /** 15084 * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) 15085 */ 15086 public StringType getAllowedStringType() throws FHIRException { 15087 if (this.allowed == null) 15088 this.allowed = new StringType(); 15089 if (!(this.allowed instanceof StringType)) 15090 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.allowed.getClass().getName()+" was encountered"); 15091 return (StringType) this.allowed; 15092 } 15093 15094 public boolean hasAllowedStringType() { 15095 return this != null && this.allowed instanceof StringType; 15096 } 15097 15098 /** 15099 * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) 15100 */ 15101 public Money getAllowedMoney() throws FHIRException { 15102 if (this.allowed == null) 15103 this.allowed = new Money(); 15104 if (!(this.allowed instanceof Money)) 15105 throw new FHIRException("Type mismatch: the type Money was expected, but "+this.allowed.getClass().getName()+" was encountered"); 15106 return (Money) this.allowed; 15107 } 15108 15109 public boolean hasAllowedMoney() { 15110 return this != null && this.allowed instanceof Money; 15111 } 15112 15113 public boolean hasAllowed() { 15114 return this.allowed != null && !this.allowed.isEmpty(); 15115 } 15116 15117 /** 15118 * @param value {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) 15119 */ 15120 public BenefitComponent setAllowed(DataType value) { 15121 if (value != null && !(value instanceof UnsignedIntType || value instanceof StringType || value instanceof Money)) 15122 throw new FHIRException("Not the right type for ExplanationOfBenefit.benefitBalance.financial.allowed[x]: "+value.fhirType()); 15123 this.allowed = value; 15124 return this; 15125 } 15126 15127 /** 15128 * @return {@link #used} (The quantity of the benefit which have been consumed to date.) 15129 */ 15130 public DataType getUsed() { 15131 return this.used; 15132 } 15133 15134 /** 15135 * @return {@link #used} (The quantity of the benefit which have been consumed to date.) 15136 */ 15137 public UnsignedIntType getUsedUnsignedIntType() throws FHIRException { 15138 if (this.used == null) 15139 this.used = new UnsignedIntType(); 15140 if (!(this.used instanceof UnsignedIntType)) 15141 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.used.getClass().getName()+" was encountered"); 15142 return (UnsignedIntType) this.used; 15143 } 15144 15145 public boolean hasUsedUnsignedIntType() { 15146 return this != null && this.used instanceof UnsignedIntType; 15147 } 15148 15149 /** 15150 * @return {@link #used} (The quantity of the benefit which have been consumed to date.) 15151 */ 15152 public Money getUsedMoney() throws FHIRException { 15153 if (this.used == null) 15154 this.used = new Money(); 15155 if (!(this.used instanceof Money)) 15156 throw new FHIRException("Type mismatch: the type Money was expected, but "+this.used.getClass().getName()+" was encountered"); 15157 return (Money) this.used; 15158 } 15159 15160 public boolean hasUsedMoney() { 15161 return this != null && this.used instanceof Money; 15162 } 15163 15164 public boolean hasUsed() { 15165 return this.used != null && !this.used.isEmpty(); 15166 } 15167 15168 /** 15169 * @param value {@link #used} (The quantity of the benefit which have been consumed to date.) 15170 */ 15171 public BenefitComponent setUsed(DataType value) { 15172 if (value != null && !(value instanceof UnsignedIntType || value instanceof Money)) 15173 throw new FHIRException("Not the right type for ExplanationOfBenefit.benefitBalance.financial.used[x]: "+value.fhirType()); 15174 this.used = value; 15175 return this; 15176 } 15177 15178 protected void listChildren(List<Property> children) { 15179 super.listChildren(children); 15180 children.add(new Property("type", "CodeableConcept", "Classification of benefit being provided.", 0, 1, type)); 15181 children.add(new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed)); 15182 children.add(new Property("used[x]", "unsignedInt|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used)); 15183 } 15184 15185 @Override 15186 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 15187 switch (_hash) { 15188 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Classification of benefit being provided.", 0, 1, type); 15189 case -1336663592: /*allowed[x]*/ return new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed); 15190 case -911343192: /*allowed*/ return new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed); 15191 case 1668802034: /*allowedUnsignedInt*/ return new Property("allowed[x]", "unsignedInt", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed); 15192 case -2135265319: /*allowedString*/ return new Property("allowed[x]", "string", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed); 15193 case -351668232: /*allowedMoney*/ return new Property("allowed[x]", "Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed); 15194 case -147553373: /*used[x]*/ return new Property("used[x]", "unsignedInt|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used); 15195 case 3599293: /*used*/ return new Property("used[x]", "unsignedInt|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used); 15196 case 1252740285: /*usedUnsignedInt*/ return new Property("used[x]", "unsignedInt", "The quantity of the benefit which have been consumed to date.", 0, 1, used); 15197 case -78048509: /*usedMoney*/ return new Property("used[x]", "Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used); 15198 default: return super.getNamedProperty(_hash, _name, _checkValid); 15199 } 15200 15201 } 15202 15203 @Override 15204 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 15205 switch (hash) { 15206 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 15207 case -911343192: /*allowed*/ return this.allowed == null ? new Base[0] : new Base[] {this.allowed}; // DataType 15208 case 3599293: /*used*/ return this.used == null ? new Base[0] : new Base[] {this.used}; // DataType 15209 default: return super.getProperty(hash, name, checkValid); 15210 } 15211 15212 } 15213 15214 @Override 15215 public Base setProperty(int hash, String name, Base value) throws FHIRException { 15216 switch (hash) { 15217 case 3575610: // type 15218 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 15219 return value; 15220 case -911343192: // allowed 15221 this.allowed = TypeConvertor.castToType(value); // DataType 15222 return value; 15223 case 3599293: // used 15224 this.used = TypeConvertor.castToType(value); // DataType 15225 return value; 15226 default: return super.setProperty(hash, name, value); 15227 } 15228 15229 } 15230 15231 @Override 15232 public Base setProperty(String name, Base value) throws FHIRException { 15233 if (name.equals("type")) { 15234 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 15235 } else if (name.equals("allowed[x]")) { 15236 this.allowed = TypeConvertor.castToType(value); // DataType 15237 } else if (name.equals("used[x]")) { 15238 this.used = TypeConvertor.castToType(value); // DataType 15239 } else 15240 return super.setProperty(name, value); 15241 return value; 15242 } 15243 15244 @Override 15245 public void removeChild(String name, Base value) throws FHIRException { 15246 if (name.equals("type")) { 15247 this.type = null; 15248 } else if (name.equals("allowed[x]")) { 15249 this.allowed = null; 15250 } else if (name.equals("used[x]")) { 15251 this.used = null; 15252 } else 15253 super.removeChild(name, value); 15254 15255 } 15256 15257 @Override 15258 public Base makeProperty(int hash, String name) throws FHIRException { 15259 switch (hash) { 15260 case 3575610: return getType(); 15261 case -1336663592: return getAllowed(); 15262 case -911343192: return getAllowed(); 15263 case -147553373: return getUsed(); 15264 case 3599293: return getUsed(); 15265 default: return super.makeProperty(hash, name); 15266 } 15267 15268 } 15269 15270 @Override 15271 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 15272 switch (hash) { 15273 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 15274 case -911343192: /*allowed*/ return new String[] {"unsignedInt", "string", "Money"}; 15275 case 3599293: /*used*/ return new String[] {"unsignedInt", "Money"}; 15276 default: return super.getTypesForProperty(hash, name); 15277 } 15278 15279 } 15280 15281 @Override 15282 public Base addChild(String name) throws FHIRException { 15283 if (name.equals("type")) { 15284 this.type = new CodeableConcept(); 15285 return this.type; 15286 } 15287 else if (name.equals("allowedUnsignedInt")) { 15288 this.allowed = new UnsignedIntType(); 15289 return this.allowed; 15290 } 15291 else if (name.equals("allowedString")) { 15292 this.allowed = new StringType(); 15293 return this.allowed; 15294 } 15295 else if (name.equals("allowedMoney")) { 15296 this.allowed = new Money(); 15297 return this.allowed; 15298 } 15299 else if (name.equals("usedUnsignedInt")) { 15300 this.used = new UnsignedIntType(); 15301 return this.used; 15302 } 15303 else if (name.equals("usedMoney")) { 15304 this.used = new Money(); 15305 return this.used; 15306 } 15307 else 15308 return super.addChild(name); 15309 } 15310 15311 public BenefitComponent copy() { 15312 BenefitComponent dst = new BenefitComponent(); 15313 copyValues(dst); 15314 return dst; 15315 } 15316 15317 public void copyValues(BenefitComponent dst) { 15318 super.copyValues(dst); 15319 dst.type = type == null ? null : type.copy(); 15320 dst.allowed = allowed == null ? null : allowed.copy(); 15321 dst.used = used == null ? null : used.copy(); 15322 } 15323 15324 @Override 15325 public boolean equalsDeep(Base other_) { 15326 if (!super.equalsDeep(other_)) 15327 return false; 15328 if (!(other_ instanceof BenefitComponent)) 15329 return false; 15330 BenefitComponent o = (BenefitComponent) other_; 15331 return compareDeep(type, o.type, true) && compareDeep(allowed, o.allowed, true) && compareDeep(used, o.used, true) 15332 ; 15333 } 15334 15335 @Override 15336 public boolean equalsShallow(Base other_) { 15337 if (!super.equalsShallow(other_)) 15338 return false; 15339 if (!(other_ instanceof BenefitComponent)) 15340 return false; 15341 BenefitComponent o = (BenefitComponent) other_; 15342 return true; 15343 } 15344 15345 public boolean isEmpty() { 15346 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, allowed, used); 15347 } 15348 15349 public String fhirType() { 15350 return "ExplanationOfBenefit.benefitBalance.financial"; 15351 15352 } 15353 15354 } 15355 15356 /** 15357 * A unique identifier assigned to this explanation of benefit. 15358 */ 15359 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15360 @Description(shortDefinition="Business Identifier for the resource", formalDefinition="A unique identifier assigned to this explanation of benefit." ) 15361 protected List<Identifier> identifier; 15362 15363 /** 15364 * Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners. 15365 */ 15366 @Child(name = "traceNumber", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15367 @Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." ) 15368 protected List<Identifier> traceNumber; 15369 15370 /** 15371 * The status of the resource instance. 15372 */ 15373 @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) 15374 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 15375 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/explanationofbenefit-status") 15376 protected Enumeration<ExplanationOfBenefitStatus> status; 15377 15378 /** 15379 * The category of claim, e.g. oral, pharmacy, vision, institutional, professional. 15380 */ 15381 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) 15382 @Description(shortDefinition="Category or discipline", formalDefinition="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." ) 15383 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-type") 15384 protected CodeableConcept type; 15385 15386 /** 15387 * A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service. 15388 */ 15389 @Child(name = "subType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 15390 @Description(shortDefinition="More granular claim type", formalDefinition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." ) 15391 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-subtype") 15392 protected CodeableConcept subType; 15393 15394 /** 15395 * A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided. 15396 */ 15397 @Child(name = "use", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) 15398 @Description(shortDefinition="claim | preauthorization | predetermination", formalDefinition="A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided." ) 15399 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-use") 15400 protected Enumeration<Use> use; 15401 15402 /** 15403 * The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought. 15404 */ 15405 @Child(name = "patient", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true) 15406 @Description(shortDefinition="The recipient of the products and services", formalDefinition="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought." ) 15407 protected Reference patient; 15408 15409 /** 15410 * The period for which charges are being submitted. 15411 */ 15412 @Child(name = "billablePeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 15413 @Description(shortDefinition="Relevant time frame for the claim", formalDefinition="The period for which charges are being submitted." ) 15414 protected Period billablePeriod; 15415 15416 /** 15417 * The date this resource was created. 15418 */ 15419 @Child(name = "created", type = {DateTimeType.class}, order=8, min=1, max=1, modifier=false, summary=true) 15420 @Description(shortDefinition="Response creation date", formalDefinition="The date this resource was created." ) 15421 protected DateTimeType created; 15422 15423 /** 15424 * Individual who created the claim, predetermination or preauthorization. 15425 */ 15426 @Child(name = "enterer", type = {Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=false) 15427 @Description(shortDefinition="Author of the claim", formalDefinition="Individual who created the claim, predetermination or preauthorization." ) 15428 protected Reference enterer; 15429 15430 /** 15431 * The party responsible for authorization, adjudication and reimbursement. 15432 */ 15433 @Child(name = "insurer", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) 15434 @Description(shortDefinition="Party responsible for reimbursement", formalDefinition="The party responsible for authorization, adjudication and reimbursement." ) 15435 protected Reference insurer; 15436 15437 /** 15438 * The provider which is responsible for the claim, predetermination or preauthorization. 15439 */ 15440 @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=11, min=0, max=1, modifier=false, summary=true) 15441 @Description(shortDefinition="Party responsible for the claim", formalDefinition="The provider which is responsible for the claim, predetermination or preauthorization." ) 15442 protected Reference provider; 15443 15444 /** 15445 * The provider-required urgency of processing the request. Typical values include: stat, normal deferred. 15446 */ 15447 @Child(name = "priority", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) 15448 @Description(shortDefinition="Desired processing urgency", formalDefinition="The provider-required urgency of processing the request. Typical values include: stat, normal deferred." ) 15449 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/process-priority") 15450 protected CodeableConcept priority; 15451 15452 /** 15453 * A code to indicate whether and for whom funds are to be reserved for future claims. 15454 */ 15455 @Child(name = "fundsReserveRequested", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) 15456 @Description(shortDefinition="For whom to reserve funds", formalDefinition="A code to indicate whether and for whom funds are to be reserved for future claims." ) 15457 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fundsreserve") 15458 protected CodeableConcept fundsReserveRequested; 15459 15460 /** 15461 * A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom. 15462 */ 15463 @Child(name = "fundsReserve", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) 15464 @Description(shortDefinition="Funds reserved status", formalDefinition="A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom." ) 15465 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fundsreserve") 15466 protected CodeableConcept fundsReserve; 15467 15468 /** 15469 * Other claims which are related to this claim such as prior submissions or claims for related services or for the same event. 15470 */ 15471 @Child(name = "related", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15472 @Description(shortDefinition="Prior or corollary claims", formalDefinition="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event." ) 15473 protected List<RelatedClaimComponent> related; 15474 15475 /** 15476 * Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments. 15477 */ 15478 @Child(name = "prescription", type = {MedicationRequest.class, VisionPrescription.class}, order=16, min=0, max=1, modifier=false, summary=false) 15479 @Description(shortDefinition="Prescription authorizing services or products", formalDefinition="Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments." ) 15480 protected Reference prescription; 15481 15482 /** 15483 * Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products. 15484 */ 15485 @Child(name = "originalPrescription", type = {MedicationRequest.class}, order=17, min=0, max=1, modifier=false, summary=false) 15486 @Description(shortDefinition="Original prescription if superceded by fulfiller", formalDefinition="Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products." ) 15487 protected Reference originalPrescription; 15488 15489 /** 15490 * Information code for an event with a corresponding date or period. 15491 */ 15492 @Child(name = "event", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15493 @Description(shortDefinition="Event information", formalDefinition="Information code for an event with a corresponding date or period." ) 15494 protected List<ExplanationOfBenefitEventComponent> event; 15495 15496 /** 15497 * The party to be reimbursed for cost of the products and services according to the terms of the policy. 15498 */ 15499 @Child(name = "payee", type = {}, order=19, min=0, max=1, modifier=false, summary=false) 15500 @Description(shortDefinition="Recipient of benefits payable", formalDefinition="The party to be reimbursed for cost of the products and services according to the terms of the policy." ) 15501 protected PayeeComponent payee; 15502 15503 /** 15504 * The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services. 15505 */ 15506 @Child(name = "referral", type = {ServiceRequest.class}, order=20, min=0, max=1, modifier=false, summary=false) 15507 @Description(shortDefinition="Treatment Referral", formalDefinition="The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services." ) 15508 protected Reference referral; 15509 15510 /** 15511 * Healthcare encounters related to this claim. 15512 */ 15513 @Child(name = "encounter", type = {Encounter.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15514 @Description(shortDefinition="Encounters associated with the listed treatments", formalDefinition="Healthcare encounters related to this claim." ) 15515 protected List<Reference> encounter; 15516 15517 /** 15518 * Facility where the services were provided. 15519 */ 15520 @Child(name = "facility", type = {Location.class, Organization.class}, order=22, min=0, max=1, modifier=false, summary=false) 15521 @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) 15522 protected Reference facility; 15523 15524 /** 15525 * The business identifier for the instance of the adjudication request: claim predetermination or preauthorization. 15526 */ 15527 @Child(name = "claim", type = {Claim.class}, order=23, min=0, max=1, modifier=false, summary=false) 15528 @Description(shortDefinition="Claim reference", formalDefinition="The business identifier for the instance of the adjudication request: claim predetermination or preauthorization." ) 15529 protected Reference claim; 15530 15531 /** 15532 * The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response. 15533 */ 15534 @Child(name = "claimResponse", type = {ClaimResponse.class}, order=24, min=0, max=1, modifier=false, summary=false) 15535 @Description(shortDefinition="Claim response reference", formalDefinition="The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response." ) 15536 protected Reference claimResponse; 15537 15538 /** 15539 * The outcome of the claim, predetermination, or preauthorization processing. 15540 */ 15541 @Child(name = "outcome", type = {CodeType.class}, order=25, min=1, max=1, modifier=false, summary=true) 15542 @Description(shortDefinition="queued | complete | error | partial", formalDefinition="The outcome of the claim, predetermination, or preauthorization processing." ) 15543 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-outcome") 15544 protected Enumeration<ClaimProcessingCodes> outcome; 15545 15546 /** 15547 * The result of the claim, predetermination, or preauthorization adjudication. 15548 */ 15549 @Child(name = "decision", type = {CodeableConcept.class}, order=26, min=0, max=1, modifier=false, summary=true) 15550 @Description(shortDefinition="Result of the adjudication", formalDefinition="The result of the claim, predetermination, or preauthorization adjudication." ) 15551 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-decision") 15552 protected CodeableConcept decision; 15553 15554 /** 15555 * A human readable description of the status of the adjudication. 15556 */ 15557 @Child(name = "disposition", type = {StringType.class}, order=27, min=0, max=1, modifier=false, summary=false) 15558 @Description(shortDefinition="Disposition Message", formalDefinition="A human readable description of the status of the adjudication." ) 15559 protected StringType disposition; 15560 15561 /** 15562 * Reference from the Insurer which is used in later communications which refers to this adjudication. 15563 */ 15564 @Child(name = "preAuthRef", type = {StringType.class}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15565 @Description(shortDefinition="Preauthorization reference", formalDefinition="Reference from the Insurer which is used in later communications which refers to this adjudication." ) 15566 protected List<StringType> preAuthRef; 15567 15568 /** 15569 * The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided. 15570 */ 15571 @Child(name = "preAuthRefPeriod", type = {Period.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15572 @Description(shortDefinition="Preauthorization in-effect period", formalDefinition="The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided." ) 15573 protected List<Period> preAuthRefPeriod; 15574 15575 /** 15576 * A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system. 15577 */ 15578 @Child(name = "diagnosisRelatedGroup", type = {CodeableConcept.class}, order=30, min=0, max=1, modifier=false, summary=false) 15579 @Description(shortDefinition="Package billing code", formalDefinition="A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system." ) 15580 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup") 15581 protected CodeableConcept diagnosisRelatedGroup; 15582 15583 /** 15584 * The members of the team who provided the products and services. 15585 */ 15586 @Child(name = "careTeam", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15587 @Description(shortDefinition="Care Team members", formalDefinition="The members of the team who provided the products and services." ) 15588 protected List<CareTeamComponent> careTeam; 15589 15590 /** 15591 * Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. 15592 */ 15593 @Child(name = "supportingInfo", type = {}, order=32, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15594 @Description(shortDefinition="Supporting information", formalDefinition="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues." ) 15595 protected List<SupportingInformationComponent> supportingInfo; 15596 15597 /** 15598 * Information about diagnoses relevant to the claim items. 15599 */ 15600 @Child(name = "diagnosis", type = {}, order=33, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15601 @Description(shortDefinition="Pertinent diagnosis information", formalDefinition="Information about diagnoses relevant to the claim items." ) 15602 protected List<DiagnosisComponent> diagnosis; 15603 15604 /** 15605 * Procedures performed on the patient relevant to the billing items with the claim. 15606 */ 15607 @Child(name = "procedure", type = {}, order=34, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15608 @Description(shortDefinition="Clinical procedures performed", formalDefinition="Procedures performed on the patient relevant to the billing items with the claim." ) 15609 protected List<ProcedureComponent> procedure; 15610 15611 /** 15612 * This indicates the relative order of a series of EOBs related to different coverages for the same suite of services. 15613 */ 15614 @Child(name = "precedence", type = {PositiveIntType.class}, order=35, min=0, max=1, modifier=false, summary=false) 15615 @Description(shortDefinition="Precedence (primary, secondary, etc.)", formalDefinition="This indicates the relative order of a series of EOBs related to different coverages for the same suite of services." ) 15616 protected PositiveIntType precedence; 15617 15618 /** 15619 * Financial instruments for reimbursement for the health care products and services specified on the claim. 15620 */ 15621 @Child(name = "insurance", type = {}, order=36, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 15622 @Description(shortDefinition="Patient insurance information", formalDefinition="Financial instruments for reimbursement for the health care products and services specified on the claim." ) 15623 protected List<InsuranceComponent> insurance; 15624 15625 /** 15626 * Details of a accident which resulted in injuries which required the products and services listed in the claim. 15627 */ 15628 @Child(name = "accident", type = {}, order=37, min=0, max=1, modifier=false, summary=false) 15629 @Description(shortDefinition="Details of the event", formalDefinition="Details of a accident which resulted in injuries which required the products and services listed in the claim." ) 15630 protected AccidentComponent accident; 15631 15632 /** 15633 * The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services. 15634 */ 15635 @Child(name = "patientPaid", type = {Money.class}, order=38, min=0, max=1, modifier=false, summary=false) 15636 @Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." ) 15637 protected Money patientPaid; 15638 15639 /** 15640 * A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details. 15641 */ 15642 @Child(name = "item", type = {}, order=39, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15643 @Description(shortDefinition="Product or service provided", formalDefinition="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details." ) 15644 protected List<ItemComponent> item; 15645 15646 /** 15647 * The first-tier service adjudications for payor added product or service lines. 15648 */ 15649 @Child(name = "addItem", type = {}, order=40, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15650 @Description(shortDefinition="Insurer added line items", formalDefinition="The first-tier service adjudications for payor added product or service lines." ) 15651 protected List<AddedItemComponent> addItem; 15652 15653 /** 15654 * The adjudication results which are presented at the header level rather than at the line-item or add-item levels. 15655 */ 15656 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=41, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15657 @Description(shortDefinition="Header-level adjudication", formalDefinition="The adjudication results which are presented at the header level rather than at the line-item or add-item levels." ) 15658 protected List<AdjudicationComponent> adjudication; 15659 15660 /** 15661 * Categorized monetary totals for the adjudication. 15662 */ 15663 @Child(name = "total", type = {}, order=42, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 15664 @Description(shortDefinition="Adjudication totals", formalDefinition="Categorized monetary totals for the adjudication." ) 15665 protected List<TotalComponent> total; 15666 15667 /** 15668 * Payment details for the adjudication of the claim. 15669 */ 15670 @Child(name = "payment", type = {}, order=43, min=0, max=1, modifier=false, summary=false) 15671 @Description(shortDefinition="Payment Details", formalDefinition="Payment details for the adjudication of the claim." ) 15672 protected PaymentComponent payment; 15673 15674 /** 15675 * A code for the form to be used for printing the content. 15676 */ 15677 @Child(name = "formCode", type = {CodeableConcept.class}, order=44, min=0, max=1, modifier=false, summary=false) 15678 @Description(shortDefinition="Printed form identifier", formalDefinition="A code for the form to be used for printing the content." ) 15679 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms") 15680 protected CodeableConcept formCode; 15681 15682 /** 15683 * The actual form, by reference or inclusion, for printing the content or an EOB. 15684 */ 15685 @Child(name = "form", type = {Attachment.class}, order=45, min=0, max=1, modifier=false, summary=false) 15686 @Description(shortDefinition="Printed reference or actual form", formalDefinition="The actual form, by reference or inclusion, for printing the content or an EOB." ) 15687 protected Attachment form; 15688 15689 /** 15690 * A note that describes or explains adjudication results in a human readable form. 15691 */ 15692 @Child(name = "processNote", type = {}, order=46, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15693 @Description(shortDefinition="Note concerning adjudication", formalDefinition="A note that describes or explains adjudication results in a human readable form." ) 15694 protected List<NoteComponent> processNote; 15695 15696 /** 15697 * The term of the benefits documented in this response. 15698 */ 15699 @Child(name = "benefitPeriod", type = {Period.class}, order=47, min=0, max=1, modifier=false, summary=false) 15700 @Description(shortDefinition="When the benefits are applicable", formalDefinition="The term of the benefits documented in this response." ) 15701 protected Period benefitPeriod; 15702 15703 /** 15704 * Balance by Benefit Category. 15705 */ 15706 @Child(name = "benefitBalance", type = {}, order=48, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 15707 @Description(shortDefinition="Balance by Benefit Category", formalDefinition="Balance by Benefit Category." ) 15708 protected List<BenefitBalanceComponent> benefitBalance; 15709 15710 private static final long serialVersionUID = 106661060L; 15711 15712 /** 15713 * Constructor 15714 */ 15715 public ExplanationOfBenefit() { 15716 super(); 15717 } 15718 15719 /** 15720 * Constructor 15721 */ 15722 public ExplanationOfBenefit(ExplanationOfBenefitStatus status, CodeableConcept type, Use use, Reference patient, Date created, ClaimProcessingCodes outcome) { 15723 super(); 15724 this.setStatus(status); 15725 this.setType(type); 15726 this.setUse(use); 15727 this.setPatient(patient); 15728 this.setCreated(created); 15729 this.setOutcome(outcome); 15730 } 15731 15732 /** 15733 * @return {@link #identifier} (A unique identifier assigned to this explanation of benefit.) 15734 */ 15735 public List<Identifier> getIdentifier() { 15736 if (this.identifier == null) 15737 this.identifier = new ArrayList<Identifier>(); 15738 return this.identifier; 15739 } 15740 15741 /** 15742 * @return Returns a reference to <code>this</code> for easy method chaining 15743 */ 15744 public ExplanationOfBenefit setIdentifier(List<Identifier> theIdentifier) { 15745 this.identifier = theIdentifier; 15746 return this; 15747 } 15748 15749 public boolean hasIdentifier() { 15750 if (this.identifier == null) 15751 return false; 15752 for (Identifier item : this.identifier) 15753 if (!item.isEmpty()) 15754 return true; 15755 return false; 15756 } 15757 15758 public Identifier addIdentifier() { //3 15759 Identifier t = new Identifier(); 15760 if (this.identifier == null) 15761 this.identifier = new ArrayList<Identifier>(); 15762 this.identifier.add(t); 15763 return t; 15764 } 15765 15766 public ExplanationOfBenefit addIdentifier(Identifier t) { //3 15767 if (t == null) 15768 return this; 15769 if (this.identifier == null) 15770 this.identifier = new ArrayList<Identifier>(); 15771 this.identifier.add(t); 15772 return this; 15773 } 15774 15775 /** 15776 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 15777 */ 15778 public Identifier getIdentifierFirstRep() { 15779 if (getIdentifier().isEmpty()) { 15780 addIdentifier(); 15781 } 15782 return getIdentifier().get(0); 15783 } 15784 15785 /** 15786 * @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.) 15787 */ 15788 public List<Identifier> getTraceNumber() { 15789 if (this.traceNumber == null) 15790 this.traceNumber = new ArrayList<Identifier>(); 15791 return this.traceNumber; 15792 } 15793 15794 /** 15795 * @return Returns a reference to <code>this</code> for easy method chaining 15796 */ 15797 public ExplanationOfBenefit setTraceNumber(List<Identifier> theTraceNumber) { 15798 this.traceNumber = theTraceNumber; 15799 return this; 15800 } 15801 15802 public boolean hasTraceNumber() { 15803 if (this.traceNumber == null) 15804 return false; 15805 for (Identifier item : this.traceNumber) 15806 if (!item.isEmpty()) 15807 return true; 15808 return false; 15809 } 15810 15811 public Identifier addTraceNumber() { //3 15812 Identifier t = new Identifier(); 15813 if (this.traceNumber == null) 15814 this.traceNumber = new ArrayList<Identifier>(); 15815 this.traceNumber.add(t); 15816 return t; 15817 } 15818 15819 public ExplanationOfBenefit addTraceNumber(Identifier t) { //3 15820 if (t == null) 15821 return this; 15822 if (this.traceNumber == null) 15823 this.traceNumber = new ArrayList<Identifier>(); 15824 this.traceNumber.add(t); 15825 return this; 15826 } 15827 15828 /** 15829 * @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3} 15830 */ 15831 public Identifier getTraceNumberFirstRep() { 15832 if (getTraceNumber().isEmpty()) { 15833 addTraceNumber(); 15834 } 15835 return getTraceNumber().get(0); 15836 } 15837 15838 /** 15839 * @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 15840 */ 15841 public Enumeration<ExplanationOfBenefitStatus> getStatusElement() { 15842 if (this.status == null) 15843 if (Configuration.errorOnAutoCreate()) 15844 throw new Error("Attempt to auto-create ExplanationOfBenefit.status"); 15845 else if (Configuration.doAutoCreate()) 15846 this.status = new Enumeration<ExplanationOfBenefitStatus>(new ExplanationOfBenefitStatusEnumFactory()); // bb 15847 return this.status; 15848 } 15849 15850 public boolean hasStatusElement() { 15851 return this.status != null && !this.status.isEmpty(); 15852 } 15853 15854 public boolean hasStatus() { 15855 return this.status != null && !this.status.isEmpty(); 15856 } 15857 15858 /** 15859 * @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 15860 */ 15861 public ExplanationOfBenefit setStatusElement(Enumeration<ExplanationOfBenefitStatus> value) { 15862 this.status = value; 15863 return this; 15864 } 15865 15866 /** 15867 * @return The status of the resource instance. 15868 */ 15869 public ExplanationOfBenefitStatus getStatus() { 15870 return this.status == null ? null : this.status.getValue(); 15871 } 15872 15873 /** 15874 * @param value The status of the resource instance. 15875 */ 15876 public ExplanationOfBenefit setStatus(ExplanationOfBenefitStatus value) { 15877 if (this.status == null) 15878 this.status = new Enumeration<ExplanationOfBenefitStatus>(new ExplanationOfBenefitStatusEnumFactory()); 15879 this.status.setValue(value); 15880 return this; 15881 } 15882 15883 /** 15884 * @return {@link #type} (The category of claim, e.g. oral, pharmacy, vision, institutional, professional.) 15885 */ 15886 public CodeableConcept getType() { 15887 if (this.type == null) 15888 if (Configuration.errorOnAutoCreate()) 15889 throw new Error("Attempt to auto-create ExplanationOfBenefit.type"); 15890 else if (Configuration.doAutoCreate()) 15891 this.type = new CodeableConcept(); // cc 15892 return this.type; 15893 } 15894 15895 public boolean hasType() { 15896 return this.type != null && !this.type.isEmpty(); 15897 } 15898 15899 /** 15900 * @param value {@link #type} (The category of claim, e.g. oral, pharmacy, vision, institutional, professional.) 15901 */ 15902 public ExplanationOfBenefit setType(CodeableConcept value) { 15903 this.type = value; 15904 return this; 15905 } 15906 15907 /** 15908 * @return {@link #subType} (A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.) 15909 */ 15910 public CodeableConcept getSubType() { 15911 if (this.subType == null) 15912 if (Configuration.errorOnAutoCreate()) 15913 throw new Error("Attempt to auto-create ExplanationOfBenefit.subType"); 15914 else if (Configuration.doAutoCreate()) 15915 this.subType = new CodeableConcept(); // cc 15916 return this.subType; 15917 } 15918 15919 public boolean hasSubType() { 15920 return this.subType != null && !this.subType.isEmpty(); 15921 } 15922 15923 /** 15924 * @param value {@link #subType} (A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.) 15925 */ 15926 public ExplanationOfBenefit setSubType(CodeableConcept value) { 15927 this.subType = value; 15928 return this; 15929 } 15930 15931 /** 15932 * @return {@link #use} (A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 15933 */ 15934 public Enumeration<Use> getUseElement() { 15935 if (this.use == null) 15936 if (Configuration.errorOnAutoCreate()) 15937 throw new Error("Attempt to auto-create ExplanationOfBenefit.use"); 15938 else if (Configuration.doAutoCreate()) 15939 this.use = new Enumeration<Use>(new UseEnumFactory()); // bb 15940 return this.use; 15941 } 15942 15943 public boolean hasUseElement() { 15944 return this.use != null && !this.use.isEmpty(); 15945 } 15946 15947 public boolean hasUse() { 15948 return this.use != null && !this.use.isEmpty(); 15949 } 15950 15951 /** 15952 * @param value {@link #use} (A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 15953 */ 15954 public ExplanationOfBenefit setUseElement(Enumeration<Use> value) { 15955 this.use = value; 15956 return this; 15957 } 15958 15959 /** 15960 * @return A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided. 15961 */ 15962 public Use getUse() { 15963 return this.use == null ? null : this.use.getValue(); 15964 } 15965 15966 /** 15967 * @param value A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided. 15968 */ 15969 public ExplanationOfBenefit setUse(Use value) { 15970 if (this.use == null) 15971 this.use = new Enumeration<Use>(new UseEnumFactory()); 15972 this.use.setValue(value); 15973 return this; 15974 } 15975 15976 /** 15977 * @return {@link #patient} (The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.) 15978 */ 15979 public Reference getPatient() { 15980 if (this.patient == null) 15981 if (Configuration.errorOnAutoCreate()) 15982 throw new Error("Attempt to auto-create ExplanationOfBenefit.patient"); 15983 else if (Configuration.doAutoCreate()) 15984 this.patient = new Reference(); // cc 15985 return this.patient; 15986 } 15987 15988 public boolean hasPatient() { 15989 return this.patient != null && !this.patient.isEmpty(); 15990 } 15991 15992 /** 15993 * @param value {@link #patient} (The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.) 15994 */ 15995 public ExplanationOfBenefit setPatient(Reference value) { 15996 this.patient = value; 15997 return this; 15998 } 15999 16000 /** 16001 * @return {@link #billablePeriod} (The period for which charges are being submitted.) 16002 */ 16003 public Period getBillablePeriod() { 16004 if (this.billablePeriod == null) 16005 if (Configuration.errorOnAutoCreate()) 16006 throw new Error("Attempt to auto-create ExplanationOfBenefit.billablePeriod"); 16007 else if (Configuration.doAutoCreate()) 16008 this.billablePeriod = new Period(); // cc 16009 return this.billablePeriod; 16010 } 16011 16012 public boolean hasBillablePeriod() { 16013 return this.billablePeriod != null && !this.billablePeriod.isEmpty(); 16014 } 16015 16016 /** 16017 * @param value {@link #billablePeriod} (The period for which charges are being submitted.) 16018 */ 16019 public ExplanationOfBenefit setBillablePeriod(Period value) { 16020 this.billablePeriod = value; 16021 return this; 16022 } 16023 16024 /** 16025 * @return {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 16026 */ 16027 public DateTimeType getCreatedElement() { 16028 if (this.created == null) 16029 if (Configuration.errorOnAutoCreate()) 16030 throw new Error("Attempt to auto-create ExplanationOfBenefit.created"); 16031 else if (Configuration.doAutoCreate()) 16032 this.created = new DateTimeType(); // bb 16033 return this.created; 16034 } 16035 16036 public boolean hasCreatedElement() { 16037 return this.created != null && !this.created.isEmpty(); 16038 } 16039 16040 public boolean hasCreated() { 16041 return this.created != null && !this.created.isEmpty(); 16042 } 16043 16044 /** 16045 * @param value {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 16046 */ 16047 public ExplanationOfBenefit setCreatedElement(DateTimeType value) { 16048 this.created = value; 16049 return this; 16050 } 16051 16052 /** 16053 * @return The date this resource was created. 16054 */ 16055 public Date getCreated() { 16056 return this.created == null ? null : this.created.getValue(); 16057 } 16058 16059 /** 16060 * @param value The date this resource was created. 16061 */ 16062 public ExplanationOfBenefit setCreated(Date value) { 16063 if (this.created == null) 16064 this.created = new DateTimeType(); 16065 this.created.setValue(value); 16066 return this; 16067 } 16068 16069 /** 16070 * @return {@link #enterer} (Individual who created the claim, predetermination or preauthorization.) 16071 */ 16072 public Reference getEnterer() { 16073 if (this.enterer == null) 16074 if (Configuration.errorOnAutoCreate()) 16075 throw new Error("Attempt to auto-create ExplanationOfBenefit.enterer"); 16076 else if (Configuration.doAutoCreate()) 16077 this.enterer = new Reference(); // cc 16078 return this.enterer; 16079 } 16080 16081 public boolean hasEnterer() { 16082 return this.enterer != null && !this.enterer.isEmpty(); 16083 } 16084 16085 /** 16086 * @param value {@link #enterer} (Individual who created the claim, predetermination or preauthorization.) 16087 */ 16088 public ExplanationOfBenefit setEnterer(Reference value) { 16089 this.enterer = value; 16090 return this; 16091 } 16092 16093 /** 16094 * @return {@link #insurer} (The party responsible for authorization, adjudication and reimbursement.) 16095 */ 16096 public Reference getInsurer() { 16097 if (this.insurer == null) 16098 if (Configuration.errorOnAutoCreate()) 16099 throw new Error("Attempt to auto-create ExplanationOfBenefit.insurer"); 16100 else if (Configuration.doAutoCreate()) 16101 this.insurer = new Reference(); // cc 16102 return this.insurer; 16103 } 16104 16105 public boolean hasInsurer() { 16106 return this.insurer != null && !this.insurer.isEmpty(); 16107 } 16108 16109 /** 16110 * @param value {@link #insurer} (The party responsible for authorization, adjudication and reimbursement.) 16111 */ 16112 public ExplanationOfBenefit setInsurer(Reference value) { 16113 this.insurer = value; 16114 return this; 16115 } 16116 16117 /** 16118 * @return {@link #provider} (The provider which is responsible for the claim, predetermination or preauthorization.) 16119 */ 16120 public Reference getProvider() { 16121 if (this.provider == null) 16122 if (Configuration.errorOnAutoCreate()) 16123 throw new Error("Attempt to auto-create ExplanationOfBenefit.provider"); 16124 else if (Configuration.doAutoCreate()) 16125 this.provider = new Reference(); // cc 16126 return this.provider; 16127 } 16128 16129 public boolean hasProvider() { 16130 return this.provider != null && !this.provider.isEmpty(); 16131 } 16132 16133 /** 16134 * @param value {@link #provider} (The provider which is responsible for the claim, predetermination or preauthorization.) 16135 */ 16136 public ExplanationOfBenefit setProvider(Reference value) { 16137 this.provider = value; 16138 return this; 16139 } 16140 16141 /** 16142 * @return {@link #priority} (The provider-required urgency of processing the request. Typical values include: stat, normal deferred.) 16143 */ 16144 public CodeableConcept getPriority() { 16145 if (this.priority == null) 16146 if (Configuration.errorOnAutoCreate()) 16147 throw new Error("Attempt to auto-create ExplanationOfBenefit.priority"); 16148 else if (Configuration.doAutoCreate()) 16149 this.priority = new CodeableConcept(); // cc 16150 return this.priority; 16151 } 16152 16153 public boolean hasPriority() { 16154 return this.priority != null && !this.priority.isEmpty(); 16155 } 16156 16157 /** 16158 * @param value {@link #priority} (The provider-required urgency of processing the request. Typical values include: stat, normal deferred.) 16159 */ 16160 public ExplanationOfBenefit setPriority(CodeableConcept value) { 16161 this.priority = value; 16162 return this; 16163 } 16164 16165 /** 16166 * @return {@link #fundsReserveRequested} (A code to indicate whether and for whom funds are to be reserved for future claims.) 16167 */ 16168 public CodeableConcept getFundsReserveRequested() { 16169 if (this.fundsReserveRequested == null) 16170 if (Configuration.errorOnAutoCreate()) 16171 throw new Error("Attempt to auto-create ExplanationOfBenefit.fundsReserveRequested"); 16172 else if (Configuration.doAutoCreate()) 16173 this.fundsReserveRequested = new CodeableConcept(); // cc 16174 return this.fundsReserveRequested; 16175 } 16176 16177 public boolean hasFundsReserveRequested() { 16178 return this.fundsReserveRequested != null && !this.fundsReserveRequested.isEmpty(); 16179 } 16180 16181 /** 16182 * @param value {@link #fundsReserveRequested} (A code to indicate whether and for whom funds are to be reserved for future claims.) 16183 */ 16184 public ExplanationOfBenefit setFundsReserveRequested(CodeableConcept value) { 16185 this.fundsReserveRequested = value; 16186 return this; 16187 } 16188 16189 /** 16190 * @return {@link #fundsReserve} (A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.) 16191 */ 16192 public CodeableConcept getFundsReserve() { 16193 if (this.fundsReserve == null) 16194 if (Configuration.errorOnAutoCreate()) 16195 throw new Error("Attempt to auto-create ExplanationOfBenefit.fundsReserve"); 16196 else if (Configuration.doAutoCreate()) 16197 this.fundsReserve = new CodeableConcept(); // cc 16198 return this.fundsReserve; 16199 } 16200 16201 public boolean hasFundsReserve() { 16202 return this.fundsReserve != null && !this.fundsReserve.isEmpty(); 16203 } 16204 16205 /** 16206 * @param value {@link #fundsReserve} (A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.) 16207 */ 16208 public ExplanationOfBenefit setFundsReserve(CodeableConcept value) { 16209 this.fundsReserve = value; 16210 return this; 16211 } 16212 16213 /** 16214 * @return {@link #related} (Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.) 16215 */ 16216 public List<RelatedClaimComponent> getRelated() { 16217 if (this.related == null) 16218 this.related = new ArrayList<RelatedClaimComponent>(); 16219 return this.related; 16220 } 16221 16222 /** 16223 * @return Returns a reference to <code>this</code> for easy method chaining 16224 */ 16225 public ExplanationOfBenefit setRelated(List<RelatedClaimComponent> theRelated) { 16226 this.related = theRelated; 16227 return this; 16228 } 16229 16230 public boolean hasRelated() { 16231 if (this.related == null) 16232 return false; 16233 for (RelatedClaimComponent item : this.related) 16234 if (!item.isEmpty()) 16235 return true; 16236 return false; 16237 } 16238 16239 public RelatedClaimComponent addRelated() { //3 16240 RelatedClaimComponent t = new RelatedClaimComponent(); 16241 if (this.related == null) 16242 this.related = new ArrayList<RelatedClaimComponent>(); 16243 this.related.add(t); 16244 return t; 16245 } 16246 16247 public ExplanationOfBenefit addRelated(RelatedClaimComponent t) { //3 16248 if (t == null) 16249 return this; 16250 if (this.related == null) 16251 this.related = new ArrayList<RelatedClaimComponent>(); 16252 this.related.add(t); 16253 return this; 16254 } 16255 16256 /** 16257 * @return The first repetition of repeating field {@link #related}, creating it if it does not already exist {3} 16258 */ 16259 public RelatedClaimComponent getRelatedFirstRep() { 16260 if (getRelated().isEmpty()) { 16261 addRelated(); 16262 } 16263 return getRelated().get(0); 16264 } 16265 16266 /** 16267 * @return {@link #prescription} (Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.) 16268 */ 16269 public Reference getPrescription() { 16270 if (this.prescription == null) 16271 if (Configuration.errorOnAutoCreate()) 16272 throw new Error("Attempt to auto-create ExplanationOfBenefit.prescription"); 16273 else if (Configuration.doAutoCreate()) 16274 this.prescription = new Reference(); // cc 16275 return this.prescription; 16276 } 16277 16278 public boolean hasPrescription() { 16279 return this.prescription != null && !this.prescription.isEmpty(); 16280 } 16281 16282 /** 16283 * @param value {@link #prescription} (Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.) 16284 */ 16285 public ExplanationOfBenefit setPrescription(Reference value) { 16286 this.prescription = value; 16287 return this; 16288 } 16289 16290 /** 16291 * @return {@link #originalPrescription} (Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.) 16292 */ 16293 public Reference getOriginalPrescription() { 16294 if (this.originalPrescription == null) 16295 if (Configuration.errorOnAutoCreate()) 16296 throw new Error("Attempt to auto-create ExplanationOfBenefit.originalPrescription"); 16297 else if (Configuration.doAutoCreate()) 16298 this.originalPrescription = new Reference(); // cc 16299 return this.originalPrescription; 16300 } 16301 16302 public boolean hasOriginalPrescription() { 16303 return this.originalPrescription != null && !this.originalPrescription.isEmpty(); 16304 } 16305 16306 /** 16307 * @param value {@link #originalPrescription} (Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.) 16308 */ 16309 public ExplanationOfBenefit setOriginalPrescription(Reference value) { 16310 this.originalPrescription = value; 16311 return this; 16312 } 16313 16314 /** 16315 * @return {@link #event} (Information code for an event with a corresponding date or period.) 16316 */ 16317 public List<ExplanationOfBenefitEventComponent> getEvent() { 16318 if (this.event == null) 16319 this.event = new ArrayList<ExplanationOfBenefitEventComponent>(); 16320 return this.event; 16321 } 16322 16323 /** 16324 * @return Returns a reference to <code>this</code> for easy method chaining 16325 */ 16326 public ExplanationOfBenefit setEvent(List<ExplanationOfBenefitEventComponent> theEvent) { 16327 this.event = theEvent; 16328 return this; 16329 } 16330 16331 public boolean hasEvent() { 16332 if (this.event == null) 16333 return false; 16334 for (ExplanationOfBenefitEventComponent item : this.event) 16335 if (!item.isEmpty()) 16336 return true; 16337 return false; 16338 } 16339 16340 public ExplanationOfBenefitEventComponent addEvent() { //3 16341 ExplanationOfBenefitEventComponent t = new ExplanationOfBenefitEventComponent(); 16342 if (this.event == null) 16343 this.event = new ArrayList<ExplanationOfBenefitEventComponent>(); 16344 this.event.add(t); 16345 return t; 16346 } 16347 16348 public ExplanationOfBenefit addEvent(ExplanationOfBenefitEventComponent t) { //3 16349 if (t == null) 16350 return this; 16351 if (this.event == null) 16352 this.event = new ArrayList<ExplanationOfBenefitEventComponent>(); 16353 this.event.add(t); 16354 return this; 16355 } 16356 16357 /** 16358 * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist {3} 16359 */ 16360 public ExplanationOfBenefitEventComponent getEventFirstRep() { 16361 if (getEvent().isEmpty()) { 16362 addEvent(); 16363 } 16364 return getEvent().get(0); 16365 } 16366 16367 /** 16368 * @return {@link #payee} (The party to be reimbursed for cost of the products and services according to the terms of the policy.) 16369 */ 16370 public PayeeComponent getPayee() { 16371 if (this.payee == null) 16372 if (Configuration.errorOnAutoCreate()) 16373 throw new Error("Attempt to auto-create ExplanationOfBenefit.payee"); 16374 else if (Configuration.doAutoCreate()) 16375 this.payee = new PayeeComponent(); // cc 16376 return this.payee; 16377 } 16378 16379 public boolean hasPayee() { 16380 return this.payee != null && !this.payee.isEmpty(); 16381 } 16382 16383 /** 16384 * @param value {@link #payee} (The party to be reimbursed for cost of the products and services according to the terms of the policy.) 16385 */ 16386 public ExplanationOfBenefit setPayee(PayeeComponent value) { 16387 this.payee = value; 16388 return this; 16389 } 16390 16391 /** 16392 * @return {@link #referral} (The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.) 16393 */ 16394 public Reference getReferral() { 16395 if (this.referral == null) 16396 if (Configuration.errorOnAutoCreate()) 16397 throw new Error("Attempt to auto-create ExplanationOfBenefit.referral"); 16398 else if (Configuration.doAutoCreate()) 16399 this.referral = new Reference(); // cc 16400 return this.referral; 16401 } 16402 16403 public boolean hasReferral() { 16404 return this.referral != null && !this.referral.isEmpty(); 16405 } 16406 16407 /** 16408 * @param value {@link #referral} (The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.) 16409 */ 16410 public ExplanationOfBenefit setReferral(Reference value) { 16411 this.referral = value; 16412 return this; 16413 } 16414 16415 /** 16416 * @return {@link #encounter} (Healthcare encounters related to this claim.) 16417 */ 16418 public List<Reference> getEncounter() { 16419 if (this.encounter == null) 16420 this.encounter = new ArrayList<Reference>(); 16421 return this.encounter; 16422 } 16423 16424 /** 16425 * @return Returns a reference to <code>this</code> for easy method chaining 16426 */ 16427 public ExplanationOfBenefit setEncounter(List<Reference> theEncounter) { 16428 this.encounter = theEncounter; 16429 return this; 16430 } 16431 16432 public boolean hasEncounter() { 16433 if (this.encounter == null) 16434 return false; 16435 for (Reference item : this.encounter) 16436 if (!item.isEmpty()) 16437 return true; 16438 return false; 16439 } 16440 16441 public Reference addEncounter() { //3 16442 Reference t = new Reference(); 16443 if (this.encounter == null) 16444 this.encounter = new ArrayList<Reference>(); 16445 this.encounter.add(t); 16446 return t; 16447 } 16448 16449 public ExplanationOfBenefit addEncounter(Reference t) { //3 16450 if (t == null) 16451 return this; 16452 if (this.encounter == null) 16453 this.encounter = new ArrayList<Reference>(); 16454 this.encounter.add(t); 16455 return this; 16456 } 16457 16458 /** 16459 * @return The first repetition of repeating field {@link #encounter}, creating it if it does not already exist {3} 16460 */ 16461 public Reference getEncounterFirstRep() { 16462 if (getEncounter().isEmpty()) { 16463 addEncounter(); 16464 } 16465 return getEncounter().get(0); 16466 } 16467 16468 /** 16469 * @return {@link #facility} (Facility where the services were provided.) 16470 */ 16471 public Reference getFacility() { 16472 if (this.facility == null) 16473 if (Configuration.errorOnAutoCreate()) 16474 throw new Error("Attempt to auto-create ExplanationOfBenefit.facility"); 16475 else if (Configuration.doAutoCreate()) 16476 this.facility = new Reference(); // cc 16477 return this.facility; 16478 } 16479 16480 public boolean hasFacility() { 16481 return this.facility != null && !this.facility.isEmpty(); 16482 } 16483 16484 /** 16485 * @param value {@link #facility} (Facility where the services were provided.) 16486 */ 16487 public ExplanationOfBenefit setFacility(Reference value) { 16488 this.facility = value; 16489 return this; 16490 } 16491 16492 /** 16493 * @return {@link #claim} (The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.) 16494 */ 16495 public Reference getClaim() { 16496 if (this.claim == null) 16497 if (Configuration.errorOnAutoCreate()) 16498 throw new Error("Attempt to auto-create ExplanationOfBenefit.claim"); 16499 else if (Configuration.doAutoCreate()) 16500 this.claim = new Reference(); // cc 16501 return this.claim; 16502 } 16503 16504 public boolean hasClaim() { 16505 return this.claim != null && !this.claim.isEmpty(); 16506 } 16507 16508 /** 16509 * @param value {@link #claim} (The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.) 16510 */ 16511 public ExplanationOfBenefit setClaim(Reference value) { 16512 this.claim = value; 16513 return this; 16514 } 16515 16516 /** 16517 * @return {@link #claimResponse} (The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.) 16518 */ 16519 public Reference getClaimResponse() { 16520 if (this.claimResponse == null) 16521 if (Configuration.errorOnAutoCreate()) 16522 throw new Error("Attempt to auto-create ExplanationOfBenefit.claimResponse"); 16523 else if (Configuration.doAutoCreate()) 16524 this.claimResponse = new Reference(); // cc 16525 return this.claimResponse; 16526 } 16527 16528 public boolean hasClaimResponse() { 16529 return this.claimResponse != null && !this.claimResponse.isEmpty(); 16530 } 16531 16532 /** 16533 * @param value {@link #claimResponse} (The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.) 16534 */ 16535 public ExplanationOfBenefit setClaimResponse(Reference value) { 16536 this.claimResponse = value; 16537 return this; 16538 } 16539 16540 /** 16541 * @return {@link #outcome} (The outcome of the claim, predetermination, or preauthorization processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 16542 */ 16543 public Enumeration<ClaimProcessingCodes> getOutcomeElement() { 16544 if (this.outcome == null) 16545 if (Configuration.errorOnAutoCreate()) 16546 throw new Error("Attempt to auto-create ExplanationOfBenefit.outcome"); 16547 else if (Configuration.doAutoCreate()) 16548 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); // bb 16549 return this.outcome; 16550 } 16551 16552 public boolean hasOutcomeElement() { 16553 return this.outcome != null && !this.outcome.isEmpty(); 16554 } 16555 16556 public boolean hasOutcome() { 16557 return this.outcome != null && !this.outcome.isEmpty(); 16558 } 16559 16560 /** 16561 * @param value {@link #outcome} (The outcome of the claim, predetermination, or preauthorization processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 16562 */ 16563 public ExplanationOfBenefit setOutcomeElement(Enumeration<ClaimProcessingCodes> value) { 16564 this.outcome = value; 16565 return this; 16566 } 16567 16568 /** 16569 * @return The outcome of the claim, predetermination, or preauthorization processing. 16570 */ 16571 public ClaimProcessingCodes getOutcome() { 16572 return this.outcome == null ? null : this.outcome.getValue(); 16573 } 16574 16575 /** 16576 * @param value The outcome of the claim, predetermination, or preauthorization processing. 16577 */ 16578 public ExplanationOfBenefit setOutcome(ClaimProcessingCodes value) { 16579 if (this.outcome == null) 16580 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); 16581 this.outcome.setValue(value); 16582 return this; 16583 } 16584 16585 /** 16586 * @return {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.) 16587 */ 16588 public CodeableConcept getDecision() { 16589 if (this.decision == null) 16590 if (Configuration.errorOnAutoCreate()) 16591 throw new Error("Attempt to auto-create ExplanationOfBenefit.decision"); 16592 else if (Configuration.doAutoCreate()) 16593 this.decision = new CodeableConcept(); // cc 16594 return this.decision; 16595 } 16596 16597 public boolean hasDecision() { 16598 return this.decision != null && !this.decision.isEmpty(); 16599 } 16600 16601 /** 16602 * @param value {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.) 16603 */ 16604 public ExplanationOfBenefit setDecision(CodeableConcept value) { 16605 this.decision = value; 16606 return this; 16607 } 16608 16609 /** 16610 * @return {@link #disposition} (A human readable description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 16611 */ 16612 public StringType getDispositionElement() { 16613 if (this.disposition == null) 16614 if (Configuration.errorOnAutoCreate()) 16615 throw new Error("Attempt to auto-create ExplanationOfBenefit.disposition"); 16616 else if (Configuration.doAutoCreate()) 16617 this.disposition = new StringType(); // bb 16618 return this.disposition; 16619 } 16620 16621 public boolean hasDispositionElement() { 16622 return this.disposition != null && !this.disposition.isEmpty(); 16623 } 16624 16625 public boolean hasDisposition() { 16626 return this.disposition != null && !this.disposition.isEmpty(); 16627 } 16628 16629 /** 16630 * @param value {@link #disposition} (A human readable description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 16631 */ 16632 public ExplanationOfBenefit setDispositionElement(StringType value) { 16633 this.disposition = value; 16634 return this; 16635 } 16636 16637 /** 16638 * @return A human readable description of the status of the adjudication. 16639 */ 16640 public String getDisposition() { 16641 return this.disposition == null ? null : this.disposition.getValue(); 16642 } 16643 16644 /** 16645 * @param value A human readable description of the status of the adjudication. 16646 */ 16647 public ExplanationOfBenefit setDisposition(String value) { 16648 if (Utilities.noString(value)) 16649 this.disposition = null; 16650 else { 16651 if (this.disposition == null) 16652 this.disposition = new StringType(); 16653 this.disposition.setValue(value); 16654 } 16655 return this; 16656 } 16657 16658 /** 16659 * @return {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.) 16660 */ 16661 public List<StringType> getPreAuthRef() { 16662 if (this.preAuthRef == null) 16663 this.preAuthRef = new ArrayList<StringType>(); 16664 return this.preAuthRef; 16665 } 16666 16667 /** 16668 * @return Returns a reference to <code>this</code> for easy method chaining 16669 */ 16670 public ExplanationOfBenefit setPreAuthRef(List<StringType> thePreAuthRef) { 16671 this.preAuthRef = thePreAuthRef; 16672 return this; 16673 } 16674 16675 public boolean hasPreAuthRef() { 16676 if (this.preAuthRef == null) 16677 return false; 16678 for (StringType item : this.preAuthRef) 16679 if (!item.isEmpty()) 16680 return true; 16681 return false; 16682 } 16683 16684 /** 16685 * @return {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.) 16686 */ 16687 public StringType addPreAuthRefElement() {//2 16688 StringType t = new StringType(); 16689 if (this.preAuthRef == null) 16690 this.preAuthRef = new ArrayList<StringType>(); 16691 this.preAuthRef.add(t); 16692 return t; 16693 } 16694 16695 /** 16696 * @param value {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.) 16697 */ 16698 public ExplanationOfBenefit addPreAuthRef(String value) { //1 16699 StringType t = new StringType(); 16700 t.setValue(value); 16701 if (this.preAuthRef == null) 16702 this.preAuthRef = new ArrayList<StringType>(); 16703 this.preAuthRef.add(t); 16704 return this; 16705 } 16706 16707 /** 16708 * @param value {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.) 16709 */ 16710 public boolean hasPreAuthRef(String value) { 16711 if (this.preAuthRef == null) 16712 return false; 16713 for (StringType v : this.preAuthRef) 16714 if (v.getValue().equals(value)) // string 16715 return true; 16716 return false; 16717 } 16718 16719 /** 16720 * @return {@link #preAuthRefPeriod} (The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.) 16721 */ 16722 public List<Period> getPreAuthRefPeriod() { 16723 if (this.preAuthRefPeriod == null) 16724 this.preAuthRefPeriod = new ArrayList<Period>(); 16725 return this.preAuthRefPeriod; 16726 } 16727 16728 /** 16729 * @return Returns a reference to <code>this</code> for easy method chaining 16730 */ 16731 public ExplanationOfBenefit setPreAuthRefPeriod(List<Period> thePreAuthRefPeriod) { 16732 this.preAuthRefPeriod = thePreAuthRefPeriod; 16733 return this; 16734 } 16735 16736 public boolean hasPreAuthRefPeriod() { 16737 if (this.preAuthRefPeriod == null) 16738 return false; 16739 for (Period item : this.preAuthRefPeriod) 16740 if (!item.isEmpty()) 16741 return true; 16742 return false; 16743 } 16744 16745 public Period addPreAuthRefPeriod() { //3 16746 Period t = new Period(); 16747 if (this.preAuthRefPeriod == null) 16748 this.preAuthRefPeriod = new ArrayList<Period>(); 16749 this.preAuthRefPeriod.add(t); 16750 return t; 16751 } 16752 16753 public ExplanationOfBenefit addPreAuthRefPeriod(Period t) { //3 16754 if (t == null) 16755 return this; 16756 if (this.preAuthRefPeriod == null) 16757 this.preAuthRefPeriod = new ArrayList<Period>(); 16758 this.preAuthRefPeriod.add(t); 16759 return this; 16760 } 16761 16762 /** 16763 * @return The first repetition of repeating field {@link #preAuthRefPeriod}, creating it if it does not already exist {3} 16764 */ 16765 public Period getPreAuthRefPeriodFirstRep() { 16766 if (getPreAuthRefPeriod().isEmpty()) { 16767 addPreAuthRefPeriod(); 16768 } 16769 return getPreAuthRefPeriod().get(0); 16770 } 16771 16772 /** 16773 * @return {@link #diagnosisRelatedGroup} (A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.) 16774 */ 16775 public CodeableConcept getDiagnosisRelatedGroup() { 16776 if (this.diagnosisRelatedGroup == null) 16777 if (Configuration.errorOnAutoCreate()) 16778 throw new Error("Attempt to auto-create ExplanationOfBenefit.diagnosisRelatedGroup"); 16779 else if (Configuration.doAutoCreate()) 16780 this.diagnosisRelatedGroup = new CodeableConcept(); // cc 16781 return this.diagnosisRelatedGroup; 16782 } 16783 16784 public boolean hasDiagnosisRelatedGroup() { 16785 return this.diagnosisRelatedGroup != null && !this.diagnosisRelatedGroup.isEmpty(); 16786 } 16787 16788 /** 16789 * @param value {@link #diagnosisRelatedGroup} (A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.) 16790 */ 16791 public ExplanationOfBenefit setDiagnosisRelatedGroup(CodeableConcept value) { 16792 this.diagnosisRelatedGroup = value; 16793 return this; 16794 } 16795 16796 /** 16797 * @return {@link #careTeam} (The members of the team who provided the products and services.) 16798 */ 16799 public List<CareTeamComponent> getCareTeam() { 16800 if (this.careTeam == null) 16801 this.careTeam = new ArrayList<CareTeamComponent>(); 16802 return this.careTeam; 16803 } 16804 16805 /** 16806 * @return Returns a reference to <code>this</code> for easy method chaining 16807 */ 16808 public ExplanationOfBenefit setCareTeam(List<CareTeamComponent> theCareTeam) { 16809 this.careTeam = theCareTeam; 16810 return this; 16811 } 16812 16813 public boolean hasCareTeam() { 16814 if (this.careTeam == null) 16815 return false; 16816 for (CareTeamComponent item : this.careTeam) 16817 if (!item.isEmpty()) 16818 return true; 16819 return false; 16820 } 16821 16822 public CareTeamComponent addCareTeam() { //3 16823 CareTeamComponent t = new CareTeamComponent(); 16824 if (this.careTeam == null) 16825 this.careTeam = new ArrayList<CareTeamComponent>(); 16826 this.careTeam.add(t); 16827 return t; 16828 } 16829 16830 public ExplanationOfBenefit addCareTeam(CareTeamComponent t) { //3 16831 if (t == null) 16832 return this; 16833 if (this.careTeam == null) 16834 this.careTeam = new ArrayList<CareTeamComponent>(); 16835 this.careTeam.add(t); 16836 return this; 16837 } 16838 16839 /** 16840 * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3} 16841 */ 16842 public CareTeamComponent getCareTeamFirstRep() { 16843 if (getCareTeam().isEmpty()) { 16844 addCareTeam(); 16845 } 16846 return getCareTeam().get(0); 16847 } 16848 16849 /** 16850 * @return {@link #supportingInfo} (Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.) 16851 */ 16852 public List<SupportingInformationComponent> getSupportingInfo() { 16853 if (this.supportingInfo == null) 16854 this.supportingInfo = new ArrayList<SupportingInformationComponent>(); 16855 return this.supportingInfo; 16856 } 16857 16858 /** 16859 * @return Returns a reference to <code>this</code> for easy method chaining 16860 */ 16861 public ExplanationOfBenefit setSupportingInfo(List<SupportingInformationComponent> theSupportingInfo) { 16862 this.supportingInfo = theSupportingInfo; 16863 return this; 16864 } 16865 16866 public boolean hasSupportingInfo() { 16867 if (this.supportingInfo == null) 16868 return false; 16869 for (SupportingInformationComponent item : this.supportingInfo) 16870 if (!item.isEmpty()) 16871 return true; 16872 return false; 16873 } 16874 16875 public SupportingInformationComponent addSupportingInfo() { //3 16876 SupportingInformationComponent t = new SupportingInformationComponent(); 16877 if (this.supportingInfo == null) 16878 this.supportingInfo = new ArrayList<SupportingInformationComponent>(); 16879 this.supportingInfo.add(t); 16880 return t; 16881 } 16882 16883 public ExplanationOfBenefit addSupportingInfo(SupportingInformationComponent t) { //3 16884 if (t == null) 16885 return this; 16886 if (this.supportingInfo == null) 16887 this.supportingInfo = new ArrayList<SupportingInformationComponent>(); 16888 this.supportingInfo.add(t); 16889 return this; 16890 } 16891 16892 /** 16893 * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3} 16894 */ 16895 public SupportingInformationComponent getSupportingInfoFirstRep() { 16896 if (getSupportingInfo().isEmpty()) { 16897 addSupportingInfo(); 16898 } 16899 return getSupportingInfo().get(0); 16900 } 16901 16902 /** 16903 * @return {@link #diagnosis} (Information about diagnoses relevant to the claim items.) 16904 */ 16905 public List<DiagnosisComponent> getDiagnosis() { 16906 if (this.diagnosis == null) 16907 this.diagnosis = new ArrayList<DiagnosisComponent>(); 16908 return this.diagnosis; 16909 } 16910 16911 /** 16912 * @return Returns a reference to <code>this</code> for easy method chaining 16913 */ 16914 public ExplanationOfBenefit setDiagnosis(List<DiagnosisComponent> theDiagnosis) { 16915 this.diagnosis = theDiagnosis; 16916 return this; 16917 } 16918 16919 public boolean hasDiagnosis() { 16920 if (this.diagnosis == null) 16921 return false; 16922 for (DiagnosisComponent item : this.diagnosis) 16923 if (!item.isEmpty()) 16924 return true; 16925 return false; 16926 } 16927 16928 public DiagnosisComponent addDiagnosis() { //3 16929 DiagnosisComponent t = new DiagnosisComponent(); 16930 if (this.diagnosis == null) 16931 this.diagnosis = new ArrayList<DiagnosisComponent>(); 16932 this.diagnosis.add(t); 16933 return t; 16934 } 16935 16936 public ExplanationOfBenefit addDiagnosis(DiagnosisComponent t) { //3 16937 if (t == null) 16938 return this; 16939 if (this.diagnosis == null) 16940 this.diagnosis = new ArrayList<DiagnosisComponent>(); 16941 this.diagnosis.add(t); 16942 return this; 16943 } 16944 16945 /** 16946 * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3} 16947 */ 16948 public DiagnosisComponent getDiagnosisFirstRep() { 16949 if (getDiagnosis().isEmpty()) { 16950 addDiagnosis(); 16951 } 16952 return getDiagnosis().get(0); 16953 } 16954 16955 /** 16956 * @return {@link #procedure} (Procedures performed on the patient relevant to the billing items with the claim.) 16957 */ 16958 public List<ProcedureComponent> getProcedure() { 16959 if (this.procedure == null) 16960 this.procedure = new ArrayList<ProcedureComponent>(); 16961 return this.procedure; 16962 } 16963 16964 /** 16965 * @return Returns a reference to <code>this</code> for easy method chaining 16966 */ 16967 public ExplanationOfBenefit setProcedure(List<ProcedureComponent> theProcedure) { 16968 this.procedure = theProcedure; 16969 return this; 16970 } 16971 16972 public boolean hasProcedure() { 16973 if (this.procedure == null) 16974 return false; 16975 for (ProcedureComponent item : this.procedure) 16976 if (!item.isEmpty()) 16977 return true; 16978 return false; 16979 } 16980 16981 public ProcedureComponent addProcedure() { //3 16982 ProcedureComponent t = new ProcedureComponent(); 16983 if (this.procedure == null) 16984 this.procedure = new ArrayList<ProcedureComponent>(); 16985 this.procedure.add(t); 16986 return t; 16987 } 16988 16989 public ExplanationOfBenefit addProcedure(ProcedureComponent t) { //3 16990 if (t == null) 16991 return this; 16992 if (this.procedure == null) 16993 this.procedure = new ArrayList<ProcedureComponent>(); 16994 this.procedure.add(t); 16995 return this; 16996 } 16997 16998 /** 16999 * @return The first repetition of repeating field {@link #procedure}, creating it if it does not already exist {3} 17000 */ 17001 public ProcedureComponent getProcedureFirstRep() { 17002 if (getProcedure().isEmpty()) { 17003 addProcedure(); 17004 } 17005 return getProcedure().get(0); 17006 } 17007 17008 /** 17009 * @return {@link #precedence} (This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.). This is the underlying object with id, value and extensions. The accessor "getPrecedence" gives direct access to the value 17010 */ 17011 public PositiveIntType getPrecedenceElement() { 17012 if (this.precedence == null) 17013 if (Configuration.errorOnAutoCreate()) 17014 throw new Error("Attempt to auto-create ExplanationOfBenefit.precedence"); 17015 else if (Configuration.doAutoCreate()) 17016 this.precedence = new PositiveIntType(); // bb 17017 return this.precedence; 17018 } 17019 17020 public boolean hasPrecedenceElement() { 17021 return this.precedence != null && !this.precedence.isEmpty(); 17022 } 17023 17024 public boolean hasPrecedence() { 17025 return this.precedence != null && !this.precedence.isEmpty(); 17026 } 17027 17028 /** 17029 * @param value {@link #precedence} (This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.). This is the underlying object with id, value and extensions. The accessor "getPrecedence" gives direct access to the value 17030 */ 17031 public ExplanationOfBenefit setPrecedenceElement(PositiveIntType value) { 17032 this.precedence = value; 17033 return this; 17034 } 17035 17036 /** 17037 * @return This indicates the relative order of a series of EOBs related to different coverages for the same suite of services. 17038 */ 17039 public int getPrecedence() { 17040 return this.precedence == null || this.precedence.isEmpty() ? 0 : this.precedence.getValue(); 17041 } 17042 17043 /** 17044 * @param value This indicates the relative order of a series of EOBs related to different coverages for the same suite of services. 17045 */ 17046 public ExplanationOfBenefit setPrecedence(int value) { 17047 if (this.precedence == null) 17048 this.precedence = new PositiveIntType(); 17049 this.precedence.setValue(value); 17050 return this; 17051 } 17052 17053 /** 17054 * @return {@link #insurance} (Financial instruments for reimbursement for the health care products and services specified on the claim.) 17055 */ 17056 public List<InsuranceComponent> getInsurance() { 17057 if (this.insurance == null) 17058 this.insurance = new ArrayList<InsuranceComponent>(); 17059 return this.insurance; 17060 } 17061 17062 /** 17063 * @return Returns a reference to <code>this</code> for easy method chaining 17064 */ 17065 public ExplanationOfBenefit setInsurance(List<InsuranceComponent> theInsurance) { 17066 this.insurance = theInsurance; 17067 return this; 17068 } 17069 17070 public boolean hasInsurance() { 17071 if (this.insurance == null) 17072 return false; 17073 for (InsuranceComponent item : this.insurance) 17074 if (!item.isEmpty()) 17075 return true; 17076 return false; 17077 } 17078 17079 public InsuranceComponent addInsurance() { //3 17080 InsuranceComponent t = new InsuranceComponent(); 17081 if (this.insurance == null) 17082 this.insurance = new ArrayList<InsuranceComponent>(); 17083 this.insurance.add(t); 17084 return t; 17085 } 17086 17087 public ExplanationOfBenefit addInsurance(InsuranceComponent t) { //3 17088 if (t == null) 17089 return this; 17090 if (this.insurance == null) 17091 this.insurance = new ArrayList<InsuranceComponent>(); 17092 this.insurance.add(t); 17093 return this; 17094 } 17095 17096 /** 17097 * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3} 17098 */ 17099 public InsuranceComponent getInsuranceFirstRep() { 17100 if (getInsurance().isEmpty()) { 17101 addInsurance(); 17102 } 17103 return getInsurance().get(0); 17104 } 17105 17106 /** 17107 * @return {@link #accident} (Details of a accident which resulted in injuries which required the products and services listed in the claim.) 17108 */ 17109 public AccidentComponent getAccident() { 17110 if (this.accident == null) 17111 if (Configuration.errorOnAutoCreate()) 17112 throw new Error("Attempt to auto-create ExplanationOfBenefit.accident"); 17113 else if (Configuration.doAutoCreate()) 17114 this.accident = new AccidentComponent(); // cc 17115 return this.accident; 17116 } 17117 17118 public boolean hasAccident() { 17119 return this.accident != null && !this.accident.isEmpty(); 17120 } 17121 17122 /** 17123 * @param value {@link #accident} (Details of a accident which resulted in injuries which required the products and services listed in the claim.) 17124 */ 17125 public ExplanationOfBenefit setAccident(AccidentComponent value) { 17126 this.accident = value; 17127 return this; 17128 } 17129 17130 /** 17131 * @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 17132 */ 17133 public Money getPatientPaid() { 17134 if (this.patientPaid == null) 17135 if (Configuration.errorOnAutoCreate()) 17136 throw new Error("Attempt to auto-create ExplanationOfBenefit.patientPaid"); 17137 else if (Configuration.doAutoCreate()) 17138 this.patientPaid = new Money(); // cc 17139 return this.patientPaid; 17140 } 17141 17142 public boolean hasPatientPaid() { 17143 return this.patientPaid != null && !this.patientPaid.isEmpty(); 17144 } 17145 17146 /** 17147 * @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.) 17148 */ 17149 public ExplanationOfBenefit setPatientPaid(Money value) { 17150 this.patientPaid = value; 17151 return this; 17152 } 17153 17154 /** 17155 * @return {@link #item} (A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.) 17156 */ 17157 public List<ItemComponent> getItem() { 17158 if (this.item == null) 17159 this.item = new ArrayList<ItemComponent>(); 17160 return this.item; 17161 } 17162 17163 /** 17164 * @return Returns a reference to <code>this</code> for easy method chaining 17165 */ 17166 public ExplanationOfBenefit setItem(List<ItemComponent> theItem) { 17167 this.item = theItem; 17168 return this; 17169 } 17170 17171 public boolean hasItem() { 17172 if (this.item == null) 17173 return false; 17174 for (ItemComponent item : this.item) 17175 if (!item.isEmpty()) 17176 return true; 17177 return false; 17178 } 17179 17180 public ItemComponent addItem() { //3 17181 ItemComponent t = new ItemComponent(); 17182 if (this.item == null) 17183 this.item = new ArrayList<ItemComponent>(); 17184 this.item.add(t); 17185 return t; 17186 } 17187 17188 public ExplanationOfBenefit addItem(ItemComponent t) { //3 17189 if (t == null) 17190 return this; 17191 if (this.item == null) 17192 this.item = new ArrayList<ItemComponent>(); 17193 this.item.add(t); 17194 return this; 17195 } 17196 17197 /** 17198 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3} 17199 */ 17200 public ItemComponent getItemFirstRep() { 17201 if (getItem().isEmpty()) { 17202 addItem(); 17203 } 17204 return getItem().get(0); 17205 } 17206 17207 /** 17208 * @return {@link #addItem} (The first-tier service adjudications for payor added product or service lines.) 17209 */ 17210 public List<AddedItemComponent> getAddItem() { 17211 if (this.addItem == null) 17212 this.addItem = new ArrayList<AddedItemComponent>(); 17213 return this.addItem; 17214 } 17215 17216 /** 17217 * @return Returns a reference to <code>this</code> for easy method chaining 17218 */ 17219 public ExplanationOfBenefit setAddItem(List<AddedItemComponent> theAddItem) { 17220 this.addItem = theAddItem; 17221 return this; 17222 } 17223 17224 public boolean hasAddItem() { 17225 if (this.addItem == null) 17226 return false; 17227 for (AddedItemComponent item : this.addItem) 17228 if (!item.isEmpty()) 17229 return true; 17230 return false; 17231 } 17232 17233 public AddedItemComponent addAddItem() { //3 17234 AddedItemComponent t = new AddedItemComponent(); 17235 if (this.addItem == null) 17236 this.addItem = new ArrayList<AddedItemComponent>(); 17237 this.addItem.add(t); 17238 return t; 17239 } 17240 17241 public ExplanationOfBenefit addAddItem(AddedItemComponent t) { //3 17242 if (t == null) 17243 return this; 17244 if (this.addItem == null) 17245 this.addItem = new ArrayList<AddedItemComponent>(); 17246 this.addItem.add(t); 17247 return this; 17248 } 17249 17250 /** 17251 * @return The first repetition of repeating field {@link #addItem}, creating it if it does not already exist {3} 17252 */ 17253 public AddedItemComponent getAddItemFirstRep() { 17254 if (getAddItem().isEmpty()) { 17255 addAddItem(); 17256 } 17257 return getAddItem().get(0); 17258 } 17259 17260 /** 17261 * @return {@link #adjudication} (The adjudication results which are presented at the header level rather than at the line-item or add-item levels.) 17262 */ 17263 public List<AdjudicationComponent> getAdjudication() { 17264 if (this.adjudication == null) 17265 this.adjudication = new ArrayList<AdjudicationComponent>(); 17266 return this.adjudication; 17267 } 17268 17269 /** 17270 * @return Returns a reference to <code>this</code> for easy method chaining 17271 */ 17272 public ExplanationOfBenefit setAdjudication(List<AdjudicationComponent> theAdjudication) { 17273 this.adjudication = theAdjudication; 17274 return this; 17275 } 17276 17277 public boolean hasAdjudication() { 17278 if (this.adjudication == null) 17279 return false; 17280 for (AdjudicationComponent item : this.adjudication) 17281 if (!item.isEmpty()) 17282 return true; 17283 return false; 17284 } 17285 17286 public AdjudicationComponent addAdjudication() { //3 17287 AdjudicationComponent t = new AdjudicationComponent(); 17288 if (this.adjudication == null) 17289 this.adjudication = new ArrayList<AdjudicationComponent>(); 17290 this.adjudication.add(t); 17291 return t; 17292 } 17293 17294 public ExplanationOfBenefit addAdjudication(AdjudicationComponent t) { //3 17295 if (t == null) 17296 return this; 17297 if (this.adjudication == null) 17298 this.adjudication = new ArrayList<AdjudicationComponent>(); 17299 this.adjudication.add(t); 17300 return this; 17301 } 17302 17303 /** 17304 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3} 17305 */ 17306 public AdjudicationComponent getAdjudicationFirstRep() { 17307 if (getAdjudication().isEmpty()) { 17308 addAdjudication(); 17309 } 17310 return getAdjudication().get(0); 17311 } 17312 17313 /** 17314 * @return {@link #total} (Categorized monetary totals for the adjudication.) 17315 */ 17316 public List<TotalComponent> getTotal() { 17317 if (this.total == null) 17318 this.total = new ArrayList<TotalComponent>(); 17319 return this.total; 17320 } 17321 17322 /** 17323 * @return Returns a reference to <code>this</code> for easy method chaining 17324 */ 17325 public ExplanationOfBenefit setTotal(List<TotalComponent> theTotal) { 17326 this.total = theTotal; 17327 return this; 17328 } 17329 17330 public boolean hasTotal() { 17331 if (this.total == null) 17332 return false; 17333 for (TotalComponent item : this.total) 17334 if (!item.isEmpty()) 17335 return true; 17336 return false; 17337 } 17338 17339 public TotalComponent addTotal() { //3 17340 TotalComponent t = new TotalComponent(); 17341 if (this.total == null) 17342 this.total = new ArrayList<TotalComponent>(); 17343 this.total.add(t); 17344 return t; 17345 } 17346 17347 public ExplanationOfBenefit addTotal(TotalComponent t) { //3 17348 if (t == null) 17349 return this; 17350 if (this.total == null) 17351 this.total = new ArrayList<TotalComponent>(); 17352 this.total.add(t); 17353 return this; 17354 } 17355 17356 /** 17357 * @return The first repetition of repeating field {@link #total}, creating it if it does not already exist {3} 17358 */ 17359 public TotalComponent getTotalFirstRep() { 17360 if (getTotal().isEmpty()) { 17361 addTotal(); 17362 } 17363 return getTotal().get(0); 17364 } 17365 17366 /** 17367 * @return {@link #payment} (Payment details for the adjudication of the claim.) 17368 */ 17369 public PaymentComponent getPayment() { 17370 if (this.payment == null) 17371 if (Configuration.errorOnAutoCreate()) 17372 throw new Error("Attempt to auto-create ExplanationOfBenefit.payment"); 17373 else if (Configuration.doAutoCreate()) 17374 this.payment = new PaymentComponent(); // cc 17375 return this.payment; 17376 } 17377 17378 public boolean hasPayment() { 17379 return this.payment != null && !this.payment.isEmpty(); 17380 } 17381 17382 /** 17383 * @param value {@link #payment} (Payment details for the adjudication of the claim.) 17384 */ 17385 public ExplanationOfBenefit setPayment(PaymentComponent value) { 17386 this.payment = value; 17387 return this; 17388 } 17389 17390 /** 17391 * @return {@link #formCode} (A code for the form to be used for printing the content.) 17392 */ 17393 public CodeableConcept getFormCode() { 17394 if (this.formCode == null) 17395 if (Configuration.errorOnAutoCreate()) 17396 throw new Error("Attempt to auto-create ExplanationOfBenefit.formCode"); 17397 else if (Configuration.doAutoCreate()) 17398 this.formCode = new CodeableConcept(); // cc 17399 return this.formCode; 17400 } 17401 17402 public boolean hasFormCode() { 17403 return this.formCode != null && !this.formCode.isEmpty(); 17404 } 17405 17406 /** 17407 * @param value {@link #formCode} (A code for the form to be used for printing the content.) 17408 */ 17409 public ExplanationOfBenefit setFormCode(CodeableConcept value) { 17410 this.formCode = value; 17411 return this; 17412 } 17413 17414 /** 17415 * @return {@link #form} (The actual form, by reference or inclusion, for printing the content or an EOB.) 17416 */ 17417 public Attachment getForm() { 17418 if (this.form == null) 17419 if (Configuration.errorOnAutoCreate()) 17420 throw new Error("Attempt to auto-create ExplanationOfBenefit.form"); 17421 else if (Configuration.doAutoCreate()) 17422 this.form = new Attachment(); // cc 17423 return this.form; 17424 } 17425 17426 public boolean hasForm() { 17427 return this.form != null && !this.form.isEmpty(); 17428 } 17429 17430 /** 17431 * @param value {@link #form} (The actual form, by reference or inclusion, for printing the content or an EOB.) 17432 */ 17433 public ExplanationOfBenefit setForm(Attachment value) { 17434 this.form = value; 17435 return this; 17436 } 17437 17438 /** 17439 * @return {@link #processNote} (A note that describes or explains adjudication results in a human readable form.) 17440 */ 17441 public List<NoteComponent> getProcessNote() { 17442 if (this.processNote == null) 17443 this.processNote = new ArrayList<NoteComponent>(); 17444 return this.processNote; 17445 } 17446 17447 /** 17448 * @return Returns a reference to <code>this</code> for easy method chaining 17449 */ 17450 public ExplanationOfBenefit setProcessNote(List<NoteComponent> theProcessNote) { 17451 this.processNote = theProcessNote; 17452 return this; 17453 } 17454 17455 public boolean hasProcessNote() { 17456 if (this.processNote == null) 17457 return false; 17458 for (NoteComponent item : this.processNote) 17459 if (!item.isEmpty()) 17460 return true; 17461 return false; 17462 } 17463 17464 public NoteComponent addProcessNote() { //3 17465 NoteComponent t = new NoteComponent(); 17466 if (this.processNote == null) 17467 this.processNote = new ArrayList<NoteComponent>(); 17468 this.processNote.add(t); 17469 return t; 17470 } 17471 17472 public ExplanationOfBenefit addProcessNote(NoteComponent t) { //3 17473 if (t == null) 17474 return this; 17475 if (this.processNote == null) 17476 this.processNote = new ArrayList<NoteComponent>(); 17477 this.processNote.add(t); 17478 return this; 17479 } 17480 17481 /** 17482 * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist {3} 17483 */ 17484 public NoteComponent getProcessNoteFirstRep() { 17485 if (getProcessNote().isEmpty()) { 17486 addProcessNote(); 17487 } 17488 return getProcessNote().get(0); 17489 } 17490 17491 /** 17492 * @return {@link #benefitPeriod} (The term of the benefits documented in this response.) 17493 */ 17494 public Period getBenefitPeriod() { 17495 if (this.benefitPeriod == null) 17496 if (Configuration.errorOnAutoCreate()) 17497 throw new Error("Attempt to auto-create ExplanationOfBenefit.benefitPeriod"); 17498 else if (Configuration.doAutoCreate()) 17499 this.benefitPeriod = new Period(); // cc 17500 return this.benefitPeriod; 17501 } 17502 17503 public boolean hasBenefitPeriod() { 17504 return this.benefitPeriod != null && !this.benefitPeriod.isEmpty(); 17505 } 17506 17507 /** 17508 * @param value {@link #benefitPeriod} (The term of the benefits documented in this response.) 17509 */ 17510 public ExplanationOfBenefit setBenefitPeriod(Period value) { 17511 this.benefitPeriod = value; 17512 return this; 17513 } 17514 17515 /** 17516 * @return {@link #benefitBalance} (Balance by Benefit Category.) 17517 */ 17518 public List<BenefitBalanceComponent> getBenefitBalance() { 17519 if (this.benefitBalance == null) 17520 this.benefitBalance = new ArrayList<BenefitBalanceComponent>(); 17521 return this.benefitBalance; 17522 } 17523 17524 /** 17525 * @return Returns a reference to <code>this</code> for easy method chaining 17526 */ 17527 public ExplanationOfBenefit setBenefitBalance(List<BenefitBalanceComponent> theBenefitBalance) { 17528 this.benefitBalance = theBenefitBalance; 17529 return this; 17530 } 17531 17532 public boolean hasBenefitBalance() { 17533 if (this.benefitBalance == null) 17534 return false; 17535 for (BenefitBalanceComponent item : this.benefitBalance) 17536 if (!item.isEmpty()) 17537 return true; 17538 return false; 17539 } 17540 17541 public BenefitBalanceComponent addBenefitBalance() { //3 17542 BenefitBalanceComponent t = new BenefitBalanceComponent(); 17543 if (this.benefitBalance == null) 17544 this.benefitBalance = new ArrayList<BenefitBalanceComponent>(); 17545 this.benefitBalance.add(t); 17546 return t; 17547 } 17548 17549 public ExplanationOfBenefit addBenefitBalance(BenefitBalanceComponent t) { //3 17550 if (t == null) 17551 return this; 17552 if (this.benefitBalance == null) 17553 this.benefitBalance = new ArrayList<BenefitBalanceComponent>(); 17554 this.benefitBalance.add(t); 17555 return this; 17556 } 17557 17558 /** 17559 * @return The first repetition of repeating field {@link #benefitBalance}, creating it if it does not already exist {3} 17560 */ 17561 public BenefitBalanceComponent getBenefitBalanceFirstRep() { 17562 if (getBenefitBalance().isEmpty()) { 17563 addBenefitBalance(); 17564 } 17565 return getBenefitBalance().get(0); 17566 } 17567 17568 protected void listChildren(List<Property> children) { 17569 super.listChildren(children); 17570 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this explanation of benefit.", 0, java.lang.Integer.MAX_VALUE, identifier)); 17571 children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber)); 17572 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 17573 children.add(new Property("type", "CodeableConcept", "The category of claim, e.g. oral, pharmacy, vision, institutional, professional.", 0, 1, type)); 17574 children.add(new Property("subType", "CodeableConcept", "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", 0, 1, subType)); 17575 children.add(new Property("use", "code", "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.", 0, 1, use)); 17576 children.add(new Property("patient", "Reference(Patient)", "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.", 0, 1, patient)); 17577 children.add(new Property("billablePeriod", "Period", "The period for which charges are being submitted.", 0, 1, billablePeriod)); 17578 children.add(new Property("created", "dateTime", "The date this resource was created.", 0, 1, created)); 17579 children.add(new Property("enterer", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who created the claim, predetermination or preauthorization.", 0, 1, enterer)); 17580 children.add(new Property("insurer", "Reference(Organization)", "The party responsible for authorization, adjudication and reimbursement.", 0, 1, insurer)); 17581 children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the claim, predetermination or preauthorization.", 0, 1, provider)); 17582 children.add(new Property("priority", "CodeableConcept", "The provider-required urgency of processing the request. Typical values include: stat, normal deferred.", 0, 1, priority)); 17583 children.add(new Property("fundsReserveRequested", "CodeableConcept", "A code to indicate whether and for whom funds are to be reserved for future claims.", 0, 1, fundsReserveRequested)); 17584 children.add(new Property("fundsReserve", "CodeableConcept", "A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.", 0, 1, fundsReserve)); 17585 children.add(new Property("related", "", "Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.", 0, java.lang.Integer.MAX_VALUE, related)); 17586 children.add(new Property("prescription", "Reference(MedicationRequest|VisionPrescription)", "Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.", 0, 1, prescription)); 17587 children.add(new Property("originalPrescription", "Reference(MedicationRequest)", "Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, 1, originalPrescription)); 17588 children.add(new Property("event", "", "Information code for an event with a corresponding date or period.", 0, java.lang.Integer.MAX_VALUE, event)); 17589 children.add(new Property("payee", "", "The party to be reimbursed for cost of the products and services according to the terms of the policy.", 0, 1, payee)); 17590 children.add(new Property("referral", "Reference(ServiceRequest)", "The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.", 0, 1, referral)); 17591 children.add(new Property("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter)); 17592 children.add(new Property("facility", "Reference(Location|Organization)", "Facility where the services were provided.", 0, 1, facility)); 17593 children.add(new Property("claim", "Reference(Claim)", "The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.", 0, 1, claim)); 17594 children.add(new Property("claimResponse", "Reference(ClaimResponse)", "The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.", 0, 1, claimResponse)); 17595 children.add(new Property("outcome", "code", "The outcome of the claim, predetermination, or preauthorization processing.", 0, 1, outcome)); 17596 children.add(new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision)); 17597 children.add(new Property("disposition", "string", "A human readable description of the status of the adjudication.", 0, 1, disposition)); 17598 children.add(new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); 17599 children.add(new Property("preAuthRefPeriod", "Period", "The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.", 0, java.lang.Integer.MAX_VALUE, preAuthRefPeriod)); 17600 children.add(new Property("diagnosisRelatedGroup", "CodeableConcept", "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", 0, 1, diagnosisRelatedGroup)); 17601 children.add(new Property("careTeam", "", "The members of the team who provided the products and services.", 0, java.lang.Integer.MAX_VALUE, careTeam)); 17602 children.add(new Property("supportingInfo", "", "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", 0, java.lang.Integer.MAX_VALUE, supportingInfo)); 17603 children.add(new Property("diagnosis", "", "Information about diagnoses relevant to the claim items.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); 17604 children.add(new Property("procedure", "", "Procedures performed on the patient relevant to the billing items with the claim.", 0, java.lang.Integer.MAX_VALUE, procedure)); 17605 children.add(new Property("precedence", "positiveInt", "This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.", 0, 1, precedence)); 17606 children.add(new Property("insurance", "", "Financial instruments for reimbursement for the health care products and services specified on the claim.", 0, java.lang.Integer.MAX_VALUE, insurance)); 17607 children.add(new Property("accident", "", "Details of a accident which resulted in injuries which required the products and services listed in the claim.", 0, 1, accident)); 17608 children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid)); 17609 children.add(new Property("item", "", "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", 0, java.lang.Integer.MAX_VALUE, item)); 17610 children.add(new Property("addItem", "", "The first-tier service adjudications for payor added product or service lines.", 0, java.lang.Integer.MAX_VALUE, addItem)); 17611 children.add(new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results which are presented at the header level rather than at the line-item or add-item levels.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 17612 children.add(new Property("total", "", "Categorized monetary totals for the adjudication.", 0, java.lang.Integer.MAX_VALUE, total)); 17613 children.add(new Property("payment", "", "Payment details for the adjudication of the claim.", 0, 1, payment)); 17614 children.add(new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode)); 17615 children.add(new Property("form", "Attachment", "The actual form, by reference or inclusion, for printing the content or an EOB.", 0, 1, form)); 17616 children.add(new Property("processNote", "", "A note that describes or explains adjudication results in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote)); 17617 children.add(new Property("benefitPeriod", "Period", "The term of the benefits documented in this response.", 0, 1, benefitPeriod)); 17618 children.add(new Property("benefitBalance", "", "Balance by Benefit Category.", 0, java.lang.Integer.MAX_VALUE, benefitBalance)); 17619 } 17620 17621 @Override 17622 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 17623 switch (_hash) { 17624 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier assigned to this explanation of benefit.", 0, java.lang.Integer.MAX_VALUE, identifier); 17625 case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber); 17626 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 17627 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The category of claim, e.g. oral, pharmacy, vision, institutional, professional.", 0, 1, type); 17628 case -1868521062: /*subType*/ return new Property("subType", "CodeableConcept", "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", 0, 1, subType); 17629 case 116103: /*use*/ return new Property("use", "code", "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.", 0, 1, use); 17630 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.", 0, 1, patient); 17631 case -332066046: /*billablePeriod*/ return new Property("billablePeriod", "Period", "The period for which charges are being submitted.", 0, 1, billablePeriod); 17632 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date this resource was created.", 0, 1, created); 17633 case -1591951995: /*enterer*/ return new Property("enterer", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who created the claim, predetermination or preauthorization.", 0, 1, enterer); 17634 case 1957615864: /*insurer*/ return new Property("insurer", "Reference(Organization)", "The party responsible for authorization, adjudication and reimbursement.", 0, 1, insurer); 17635 case -987494927: /*provider*/ return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the claim, predetermination or preauthorization.", 0, 1, provider); 17636 case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "The provider-required urgency of processing the request. Typical values include: stat, normal deferred.", 0, 1, priority); 17637 case -1688904576: /*fundsReserveRequested*/ return new Property("fundsReserveRequested", "CodeableConcept", "A code to indicate whether and for whom funds are to be reserved for future claims.", 0, 1, fundsReserveRequested); 17638 case 1314609806: /*fundsReserve*/ return new Property("fundsReserve", "CodeableConcept", "A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.", 0, 1, fundsReserve); 17639 case 1090493483: /*related*/ return new Property("related", "", "Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.", 0, java.lang.Integer.MAX_VALUE, related); 17640 case 460301338: /*prescription*/ return new Property("prescription", "Reference(MedicationRequest|VisionPrescription)", "Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments.", 0, 1, prescription); 17641 case -1814015861: /*originalPrescription*/ return new Property("originalPrescription", "Reference(MedicationRequest)", "Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, 1, originalPrescription); 17642 case 96891546: /*event*/ return new Property("event", "", "Information code for an event with a corresponding date or period.", 0, java.lang.Integer.MAX_VALUE, event); 17643 case 106443592: /*payee*/ return new Property("payee", "", "The party to be reimbursed for cost of the products and services according to the terms of the policy.", 0, 1, payee); 17644 case -722568291: /*referral*/ return new Property("referral", "Reference(ServiceRequest)", "The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.", 0, 1, referral); 17645 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter); 17646 case 501116579: /*facility*/ return new Property("facility", "Reference(Location|Organization)", "Facility where the services were provided.", 0, 1, facility); 17647 case 94742588: /*claim*/ return new Property("claim", "Reference(Claim)", "The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.", 0, 1, claim); 17648 case 689513629: /*claimResponse*/ return new Property("claimResponse", "Reference(ClaimResponse)", "The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.", 0, 1, claimResponse); 17649 case -1106507950: /*outcome*/ return new Property("outcome", "code", "The outcome of the claim, predetermination, or preauthorization processing.", 0, 1, outcome); 17650 case 565719004: /*decision*/ return new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision); 17651 case 583380919: /*disposition*/ return new Property("disposition", "string", "A human readable description of the status of the adjudication.", 0, 1, disposition); 17652 case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, java.lang.Integer.MAX_VALUE, preAuthRef); 17653 case -1262920311: /*preAuthRefPeriod*/ return new Property("preAuthRefPeriod", "Period", "The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.", 0, java.lang.Integer.MAX_VALUE, preAuthRefPeriod); 17654 case -1599182171: /*diagnosisRelatedGroup*/ return new Property("diagnosisRelatedGroup", "CodeableConcept", "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", 0, 1, diagnosisRelatedGroup); 17655 case -7323378: /*careTeam*/ return new Property("careTeam", "", "The members of the team who provided the products and services.", 0, java.lang.Integer.MAX_VALUE, careTeam); 17656 case 1922406657: /*supportingInfo*/ return new Property("supportingInfo", "", "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", 0, java.lang.Integer.MAX_VALUE, supportingInfo); 17657 case 1196993265: /*diagnosis*/ return new Property("diagnosis", "", "Information about diagnoses relevant to the claim items.", 0, java.lang.Integer.MAX_VALUE, diagnosis); 17658 case -1095204141: /*procedure*/ return new Property("procedure", "", "Procedures performed on the patient relevant to the billing items with the claim.", 0, java.lang.Integer.MAX_VALUE, procedure); 17659 case 159695370: /*precedence*/ return new Property("precedence", "positiveInt", "This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.", 0, 1, precedence); 17660 case 73049818: /*insurance*/ return new Property("insurance", "", "Financial instruments for reimbursement for the health care products and services specified on the claim.", 0, java.lang.Integer.MAX_VALUE, insurance); 17661 case -2143202801: /*accident*/ return new Property("accident", "", "Details of a accident which resulted in injuries which required the products and services listed in the claim.", 0, 1, accident); 17662 case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid); 17663 case 3242771: /*item*/ return new Property("item", "", "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", 0, java.lang.Integer.MAX_VALUE, item); 17664 case -1148899500: /*addItem*/ return new Property("addItem", "", "The first-tier service adjudications for payor added product or service lines.", 0, java.lang.Integer.MAX_VALUE, addItem); 17665 case -231349275: /*adjudication*/ return new Property("adjudication", "@ExplanationOfBenefit.item.adjudication", "The adjudication results which are presented at the header level rather than at the line-item or add-item levels.", 0, java.lang.Integer.MAX_VALUE, adjudication); 17666 case 110549828: /*total*/ return new Property("total", "", "Categorized monetary totals for the adjudication.", 0, java.lang.Integer.MAX_VALUE, total); 17667 case -786681338: /*payment*/ return new Property("payment", "", "Payment details for the adjudication of the claim.", 0, 1, payment); 17668 case 473181393: /*formCode*/ return new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode); 17669 case 3148996: /*form*/ return new Property("form", "Attachment", "The actual form, by reference or inclusion, for printing the content or an EOB.", 0, 1, form); 17670 case 202339073: /*processNote*/ return new Property("processNote", "", "A note that describes or explains adjudication results in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote); 17671 case -407369416: /*benefitPeriod*/ return new Property("benefitPeriod", "Period", "The term of the benefits documented in this response.", 0, 1, benefitPeriod); 17672 case 596003397: /*benefitBalance*/ return new Property("benefitBalance", "", "Balance by Benefit Category.", 0, java.lang.Integer.MAX_VALUE, benefitBalance); 17673 default: return super.getNamedProperty(_hash, _name, _checkValid); 17674 } 17675 17676 } 17677 17678 @Override 17679 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 17680 switch (hash) { 17681 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 17682 case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier 17683 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ExplanationOfBenefitStatus> 17684 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 17685 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 17686 case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<Use> 17687 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 17688 case -332066046: /*billablePeriod*/ return this.billablePeriod == null ? new Base[0] : new Base[] {this.billablePeriod}; // Period 17689 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 17690 case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Reference 17691 case 1957615864: /*insurer*/ return this.insurer == null ? new Base[0] : new Base[] {this.insurer}; // Reference 17692 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference 17693 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept 17694 case -1688904576: /*fundsReserveRequested*/ return this.fundsReserveRequested == null ? new Base[0] : new Base[] {this.fundsReserveRequested}; // CodeableConcept 17695 case 1314609806: /*fundsReserve*/ return this.fundsReserve == null ? new Base[0] : new Base[] {this.fundsReserve}; // CodeableConcept 17696 case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // RelatedClaimComponent 17697 case 460301338: /*prescription*/ return this.prescription == null ? new Base[0] : new Base[] {this.prescription}; // Reference 17698 case -1814015861: /*originalPrescription*/ return this.originalPrescription == null ? new Base[0] : new Base[] {this.originalPrescription}; // Reference 17699 case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // ExplanationOfBenefitEventComponent 17700 case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // PayeeComponent 17701 case -722568291: /*referral*/ return this.referral == null ? new Base[0] : new Base[] {this.referral}; // Reference 17702 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : this.encounter.toArray(new Base[this.encounter.size()]); // Reference 17703 case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Reference 17704 case 94742588: /*claim*/ return this.claim == null ? new Base[0] : new Base[] {this.claim}; // Reference 17705 case 689513629: /*claimResponse*/ return this.claimResponse == null ? new Base[0] : new Base[] {this.claimResponse}; // Reference 17706 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<ClaimProcessingCodes> 17707 case 565719004: /*decision*/ return this.decision == null ? new Base[0] : new Base[] {this.decision}; // CodeableConcept 17708 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 17709 case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType 17710 case -1262920311: /*preAuthRefPeriod*/ return this.preAuthRefPeriod == null ? new Base[0] : this.preAuthRefPeriod.toArray(new Base[this.preAuthRefPeriod.size()]); // Period 17711 case -1599182171: /*diagnosisRelatedGroup*/ return this.diagnosisRelatedGroup == null ? new Base[0] : new Base[] {this.diagnosisRelatedGroup}; // CodeableConcept 17712 case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // CareTeamComponent 17713 case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // SupportingInformationComponent 17714 case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent 17715 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // ProcedureComponent 17716 case 159695370: /*precedence*/ return this.precedence == null ? new Base[0] : new Base[] {this.precedence}; // PositiveIntType 17717 case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // InsuranceComponent 17718 case -2143202801: /*accident*/ return this.accident == null ? new Base[0] : new Base[] {this.accident}; // AccidentComponent 17719 case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money 17720 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemComponent 17721 case -1148899500: /*addItem*/ return this.addItem == null ? new Base[0] : this.addItem.toArray(new Base[this.addItem.size()]); // AddedItemComponent 17722 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 17723 case 110549828: /*total*/ return this.total == null ? new Base[0] : this.total.toArray(new Base[this.total.size()]); // TotalComponent 17724 case -786681338: /*payment*/ return this.payment == null ? new Base[0] : new Base[] {this.payment}; // PaymentComponent 17725 case 473181393: /*formCode*/ return this.formCode == null ? new Base[0] : new Base[] {this.formCode}; // CodeableConcept 17726 case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // Attachment 17727 case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // NoteComponent 17728 case -407369416: /*benefitPeriod*/ return this.benefitPeriod == null ? new Base[0] : new Base[] {this.benefitPeriod}; // Period 17729 case 596003397: /*benefitBalance*/ return this.benefitBalance == null ? new Base[0] : this.benefitBalance.toArray(new Base[this.benefitBalance.size()]); // BenefitBalanceComponent 17730 default: return super.getProperty(hash, name, checkValid); 17731 } 17732 17733 } 17734 17735 @Override 17736 public Base setProperty(int hash, String name, Base value) throws FHIRException { 17737 switch (hash) { 17738 case -1618432855: // identifier 17739 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 17740 return value; 17741 case 82505966: // traceNumber 17742 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier 17743 return value; 17744 case -892481550: // status 17745 value = new ExplanationOfBenefitStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 17746 this.status = (Enumeration) value; // Enumeration<ExplanationOfBenefitStatus> 17747 return value; 17748 case 3575610: // type 17749 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17750 return value; 17751 case -1868521062: // subType 17752 this.subType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17753 return value; 17754 case 116103: // use 17755 value = new UseEnumFactory().fromType(TypeConvertor.castToCode(value)); 17756 this.use = (Enumeration) value; // Enumeration<Use> 17757 return value; 17758 case -791418107: // patient 17759 this.patient = TypeConvertor.castToReference(value); // Reference 17760 return value; 17761 case -332066046: // billablePeriod 17762 this.billablePeriod = TypeConvertor.castToPeriod(value); // Period 17763 return value; 17764 case 1028554472: // created 17765 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 17766 return value; 17767 case -1591951995: // enterer 17768 this.enterer = TypeConvertor.castToReference(value); // Reference 17769 return value; 17770 case 1957615864: // insurer 17771 this.insurer = TypeConvertor.castToReference(value); // Reference 17772 return value; 17773 case -987494927: // provider 17774 this.provider = TypeConvertor.castToReference(value); // Reference 17775 return value; 17776 case -1165461084: // priority 17777 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17778 return value; 17779 case -1688904576: // fundsReserveRequested 17780 this.fundsReserveRequested = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17781 return value; 17782 case 1314609806: // fundsReserve 17783 this.fundsReserve = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17784 return value; 17785 case 1090493483: // related 17786 this.getRelated().add((RelatedClaimComponent) value); // RelatedClaimComponent 17787 return value; 17788 case 460301338: // prescription 17789 this.prescription = TypeConvertor.castToReference(value); // Reference 17790 return value; 17791 case -1814015861: // originalPrescription 17792 this.originalPrescription = TypeConvertor.castToReference(value); // Reference 17793 return value; 17794 case 96891546: // event 17795 this.getEvent().add((ExplanationOfBenefitEventComponent) value); // ExplanationOfBenefitEventComponent 17796 return value; 17797 case 106443592: // payee 17798 this.payee = (PayeeComponent) value; // PayeeComponent 17799 return value; 17800 case -722568291: // referral 17801 this.referral = TypeConvertor.castToReference(value); // Reference 17802 return value; 17803 case 1524132147: // encounter 17804 this.getEncounter().add(TypeConvertor.castToReference(value)); // Reference 17805 return value; 17806 case 501116579: // facility 17807 this.facility = TypeConvertor.castToReference(value); // Reference 17808 return value; 17809 case 94742588: // claim 17810 this.claim = TypeConvertor.castToReference(value); // Reference 17811 return value; 17812 case 689513629: // claimResponse 17813 this.claimResponse = TypeConvertor.castToReference(value); // Reference 17814 return value; 17815 case -1106507950: // outcome 17816 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 17817 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 17818 return value; 17819 case 565719004: // decision 17820 this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17821 return value; 17822 case 583380919: // disposition 17823 this.disposition = TypeConvertor.castToString(value); // StringType 17824 return value; 17825 case 522246568: // preAuthRef 17826 this.getPreAuthRef().add(TypeConvertor.castToString(value)); // StringType 17827 return value; 17828 case -1262920311: // preAuthRefPeriod 17829 this.getPreAuthRefPeriod().add(TypeConvertor.castToPeriod(value)); // Period 17830 return value; 17831 case -1599182171: // diagnosisRelatedGroup 17832 this.diagnosisRelatedGroup = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17833 return value; 17834 case -7323378: // careTeam 17835 this.getCareTeam().add((CareTeamComponent) value); // CareTeamComponent 17836 return value; 17837 case 1922406657: // supportingInfo 17838 this.getSupportingInfo().add((SupportingInformationComponent) value); // SupportingInformationComponent 17839 return value; 17840 case 1196993265: // diagnosis 17841 this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent 17842 return value; 17843 case -1095204141: // procedure 17844 this.getProcedure().add((ProcedureComponent) value); // ProcedureComponent 17845 return value; 17846 case 159695370: // precedence 17847 this.precedence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 17848 return value; 17849 case 73049818: // insurance 17850 this.getInsurance().add((InsuranceComponent) value); // InsuranceComponent 17851 return value; 17852 case -2143202801: // accident 17853 this.accident = (AccidentComponent) value; // AccidentComponent 17854 return value; 17855 case 525514609: // patientPaid 17856 this.patientPaid = TypeConvertor.castToMoney(value); // Money 17857 return value; 17858 case 3242771: // item 17859 this.getItem().add((ItemComponent) value); // ItemComponent 17860 return value; 17861 case -1148899500: // addItem 17862 this.getAddItem().add((AddedItemComponent) value); // AddedItemComponent 17863 return value; 17864 case -231349275: // adjudication 17865 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 17866 return value; 17867 case 110549828: // total 17868 this.getTotal().add((TotalComponent) value); // TotalComponent 17869 return value; 17870 case -786681338: // payment 17871 this.payment = (PaymentComponent) value; // PaymentComponent 17872 return value; 17873 case 473181393: // formCode 17874 this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17875 return value; 17876 case 3148996: // form 17877 this.form = TypeConvertor.castToAttachment(value); // Attachment 17878 return value; 17879 case 202339073: // processNote 17880 this.getProcessNote().add((NoteComponent) value); // NoteComponent 17881 return value; 17882 case -407369416: // benefitPeriod 17883 this.benefitPeriod = TypeConvertor.castToPeriod(value); // Period 17884 return value; 17885 case 596003397: // benefitBalance 17886 this.getBenefitBalance().add((BenefitBalanceComponent) value); // BenefitBalanceComponent 17887 return value; 17888 default: return super.setProperty(hash, name, value); 17889 } 17890 17891 } 17892 17893 @Override 17894 public Base setProperty(String name, Base value) throws FHIRException { 17895 if (name.equals("identifier")) { 17896 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 17897 } else if (name.equals("traceNumber")) { 17898 this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); 17899 } else if (name.equals("status")) { 17900 value = new ExplanationOfBenefitStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 17901 this.status = (Enumeration) value; // Enumeration<ExplanationOfBenefitStatus> 17902 } else if (name.equals("type")) { 17903 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17904 } else if (name.equals("subType")) { 17905 this.subType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17906 } else if (name.equals("use")) { 17907 value = new UseEnumFactory().fromType(TypeConvertor.castToCode(value)); 17908 this.use = (Enumeration) value; // Enumeration<Use> 17909 } else if (name.equals("patient")) { 17910 this.patient = TypeConvertor.castToReference(value); // Reference 17911 } else if (name.equals("billablePeriod")) { 17912 this.billablePeriod = TypeConvertor.castToPeriod(value); // Period 17913 } else if (name.equals("created")) { 17914 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 17915 } else if (name.equals("enterer")) { 17916 this.enterer = TypeConvertor.castToReference(value); // Reference 17917 } else if (name.equals("insurer")) { 17918 this.insurer = TypeConvertor.castToReference(value); // Reference 17919 } else if (name.equals("provider")) { 17920 this.provider = TypeConvertor.castToReference(value); // Reference 17921 } else if (name.equals("priority")) { 17922 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17923 } else if (name.equals("fundsReserveRequested")) { 17924 this.fundsReserveRequested = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17925 } else if (name.equals("fundsReserve")) { 17926 this.fundsReserve = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17927 } else if (name.equals("related")) { 17928 this.getRelated().add((RelatedClaimComponent) value); 17929 } else if (name.equals("prescription")) { 17930 this.prescription = TypeConvertor.castToReference(value); // Reference 17931 } else if (name.equals("originalPrescription")) { 17932 this.originalPrescription = TypeConvertor.castToReference(value); // Reference 17933 } else if (name.equals("event")) { 17934 this.getEvent().add((ExplanationOfBenefitEventComponent) value); 17935 } else if (name.equals("payee")) { 17936 this.payee = (PayeeComponent) value; // PayeeComponent 17937 } else if (name.equals("referral")) { 17938 this.referral = TypeConvertor.castToReference(value); // Reference 17939 } else if (name.equals("encounter")) { 17940 this.getEncounter().add(TypeConvertor.castToReference(value)); 17941 } else if (name.equals("facility")) { 17942 this.facility = TypeConvertor.castToReference(value); // Reference 17943 } else if (name.equals("claim")) { 17944 this.claim = TypeConvertor.castToReference(value); // Reference 17945 } else if (name.equals("claimResponse")) { 17946 this.claimResponse = TypeConvertor.castToReference(value); // Reference 17947 } else if (name.equals("outcome")) { 17948 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 17949 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 17950 } else if (name.equals("decision")) { 17951 this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17952 } else if (name.equals("disposition")) { 17953 this.disposition = TypeConvertor.castToString(value); // StringType 17954 } else if (name.equals("preAuthRef")) { 17955 this.getPreAuthRef().add(TypeConvertor.castToString(value)); 17956 } else if (name.equals("preAuthRefPeriod")) { 17957 this.getPreAuthRefPeriod().add(TypeConvertor.castToPeriod(value)); 17958 } else if (name.equals("diagnosisRelatedGroup")) { 17959 this.diagnosisRelatedGroup = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17960 } else if (name.equals("careTeam")) { 17961 this.getCareTeam().add((CareTeamComponent) value); 17962 } else if (name.equals("supportingInfo")) { 17963 this.getSupportingInfo().add((SupportingInformationComponent) value); 17964 } else if (name.equals("diagnosis")) { 17965 this.getDiagnosis().add((DiagnosisComponent) value); 17966 } else if (name.equals("procedure")) { 17967 this.getProcedure().add((ProcedureComponent) value); 17968 } else if (name.equals("precedence")) { 17969 this.precedence = TypeConvertor.castToPositiveInt(value); // PositiveIntType 17970 } else if (name.equals("insurance")) { 17971 this.getInsurance().add((InsuranceComponent) value); 17972 } else if (name.equals("accident")) { 17973 this.accident = (AccidentComponent) value; // AccidentComponent 17974 } else if (name.equals("patientPaid")) { 17975 this.patientPaid = TypeConvertor.castToMoney(value); // Money 17976 } else if (name.equals("item")) { 17977 this.getItem().add((ItemComponent) value); 17978 } else if (name.equals("addItem")) { 17979 this.getAddItem().add((AddedItemComponent) value); 17980 } else if (name.equals("adjudication")) { 17981 this.getAdjudication().add((AdjudicationComponent) value); 17982 } else if (name.equals("total")) { 17983 this.getTotal().add((TotalComponent) value); 17984 } else if (name.equals("payment")) { 17985 this.payment = (PaymentComponent) value; // PaymentComponent 17986 } else if (name.equals("formCode")) { 17987 this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 17988 } else if (name.equals("form")) { 17989 this.form = TypeConvertor.castToAttachment(value); // Attachment 17990 } else if (name.equals("processNote")) { 17991 this.getProcessNote().add((NoteComponent) value); 17992 } else if (name.equals("benefitPeriod")) { 17993 this.benefitPeriod = TypeConvertor.castToPeriod(value); // Period 17994 } else if (name.equals("benefitBalance")) { 17995 this.getBenefitBalance().add((BenefitBalanceComponent) value); 17996 } else 17997 return super.setProperty(name, value); 17998 return value; 17999 } 18000 18001 @Override 18002 public void removeChild(String name, Base value) throws FHIRException { 18003 if (name.equals("identifier")) { 18004 this.getIdentifier().remove(value); 18005 } else if (name.equals("traceNumber")) { 18006 this.getTraceNumber().remove(value); 18007 } else if (name.equals("status")) { 18008 value = new ExplanationOfBenefitStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 18009 this.status = (Enumeration) value; // Enumeration<ExplanationOfBenefitStatus> 18010 } else if (name.equals("type")) { 18011 this.type = null; 18012 } else if (name.equals("subType")) { 18013 this.subType = null; 18014 } else if (name.equals("use")) { 18015 value = new UseEnumFactory().fromType(TypeConvertor.castToCode(value)); 18016 this.use = (Enumeration) value; // Enumeration<Use> 18017 } else if (name.equals("patient")) { 18018 this.patient = null; 18019 } else if (name.equals("billablePeriod")) { 18020 this.billablePeriod = null; 18021 } else if (name.equals("created")) { 18022 this.created = null; 18023 } else if (name.equals("enterer")) { 18024 this.enterer = null; 18025 } else if (name.equals("insurer")) { 18026 this.insurer = null; 18027 } else if (name.equals("provider")) { 18028 this.provider = null; 18029 } else if (name.equals("priority")) { 18030 this.priority = null; 18031 } else if (name.equals("fundsReserveRequested")) { 18032 this.fundsReserveRequested = null; 18033 } else if (name.equals("fundsReserve")) { 18034 this.fundsReserve = null; 18035 } else if (name.equals("related")) { 18036 this.getRelated().remove((RelatedClaimComponent) value); 18037 } else if (name.equals("prescription")) { 18038 this.prescription = null; 18039 } else if (name.equals("originalPrescription")) { 18040 this.originalPrescription = null; 18041 } else if (name.equals("event")) { 18042 this.getEvent().remove((ExplanationOfBenefitEventComponent) value); 18043 } else if (name.equals("payee")) { 18044 this.payee = (PayeeComponent) value; // PayeeComponent 18045 } else if (name.equals("referral")) { 18046 this.referral = null; 18047 } else if (name.equals("encounter")) { 18048 this.getEncounter().remove(value); 18049 } else if (name.equals("facility")) { 18050 this.facility = null; 18051 } else if (name.equals("claim")) { 18052 this.claim = null; 18053 } else if (name.equals("claimResponse")) { 18054 this.claimResponse = null; 18055 } else if (name.equals("outcome")) { 18056 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 18057 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 18058 } else if (name.equals("decision")) { 18059 this.decision = null; 18060 } else if (name.equals("disposition")) { 18061 this.disposition = null; 18062 } else if (name.equals("preAuthRef")) { 18063 this.getPreAuthRef().remove(value); 18064 } else if (name.equals("preAuthRefPeriod")) { 18065 this.getPreAuthRefPeriod().remove(value); 18066 } else if (name.equals("diagnosisRelatedGroup")) { 18067 this.diagnosisRelatedGroup = null; 18068 } else if (name.equals("careTeam")) { 18069 this.getCareTeam().remove((CareTeamComponent) value); 18070 } else if (name.equals("supportingInfo")) { 18071 this.getSupportingInfo().remove((SupportingInformationComponent) value); 18072 } else if (name.equals("diagnosis")) { 18073 this.getDiagnosis().remove((DiagnosisComponent) value); 18074 } else if (name.equals("procedure")) { 18075 this.getProcedure().remove((ProcedureComponent) value); 18076 } else if (name.equals("precedence")) { 18077 this.precedence = null; 18078 } else if (name.equals("insurance")) { 18079 this.getInsurance().remove((InsuranceComponent) value); 18080 } else if (name.equals("accident")) { 18081 this.accident = (AccidentComponent) value; // AccidentComponent 18082 } else if (name.equals("patientPaid")) { 18083 this.patientPaid = null; 18084 } else if (name.equals("item")) { 18085 this.getItem().remove((ItemComponent) value); 18086 } else if (name.equals("addItem")) { 18087 this.getAddItem().remove((AddedItemComponent) value); 18088 } else if (name.equals("adjudication")) { 18089 this.getAdjudication().remove((AdjudicationComponent) value); 18090 } else if (name.equals("total")) { 18091 this.getTotal().remove((TotalComponent) value); 18092 } else if (name.equals("payment")) { 18093 this.payment = (PaymentComponent) value; // PaymentComponent 18094 } else if (name.equals("formCode")) { 18095 this.formCode = null; 18096 } else if (name.equals("form")) { 18097 this.form = null; 18098 } else if (name.equals("processNote")) { 18099 this.getProcessNote().remove((NoteComponent) value); 18100 } else if (name.equals("benefitPeriod")) { 18101 this.benefitPeriod = null; 18102 } else if (name.equals("benefitBalance")) { 18103 this.getBenefitBalance().remove((BenefitBalanceComponent) value); 18104 } else 18105 super.removeChild(name, value); 18106 18107 } 18108 18109 @Override 18110 public Base makeProperty(int hash, String name) throws FHIRException { 18111 switch (hash) { 18112 case -1618432855: return addIdentifier(); 18113 case 82505966: return addTraceNumber(); 18114 case -892481550: return getStatusElement(); 18115 case 3575610: return getType(); 18116 case -1868521062: return getSubType(); 18117 case 116103: return getUseElement(); 18118 case -791418107: return getPatient(); 18119 case -332066046: return getBillablePeriod(); 18120 case 1028554472: return getCreatedElement(); 18121 case -1591951995: return getEnterer(); 18122 case 1957615864: return getInsurer(); 18123 case -987494927: return getProvider(); 18124 case -1165461084: return getPriority(); 18125 case -1688904576: return getFundsReserveRequested(); 18126 case 1314609806: return getFundsReserve(); 18127 case 1090493483: return addRelated(); 18128 case 460301338: return getPrescription(); 18129 case -1814015861: return getOriginalPrescription(); 18130 case 96891546: return addEvent(); 18131 case 106443592: return getPayee(); 18132 case -722568291: return getReferral(); 18133 case 1524132147: return addEncounter(); 18134 case 501116579: return getFacility(); 18135 case 94742588: return getClaim(); 18136 case 689513629: return getClaimResponse(); 18137 case -1106507950: return getOutcomeElement(); 18138 case 565719004: return getDecision(); 18139 case 583380919: return getDispositionElement(); 18140 case 522246568: return addPreAuthRefElement(); 18141 case -1262920311: return addPreAuthRefPeriod(); 18142 case -1599182171: return getDiagnosisRelatedGroup(); 18143 case -7323378: return addCareTeam(); 18144 case 1922406657: return addSupportingInfo(); 18145 case 1196993265: return addDiagnosis(); 18146 case -1095204141: return addProcedure(); 18147 case 159695370: return getPrecedenceElement(); 18148 case 73049818: return addInsurance(); 18149 case -2143202801: return getAccident(); 18150 case 525514609: return getPatientPaid(); 18151 case 3242771: return addItem(); 18152 case -1148899500: return addAddItem(); 18153 case -231349275: return addAdjudication(); 18154 case 110549828: return addTotal(); 18155 case -786681338: return getPayment(); 18156 case 473181393: return getFormCode(); 18157 case 3148996: return getForm(); 18158 case 202339073: return addProcessNote(); 18159 case -407369416: return getBenefitPeriod(); 18160 case 596003397: return addBenefitBalance(); 18161 default: return super.makeProperty(hash, name); 18162 } 18163 18164 } 18165 18166 @Override 18167 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 18168 switch (hash) { 18169 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 18170 case 82505966: /*traceNumber*/ return new String[] {"Identifier"}; 18171 case -892481550: /*status*/ return new String[] {"code"}; 18172 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 18173 case -1868521062: /*subType*/ return new String[] {"CodeableConcept"}; 18174 case 116103: /*use*/ return new String[] {"code"}; 18175 case -791418107: /*patient*/ return new String[] {"Reference"}; 18176 case -332066046: /*billablePeriod*/ return new String[] {"Period"}; 18177 case 1028554472: /*created*/ return new String[] {"dateTime"}; 18178 case -1591951995: /*enterer*/ return new String[] {"Reference"}; 18179 case 1957615864: /*insurer*/ return new String[] {"Reference"}; 18180 case -987494927: /*provider*/ return new String[] {"Reference"}; 18181 case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; 18182 case -1688904576: /*fundsReserveRequested*/ return new String[] {"CodeableConcept"}; 18183 case 1314609806: /*fundsReserve*/ return new String[] {"CodeableConcept"}; 18184 case 1090493483: /*related*/ return new String[] {}; 18185 case 460301338: /*prescription*/ return new String[] {"Reference"}; 18186 case -1814015861: /*originalPrescription*/ return new String[] {"Reference"}; 18187 case 96891546: /*event*/ return new String[] {}; 18188 case 106443592: /*payee*/ return new String[] {}; 18189 case -722568291: /*referral*/ return new String[] {"Reference"}; 18190 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 18191 case 501116579: /*facility*/ return new String[] {"Reference"}; 18192 case 94742588: /*claim*/ return new String[] {"Reference"}; 18193 case 689513629: /*claimResponse*/ return new String[] {"Reference"}; 18194 case -1106507950: /*outcome*/ return new String[] {"code"}; 18195 case 565719004: /*decision*/ return new String[] {"CodeableConcept"}; 18196 case 583380919: /*disposition*/ return new String[] {"string"}; 18197 case 522246568: /*preAuthRef*/ return new String[] {"string"}; 18198 case -1262920311: /*preAuthRefPeriod*/ return new String[] {"Period"}; 18199 case -1599182171: /*diagnosisRelatedGroup*/ return new String[] {"CodeableConcept"}; 18200 case -7323378: /*careTeam*/ return new String[] {}; 18201 case 1922406657: /*supportingInfo*/ return new String[] {}; 18202 case 1196993265: /*diagnosis*/ return new String[] {}; 18203 case -1095204141: /*procedure*/ return new String[] {}; 18204 case 159695370: /*precedence*/ return new String[] {"positiveInt"}; 18205 case 73049818: /*insurance*/ return new String[] {}; 18206 case -2143202801: /*accident*/ return new String[] {}; 18207 case 525514609: /*patientPaid*/ return new String[] {"Money"}; 18208 case 3242771: /*item*/ return new String[] {}; 18209 case -1148899500: /*addItem*/ return new String[] {}; 18210 case -231349275: /*adjudication*/ return new String[] {"@ExplanationOfBenefit.item.adjudication"}; 18211 case 110549828: /*total*/ return new String[] {}; 18212 case -786681338: /*payment*/ return new String[] {}; 18213 case 473181393: /*formCode*/ return new String[] {"CodeableConcept"}; 18214 case 3148996: /*form*/ return new String[] {"Attachment"}; 18215 case 202339073: /*processNote*/ return new String[] {}; 18216 case -407369416: /*benefitPeriod*/ return new String[] {"Period"}; 18217 case 596003397: /*benefitBalance*/ return new String[] {}; 18218 default: return super.getTypesForProperty(hash, name); 18219 } 18220 18221 } 18222 18223 @Override 18224 public Base addChild(String name) throws FHIRException { 18225 if (name.equals("identifier")) { 18226 return addIdentifier(); 18227 } 18228 else if (name.equals("traceNumber")) { 18229 return addTraceNumber(); 18230 } 18231 else if (name.equals("status")) { 18232 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.status"); 18233 } 18234 else if (name.equals("type")) { 18235 this.type = new CodeableConcept(); 18236 return this.type; 18237 } 18238 else if (name.equals("subType")) { 18239 this.subType = new CodeableConcept(); 18240 return this.subType; 18241 } 18242 else if (name.equals("use")) { 18243 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.use"); 18244 } 18245 else if (name.equals("patient")) { 18246 this.patient = new Reference(); 18247 return this.patient; 18248 } 18249 else if (name.equals("billablePeriod")) { 18250 this.billablePeriod = new Period(); 18251 return this.billablePeriod; 18252 } 18253 else if (name.equals("created")) { 18254 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.created"); 18255 } 18256 else if (name.equals("enterer")) { 18257 this.enterer = new Reference(); 18258 return this.enterer; 18259 } 18260 else if (name.equals("insurer")) { 18261 this.insurer = new Reference(); 18262 return this.insurer; 18263 } 18264 else if (name.equals("provider")) { 18265 this.provider = new Reference(); 18266 return this.provider; 18267 } 18268 else if (name.equals("priority")) { 18269 this.priority = new CodeableConcept(); 18270 return this.priority; 18271 } 18272 else if (name.equals("fundsReserveRequested")) { 18273 this.fundsReserveRequested = new CodeableConcept(); 18274 return this.fundsReserveRequested; 18275 } 18276 else if (name.equals("fundsReserve")) { 18277 this.fundsReserve = new CodeableConcept(); 18278 return this.fundsReserve; 18279 } 18280 else if (name.equals("related")) { 18281 return addRelated(); 18282 } 18283 else if (name.equals("prescription")) { 18284 this.prescription = new Reference(); 18285 return this.prescription; 18286 } 18287 else if (name.equals("originalPrescription")) { 18288 this.originalPrescription = new Reference(); 18289 return this.originalPrescription; 18290 } 18291 else if (name.equals("event")) { 18292 return addEvent(); 18293 } 18294 else if (name.equals("payee")) { 18295 this.payee = new PayeeComponent(); 18296 return this.payee; 18297 } 18298 else if (name.equals("referral")) { 18299 this.referral = new Reference(); 18300 return this.referral; 18301 } 18302 else if (name.equals("encounter")) { 18303 return addEncounter(); 18304 } 18305 else if (name.equals("facility")) { 18306 this.facility = new Reference(); 18307 return this.facility; 18308 } 18309 else if (name.equals("claim")) { 18310 this.claim = new Reference(); 18311 return this.claim; 18312 } 18313 else if (name.equals("claimResponse")) { 18314 this.claimResponse = new Reference(); 18315 return this.claimResponse; 18316 } 18317 else if (name.equals("outcome")) { 18318 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.outcome"); 18319 } 18320 else if (name.equals("decision")) { 18321 this.decision = new CodeableConcept(); 18322 return this.decision; 18323 } 18324 else if (name.equals("disposition")) { 18325 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.disposition"); 18326 } 18327 else if (name.equals("preAuthRef")) { 18328 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.preAuthRef"); 18329 } 18330 else if (name.equals("preAuthRefPeriod")) { 18331 return addPreAuthRefPeriod(); 18332 } 18333 else if (name.equals("diagnosisRelatedGroup")) { 18334 this.diagnosisRelatedGroup = new CodeableConcept(); 18335 return this.diagnosisRelatedGroup; 18336 } 18337 else if (name.equals("careTeam")) { 18338 return addCareTeam(); 18339 } 18340 else if (name.equals("supportingInfo")) { 18341 return addSupportingInfo(); 18342 } 18343 else if (name.equals("diagnosis")) { 18344 return addDiagnosis(); 18345 } 18346 else if (name.equals("procedure")) { 18347 return addProcedure(); 18348 } 18349 else if (name.equals("precedence")) { 18350 throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.precedence"); 18351 } 18352 else if (name.equals("insurance")) { 18353 return addInsurance(); 18354 } 18355 else if (name.equals("accident")) { 18356 this.accident = new AccidentComponent(); 18357 return this.accident; 18358 } 18359 else if (name.equals("patientPaid")) { 18360 this.patientPaid = new Money(); 18361 return this.patientPaid; 18362 } 18363 else if (name.equals("item")) { 18364 return addItem(); 18365 } 18366 else if (name.equals("addItem")) { 18367 return addAddItem(); 18368 } 18369 else if (name.equals("adjudication")) { 18370 return addAdjudication(); 18371 } 18372 else if (name.equals("total")) { 18373 return addTotal(); 18374 } 18375 else if (name.equals("payment")) { 18376 this.payment = new PaymentComponent(); 18377 return this.payment; 18378 } 18379 else if (name.equals("formCode")) { 18380 this.formCode = new CodeableConcept(); 18381 return this.formCode; 18382 } 18383 else if (name.equals("form")) { 18384 this.form = new Attachment(); 18385 return this.form; 18386 } 18387 else if (name.equals("processNote")) { 18388 return addProcessNote(); 18389 } 18390 else if (name.equals("benefitPeriod")) { 18391 this.benefitPeriod = new Period(); 18392 return this.benefitPeriod; 18393 } 18394 else if (name.equals("benefitBalance")) { 18395 return addBenefitBalance(); 18396 } 18397 else 18398 return super.addChild(name); 18399 } 18400 18401 public String fhirType() { 18402 return "ExplanationOfBenefit"; 18403 18404 } 18405 18406 public ExplanationOfBenefit copy() { 18407 ExplanationOfBenefit dst = new ExplanationOfBenefit(); 18408 copyValues(dst); 18409 return dst; 18410 } 18411 18412 public void copyValues(ExplanationOfBenefit dst) { 18413 super.copyValues(dst); 18414 if (identifier != null) { 18415 dst.identifier = new ArrayList<Identifier>(); 18416 for (Identifier i : identifier) 18417 dst.identifier.add(i.copy()); 18418 }; 18419 if (traceNumber != null) { 18420 dst.traceNumber = new ArrayList<Identifier>(); 18421 for (Identifier i : traceNumber) 18422 dst.traceNumber.add(i.copy()); 18423 }; 18424 dst.status = status == null ? null : status.copy(); 18425 dst.type = type == null ? null : type.copy(); 18426 dst.subType = subType == null ? null : subType.copy(); 18427 dst.use = use == null ? null : use.copy(); 18428 dst.patient = patient == null ? null : patient.copy(); 18429 dst.billablePeriod = billablePeriod == null ? null : billablePeriod.copy(); 18430 dst.created = created == null ? null : created.copy(); 18431 dst.enterer = enterer == null ? null : enterer.copy(); 18432 dst.insurer = insurer == null ? null : insurer.copy(); 18433 dst.provider = provider == null ? null : provider.copy(); 18434 dst.priority = priority == null ? null : priority.copy(); 18435 dst.fundsReserveRequested = fundsReserveRequested == null ? null : fundsReserveRequested.copy(); 18436 dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); 18437 if (related != null) { 18438 dst.related = new ArrayList<RelatedClaimComponent>(); 18439 for (RelatedClaimComponent i : related) 18440 dst.related.add(i.copy()); 18441 }; 18442 dst.prescription = prescription == null ? null : prescription.copy(); 18443 dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); 18444 if (event != null) { 18445 dst.event = new ArrayList<ExplanationOfBenefitEventComponent>(); 18446 for (ExplanationOfBenefitEventComponent i : event) 18447 dst.event.add(i.copy()); 18448 }; 18449 dst.payee = payee == null ? null : payee.copy(); 18450 dst.referral = referral == null ? null : referral.copy(); 18451 if (encounter != null) { 18452 dst.encounter = new ArrayList<Reference>(); 18453 for (Reference i : encounter) 18454 dst.encounter.add(i.copy()); 18455 }; 18456 dst.facility = facility == null ? null : facility.copy(); 18457 dst.claim = claim == null ? null : claim.copy(); 18458 dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); 18459 dst.outcome = outcome == null ? null : outcome.copy(); 18460 dst.decision = decision == null ? null : decision.copy(); 18461 dst.disposition = disposition == null ? null : disposition.copy(); 18462 if (preAuthRef != null) { 18463 dst.preAuthRef = new ArrayList<StringType>(); 18464 for (StringType i : preAuthRef) 18465 dst.preAuthRef.add(i.copy()); 18466 }; 18467 if (preAuthRefPeriod != null) { 18468 dst.preAuthRefPeriod = new ArrayList<Period>(); 18469 for (Period i : preAuthRefPeriod) 18470 dst.preAuthRefPeriod.add(i.copy()); 18471 }; 18472 dst.diagnosisRelatedGroup = diagnosisRelatedGroup == null ? null : diagnosisRelatedGroup.copy(); 18473 if (careTeam != null) { 18474 dst.careTeam = new ArrayList<CareTeamComponent>(); 18475 for (CareTeamComponent i : careTeam) 18476 dst.careTeam.add(i.copy()); 18477 }; 18478 if (supportingInfo != null) { 18479 dst.supportingInfo = new ArrayList<SupportingInformationComponent>(); 18480 for (SupportingInformationComponent i : supportingInfo) 18481 dst.supportingInfo.add(i.copy()); 18482 }; 18483 if (diagnosis != null) { 18484 dst.diagnosis = new ArrayList<DiagnosisComponent>(); 18485 for (DiagnosisComponent i : diagnosis) 18486 dst.diagnosis.add(i.copy()); 18487 }; 18488 if (procedure != null) { 18489 dst.procedure = new ArrayList<ProcedureComponent>(); 18490 for (ProcedureComponent i : procedure) 18491 dst.procedure.add(i.copy()); 18492 }; 18493 dst.precedence = precedence == null ? null : precedence.copy(); 18494 if (insurance != null) { 18495 dst.insurance = new ArrayList<InsuranceComponent>(); 18496 for (InsuranceComponent i : insurance) 18497 dst.insurance.add(i.copy()); 18498 }; 18499 dst.accident = accident == null ? null : accident.copy(); 18500 dst.patientPaid = patientPaid == null ? null : patientPaid.copy(); 18501 if (item != null) { 18502 dst.item = new ArrayList<ItemComponent>(); 18503 for (ItemComponent i : item) 18504 dst.item.add(i.copy()); 18505 }; 18506 if (addItem != null) { 18507 dst.addItem = new ArrayList<AddedItemComponent>(); 18508 for (AddedItemComponent i : addItem) 18509 dst.addItem.add(i.copy()); 18510 }; 18511 if (adjudication != null) { 18512 dst.adjudication = new ArrayList<AdjudicationComponent>(); 18513 for (AdjudicationComponent i : adjudication) 18514 dst.adjudication.add(i.copy()); 18515 }; 18516 if (total != null) { 18517 dst.total = new ArrayList<TotalComponent>(); 18518 for (TotalComponent i : total) 18519 dst.total.add(i.copy()); 18520 }; 18521 dst.payment = payment == null ? null : payment.copy(); 18522 dst.formCode = formCode == null ? null : formCode.copy(); 18523 dst.form = form == null ? null : form.copy(); 18524 if (processNote != null) { 18525 dst.processNote = new ArrayList<NoteComponent>(); 18526 for (NoteComponent i : processNote) 18527 dst.processNote.add(i.copy()); 18528 }; 18529 dst.benefitPeriod = benefitPeriod == null ? null : benefitPeriod.copy(); 18530 if (benefitBalance != null) { 18531 dst.benefitBalance = new ArrayList<BenefitBalanceComponent>(); 18532 for (BenefitBalanceComponent i : benefitBalance) 18533 dst.benefitBalance.add(i.copy()); 18534 }; 18535 } 18536 18537 protected ExplanationOfBenefit typedCopy() { 18538 return copy(); 18539 } 18540 18541 @Override 18542 public boolean equalsDeep(Base other_) { 18543 if (!super.equalsDeep(other_)) 18544 return false; 18545 if (!(other_ instanceof ExplanationOfBenefit)) 18546 return false; 18547 ExplanationOfBenefit o = (ExplanationOfBenefit) other_; 18548 return compareDeep(identifier, o.identifier, true) && compareDeep(traceNumber, o.traceNumber, true) 18549 && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) 18550 && compareDeep(use, o.use, true) && compareDeep(patient, o.patient, true) && compareDeep(billablePeriod, o.billablePeriod, true) 18551 && compareDeep(created, o.created, true) && compareDeep(enterer, o.enterer, true) && compareDeep(insurer, o.insurer, true) 18552 && compareDeep(provider, o.provider, true) && compareDeep(priority, o.priority, true) && compareDeep(fundsReserveRequested, o.fundsReserveRequested, true) 18553 && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(related, o.related, true) && compareDeep(prescription, o.prescription, true) 18554 && compareDeep(originalPrescription, o.originalPrescription, true) && compareDeep(event, o.event, true) 18555 && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(encounter, o.encounter, true) 18556 && compareDeep(facility, o.facility, true) && compareDeep(claim, o.claim, true) && compareDeep(claimResponse, o.claimResponse, true) 18557 && compareDeep(outcome, o.outcome, true) && compareDeep(decision, o.decision, true) && compareDeep(disposition, o.disposition, true) 18558 && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(preAuthRefPeriod, o.preAuthRefPeriod, true) 18559 && compareDeep(diagnosisRelatedGroup, o.diagnosisRelatedGroup, true) && compareDeep(careTeam, o.careTeam, true) 18560 && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(diagnosis, o.diagnosis, true) 18561 && compareDeep(procedure, o.procedure, true) && compareDeep(precedence, o.precedence, true) && compareDeep(insurance, o.insurance, true) 18562 && compareDeep(accident, o.accident, true) && compareDeep(patientPaid, o.patientPaid, true) && compareDeep(item, o.item, true) 18563 && compareDeep(addItem, o.addItem, true) && compareDeep(adjudication, o.adjudication, true) && compareDeep(total, o.total, true) 18564 && compareDeep(payment, o.payment, true) && compareDeep(formCode, o.formCode, true) && compareDeep(form, o.form, true) 18565 && compareDeep(processNote, o.processNote, true) && compareDeep(benefitPeriod, o.benefitPeriod, true) 18566 && compareDeep(benefitBalance, o.benefitBalance, true); 18567 } 18568 18569 @Override 18570 public boolean equalsShallow(Base other_) { 18571 if (!super.equalsShallow(other_)) 18572 return false; 18573 if (!(other_ instanceof ExplanationOfBenefit)) 18574 return false; 18575 ExplanationOfBenefit o = (ExplanationOfBenefit) other_; 18576 return compareValues(status, o.status, true) && compareValues(use, o.use, true) && compareValues(created, o.created, true) 18577 && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(preAuthRef, o.preAuthRef, true) 18578 && compareValues(precedence, o.precedence, true); 18579 } 18580 18581 public boolean isEmpty() { 18582 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, traceNumber, status 18583 , type, subType, use, patient, billablePeriod, created, enterer, insurer, provider 18584 , priority, fundsReserveRequested, fundsReserve, related, prescription, originalPrescription 18585 , event, payee, referral, encounter, facility, claim, claimResponse, outcome 18586 , decision, disposition, preAuthRef, preAuthRefPeriod, diagnosisRelatedGroup, careTeam 18587 , supportingInfo, diagnosis, procedure, precedence, insurance, accident, patientPaid 18588 , item, addItem, adjudication, total, payment, formCode, form, processNote, benefitPeriod 18589 , benefitBalance); 18590 } 18591 18592 @Override 18593 public ResourceType getResourceType() { 18594 return ResourceType.ExplanationOfBenefit; 18595 } 18596 18597 /** 18598 * Search parameter: <b>care-team</b> 18599 * <p> 18600 * Description: <b>Member of the CareTeam</b><br> 18601 * Type: <b>reference</b><br> 18602 * Path: <b>ExplanationOfBenefit.careTeam.provider</b><br> 18603 * </p> 18604 */ 18605 @SearchParamDefinition(name="care-team", path="ExplanationOfBenefit.careTeam.provider", description="Member of the CareTeam", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } ) 18606 public static final String SP_CARE_TEAM = "care-team"; 18607 /** 18608 * <b>Fluent Client</b> search parameter constant for <b>care-team</b> 18609 * <p> 18610 * Description: <b>Member of the CareTeam</b><br> 18611 * Type: <b>reference</b><br> 18612 * Path: <b>ExplanationOfBenefit.careTeam.provider</b><br> 18613 * </p> 18614 */ 18615 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARE_TEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARE_TEAM); 18616 18617/** 18618 * Constant for fluent queries to be used to add include statements. Specifies 18619 * the path value of "<b>ExplanationOfBenefit:care-team</b>". 18620 */ 18621 public static final ca.uhn.fhir.model.api.Include INCLUDE_CARE_TEAM = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:care-team").toLocked(); 18622 18623 /** 18624 * Search parameter: <b>claim</b> 18625 * <p> 18626 * Description: <b>The reference to the claim</b><br> 18627 * Type: <b>reference</b><br> 18628 * Path: <b>ExplanationOfBenefit.claim</b><br> 18629 * </p> 18630 */ 18631 @SearchParamDefinition(name="claim", path="ExplanationOfBenefit.claim", description="The reference to the claim", type="reference", target={Claim.class } ) 18632 public static final String SP_CLAIM = "claim"; 18633 /** 18634 * <b>Fluent Client</b> search parameter constant for <b>claim</b> 18635 * <p> 18636 * Description: <b>The reference to the claim</b><br> 18637 * Type: <b>reference</b><br> 18638 * Path: <b>ExplanationOfBenefit.claim</b><br> 18639 * </p> 18640 */ 18641 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CLAIM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CLAIM); 18642 18643/** 18644 * Constant for fluent queries to be used to add include statements. Specifies 18645 * the path value of "<b>ExplanationOfBenefit:claim</b>". 18646 */ 18647 public static final ca.uhn.fhir.model.api.Include INCLUDE_CLAIM = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:claim").toLocked(); 18648 18649 /** 18650 * Search parameter: <b>coverage</b> 18651 * <p> 18652 * Description: <b>The plan under which the claim was adjudicated</b><br> 18653 * Type: <b>reference</b><br> 18654 * Path: <b>ExplanationOfBenefit.insurance.coverage</b><br> 18655 * </p> 18656 */ 18657 @SearchParamDefinition(name="coverage", path="ExplanationOfBenefit.insurance.coverage", description="The plan under which the claim was adjudicated", type="reference", target={Coverage.class } ) 18658 public static final String SP_COVERAGE = "coverage"; 18659 /** 18660 * <b>Fluent Client</b> search parameter constant for <b>coverage</b> 18661 * <p> 18662 * Description: <b>The plan under which the claim was adjudicated</b><br> 18663 * Type: <b>reference</b><br> 18664 * Path: <b>ExplanationOfBenefit.insurance.coverage</b><br> 18665 * </p> 18666 */ 18667 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COVERAGE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COVERAGE); 18668 18669/** 18670 * Constant for fluent queries to be used to add include statements. Specifies 18671 * the path value of "<b>ExplanationOfBenefit:coverage</b>". 18672 */ 18673 public static final ca.uhn.fhir.model.api.Include INCLUDE_COVERAGE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:coverage").toLocked(); 18674 18675 /** 18676 * Search parameter: <b>created</b> 18677 * <p> 18678 * Description: <b>The creation date for the EOB</b><br> 18679 * Type: <b>date</b><br> 18680 * Path: <b>ExplanationOfBenefit.created</b><br> 18681 * </p> 18682 */ 18683 @SearchParamDefinition(name="created", path="ExplanationOfBenefit.created", description="The creation date for the EOB", type="date" ) 18684 public static final String SP_CREATED = "created"; 18685 /** 18686 * <b>Fluent Client</b> search parameter constant for <b>created</b> 18687 * <p> 18688 * Description: <b>The creation date for the EOB</b><br> 18689 * Type: <b>date</b><br> 18690 * Path: <b>ExplanationOfBenefit.created</b><br> 18691 * </p> 18692 */ 18693 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 18694 18695 /** 18696 * Search parameter: <b>detail-udi</b> 18697 * <p> 18698 * Description: <b>UDI associated with a line item detail product or service</b><br> 18699 * Type: <b>reference</b><br> 18700 * Path: <b>ExplanationOfBenefit.item.detail.udi</b><br> 18701 * </p> 18702 */ 18703 @SearchParamDefinition(name="detail-udi", path="ExplanationOfBenefit.item.detail.udi", description="UDI associated with a line item detail product or service", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device") }, target={Device.class } ) 18704 public static final String SP_DETAIL_UDI = "detail-udi"; 18705 /** 18706 * <b>Fluent Client</b> search parameter constant for <b>detail-udi</b> 18707 * <p> 18708 * Description: <b>UDI associated with a line item detail product or service</b><br> 18709 * Type: <b>reference</b><br> 18710 * Path: <b>ExplanationOfBenefit.item.detail.udi</b><br> 18711 * </p> 18712 */ 18713 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DETAIL_UDI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DETAIL_UDI); 18714 18715/** 18716 * Constant for fluent queries to be used to add include statements. Specifies 18717 * the path value of "<b>ExplanationOfBenefit:detail-udi</b>". 18718 */ 18719 public static final ca.uhn.fhir.model.api.Include INCLUDE_DETAIL_UDI = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:detail-udi").toLocked(); 18720 18721 /** 18722 * Search parameter: <b>disposition</b> 18723 * <p> 18724 * Description: <b>The contents of the disposition message</b><br> 18725 * Type: <b>string</b><br> 18726 * Path: <b>ExplanationOfBenefit.disposition</b><br> 18727 * </p> 18728 */ 18729 @SearchParamDefinition(name="disposition", path="ExplanationOfBenefit.disposition", description="The contents of the disposition message", type="string" ) 18730 public static final String SP_DISPOSITION = "disposition"; 18731 /** 18732 * <b>Fluent Client</b> search parameter constant for <b>disposition</b> 18733 * <p> 18734 * Description: <b>The contents of the disposition message</b><br> 18735 * Type: <b>string</b><br> 18736 * Path: <b>ExplanationOfBenefit.disposition</b><br> 18737 * </p> 18738 */ 18739 public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); 18740 18741 /** 18742 * Search parameter: <b>enterer</b> 18743 * <p> 18744 * Description: <b>The party responsible for the entry of the Claim</b><br> 18745 * Type: <b>reference</b><br> 18746 * Path: <b>ExplanationOfBenefit.enterer</b><br> 18747 * </p> 18748 */ 18749 @SearchParamDefinition(name="enterer", path="ExplanationOfBenefit.enterer", description="The party responsible for the entry of the Claim", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 18750 public static final String SP_ENTERER = "enterer"; 18751 /** 18752 * <b>Fluent Client</b> search parameter constant for <b>enterer</b> 18753 * <p> 18754 * Description: <b>The party responsible for the entry of the Claim</b><br> 18755 * Type: <b>reference</b><br> 18756 * Path: <b>ExplanationOfBenefit.enterer</b><br> 18757 * </p> 18758 */ 18759 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTERER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTERER); 18760 18761/** 18762 * Constant for fluent queries to be used to add include statements. Specifies 18763 * the path value of "<b>ExplanationOfBenefit:enterer</b>". 18764 */ 18765 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTERER = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:enterer").toLocked(); 18766 18767 /** 18768 * Search parameter: <b>facility</b> 18769 * <p> 18770 * Description: <b>Facility responsible for the goods and services</b><br> 18771 * Type: <b>reference</b><br> 18772 * Path: <b>ExplanationOfBenefit.facility</b><br> 18773 * </p> 18774 */ 18775 @SearchParamDefinition(name="facility", path="ExplanationOfBenefit.facility", description="Facility responsible for the goods and services", type="reference", target={Location.class, Organization.class } ) 18776 public static final String SP_FACILITY = "facility"; 18777 /** 18778 * <b>Fluent Client</b> search parameter constant for <b>facility</b> 18779 * <p> 18780 * Description: <b>Facility responsible for the goods and services</b><br> 18781 * Type: <b>reference</b><br> 18782 * Path: <b>ExplanationOfBenefit.facility</b><br> 18783 * </p> 18784 */ 18785 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITY); 18786 18787/** 18788 * Constant for fluent queries to be used to add include statements. Specifies 18789 * the path value of "<b>ExplanationOfBenefit:facility</b>". 18790 */ 18791 public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITY = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:facility").toLocked(); 18792 18793 /** 18794 * Search parameter: <b>item-udi</b> 18795 * <p> 18796 * Description: <b>UDI associated with a line item product or service</b><br> 18797 * Type: <b>reference</b><br> 18798 * Path: <b>ExplanationOfBenefit.item.udi</b><br> 18799 * </p> 18800 */ 18801 @SearchParamDefinition(name="item-udi", path="ExplanationOfBenefit.item.udi", description="UDI associated with a line item product or service", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device") }, target={Device.class } ) 18802 public static final String SP_ITEM_UDI = "item-udi"; 18803 /** 18804 * <b>Fluent Client</b> search parameter constant for <b>item-udi</b> 18805 * <p> 18806 * Description: <b>UDI associated with a line item product or service</b><br> 18807 * Type: <b>reference</b><br> 18808 * Path: <b>ExplanationOfBenefit.item.udi</b><br> 18809 * </p> 18810 */ 18811 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM_UDI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM_UDI); 18812 18813/** 18814 * Constant for fluent queries to be used to add include statements. Specifies 18815 * the path value of "<b>ExplanationOfBenefit:item-udi</b>". 18816 */ 18817 public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM_UDI = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:item-udi").toLocked(); 18818 18819 /** 18820 * Search parameter: <b>payee</b> 18821 * <p> 18822 * Description: <b>The party receiving any payment for the Claim</b><br> 18823 * Type: <b>reference</b><br> 18824 * Path: <b>ExplanationOfBenefit.payee.party</b><br> 18825 * </p> 18826 */ 18827 @SearchParamDefinition(name="payee", path="ExplanationOfBenefit.payee.party", description="The party receiving any payment for the Claim", 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 Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 18828 public static final String SP_PAYEE = "payee"; 18829 /** 18830 * <b>Fluent Client</b> search parameter constant for <b>payee</b> 18831 * <p> 18832 * Description: <b>The party receiving any payment for the Claim</b><br> 18833 * Type: <b>reference</b><br> 18834 * Path: <b>ExplanationOfBenefit.payee.party</b><br> 18835 * </p> 18836 */ 18837 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PAYEE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PAYEE); 18838 18839/** 18840 * Constant for fluent queries to be used to add include statements. Specifies 18841 * the path value of "<b>ExplanationOfBenefit:payee</b>". 18842 */ 18843 public static final ca.uhn.fhir.model.api.Include INCLUDE_PAYEE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:payee").toLocked(); 18844 18845 /** 18846 * Search parameter: <b>procedure-udi</b> 18847 * <p> 18848 * Description: <b>UDI associated with a procedure</b><br> 18849 * Type: <b>reference</b><br> 18850 * Path: <b>ExplanationOfBenefit.procedure.udi</b><br> 18851 * </p> 18852 */ 18853 @SearchParamDefinition(name="procedure-udi", path="ExplanationOfBenefit.procedure.udi", description="UDI associated with a procedure", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device") }, target={Device.class } ) 18854 public static final String SP_PROCEDURE_UDI = "procedure-udi"; 18855 /** 18856 * <b>Fluent Client</b> search parameter constant for <b>procedure-udi</b> 18857 * <p> 18858 * Description: <b>UDI associated with a procedure</b><br> 18859 * Type: <b>reference</b><br> 18860 * Path: <b>ExplanationOfBenefit.procedure.udi</b><br> 18861 * </p> 18862 */ 18863 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROCEDURE_UDI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROCEDURE_UDI); 18864 18865/** 18866 * Constant for fluent queries to be used to add include statements. Specifies 18867 * the path value of "<b>ExplanationOfBenefit:procedure-udi</b>". 18868 */ 18869 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROCEDURE_UDI = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:procedure-udi").toLocked(); 18870 18871 /** 18872 * Search parameter: <b>provider</b> 18873 * <p> 18874 * Description: <b>The reference to the provider</b><br> 18875 * Type: <b>reference</b><br> 18876 * Path: <b>ExplanationOfBenefit.provider</b><br> 18877 * </p> 18878 */ 18879 @SearchParamDefinition(name="provider", path="ExplanationOfBenefit.provider", description="The reference to the provider", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } ) 18880 public static final String SP_PROVIDER = "provider"; 18881 /** 18882 * <b>Fluent Client</b> search parameter constant for <b>provider</b> 18883 * <p> 18884 * Description: <b>The reference to the provider</b><br> 18885 * Type: <b>reference</b><br> 18886 * Path: <b>ExplanationOfBenefit.provider</b><br> 18887 * </p> 18888 */ 18889 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); 18890 18891/** 18892 * Constant for fluent queries to be used to add include statements. Specifies 18893 * the path value of "<b>ExplanationOfBenefit:provider</b>". 18894 */ 18895 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:provider").toLocked(); 18896 18897 /** 18898 * Search parameter: <b>status</b> 18899 * <p> 18900 * Description: <b>Status of the instance</b><br> 18901 * Type: <b>token</b><br> 18902 * Path: <b>ExplanationOfBenefit.status</b><br> 18903 * </p> 18904 */ 18905 @SearchParamDefinition(name="status", path="ExplanationOfBenefit.status", description="Status of the instance", type="token" ) 18906 public static final String SP_STATUS = "status"; 18907 /** 18908 * <b>Fluent Client</b> search parameter constant for <b>status</b> 18909 * <p> 18910 * Description: <b>Status of the instance</b><br> 18911 * Type: <b>token</b><br> 18912 * Path: <b>ExplanationOfBenefit.status</b><br> 18913 * </p> 18914 */ 18915 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 18916 18917 /** 18918 * Search parameter: <b>subdetail-udi</b> 18919 * <p> 18920 * Description: <b>UDI associated with a line item detail subdetail product or service</b><br> 18921 * Type: <b>reference</b><br> 18922 * Path: <b>ExplanationOfBenefit.item.detail.subDetail.udi</b><br> 18923 * </p> 18924 */ 18925 @SearchParamDefinition(name="subdetail-udi", path="ExplanationOfBenefit.item.detail.subDetail.udi", description="UDI associated with a line item detail subdetail product or service", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device") }, target={Device.class } ) 18926 public static final String SP_SUBDETAIL_UDI = "subdetail-udi"; 18927 /** 18928 * <b>Fluent Client</b> search parameter constant for <b>subdetail-udi</b> 18929 * <p> 18930 * Description: <b>UDI associated with a line item detail subdetail product or service</b><br> 18931 * Type: <b>reference</b><br> 18932 * Path: <b>ExplanationOfBenefit.item.detail.subDetail.udi</b><br> 18933 * </p> 18934 */ 18935 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBDETAIL_UDI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBDETAIL_UDI); 18936 18937/** 18938 * Constant for fluent queries to be used to add include statements. Specifies 18939 * the path value of "<b>ExplanationOfBenefit:subdetail-udi</b>". 18940 */ 18941 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBDETAIL_UDI = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:subdetail-udi").toLocked(); 18942 18943 /** 18944 * Search parameter: <b>encounter</b> 18945 * <p> 18946 * Description: <b>Multiple Resources: 18947 18948* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent 18949* [CarePlan](careplan.html): The Encounter during which this CarePlan was created 18950* [ChargeItem](chargeitem.html): Encounter associated with event 18951* [Claim](claim.html): Encounters associated with a billed line item 18952* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created 18953* [Communication](communication.html): The Encounter during which this Communication was created 18954* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created 18955* [Composition](composition.html): Context of the Composition 18956* [Condition](condition.html): The Encounter during which this Condition was created 18957* [DeviceRequest](devicerequest.html): Encounter during which request was created 18958* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 18959* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values 18960* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item 18961* [Flag](flag.html): Alert relevant during encounter 18962* [ImagingStudy](imagingstudy.html): The context of the study 18963* [List](list.html): Context in which list created 18964* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter 18965* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter 18966* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter 18967* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 18968* [Observation](observation.html): Encounter related to the observation 18969* [Procedure](procedure.html): The Encounter during which this Procedure was created 18970* [Provenance](provenance.html): Encounter related to the Provenance 18971* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response 18972* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to 18973* [RiskAssessment](riskassessment.html): Where was assessment performed? 18974* [ServiceRequest](servicerequest.html): An encounter in which this request is made 18975* [Task](task.html): Search by encounter 18976* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 18977</b><br> 18978 * Type: <b>reference</b><br> 18979 * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br> 18980 * </p> 18981 */ 18982 @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } ) 18983 public static final String SP_ENCOUNTER = "encounter"; 18984 /** 18985 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 18986 * <p> 18987 * Description: <b>Multiple Resources: 18988 18989* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent 18990* [CarePlan](careplan.html): The Encounter during which this CarePlan was created 18991* [ChargeItem](chargeitem.html): Encounter associated with event 18992* [Claim](claim.html): Encounters associated with a billed line item 18993* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created 18994* [Communication](communication.html): The Encounter during which this Communication was created 18995* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created 18996* [Composition](composition.html): Context of the Composition 18997* [Condition](condition.html): The Encounter during which this Condition was created 18998* [DeviceRequest](devicerequest.html): Encounter during which request was created 18999* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 19000* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values 19001* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item 19002* [Flag](flag.html): Alert relevant during encounter 19003* [ImagingStudy](imagingstudy.html): The context of the study 19004* [List](list.html): Context in which list created 19005* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter 19006* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter 19007* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter 19008* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 19009* [Observation](observation.html): Encounter related to the observation 19010* [Procedure](procedure.html): The Encounter during which this Procedure was created 19011* [Provenance](provenance.html): Encounter related to the Provenance 19012* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response 19013* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to 19014* [RiskAssessment](riskassessment.html): Where was assessment performed? 19015* [ServiceRequest](servicerequest.html): An encounter in which this request is made 19016* [Task](task.html): Search by encounter 19017* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 19018</b><br> 19019 * Type: <b>reference</b><br> 19020 * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br> 19021 * </p> 19022 */ 19023 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 19024 19025/** 19026 * Constant for fluent queries to be used to add include statements. Specifies 19027 * the path value of "<b>ExplanationOfBenefit:encounter</b>". 19028 */ 19029 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:encounter").toLocked(); 19030 19031 /** 19032 * Search parameter: <b>identifier</b> 19033 * <p> 19034 * Description: <b>Multiple Resources: 19035 19036* [Account](account.html): Account number 19037* [AdverseEvent](adverseevent.html): Business identifier for the event 19038* [AllergyIntolerance](allergyintolerance.html): External ids for this item 19039* [Appointment](appointment.html): An Identifier of the Appointment 19040* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response 19041* [Basic](basic.html): Business identifier 19042* [BodyStructure](bodystructure.html): Bodystructure identifier 19043* [CarePlan](careplan.html): External Ids for this plan 19044* [CareTeam](careteam.html): External Ids for this team 19045* [ChargeItem](chargeitem.html): Business Identifier for item 19046* [Claim](claim.html): The primary identifier of the financial resource 19047* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse 19048* [ClinicalImpression](clinicalimpression.html): Business identifier 19049* [Communication](communication.html): Unique identifier 19050* [CommunicationRequest](communicationrequest.html): Unique identifier 19051* [Composition](composition.html): Version-independent identifier for the Composition 19052* [Condition](condition.html): A unique identifier of the condition record 19053* [Consent](consent.html): Identifier for this record (external references) 19054* [Contract](contract.html): The identity of the contract 19055* [Coverage](coverage.html): The primary identifier of the insured and the coverage 19056* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility 19057* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier 19058* [DetectedIssue](detectedissue.html): Unique id for the detected issue 19059* [DeviceRequest](devicerequest.html): Business identifier for request/order 19060* [DeviceUsage](deviceusage.html): Search by identifier 19061* [DiagnosticReport](diagnosticreport.html): An identifier for the report 19062* [DocumentReference](documentreference.html): Identifier of the attachment binary 19063* [Encounter](encounter.html): Identifier(s) by which this encounter is known 19064* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment 19065* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 19066* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit 19067* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 19068* [Flag](flag.html): Business identifier 19069* [Goal](goal.html): External Ids for this goal 19070* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response 19071* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection 19072* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 19073* [Immunization](immunization.html): Business identifier 19074* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation 19075* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier 19076* [Invoice](invoice.html): Business Identifier for item 19077* [List](list.html): Business identifier 19078* [MeasureReport](measurereport.html): External identifier of the measure report to be returned 19079* [Medication](medication.html): Returns medications with this external identifier 19080* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 19081* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 19082* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 19083* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 19084* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence 19085* [NutritionIntake](nutritionintake.html): Return statements with this external identifier 19086* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 19087* [Observation](observation.html): The unique id for a particular observation 19088* [Person](person.html): A person Identifier 19089* [Procedure](procedure.html): A unique identifier for a procedure 19090* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response 19091* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson 19092* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration 19093* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study 19094* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 19095* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 19096* [Specimen](specimen.html): The unique identifier associated with the specimen 19097* [SupplyDelivery](supplydelivery.html): External identifier 19098* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 19099* [Task](task.html): Search for a task instance by its business identifier 19100* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 19101</b><br> 19102 * Type: <b>token</b><br> 19103 * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br> 19104 * </p> 19105 */ 19106 @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 19107 public static final String SP_IDENTIFIER = "identifier"; 19108 /** 19109 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 19110 * <p> 19111 * Description: <b>Multiple Resources: 19112 19113* [Account](account.html): Account number 19114* [AdverseEvent](adverseevent.html): Business identifier for the event 19115* [AllergyIntolerance](allergyintolerance.html): External ids for this item 19116* [Appointment](appointment.html): An Identifier of the Appointment 19117* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response 19118* [Basic](basic.html): Business identifier 19119* [BodyStructure](bodystructure.html): Bodystructure identifier 19120* [CarePlan](careplan.html): External Ids for this plan 19121* [CareTeam](careteam.html): External Ids for this team 19122* [ChargeItem](chargeitem.html): Business Identifier for item 19123* [Claim](claim.html): The primary identifier of the financial resource 19124* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse 19125* [ClinicalImpression](clinicalimpression.html): Business identifier 19126* [Communication](communication.html): Unique identifier 19127* [CommunicationRequest](communicationrequest.html): Unique identifier 19128* [Composition](composition.html): Version-independent identifier for the Composition 19129* [Condition](condition.html): A unique identifier of the condition record 19130* [Consent](consent.html): Identifier for this record (external references) 19131* [Contract](contract.html): The identity of the contract 19132* [Coverage](coverage.html): The primary identifier of the insured and the coverage 19133* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility 19134* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier 19135* [DetectedIssue](detectedissue.html): Unique id for the detected issue 19136* [DeviceRequest](devicerequest.html): Business identifier for request/order 19137* [DeviceUsage](deviceusage.html): Search by identifier 19138* [DiagnosticReport](diagnosticreport.html): An identifier for the report 19139* [DocumentReference](documentreference.html): Identifier of the attachment binary 19140* [Encounter](encounter.html): Identifier(s) by which this encounter is known 19141* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment 19142* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 19143* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit 19144* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 19145* [Flag](flag.html): Business identifier 19146* [Goal](goal.html): External Ids for this goal 19147* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response 19148* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection 19149* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 19150* [Immunization](immunization.html): Business identifier 19151* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation 19152* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier 19153* [Invoice](invoice.html): Business Identifier for item 19154* [List](list.html): Business identifier 19155* [MeasureReport](measurereport.html): External identifier of the measure report to be returned 19156* [Medication](medication.html): Returns medications with this external identifier 19157* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 19158* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 19159* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 19160* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 19161* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence 19162* [NutritionIntake](nutritionintake.html): Return statements with this external identifier 19163* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 19164* [Observation](observation.html): The unique id for a particular observation 19165* [Person](person.html): A person Identifier 19166* [Procedure](procedure.html): A unique identifier for a procedure 19167* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response 19168* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson 19169* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration 19170* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study 19171* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 19172* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 19173* [Specimen](specimen.html): The unique identifier associated with the specimen 19174* [SupplyDelivery](supplydelivery.html): External identifier 19175* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 19176* [Task](task.html): Search for a task instance by its business identifier 19177* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 19178</b><br> 19179 * Type: <b>token</b><br> 19180 * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br> 19181 * </p> 19182 */ 19183 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 19184 19185 /** 19186 * Search parameter: <b>patient</b> 19187 * <p> 19188 * Description: <b>Multiple Resources: 19189 19190* [Account](account.html): The entity that caused the expenses 19191* [AdverseEvent](adverseevent.html): Subject impacted by event 19192* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 19193* [Appointment](appointment.html): One of the individuals of the appointment is this patient 19194* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient 19195* [AuditEvent](auditevent.html): Where the activity involved patient data 19196* [Basic](basic.html): Identifies the focus of this resource 19197* [BodyStructure](bodystructure.html): Who this is about 19198* [CarePlan](careplan.html): Who the care plan is for 19199* [CareTeam](careteam.html): Who care team is for 19200* [ChargeItem](chargeitem.html): Individual service was done for/to 19201* [Claim](claim.html): Patient receiving the products or services 19202* [ClaimResponse](claimresponse.html): The subject of care 19203* [ClinicalImpression](clinicalimpression.html): Patient assessed 19204* [Communication](communication.html): Focus of message 19205* [CommunicationRequest](communicationrequest.html): Focus of message 19206* [Composition](composition.html): Who and/or what the composition is about 19207* [Condition](condition.html): Who has the condition? 19208* [Consent](consent.html): Who the consent applies to 19209* [Contract](contract.html): The identity of the subject of the contract (if a patient) 19210* [Coverage](coverage.html): Retrieve coverages for a patient 19211* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient 19212* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient 19213* [DetectedIssue](detectedissue.html): Associated patient 19214* [DeviceRequest](devicerequest.html): Individual the service is ordered for 19215* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 19216* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 19217* [DocumentReference](documentreference.html): Who/what is the subject of the document 19218* [Encounter](encounter.html): The patient present at the encounter 19219* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled 19220* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 19221* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient 19222* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 19223* [Flag](flag.html): The identity of a subject to list flags for 19224* [Goal](goal.html): Who this goal is intended for 19225* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results 19226* [ImagingSelection](imagingselection.html): Who the study is about 19227* [ImagingStudy](imagingstudy.html): Who the study is about 19228* [Immunization](immunization.html): The patient for the vaccination record 19229* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated 19230* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for 19231* [Invoice](invoice.html): Recipient(s) of goods and services 19232* [List](list.html): If all resources have the same subject 19233* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for 19234* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 19235* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 19236* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 19237* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 19238* [MolecularSequence](molecularsequence.html): The subject that the sequence is about 19239* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. 19240* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 19241* [Observation](observation.html): The subject that the observation is about (if patient) 19242* [Person](person.html): The Person links to this Patient 19243* [Procedure](procedure.html): Search by subject - a patient 19244* [Provenance](provenance.html): Where the activity involved patient data 19245* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response 19246* [RelatedPerson](relatedperson.html): The patient this related person is related to 19247* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations 19248* [ResearchSubject](researchsubject.html): Who or what is part of study 19249* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 19250* [ServiceRequest](servicerequest.html): Search by subject - a patient 19251* [Specimen](specimen.html): The patient the specimen comes from 19252* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 19253* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 19254* [Task](task.html): Search by patient 19255* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 19256</b><br> 19257 * Type: <b>reference</b><br> 19258 * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br> 19259 * </p> 19260 */ 19261 @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) 19262 public static final String SP_PATIENT = "patient"; 19263 /** 19264 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 19265 * <p> 19266 * Description: <b>Multiple Resources: 19267 19268* [Account](account.html): The entity that caused the expenses 19269* [AdverseEvent](adverseevent.html): Subject impacted by event 19270* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 19271* [Appointment](appointment.html): One of the individuals of the appointment is this patient 19272* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient 19273* [AuditEvent](auditevent.html): Where the activity involved patient data 19274* [Basic](basic.html): Identifies the focus of this resource 19275* [BodyStructure](bodystructure.html): Who this is about 19276* [CarePlan](careplan.html): Who the care plan is for 19277* [CareTeam](careteam.html): Who care team is for 19278* [ChargeItem](chargeitem.html): Individual service was done for/to 19279* [Claim](claim.html): Patient receiving the products or services 19280* [ClaimResponse](claimresponse.html): The subject of care 19281* [ClinicalImpression](clinicalimpression.html): Patient assessed 19282* [Communication](communication.html): Focus of message 19283* [CommunicationRequest](communicationrequest.html): Focus of message 19284* [Composition](composition.html): Who and/or what the composition is about 19285* [Condition](condition.html): Who has the condition? 19286* [Consent](consent.html): Who the consent applies to 19287* [Contract](contract.html): The identity of the subject of the contract (if a patient) 19288* [Coverage](coverage.html): Retrieve coverages for a patient 19289* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient 19290* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient 19291* [DetectedIssue](detectedissue.html): Associated patient 19292* [DeviceRequest](devicerequest.html): Individual the service is ordered for 19293* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 19294* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 19295* [DocumentReference](documentreference.html): Who/what is the subject of the document 19296* [Encounter](encounter.html): The patient present at the encounter 19297* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled 19298* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 19299* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient 19300* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 19301* [Flag](flag.html): The identity of a subject to list flags for 19302* [Goal](goal.html): Who this goal is intended for 19303* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results 19304* [ImagingSelection](imagingselection.html): Who the study is about 19305* [ImagingStudy](imagingstudy.html): Who the study is about 19306* [Immunization](immunization.html): The patient for the vaccination record 19307* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated 19308* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for 19309* [Invoice](invoice.html): Recipient(s) of goods and services 19310* [List](list.html): If all resources have the same subject 19311* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for 19312* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 19313* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 19314* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 19315* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 19316* [MolecularSequence](molecularsequence.html): The subject that the sequence is about 19317* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. 19318* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 19319* [Observation](observation.html): The subject that the observation is about (if patient) 19320* [Person](person.html): The Person links to this Patient 19321* [Procedure](procedure.html): Search by subject - a patient 19322* [Provenance](provenance.html): Where the activity involved patient data 19323* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response 19324* [RelatedPerson](relatedperson.html): The patient this related person is related to 19325* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations 19326* [ResearchSubject](researchsubject.html): Who or what is part of study 19327* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 19328* [ServiceRequest](servicerequest.html): Search by subject - a patient 19329* [Specimen](specimen.html): The patient the specimen comes from 19330* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 19331* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 19332* [Task](task.html): Search by patient 19333* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 19334</b><br> 19335 * Type: <b>reference</b><br> 19336 * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br> 19337 * </p> 19338 */ 19339 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 19340 19341/** 19342 * Constant for fluent queries to be used to add include statements. Specifies 19343 * the path value of "<b>ExplanationOfBenefit:patient</b>". 19344 */ 19345 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:patient").toLocked(); 19346 19347 19348} 19349