
001package org.hl7.fhir.dstu3.model; 002 003import java.math.BigDecimal; 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 035import java.util.ArrayList; 036import java.util.Date; 037import java.util.List; 038 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * This resource provides the adjudication details from the processing of a Claim resource. 050 */ 051@ResourceDef(name="ClaimResponse", profile="http://hl7.org/fhir/Profile/ClaimResponse") 052public class ClaimResponse extends DomainResource { 053 054 public enum ClaimResponseStatus { 055 /** 056 * The instance is currently in-force. 057 */ 058 ACTIVE, 059 /** 060 * The instance is withdrawn, rescinded or reversed. 061 */ 062 CANCELLED, 063 /** 064 * A new instance the contents of which is not complete. 065 */ 066 DRAFT, 067 /** 068 * The instance was entered in error. 069 */ 070 ENTEREDINERROR, 071 /** 072 * added to help the parsers with the generic types 073 */ 074 NULL; 075 public static ClaimResponseStatus fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("active".equals(codeString)) 079 return ACTIVE; 080 if ("cancelled".equals(codeString)) 081 return CANCELLED; 082 if ("draft".equals(codeString)) 083 return DRAFT; 084 if ("entered-in-error".equals(codeString)) 085 return ENTEREDINERROR; 086 if (Configuration.isAcceptInvalidEnums()) 087 return null; 088 else 089 throw new FHIRException("Unknown ClaimResponseStatus code '"+codeString+"'"); 090 } 091 public String toCode() { 092 switch (this) { 093 case ACTIVE: return "active"; 094 case CANCELLED: return "cancelled"; 095 case DRAFT: return "draft"; 096 case ENTEREDINERROR: return "entered-in-error"; 097 case NULL: return null; 098 default: return "?"; 099 } 100 } 101 public String getSystem() { 102 switch (this) { 103 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 104 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 105 case DRAFT: return "http://hl7.org/fhir/fm-status"; 106 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 107 case NULL: return null; 108 default: return "?"; 109 } 110 } 111 public String getDefinition() { 112 switch (this) { 113 case ACTIVE: return "The instance is currently in-force."; 114 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 115 case DRAFT: return "A new instance the contents of which is not complete."; 116 case ENTEREDINERROR: return "The instance was entered in error."; 117 case NULL: return null; 118 default: return "?"; 119 } 120 } 121 public String getDisplay() { 122 switch (this) { 123 case ACTIVE: return "Active"; 124 case CANCELLED: return "Cancelled"; 125 case DRAFT: return "Draft"; 126 case ENTEREDINERROR: return "Entered in Error"; 127 case NULL: return null; 128 default: return "?"; 129 } 130 } 131 } 132 133 public static class ClaimResponseStatusEnumFactory implements EnumFactory<ClaimResponseStatus> { 134 public ClaimResponseStatus fromCode(String codeString) throws IllegalArgumentException { 135 if (codeString == null || "".equals(codeString)) 136 if (codeString == null || "".equals(codeString)) 137 return null; 138 if ("active".equals(codeString)) 139 return ClaimResponseStatus.ACTIVE; 140 if ("cancelled".equals(codeString)) 141 return ClaimResponseStatus.CANCELLED; 142 if ("draft".equals(codeString)) 143 return ClaimResponseStatus.DRAFT; 144 if ("entered-in-error".equals(codeString)) 145 return ClaimResponseStatus.ENTEREDINERROR; 146 throw new IllegalArgumentException("Unknown ClaimResponseStatus code '"+codeString+"'"); 147 } 148 public Enumeration<ClaimResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException { 149 if (code == null) 150 return null; 151 if (code.isEmpty()) 152 return new Enumeration<ClaimResponseStatus>(this); 153 String codeString = code.asStringValue(); 154 if (codeString == null || "".equals(codeString)) 155 return null; 156 if ("active".equals(codeString)) 157 return new Enumeration<ClaimResponseStatus>(this, ClaimResponseStatus.ACTIVE); 158 if ("cancelled".equals(codeString)) 159 return new Enumeration<ClaimResponseStatus>(this, ClaimResponseStatus.CANCELLED); 160 if ("draft".equals(codeString)) 161 return new Enumeration<ClaimResponseStatus>(this, ClaimResponseStatus.DRAFT); 162 if ("entered-in-error".equals(codeString)) 163 return new Enumeration<ClaimResponseStatus>(this, ClaimResponseStatus.ENTEREDINERROR); 164 throw new FHIRException("Unknown ClaimResponseStatus code '"+codeString+"'"); 165 } 166 public String toCode(ClaimResponseStatus code) { 167 if (code == ClaimResponseStatus.ACTIVE) 168 return "active"; 169 if (code == ClaimResponseStatus.CANCELLED) 170 return "cancelled"; 171 if (code == ClaimResponseStatus.DRAFT) 172 return "draft"; 173 if (code == ClaimResponseStatus.ENTEREDINERROR) 174 return "entered-in-error"; 175 return "?"; 176 } 177 public String toSystem(ClaimResponseStatus code) { 178 return code.getSystem(); 179 } 180 } 181 182 @Block() 183 public static class ItemComponent extends BackboneElement implements IBaseBackboneElement { 184 /** 185 * A service line number. 186 */ 187 @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 188 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 189 protected PositiveIntType sequenceLinkId; 190 191 /** 192 * A list of note references to the notes provided below. 193 */ 194 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 195 @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) 196 protected List<PositiveIntType> noteNumber; 197 198 /** 199 * The adjudication results. 200 */ 201 @Child(name = "adjudication", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 202 @Description(shortDefinition="Adjudication details", formalDefinition="The adjudication results." ) 203 protected List<AdjudicationComponent> adjudication; 204 205 /** 206 * The second tier service adjudications for submitted services. 207 */ 208 @Child(name = "detail", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 209 @Description(shortDefinition="Detail line items", formalDefinition="The second tier service adjudications for submitted services." ) 210 protected List<ItemDetailComponent> detail; 211 212 private static final long serialVersionUID = -1282041398L; 213 214 /** 215 * Constructor 216 */ 217 public ItemComponent() { 218 super(); 219 } 220 221 /** 222 * Constructor 223 */ 224 public ItemComponent(PositiveIntType sequenceLinkId) { 225 super(); 226 this.sequenceLinkId = sequenceLinkId; 227 } 228 229 /** 230 * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 231 */ 232 public PositiveIntType getSequenceLinkIdElement() { 233 if (this.sequenceLinkId == null) 234 if (Configuration.errorOnAutoCreate()) 235 throw new Error("Attempt to auto-create ItemComponent.sequenceLinkId"); 236 else if (Configuration.doAutoCreate()) 237 this.sequenceLinkId = new PositiveIntType(); // bb 238 return this.sequenceLinkId; 239 } 240 241 public boolean hasSequenceLinkIdElement() { 242 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 243 } 244 245 public boolean hasSequenceLinkId() { 246 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 247 } 248 249 /** 250 * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 251 */ 252 public ItemComponent setSequenceLinkIdElement(PositiveIntType value) { 253 this.sequenceLinkId = value; 254 return this; 255 } 256 257 /** 258 * @return A service line number. 259 */ 260 public int getSequenceLinkId() { 261 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 262 } 263 264 /** 265 * @param value A service line number. 266 */ 267 public ItemComponent setSequenceLinkId(int value) { 268 if (this.sequenceLinkId == null) 269 this.sequenceLinkId = new PositiveIntType(); 270 this.sequenceLinkId.setValue(value); 271 return this; 272 } 273 274 /** 275 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 276 */ 277 public List<PositiveIntType> getNoteNumber() { 278 if (this.noteNumber == null) 279 this.noteNumber = new ArrayList<PositiveIntType>(); 280 return this.noteNumber; 281 } 282 283 /** 284 * @return Returns a reference to <code>this</code> for easy method chaining 285 */ 286 public ItemComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 287 this.noteNumber = theNoteNumber; 288 return this; 289 } 290 291 public boolean hasNoteNumber() { 292 if (this.noteNumber == null) 293 return false; 294 for (PositiveIntType item : this.noteNumber) 295 if (!item.isEmpty()) 296 return true; 297 return false; 298 } 299 300 /** 301 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 302 */ 303 public PositiveIntType addNoteNumberElement() {//2 304 PositiveIntType t = new PositiveIntType(); 305 if (this.noteNumber == null) 306 this.noteNumber = new ArrayList<PositiveIntType>(); 307 this.noteNumber.add(t); 308 return t; 309 } 310 311 /** 312 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 313 */ 314 public ItemComponent addNoteNumber(int value) { //1 315 PositiveIntType t = new PositiveIntType(); 316 t.setValue(value); 317 if (this.noteNumber == null) 318 this.noteNumber = new ArrayList<PositiveIntType>(); 319 this.noteNumber.add(t); 320 return this; 321 } 322 323 /** 324 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 325 */ 326 public boolean hasNoteNumber(int value) { 327 if (this.noteNumber == null) 328 return false; 329 for (PositiveIntType v : this.noteNumber) 330 if (v.getValue().equals(value)) // positiveInt 331 return true; 332 return false; 333 } 334 335 /** 336 * @return {@link #adjudication} (The adjudication results.) 337 */ 338 public List<AdjudicationComponent> getAdjudication() { 339 if (this.adjudication == null) 340 this.adjudication = new ArrayList<AdjudicationComponent>(); 341 return this.adjudication; 342 } 343 344 /** 345 * @return Returns a reference to <code>this</code> for easy method chaining 346 */ 347 public ItemComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 348 this.adjudication = theAdjudication; 349 return this; 350 } 351 352 public boolean hasAdjudication() { 353 if (this.adjudication == null) 354 return false; 355 for (AdjudicationComponent item : this.adjudication) 356 if (!item.isEmpty()) 357 return true; 358 return false; 359 } 360 361 public AdjudicationComponent addAdjudication() { //3 362 AdjudicationComponent t = new AdjudicationComponent(); 363 if (this.adjudication == null) 364 this.adjudication = new ArrayList<AdjudicationComponent>(); 365 this.adjudication.add(t); 366 return t; 367 } 368 369 public ItemComponent addAdjudication(AdjudicationComponent t) { //3 370 if (t == null) 371 return this; 372 if (this.adjudication == null) 373 this.adjudication = new ArrayList<AdjudicationComponent>(); 374 this.adjudication.add(t); 375 return this; 376 } 377 378 /** 379 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist 380 */ 381 public AdjudicationComponent getAdjudicationFirstRep() { 382 if (getAdjudication().isEmpty()) { 383 addAdjudication(); 384 } 385 return getAdjudication().get(0); 386 } 387 388 /** 389 * @return {@link #detail} (The second tier service adjudications for submitted services.) 390 */ 391 public List<ItemDetailComponent> getDetail() { 392 if (this.detail == null) 393 this.detail = new ArrayList<ItemDetailComponent>(); 394 return this.detail; 395 } 396 397 /** 398 * @return Returns a reference to <code>this</code> for easy method chaining 399 */ 400 public ItemComponent setDetail(List<ItemDetailComponent> theDetail) { 401 this.detail = theDetail; 402 return this; 403 } 404 405 public boolean hasDetail() { 406 if (this.detail == null) 407 return false; 408 for (ItemDetailComponent item : this.detail) 409 if (!item.isEmpty()) 410 return true; 411 return false; 412 } 413 414 public ItemDetailComponent addDetail() { //3 415 ItemDetailComponent t = new ItemDetailComponent(); 416 if (this.detail == null) 417 this.detail = new ArrayList<ItemDetailComponent>(); 418 this.detail.add(t); 419 return t; 420 } 421 422 public ItemComponent addDetail(ItemDetailComponent t) { //3 423 if (t == null) 424 return this; 425 if (this.detail == null) 426 this.detail = new ArrayList<ItemDetailComponent>(); 427 this.detail.add(t); 428 return this; 429 } 430 431 /** 432 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist 433 */ 434 public ItemDetailComponent getDetailFirstRep() { 435 if (getDetail().isEmpty()) { 436 addDetail(); 437 } 438 return getDetail().get(0); 439 } 440 441 protected void listChildren(List<Property> children) { 442 super.listChildren(children); 443 children.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId)); 444 children.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 445 children.add(new Property("adjudication", "", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 446 children.add(new Property("detail", "", "The second tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, detail)); 447 } 448 449 @Override 450 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 451 switch (_hash) { 452 case -1422298666: /*sequenceLinkId*/ return new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId); 453 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 454 case -231349275: /*adjudication*/ return new Property("adjudication", "", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 455 case -1335224239: /*detail*/ return new Property("detail", "", "The second tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, detail); 456 default: return super.getNamedProperty(_hash, _name, _checkValid); 457 } 458 459 } 460 461 @Override 462 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 463 switch (hash) { 464 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // PositiveIntType 465 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 466 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 467 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // ItemDetailComponent 468 default: return super.getProperty(hash, name, checkValid); 469 } 470 471 } 472 473 @Override 474 public Base setProperty(int hash, String name, Base value) throws FHIRException { 475 switch (hash) { 476 case -1422298666: // sequenceLinkId 477 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 478 return value; 479 case -1110033957: // noteNumber 480 this.getNoteNumber().add(castToPositiveInt(value)); // PositiveIntType 481 return value; 482 case -231349275: // adjudication 483 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 484 return value; 485 case -1335224239: // detail 486 this.getDetail().add((ItemDetailComponent) value); // ItemDetailComponent 487 return value; 488 default: return super.setProperty(hash, name, value); 489 } 490 491 } 492 493 @Override 494 public Base setProperty(String name, Base value) throws FHIRException { 495 if (name.equals("sequenceLinkId")) { 496 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 497 } else if (name.equals("noteNumber")) { 498 this.getNoteNumber().add(castToPositiveInt(value)); 499 } else if (name.equals("adjudication")) { 500 this.getAdjudication().add((AdjudicationComponent) value); 501 } else if (name.equals("detail")) { 502 this.getDetail().add((ItemDetailComponent) value); 503 } else 504 return super.setProperty(name, value); 505 return value; 506 } 507 508 @Override 509 public Base makeProperty(int hash, String name) throws FHIRException { 510 switch (hash) { 511 case -1422298666: return getSequenceLinkIdElement(); 512 case -1110033957: return addNoteNumberElement(); 513 case -231349275: return addAdjudication(); 514 case -1335224239: return addDetail(); 515 default: return super.makeProperty(hash, name); 516 } 517 518 } 519 520 @Override 521 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 522 switch (hash) { 523 case -1422298666: /*sequenceLinkId*/ return new String[] {"positiveInt"}; 524 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 525 case -231349275: /*adjudication*/ return new String[] {}; 526 case -1335224239: /*detail*/ return new String[] {}; 527 default: return super.getTypesForProperty(hash, name); 528 } 529 530 } 531 532 @Override 533 public Base addChild(String name) throws FHIRException { 534 if (name.equals("sequenceLinkId")) { 535 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); 536 } 537 else if (name.equals("noteNumber")) { 538 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); 539 } 540 else if (name.equals("adjudication")) { 541 return addAdjudication(); 542 } 543 else if (name.equals("detail")) { 544 return addDetail(); 545 } 546 else 547 return super.addChild(name); 548 } 549 550 public ItemComponent copy() { 551 ItemComponent dst = new ItemComponent(); 552 copyValues(dst); 553 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 554 if (noteNumber != null) { 555 dst.noteNumber = new ArrayList<PositiveIntType>(); 556 for (PositiveIntType i : noteNumber) 557 dst.noteNumber.add(i.copy()); 558 }; 559 if (adjudication != null) { 560 dst.adjudication = new ArrayList<AdjudicationComponent>(); 561 for (AdjudicationComponent i : adjudication) 562 dst.adjudication.add(i.copy()); 563 }; 564 if (detail != null) { 565 dst.detail = new ArrayList<ItemDetailComponent>(); 566 for (ItemDetailComponent i : detail) 567 dst.detail.add(i.copy()); 568 }; 569 return dst; 570 } 571 572 @Override 573 public boolean equalsDeep(Base other_) { 574 if (!super.equalsDeep(other_)) 575 return false; 576 if (!(other_ instanceof ItemComponent)) 577 return false; 578 ItemComponent o = (ItemComponent) other_; 579 return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(noteNumber, o.noteNumber, true) 580 && compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true); 581 } 582 583 @Override 584 public boolean equalsShallow(Base other_) { 585 if (!super.equalsShallow(other_)) 586 return false; 587 if (!(other_ instanceof ItemComponent)) 588 return false; 589 ItemComponent o = (ItemComponent) other_; 590 return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumber, o.noteNumber, true) 591 ; 592 } 593 594 public boolean isEmpty() { 595 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, noteNumber 596 , adjudication, detail); 597 } 598 599 public String fhirType() { 600 return "ClaimResponse.item"; 601 602 } 603 604 } 605 606 @Block() 607 public static class AdjudicationComponent extends BackboneElement implements IBaseBackboneElement { 608 /** 609 * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. 610 */ 611 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 612 @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) 613 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication") 614 protected CodeableConcept category; 615 616 /** 617 * Adjudication reason such as limit reached. 618 */ 619 @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 620 @Description(shortDefinition="Explanation of Adjudication outcome", formalDefinition="Adjudication reason such as limit reached." ) 621 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-reason") 622 protected CodeableConcept reason; 623 624 /** 625 * Monetary amount associated with the code. 626 */ 627 @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=false) 628 @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) 629 protected Money amount; 630 631 /** 632 * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. 633 */ 634 @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=false) 635 @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) 636 protected DecimalType value; 637 638 private static final long serialVersionUID = 1559898786L; 639 640 /** 641 * Constructor 642 */ 643 public AdjudicationComponent() { 644 super(); 645 } 646 647 /** 648 * Constructor 649 */ 650 public AdjudicationComponent(CodeableConcept category) { 651 super(); 652 this.category = category; 653 } 654 655 /** 656 * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) 657 */ 658 public CodeableConcept getCategory() { 659 if (this.category == null) 660 if (Configuration.errorOnAutoCreate()) 661 throw new Error("Attempt to auto-create AdjudicationComponent.category"); 662 else if (Configuration.doAutoCreate()) 663 this.category = new CodeableConcept(); // cc 664 return this.category; 665 } 666 667 public boolean hasCategory() { 668 return this.category != null && !this.category.isEmpty(); 669 } 670 671 /** 672 * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) 673 */ 674 public AdjudicationComponent setCategory(CodeableConcept value) { 675 this.category = value; 676 return this; 677 } 678 679 /** 680 * @return {@link #reason} (Adjudication reason such as limit reached.) 681 */ 682 public CodeableConcept getReason() { 683 if (this.reason == null) 684 if (Configuration.errorOnAutoCreate()) 685 throw new Error("Attempt to auto-create AdjudicationComponent.reason"); 686 else if (Configuration.doAutoCreate()) 687 this.reason = new CodeableConcept(); // cc 688 return this.reason; 689 } 690 691 public boolean hasReason() { 692 return this.reason != null && !this.reason.isEmpty(); 693 } 694 695 /** 696 * @param value {@link #reason} (Adjudication reason such as limit reached.) 697 */ 698 public AdjudicationComponent setReason(CodeableConcept value) { 699 this.reason = value; 700 return this; 701 } 702 703 /** 704 * @return {@link #amount} (Monetary amount associated with the code.) 705 */ 706 public Money getAmount() { 707 if (this.amount == null) 708 if (Configuration.errorOnAutoCreate()) 709 throw new Error("Attempt to auto-create AdjudicationComponent.amount"); 710 else if (Configuration.doAutoCreate()) 711 this.amount = new Money(); // cc 712 return this.amount; 713 } 714 715 public boolean hasAmount() { 716 return this.amount != null && !this.amount.isEmpty(); 717 } 718 719 /** 720 * @param value {@link #amount} (Monetary amount associated with the code.) 721 */ 722 public AdjudicationComponent setAmount(Money value) { 723 this.amount = value; 724 return this; 725 } 726 727 /** 728 * @return {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 729 */ 730 public DecimalType getValueElement() { 731 if (this.value == null) 732 if (Configuration.errorOnAutoCreate()) 733 throw new Error("Attempt to auto-create AdjudicationComponent.value"); 734 else if (Configuration.doAutoCreate()) 735 this.value = new DecimalType(); // bb 736 return this.value; 737 } 738 739 public boolean hasValueElement() { 740 return this.value != null && !this.value.isEmpty(); 741 } 742 743 public boolean hasValue() { 744 return this.value != null && !this.value.isEmpty(); 745 } 746 747 /** 748 * @param value {@link #value} (A non-monetary value for example a percentage. Mutually exclusive to the amount element above.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 749 */ 750 public AdjudicationComponent setValueElement(DecimalType value) { 751 this.value = value; 752 return this; 753 } 754 755 /** 756 * @return A non-monetary value for example a percentage. Mutually exclusive to the amount element above. 757 */ 758 public BigDecimal getValue() { 759 return this.value == null ? null : this.value.getValue(); 760 } 761 762 /** 763 * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. 764 */ 765 public AdjudicationComponent setValue(BigDecimal value) { 766 if (value == null) 767 this.value = null; 768 else { 769 if (this.value == null) 770 this.value = new DecimalType(); 771 this.value.setValue(value); 772 } 773 return this; 774 } 775 776 /** 777 * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. 778 */ 779 public AdjudicationComponent setValue(long value) { 780 this.value = new DecimalType(); 781 this.value.setValue(value); 782 return this; 783 } 784 785 /** 786 * @param value A non-monetary value for example a percentage. Mutually exclusive to the amount element above. 787 */ 788 public AdjudicationComponent setValue(double value) { 789 this.value = new DecimalType(); 790 this.value.setValue(value); 791 return this; 792 } 793 794 protected void listChildren(List<Property> children) { 795 super.listChildren(children); 796 children.add(new Property("category", "CodeableConcept", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, 1, category)); 797 children.add(new Property("reason", "CodeableConcept", "Adjudication reason such as limit reached.", 0, 1, reason)); 798 children.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, 1, amount)); 799 children.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, 1, value)); 800 } 801 802 @Override 803 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 804 switch (_hash) { 805 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, 1, category); 806 case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "Adjudication reason such as limit reached.", 0, 1, reason); 807 case -1413853096: /*amount*/ return new Property("amount", "Money", "Monetary amount associated with the code.", 0, 1, amount); 808 case 111972721: /*value*/ return new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, 1, value); 809 default: return super.getNamedProperty(_hash, _name, _checkValid); 810 } 811 812 } 813 814 @Override 815 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 816 switch (hash) { 817 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 818 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept 819 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 820 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DecimalType 821 default: return super.getProperty(hash, name, checkValid); 822 } 823 824 } 825 826 @Override 827 public Base setProperty(int hash, String name, Base value) throws FHIRException { 828 switch (hash) { 829 case 50511102: // category 830 this.category = castToCodeableConcept(value); // CodeableConcept 831 return value; 832 case -934964668: // reason 833 this.reason = castToCodeableConcept(value); // CodeableConcept 834 return value; 835 case -1413853096: // amount 836 this.amount = castToMoney(value); // Money 837 return value; 838 case 111972721: // value 839 this.value = castToDecimal(value); // DecimalType 840 return value; 841 default: return super.setProperty(hash, name, value); 842 } 843 844 } 845 846 @Override 847 public Base setProperty(String name, Base value) throws FHIRException { 848 if (name.equals("category")) { 849 this.category = castToCodeableConcept(value); // CodeableConcept 850 } else if (name.equals("reason")) { 851 this.reason = castToCodeableConcept(value); // CodeableConcept 852 } else if (name.equals("amount")) { 853 this.amount = castToMoney(value); // Money 854 } else if (name.equals("value")) { 855 this.value = castToDecimal(value); // DecimalType 856 } else 857 return super.setProperty(name, value); 858 return value; 859 } 860 861 @Override 862 public Base makeProperty(int hash, String name) throws FHIRException { 863 switch (hash) { 864 case 50511102: return getCategory(); 865 case -934964668: return getReason(); 866 case -1413853096: return getAmount(); 867 case 111972721: return getValueElement(); 868 default: return super.makeProperty(hash, name); 869 } 870 871 } 872 873 @Override 874 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 875 switch (hash) { 876 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 877 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 878 case -1413853096: /*amount*/ return new String[] {"Money"}; 879 case 111972721: /*value*/ return new String[] {"decimal"}; 880 default: return super.getTypesForProperty(hash, name); 881 } 882 883 } 884 885 @Override 886 public Base addChild(String name) throws FHIRException { 887 if (name.equals("category")) { 888 this.category = new CodeableConcept(); 889 return this.category; 890 } 891 else if (name.equals("reason")) { 892 this.reason = new CodeableConcept(); 893 return this.reason; 894 } 895 else if (name.equals("amount")) { 896 this.amount = new Money(); 897 return this.amount; 898 } 899 else if (name.equals("value")) { 900 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); 901 } 902 else 903 return super.addChild(name); 904 } 905 906 public AdjudicationComponent copy() { 907 AdjudicationComponent dst = new AdjudicationComponent(); 908 copyValues(dst); 909 dst.category = category == null ? null : category.copy(); 910 dst.reason = reason == null ? null : reason.copy(); 911 dst.amount = amount == null ? null : amount.copy(); 912 dst.value = value == null ? null : value.copy(); 913 return dst; 914 } 915 916 @Override 917 public boolean equalsDeep(Base other_) { 918 if (!super.equalsDeep(other_)) 919 return false; 920 if (!(other_ instanceof AdjudicationComponent)) 921 return false; 922 AdjudicationComponent o = (AdjudicationComponent) other_; 923 return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) 924 && compareDeep(value, o.value, true); 925 } 926 927 @Override 928 public boolean equalsShallow(Base other_) { 929 if (!super.equalsShallow(other_)) 930 return false; 931 if (!(other_ instanceof AdjudicationComponent)) 932 return false; 933 AdjudicationComponent o = (AdjudicationComponent) other_; 934 return compareValues(value, o.value, true); 935 } 936 937 public boolean isEmpty() { 938 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount 939 , value); 940 } 941 942 public String fhirType() { 943 return "ClaimResponse.item.adjudication"; 944 945 } 946 947 } 948 949 @Block() 950 public static class ItemDetailComponent extends BackboneElement implements IBaseBackboneElement { 951 /** 952 * A service line number. 953 */ 954 @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 955 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 956 protected PositiveIntType sequenceLinkId; 957 958 /** 959 * A list of note references to the notes provided below. 960 */ 961 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 962 @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) 963 protected List<PositiveIntType> noteNumber; 964 965 /** 966 * The adjudications results. 967 */ 968 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 969 @Description(shortDefinition="Detail level adjudication details", formalDefinition="The adjudications results." ) 970 protected List<AdjudicationComponent> adjudication; 971 972 /** 973 * The third tier service adjudications for submitted services. 974 */ 975 @Child(name = "subDetail", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 976 @Description(shortDefinition="Subdetail line items", formalDefinition="The third tier service adjudications for submitted services." ) 977 protected List<SubDetailComponent> subDetail; 978 979 private static final long serialVersionUID = -1245557773L; 980 981 /** 982 * Constructor 983 */ 984 public ItemDetailComponent() { 985 super(); 986 } 987 988 /** 989 * Constructor 990 */ 991 public ItemDetailComponent(PositiveIntType sequenceLinkId) { 992 super(); 993 this.sequenceLinkId = sequenceLinkId; 994 } 995 996 /** 997 * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 998 */ 999 public PositiveIntType getSequenceLinkIdElement() { 1000 if (this.sequenceLinkId == null) 1001 if (Configuration.errorOnAutoCreate()) 1002 throw new Error("Attempt to auto-create ItemDetailComponent.sequenceLinkId"); 1003 else if (Configuration.doAutoCreate()) 1004 this.sequenceLinkId = new PositiveIntType(); // bb 1005 return this.sequenceLinkId; 1006 } 1007 1008 public boolean hasSequenceLinkIdElement() { 1009 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 1010 } 1011 1012 public boolean hasSequenceLinkId() { 1013 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 1014 } 1015 1016 /** 1017 * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 1018 */ 1019 public ItemDetailComponent setSequenceLinkIdElement(PositiveIntType value) { 1020 this.sequenceLinkId = value; 1021 return this; 1022 } 1023 1024 /** 1025 * @return A service line number. 1026 */ 1027 public int getSequenceLinkId() { 1028 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 1029 } 1030 1031 /** 1032 * @param value A service line number. 1033 */ 1034 public ItemDetailComponent setSequenceLinkId(int value) { 1035 if (this.sequenceLinkId == null) 1036 this.sequenceLinkId = new PositiveIntType(); 1037 this.sequenceLinkId.setValue(value); 1038 return this; 1039 } 1040 1041 /** 1042 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 1043 */ 1044 public List<PositiveIntType> getNoteNumber() { 1045 if (this.noteNumber == null) 1046 this.noteNumber = new ArrayList<PositiveIntType>(); 1047 return this.noteNumber; 1048 } 1049 1050 /** 1051 * @return Returns a reference to <code>this</code> for easy method chaining 1052 */ 1053 public ItemDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 1054 this.noteNumber = theNoteNumber; 1055 return this; 1056 } 1057 1058 public boolean hasNoteNumber() { 1059 if (this.noteNumber == null) 1060 return false; 1061 for (PositiveIntType item : this.noteNumber) 1062 if (!item.isEmpty()) 1063 return true; 1064 return false; 1065 } 1066 1067 /** 1068 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 1069 */ 1070 public PositiveIntType addNoteNumberElement() {//2 1071 PositiveIntType t = new PositiveIntType(); 1072 if (this.noteNumber == null) 1073 this.noteNumber = new ArrayList<PositiveIntType>(); 1074 this.noteNumber.add(t); 1075 return t; 1076 } 1077 1078 /** 1079 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 1080 */ 1081 public ItemDetailComponent addNoteNumber(int value) { //1 1082 PositiveIntType t = new PositiveIntType(); 1083 t.setValue(value); 1084 if (this.noteNumber == null) 1085 this.noteNumber = new ArrayList<PositiveIntType>(); 1086 this.noteNumber.add(t); 1087 return this; 1088 } 1089 1090 /** 1091 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 1092 */ 1093 public boolean hasNoteNumber(int value) { 1094 if (this.noteNumber == null) 1095 return false; 1096 for (PositiveIntType v : this.noteNumber) 1097 if (v.getValue().equals(value)) // positiveInt 1098 return true; 1099 return false; 1100 } 1101 1102 /** 1103 * @return {@link #adjudication} (The adjudications results.) 1104 */ 1105 public List<AdjudicationComponent> getAdjudication() { 1106 if (this.adjudication == null) 1107 this.adjudication = new ArrayList<AdjudicationComponent>(); 1108 return this.adjudication; 1109 } 1110 1111 /** 1112 * @return Returns a reference to <code>this</code> for easy method chaining 1113 */ 1114 public ItemDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 1115 this.adjudication = theAdjudication; 1116 return this; 1117 } 1118 1119 public boolean hasAdjudication() { 1120 if (this.adjudication == null) 1121 return false; 1122 for (AdjudicationComponent item : this.adjudication) 1123 if (!item.isEmpty()) 1124 return true; 1125 return false; 1126 } 1127 1128 public AdjudicationComponent addAdjudication() { //3 1129 AdjudicationComponent t = new AdjudicationComponent(); 1130 if (this.adjudication == null) 1131 this.adjudication = new ArrayList<AdjudicationComponent>(); 1132 this.adjudication.add(t); 1133 return t; 1134 } 1135 1136 public ItemDetailComponent addAdjudication(AdjudicationComponent t) { //3 1137 if (t == null) 1138 return this; 1139 if (this.adjudication == null) 1140 this.adjudication = new ArrayList<AdjudicationComponent>(); 1141 this.adjudication.add(t); 1142 return this; 1143 } 1144 1145 /** 1146 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist 1147 */ 1148 public AdjudicationComponent getAdjudicationFirstRep() { 1149 if (getAdjudication().isEmpty()) { 1150 addAdjudication(); 1151 } 1152 return getAdjudication().get(0); 1153 } 1154 1155 /** 1156 * @return {@link #subDetail} (The third tier service adjudications for submitted services.) 1157 */ 1158 public List<SubDetailComponent> getSubDetail() { 1159 if (this.subDetail == null) 1160 this.subDetail = new ArrayList<SubDetailComponent>(); 1161 return this.subDetail; 1162 } 1163 1164 /** 1165 * @return Returns a reference to <code>this</code> for easy method chaining 1166 */ 1167 public ItemDetailComponent setSubDetail(List<SubDetailComponent> theSubDetail) { 1168 this.subDetail = theSubDetail; 1169 return this; 1170 } 1171 1172 public boolean hasSubDetail() { 1173 if (this.subDetail == null) 1174 return false; 1175 for (SubDetailComponent item : this.subDetail) 1176 if (!item.isEmpty()) 1177 return true; 1178 return false; 1179 } 1180 1181 public SubDetailComponent addSubDetail() { //3 1182 SubDetailComponent t = new SubDetailComponent(); 1183 if (this.subDetail == null) 1184 this.subDetail = new ArrayList<SubDetailComponent>(); 1185 this.subDetail.add(t); 1186 return t; 1187 } 1188 1189 public ItemDetailComponent addSubDetail(SubDetailComponent t) { //3 1190 if (t == null) 1191 return this; 1192 if (this.subDetail == null) 1193 this.subDetail = new ArrayList<SubDetailComponent>(); 1194 this.subDetail.add(t); 1195 return this; 1196 } 1197 1198 /** 1199 * @return The first repetition of repeating field {@link #subDetail}, creating it if it does not already exist 1200 */ 1201 public SubDetailComponent getSubDetailFirstRep() { 1202 if (getSubDetail().isEmpty()) { 1203 addSubDetail(); 1204 } 1205 return getSubDetail().get(0); 1206 } 1207 1208 protected void listChildren(List<Property> children) { 1209 super.listChildren(children); 1210 children.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId)); 1211 children.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 1212 children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 1213 children.add(new Property("subDetail", "", "The third tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); 1214 } 1215 1216 @Override 1217 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1218 switch (_hash) { 1219 case -1422298666: /*sequenceLinkId*/ return new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId); 1220 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 1221 case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 1222 case -828829007: /*subDetail*/ return new Property("subDetail", "", "The third tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, subDetail); 1223 default: return super.getNamedProperty(_hash, _name, _checkValid); 1224 } 1225 1226 } 1227 1228 @Override 1229 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1230 switch (hash) { 1231 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // PositiveIntType 1232 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 1233 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 1234 case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // SubDetailComponent 1235 default: return super.getProperty(hash, name, checkValid); 1236 } 1237 1238 } 1239 1240 @Override 1241 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1242 switch (hash) { 1243 case -1422298666: // sequenceLinkId 1244 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 1245 return value; 1246 case -1110033957: // noteNumber 1247 this.getNoteNumber().add(castToPositiveInt(value)); // PositiveIntType 1248 return value; 1249 case -231349275: // adjudication 1250 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 1251 return value; 1252 case -828829007: // subDetail 1253 this.getSubDetail().add((SubDetailComponent) value); // SubDetailComponent 1254 return value; 1255 default: return super.setProperty(hash, name, value); 1256 } 1257 1258 } 1259 1260 @Override 1261 public Base setProperty(String name, Base value) throws FHIRException { 1262 if (name.equals("sequenceLinkId")) { 1263 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 1264 } else if (name.equals("noteNumber")) { 1265 this.getNoteNumber().add(castToPositiveInt(value)); 1266 } else if (name.equals("adjudication")) { 1267 this.getAdjudication().add((AdjudicationComponent) value); 1268 } else if (name.equals("subDetail")) { 1269 this.getSubDetail().add((SubDetailComponent) value); 1270 } else 1271 return super.setProperty(name, value); 1272 return value; 1273 } 1274 1275 @Override 1276 public Base makeProperty(int hash, String name) throws FHIRException { 1277 switch (hash) { 1278 case -1422298666: return getSequenceLinkIdElement(); 1279 case -1110033957: return addNoteNumberElement(); 1280 case -231349275: return addAdjudication(); 1281 case -828829007: return addSubDetail(); 1282 default: return super.makeProperty(hash, name); 1283 } 1284 1285 } 1286 1287 @Override 1288 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1289 switch (hash) { 1290 case -1422298666: /*sequenceLinkId*/ return new String[] {"positiveInt"}; 1291 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 1292 case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"}; 1293 case -828829007: /*subDetail*/ return new String[] {}; 1294 default: return super.getTypesForProperty(hash, name); 1295 } 1296 1297 } 1298 1299 @Override 1300 public Base addChild(String name) throws FHIRException { 1301 if (name.equals("sequenceLinkId")) { 1302 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); 1303 } 1304 else if (name.equals("noteNumber")) { 1305 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); 1306 } 1307 else if (name.equals("adjudication")) { 1308 return addAdjudication(); 1309 } 1310 else if (name.equals("subDetail")) { 1311 return addSubDetail(); 1312 } 1313 else 1314 return super.addChild(name); 1315 } 1316 1317 public ItemDetailComponent copy() { 1318 ItemDetailComponent dst = new ItemDetailComponent(); 1319 copyValues(dst); 1320 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 1321 if (noteNumber != null) { 1322 dst.noteNumber = new ArrayList<PositiveIntType>(); 1323 for (PositiveIntType i : noteNumber) 1324 dst.noteNumber.add(i.copy()); 1325 }; 1326 if (adjudication != null) { 1327 dst.adjudication = new ArrayList<AdjudicationComponent>(); 1328 for (AdjudicationComponent i : adjudication) 1329 dst.adjudication.add(i.copy()); 1330 }; 1331 if (subDetail != null) { 1332 dst.subDetail = new ArrayList<SubDetailComponent>(); 1333 for (SubDetailComponent i : subDetail) 1334 dst.subDetail.add(i.copy()); 1335 }; 1336 return dst; 1337 } 1338 1339 @Override 1340 public boolean equalsDeep(Base other_) { 1341 if (!super.equalsDeep(other_)) 1342 return false; 1343 if (!(other_ instanceof ItemDetailComponent)) 1344 return false; 1345 ItemDetailComponent o = (ItemDetailComponent) other_; 1346 return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(noteNumber, o.noteNumber, true) 1347 && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) 1348 ; 1349 } 1350 1351 @Override 1352 public boolean equalsShallow(Base other_) { 1353 if (!super.equalsShallow(other_)) 1354 return false; 1355 if (!(other_ instanceof ItemDetailComponent)) 1356 return false; 1357 ItemDetailComponent o = (ItemDetailComponent) other_; 1358 return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumber, o.noteNumber, true) 1359 ; 1360 } 1361 1362 public boolean isEmpty() { 1363 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, noteNumber 1364 , adjudication, subDetail); 1365 } 1366 1367 public String fhirType() { 1368 return "ClaimResponse.item.detail"; 1369 1370 } 1371 1372 } 1373 1374 @Block() 1375 public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement { 1376 /** 1377 * A service line number. 1378 */ 1379 @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1380 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 1381 protected PositiveIntType sequenceLinkId; 1382 1383 /** 1384 * A list of note references to the notes provided below. 1385 */ 1386 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1387 @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) 1388 protected List<PositiveIntType> noteNumber; 1389 1390 /** 1391 * The adjudications results. 1392 */ 1393 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1394 @Description(shortDefinition="Subdetail level adjudication details", formalDefinition="The adjudications results." ) 1395 protected List<AdjudicationComponent> adjudication; 1396 1397 private static final long serialVersionUID = 1770463342L; 1398 1399 /** 1400 * Constructor 1401 */ 1402 public SubDetailComponent() { 1403 super(); 1404 } 1405 1406 /** 1407 * Constructor 1408 */ 1409 public SubDetailComponent(PositiveIntType sequenceLinkId) { 1410 super(); 1411 this.sequenceLinkId = sequenceLinkId; 1412 } 1413 1414 /** 1415 * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 1416 */ 1417 public PositiveIntType getSequenceLinkIdElement() { 1418 if (this.sequenceLinkId == null) 1419 if (Configuration.errorOnAutoCreate()) 1420 throw new Error("Attempt to auto-create SubDetailComponent.sequenceLinkId"); 1421 else if (Configuration.doAutoCreate()) 1422 this.sequenceLinkId = new PositiveIntType(); // bb 1423 return this.sequenceLinkId; 1424 } 1425 1426 public boolean hasSequenceLinkIdElement() { 1427 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 1428 } 1429 1430 public boolean hasSequenceLinkId() { 1431 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 1432 } 1433 1434 /** 1435 * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 1436 */ 1437 public SubDetailComponent setSequenceLinkIdElement(PositiveIntType value) { 1438 this.sequenceLinkId = value; 1439 return this; 1440 } 1441 1442 /** 1443 * @return A service line number. 1444 */ 1445 public int getSequenceLinkId() { 1446 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 1447 } 1448 1449 /** 1450 * @param value A service line number. 1451 */ 1452 public SubDetailComponent setSequenceLinkId(int value) { 1453 if (this.sequenceLinkId == null) 1454 this.sequenceLinkId = new PositiveIntType(); 1455 this.sequenceLinkId.setValue(value); 1456 return this; 1457 } 1458 1459 /** 1460 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 1461 */ 1462 public List<PositiveIntType> getNoteNumber() { 1463 if (this.noteNumber == null) 1464 this.noteNumber = new ArrayList<PositiveIntType>(); 1465 return this.noteNumber; 1466 } 1467 1468 /** 1469 * @return Returns a reference to <code>this</code> for easy method chaining 1470 */ 1471 public SubDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 1472 this.noteNumber = theNoteNumber; 1473 return this; 1474 } 1475 1476 public boolean hasNoteNumber() { 1477 if (this.noteNumber == null) 1478 return false; 1479 for (PositiveIntType item : this.noteNumber) 1480 if (!item.isEmpty()) 1481 return true; 1482 return false; 1483 } 1484 1485 /** 1486 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 1487 */ 1488 public PositiveIntType addNoteNumberElement() {//2 1489 PositiveIntType t = new PositiveIntType(); 1490 if (this.noteNumber == null) 1491 this.noteNumber = new ArrayList<PositiveIntType>(); 1492 this.noteNumber.add(t); 1493 return t; 1494 } 1495 1496 /** 1497 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 1498 */ 1499 public SubDetailComponent addNoteNumber(int value) { //1 1500 PositiveIntType t = new PositiveIntType(); 1501 t.setValue(value); 1502 if (this.noteNumber == null) 1503 this.noteNumber = new ArrayList<PositiveIntType>(); 1504 this.noteNumber.add(t); 1505 return this; 1506 } 1507 1508 /** 1509 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 1510 */ 1511 public boolean hasNoteNumber(int value) { 1512 if (this.noteNumber == null) 1513 return false; 1514 for (PositiveIntType v : this.noteNumber) 1515 if (v.getValue().equals(value)) // positiveInt 1516 return true; 1517 return false; 1518 } 1519 1520 /** 1521 * @return {@link #adjudication} (The adjudications results.) 1522 */ 1523 public List<AdjudicationComponent> getAdjudication() { 1524 if (this.adjudication == null) 1525 this.adjudication = new ArrayList<AdjudicationComponent>(); 1526 return this.adjudication; 1527 } 1528 1529 /** 1530 * @return Returns a reference to <code>this</code> for easy method chaining 1531 */ 1532 public SubDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 1533 this.adjudication = theAdjudication; 1534 return this; 1535 } 1536 1537 public boolean hasAdjudication() { 1538 if (this.adjudication == null) 1539 return false; 1540 for (AdjudicationComponent item : this.adjudication) 1541 if (!item.isEmpty()) 1542 return true; 1543 return false; 1544 } 1545 1546 public AdjudicationComponent addAdjudication() { //3 1547 AdjudicationComponent t = new AdjudicationComponent(); 1548 if (this.adjudication == null) 1549 this.adjudication = new ArrayList<AdjudicationComponent>(); 1550 this.adjudication.add(t); 1551 return t; 1552 } 1553 1554 public SubDetailComponent addAdjudication(AdjudicationComponent t) { //3 1555 if (t == null) 1556 return this; 1557 if (this.adjudication == null) 1558 this.adjudication = new ArrayList<AdjudicationComponent>(); 1559 this.adjudication.add(t); 1560 return this; 1561 } 1562 1563 /** 1564 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist 1565 */ 1566 public AdjudicationComponent getAdjudicationFirstRep() { 1567 if (getAdjudication().isEmpty()) { 1568 addAdjudication(); 1569 } 1570 return getAdjudication().get(0); 1571 } 1572 1573 protected void listChildren(List<Property> children) { 1574 super.listChildren(children); 1575 children.add(new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId)); 1576 children.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 1577 children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 1578 } 1579 1580 @Override 1581 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1582 switch (_hash) { 1583 case -1422298666: /*sequenceLinkId*/ return new Property("sequenceLinkId", "positiveInt", "A service line number.", 0, 1, sequenceLinkId); 1584 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 1585 case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 1586 default: return super.getNamedProperty(_hash, _name, _checkValid); 1587 } 1588 1589 } 1590 1591 @Override 1592 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1593 switch (hash) { 1594 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // PositiveIntType 1595 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 1596 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 1597 default: return super.getProperty(hash, name, checkValid); 1598 } 1599 1600 } 1601 1602 @Override 1603 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1604 switch (hash) { 1605 case -1422298666: // sequenceLinkId 1606 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 1607 return value; 1608 case -1110033957: // noteNumber 1609 this.getNoteNumber().add(castToPositiveInt(value)); // PositiveIntType 1610 return value; 1611 case -231349275: // adjudication 1612 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 1613 return value; 1614 default: return super.setProperty(hash, name, value); 1615 } 1616 1617 } 1618 1619 @Override 1620 public Base setProperty(String name, Base value) throws FHIRException { 1621 if (name.equals("sequenceLinkId")) { 1622 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 1623 } else if (name.equals("noteNumber")) { 1624 this.getNoteNumber().add(castToPositiveInt(value)); 1625 } else if (name.equals("adjudication")) { 1626 this.getAdjudication().add((AdjudicationComponent) value); 1627 } else 1628 return super.setProperty(name, value); 1629 return value; 1630 } 1631 1632 @Override 1633 public Base makeProperty(int hash, String name) throws FHIRException { 1634 switch (hash) { 1635 case -1422298666: return getSequenceLinkIdElement(); 1636 case -1110033957: return addNoteNumberElement(); 1637 case -231349275: return addAdjudication(); 1638 default: return super.makeProperty(hash, name); 1639 } 1640 1641 } 1642 1643 @Override 1644 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1645 switch (hash) { 1646 case -1422298666: /*sequenceLinkId*/ return new String[] {"positiveInt"}; 1647 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 1648 case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"}; 1649 default: return super.getTypesForProperty(hash, name); 1650 } 1651 1652 } 1653 1654 @Override 1655 public Base addChild(String name) throws FHIRException { 1656 if (name.equals("sequenceLinkId")) { 1657 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); 1658 } 1659 else if (name.equals("noteNumber")) { 1660 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); 1661 } 1662 else if (name.equals("adjudication")) { 1663 return addAdjudication(); 1664 } 1665 else 1666 return super.addChild(name); 1667 } 1668 1669 public SubDetailComponent copy() { 1670 SubDetailComponent dst = new SubDetailComponent(); 1671 copyValues(dst); 1672 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 1673 if (noteNumber != null) { 1674 dst.noteNumber = new ArrayList<PositiveIntType>(); 1675 for (PositiveIntType i : noteNumber) 1676 dst.noteNumber.add(i.copy()); 1677 }; 1678 if (adjudication != null) { 1679 dst.adjudication = new ArrayList<AdjudicationComponent>(); 1680 for (AdjudicationComponent i : adjudication) 1681 dst.adjudication.add(i.copy()); 1682 }; 1683 return dst; 1684 } 1685 1686 @Override 1687 public boolean equalsDeep(Base other_) { 1688 if (!super.equalsDeep(other_)) 1689 return false; 1690 if (!(other_ instanceof SubDetailComponent)) 1691 return false; 1692 SubDetailComponent o = (SubDetailComponent) other_; 1693 return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(noteNumber, o.noteNumber, true) 1694 && compareDeep(adjudication, o.adjudication, true); 1695 } 1696 1697 @Override 1698 public boolean equalsShallow(Base other_) { 1699 if (!super.equalsShallow(other_)) 1700 return false; 1701 if (!(other_ instanceof SubDetailComponent)) 1702 return false; 1703 SubDetailComponent o = (SubDetailComponent) other_; 1704 return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumber, o.noteNumber, true) 1705 ; 1706 } 1707 1708 public boolean isEmpty() { 1709 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, noteNumber 1710 , adjudication); 1711 } 1712 1713 public String fhirType() { 1714 return "ClaimResponse.item.detail.subDetail"; 1715 1716 } 1717 1718 } 1719 1720 @Block() 1721 public static class AddedItemComponent extends BackboneElement implements IBaseBackboneElement { 1722 /** 1723 * List of input service items which this service line is intended to replace. 1724 */ 1725 @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1726 @Description(shortDefinition="Service instances", formalDefinition="List of input service items which this service line is intended to replace." ) 1727 protected List<PositiveIntType> sequenceLinkId; 1728 1729 /** 1730 * The type of reveneu or cost center providing the product and/or service. 1731 */ 1732 @Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1733 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of reveneu or cost center providing the product and/or service." ) 1734 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 1735 protected CodeableConcept revenue; 1736 1737 /** 1738 * Health Care Service Type Codes to identify the classification of service or benefits. 1739 */ 1740 @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1741 @Description(shortDefinition="Type of service or product", formalDefinition="Health Care Service Type Codes to identify the classification of service or benefits." ) 1742 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-subcategory") 1743 protected CodeableConcept category; 1744 1745 /** 1746 * A code to indicate the Professional Service or Product supplied. 1747 */ 1748 @Child(name = "service", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 1749 @Description(shortDefinition="Group, Service or Product", formalDefinition="A code to indicate the Professional Service or Product supplied." ) 1750 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 1751 protected CodeableConcept service; 1752 1753 /** 1754 * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours. 1755 */ 1756 @Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1757 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours." ) 1758 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 1759 protected List<CodeableConcept> modifier; 1760 1761 /** 1762 * The fee charged for the professional service or product.. 1763 */ 1764 @Child(name = "fee", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=false) 1765 @Description(shortDefinition="Professional fee or Product charge", formalDefinition="The fee charged for the professional service or product.." ) 1766 protected Money fee; 1767 1768 /** 1769 * A list of note references to the notes provided below. 1770 */ 1771 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1772 @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) 1773 protected List<PositiveIntType> noteNumber; 1774 1775 /** 1776 * The adjudications results. 1777 */ 1778 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1779 @Description(shortDefinition="Added items adjudication", formalDefinition="The adjudications results." ) 1780 protected List<AdjudicationComponent> adjudication; 1781 1782 /** 1783 * The second tier service adjudications for payor added services. 1784 */ 1785 @Child(name = "detail", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1786 @Description(shortDefinition="Added items details", formalDefinition="The second tier service adjudications for payor added services." ) 1787 protected List<AddedItemsDetailComponent> detail; 1788 1789 private static final long serialVersionUID = 1969703165L; 1790 1791 /** 1792 * Constructor 1793 */ 1794 public AddedItemComponent() { 1795 super(); 1796 } 1797 1798 /** 1799 * @return {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) 1800 */ 1801 public List<PositiveIntType> getSequenceLinkId() { 1802 if (this.sequenceLinkId == null) 1803 this.sequenceLinkId = new ArrayList<PositiveIntType>(); 1804 return this.sequenceLinkId; 1805 } 1806 1807 /** 1808 * @return Returns a reference to <code>this</code> for easy method chaining 1809 */ 1810 public AddedItemComponent setSequenceLinkId(List<PositiveIntType> theSequenceLinkId) { 1811 this.sequenceLinkId = theSequenceLinkId; 1812 return this; 1813 } 1814 1815 public boolean hasSequenceLinkId() { 1816 if (this.sequenceLinkId == null) 1817 return false; 1818 for (PositiveIntType item : this.sequenceLinkId) 1819 if (!item.isEmpty()) 1820 return true; 1821 return false; 1822 } 1823 1824 /** 1825 * @return {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) 1826 */ 1827 public PositiveIntType addSequenceLinkIdElement() {//2 1828 PositiveIntType t = new PositiveIntType(); 1829 if (this.sequenceLinkId == null) 1830 this.sequenceLinkId = new ArrayList<PositiveIntType>(); 1831 this.sequenceLinkId.add(t); 1832 return t; 1833 } 1834 1835 /** 1836 * @param value {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) 1837 */ 1838 public AddedItemComponent addSequenceLinkId(int value) { //1 1839 PositiveIntType t = new PositiveIntType(); 1840 t.setValue(value); 1841 if (this.sequenceLinkId == null) 1842 this.sequenceLinkId = new ArrayList<PositiveIntType>(); 1843 this.sequenceLinkId.add(t); 1844 return this; 1845 } 1846 1847 /** 1848 * @param value {@link #sequenceLinkId} (List of input service items which this service line is intended to replace.) 1849 */ 1850 public boolean hasSequenceLinkId(int value) { 1851 if (this.sequenceLinkId == null) 1852 return false; 1853 for (PositiveIntType v : this.sequenceLinkId) 1854 if (v.getValue().equals(value)) // positiveInt 1855 return true; 1856 return false; 1857 } 1858 1859 /** 1860 * @return {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) 1861 */ 1862 public CodeableConcept getRevenue() { 1863 if (this.revenue == null) 1864 if (Configuration.errorOnAutoCreate()) 1865 throw new Error("Attempt to auto-create AddedItemComponent.revenue"); 1866 else if (Configuration.doAutoCreate()) 1867 this.revenue = new CodeableConcept(); // cc 1868 return this.revenue; 1869 } 1870 1871 public boolean hasRevenue() { 1872 return this.revenue != null && !this.revenue.isEmpty(); 1873 } 1874 1875 /** 1876 * @param value {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) 1877 */ 1878 public AddedItemComponent setRevenue(CodeableConcept value) { 1879 this.revenue = value; 1880 return this; 1881 } 1882 1883 /** 1884 * @return {@link #category} (Health Care Service Type Codes to identify the classification of service or benefits.) 1885 */ 1886 public CodeableConcept getCategory() { 1887 if (this.category == null) 1888 if (Configuration.errorOnAutoCreate()) 1889 throw new Error("Attempt to auto-create AddedItemComponent.category"); 1890 else if (Configuration.doAutoCreate()) 1891 this.category = new CodeableConcept(); // cc 1892 return this.category; 1893 } 1894 1895 public boolean hasCategory() { 1896 return this.category != null && !this.category.isEmpty(); 1897 } 1898 1899 /** 1900 * @param value {@link #category} (Health Care Service Type Codes to identify the classification of service or benefits.) 1901 */ 1902 public AddedItemComponent setCategory(CodeableConcept value) { 1903 this.category = value; 1904 return this; 1905 } 1906 1907 /** 1908 * @return {@link #service} (A code to indicate the Professional Service or Product supplied.) 1909 */ 1910 public CodeableConcept getService() { 1911 if (this.service == null) 1912 if (Configuration.errorOnAutoCreate()) 1913 throw new Error("Attempt to auto-create AddedItemComponent.service"); 1914 else if (Configuration.doAutoCreate()) 1915 this.service = new CodeableConcept(); // cc 1916 return this.service; 1917 } 1918 1919 public boolean hasService() { 1920 return this.service != null && !this.service.isEmpty(); 1921 } 1922 1923 /** 1924 * @param value {@link #service} (A code to indicate the Professional Service or Product supplied.) 1925 */ 1926 public AddedItemComponent setService(CodeableConcept value) { 1927 this.service = value; 1928 return this; 1929 } 1930 1931 /** 1932 * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.) 1933 */ 1934 public List<CodeableConcept> getModifier() { 1935 if (this.modifier == null) 1936 this.modifier = new ArrayList<CodeableConcept>(); 1937 return this.modifier; 1938 } 1939 1940 /** 1941 * @return Returns a reference to <code>this</code> for easy method chaining 1942 */ 1943 public AddedItemComponent setModifier(List<CodeableConcept> theModifier) { 1944 this.modifier = theModifier; 1945 return this; 1946 } 1947 1948 public boolean hasModifier() { 1949 if (this.modifier == null) 1950 return false; 1951 for (CodeableConcept item : this.modifier) 1952 if (!item.isEmpty()) 1953 return true; 1954 return false; 1955 } 1956 1957 public CodeableConcept addModifier() { //3 1958 CodeableConcept t = new CodeableConcept(); 1959 if (this.modifier == null) 1960 this.modifier = new ArrayList<CodeableConcept>(); 1961 this.modifier.add(t); 1962 return t; 1963 } 1964 1965 public AddedItemComponent addModifier(CodeableConcept t) { //3 1966 if (t == null) 1967 return this; 1968 if (this.modifier == null) 1969 this.modifier = new ArrayList<CodeableConcept>(); 1970 this.modifier.add(t); 1971 return this; 1972 } 1973 1974 /** 1975 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist 1976 */ 1977 public CodeableConcept getModifierFirstRep() { 1978 if (getModifier().isEmpty()) { 1979 addModifier(); 1980 } 1981 return getModifier().get(0); 1982 } 1983 1984 /** 1985 * @return {@link #fee} (The fee charged for the professional service or product..) 1986 */ 1987 public Money getFee() { 1988 if (this.fee == null) 1989 if (Configuration.errorOnAutoCreate()) 1990 throw new Error("Attempt to auto-create AddedItemComponent.fee"); 1991 else if (Configuration.doAutoCreate()) 1992 this.fee = new Money(); // cc 1993 return this.fee; 1994 } 1995 1996 public boolean hasFee() { 1997 return this.fee != null && !this.fee.isEmpty(); 1998 } 1999 2000 /** 2001 * @param value {@link #fee} (The fee charged for the professional service or product..) 2002 */ 2003 public AddedItemComponent setFee(Money value) { 2004 this.fee = value; 2005 return this; 2006 } 2007 2008 /** 2009 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 2010 */ 2011 public List<PositiveIntType> getNoteNumber() { 2012 if (this.noteNumber == null) 2013 this.noteNumber = new ArrayList<PositiveIntType>(); 2014 return this.noteNumber; 2015 } 2016 2017 /** 2018 * @return Returns a reference to <code>this</code> for easy method chaining 2019 */ 2020 public AddedItemComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 2021 this.noteNumber = theNoteNumber; 2022 return this; 2023 } 2024 2025 public boolean hasNoteNumber() { 2026 if (this.noteNumber == null) 2027 return false; 2028 for (PositiveIntType item : this.noteNumber) 2029 if (!item.isEmpty()) 2030 return true; 2031 return false; 2032 } 2033 2034 /** 2035 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 2036 */ 2037 public PositiveIntType addNoteNumberElement() {//2 2038 PositiveIntType t = new PositiveIntType(); 2039 if (this.noteNumber == null) 2040 this.noteNumber = new ArrayList<PositiveIntType>(); 2041 this.noteNumber.add(t); 2042 return t; 2043 } 2044 2045 /** 2046 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 2047 */ 2048 public AddedItemComponent addNoteNumber(int value) { //1 2049 PositiveIntType t = new PositiveIntType(); 2050 t.setValue(value); 2051 if (this.noteNumber == null) 2052 this.noteNumber = new ArrayList<PositiveIntType>(); 2053 this.noteNumber.add(t); 2054 return this; 2055 } 2056 2057 /** 2058 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 2059 */ 2060 public boolean hasNoteNumber(int value) { 2061 if (this.noteNumber == null) 2062 return false; 2063 for (PositiveIntType v : this.noteNumber) 2064 if (v.getValue().equals(value)) // positiveInt 2065 return true; 2066 return false; 2067 } 2068 2069 /** 2070 * @return {@link #adjudication} (The adjudications results.) 2071 */ 2072 public List<AdjudicationComponent> getAdjudication() { 2073 if (this.adjudication == null) 2074 this.adjudication = new ArrayList<AdjudicationComponent>(); 2075 return this.adjudication; 2076 } 2077 2078 /** 2079 * @return Returns a reference to <code>this</code> for easy method chaining 2080 */ 2081 public AddedItemComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 2082 this.adjudication = theAdjudication; 2083 return this; 2084 } 2085 2086 public boolean hasAdjudication() { 2087 if (this.adjudication == null) 2088 return false; 2089 for (AdjudicationComponent item : this.adjudication) 2090 if (!item.isEmpty()) 2091 return true; 2092 return false; 2093 } 2094 2095 public AdjudicationComponent addAdjudication() { //3 2096 AdjudicationComponent t = new AdjudicationComponent(); 2097 if (this.adjudication == null) 2098 this.adjudication = new ArrayList<AdjudicationComponent>(); 2099 this.adjudication.add(t); 2100 return t; 2101 } 2102 2103 public AddedItemComponent addAdjudication(AdjudicationComponent t) { //3 2104 if (t == null) 2105 return this; 2106 if (this.adjudication == null) 2107 this.adjudication = new ArrayList<AdjudicationComponent>(); 2108 this.adjudication.add(t); 2109 return this; 2110 } 2111 2112 /** 2113 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist 2114 */ 2115 public AdjudicationComponent getAdjudicationFirstRep() { 2116 if (getAdjudication().isEmpty()) { 2117 addAdjudication(); 2118 } 2119 return getAdjudication().get(0); 2120 } 2121 2122 /** 2123 * @return {@link #detail} (The second tier service adjudications for payor added services.) 2124 */ 2125 public List<AddedItemsDetailComponent> getDetail() { 2126 if (this.detail == null) 2127 this.detail = new ArrayList<AddedItemsDetailComponent>(); 2128 return this.detail; 2129 } 2130 2131 /** 2132 * @return Returns a reference to <code>this</code> for easy method chaining 2133 */ 2134 public AddedItemComponent setDetail(List<AddedItemsDetailComponent> theDetail) { 2135 this.detail = theDetail; 2136 return this; 2137 } 2138 2139 public boolean hasDetail() { 2140 if (this.detail == null) 2141 return false; 2142 for (AddedItemsDetailComponent item : this.detail) 2143 if (!item.isEmpty()) 2144 return true; 2145 return false; 2146 } 2147 2148 public AddedItemsDetailComponent addDetail() { //3 2149 AddedItemsDetailComponent t = new AddedItemsDetailComponent(); 2150 if (this.detail == null) 2151 this.detail = new ArrayList<AddedItemsDetailComponent>(); 2152 this.detail.add(t); 2153 return t; 2154 } 2155 2156 public AddedItemComponent addDetail(AddedItemsDetailComponent t) { //3 2157 if (t == null) 2158 return this; 2159 if (this.detail == null) 2160 this.detail = new ArrayList<AddedItemsDetailComponent>(); 2161 this.detail.add(t); 2162 return this; 2163 } 2164 2165 /** 2166 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist 2167 */ 2168 public AddedItemsDetailComponent getDetailFirstRep() { 2169 if (getDetail().isEmpty()) { 2170 addDetail(); 2171 } 2172 return getDetail().get(0); 2173 } 2174 2175 protected void listChildren(List<Property> children) { 2176 super.listChildren(children); 2177 children.add(new Property("sequenceLinkId", "positiveInt", "List of input service items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); 2178 children.add(new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue)); 2179 children.add(new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category)); 2180 children.add(new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied.", 0, 1, service)); 2181 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.", 0, java.lang.Integer.MAX_VALUE, modifier)); 2182 children.add(new Property("fee", "Money", "The fee charged for the professional service or product..", 0, 1, fee)); 2183 children.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 2184 children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 2185 children.add(new Property("detail", "", "The second tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail)); 2186 } 2187 2188 @Override 2189 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2190 switch (_hash) { 2191 case -1422298666: /*sequenceLinkId*/ return new Property("sequenceLinkId", "positiveInt", "List of input service items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId); 2192 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue); 2193 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category); 2194 case 1984153269: /*service*/ return new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied.", 0, 1, service); 2195 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.", 0, java.lang.Integer.MAX_VALUE, modifier); 2196 case 101254: /*fee*/ return new Property("fee", "Money", "The fee charged for the professional service or product..", 0, 1, fee); 2197 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 2198 case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 2199 case -1335224239: /*detail*/ return new Property("detail", "", "The second tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail); 2200 default: return super.getNamedProperty(_hash, _name, _checkValid); 2201 } 2202 2203 } 2204 2205 @Override 2206 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2207 switch (hash) { 2208 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : this.sequenceLinkId.toArray(new Base[this.sequenceLinkId.size()]); // PositiveIntType 2209 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 2210 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 2211 case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // CodeableConcept 2212 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 2213 case 101254: /*fee*/ return this.fee == null ? new Base[0] : new Base[] {this.fee}; // Money 2214 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 2215 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 2216 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // AddedItemsDetailComponent 2217 default: return super.getProperty(hash, name, checkValid); 2218 } 2219 2220 } 2221 2222 @Override 2223 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2224 switch (hash) { 2225 case -1422298666: // sequenceLinkId 2226 this.getSequenceLinkId().add(castToPositiveInt(value)); // PositiveIntType 2227 return value; 2228 case 1099842588: // revenue 2229 this.revenue = castToCodeableConcept(value); // CodeableConcept 2230 return value; 2231 case 50511102: // category 2232 this.category = castToCodeableConcept(value); // CodeableConcept 2233 return value; 2234 case 1984153269: // service 2235 this.service = castToCodeableConcept(value); // CodeableConcept 2236 return value; 2237 case -615513385: // modifier 2238 this.getModifier().add(castToCodeableConcept(value)); // CodeableConcept 2239 return value; 2240 case 101254: // fee 2241 this.fee = castToMoney(value); // Money 2242 return value; 2243 case -1110033957: // noteNumber 2244 this.getNoteNumber().add(castToPositiveInt(value)); // PositiveIntType 2245 return value; 2246 case -231349275: // adjudication 2247 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 2248 return value; 2249 case -1335224239: // detail 2250 this.getDetail().add((AddedItemsDetailComponent) value); // AddedItemsDetailComponent 2251 return value; 2252 default: return super.setProperty(hash, name, value); 2253 } 2254 2255 } 2256 2257 @Override 2258 public Base setProperty(String name, Base value) throws FHIRException { 2259 if (name.equals("sequenceLinkId")) { 2260 this.getSequenceLinkId().add(castToPositiveInt(value)); 2261 } else if (name.equals("revenue")) { 2262 this.revenue = castToCodeableConcept(value); // CodeableConcept 2263 } else if (name.equals("category")) { 2264 this.category = castToCodeableConcept(value); // CodeableConcept 2265 } else if (name.equals("service")) { 2266 this.service = castToCodeableConcept(value); // CodeableConcept 2267 } else if (name.equals("modifier")) { 2268 this.getModifier().add(castToCodeableConcept(value)); 2269 } else if (name.equals("fee")) { 2270 this.fee = castToMoney(value); // Money 2271 } else if (name.equals("noteNumber")) { 2272 this.getNoteNumber().add(castToPositiveInt(value)); 2273 } else if (name.equals("adjudication")) { 2274 this.getAdjudication().add((AdjudicationComponent) value); 2275 } else if (name.equals("detail")) { 2276 this.getDetail().add((AddedItemsDetailComponent) value); 2277 } else 2278 return super.setProperty(name, value); 2279 return value; 2280 } 2281 2282 @Override 2283 public Base makeProperty(int hash, String name) throws FHIRException { 2284 switch (hash) { 2285 case -1422298666: return addSequenceLinkIdElement(); 2286 case 1099842588: return getRevenue(); 2287 case 50511102: return getCategory(); 2288 case 1984153269: return getService(); 2289 case -615513385: return addModifier(); 2290 case 101254: return getFee(); 2291 case -1110033957: return addNoteNumberElement(); 2292 case -231349275: return addAdjudication(); 2293 case -1335224239: return addDetail(); 2294 default: return super.makeProperty(hash, name); 2295 } 2296 2297 } 2298 2299 @Override 2300 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2301 switch (hash) { 2302 case -1422298666: /*sequenceLinkId*/ return new String[] {"positiveInt"}; 2303 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 2304 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 2305 case 1984153269: /*service*/ return new String[] {"CodeableConcept"}; 2306 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 2307 case 101254: /*fee*/ return new String[] {"Money"}; 2308 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 2309 case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"}; 2310 case -1335224239: /*detail*/ return new String[] {}; 2311 default: return super.getTypesForProperty(hash, name); 2312 } 2313 2314 } 2315 2316 @Override 2317 public Base addChild(String name) throws FHIRException { 2318 if (name.equals("sequenceLinkId")) { 2319 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); 2320 } 2321 else if (name.equals("revenue")) { 2322 this.revenue = new CodeableConcept(); 2323 return this.revenue; 2324 } 2325 else if (name.equals("category")) { 2326 this.category = new CodeableConcept(); 2327 return this.category; 2328 } 2329 else if (name.equals("service")) { 2330 this.service = new CodeableConcept(); 2331 return this.service; 2332 } 2333 else if (name.equals("modifier")) { 2334 return addModifier(); 2335 } 2336 else if (name.equals("fee")) { 2337 this.fee = new Money(); 2338 return this.fee; 2339 } 2340 else if (name.equals("noteNumber")) { 2341 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); 2342 } 2343 else if (name.equals("adjudication")) { 2344 return addAdjudication(); 2345 } 2346 else if (name.equals("detail")) { 2347 return addDetail(); 2348 } 2349 else 2350 return super.addChild(name); 2351 } 2352 2353 public AddedItemComponent copy() { 2354 AddedItemComponent dst = new AddedItemComponent(); 2355 copyValues(dst); 2356 if (sequenceLinkId != null) { 2357 dst.sequenceLinkId = new ArrayList<PositiveIntType>(); 2358 for (PositiveIntType i : sequenceLinkId) 2359 dst.sequenceLinkId.add(i.copy()); 2360 }; 2361 dst.revenue = revenue == null ? null : revenue.copy(); 2362 dst.category = category == null ? null : category.copy(); 2363 dst.service = service == null ? null : service.copy(); 2364 if (modifier != null) { 2365 dst.modifier = new ArrayList<CodeableConcept>(); 2366 for (CodeableConcept i : modifier) 2367 dst.modifier.add(i.copy()); 2368 }; 2369 dst.fee = fee == null ? null : fee.copy(); 2370 if (noteNumber != null) { 2371 dst.noteNumber = new ArrayList<PositiveIntType>(); 2372 for (PositiveIntType i : noteNumber) 2373 dst.noteNumber.add(i.copy()); 2374 }; 2375 if (adjudication != null) { 2376 dst.adjudication = new ArrayList<AdjudicationComponent>(); 2377 for (AdjudicationComponent i : adjudication) 2378 dst.adjudication.add(i.copy()); 2379 }; 2380 if (detail != null) { 2381 dst.detail = new ArrayList<AddedItemsDetailComponent>(); 2382 for (AddedItemsDetailComponent i : detail) 2383 dst.detail.add(i.copy()); 2384 }; 2385 return dst; 2386 } 2387 2388 @Override 2389 public boolean equalsDeep(Base other_) { 2390 if (!super.equalsDeep(other_)) 2391 return false; 2392 if (!(other_ instanceof AddedItemComponent)) 2393 return false; 2394 AddedItemComponent o = (AddedItemComponent) other_; 2395 return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(revenue, o.revenue, true) 2396 && compareDeep(category, o.category, true) && compareDeep(service, o.service, true) && compareDeep(modifier, o.modifier, true) 2397 && compareDeep(fee, o.fee, true) && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(adjudication, o.adjudication, true) 2398 && compareDeep(detail, o.detail, true); 2399 } 2400 2401 @Override 2402 public boolean equalsShallow(Base other_) { 2403 if (!super.equalsShallow(other_)) 2404 return false; 2405 if (!(other_ instanceof AddedItemComponent)) 2406 return false; 2407 AddedItemComponent o = (AddedItemComponent) other_; 2408 return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(noteNumber, o.noteNumber, true) 2409 ; 2410 } 2411 2412 public boolean isEmpty() { 2413 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, revenue, category 2414 , service, modifier, fee, noteNumber, adjudication, detail); 2415 } 2416 2417 public String fhirType() { 2418 return "ClaimResponse.addItem"; 2419 2420 } 2421 2422 } 2423 2424 @Block() 2425 public static class AddedItemsDetailComponent extends BackboneElement implements IBaseBackboneElement { 2426 /** 2427 * The type of reveneu or cost center providing the product and/or service. 2428 */ 2429 @Child(name = "revenue", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 2430 @Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of reveneu or cost center providing the product and/or service." ) 2431 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center") 2432 protected CodeableConcept revenue; 2433 2434 /** 2435 * Health Care Service Type Codes to identify the classification of service or benefits. 2436 */ 2437 @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 2438 @Description(shortDefinition="Type of service or product", formalDefinition="Health Care Service Type Codes to identify the classification of service or benefits." ) 2439 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-subcategory") 2440 protected CodeableConcept category; 2441 2442 /** 2443 * A code to indicate the Professional Service or Product supplied. 2444 */ 2445 @Child(name = "service", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 2446 @Description(shortDefinition="Service or Product", formalDefinition="A code to indicate the Professional Service or Product supplied." ) 2447 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls") 2448 protected CodeableConcept service; 2449 2450 /** 2451 * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours. 2452 */ 2453 @Child(name = "modifier", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2454 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours." ) 2455 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers") 2456 protected List<CodeableConcept> modifier; 2457 2458 /** 2459 * The fee charged for the professional service or product.. 2460 */ 2461 @Child(name = "fee", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 2462 @Description(shortDefinition="Professional fee or Product charge", formalDefinition="The fee charged for the professional service or product.." ) 2463 protected Money fee; 2464 2465 /** 2466 * A list of note references to the notes provided below. 2467 */ 2468 @Child(name = "noteNumber", type = {PositiveIntType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2469 @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) 2470 protected List<PositiveIntType> noteNumber; 2471 2472 /** 2473 * The adjudications results. 2474 */ 2475 @Child(name = "adjudication", type = {AdjudicationComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2476 @Description(shortDefinition="Added items detail adjudication", formalDefinition="The adjudications results." ) 2477 protected List<AdjudicationComponent> adjudication; 2478 2479 private static final long serialVersionUID = -311484980L; 2480 2481 /** 2482 * Constructor 2483 */ 2484 public AddedItemsDetailComponent() { 2485 super(); 2486 } 2487 2488 /** 2489 * @return {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) 2490 */ 2491 public CodeableConcept getRevenue() { 2492 if (this.revenue == null) 2493 if (Configuration.errorOnAutoCreate()) 2494 throw new Error("Attempt to auto-create AddedItemsDetailComponent.revenue"); 2495 else if (Configuration.doAutoCreate()) 2496 this.revenue = new CodeableConcept(); // cc 2497 return this.revenue; 2498 } 2499 2500 public boolean hasRevenue() { 2501 return this.revenue != null && !this.revenue.isEmpty(); 2502 } 2503 2504 /** 2505 * @param value {@link #revenue} (The type of reveneu or cost center providing the product and/or service.) 2506 */ 2507 public AddedItemsDetailComponent setRevenue(CodeableConcept value) { 2508 this.revenue = value; 2509 return this; 2510 } 2511 2512 /** 2513 * @return {@link #category} (Health Care Service Type Codes to identify the classification of service or benefits.) 2514 */ 2515 public CodeableConcept getCategory() { 2516 if (this.category == null) 2517 if (Configuration.errorOnAutoCreate()) 2518 throw new Error("Attempt to auto-create AddedItemsDetailComponent.category"); 2519 else if (Configuration.doAutoCreate()) 2520 this.category = new CodeableConcept(); // cc 2521 return this.category; 2522 } 2523 2524 public boolean hasCategory() { 2525 return this.category != null && !this.category.isEmpty(); 2526 } 2527 2528 /** 2529 * @param value {@link #category} (Health Care Service Type Codes to identify the classification of service or benefits.) 2530 */ 2531 public AddedItemsDetailComponent setCategory(CodeableConcept value) { 2532 this.category = value; 2533 return this; 2534 } 2535 2536 /** 2537 * @return {@link #service} (A code to indicate the Professional Service or Product supplied.) 2538 */ 2539 public CodeableConcept getService() { 2540 if (this.service == null) 2541 if (Configuration.errorOnAutoCreate()) 2542 throw new Error("Attempt to auto-create AddedItemsDetailComponent.service"); 2543 else if (Configuration.doAutoCreate()) 2544 this.service = new CodeableConcept(); // cc 2545 return this.service; 2546 } 2547 2548 public boolean hasService() { 2549 return this.service != null && !this.service.isEmpty(); 2550 } 2551 2552 /** 2553 * @param value {@link #service} (A code to indicate the Professional Service or Product supplied.) 2554 */ 2555 public AddedItemsDetailComponent setService(CodeableConcept value) { 2556 this.service = value; 2557 return this; 2558 } 2559 2560 /** 2561 * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.) 2562 */ 2563 public List<CodeableConcept> getModifier() { 2564 if (this.modifier == null) 2565 this.modifier = new ArrayList<CodeableConcept>(); 2566 return this.modifier; 2567 } 2568 2569 /** 2570 * @return Returns a reference to <code>this</code> for easy method chaining 2571 */ 2572 public AddedItemsDetailComponent setModifier(List<CodeableConcept> theModifier) { 2573 this.modifier = theModifier; 2574 return this; 2575 } 2576 2577 public boolean hasModifier() { 2578 if (this.modifier == null) 2579 return false; 2580 for (CodeableConcept item : this.modifier) 2581 if (!item.isEmpty()) 2582 return true; 2583 return false; 2584 } 2585 2586 public CodeableConcept addModifier() { //3 2587 CodeableConcept t = new CodeableConcept(); 2588 if (this.modifier == null) 2589 this.modifier = new ArrayList<CodeableConcept>(); 2590 this.modifier.add(t); 2591 return t; 2592 } 2593 2594 public AddedItemsDetailComponent addModifier(CodeableConcept t) { //3 2595 if (t == null) 2596 return this; 2597 if (this.modifier == null) 2598 this.modifier = new ArrayList<CodeableConcept>(); 2599 this.modifier.add(t); 2600 return this; 2601 } 2602 2603 /** 2604 * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist 2605 */ 2606 public CodeableConcept getModifierFirstRep() { 2607 if (getModifier().isEmpty()) { 2608 addModifier(); 2609 } 2610 return getModifier().get(0); 2611 } 2612 2613 /** 2614 * @return {@link #fee} (The fee charged for the professional service or product..) 2615 */ 2616 public Money getFee() { 2617 if (this.fee == null) 2618 if (Configuration.errorOnAutoCreate()) 2619 throw new Error("Attempt to auto-create AddedItemsDetailComponent.fee"); 2620 else if (Configuration.doAutoCreate()) 2621 this.fee = new Money(); // cc 2622 return this.fee; 2623 } 2624 2625 public boolean hasFee() { 2626 return this.fee != null && !this.fee.isEmpty(); 2627 } 2628 2629 /** 2630 * @param value {@link #fee} (The fee charged for the professional service or product..) 2631 */ 2632 public AddedItemsDetailComponent setFee(Money value) { 2633 this.fee = value; 2634 return this; 2635 } 2636 2637 /** 2638 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 2639 */ 2640 public List<PositiveIntType> getNoteNumber() { 2641 if (this.noteNumber == null) 2642 this.noteNumber = new ArrayList<PositiveIntType>(); 2643 return this.noteNumber; 2644 } 2645 2646 /** 2647 * @return Returns a reference to <code>this</code> for easy method chaining 2648 */ 2649 public AddedItemsDetailComponent setNoteNumber(List<PositiveIntType> theNoteNumber) { 2650 this.noteNumber = theNoteNumber; 2651 return this; 2652 } 2653 2654 public boolean hasNoteNumber() { 2655 if (this.noteNumber == null) 2656 return false; 2657 for (PositiveIntType item : this.noteNumber) 2658 if (!item.isEmpty()) 2659 return true; 2660 return false; 2661 } 2662 2663 /** 2664 * @return {@link #noteNumber} (A list of note references to the notes provided below.) 2665 */ 2666 public PositiveIntType addNoteNumberElement() {//2 2667 PositiveIntType t = new PositiveIntType(); 2668 if (this.noteNumber == null) 2669 this.noteNumber = new ArrayList<PositiveIntType>(); 2670 this.noteNumber.add(t); 2671 return t; 2672 } 2673 2674 /** 2675 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 2676 */ 2677 public AddedItemsDetailComponent addNoteNumber(int value) { //1 2678 PositiveIntType t = new PositiveIntType(); 2679 t.setValue(value); 2680 if (this.noteNumber == null) 2681 this.noteNumber = new ArrayList<PositiveIntType>(); 2682 this.noteNumber.add(t); 2683 return this; 2684 } 2685 2686 /** 2687 * @param value {@link #noteNumber} (A list of note references to the notes provided below.) 2688 */ 2689 public boolean hasNoteNumber(int value) { 2690 if (this.noteNumber == null) 2691 return false; 2692 for (PositiveIntType v : this.noteNumber) 2693 if (v.getValue().equals(value)) // positiveInt 2694 return true; 2695 return false; 2696 } 2697 2698 /** 2699 * @return {@link #adjudication} (The adjudications results.) 2700 */ 2701 public List<AdjudicationComponent> getAdjudication() { 2702 if (this.adjudication == null) 2703 this.adjudication = new ArrayList<AdjudicationComponent>(); 2704 return this.adjudication; 2705 } 2706 2707 /** 2708 * @return Returns a reference to <code>this</code> for easy method chaining 2709 */ 2710 public AddedItemsDetailComponent setAdjudication(List<AdjudicationComponent> theAdjudication) { 2711 this.adjudication = theAdjudication; 2712 return this; 2713 } 2714 2715 public boolean hasAdjudication() { 2716 if (this.adjudication == null) 2717 return false; 2718 for (AdjudicationComponent item : this.adjudication) 2719 if (!item.isEmpty()) 2720 return true; 2721 return false; 2722 } 2723 2724 public AdjudicationComponent addAdjudication() { //3 2725 AdjudicationComponent t = new AdjudicationComponent(); 2726 if (this.adjudication == null) 2727 this.adjudication = new ArrayList<AdjudicationComponent>(); 2728 this.adjudication.add(t); 2729 return t; 2730 } 2731 2732 public AddedItemsDetailComponent addAdjudication(AdjudicationComponent t) { //3 2733 if (t == null) 2734 return this; 2735 if (this.adjudication == null) 2736 this.adjudication = new ArrayList<AdjudicationComponent>(); 2737 this.adjudication.add(t); 2738 return this; 2739 } 2740 2741 /** 2742 * @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist 2743 */ 2744 public AdjudicationComponent getAdjudicationFirstRep() { 2745 if (getAdjudication().isEmpty()) { 2746 addAdjudication(); 2747 } 2748 return getAdjudication().get(0); 2749 } 2750 2751 protected void listChildren(List<Property> children) { 2752 super.listChildren(children); 2753 children.add(new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue)); 2754 children.add(new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category)); 2755 children.add(new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied.", 0, 1, service)); 2756 children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.", 0, java.lang.Integer.MAX_VALUE, modifier)); 2757 children.add(new Property("fee", "Money", "The fee charged for the professional service or product..", 0, 1, fee)); 2758 children.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); 2759 children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); 2760 } 2761 2762 @Override 2763 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2764 switch (_hash) { 2765 case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of reveneu or cost center providing the product and/or service.", 0, 1, revenue); 2766 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Health Care Service Type Codes to identify the classification of service or benefits.", 0, 1, category); 2767 case 1984153269: /*service*/ return new Property("service", "CodeableConcept", "A code to indicate the Professional Service or Product supplied.", 0, 1, service); 2768 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.", 0, java.lang.Integer.MAX_VALUE, modifier); 2769 case 101254: /*fee*/ return new Property("fee", "Money", "The fee charged for the professional service or product..", 0, 1, fee); 2770 case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber); 2771 case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication); 2772 default: return super.getNamedProperty(_hash, _name, _checkValid); 2773 } 2774 2775 } 2776 2777 @Override 2778 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2779 switch (hash) { 2780 case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept 2781 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 2782 case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // CodeableConcept 2783 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept 2784 case 101254: /*fee*/ return this.fee == null ? new Base[0] : new Base[] {this.fee}; // Money 2785 case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType 2786 case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent 2787 default: return super.getProperty(hash, name, checkValid); 2788 } 2789 2790 } 2791 2792 @Override 2793 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2794 switch (hash) { 2795 case 1099842588: // revenue 2796 this.revenue = castToCodeableConcept(value); // CodeableConcept 2797 return value; 2798 case 50511102: // category 2799 this.category = castToCodeableConcept(value); // CodeableConcept 2800 return value; 2801 case 1984153269: // service 2802 this.service = castToCodeableConcept(value); // CodeableConcept 2803 return value; 2804 case -615513385: // modifier 2805 this.getModifier().add(castToCodeableConcept(value)); // CodeableConcept 2806 return value; 2807 case 101254: // fee 2808 this.fee = castToMoney(value); // Money 2809 return value; 2810 case -1110033957: // noteNumber 2811 this.getNoteNumber().add(castToPositiveInt(value)); // PositiveIntType 2812 return value; 2813 case -231349275: // adjudication 2814 this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent 2815 return value; 2816 default: return super.setProperty(hash, name, value); 2817 } 2818 2819 } 2820 2821 @Override 2822 public Base setProperty(String name, Base value) throws FHIRException { 2823 if (name.equals("revenue")) { 2824 this.revenue = castToCodeableConcept(value); // CodeableConcept 2825 } else if (name.equals("category")) { 2826 this.category = castToCodeableConcept(value); // CodeableConcept 2827 } else if (name.equals("service")) { 2828 this.service = castToCodeableConcept(value); // CodeableConcept 2829 } else if (name.equals("modifier")) { 2830 this.getModifier().add(castToCodeableConcept(value)); 2831 } else if (name.equals("fee")) { 2832 this.fee = castToMoney(value); // Money 2833 } else if (name.equals("noteNumber")) { 2834 this.getNoteNumber().add(castToPositiveInt(value)); 2835 } else if (name.equals("adjudication")) { 2836 this.getAdjudication().add((AdjudicationComponent) value); 2837 } else 2838 return super.setProperty(name, value); 2839 return value; 2840 } 2841 2842 @Override 2843 public Base makeProperty(int hash, String name) throws FHIRException { 2844 switch (hash) { 2845 case 1099842588: return getRevenue(); 2846 case 50511102: return getCategory(); 2847 case 1984153269: return getService(); 2848 case -615513385: return addModifier(); 2849 case 101254: return getFee(); 2850 case -1110033957: return addNoteNumberElement(); 2851 case -231349275: return addAdjudication(); 2852 default: return super.makeProperty(hash, name); 2853 } 2854 2855 } 2856 2857 @Override 2858 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2859 switch (hash) { 2860 case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"}; 2861 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 2862 case 1984153269: /*service*/ return new String[] {"CodeableConcept"}; 2863 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 2864 case 101254: /*fee*/ return new String[] {"Money"}; 2865 case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"}; 2866 case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"}; 2867 default: return super.getTypesForProperty(hash, name); 2868 } 2869 2870 } 2871 2872 @Override 2873 public Base addChild(String name) throws FHIRException { 2874 if (name.equals("revenue")) { 2875 this.revenue = new CodeableConcept(); 2876 return this.revenue; 2877 } 2878 else if (name.equals("category")) { 2879 this.category = new CodeableConcept(); 2880 return this.category; 2881 } 2882 else if (name.equals("service")) { 2883 this.service = new CodeableConcept(); 2884 return this.service; 2885 } 2886 else if (name.equals("modifier")) { 2887 return addModifier(); 2888 } 2889 else if (name.equals("fee")) { 2890 this.fee = new Money(); 2891 return this.fee; 2892 } 2893 else if (name.equals("noteNumber")) { 2894 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); 2895 } 2896 else if (name.equals("adjudication")) { 2897 return addAdjudication(); 2898 } 2899 else 2900 return super.addChild(name); 2901 } 2902 2903 public AddedItemsDetailComponent copy() { 2904 AddedItemsDetailComponent dst = new AddedItemsDetailComponent(); 2905 copyValues(dst); 2906 dst.revenue = revenue == null ? null : revenue.copy(); 2907 dst.category = category == null ? null : category.copy(); 2908 dst.service = service == null ? null : service.copy(); 2909 if (modifier != null) { 2910 dst.modifier = new ArrayList<CodeableConcept>(); 2911 for (CodeableConcept i : modifier) 2912 dst.modifier.add(i.copy()); 2913 }; 2914 dst.fee = fee == null ? null : fee.copy(); 2915 if (noteNumber != null) { 2916 dst.noteNumber = new ArrayList<PositiveIntType>(); 2917 for (PositiveIntType i : noteNumber) 2918 dst.noteNumber.add(i.copy()); 2919 }; 2920 if (adjudication != null) { 2921 dst.adjudication = new ArrayList<AdjudicationComponent>(); 2922 for (AdjudicationComponent i : adjudication) 2923 dst.adjudication.add(i.copy()); 2924 }; 2925 return dst; 2926 } 2927 2928 @Override 2929 public boolean equalsDeep(Base other_) { 2930 if (!super.equalsDeep(other_)) 2931 return false; 2932 if (!(other_ instanceof AddedItemsDetailComponent)) 2933 return false; 2934 AddedItemsDetailComponent o = (AddedItemsDetailComponent) other_; 2935 return compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(service, o.service, true) 2936 && compareDeep(modifier, o.modifier, true) && compareDeep(fee, o.fee, true) && compareDeep(noteNumber, o.noteNumber, true) 2937 && compareDeep(adjudication, o.adjudication, true); 2938 } 2939 2940 @Override 2941 public boolean equalsShallow(Base other_) { 2942 if (!super.equalsShallow(other_)) 2943 return false; 2944 if (!(other_ instanceof AddedItemsDetailComponent)) 2945 return false; 2946 AddedItemsDetailComponent o = (AddedItemsDetailComponent) other_; 2947 return compareValues(noteNumber, o.noteNumber, true); 2948 } 2949 2950 public boolean isEmpty() { 2951 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(revenue, category, service 2952 , modifier, fee, noteNumber, adjudication); 2953 } 2954 2955 public String fhirType() { 2956 return "ClaimResponse.addItem.detail"; 2957 2958 } 2959 2960 } 2961 2962 @Block() 2963 public static class ErrorComponent extends BackboneElement implements IBaseBackboneElement { 2964 /** 2965 * The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. 2966 */ 2967 @Child(name = "sequenceLinkId", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2968 @Description(shortDefinition="Item sequence number", formalDefinition="The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere." ) 2969 protected PositiveIntType sequenceLinkId; 2970 2971 /** 2972 * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 2973 */ 2974 @Child(name = "detailSequenceLinkId", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2975 @Description(shortDefinition="Detail sequence number", formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition." ) 2976 protected PositiveIntType detailSequenceLinkId; 2977 2978 /** 2979 * The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 2980 */ 2981 @Child(name = "subdetailSequenceLinkId", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2982 @Description(shortDefinition="Subdetail sequence number", formalDefinition="The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition." ) 2983 protected PositiveIntType subdetailSequenceLinkId; 2984 2985 /** 2986 * An error code,from a specified code system, which details why the claim could not be adjudicated. 2987 */ 2988 @Child(name = "code", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=false) 2989 @Description(shortDefinition="Error code detailing processing issues", formalDefinition="An error code,from a specified code system, which details why the claim could not be adjudicated." ) 2990 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-error") 2991 protected CodeableConcept code; 2992 2993 private static final long serialVersionUID = -1379670472L; 2994 2995 /** 2996 * Constructor 2997 */ 2998 public ErrorComponent() { 2999 super(); 3000 } 3001 3002 /** 3003 * Constructor 3004 */ 3005 public ErrorComponent(CodeableConcept code) { 3006 super(); 3007 this.code = code; 3008 } 3009 3010 /** 3011 * @return {@link #sequenceLinkId} (The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 3012 */ 3013 public PositiveIntType getSequenceLinkIdElement() { 3014 if (this.sequenceLinkId == null) 3015 if (Configuration.errorOnAutoCreate()) 3016 throw new Error("Attempt to auto-create ErrorComponent.sequenceLinkId"); 3017 else if (Configuration.doAutoCreate()) 3018 this.sequenceLinkId = new PositiveIntType(); // bb 3019 return this.sequenceLinkId; 3020 } 3021 3022 public boolean hasSequenceLinkIdElement() { 3023 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 3024 } 3025 3026 public boolean hasSequenceLinkId() { 3027 return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); 3028 } 3029 3030 /** 3031 * @param value {@link #sequenceLinkId} (The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value 3032 */ 3033 public ErrorComponent setSequenceLinkIdElement(PositiveIntType value) { 3034 this.sequenceLinkId = value; 3035 return this; 3036 } 3037 3038 /** 3039 * @return The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. 3040 */ 3041 public int getSequenceLinkId() { 3042 return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); 3043 } 3044 3045 /** 3046 * @param value The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere. 3047 */ 3048 public ErrorComponent setSequenceLinkId(int value) { 3049 if (this.sequenceLinkId == null) 3050 this.sequenceLinkId = new PositiveIntType(); 3051 this.sequenceLinkId.setValue(value); 3052 return this; 3053 } 3054 3055 /** 3056 * @return {@link #detailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getDetailSequenceLinkId" gives direct access to the value 3057 */ 3058 public PositiveIntType getDetailSequenceLinkIdElement() { 3059 if (this.detailSequenceLinkId == null) 3060 if (Configuration.errorOnAutoCreate()) 3061 throw new Error("Attempt to auto-create ErrorComponent.detailSequenceLinkId"); 3062 else if (Configuration.doAutoCreate()) 3063 this.detailSequenceLinkId = new PositiveIntType(); // bb 3064 return this.detailSequenceLinkId; 3065 } 3066 3067 public boolean hasDetailSequenceLinkIdElement() { 3068 return this.detailSequenceLinkId != null && !this.detailSequenceLinkId.isEmpty(); 3069 } 3070 3071 public boolean hasDetailSequenceLinkId() { 3072 return this.detailSequenceLinkId != null && !this.detailSequenceLinkId.isEmpty(); 3073 } 3074 3075 /** 3076 * @param value {@link #detailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getDetailSequenceLinkId" gives direct access to the value 3077 */ 3078 public ErrorComponent setDetailSequenceLinkIdElement(PositiveIntType value) { 3079 this.detailSequenceLinkId = value; 3080 return this; 3081 } 3082 3083 /** 3084 * @return The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 3085 */ 3086 public int getDetailSequenceLinkId() { 3087 return this.detailSequenceLinkId == null || this.detailSequenceLinkId.isEmpty() ? 0 : this.detailSequenceLinkId.getValue(); 3088 } 3089 3090 /** 3091 * @param value The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 3092 */ 3093 public ErrorComponent setDetailSequenceLinkId(int value) { 3094 if (this.detailSequenceLinkId == null) 3095 this.detailSequenceLinkId = new PositiveIntType(); 3096 this.detailSequenceLinkId.setValue(value); 3097 return this; 3098 } 3099 3100 /** 3101 * @return {@link #subdetailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getSubdetailSequenceLinkId" gives direct access to the value 3102 */ 3103 public PositiveIntType getSubdetailSequenceLinkIdElement() { 3104 if (this.subdetailSequenceLinkId == null) 3105 if (Configuration.errorOnAutoCreate()) 3106 throw new Error("Attempt to auto-create ErrorComponent.subdetailSequenceLinkId"); 3107 else if (Configuration.doAutoCreate()) 3108 this.subdetailSequenceLinkId = new PositiveIntType(); // bb 3109 return this.subdetailSequenceLinkId; 3110 } 3111 3112 public boolean hasSubdetailSequenceLinkIdElement() { 3113 return this.subdetailSequenceLinkId != null && !this.subdetailSequenceLinkId.isEmpty(); 3114 } 3115 3116 public boolean hasSubdetailSequenceLinkId() { 3117 return this.subdetailSequenceLinkId != null && !this.subdetailSequenceLinkId.isEmpty(); 3118 } 3119 3120 /** 3121 * @param value {@link #subdetailSequenceLinkId} (The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.). This is the underlying object with id, value and extensions. The accessor "getSubdetailSequenceLinkId" gives direct access to the value 3122 */ 3123 public ErrorComponent setSubdetailSequenceLinkIdElement(PositiveIntType value) { 3124 this.subdetailSequenceLinkId = value; 3125 return this; 3126 } 3127 3128 /** 3129 * @return The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 3130 */ 3131 public int getSubdetailSequenceLinkId() { 3132 return this.subdetailSequenceLinkId == null || this.subdetailSequenceLinkId.isEmpty() ? 0 : this.subdetailSequenceLinkId.getValue(); 3133 } 3134 3135 /** 3136 * @param value The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition. 3137 */ 3138 public ErrorComponent setSubdetailSequenceLinkId(int value) { 3139 if (this.subdetailSequenceLinkId == null) 3140 this.subdetailSequenceLinkId = new PositiveIntType(); 3141 this.subdetailSequenceLinkId.setValue(value); 3142 return this; 3143 } 3144 3145 /** 3146 * @return {@link #code} (An error code,from a specified code system, which details why the claim could not be adjudicated.) 3147 */ 3148 public CodeableConcept getCode() { 3149 if (this.code == null) 3150 if (Configuration.errorOnAutoCreate()) 3151 throw new Error("Attempt to auto-create ErrorComponent.code"); 3152 else if (Configuration.doAutoCreate()) 3153 this.code = new CodeableConcept(); // cc 3154 return this.code; 3155 } 3156 3157 public boolean hasCode() { 3158 return this.code != null && !this.code.isEmpty(); 3159 } 3160 3161 /** 3162 * @param value {@link #code} (An error code,from a specified code system, which details why the claim could not be adjudicated.) 3163 */ 3164 public ErrorComponent setCode(CodeableConcept value) { 3165 this.code = value; 3166 return this; 3167 } 3168 3169 protected void listChildren(List<Property> children) { 3170 super.listChildren(children); 3171 children.add(new Property("sequenceLinkId", "positiveInt", "The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.", 0, 1, sequenceLinkId)); 3172 children.add(new Property("detailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, 1, detailSequenceLinkId)); 3173 children.add(new Property("subdetailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, 1, subdetailSequenceLinkId)); 3174 children.add(new Property("code", "CodeableConcept", "An error code,from a specified code system, which details why the claim could not be adjudicated.", 0, 1, code)); 3175 } 3176 3177 @Override 3178 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3179 switch (_hash) { 3180 case -1422298666: /*sequenceLinkId*/ return new Property("sequenceLinkId", "positiveInt", "The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.", 0, 1, sequenceLinkId); 3181 case 516748423: /*detailSequenceLinkId*/ return new Property("detailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, 1, detailSequenceLinkId); 3182 case -1061088569: /*subdetailSequenceLinkId*/ return new Property("subdetailSequenceLinkId", "positiveInt", "The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.", 0, 1, subdetailSequenceLinkId); 3183 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "An error code,from a specified code system, which details why the claim could not be adjudicated.", 0, 1, code); 3184 default: return super.getNamedProperty(_hash, _name, _checkValid); 3185 } 3186 3187 } 3188 3189 @Override 3190 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3191 switch (hash) { 3192 case -1422298666: /*sequenceLinkId*/ return this.sequenceLinkId == null ? new Base[0] : new Base[] {this.sequenceLinkId}; // PositiveIntType 3193 case 516748423: /*detailSequenceLinkId*/ return this.detailSequenceLinkId == null ? new Base[0] : new Base[] {this.detailSequenceLinkId}; // PositiveIntType 3194 case -1061088569: /*subdetailSequenceLinkId*/ return this.subdetailSequenceLinkId == null ? new Base[0] : new Base[] {this.subdetailSequenceLinkId}; // PositiveIntType 3195 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 3196 default: return super.getProperty(hash, name, checkValid); 3197 } 3198 3199 } 3200 3201 @Override 3202 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3203 switch (hash) { 3204 case -1422298666: // sequenceLinkId 3205 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 3206 return value; 3207 case 516748423: // detailSequenceLinkId 3208 this.detailSequenceLinkId = castToPositiveInt(value); // PositiveIntType 3209 return value; 3210 case -1061088569: // subdetailSequenceLinkId 3211 this.subdetailSequenceLinkId = castToPositiveInt(value); // PositiveIntType 3212 return value; 3213 case 3059181: // code 3214 this.code = castToCodeableConcept(value); // CodeableConcept 3215 return value; 3216 default: return super.setProperty(hash, name, value); 3217 } 3218 3219 } 3220 3221 @Override 3222 public Base setProperty(String name, Base value) throws FHIRException { 3223 if (name.equals("sequenceLinkId")) { 3224 this.sequenceLinkId = castToPositiveInt(value); // PositiveIntType 3225 } else if (name.equals("detailSequenceLinkId")) { 3226 this.detailSequenceLinkId = castToPositiveInt(value); // PositiveIntType 3227 } else if (name.equals("subdetailSequenceLinkId")) { 3228 this.subdetailSequenceLinkId = castToPositiveInt(value); // PositiveIntType 3229 } else if (name.equals("code")) { 3230 this.code = castToCodeableConcept(value); // CodeableConcept 3231 } else 3232 return super.setProperty(name, value); 3233 return value; 3234 } 3235 3236 @Override 3237 public Base makeProperty(int hash, String name) throws FHIRException { 3238 switch (hash) { 3239 case -1422298666: return getSequenceLinkIdElement(); 3240 case 516748423: return getDetailSequenceLinkIdElement(); 3241 case -1061088569: return getSubdetailSequenceLinkIdElement(); 3242 case 3059181: return getCode(); 3243 default: return super.makeProperty(hash, name); 3244 } 3245 3246 } 3247 3248 @Override 3249 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3250 switch (hash) { 3251 case -1422298666: /*sequenceLinkId*/ return new String[] {"positiveInt"}; 3252 case 516748423: /*detailSequenceLinkId*/ return new String[] {"positiveInt"}; 3253 case -1061088569: /*subdetailSequenceLinkId*/ return new String[] {"positiveInt"}; 3254 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 3255 default: return super.getTypesForProperty(hash, name); 3256 } 3257 3258 } 3259 3260 @Override 3261 public Base addChild(String name) throws FHIRException { 3262 if (name.equals("sequenceLinkId")) { 3263 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); 3264 } 3265 else if (name.equals("detailSequenceLinkId")) { 3266 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.detailSequenceLinkId"); 3267 } 3268 else if (name.equals("subdetailSequenceLinkId")) { 3269 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.subdetailSequenceLinkId"); 3270 } 3271 else if (name.equals("code")) { 3272 this.code = new CodeableConcept(); 3273 return this.code; 3274 } 3275 else 3276 return super.addChild(name); 3277 } 3278 3279 public ErrorComponent copy() { 3280 ErrorComponent dst = new ErrorComponent(); 3281 copyValues(dst); 3282 dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); 3283 dst.detailSequenceLinkId = detailSequenceLinkId == null ? null : detailSequenceLinkId.copy(); 3284 dst.subdetailSequenceLinkId = subdetailSequenceLinkId == null ? null : subdetailSequenceLinkId.copy(); 3285 dst.code = code == null ? null : code.copy(); 3286 return dst; 3287 } 3288 3289 @Override 3290 public boolean equalsDeep(Base other_) { 3291 if (!super.equalsDeep(other_)) 3292 return false; 3293 if (!(other_ instanceof ErrorComponent)) 3294 return false; 3295 ErrorComponent o = (ErrorComponent) other_; 3296 return compareDeep(sequenceLinkId, o.sequenceLinkId, true) && compareDeep(detailSequenceLinkId, o.detailSequenceLinkId, true) 3297 && compareDeep(subdetailSequenceLinkId, o.subdetailSequenceLinkId, true) && compareDeep(code, o.code, true) 3298 ; 3299 } 3300 3301 @Override 3302 public boolean equalsShallow(Base other_) { 3303 if (!super.equalsShallow(other_)) 3304 return false; 3305 if (!(other_ instanceof ErrorComponent)) 3306 return false; 3307 ErrorComponent o = (ErrorComponent) other_; 3308 return compareValues(sequenceLinkId, o.sequenceLinkId, true) && compareValues(detailSequenceLinkId, o.detailSequenceLinkId, true) 3309 && compareValues(subdetailSequenceLinkId, o.subdetailSequenceLinkId, true); 3310 } 3311 3312 public boolean isEmpty() { 3313 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequenceLinkId, detailSequenceLinkId 3314 , subdetailSequenceLinkId, code); 3315 } 3316 3317 public String fhirType() { 3318 return "ClaimResponse.error"; 3319 3320 } 3321 3322 } 3323 3324 @Block() 3325 public static class PaymentComponent extends BackboneElement implements IBaseBackboneElement { 3326 /** 3327 * Whether this represents partial or complete payment of the claim. 3328 */ 3329 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3330 @Description(shortDefinition="Partial or Complete", formalDefinition="Whether this represents partial or complete payment of the claim." ) 3331 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-paymenttype") 3332 protected CodeableConcept type; 3333 3334 /** 3335 * Adjustment to the payment of this transaction which is not related to adjudication of this transaction. 3336 */ 3337 @Child(name = "adjustment", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=false) 3338 @Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." ) 3339 protected Money adjustment; 3340 3341 /** 3342 * Reason for the payment adjustment. 3343 */ 3344 @Child(name = "adjustmentReason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 3345 @Description(shortDefinition="Explanation for the non-claim adjustment", formalDefinition="Reason for the payment adjustment." ) 3346 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-adjustment-reason") 3347 protected CodeableConcept adjustmentReason; 3348 3349 /** 3350 * Estimated payment data. 3351 */ 3352 @Child(name = "date", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3353 @Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." ) 3354 protected DateType date; 3355 3356 /** 3357 * Payable less any payment adjustment. 3358 */ 3359 @Child(name = "amount", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 3360 @Description(shortDefinition="Payable amount after adjustment", formalDefinition="Payable less any payment adjustment." ) 3361 protected Money amount; 3362 3363 /** 3364 * Payment identifier. 3365 */ 3366 @Child(name = "identifier", type = {Identifier.class}, order=6, min=0, max=1, modifier=false, summary=false) 3367 @Description(shortDefinition="Identifier of the payment instrument", formalDefinition="Payment identifier." ) 3368 protected Identifier identifier; 3369 3370 private static final long serialVersionUID = 1539906026L; 3371 3372 /** 3373 * Constructor 3374 */ 3375 public PaymentComponent() { 3376 super(); 3377 } 3378 3379 /** 3380 * @return {@link #type} (Whether this represents partial or complete payment of the claim.) 3381 */ 3382 public CodeableConcept getType() { 3383 if (this.type == null) 3384 if (Configuration.errorOnAutoCreate()) 3385 throw new Error("Attempt to auto-create PaymentComponent.type"); 3386 else if (Configuration.doAutoCreate()) 3387 this.type = new CodeableConcept(); // cc 3388 return this.type; 3389 } 3390 3391 public boolean hasType() { 3392 return this.type != null && !this.type.isEmpty(); 3393 } 3394 3395 /** 3396 * @param value {@link #type} (Whether this represents partial or complete payment of the claim.) 3397 */ 3398 public PaymentComponent setType(CodeableConcept value) { 3399 this.type = value; 3400 return this; 3401 } 3402 3403 /** 3404 * @return {@link #adjustment} (Adjustment to the payment of this transaction which is not related to adjudication of this transaction.) 3405 */ 3406 public Money getAdjustment() { 3407 if (this.adjustment == null) 3408 if (Configuration.errorOnAutoCreate()) 3409 throw new Error("Attempt to auto-create PaymentComponent.adjustment"); 3410 else if (Configuration.doAutoCreate()) 3411 this.adjustment = new Money(); // cc 3412 return this.adjustment; 3413 } 3414 3415 public boolean hasAdjustment() { 3416 return this.adjustment != null && !this.adjustment.isEmpty(); 3417 } 3418 3419 /** 3420 * @param value {@link #adjustment} (Adjustment to the payment of this transaction which is not related to adjudication of this transaction.) 3421 */ 3422 public PaymentComponent setAdjustment(Money value) { 3423 this.adjustment = value; 3424 return this; 3425 } 3426 3427 /** 3428 * @return {@link #adjustmentReason} (Reason for the payment adjustment.) 3429 */ 3430 public CodeableConcept getAdjustmentReason() { 3431 if (this.adjustmentReason == null) 3432 if (Configuration.errorOnAutoCreate()) 3433 throw new Error("Attempt to auto-create PaymentComponent.adjustmentReason"); 3434 else if (Configuration.doAutoCreate()) 3435 this.adjustmentReason = new CodeableConcept(); // cc 3436 return this.adjustmentReason; 3437 } 3438 3439 public boolean hasAdjustmentReason() { 3440 return this.adjustmentReason != null && !this.adjustmentReason.isEmpty(); 3441 } 3442 3443 /** 3444 * @param value {@link #adjustmentReason} (Reason for the payment adjustment.) 3445 */ 3446 public PaymentComponent setAdjustmentReason(CodeableConcept value) { 3447 this.adjustmentReason = value; 3448 return this; 3449 } 3450 3451 /** 3452 * @return {@link #date} (Estimated payment data.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3453 */ 3454 public DateType getDateElement() { 3455 if (this.date == null) 3456 if (Configuration.errorOnAutoCreate()) 3457 throw new Error("Attempt to auto-create PaymentComponent.date"); 3458 else if (Configuration.doAutoCreate()) 3459 this.date = new DateType(); // bb 3460 return this.date; 3461 } 3462 3463 public boolean hasDateElement() { 3464 return this.date != null && !this.date.isEmpty(); 3465 } 3466 3467 public boolean hasDate() { 3468 return this.date != null && !this.date.isEmpty(); 3469 } 3470 3471 /** 3472 * @param value {@link #date} (Estimated payment data.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3473 */ 3474 public PaymentComponent setDateElement(DateType value) { 3475 this.date = value; 3476 return this; 3477 } 3478 3479 /** 3480 * @return Estimated payment data. 3481 */ 3482 public Date getDate() { 3483 return this.date == null ? null : this.date.getValue(); 3484 } 3485 3486 /** 3487 * @param value Estimated payment data. 3488 */ 3489 public PaymentComponent setDate(Date value) { 3490 if (value == null) 3491 this.date = null; 3492 else { 3493 if (this.date == null) 3494 this.date = new DateType(); 3495 this.date.setValue(value); 3496 } 3497 return this; 3498 } 3499 3500 /** 3501 * @return {@link #amount} (Payable less any payment adjustment.) 3502 */ 3503 public Money getAmount() { 3504 if (this.amount == null) 3505 if (Configuration.errorOnAutoCreate()) 3506 throw new Error("Attempt to auto-create PaymentComponent.amount"); 3507 else if (Configuration.doAutoCreate()) 3508 this.amount = new Money(); // cc 3509 return this.amount; 3510 } 3511 3512 public boolean hasAmount() { 3513 return this.amount != null && !this.amount.isEmpty(); 3514 } 3515 3516 /** 3517 * @param value {@link #amount} (Payable less any payment adjustment.) 3518 */ 3519 public PaymentComponent setAmount(Money value) { 3520 this.amount = value; 3521 return this; 3522 } 3523 3524 /** 3525 * @return {@link #identifier} (Payment identifier.) 3526 */ 3527 public Identifier getIdentifier() { 3528 if (this.identifier == null) 3529 if (Configuration.errorOnAutoCreate()) 3530 throw new Error("Attempt to auto-create PaymentComponent.identifier"); 3531 else if (Configuration.doAutoCreate()) 3532 this.identifier = new Identifier(); // cc 3533 return this.identifier; 3534 } 3535 3536 public boolean hasIdentifier() { 3537 return this.identifier != null && !this.identifier.isEmpty(); 3538 } 3539 3540 /** 3541 * @param value {@link #identifier} (Payment identifier.) 3542 */ 3543 public PaymentComponent setIdentifier(Identifier value) { 3544 this.identifier = value; 3545 return this; 3546 } 3547 3548 protected void listChildren(List<Property> children) { 3549 super.listChildren(children); 3550 children.add(new Property("type", "CodeableConcept", "Whether this represents partial or complete payment of the claim.", 0, 1, type)); 3551 children.add(new Property("adjustment", "Money", "Adjustment to the payment of this transaction which is not related to adjudication of this transaction.", 0, 1, adjustment)); 3552 children.add(new Property("adjustmentReason", "CodeableConcept", "Reason for the payment adjustment.", 0, 1, adjustmentReason)); 3553 children.add(new Property("date", "date", "Estimated payment data.", 0, 1, date)); 3554 children.add(new Property("amount", "Money", "Payable less any payment adjustment.", 0, 1, amount)); 3555 children.add(new Property("identifier", "Identifier", "Payment identifier.", 0, 1, identifier)); 3556 } 3557 3558 @Override 3559 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3560 switch (_hash) { 3561 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Whether this represents partial or complete payment of the claim.", 0, 1, type); 3562 case 1977085293: /*adjustment*/ return new Property("adjustment", "Money", "Adjustment to the payment of this transaction which is not related to adjudication of this transaction.", 0, 1, adjustment); 3563 case -1255938543: /*adjustmentReason*/ return new Property("adjustmentReason", "CodeableConcept", "Reason for the payment adjustment.", 0, 1, adjustmentReason); 3564 case 3076014: /*date*/ return new Property("date", "date", "Estimated payment data.", 0, 1, date); 3565 case -1413853096: /*amount*/ return new Property("amount", "Money", "Payable less any payment adjustment.", 0, 1, amount); 3566 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Payment identifier.", 0, 1, identifier); 3567 default: return super.getNamedProperty(_hash, _name, _checkValid); 3568 } 3569 3570 } 3571 3572 @Override 3573 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3574 switch (hash) { 3575 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3576 case 1977085293: /*adjustment*/ return this.adjustment == null ? new Base[0] : new Base[] {this.adjustment}; // Money 3577 case -1255938543: /*adjustmentReason*/ return this.adjustmentReason == null ? new Base[0] : new Base[] {this.adjustmentReason}; // CodeableConcept 3578 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType 3579 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 3580 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 3581 default: return super.getProperty(hash, name, checkValid); 3582 } 3583 3584 } 3585 3586 @Override 3587 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3588 switch (hash) { 3589 case 3575610: // type 3590 this.type = castToCodeableConcept(value); // CodeableConcept 3591 return value; 3592 case 1977085293: // adjustment 3593 this.adjustment = castToMoney(value); // Money 3594 return value; 3595 case -1255938543: // adjustmentReason 3596 this.adjustmentReason = castToCodeableConcept(value); // CodeableConcept 3597 return value; 3598 case 3076014: // date 3599 this.date = castToDate(value); // DateType 3600 return value; 3601 case -1413853096: // amount 3602 this.amount = castToMoney(value); // Money 3603 return value; 3604 case -1618432855: // identifier 3605 this.identifier = castToIdentifier(value); // Identifier 3606 return value; 3607 default: return super.setProperty(hash, name, value); 3608 } 3609 3610 } 3611 3612 @Override 3613 public Base setProperty(String name, Base value) throws FHIRException { 3614 if (name.equals("type")) { 3615 this.type = castToCodeableConcept(value); // CodeableConcept 3616 } else if (name.equals("adjustment")) { 3617 this.adjustment = castToMoney(value); // Money 3618 } else if (name.equals("adjustmentReason")) { 3619 this.adjustmentReason = castToCodeableConcept(value); // CodeableConcept 3620 } else if (name.equals("date")) { 3621 this.date = castToDate(value); // DateType 3622 } else if (name.equals("amount")) { 3623 this.amount = castToMoney(value); // Money 3624 } else if (name.equals("identifier")) { 3625 this.identifier = castToIdentifier(value); // Identifier 3626 } else 3627 return super.setProperty(name, value); 3628 return value; 3629 } 3630 3631 @Override 3632 public Base makeProperty(int hash, String name) throws FHIRException { 3633 switch (hash) { 3634 case 3575610: return getType(); 3635 case 1977085293: return getAdjustment(); 3636 case -1255938543: return getAdjustmentReason(); 3637 case 3076014: return getDateElement(); 3638 case -1413853096: return getAmount(); 3639 case -1618432855: return getIdentifier(); 3640 default: return super.makeProperty(hash, name); 3641 } 3642 3643 } 3644 3645 @Override 3646 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3647 switch (hash) { 3648 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3649 case 1977085293: /*adjustment*/ return new String[] {"Money"}; 3650 case -1255938543: /*adjustmentReason*/ return new String[] {"CodeableConcept"}; 3651 case 3076014: /*date*/ return new String[] {"date"}; 3652 case -1413853096: /*amount*/ return new String[] {"Money"}; 3653 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3654 default: return super.getTypesForProperty(hash, name); 3655 } 3656 3657 } 3658 3659 @Override 3660 public Base addChild(String name) throws FHIRException { 3661 if (name.equals("type")) { 3662 this.type = new CodeableConcept(); 3663 return this.type; 3664 } 3665 else if (name.equals("adjustment")) { 3666 this.adjustment = new Money(); 3667 return this.adjustment; 3668 } 3669 else if (name.equals("adjustmentReason")) { 3670 this.adjustmentReason = new CodeableConcept(); 3671 return this.adjustmentReason; 3672 } 3673 else if (name.equals("date")) { 3674 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.date"); 3675 } 3676 else if (name.equals("amount")) { 3677 this.amount = new Money(); 3678 return this.amount; 3679 } 3680 else if (name.equals("identifier")) { 3681 this.identifier = new Identifier(); 3682 return this.identifier; 3683 } 3684 else 3685 return super.addChild(name); 3686 } 3687 3688 public PaymentComponent copy() { 3689 PaymentComponent dst = new PaymentComponent(); 3690 copyValues(dst); 3691 dst.type = type == null ? null : type.copy(); 3692 dst.adjustment = adjustment == null ? null : adjustment.copy(); 3693 dst.adjustmentReason = adjustmentReason == null ? null : adjustmentReason.copy(); 3694 dst.date = date == null ? null : date.copy(); 3695 dst.amount = amount == null ? null : amount.copy(); 3696 dst.identifier = identifier == null ? null : identifier.copy(); 3697 return dst; 3698 } 3699 3700 @Override 3701 public boolean equalsDeep(Base other_) { 3702 if (!super.equalsDeep(other_)) 3703 return false; 3704 if (!(other_ instanceof PaymentComponent)) 3705 return false; 3706 PaymentComponent o = (PaymentComponent) other_; 3707 return compareDeep(type, o.type, true) && compareDeep(adjustment, o.adjustment, true) && compareDeep(adjustmentReason, o.adjustmentReason, true) 3708 && compareDeep(date, o.date, true) && compareDeep(amount, o.amount, true) && compareDeep(identifier, o.identifier, true) 3709 ; 3710 } 3711 3712 @Override 3713 public boolean equalsShallow(Base other_) { 3714 if (!super.equalsShallow(other_)) 3715 return false; 3716 if (!(other_ instanceof PaymentComponent)) 3717 return false; 3718 PaymentComponent o = (PaymentComponent) other_; 3719 return compareValues(date, o.date, true); 3720 } 3721 3722 public boolean isEmpty() { 3723 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, adjustment, adjustmentReason 3724 , date, amount, identifier); 3725 } 3726 3727 public String fhirType() { 3728 return "ClaimResponse.payment"; 3729 3730 } 3731 3732 } 3733 3734 @Block() 3735 public static class NoteComponent extends BackboneElement implements IBaseBackboneElement { 3736 /** 3737 * An integer associated with each note which may be referred to from each service line item. 3738 */ 3739 @Child(name = "number", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3740 @Description(shortDefinition="Sequence Number for this note", formalDefinition="An integer associated with each note which may be referred to from each service line item." ) 3741 protected PositiveIntType number; 3742 3743 /** 3744 * The note purpose: Print/Display. 3745 */ 3746 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 3747 @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) 3748 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") 3749 protected CodeableConcept type; 3750 3751 /** 3752 * The note text. 3753 */ 3754 @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3755 @Description(shortDefinition="Note explanatory text", formalDefinition="The note text." ) 3756 protected StringType text; 3757 3758 /** 3759 * The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English. 3760 */ 3761 @Child(name = "language", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 3762 @Description(shortDefinition="Language if different from the resource", formalDefinition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English." ) 3763 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 3764 protected CodeableConcept language; 3765 3766 private static final long serialVersionUID = -944255449L; 3767 3768 /** 3769 * Constructor 3770 */ 3771 public NoteComponent() { 3772 super(); 3773 } 3774 3775 /** 3776 * @return {@link #number} (An integer associated with each note which may be referred to from each service line item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 3777 */ 3778 public PositiveIntType getNumberElement() { 3779 if (this.number == null) 3780 if (Configuration.errorOnAutoCreate()) 3781 throw new Error("Attempt to auto-create NoteComponent.number"); 3782 else if (Configuration.doAutoCreate()) 3783 this.number = new PositiveIntType(); // bb 3784 return this.number; 3785 } 3786 3787 public boolean hasNumberElement() { 3788 return this.number != null && !this.number.isEmpty(); 3789 } 3790 3791 public boolean hasNumber() { 3792 return this.number != null && !this.number.isEmpty(); 3793 } 3794 3795 /** 3796 * @param value {@link #number} (An integer associated with each note which may be referred to from each service line item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 3797 */ 3798 public NoteComponent setNumberElement(PositiveIntType value) { 3799 this.number = value; 3800 return this; 3801 } 3802 3803 /** 3804 * @return An integer associated with each note which may be referred to from each service line item. 3805 */ 3806 public int getNumber() { 3807 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 3808 } 3809 3810 /** 3811 * @param value An integer associated with each note which may be referred to from each service line item. 3812 */ 3813 public NoteComponent setNumber(int value) { 3814 if (this.number == null) 3815 this.number = new PositiveIntType(); 3816 this.number.setValue(value); 3817 return this; 3818 } 3819 3820 /** 3821 * @return {@link #type} (The note purpose: Print/Display.) 3822 */ 3823 public CodeableConcept getType() { 3824 if (this.type == null) 3825 if (Configuration.errorOnAutoCreate()) 3826 throw new Error("Attempt to auto-create NoteComponent.type"); 3827 else if (Configuration.doAutoCreate()) 3828 this.type = new CodeableConcept(); // cc 3829 return this.type; 3830 } 3831 3832 public boolean hasType() { 3833 return this.type != null && !this.type.isEmpty(); 3834 } 3835 3836 /** 3837 * @param value {@link #type} (The note purpose: Print/Display.) 3838 */ 3839 public NoteComponent setType(CodeableConcept value) { 3840 this.type = value; 3841 return this; 3842 } 3843 3844 /** 3845 * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3846 */ 3847 public StringType getTextElement() { 3848 if (this.text == null) 3849 if (Configuration.errorOnAutoCreate()) 3850 throw new Error("Attempt to auto-create NoteComponent.text"); 3851 else if (Configuration.doAutoCreate()) 3852 this.text = new StringType(); // bb 3853 return this.text; 3854 } 3855 3856 public boolean hasTextElement() { 3857 return this.text != null && !this.text.isEmpty(); 3858 } 3859 3860 public boolean hasText() { 3861 return this.text != null && !this.text.isEmpty(); 3862 } 3863 3864 /** 3865 * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 3866 */ 3867 public NoteComponent setTextElement(StringType value) { 3868 this.text = value; 3869 return this; 3870 } 3871 3872 /** 3873 * @return The note text. 3874 */ 3875 public String getText() { 3876 return this.text == null ? null : this.text.getValue(); 3877 } 3878 3879 /** 3880 * @param value The note text. 3881 */ 3882 public NoteComponent setText(String value) { 3883 if (Utilities.noString(value)) 3884 this.text = null; 3885 else { 3886 if (this.text == null) 3887 this.text = new StringType(); 3888 this.text.setValue(value); 3889 } 3890 return this; 3891 } 3892 3893 /** 3894 * @return {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.) 3895 */ 3896 public CodeableConcept getLanguage() { 3897 if (this.language == null) 3898 if (Configuration.errorOnAutoCreate()) 3899 throw new Error("Attempt to auto-create NoteComponent.language"); 3900 else if (Configuration.doAutoCreate()) 3901 this.language = new CodeableConcept(); // cc 3902 return this.language; 3903 } 3904 3905 public boolean hasLanguage() { 3906 return this.language != null && !this.language.isEmpty(); 3907 } 3908 3909 /** 3910 * @param value {@link #language} (The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.) 3911 */ 3912 public NoteComponent setLanguage(CodeableConcept value) { 3913 this.language = value; 3914 return this; 3915 } 3916 3917 protected void listChildren(List<Property> children) { 3918 super.listChildren(children); 3919 children.add(new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number)); 3920 children.add(new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type)); 3921 children.add(new Property("text", "string", "The note text.", 0, 1, text)); 3922 children.add(new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language)); 3923 } 3924 3925 @Override 3926 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3927 switch (_hash) { 3928 case -1034364087: /*number*/ return new Property("number", "positiveInt", "An integer associated with each note which may be referred to from each service line item.", 0, 1, number); 3929 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The note purpose: Print/Display.", 0, 1, type); 3930 case 3556653: /*text*/ return new Property("text", "string", "The note text.", 0, 1, text); 3931 case -1613589672: /*language*/ return new Property("language", "CodeableConcept", "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", 0, 1, language); 3932 default: return super.getNamedProperty(_hash, _name, _checkValid); 3933 } 3934 3935 } 3936 3937 @Override 3938 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3939 switch (hash) { 3940 case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // PositiveIntType 3941 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3942 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 3943 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeableConcept 3944 default: return super.getProperty(hash, name, checkValid); 3945 } 3946 3947 } 3948 3949 @Override 3950 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3951 switch (hash) { 3952 case -1034364087: // number 3953 this.number = castToPositiveInt(value); // PositiveIntType 3954 return value; 3955 case 3575610: // type 3956 this.type = castToCodeableConcept(value); // CodeableConcept 3957 return value; 3958 case 3556653: // text 3959 this.text = castToString(value); // StringType 3960 return value; 3961 case -1613589672: // language 3962 this.language = castToCodeableConcept(value); // CodeableConcept 3963 return value; 3964 default: return super.setProperty(hash, name, value); 3965 } 3966 3967 } 3968 3969 @Override 3970 public Base setProperty(String name, Base value) throws FHIRException { 3971 if (name.equals("number")) { 3972 this.number = castToPositiveInt(value); // PositiveIntType 3973 } else if (name.equals("type")) { 3974 this.type = castToCodeableConcept(value); // CodeableConcept 3975 } else if (name.equals("text")) { 3976 this.text = castToString(value); // StringType 3977 } else if (name.equals("language")) { 3978 this.language = castToCodeableConcept(value); // CodeableConcept 3979 } else 3980 return super.setProperty(name, value); 3981 return value; 3982 } 3983 3984 @Override 3985 public Base makeProperty(int hash, String name) throws FHIRException { 3986 switch (hash) { 3987 case -1034364087: return getNumberElement(); 3988 case 3575610: return getType(); 3989 case 3556653: return getTextElement(); 3990 case -1613589672: return getLanguage(); 3991 default: return super.makeProperty(hash, name); 3992 } 3993 3994 } 3995 3996 @Override 3997 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3998 switch (hash) { 3999 case -1034364087: /*number*/ return new String[] {"positiveInt"}; 4000 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4001 case 3556653: /*text*/ return new String[] {"string"}; 4002 case -1613589672: /*language*/ return new String[] {"CodeableConcept"}; 4003 default: return super.getTypesForProperty(hash, name); 4004 } 4005 4006 } 4007 4008 @Override 4009 public Base addChild(String name) throws FHIRException { 4010 if (name.equals("number")) { 4011 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.number"); 4012 } 4013 else if (name.equals("type")) { 4014 this.type = new CodeableConcept(); 4015 return this.type; 4016 } 4017 else if (name.equals("text")) { 4018 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.text"); 4019 } 4020 else if (name.equals("language")) { 4021 this.language = new CodeableConcept(); 4022 return this.language; 4023 } 4024 else 4025 return super.addChild(name); 4026 } 4027 4028 public NoteComponent copy() { 4029 NoteComponent dst = new NoteComponent(); 4030 copyValues(dst); 4031 dst.number = number == null ? null : number.copy(); 4032 dst.type = type == null ? null : type.copy(); 4033 dst.text = text == null ? null : text.copy(); 4034 dst.language = language == null ? null : language.copy(); 4035 return dst; 4036 } 4037 4038 @Override 4039 public boolean equalsDeep(Base other_) { 4040 if (!super.equalsDeep(other_)) 4041 return false; 4042 if (!(other_ instanceof NoteComponent)) 4043 return false; 4044 NoteComponent o = (NoteComponent) other_; 4045 return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(text, o.text, true) 4046 && compareDeep(language, o.language, true); 4047 } 4048 4049 @Override 4050 public boolean equalsShallow(Base other_) { 4051 if (!super.equalsShallow(other_)) 4052 return false; 4053 if (!(other_ instanceof NoteComponent)) 4054 return false; 4055 NoteComponent o = (NoteComponent) other_; 4056 return compareValues(number, o.number, true) && compareValues(text, o.text, true); 4057 } 4058 4059 public boolean isEmpty() { 4060 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, text, language 4061 ); 4062 } 4063 4064 public String fhirType() { 4065 return "ClaimResponse.processNote"; 4066 4067 } 4068 4069 } 4070 4071 @Block() 4072 public static class InsuranceComponent extends BackboneElement implements IBaseBackboneElement { 4073 /** 4074 * A service line item. 4075 */ 4076 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4077 @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) 4078 protected PositiveIntType sequence; 4079 4080 /** 4081 * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 4082 */ 4083 @Child(name = "focal", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false) 4084 @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) 4085 protected BooleanType focal; 4086 4087 /** 4088 * Reference to the program or plan identification, underwriter or payor. 4089 */ 4090 @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=false) 4091 @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) 4092 protected Reference coverage; 4093 4094 /** 4095 * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) 4096 */ 4097 protected Coverage coverageTarget; 4098 4099 /** 4100 * The contract number of a business agreement which describes the terms and conditions. 4101 */ 4102 @Child(name = "businessArrangement", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4103 @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) 4104 protected StringType businessArrangement; 4105 4106 /** 4107 * A list of references from the Insurer to which these services pertain. 4108 */ 4109 @Child(name = "preAuthRef", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4110 @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) 4111 protected List<StringType> preAuthRef; 4112 4113 /** 4114 * The Coverages adjudication details. 4115 */ 4116 @Child(name = "claimResponse", type = {ClaimResponse.class}, order=6, min=0, max=1, modifier=false, summary=false) 4117 @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) 4118 protected Reference claimResponse; 4119 4120 /** 4121 * The actual object that is the target of the reference (The Coverages adjudication details.) 4122 */ 4123 protected ClaimResponse claimResponseTarget; 4124 4125 private static final long serialVersionUID = -1216535489L; 4126 4127 /** 4128 * Constructor 4129 */ 4130 public InsuranceComponent() { 4131 super(); 4132 } 4133 4134 /** 4135 * Constructor 4136 */ 4137 public InsuranceComponent(PositiveIntType sequence, BooleanType focal, Reference coverage) { 4138 super(); 4139 this.sequence = sequence; 4140 this.focal = focal; 4141 this.coverage = coverage; 4142 } 4143 4144 /** 4145 * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 4146 */ 4147 public PositiveIntType getSequenceElement() { 4148 if (this.sequence == null) 4149 if (Configuration.errorOnAutoCreate()) 4150 throw new Error("Attempt to auto-create InsuranceComponent.sequence"); 4151 else if (Configuration.doAutoCreate()) 4152 this.sequence = new PositiveIntType(); // bb 4153 return this.sequence; 4154 } 4155 4156 public boolean hasSequenceElement() { 4157 return this.sequence != null && !this.sequence.isEmpty(); 4158 } 4159 4160 public boolean hasSequence() { 4161 return this.sequence != null && !this.sequence.isEmpty(); 4162 } 4163 4164 /** 4165 * @param value {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 4166 */ 4167 public InsuranceComponent setSequenceElement(PositiveIntType value) { 4168 this.sequence = value; 4169 return this; 4170 } 4171 4172 /** 4173 * @return A service line item. 4174 */ 4175 public int getSequence() { 4176 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 4177 } 4178 4179 /** 4180 * @param value A service line item. 4181 */ 4182 public InsuranceComponent setSequence(int value) { 4183 if (this.sequence == null) 4184 this.sequence = new PositiveIntType(); 4185 this.sequence.setValue(value); 4186 return this; 4187 } 4188 4189 /** 4190 * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 4191 */ 4192 public BooleanType getFocalElement() { 4193 if (this.focal == null) 4194 if (Configuration.errorOnAutoCreate()) 4195 throw new Error("Attempt to auto-create InsuranceComponent.focal"); 4196 else if (Configuration.doAutoCreate()) 4197 this.focal = new BooleanType(); // bb 4198 return this.focal; 4199 } 4200 4201 public boolean hasFocalElement() { 4202 return this.focal != null && !this.focal.isEmpty(); 4203 } 4204 4205 public boolean hasFocal() { 4206 return this.focal != null && !this.focal.isEmpty(); 4207 } 4208 4209 /** 4210 * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 4211 */ 4212 public InsuranceComponent setFocalElement(BooleanType value) { 4213 this.focal = value; 4214 return this; 4215 } 4216 4217 /** 4218 * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 4219 */ 4220 public boolean getFocal() { 4221 return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); 4222 } 4223 4224 /** 4225 * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 4226 */ 4227 public InsuranceComponent setFocal(boolean value) { 4228 if (this.focal == null) 4229 this.focal = new BooleanType(); 4230 this.focal.setValue(value); 4231 return this; 4232 } 4233 4234 /** 4235 * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 4236 */ 4237 public Reference getCoverage() { 4238 if (this.coverage == null) 4239 if (Configuration.errorOnAutoCreate()) 4240 throw new Error("Attempt to auto-create InsuranceComponent.coverage"); 4241 else if (Configuration.doAutoCreate()) 4242 this.coverage = new Reference(); // cc 4243 return this.coverage; 4244 } 4245 4246 public boolean hasCoverage() { 4247 return this.coverage != null && !this.coverage.isEmpty(); 4248 } 4249 4250 /** 4251 * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 4252 */ 4253 public InsuranceComponent setCoverage(Reference value) { 4254 this.coverage = value; 4255 return this; 4256 } 4257 4258 /** 4259 * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) 4260 */ 4261 public Coverage getCoverageTarget() { 4262 if (this.coverageTarget == null) 4263 if (Configuration.errorOnAutoCreate()) 4264 throw new Error("Attempt to auto-create InsuranceComponent.coverage"); 4265 else if (Configuration.doAutoCreate()) 4266 this.coverageTarget = new Coverage(); // aa 4267 return this.coverageTarget; 4268 } 4269 4270 /** 4271 * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) 4272 */ 4273 public InsuranceComponent setCoverageTarget(Coverage value) { 4274 this.coverageTarget = value; 4275 return this; 4276 } 4277 4278 /** 4279 * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value 4280 */ 4281 public StringType getBusinessArrangementElement() { 4282 if (this.businessArrangement == null) 4283 if (Configuration.errorOnAutoCreate()) 4284 throw new Error("Attempt to auto-create InsuranceComponent.businessArrangement"); 4285 else if (Configuration.doAutoCreate()) 4286 this.businessArrangement = new StringType(); // bb 4287 return this.businessArrangement; 4288 } 4289 4290 public boolean hasBusinessArrangementElement() { 4291 return this.businessArrangement != null && !this.businessArrangement.isEmpty(); 4292 } 4293 4294 public boolean hasBusinessArrangement() { 4295 return this.businessArrangement != null && !this.businessArrangement.isEmpty(); 4296 } 4297 4298 /** 4299 * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value 4300 */ 4301 public InsuranceComponent setBusinessArrangementElement(StringType value) { 4302 this.businessArrangement = value; 4303 return this; 4304 } 4305 4306 /** 4307 * @return The contract number of a business agreement which describes the terms and conditions. 4308 */ 4309 public String getBusinessArrangement() { 4310 return this.businessArrangement == null ? null : this.businessArrangement.getValue(); 4311 } 4312 4313 /** 4314 * @param value The contract number of a business agreement which describes the terms and conditions. 4315 */ 4316 public InsuranceComponent setBusinessArrangement(String value) { 4317 if (Utilities.noString(value)) 4318 this.businessArrangement = null; 4319 else { 4320 if (this.businessArrangement == null) 4321 this.businessArrangement = new StringType(); 4322 this.businessArrangement.setValue(value); 4323 } 4324 return this; 4325 } 4326 4327 /** 4328 * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 4329 */ 4330 public List<StringType> getPreAuthRef() { 4331 if (this.preAuthRef == null) 4332 this.preAuthRef = new ArrayList<StringType>(); 4333 return this.preAuthRef; 4334 } 4335 4336 /** 4337 * @return Returns a reference to <code>this</code> for easy method chaining 4338 */ 4339 public InsuranceComponent setPreAuthRef(List<StringType> thePreAuthRef) { 4340 this.preAuthRef = thePreAuthRef; 4341 return this; 4342 } 4343 4344 public boolean hasPreAuthRef() { 4345 if (this.preAuthRef == null) 4346 return false; 4347 for (StringType item : this.preAuthRef) 4348 if (!item.isEmpty()) 4349 return true; 4350 return false; 4351 } 4352 4353 /** 4354 * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 4355 */ 4356 public StringType addPreAuthRefElement() {//2 4357 StringType t = new StringType(); 4358 if (this.preAuthRef == null) 4359 this.preAuthRef = new ArrayList<StringType>(); 4360 this.preAuthRef.add(t); 4361 return t; 4362 } 4363 4364 /** 4365 * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 4366 */ 4367 public InsuranceComponent addPreAuthRef(String value) { //1 4368 StringType t = new StringType(); 4369 t.setValue(value); 4370 if (this.preAuthRef == null) 4371 this.preAuthRef = new ArrayList<StringType>(); 4372 this.preAuthRef.add(t); 4373 return this; 4374 } 4375 4376 /** 4377 * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 4378 */ 4379 public boolean hasPreAuthRef(String value) { 4380 if (this.preAuthRef == null) 4381 return false; 4382 for (StringType v : this.preAuthRef) 4383 if (v.getValue().equals(value)) // string 4384 return true; 4385 return false; 4386 } 4387 4388 /** 4389 * @return {@link #claimResponse} (The Coverages adjudication details.) 4390 */ 4391 public Reference getClaimResponse() { 4392 if (this.claimResponse == null) 4393 if (Configuration.errorOnAutoCreate()) 4394 throw new Error("Attempt to auto-create InsuranceComponent.claimResponse"); 4395 else if (Configuration.doAutoCreate()) 4396 this.claimResponse = new Reference(); // cc 4397 return this.claimResponse; 4398 } 4399 4400 public boolean hasClaimResponse() { 4401 return this.claimResponse != null && !this.claimResponse.isEmpty(); 4402 } 4403 4404 /** 4405 * @param value {@link #claimResponse} (The Coverages adjudication details.) 4406 */ 4407 public InsuranceComponent setClaimResponse(Reference value) { 4408 this.claimResponse = value; 4409 return this; 4410 } 4411 4412 /** 4413 * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) 4414 */ 4415 public ClaimResponse getClaimResponseTarget() { 4416 if (this.claimResponseTarget == null) 4417 if (Configuration.errorOnAutoCreate()) 4418 throw new Error("Attempt to auto-create InsuranceComponent.claimResponse"); 4419 else if (Configuration.doAutoCreate()) 4420 this.claimResponseTarget = new ClaimResponse(); // aa 4421 return this.claimResponseTarget; 4422 } 4423 4424 /** 4425 * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) 4426 */ 4427 public InsuranceComponent setClaimResponseTarget(ClaimResponse value) { 4428 this.claimResponseTarget = value; 4429 return this; 4430 } 4431 4432 protected void listChildren(List<Property> children) { 4433 super.listChildren(children); 4434 children.add(new Property("sequence", "positiveInt", "A service line item.", 0, 1, sequence)); 4435 children.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, 1, focal)); 4436 children.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, 1, coverage)); 4437 children.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, 1, businessArrangement)); 4438 children.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); 4439 children.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, 1, claimResponse)); 4440 } 4441 4442 @Override 4443 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4444 switch (_hash) { 4445 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A service line item.", 0, 1, sequence); 4446 case 97604197: /*focal*/ return new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, 1, focal); 4447 case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, 1, coverage); 4448 case 259920682: /*businessArrangement*/ return new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, 1, businessArrangement); 4449 case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef); 4450 case 689513629: /*claimResponse*/ return new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, 1, claimResponse); 4451 default: return super.getNamedProperty(_hash, _name, _checkValid); 4452 } 4453 4454 } 4455 4456 @Override 4457 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4458 switch (hash) { 4459 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 4460 case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType 4461 case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference 4462 case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType 4463 case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType 4464 case 689513629: /*claimResponse*/ return this.claimResponse == null ? new Base[0] : new Base[] {this.claimResponse}; // Reference 4465 default: return super.getProperty(hash, name, checkValid); 4466 } 4467 4468 } 4469 4470 @Override 4471 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4472 switch (hash) { 4473 case 1349547969: // sequence 4474 this.sequence = castToPositiveInt(value); // PositiveIntType 4475 return value; 4476 case 97604197: // focal 4477 this.focal = castToBoolean(value); // BooleanType 4478 return value; 4479 case -351767064: // coverage 4480 this.coverage = castToReference(value); // Reference 4481 return value; 4482 case 259920682: // businessArrangement 4483 this.businessArrangement = castToString(value); // StringType 4484 return value; 4485 case 522246568: // preAuthRef 4486 this.getPreAuthRef().add(castToString(value)); // StringType 4487 return value; 4488 case 689513629: // claimResponse 4489 this.claimResponse = castToReference(value); // Reference 4490 return value; 4491 default: return super.setProperty(hash, name, value); 4492 } 4493 4494 } 4495 4496 @Override 4497 public Base setProperty(String name, Base value) throws FHIRException { 4498 if (name.equals("sequence")) { 4499 this.sequence = castToPositiveInt(value); // PositiveIntType 4500 } else if (name.equals("focal")) { 4501 this.focal = castToBoolean(value); // BooleanType 4502 } else if (name.equals("coverage")) { 4503 this.coverage = castToReference(value); // Reference 4504 } else if (name.equals("businessArrangement")) { 4505 this.businessArrangement = castToString(value); // StringType 4506 } else if (name.equals("preAuthRef")) { 4507 this.getPreAuthRef().add(castToString(value)); 4508 } else if (name.equals("claimResponse")) { 4509 this.claimResponse = castToReference(value); // Reference 4510 } else 4511 return super.setProperty(name, value); 4512 return value; 4513 } 4514 4515 @Override 4516 public Base makeProperty(int hash, String name) throws FHIRException { 4517 switch (hash) { 4518 case 1349547969: return getSequenceElement(); 4519 case 97604197: return getFocalElement(); 4520 case -351767064: return getCoverage(); 4521 case 259920682: return getBusinessArrangementElement(); 4522 case 522246568: return addPreAuthRefElement(); 4523 case 689513629: return getClaimResponse(); 4524 default: return super.makeProperty(hash, name); 4525 } 4526 4527 } 4528 4529 @Override 4530 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4531 switch (hash) { 4532 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 4533 case 97604197: /*focal*/ return new String[] {"boolean"}; 4534 case -351767064: /*coverage*/ return new String[] {"Reference"}; 4535 case 259920682: /*businessArrangement*/ return new String[] {"string"}; 4536 case 522246568: /*preAuthRef*/ return new String[] {"string"}; 4537 case 689513629: /*claimResponse*/ return new String[] {"Reference"}; 4538 default: return super.getTypesForProperty(hash, name); 4539 } 4540 4541 } 4542 4543 @Override 4544 public Base addChild(String name) throws FHIRException { 4545 if (name.equals("sequence")) { 4546 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequence"); 4547 } 4548 else if (name.equals("focal")) { 4549 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.focal"); 4550 } 4551 else if (name.equals("coverage")) { 4552 this.coverage = new Reference(); 4553 return this.coverage; 4554 } 4555 else if (name.equals("businessArrangement")) { 4556 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.businessArrangement"); 4557 } 4558 else if (name.equals("preAuthRef")) { 4559 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.preAuthRef"); 4560 } 4561 else if (name.equals("claimResponse")) { 4562 this.claimResponse = new Reference(); 4563 return this.claimResponse; 4564 } 4565 else 4566 return super.addChild(name); 4567 } 4568 4569 public InsuranceComponent copy() { 4570 InsuranceComponent dst = new InsuranceComponent(); 4571 copyValues(dst); 4572 dst.sequence = sequence == null ? null : sequence.copy(); 4573 dst.focal = focal == null ? null : focal.copy(); 4574 dst.coverage = coverage == null ? null : coverage.copy(); 4575 dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); 4576 if (preAuthRef != null) { 4577 dst.preAuthRef = new ArrayList<StringType>(); 4578 for (StringType i : preAuthRef) 4579 dst.preAuthRef.add(i.copy()); 4580 }; 4581 dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); 4582 return dst; 4583 } 4584 4585 @Override 4586 public boolean equalsDeep(Base other_) { 4587 if (!super.equalsDeep(other_)) 4588 return false; 4589 if (!(other_ instanceof InsuranceComponent)) 4590 return false; 4591 InsuranceComponent o = (InsuranceComponent) other_; 4592 return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) 4593 && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(preAuthRef, o.preAuthRef, true) 4594 && compareDeep(claimResponse, o.claimResponse, true); 4595 } 4596 4597 @Override 4598 public boolean equalsShallow(Base other_) { 4599 if (!super.equalsShallow(other_)) 4600 return false; 4601 if (!(other_ instanceof InsuranceComponent)) 4602 return false; 4603 InsuranceComponent o = (InsuranceComponent) other_; 4604 return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) 4605 && compareValues(preAuthRef, o.preAuthRef, true); 4606 } 4607 4608 public boolean isEmpty() { 4609 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, coverage 4610 , businessArrangement, preAuthRef, claimResponse); 4611 } 4612 4613 public String fhirType() { 4614 return "ClaimResponse.insurance"; 4615 4616 } 4617 4618 } 4619 4620 /** 4621 * The Response business identifier. 4622 */ 4623 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4624 @Description(shortDefinition="Response number", formalDefinition="The Response business identifier." ) 4625 protected List<Identifier> identifier; 4626 4627 /** 4628 * The status of the resource instance. 4629 */ 4630 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 4631 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 4632 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 4633 protected Enumeration<ClaimResponseStatus> status; 4634 4635 /** 4636 * Patient Resource. 4637 */ 4638 @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=false) 4639 @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) 4640 protected Reference patient; 4641 4642 /** 4643 * The actual object that is the target of the reference (Patient Resource.) 4644 */ 4645 protected Patient patientTarget; 4646 4647 /** 4648 * The date when the enclosed suite of services were performed or completed. 4649 */ 4650 @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4651 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 4652 protected DateTimeType created; 4653 4654 /** 4655 * The Insurer who produced this adjudicated response. 4656 */ 4657 @Child(name = "insurer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false) 4658 @Description(shortDefinition="Insurance issuing organization", formalDefinition="The Insurer who produced this adjudicated response." ) 4659 protected Reference insurer; 4660 4661 /** 4662 * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) 4663 */ 4664 protected Organization insurerTarget; 4665 4666 /** 4667 * The practitioner who is responsible for the services rendered to the patient. 4668 */ 4669 @Child(name = "requestProvider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=false) 4670 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 4671 protected Reference requestProvider; 4672 4673 /** 4674 * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) 4675 */ 4676 protected Practitioner requestProviderTarget; 4677 4678 /** 4679 * The organization which is responsible for the services rendered to the patient. 4680 */ 4681 @Child(name = "requestOrganization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) 4682 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) 4683 protected Reference requestOrganization; 4684 4685 /** 4686 * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) 4687 */ 4688 protected Organization requestOrganizationTarget; 4689 4690 /** 4691 * Original request resource referrence. 4692 */ 4693 @Child(name = "request", type = {Claim.class}, order=7, min=0, max=1, modifier=false, summary=false) 4694 @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) 4695 protected Reference request; 4696 4697 /** 4698 * The actual object that is the target of the reference (Original request resource referrence.) 4699 */ 4700 protected Claim requestTarget; 4701 4702 /** 4703 * Processing outcome errror, partial or complete processing. 4704 */ 4705 @Child(name = "outcome", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false) 4706 @Description(shortDefinition="complete | error | partial", formalDefinition="Processing outcome errror, partial or complete processing." ) 4707 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") 4708 protected CodeableConcept outcome; 4709 4710 /** 4711 * A description of the status of the adjudication. 4712 */ 4713 @Child(name = "disposition", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 4714 @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) 4715 protected StringType disposition; 4716 4717 /** 4718 * Party to be reimbursed: Subscriber, provider, other. 4719 */ 4720 @Child(name = "payeeType", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false) 4721 @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) 4722 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payeetype") 4723 protected CodeableConcept payeeType; 4724 4725 /** 4726 * The first tier service adjudications for submitted services. 4727 */ 4728 @Child(name = "item", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4729 @Description(shortDefinition="Line items", formalDefinition="The first tier service adjudications for submitted services." ) 4730 protected List<ItemComponent> item; 4731 4732 /** 4733 * The first tier service adjudications for payor added services. 4734 */ 4735 @Child(name = "addItem", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4736 @Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." ) 4737 protected List<AddedItemComponent> addItem; 4738 4739 /** 4740 * Mutually exclusive with Services Provided (Item). 4741 */ 4742 @Child(name = "error", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4743 @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) 4744 protected List<ErrorComponent> error; 4745 4746 /** 4747 * The total cost of the services reported. 4748 */ 4749 @Child(name = "totalCost", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=false) 4750 @Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." ) 4751 protected Money totalCost; 4752 4753 /** 4754 * The amount of deductible applied which was not allocated to any particular service line. 4755 */ 4756 @Child(name = "unallocDeductable", type = {Money.class}, order=15, min=0, max=1, modifier=false, summary=false) 4757 @Description(shortDefinition="Unallocated deductible", formalDefinition="The amount of deductible applied which was not allocated to any particular service line." ) 4758 protected Money unallocDeductable; 4759 4760 /** 4761 * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible). 4762 */ 4763 @Child(name = "totalBenefit", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=false) 4764 @Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible)." ) 4765 protected Money totalBenefit; 4766 4767 /** 4768 * Payment details for the claim if the claim has been paid. 4769 */ 4770 @Child(name = "payment", type = {}, order=17, min=0, max=1, modifier=false, summary=false) 4771 @Description(shortDefinition="Payment details, if paid", formalDefinition="Payment details for the claim if the claim has been paid." ) 4772 protected PaymentComponent payment; 4773 4774 /** 4775 * Status of funds reservation (For provider, for Patient, None). 4776 */ 4777 @Child(name = "reserved", type = {Coding.class}, order=18, min=0, max=1, modifier=false, summary=false) 4778 @Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." ) 4779 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fundsreserve") 4780 protected Coding reserved; 4781 4782 /** 4783 * The form to be used for printing the content. 4784 */ 4785 @Child(name = "form", type = {CodeableConcept.class}, order=19, min=0, max=1, modifier=false, summary=false) 4786 @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) 4787 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms") 4788 protected CodeableConcept form; 4789 4790 /** 4791 * Note text. 4792 */ 4793 @Child(name = "processNote", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4794 @Description(shortDefinition="Processing notes", formalDefinition="Note text." ) 4795 protected List<NoteComponent> processNote; 4796 4797 /** 4798 * Request for additional supporting or authorizing information, such as: documents, images or resources. 4799 */ 4800 @Child(name = "communicationRequest", type = {CommunicationRequest.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4801 @Description(shortDefinition="Request for additional information", formalDefinition="Request for additional supporting or authorizing information, such as: documents, images or resources." ) 4802 protected List<Reference> communicationRequest; 4803 /** 4804 * The actual objects that are the target of the reference (Request for additional supporting or authorizing information, such as: documents, images or resources.) 4805 */ 4806 protected List<CommunicationRequest> communicationRequestTarget; 4807 4808 4809 /** 4810 * Financial instrument by which payment information for health care. 4811 */ 4812 @Child(name = "insurance", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4813 @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) 4814 protected List<InsuranceComponent> insurance; 4815 4816 private static final long serialVersionUID = -488591755L; 4817 4818 /** 4819 * Constructor 4820 */ 4821 public ClaimResponse() { 4822 super(); 4823 } 4824 4825 /** 4826 * @return {@link #identifier} (The Response business identifier.) 4827 */ 4828 public List<Identifier> getIdentifier() { 4829 if (this.identifier == null) 4830 this.identifier = new ArrayList<Identifier>(); 4831 return this.identifier; 4832 } 4833 4834 /** 4835 * @return Returns a reference to <code>this</code> for easy method chaining 4836 */ 4837 public ClaimResponse setIdentifier(List<Identifier> theIdentifier) { 4838 this.identifier = theIdentifier; 4839 return this; 4840 } 4841 4842 public boolean hasIdentifier() { 4843 if (this.identifier == null) 4844 return false; 4845 for (Identifier item : this.identifier) 4846 if (!item.isEmpty()) 4847 return true; 4848 return false; 4849 } 4850 4851 public Identifier addIdentifier() { //3 4852 Identifier t = new Identifier(); 4853 if (this.identifier == null) 4854 this.identifier = new ArrayList<Identifier>(); 4855 this.identifier.add(t); 4856 return t; 4857 } 4858 4859 public ClaimResponse addIdentifier(Identifier t) { //3 4860 if (t == null) 4861 return this; 4862 if (this.identifier == null) 4863 this.identifier = new ArrayList<Identifier>(); 4864 this.identifier.add(t); 4865 return this; 4866 } 4867 4868 /** 4869 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 4870 */ 4871 public Identifier getIdentifierFirstRep() { 4872 if (getIdentifier().isEmpty()) { 4873 addIdentifier(); 4874 } 4875 return getIdentifier().get(0); 4876 } 4877 4878 /** 4879 * @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 4880 */ 4881 public Enumeration<ClaimResponseStatus> getStatusElement() { 4882 if (this.status == null) 4883 if (Configuration.errorOnAutoCreate()) 4884 throw new Error("Attempt to auto-create ClaimResponse.status"); 4885 else if (Configuration.doAutoCreate()) 4886 this.status = new Enumeration<ClaimResponseStatus>(new ClaimResponseStatusEnumFactory()); // bb 4887 return this.status; 4888 } 4889 4890 public boolean hasStatusElement() { 4891 return this.status != null && !this.status.isEmpty(); 4892 } 4893 4894 public boolean hasStatus() { 4895 return this.status != null && !this.status.isEmpty(); 4896 } 4897 4898 /** 4899 * @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 4900 */ 4901 public ClaimResponse setStatusElement(Enumeration<ClaimResponseStatus> value) { 4902 this.status = value; 4903 return this; 4904 } 4905 4906 /** 4907 * @return The status of the resource instance. 4908 */ 4909 public ClaimResponseStatus getStatus() { 4910 return this.status == null ? null : this.status.getValue(); 4911 } 4912 4913 /** 4914 * @param value The status of the resource instance. 4915 */ 4916 public ClaimResponse setStatus(ClaimResponseStatus value) { 4917 if (value == null) 4918 this.status = null; 4919 else { 4920 if (this.status == null) 4921 this.status = new Enumeration<ClaimResponseStatus>(new ClaimResponseStatusEnumFactory()); 4922 this.status.setValue(value); 4923 } 4924 return this; 4925 } 4926 4927 /** 4928 * @return {@link #patient} (Patient Resource.) 4929 */ 4930 public Reference getPatient() { 4931 if (this.patient == null) 4932 if (Configuration.errorOnAutoCreate()) 4933 throw new Error("Attempt to auto-create ClaimResponse.patient"); 4934 else if (Configuration.doAutoCreate()) 4935 this.patient = new Reference(); // cc 4936 return this.patient; 4937 } 4938 4939 public boolean hasPatient() { 4940 return this.patient != null && !this.patient.isEmpty(); 4941 } 4942 4943 /** 4944 * @param value {@link #patient} (Patient Resource.) 4945 */ 4946 public ClaimResponse setPatient(Reference value) { 4947 this.patient = value; 4948 return this; 4949 } 4950 4951 /** 4952 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) 4953 */ 4954 public Patient getPatientTarget() { 4955 if (this.patientTarget == null) 4956 if (Configuration.errorOnAutoCreate()) 4957 throw new Error("Attempt to auto-create ClaimResponse.patient"); 4958 else if (Configuration.doAutoCreate()) 4959 this.patientTarget = new Patient(); // aa 4960 return this.patientTarget; 4961 } 4962 4963 /** 4964 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) 4965 */ 4966 public ClaimResponse setPatientTarget(Patient value) { 4967 this.patientTarget = value; 4968 return this; 4969 } 4970 4971 /** 4972 * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 4973 */ 4974 public DateTimeType getCreatedElement() { 4975 if (this.created == null) 4976 if (Configuration.errorOnAutoCreate()) 4977 throw new Error("Attempt to auto-create ClaimResponse.created"); 4978 else if (Configuration.doAutoCreate()) 4979 this.created = new DateTimeType(); // bb 4980 return this.created; 4981 } 4982 4983 public boolean hasCreatedElement() { 4984 return this.created != null && !this.created.isEmpty(); 4985 } 4986 4987 public boolean hasCreated() { 4988 return this.created != null && !this.created.isEmpty(); 4989 } 4990 4991 /** 4992 * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 4993 */ 4994 public ClaimResponse setCreatedElement(DateTimeType value) { 4995 this.created = value; 4996 return this; 4997 } 4998 4999 /** 5000 * @return The date when the enclosed suite of services were performed or completed. 5001 */ 5002 public Date getCreated() { 5003 return this.created == null ? null : this.created.getValue(); 5004 } 5005 5006 /** 5007 * @param value The date when the enclosed suite of services were performed or completed. 5008 */ 5009 public ClaimResponse setCreated(Date value) { 5010 if (value == null) 5011 this.created = null; 5012 else { 5013 if (this.created == null) 5014 this.created = new DateTimeType(); 5015 this.created.setValue(value); 5016 } 5017 return this; 5018 } 5019 5020 /** 5021 * @return {@link #insurer} (The Insurer who produced this adjudicated response.) 5022 */ 5023 public Reference getInsurer() { 5024 if (this.insurer == null) 5025 if (Configuration.errorOnAutoCreate()) 5026 throw new Error("Attempt to auto-create ClaimResponse.insurer"); 5027 else if (Configuration.doAutoCreate()) 5028 this.insurer = new Reference(); // cc 5029 return this.insurer; 5030 } 5031 5032 public boolean hasInsurer() { 5033 return this.insurer != null && !this.insurer.isEmpty(); 5034 } 5035 5036 /** 5037 * @param value {@link #insurer} (The Insurer who produced this adjudicated response.) 5038 */ 5039 public ClaimResponse setInsurer(Reference value) { 5040 this.insurer = value; 5041 return this; 5042 } 5043 5044 /** 5045 * @return {@link #insurer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) 5046 */ 5047 public Organization getInsurerTarget() { 5048 if (this.insurerTarget == null) 5049 if (Configuration.errorOnAutoCreate()) 5050 throw new Error("Attempt to auto-create ClaimResponse.insurer"); 5051 else if (Configuration.doAutoCreate()) 5052 this.insurerTarget = new Organization(); // aa 5053 return this.insurerTarget; 5054 } 5055 5056 /** 5057 * @param value {@link #insurer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) 5058 */ 5059 public ClaimResponse setInsurerTarget(Organization value) { 5060 this.insurerTarget = value; 5061 return this; 5062 } 5063 5064 /** 5065 * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 5066 */ 5067 public Reference getRequestProvider() { 5068 if (this.requestProvider == null) 5069 if (Configuration.errorOnAutoCreate()) 5070 throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); 5071 else if (Configuration.doAutoCreate()) 5072 this.requestProvider = new Reference(); // cc 5073 return this.requestProvider; 5074 } 5075 5076 public boolean hasRequestProvider() { 5077 return this.requestProvider != null && !this.requestProvider.isEmpty(); 5078 } 5079 5080 /** 5081 * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 5082 */ 5083 public ClaimResponse setRequestProvider(Reference value) { 5084 this.requestProvider = value; 5085 return this; 5086 } 5087 5088 /** 5089 * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) 5090 */ 5091 public Practitioner getRequestProviderTarget() { 5092 if (this.requestProviderTarget == null) 5093 if (Configuration.errorOnAutoCreate()) 5094 throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); 5095 else if (Configuration.doAutoCreate()) 5096 this.requestProviderTarget = new Practitioner(); // aa 5097 return this.requestProviderTarget; 5098 } 5099 5100 /** 5101 * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) 5102 */ 5103 public ClaimResponse setRequestProviderTarget(Practitioner value) { 5104 this.requestProviderTarget = value; 5105 return this; 5106 } 5107 5108 /** 5109 * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 5110 */ 5111 public Reference getRequestOrganization() { 5112 if (this.requestOrganization == null) 5113 if (Configuration.errorOnAutoCreate()) 5114 throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); 5115 else if (Configuration.doAutoCreate()) 5116 this.requestOrganization = new Reference(); // cc 5117 return this.requestOrganization; 5118 } 5119 5120 public boolean hasRequestOrganization() { 5121 return this.requestOrganization != null && !this.requestOrganization.isEmpty(); 5122 } 5123 5124 /** 5125 * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 5126 */ 5127 public ClaimResponse setRequestOrganization(Reference value) { 5128 this.requestOrganization = value; 5129 return this; 5130 } 5131 5132 /** 5133 * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) 5134 */ 5135 public Organization getRequestOrganizationTarget() { 5136 if (this.requestOrganizationTarget == null) 5137 if (Configuration.errorOnAutoCreate()) 5138 throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); 5139 else if (Configuration.doAutoCreate()) 5140 this.requestOrganizationTarget = new Organization(); // aa 5141 return this.requestOrganizationTarget; 5142 } 5143 5144 /** 5145 * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) 5146 */ 5147 public ClaimResponse setRequestOrganizationTarget(Organization value) { 5148 this.requestOrganizationTarget = value; 5149 return this; 5150 } 5151 5152 /** 5153 * @return {@link #request} (Original request resource referrence.) 5154 */ 5155 public Reference getRequest() { 5156 if (this.request == null) 5157 if (Configuration.errorOnAutoCreate()) 5158 throw new Error("Attempt to auto-create ClaimResponse.request"); 5159 else if (Configuration.doAutoCreate()) 5160 this.request = new Reference(); // cc 5161 return this.request; 5162 } 5163 5164 public boolean hasRequest() { 5165 return this.request != null && !this.request.isEmpty(); 5166 } 5167 5168 /** 5169 * @param value {@link #request} (Original request resource referrence.) 5170 */ 5171 public ClaimResponse setRequest(Reference value) { 5172 this.request = value; 5173 return this; 5174 } 5175 5176 /** 5177 * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) 5178 */ 5179 public Claim getRequestTarget() { 5180 if (this.requestTarget == null) 5181 if (Configuration.errorOnAutoCreate()) 5182 throw new Error("Attempt to auto-create ClaimResponse.request"); 5183 else if (Configuration.doAutoCreate()) 5184 this.requestTarget = new Claim(); // aa 5185 return this.requestTarget; 5186 } 5187 5188 /** 5189 * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) 5190 */ 5191 public ClaimResponse setRequestTarget(Claim value) { 5192 this.requestTarget = value; 5193 return this; 5194 } 5195 5196 /** 5197 * @return {@link #outcome} (Processing outcome errror, partial or complete processing.) 5198 */ 5199 public CodeableConcept getOutcome() { 5200 if (this.outcome == null) 5201 if (Configuration.errorOnAutoCreate()) 5202 throw new Error("Attempt to auto-create ClaimResponse.outcome"); 5203 else if (Configuration.doAutoCreate()) 5204 this.outcome = new CodeableConcept(); // cc 5205 return this.outcome; 5206 } 5207 5208 public boolean hasOutcome() { 5209 return this.outcome != null && !this.outcome.isEmpty(); 5210 } 5211 5212 /** 5213 * @param value {@link #outcome} (Processing outcome errror, partial or complete processing.) 5214 */ 5215 public ClaimResponse setOutcome(CodeableConcept value) { 5216 this.outcome = value; 5217 return this; 5218 } 5219 5220 /** 5221 * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 5222 */ 5223 public StringType getDispositionElement() { 5224 if (this.disposition == null) 5225 if (Configuration.errorOnAutoCreate()) 5226 throw new Error("Attempt to auto-create ClaimResponse.disposition"); 5227 else if (Configuration.doAutoCreate()) 5228 this.disposition = new StringType(); // bb 5229 return this.disposition; 5230 } 5231 5232 public boolean hasDispositionElement() { 5233 return this.disposition != null && !this.disposition.isEmpty(); 5234 } 5235 5236 public boolean hasDisposition() { 5237 return this.disposition != null && !this.disposition.isEmpty(); 5238 } 5239 5240 /** 5241 * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 5242 */ 5243 public ClaimResponse setDispositionElement(StringType value) { 5244 this.disposition = value; 5245 return this; 5246 } 5247 5248 /** 5249 * @return A description of the status of the adjudication. 5250 */ 5251 public String getDisposition() { 5252 return this.disposition == null ? null : this.disposition.getValue(); 5253 } 5254 5255 /** 5256 * @param value A description of the status of the adjudication. 5257 */ 5258 public ClaimResponse setDisposition(String value) { 5259 if (Utilities.noString(value)) 5260 this.disposition = null; 5261 else { 5262 if (this.disposition == null) 5263 this.disposition = new StringType(); 5264 this.disposition.setValue(value); 5265 } 5266 return this; 5267 } 5268 5269 /** 5270 * @return {@link #payeeType} (Party to be reimbursed: Subscriber, provider, other.) 5271 */ 5272 public CodeableConcept getPayeeType() { 5273 if (this.payeeType == null) 5274 if (Configuration.errorOnAutoCreate()) 5275 throw new Error("Attempt to auto-create ClaimResponse.payeeType"); 5276 else if (Configuration.doAutoCreate()) 5277 this.payeeType = new CodeableConcept(); // cc 5278 return this.payeeType; 5279 } 5280 5281 public boolean hasPayeeType() { 5282 return this.payeeType != null && !this.payeeType.isEmpty(); 5283 } 5284 5285 /** 5286 * @param value {@link #payeeType} (Party to be reimbursed: Subscriber, provider, other.) 5287 */ 5288 public ClaimResponse setPayeeType(CodeableConcept value) { 5289 this.payeeType = value; 5290 return this; 5291 } 5292 5293 /** 5294 * @return {@link #item} (The first tier service adjudications for submitted services.) 5295 */ 5296 public List<ItemComponent> getItem() { 5297 if (this.item == null) 5298 this.item = new ArrayList<ItemComponent>(); 5299 return this.item; 5300 } 5301 5302 /** 5303 * @return Returns a reference to <code>this</code> for easy method chaining 5304 */ 5305 public ClaimResponse setItem(List<ItemComponent> theItem) { 5306 this.item = theItem; 5307 return this; 5308 } 5309 5310 public boolean hasItem() { 5311 if (this.item == null) 5312 return false; 5313 for (ItemComponent item : this.item) 5314 if (!item.isEmpty()) 5315 return true; 5316 return false; 5317 } 5318 5319 public ItemComponent addItem() { //3 5320 ItemComponent t = new ItemComponent(); 5321 if (this.item == null) 5322 this.item = new ArrayList<ItemComponent>(); 5323 this.item.add(t); 5324 return t; 5325 } 5326 5327 public ClaimResponse addItem(ItemComponent t) { //3 5328 if (t == null) 5329 return this; 5330 if (this.item == null) 5331 this.item = new ArrayList<ItemComponent>(); 5332 this.item.add(t); 5333 return this; 5334 } 5335 5336 /** 5337 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 5338 */ 5339 public ItemComponent getItemFirstRep() { 5340 if (getItem().isEmpty()) { 5341 addItem(); 5342 } 5343 return getItem().get(0); 5344 } 5345 5346 /** 5347 * @return {@link #addItem} (The first tier service adjudications for payor added services.) 5348 */ 5349 public List<AddedItemComponent> getAddItem() { 5350 if (this.addItem == null) 5351 this.addItem = new ArrayList<AddedItemComponent>(); 5352 return this.addItem; 5353 } 5354 5355 /** 5356 * @return Returns a reference to <code>this</code> for easy method chaining 5357 */ 5358 public ClaimResponse setAddItem(List<AddedItemComponent> theAddItem) { 5359 this.addItem = theAddItem; 5360 return this; 5361 } 5362 5363 public boolean hasAddItem() { 5364 if (this.addItem == null) 5365 return false; 5366 for (AddedItemComponent item : this.addItem) 5367 if (!item.isEmpty()) 5368 return true; 5369 return false; 5370 } 5371 5372 public AddedItemComponent addAddItem() { //3 5373 AddedItemComponent t = new AddedItemComponent(); 5374 if (this.addItem == null) 5375 this.addItem = new ArrayList<AddedItemComponent>(); 5376 this.addItem.add(t); 5377 return t; 5378 } 5379 5380 public ClaimResponse addAddItem(AddedItemComponent t) { //3 5381 if (t == null) 5382 return this; 5383 if (this.addItem == null) 5384 this.addItem = new ArrayList<AddedItemComponent>(); 5385 this.addItem.add(t); 5386 return this; 5387 } 5388 5389 /** 5390 * @return The first repetition of repeating field {@link #addItem}, creating it if it does not already exist 5391 */ 5392 public AddedItemComponent getAddItemFirstRep() { 5393 if (getAddItem().isEmpty()) { 5394 addAddItem(); 5395 } 5396 return getAddItem().get(0); 5397 } 5398 5399 /** 5400 * @return {@link #error} (Mutually exclusive with Services Provided (Item).) 5401 */ 5402 public List<ErrorComponent> getError() { 5403 if (this.error == null) 5404 this.error = new ArrayList<ErrorComponent>(); 5405 return this.error; 5406 } 5407 5408 /** 5409 * @return Returns a reference to <code>this</code> for easy method chaining 5410 */ 5411 public ClaimResponse setError(List<ErrorComponent> theError) { 5412 this.error = theError; 5413 return this; 5414 } 5415 5416 public boolean hasError() { 5417 if (this.error == null) 5418 return false; 5419 for (ErrorComponent item : this.error) 5420 if (!item.isEmpty()) 5421 return true; 5422 return false; 5423 } 5424 5425 public ErrorComponent addError() { //3 5426 ErrorComponent t = new ErrorComponent(); 5427 if (this.error == null) 5428 this.error = new ArrayList<ErrorComponent>(); 5429 this.error.add(t); 5430 return t; 5431 } 5432 5433 public ClaimResponse addError(ErrorComponent t) { //3 5434 if (t == null) 5435 return this; 5436 if (this.error == null) 5437 this.error = new ArrayList<ErrorComponent>(); 5438 this.error.add(t); 5439 return this; 5440 } 5441 5442 /** 5443 * @return The first repetition of repeating field {@link #error}, creating it if it does not already exist 5444 */ 5445 public ErrorComponent getErrorFirstRep() { 5446 if (getError().isEmpty()) { 5447 addError(); 5448 } 5449 return getError().get(0); 5450 } 5451 5452 /** 5453 * @return {@link #totalCost} (The total cost of the services reported.) 5454 */ 5455 public Money getTotalCost() { 5456 if (this.totalCost == null) 5457 if (Configuration.errorOnAutoCreate()) 5458 throw new Error("Attempt to auto-create ClaimResponse.totalCost"); 5459 else if (Configuration.doAutoCreate()) 5460 this.totalCost = new Money(); // cc 5461 return this.totalCost; 5462 } 5463 5464 public boolean hasTotalCost() { 5465 return this.totalCost != null && !this.totalCost.isEmpty(); 5466 } 5467 5468 /** 5469 * @param value {@link #totalCost} (The total cost of the services reported.) 5470 */ 5471 public ClaimResponse setTotalCost(Money value) { 5472 this.totalCost = value; 5473 return this; 5474 } 5475 5476 /** 5477 * @return {@link #unallocDeductable} (The amount of deductible applied which was not allocated to any particular service line.) 5478 */ 5479 public Money getUnallocDeductable() { 5480 if (this.unallocDeductable == null) 5481 if (Configuration.errorOnAutoCreate()) 5482 throw new Error("Attempt to auto-create ClaimResponse.unallocDeductable"); 5483 else if (Configuration.doAutoCreate()) 5484 this.unallocDeductable = new Money(); // cc 5485 return this.unallocDeductable; 5486 } 5487 5488 public boolean hasUnallocDeductable() { 5489 return this.unallocDeductable != null && !this.unallocDeductable.isEmpty(); 5490 } 5491 5492 /** 5493 * @param value {@link #unallocDeductable} (The amount of deductible applied which was not allocated to any particular service line.) 5494 */ 5495 public ClaimResponse setUnallocDeductable(Money value) { 5496 this.unallocDeductable = value; 5497 return this; 5498 } 5499 5500 /** 5501 * @return {@link #totalBenefit} (Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).) 5502 */ 5503 public Money getTotalBenefit() { 5504 if (this.totalBenefit == null) 5505 if (Configuration.errorOnAutoCreate()) 5506 throw new Error("Attempt to auto-create ClaimResponse.totalBenefit"); 5507 else if (Configuration.doAutoCreate()) 5508 this.totalBenefit = new Money(); // cc 5509 return this.totalBenefit; 5510 } 5511 5512 public boolean hasTotalBenefit() { 5513 return this.totalBenefit != null && !this.totalBenefit.isEmpty(); 5514 } 5515 5516 /** 5517 * @param value {@link #totalBenefit} (Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).) 5518 */ 5519 public ClaimResponse setTotalBenefit(Money value) { 5520 this.totalBenefit = value; 5521 return this; 5522 } 5523 5524 /** 5525 * @return {@link #payment} (Payment details for the claim if the claim has been paid.) 5526 */ 5527 public PaymentComponent getPayment() { 5528 if (this.payment == null) 5529 if (Configuration.errorOnAutoCreate()) 5530 throw new Error("Attempt to auto-create ClaimResponse.payment"); 5531 else if (Configuration.doAutoCreate()) 5532 this.payment = new PaymentComponent(); // cc 5533 return this.payment; 5534 } 5535 5536 public boolean hasPayment() { 5537 return this.payment != null && !this.payment.isEmpty(); 5538 } 5539 5540 /** 5541 * @param value {@link #payment} (Payment details for the claim if the claim has been paid.) 5542 */ 5543 public ClaimResponse setPayment(PaymentComponent value) { 5544 this.payment = value; 5545 return this; 5546 } 5547 5548 /** 5549 * @return {@link #reserved} (Status of funds reservation (For provider, for Patient, None).) 5550 */ 5551 public Coding getReserved() { 5552 if (this.reserved == null) 5553 if (Configuration.errorOnAutoCreate()) 5554 throw new Error("Attempt to auto-create ClaimResponse.reserved"); 5555 else if (Configuration.doAutoCreate()) 5556 this.reserved = new Coding(); // cc 5557 return this.reserved; 5558 } 5559 5560 public boolean hasReserved() { 5561 return this.reserved != null && !this.reserved.isEmpty(); 5562 } 5563 5564 /** 5565 * @param value {@link #reserved} (Status of funds reservation (For provider, for Patient, None).) 5566 */ 5567 public ClaimResponse setReserved(Coding value) { 5568 this.reserved = value; 5569 return this; 5570 } 5571 5572 /** 5573 * @return {@link #form} (The form to be used for printing the content.) 5574 */ 5575 public CodeableConcept getForm() { 5576 if (this.form == null) 5577 if (Configuration.errorOnAutoCreate()) 5578 throw new Error("Attempt to auto-create ClaimResponse.form"); 5579 else if (Configuration.doAutoCreate()) 5580 this.form = new CodeableConcept(); // cc 5581 return this.form; 5582 } 5583 5584 public boolean hasForm() { 5585 return this.form != null && !this.form.isEmpty(); 5586 } 5587 5588 /** 5589 * @param value {@link #form} (The form to be used for printing the content.) 5590 */ 5591 public ClaimResponse setForm(CodeableConcept value) { 5592 this.form = value; 5593 return this; 5594 } 5595 5596 /** 5597 * @return {@link #processNote} (Note text.) 5598 */ 5599 public List<NoteComponent> getProcessNote() { 5600 if (this.processNote == null) 5601 this.processNote = new ArrayList<NoteComponent>(); 5602 return this.processNote; 5603 } 5604 5605 /** 5606 * @return Returns a reference to <code>this</code> for easy method chaining 5607 */ 5608 public ClaimResponse setProcessNote(List<NoteComponent> theProcessNote) { 5609 this.processNote = theProcessNote; 5610 return this; 5611 } 5612 5613 public boolean hasProcessNote() { 5614 if (this.processNote == null) 5615 return false; 5616 for (NoteComponent item : this.processNote) 5617 if (!item.isEmpty()) 5618 return true; 5619 return false; 5620 } 5621 5622 public NoteComponent addProcessNote() { //3 5623 NoteComponent t = new NoteComponent(); 5624 if (this.processNote == null) 5625 this.processNote = new ArrayList<NoteComponent>(); 5626 this.processNote.add(t); 5627 return t; 5628 } 5629 5630 public ClaimResponse addProcessNote(NoteComponent t) { //3 5631 if (t == null) 5632 return this; 5633 if (this.processNote == null) 5634 this.processNote = new ArrayList<NoteComponent>(); 5635 this.processNote.add(t); 5636 return this; 5637 } 5638 5639 /** 5640 * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist 5641 */ 5642 public NoteComponent getProcessNoteFirstRep() { 5643 if (getProcessNote().isEmpty()) { 5644 addProcessNote(); 5645 } 5646 return getProcessNote().get(0); 5647 } 5648 5649 /** 5650 * @return {@link #communicationRequest} (Request for additional supporting or authorizing information, such as: documents, images or resources.) 5651 */ 5652 public List<Reference> getCommunicationRequest() { 5653 if (this.communicationRequest == null) 5654 this.communicationRequest = new ArrayList<Reference>(); 5655 return this.communicationRequest; 5656 } 5657 5658 /** 5659 * @return Returns a reference to <code>this</code> for easy method chaining 5660 */ 5661 public ClaimResponse setCommunicationRequest(List<Reference> theCommunicationRequest) { 5662 this.communicationRequest = theCommunicationRequest; 5663 return this; 5664 } 5665 5666 public boolean hasCommunicationRequest() { 5667 if (this.communicationRequest == null) 5668 return false; 5669 for (Reference item : this.communicationRequest) 5670 if (!item.isEmpty()) 5671 return true; 5672 return false; 5673 } 5674 5675 public Reference addCommunicationRequest() { //3 5676 Reference t = new Reference(); 5677 if (this.communicationRequest == null) 5678 this.communicationRequest = new ArrayList<Reference>(); 5679 this.communicationRequest.add(t); 5680 return t; 5681 } 5682 5683 public ClaimResponse addCommunicationRequest(Reference t) { //3 5684 if (t == null) 5685 return this; 5686 if (this.communicationRequest == null) 5687 this.communicationRequest = new ArrayList<Reference>(); 5688 this.communicationRequest.add(t); 5689 return this; 5690 } 5691 5692 /** 5693 * @return The first repetition of repeating field {@link #communicationRequest}, creating it if it does not already exist 5694 */ 5695 public Reference getCommunicationRequestFirstRep() { 5696 if (getCommunicationRequest().isEmpty()) { 5697 addCommunicationRequest(); 5698 } 5699 return getCommunicationRequest().get(0); 5700 } 5701 5702 /** 5703 * @deprecated Use Reference#setResource(IBaseResource) instead 5704 */ 5705 @Deprecated 5706 public List<CommunicationRequest> getCommunicationRequestTarget() { 5707 if (this.communicationRequestTarget == null) 5708 this.communicationRequestTarget = new ArrayList<CommunicationRequest>(); 5709 return this.communicationRequestTarget; 5710 } 5711 5712 /** 5713 * @deprecated Use Reference#setResource(IBaseResource) instead 5714 */ 5715 @Deprecated 5716 public CommunicationRequest addCommunicationRequestTarget() { 5717 CommunicationRequest r = new CommunicationRequest(); 5718 if (this.communicationRequestTarget == null) 5719 this.communicationRequestTarget = new ArrayList<CommunicationRequest>(); 5720 this.communicationRequestTarget.add(r); 5721 return r; 5722 } 5723 5724 /** 5725 * @return {@link #insurance} (Financial instrument by which payment information for health care.) 5726 */ 5727 public List<InsuranceComponent> getInsurance() { 5728 if (this.insurance == null) 5729 this.insurance = new ArrayList<InsuranceComponent>(); 5730 return this.insurance; 5731 } 5732 5733 /** 5734 * @return Returns a reference to <code>this</code> for easy method chaining 5735 */ 5736 public ClaimResponse setInsurance(List<InsuranceComponent> theInsurance) { 5737 this.insurance = theInsurance; 5738 return this; 5739 } 5740 5741 public boolean hasInsurance() { 5742 if (this.insurance == null) 5743 return false; 5744 for (InsuranceComponent item : this.insurance) 5745 if (!item.isEmpty()) 5746 return true; 5747 return false; 5748 } 5749 5750 public InsuranceComponent addInsurance() { //3 5751 InsuranceComponent t = new InsuranceComponent(); 5752 if (this.insurance == null) 5753 this.insurance = new ArrayList<InsuranceComponent>(); 5754 this.insurance.add(t); 5755 return t; 5756 } 5757 5758 public ClaimResponse addInsurance(InsuranceComponent t) { //3 5759 if (t == null) 5760 return this; 5761 if (this.insurance == null) 5762 this.insurance = new ArrayList<InsuranceComponent>(); 5763 this.insurance.add(t); 5764 return this; 5765 } 5766 5767 /** 5768 * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist 5769 */ 5770 public InsuranceComponent getInsuranceFirstRep() { 5771 if (getInsurance().isEmpty()) { 5772 addInsurance(); 5773 } 5774 return getInsurance().get(0); 5775 } 5776 5777 protected void listChildren(List<Property> children) { 5778 super.listChildren(children); 5779 children.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 5780 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 5781 children.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, 1, patient)); 5782 children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); 5783 children.add(new Property("insurer", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, insurer)); 5784 children.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); 5785 children.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization)); 5786 children.add(new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, 1, request)); 5787 children.add(new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome)); 5788 children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); 5789 children.add(new Property("payeeType", "CodeableConcept", "Party to be reimbursed: Subscriber, provider, other.", 0, 1, payeeType)); 5790 children.add(new Property("item", "", "The first tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, item)); 5791 children.add(new Property("addItem", "", "The first tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, addItem)); 5792 children.add(new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error)); 5793 children.add(new Property("totalCost", "Money", "The total cost of the services reported.", 0, 1, totalCost)); 5794 children.add(new Property("unallocDeductable", "Money", "The amount of deductible applied which was not allocated to any particular service line.", 0, 1, unallocDeductable)); 5795 children.add(new Property("totalBenefit", "Money", "Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).", 0, 1, totalBenefit)); 5796 children.add(new Property("payment", "", "Payment details for the claim if the claim has been paid.", 0, 1, payment)); 5797 children.add(new Property("reserved", "Coding", "Status of funds reservation (For provider, for Patient, None).", 0, 1, reserved)); 5798 children.add(new Property("form", "CodeableConcept", "The form to be used for printing the content.", 0, 1, form)); 5799 children.add(new Property("processNote", "", "Note text.", 0, java.lang.Integer.MAX_VALUE, processNote)); 5800 children.add(new Property("communicationRequest", "Reference(CommunicationRequest)", "Request for additional supporting or authorizing information, such as: documents, images or resources.", 0, java.lang.Integer.MAX_VALUE, communicationRequest)); 5801 children.add(new Property("insurance", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, insurance)); 5802 } 5803 5804 @Override 5805 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5806 switch (_hash) { 5807 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier); 5808 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 5809 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "Patient Resource.", 0, 1, patient); 5810 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); 5811 case 1957615864: /*insurer*/ return new Property("insurer", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, insurer); 5812 case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); 5813 case 599053666: /*requestOrganization*/ return new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, 1, requestOrganization); 5814 case 1095692943: /*request*/ return new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, 1, request); 5815 case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Processing outcome errror, partial or complete processing.", 0, 1, outcome); 5816 case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); 5817 case -316321118: /*payeeType*/ return new Property("payeeType", "CodeableConcept", "Party to be reimbursed: Subscriber, provider, other.", 0, 1, payeeType); 5818 case 3242771: /*item*/ return new Property("item", "", "The first tier service adjudications for submitted services.", 0, java.lang.Integer.MAX_VALUE, item); 5819 case -1148899500: /*addItem*/ return new Property("addItem", "", "The first tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, addItem); 5820 case 96784904: /*error*/ return new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error); 5821 case -577782479: /*totalCost*/ return new Property("totalCost", "Money", "The total cost of the services reported.", 0, 1, totalCost); 5822 case 2096309753: /*unallocDeductable*/ return new Property("unallocDeductable", "Money", "The amount of deductible applied which was not allocated to any particular service line.", 0, 1, unallocDeductable); 5823 case 332332211: /*totalBenefit*/ return new Property("totalBenefit", "Money", "Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).", 0, 1, totalBenefit); 5824 case -786681338: /*payment*/ return new Property("payment", "", "Payment details for the claim if the claim has been paid.", 0, 1, payment); 5825 case -350385368: /*reserved*/ return new Property("reserved", "Coding", "Status of funds reservation (For provider, for Patient, None).", 0, 1, reserved); 5826 case 3148996: /*form*/ return new Property("form", "CodeableConcept", "The form to be used for printing the content.", 0, 1, form); 5827 case 202339073: /*processNote*/ return new Property("processNote", "", "Note text.", 0, java.lang.Integer.MAX_VALUE, processNote); 5828 case -2071896615: /*communicationRequest*/ return new Property("communicationRequest", "Reference(CommunicationRequest)", "Request for additional supporting or authorizing information, such as: documents, images or resources.", 0, java.lang.Integer.MAX_VALUE, communicationRequest); 5829 case 73049818: /*insurance*/ return new Property("insurance", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, insurance); 5830 default: return super.getNamedProperty(_hash, _name, _checkValid); 5831 } 5832 5833 } 5834 5835 @Override 5836 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5837 switch (hash) { 5838 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 5839 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ClaimResponseStatus> 5840 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 5841 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 5842 case 1957615864: /*insurer*/ return this.insurer == null ? new Base[0] : new Base[] {this.insurer}; // Reference 5843 case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference 5844 case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Reference 5845 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 5846 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 5847 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 5848 case -316321118: /*payeeType*/ return this.payeeType == null ? new Base[0] : new Base[] {this.payeeType}; // CodeableConcept 5849 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemComponent 5850 case -1148899500: /*addItem*/ return this.addItem == null ? new Base[0] : this.addItem.toArray(new Base[this.addItem.size()]); // AddedItemComponent 5851 case 96784904: /*error*/ return this.error == null ? new Base[0] : this.error.toArray(new Base[this.error.size()]); // ErrorComponent 5852 case -577782479: /*totalCost*/ return this.totalCost == null ? new Base[0] : new Base[] {this.totalCost}; // Money 5853 case 2096309753: /*unallocDeductable*/ return this.unallocDeductable == null ? new Base[0] : new Base[] {this.unallocDeductable}; // Money 5854 case 332332211: /*totalBenefit*/ return this.totalBenefit == null ? new Base[0] : new Base[] {this.totalBenefit}; // Money 5855 case -786681338: /*payment*/ return this.payment == null ? new Base[0] : new Base[] {this.payment}; // PaymentComponent 5856 case -350385368: /*reserved*/ return this.reserved == null ? new Base[0] : new Base[] {this.reserved}; // Coding 5857 case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept 5858 case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // NoteComponent 5859 case -2071896615: /*communicationRequest*/ return this.communicationRequest == null ? new Base[0] : this.communicationRequest.toArray(new Base[this.communicationRequest.size()]); // Reference 5860 case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // InsuranceComponent 5861 default: return super.getProperty(hash, name, checkValid); 5862 } 5863 5864 } 5865 5866 @Override 5867 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5868 switch (hash) { 5869 case -1618432855: // identifier 5870 this.getIdentifier().add(castToIdentifier(value)); // Identifier 5871 return value; 5872 case -892481550: // status 5873 value = new ClaimResponseStatusEnumFactory().fromType(castToCode(value)); 5874 this.status = (Enumeration) value; // Enumeration<ClaimResponseStatus> 5875 return value; 5876 case -791418107: // patient 5877 this.patient = castToReference(value); // Reference 5878 return value; 5879 case 1028554472: // created 5880 this.created = castToDateTime(value); // DateTimeType 5881 return value; 5882 case 1957615864: // insurer 5883 this.insurer = castToReference(value); // Reference 5884 return value; 5885 case 1601527200: // requestProvider 5886 this.requestProvider = castToReference(value); // Reference 5887 return value; 5888 case 599053666: // requestOrganization 5889 this.requestOrganization = castToReference(value); // Reference 5890 return value; 5891 case 1095692943: // request 5892 this.request = castToReference(value); // Reference 5893 return value; 5894 case -1106507950: // outcome 5895 this.outcome = castToCodeableConcept(value); // CodeableConcept 5896 return value; 5897 case 583380919: // disposition 5898 this.disposition = castToString(value); // StringType 5899 return value; 5900 case -316321118: // payeeType 5901 this.payeeType = castToCodeableConcept(value); // CodeableConcept 5902 return value; 5903 case 3242771: // item 5904 this.getItem().add((ItemComponent) value); // ItemComponent 5905 return value; 5906 case -1148899500: // addItem 5907 this.getAddItem().add((AddedItemComponent) value); // AddedItemComponent 5908 return value; 5909 case 96784904: // error 5910 this.getError().add((ErrorComponent) value); // ErrorComponent 5911 return value; 5912 case -577782479: // totalCost 5913 this.totalCost = castToMoney(value); // Money 5914 return value; 5915 case 2096309753: // unallocDeductable 5916 this.unallocDeductable = castToMoney(value); // Money 5917 return value; 5918 case 332332211: // totalBenefit 5919 this.totalBenefit = castToMoney(value); // Money 5920 return value; 5921 case -786681338: // payment 5922 this.payment = (PaymentComponent) value; // PaymentComponent 5923 return value; 5924 case -350385368: // reserved 5925 this.reserved = castToCoding(value); // Coding 5926 return value; 5927 case 3148996: // form 5928 this.form = castToCodeableConcept(value); // CodeableConcept 5929 return value; 5930 case 202339073: // processNote 5931 this.getProcessNote().add((NoteComponent) value); // NoteComponent 5932 return value; 5933 case -2071896615: // communicationRequest 5934 this.getCommunicationRequest().add(castToReference(value)); // Reference 5935 return value; 5936 case 73049818: // insurance 5937 this.getInsurance().add((InsuranceComponent) value); // InsuranceComponent 5938 return value; 5939 default: return super.setProperty(hash, name, value); 5940 } 5941 5942 } 5943 5944 @Override 5945 public Base setProperty(String name, Base value) throws FHIRException { 5946 if (name.equals("identifier")) { 5947 this.getIdentifier().add(castToIdentifier(value)); 5948 } else if (name.equals("status")) { 5949 value = new ClaimResponseStatusEnumFactory().fromType(castToCode(value)); 5950 this.status = (Enumeration) value; // Enumeration<ClaimResponseStatus> 5951 } else if (name.equals("patient")) { 5952 this.patient = castToReference(value); // Reference 5953 } else if (name.equals("created")) { 5954 this.created = castToDateTime(value); // DateTimeType 5955 } else if (name.equals("insurer")) { 5956 this.insurer = castToReference(value); // Reference 5957 } else if (name.equals("requestProvider")) { 5958 this.requestProvider = castToReference(value); // Reference 5959 } else if (name.equals("requestOrganization")) { 5960 this.requestOrganization = castToReference(value); // Reference 5961 } else if (name.equals("request")) { 5962 this.request = castToReference(value); // Reference 5963 } else if (name.equals("outcome")) { 5964 this.outcome = castToCodeableConcept(value); // CodeableConcept 5965 } else if (name.equals("disposition")) { 5966 this.disposition = castToString(value); // StringType 5967 } else if (name.equals("payeeType")) { 5968 this.payeeType = castToCodeableConcept(value); // CodeableConcept 5969 } else if (name.equals("item")) { 5970 this.getItem().add((ItemComponent) value); 5971 } else if (name.equals("addItem")) { 5972 this.getAddItem().add((AddedItemComponent) value); 5973 } else if (name.equals("error")) { 5974 this.getError().add((ErrorComponent) value); 5975 } else if (name.equals("totalCost")) { 5976 this.totalCost = castToMoney(value); // Money 5977 } else if (name.equals("unallocDeductable")) { 5978 this.unallocDeductable = castToMoney(value); // Money 5979 } else if (name.equals("totalBenefit")) { 5980 this.totalBenefit = castToMoney(value); // Money 5981 } else if (name.equals("payment")) { 5982 this.payment = (PaymentComponent) value; // PaymentComponent 5983 } else if (name.equals("reserved")) { 5984 this.reserved = castToCoding(value); // Coding 5985 } else if (name.equals("form")) { 5986 this.form = castToCodeableConcept(value); // CodeableConcept 5987 } else if (name.equals("processNote")) { 5988 this.getProcessNote().add((NoteComponent) value); 5989 } else if (name.equals("communicationRequest")) { 5990 this.getCommunicationRequest().add(castToReference(value)); 5991 } else if (name.equals("insurance")) { 5992 this.getInsurance().add((InsuranceComponent) value); 5993 } else 5994 return super.setProperty(name, value); 5995 return value; 5996 } 5997 5998 @Override 5999 public Base makeProperty(int hash, String name) throws FHIRException { 6000 switch (hash) { 6001 case -1618432855: return addIdentifier(); 6002 case -892481550: return getStatusElement(); 6003 case -791418107: return getPatient(); 6004 case 1028554472: return getCreatedElement(); 6005 case 1957615864: return getInsurer(); 6006 case 1601527200: return getRequestProvider(); 6007 case 599053666: return getRequestOrganization(); 6008 case 1095692943: return getRequest(); 6009 case -1106507950: return getOutcome(); 6010 case 583380919: return getDispositionElement(); 6011 case -316321118: return getPayeeType(); 6012 case 3242771: return addItem(); 6013 case -1148899500: return addAddItem(); 6014 case 96784904: return addError(); 6015 case -577782479: return getTotalCost(); 6016 case 2096309753: return getUnallocDeductable(); 6017 case 332332211: return getTotalBenefit(); 6018 case -786681338: return getPayment(); 6019 case -350385368: return getReserved(); 6020 case 3148996: return getForm(); 6021 case 202339073: return addProcessNote(); 6022 case -2071896615: return addCommunicationRequest(); 6023 case 73049818: return addInsurance(); 6024 default: return super.makeProperty(hash, name); 6025 } 6026 6027 } 6028 6029 @Override 6030 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6031 switch (hash) { 6032 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 6033 case -892481550: /*status*/ return new String[] {"code"}; 6034 case -791418107: /*patient*/ return new String[] {"Reference"}; 6035 case 1028554472: /*created*/ return new String[] {"dateTime"}; 6036 case 1957615864: /*insurer*/ return new String[] {"Reference"}; 6037 case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; 6038 case 599053666: /*requestOrganization*/ return new String[] {"Reference"}; 6039 case 1095692943: /*request*/ return new String[] {"Reference"}; 6040 case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; 6041 case 583380919: /*disposition*/ return new String[] {"string"}; 6042 case -316321118: /*payeeType*/ return new String[] {"CodeableConcept"}; 6043 case 3242771: /*item*/ return new String[] {}; 6044 case -1148899500: /*addItem*/ return new String[] {}; 6045 case 96784904: /*error*/ return new String[] {}; 6046 case -577782479: /*totalCost*/ return new String[] {"Money"}; 6047 case 2096309753: /*unallocDeductable*/ return new String[] {"Money"}; 6048 case 332332211: /*totalBenefit*/ return new String[] {"Money"}; 6049 case -786681338: /*payment*/ return new String[] {}; 6050 case -350385368: /*reserved*/ return new String[] {"Coding"}; 6051 case 3148996: /*form*/ return new String[] {"CodeableConcept"}; 6052 case 202339073: /*processNote*/ return new String[] {}; 6053 case -2071896615: /*communicationRequest*/ return new String[] {"Reference"}; 6054 case 73049818: /*insurance*/ return new String[] {}; 6055 default: return super.getTypesForProperty(hash, name); 6056 } 6057 6058 } 6059 6060 @Override 6061 public Base addChild(String name) throws FHIRException { 6062 if (name.equals("identifier")) { 6063 return addIdentifier(); 6064 } 6065 else if (name.equals("status")) { 6066 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.status"); 6067 } 6068 else if (name.equals("patient")) { 6069 this.patient = new Reference(); 6070 return this.patient; 6071 } 6072 else if (name.equals("created")) { 6073 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.created"); 6074 } 6075 else if (name.equals("insurer")) { 6076 this.insurer = new Reference(); 6077 return this.insurer; 6078 } 6079 else if (name.equals("requestProvider")) { 6080 this.requestProvider = new Reference(); 6081 return this.requestProvider; 6082 } 6083 else if (name.equals("requestOrganization")) { 6084 this.requestOrganization = new Reference(); 6085 return this.requestOrganization; 6086 } 6087 else if (name.equals("request")) { 6088 this.request = new Reference(); 6089 return this.request; 6090 } 6091 else if (name.equals("outcome")) { 6092 this.outcome = new CodeableConcept(); 6093 return this.outcome; 6094 } 6095 else if (name.equals("disposition")) { 6096 throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.disposition"); 6097 } 6098 else if (name.equals("payeeType")) { 6099 this.payeeType = new CodeableConcept(); 6100 return this.payeeType; 6101 } 6102 else if (name.equals("item")) { 6103 return addItem(); 6104 } 6105 else if (name.equals("addItem")) { 6106 return addAddItem(); 6107 } 6108 else if (name.equals("error")) { 6109 return addError(); 6110 } 6111 else if (name.equals("totalCost")) { 6112 this.totalCost = new Money(); 6113 return this.totalCost; 6114 } 6115 else if (name.equals("unallocDeductable")) { 6116 this.unallocDeductable = new Money(); 6117 return this.unallocDeductable; 6118 } 6119 else if (name.equals("totalBenefit")) { 6120 this.totalBenefit = new Money(); 6121 return this.totalBenefit; 6122 } 6123 else if (name.equals("payment")) { 6124 this.payment = new PaymentComponent(); 6125 return this.payment; 6126 } 6127 else if (name.equals("reserved")) { 6128 this.reserved = new Coding(); 6129 return this.reserved; 6130 } 6131 else if (name.equals("form")) { 6132 this.form = new CodeableConcept(); 6133 return this.form; 6134 } 6135 else if (name.equals("processNote")) { 6136 return addProcessNote(); 6137 } 6138 else if (name.equals("communicationRequest")) { 6139 return addCommunicationRequest(); 6140 } 6141 else if (name.equals("insurance")) { 6142 return addInsurance(); 6143 } 6144 else 6145 return super.addChild(name); 6146 } 6147 6148 public String fhirType() { 6149 return "ClaimResponse"; 6150 6151 } 6152 6153 public ClaimResponse copy() { 6154 ClaimResponse dst = new ClaimResponse(); 6155 copyValues(dst); 6156 if (identifier != null) { 6157 dst.identifier = new ArrayList<Identifier>(); 6158 for (Identifier i : identifier) 6159 dst.identifier.add(i.copy()); 6160 }; 6161 dst.status = status == null ? null : status.copy(); 6162 dst.patient = patient == null ? null : patient.copy(); 6163 dst.created = created == null ? null : created.copy(); 6164 dst.insurer = insurer == null ? null : insurer.copy(); 6165 dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); 6166 dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); 6167 dst.request = request == null ? null : request.copy(); 6168 dst.outcome = outcome == null ? null : outcome.copy(); 6169 dst.disposition = disposition == null ? null : disposition.copy(); 6170 dst.payeeType = payeeType == null ? null : payeeType.copy(); 6171 if (item != null) { 6172 dst.item = new ArrayList<ItemComponent>(); 6173 for (ItemComponent i : item) 6174 dst.item.add(i.copy()); 6175 }; 6176 if (addItem != null) { 6177 dst.addItem = new ArrayList<AddedItemComponent>(); 6178 for (AddedItemComponent i : addItem) 6179 dst.addItem.add(i.copy()); 6180 }; 6181 if (error != null) { 6182 dst.error = new ArrayList<ErrorComponent>(); 6183 for (ErrorComponent i : error) 6184 dst.error.add(i.copy()); 6185 }; 6186 dst.totalCost = totalCost == null ? null : totalCost.copy(); 6187 dst.unallocDeductable = unallocDeductable == null ? null : unallocDeductable.copy(); 6188 dst.totalBenefit = totalBenefit == null ? null : totalBenefit.copy(); 6189 dst.payment = payment == null ? null : payment.copy(); 6190 dst.reserved = reserved == null ? null : reserved.copy(); 6191 dst.form = form == null ? null : form.copy(); 6192 if (processNote != null) { 6193 dst.processNote = new ArrayList<NoteComponent>(); 6194 for (NoteComponent i : processNote) 6195 dst.processNote.add(i.copy()); 6196 }; 6197 if (communicationRequest != null) { 6198 dst.communicationRequest = new ArrayList<Reference>(); 6199 for (Reference i : communicationRequest) 6200 dst.communicationRequest.add(i.copy()); 6201 }; 6202 if (insurance != null) { 6203 dst.insurance = new ArrayList<InsuranceComponent>(); 6204 for (InsuranceComponent i : insurance) 6205 dst.insurance.add(i.copy()); 6206 }; 6207 return dst; 6208 } 6209 6210 protected ClaimResponse typedCopy() { 6211 return copy(); 6212 } 6213 6214 @Override 6215 public boolean equalsDeep(Base other_) { 6216 if (!super.equalsDeep(other_)) 6217 return false; 6218 if (!(other_ instanceof ClaimResponse)) 6219 return false; 6220 ClaimResponse o = (ClaimResponse) other_; 6221 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) 6222 && compareDeep(created, o.created, true) && compareDeep(insurer, o.insurer, true) && compareDeep(requestProvider, o.requestProvider, true) 6223 && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(request, o.request, true) 6224 && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true) && compareDeep(payeeType, o.payeeType, true) 6225 && compareDeep(item, o.item, true) && compareDeep(addItem, o.addItem, true) && compareDeep(error, o.error, true) 6226 && compareDeep(totalCost, o.totalCost, true) && compareDeep(unallocDeductable, o.unallocDeductable, true) 6227 && compareDeep(totalBenefit, o.totalBenefit, true) && compareDeep(payment, o.payment, true) && compareDeep(reserved, o.reserved, true) 6228 && compareDeep(form, o.form, true) && compareDeep(processNote, o.processNote, true) && compareDeep(communicationRequest, o.communicationRequest, true) 6229 && compareDeep(insurance, o.insurance, true); 6230 } 6231 6232 @Override 6233 public boolean equalsShallow(Base other_) { 6234 if (!super.equalsShallow(other_)) 6235 return false; 6236 if (!(other_ instanceof ClaimResponse)) 6237 return false; 6238 ClaimResponse o = (ClaimResponse) other_; 6239 return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) 6240 ; 6241 } 6242 6243 public boolean isEmpty() { 6244 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient 6245 , created, insurer, requestProvider, requestOrganization, request, outcome, disposition 6246 , payeeType, item, addItem, error, totalCost, unallocDeductable, totalBenefit 6247 , payment, reserved, form, processNote, communicationRequest, insurance); 6248 } 6249 6250 @Override 6251 public ResourceType getResourceType() { 6252 return ResourceType.ClaimResponse; 6253 } 6254 6255 /** 6256 * Search parameter: <b>identifier</b> 6257 * <p> 6258 * Description: <b>The identity of the claimresponse</b><br> 6259 * Type: <b>token</b><br> 6260 * Path: <b>ClaimResponse.identifier</b><br> 6261 * </p> 6262 */ 6263 @SearchParamDefinition(name="identifier", path="ClaimResponse.identifier", description="The identity of the claimresponse", type="token" ) 6264 public static final String SP_IDENTIFIER = "identifier"; 6265 /** 6266 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 6267 * <p> 6268 * Description: <b>The identity of the claimresponse</b><br> 6269 * Type: <b>token</b><br> 6270 * Path: <b>ClaimResponse.identifier</b><br> 6271 * </p> 6272 */ 6273 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 6274 6275 /** 6276 * Search parameter: <b>request</b> 6277 * <p> 6278 * Description: <b>The claim reference</b><br> 6279 * Type: <b>reference</b><br> 6280 * Path: <b>ClaimResponse.request</b><br> 6281 * </p> 6282 */ 6283 @SearchParamDefinition(name="request", path="ClaimResponse.request", description="The claim reference", type="reference", target={Claim.class } ) 6284 public static final String SP_REQUEST = "request"; 6285 /** 6286 * <b>Fluent Client</b> search parameter constant for <b>request</b> 6287 * <p> 6288 * Description: <b>The claim reference</b><br> 6289 * Type: <b>reference</b><br> 6290 * Path: <b>ClaimResponse.request</b><br> 6291 * </p> 6292 */ 6293 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); 6294 6295/** 6296 * Constant for fluent queries to be used to add include statements. Specifies 6297 * the path value of "<b>ClaimResponse:request</b>". 6298 */ 6299 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("ClaimResponse:request").toLocked(); 6300 6301 /** 6302 * Search parameter: <b>disposition</b> 6303 * <p> 6304 * Description: <b>The contents of the disposition message</b><br> 6305 * Type: <b>string</b><br> 6306 * Path: <b>ClaimResponse.disposition</b><br> 6307 * </p> 6308 */ 6309 @SearchParamDefinition(name="disposition", path="ClaimResponse.disposition", description="The contents of the disposition message", type="string" ) 6310 public static final String SP_DISPOSITION = "disposition"; 6311 /** 6312 * <b>Fluent Client</b> search parameter constant for <b>disposition</b> 6313 * <p> 6314 * Description: <b>The contents of the disposition message</b><br> 6315 * Type: <b>string</b><br> 6316 * Path: <b>ClaimResponse.disposition</b><br> 6317 * </p> 6318 */ 6319 public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); 6320 6321 /** 6322 * Search parameter: <b>insurer</b> 6323 * <p> 6324 * Description: <b>The organization who generated this resource</b><br> 6325 * Type: <b>reference</b><br> 6326 * Path: <b>ClaimResponse.insurer</b><br> 6327 * </p> 6328 */ 6329 @SearchParamDefinition(name="insurer", path="ClaimResponse.insurer", description="The organization who generated this resource", type="reference", target={Organization.class } ) 6330 public static final String SP_INSURER = "insurer"; 6331 /** 6332 * <b>Fluent Client</b> search parameter constant for <b>insurer</b> 6333 * <p> 6334 * Description: <b>The organization who generated this resource</b><br> 6335 * Type: <b>reference</b><br> 6336 * Path: <b>ClaimResponse.insurer</b><br> 6337 * </p> 6338 */ 6339 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSURER); 6340 6341/** 6342 * Constant for fluent queries to be used to add include statements. Specifies 6343 * the path value of "<b>ClaimResponse:insurer</b>". 6344 */ 6345 public static final ca.uhn.fhir.model.api.Include INCLUDE_INSURER = new ca.uhn.fhir.model.api.Include("ClaimResponse:insurer").toLocked(); 6346 6347 /** 6348 * Search parameter: <b>created</b> 6349 * <p> 6350 * Description: <b>The creation date</b><br> 6351 * Type: <b>date</b><br> 6352 * Path: <b>ClaimResponse.created</b><br> 6353 * </p> 6354 */ 6355 @SearchParamDefinition(name="created", path="ClaimResponse.created", description="The creation date", type="date" ) 6356 public static final String SP_CREATED = "created"; 6357 /** 6358 * <b>Fluent Client</b> search parameter constant for <b>created</b> 6359 * <p> 6360 * Description: <b>The creation date</b><br> 6361 * Type: <b>date</b><br> 6362 * Path: <b>ClaimResponse.created</b><br> 6363 * </p> 6364 */ 6365 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 6366 6367 /** 6368 * Search parameter: <b>patient</b> 6369 * <p> 6370 * Description: <b>The subject of care.</b><br> 6371 * Type: <b>reference</b><br> 6372 * Path: <b>ClaimResponse.patient</b><br> 6373 * </p> 6374 */ 6375 @SearchParamDefinition(name="patient", path="ClaimResponse.patient", description="The subject of care.", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 6376 public static final String SP_PATIENT = "patient"; 6377 /** 6378 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 6379 * <p> 6380 * Description: <b>The subject of care.</b><br> 6381 * Type: <b>reference</b><br> 6382 * Path: <b>ClaimResponse.patient</b><br> 6383 * </p> 6384 */ 6385 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 6386 6387/** 6388 * Constant for fluent queries to be used to add include statements. Specifies 6389 * the path value of "<b>ClaimResponse:patient</b>". 6390 */ 6391 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ClaimResponse:patient").toLocked(); 6392 6393 /** 6394 * Search parameter: <b>payment-date</b> 6395 * <p> 6396 * Description: <b>The expected paymentDate</b><br> 6397 * Type: <b>date</b><br> 6398 * Path: <b>ClaimResponse.payment.date</b><br> 6399 * </p> 6400 */ 6401 @SearchParamDefinition(name="payment-date", path="ClaimResponse.payment.date", description="The expected paymentDate", type="date" ) 6402 public static final String SP_PAYMENT_DATE = "payment-date"; 6403 /** 6404 * <b>Fluent Client</b> search parameter constant for <b>payment-date</b> 6405 * <p> 6406 * Description: <b>The expected paymentDate</b><br> 6407 * Type: <b>date</b><br> 6408 * Path: <b>ClaimResponse.payment.date</b><br> 6409 * </p> 6410 */ 6411 public static final ca.uhn.fhir.rest.gclient.DateClientParam PAYMENT_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PAYMENT_DATE); 6412 6413 /** 6414 * Search parameter: <b>request-provider</b> 6415 * <p> 6416 * Description: <b>The Provider of the claim</b><br> 6417 * Type: <b>reference</b><br> 6418 * Path: <b>ClaimResponse.requestProvider</b><br> 6419 * </p> 6420 */ 6421 @SearchParamDefinition(name="request-provider", path="ClaimResponse.requestProvider", description="The Provider of the claim", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 6422 public static final String SP_REQUEST_PROVIDER = "request-provider"; 6423 /** 6424 * <b>Fluent Client</b> search parameter constant for <b>request-provider</b> 6425 * <p> 6426 * Description: <b>The Provider of the claim</b><br> 6427 * Type: <b>reference</b><br> 6428 * Path: <b>ClaimResponse.requestProvider</b><br> 6429 * </p> 6430 */ 6431 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST_PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST_PROVIDER); 6432 6433/** 6434 * Constant for fluent queries to be used to add include statements. Specifies 6435 * the path value of "<b>ClaimResponse:request-provider</b>". 6436 */ 6437 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST_PROVIDER = new ca.uhn.fhir.model.api.Include("ClaimResponse:request-provider").toLocked(); 6438 6439 /** 6440 * Search parameter: <b>outcome</b> 6441 * <p> 6442 * Description: <b>The processing outcome</b><br> 6443 * Type: <b>token</b><br> 6444 * Path: <b>ClaimResponse.outcome</b><br> 6445 * </p> 6446 */ 6447 @SearchParamDefinition(name="outcome", path="ClaimResponse.outcome", description="The processing outcome", type="token" ) 6448 public static final String SP_OUTCOME = "outcome"; 6449 /** 6450 * <b>Fluent Client</b> search parameter constant for <b>outcome</b> 6451 * <p> 6452 * Description: <b>The processing outcome</b><br> 6453 * Type: <b>token</b><br> 6454 * Path: <b>ClaimResponse.outcome</b><br> 6455 * </p> 6456 */ 6457 public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME); 6458 6459 6460}