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