001package org.hl7.fhir.instance.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 033import java.util.*; 034 035import org.hl7.fhir.exceptions.FHIRException; 036import org.hl7.fhir.instance.model.Enumerations.RemittanceOutcome; 037import org.hl7.fhir.instance.model.Enumerations.RemittanceOutcomeEnumFactory; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.*; 042/** 043 * This resource provides payment details and claim references supporting a bulk payment. 044 */ 045@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/Profile/PaymentReconciliation") 046public class PaymentReconciliation extends DomainResource { 047 048 @Block() 049 public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement { 050 /** 051 * Code to indicate the nature of the payment, adjustment, funds advance, etc. 052 */ 053 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) 054 @Description(shortDefinition="Type code", formalDefinition="Code to indicate the nature of the payment, adjustment, funds advance, etc." ) 055 protected Coding type; 056 057 /** 058 * The claim or financial resource. 059 */ 060 @Child(name = "request", type = {}, order=2, min=0, max=1, modifier=false, summary=true) 061 @Description(shortDefinition="Claim", formalDefinition="The claim or financial resource." ) 062 protected Reference request; 063 064 /** 065 * The actual object that is the target of the reference (The claim or financial resource.) 066 */ 067 protected Resource requestTarget; 068 069 /** 070 * The claim response resource. 071 */ 072 @Child(name = "responce", type = {}, order=3, min=0, max=1, modifier=false, summary=true) 073 @Description(shortDefinition="Claim Response", formalDefinition="The claim response resource." ) 074 protected Reference responce; 075 076 /** 077 * The actual object that is the target of the reference (The claim response resource.) 078 */ 079 protected Resource responceTarget; 080 081 /** 082 * The Organization which submitted the invoice or financial transaction. 083 */ 084 @Child(name = "submitter", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) 085 @Description(shortDefinition="Submitter", formalDefinition="The Organization which submitted the invoice or financial transaction." ) 086 protected Reference submitter; 087 088 /** 089 * The actual object that is the target of the reference (The Organization which submitted the invoice or financial transaction.) 090 */ 091 protected Organization submitterTarget; 092 093 /** 094 * The organization which is receiving the payment. 095 */ 096 @Child(name = "payee", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) 097 @Description(shortDefinition="Payee", formalDefinition="The organization which is receiving the payment." ) 098 protected Reference payee; 099 100 /** 101 * The actual object that is the target of the reference (The organization which is receiving the payment.) 102 */ 103 protected Organization payeeTarget; 104 105 /** 106 * The date of the invoice or financial resource. 107 */ 108 @Child(name = "date", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true) 109 @Description(shortDefinition="Invoice date", formalDefinition="The date of the invoice or financial resource." ) 110 protected DateType date; 111 112 /** 113 * Amount paid for this detail. 114 */ 115 @Child(name = "amount", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=true) 116 @Description(shortDefinition="Detail amount", formalDefinition="Amount paid for this detail." ) 117 protected Money amount; 118 119 private static final long serialVersionUID = -1644048062L; 120 121 /* 122 * Constructor 123 */ 124 public DetailsComponent() { 125 super(); 126 } 127 128 /* 129 * Constructor 130 */ 131 public DetailsComponent(Coding type) { 132 super(); 133 this.type = type; 134 } 135 136 /** 137 * @return {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.) 138 */ 139 public Coding getType() { 140 if (this.type == null) 141 if (Configuration.errorOnAutoCreate()) 142 throw new Error("Attempt to auto-create DetailsComponent.type"); 143 else if (Configuration.doAutoCreate()) 144 this.type = new Coding(); // cc 145 return this.type; 146 } 147 148 public boolean hasType() { 149 return this.type != null && !this.type.isEmpty(); 150 } 151 152 /** 153 * @param value {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.) 154 */ 155 public DetailsComponent setType(Coding value) { 156 this.type = value; 157 return this; 158 } 159 160 /** 161 * @return {@link #request} (The claim or financial resource.) 162 */ 163 public Reference getRequest() { 164 if (this.request == null) 165 if (Configuration.errorOnAutoCreate()) 166 throw new Error("Attempt to auto-create DetailsComponent.request"); 167 else if (Configuration.doAutoCreate()) 168 this.request = new Reference(); // cc 169 return this.request; 170 } 171 172 public boolean hasRequest() { 173 return this.request != null && !this.request.isEmpty(); 174 } 175 176 /** 177 * @param value {@link #request} (The claim or financial resource.) 178 */ 179 public DetailsComponent setRequest(Reference value) { 180 this.request = value; 181 return this; 182 } 183 184 /** 185 * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) 186 */ 187 public Resource getRequestTarget() { 188 return this.requestTarget; 189 } 190 191 /** 192 * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) 193 */ 194 public DetailsComponent setRequestTarget(Resource value) { 195 this.requestTarget = value; 196 return this; 197 } 198 199 /** 200 * @return {@link #responce} (The claim response resource.) 201 */ 202 public Reference getResponce() { 203 if (this.responce == null) 204 if (Configuration.errorOnAutoCreate()) 205 throw new Error("Attempt to auto-create DetailsComponent.responce"); 206 else if (Configuration.doAutoCreate()) 207 this.responce = new Reference(); // cc 208 return this.responce; 209 } 210 211 public boolean hasResponce() { 212 return this.responce != null && !this.responce.isEmpty(); 213 } 214 215 /** 216 * @param value {@link #responce} (The claim response resource.) 217 */ 218 public DetailsComponent setResponce(Reference value) { 219 this.responce = value; 220 return this; 221 } 222 223 /** 224 * @return {@link #responce} 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 claim response resource.) 225 */ 226 public Resource getResponceTarget() { 227 return this.responceTarget; 228 } 229 230 /** 231 * @param value {@link #responce} 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 claim response resource.) 232 */ 233 public DetailsComponent setResponceTarget(Resource value) { 234 this.responceTarget = value; 235 return this; 236 } 237 238 /** 239 * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.) 240 */ 241 public Reference getSubmitter() { 242 if (this.submitter == null) 243 if (Configuration.errorOnAutoCreate()) 244 throw new Error("Attempt to auto-create DetailsComponent.submitter"); 245 else if (Configuration.doAutoCreate()) 246 this.submitter = new Reference(); // cc 247 return this.submitter; 248 } 249 250 public boolean hasSubmitter() { 251 return this.submitter != null && !this.submitter.isEmpty(); 252 } 253 254 /** 255 * @param value {@link #submitter} (The Organization which submitted the invoice or financial transaction.) 256 */ 257 public DetailsComponent setSubmitter(Reference value) { 258 this.submitter = value; 259 return this; 260 } 261 262 /** 263 * @return {@link #submitter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) 264 */ 265 public Organization getSubmitterTarget() { 266 if (this.submitterTarget == null) 267 if (Configuration.errorOnAutoCreate()) 268 throw new Error("Attempt to auto-create DetailsComponent.submitter"); 269 else if (Configuration.doAutoCreate()) 270 this.submitterTarget = new Organization(); // aa 271 return this.submitterTarget; 272 } 273 274 /** 275 * @param value {@link #submitter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) 276 */ 277 public DetailsComponent setSubmitterTarget(Organization value) { 278 this.submitterTarget = value; 279 return this; 280 } 281 282 /** 283 * @return {@link #payee} (The organization which is receiving the payment.) 284 */ 285 public Reference getPayee() { 286 if (this.payee == null) 287 if (Configuration.errorOnAutoCreate()) 288 throw new Error("Attempt to auto-create DetailsComponent.payee"); 289 else if (Configuration.doAutoCreate()) 290 this.payee = new Reference(); // cc 291 return this.payee; 292 } 293 294 public boolean hasPayee() { 295 return this.payee != null && !this.payee.isEmpty(); 296 } 297 298 /** 299 * @param value {@link #payee} (The organization which is receiving the payment.) 300 */ 301 public DetailsComponent setPayee(Reference value) { 302 this.payee = value; 303 return this; 304 } 305 306 /** 307 * @return {@link #payee} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) 308 */ 309 public Organization getPayeeTarget() { 310 if (this.payeeTarget == null) 311 if (Configuration.errorOnAutoCreate()) 312 throw new Error("Attempt to auto-create DetailsComponent.payee"); 313 else if (Configuration.doAutoCreate()) 314 this.payeeTarget = new Organization(); // aa 315 return this.payeeTarget; 316 } 317 318 /** 319 * @param value {@link #payee} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) 320 */ 321 public DetailsComponent setPayeeTarget(Organization value) { 322 this.payeeTarget = value; 323 return this; 324 } 325 326 /** 327 * @return {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 328 */ 329 public DateType getDateElement() { 330 if (this.date == null) 331 if (Configuration.errorOnAutoCreate()) 332 throw new Error("Attempt to auto-create DetailsComponent.date"); 333 else if (Configuration.doAutoCreate()) 334 this.date = new DateType(); // bb 335 return this.date; 336 } 337 338 public boolean hasDateElement() { 339 return this.date != null && !this.date.isEmpty(); 340 } 341 342 public boolean hasDate() { 343 return this.date != null && !this.date.isEmpty(); 344 } 345 346 /** 347 * @param value {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 348 */ 349 public DetailsComponent setDateElement(DateType value) { 350 this.date = value; 351 return this; 352 } 353 354 /** 355 * @return The date of the invoice or financial resource. 356 */ 357 public Date getDate() { 358 return this.date == null ? null : this.date.getValue(); 359 } 360 361 /** 362 * @param value The date of the invoice or financial resource. 363 */ 364 public DetailsComponent setDate(Date value) { 365 if (value == null) 366 this.date = null; 367 else { 368 if (this.date == null) 369 this.date = new DateType(); 370 this.date.setValue(value); 371 } 372 return this; 373 } 374 375 /** 376 * @return {@link #amount} (Amount paid for this detail.) 377 */ 378 public Money getAmount() { 379 if (this.amount == null) 380 if (Configuration.errorOnAutoCreate()) 381 throw new Error("Attempt to auto-create DetailsComponent.amount"); 382 else if (Configuration.doAutoCreate()) 383 this.amount = new Money(); // cc 384 return this.amount; 385 } 386 387 public boolean hasAmount() { 388 return this.amount != null && !this.amount.isEmpty(); 389 } 390 391 /** 392 * @param value {@link #amount} (Amount paid for this detail.) 393 */ 394 public DetailsComponent setAmount(Money value) { 395 this.amount = value; 396 return this; 397 } 398 399 protected void listChildren(List<Property> childrenList) { 400 super.listChildren(childrenList); 401 childrenList.add(new Property("type", "Coding", "Code to indicate the nature of the payment, adjustment, funds advance, etc.", 0, java.lang.Integer.MAX_VALUE, type)); 402 childrenList.add(new Property("request", "Reference(Any)", "The claim or financial resource.", 0, java.lang.Integer.MAX_VALUE, request)); 403 childrenList.add(new Property("responce", "Reference(Any)", "The claim response resource.", 0, java.lang.Integer.MAX_VALUE, responce)); 404 childrenList.add(new Property("submitter", "Reference(Organization)", "The Organization which submitted the invoice or financial transaction.", 0, java.lang.Integer.MAX_VALUE, submitter)); 405 childrenList.add(new Property("payee", "Reference(Organization)", "The organization which is receiving the payment.", 0, java.lang.Integer.MAX_VALUE, payee)); 406 childrenList.add(new Property("date", "date", "The date of the invoice or financial resource.", 0, java.lang.Integer.MAX_VALUE, date)); 407 childrenList.add(new Property("amount", "Money", "Amount paid for this detail.", 0, java.lang.Integer.MAX_VALUE, amount)); 408 } 409 410 @Override 411 public void setProperty(String name, Base value) throws FHIRException { 412 if (name.equals("type")) 413 this.type = castToCoding(value); // Coding 414 else if (name.equals("request")) 415 this.request = castToReference(value); // Reference 416 else if (name.equals("responce")) 417 this.responce = castToReference(value); // Reference 418 else if (name.equals("submitter")) 419 this.submitter = castToReference(value); // Reference 420 else if (name.equals("payee")) 421 this.payee = castToReference(value); // Reference 422 else if (name.equals("date")) 423 this.date = castToDate(value); // DateType 424 else if (name.equals("amount")) 425 this.amount = castToMoney(value); // Money 426 else 427 super.setProperty(name, value); 428 } 429 430 @Override 431 public Base addChild(String name) throws FHIRException { 432 if (name.equals("type")) { 433 this.type = new Coding(); 434 return this.type; 435 } 436 else if (name.equals("request")) { 437 this.request = new Reference(); 438 return this.request; 439 } 440 else if (name.equals("responce")) { 441 this.responce = new Reference(); 442 return this.responce; 443 } 444 else if (name.equals("submitter")) { 445 this.submitter = new Reference(); 446 return this.submitter; 447 } 448 else if (name.equals("payee")) { 449 this.payee = new Reference(); 450 return this.payee; 451 } 452 else if (name.equals("date")) { 453 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.date"); 454 } 455 else if (name.equals("amount")) { 456 this.amount = new Money(); 457 return this.amount; 458 } 459 else 460 return super.addChild(name); 461 } 462 463 public DetailsComponent copy() { 464 DetailsComponent dst = new DetailsComponent(); 465 copyValues(dst); 466 dst.type = type == null ? null : type.copy(); 467 dst.request = request == null ? null : request.copy(); 468 dst.responce = responce == null ? null : responce.copy(); 469 dst.submitter = submitter == null ? null : submitter.copy(); 470 dst.payee = payee == null ? null : payee.copy(); 471 dst.date = date == null ? null : date.copy(); 472 dst.amount = amount == null ? null : amount.copy(); 473 return dst; 474 } 475 476 @Override 477 public boolean equalsDeep(Base other) { 478 if (!super.equalsDeep(other)) 479 return false; 480 if (!(other instanceof DetailsComponent)) 481 return false; 482 DetailsComponent o = (DetailsComponent) other; 483 return compareDeep(type, o.type, true) && compareDeep(request, o.request, true) && compareDeep(responce, o.responce, true) 484 && compareDeep(submitter, o.submitter, true) && compareDeep(payee, o.payee, true) && compareDeep(date, o.date, true) 485 && compareDeep(amount, o.amount, true); 486 } 487 488 @Override 489 public boolean equalsShallow(Base other) { 490 if (!super.equalsShallow(other)) 491 return false; 492 if (!(other instanceof DetailsComponent)) 493 return false; 494 DetailsComponent o = (DetailsComponent) other; 495 return compareValues(date, o.date, true); 496 } 497 498 public boolean isEmpty() { 499 return super.isEmpty() && (type == null || type.isEmpty()) && (request == null || request.isEmpty()) 500 && (responce == null || responce.isEmpty()) && (submitter == null || submitter.isEmpty()) 501 && (payee == null || payee.isEmpty()) && (date == null || date.isEmpty()) && (amount == null || amount.isEmpty()) 502 ; 503 } 504 505 public String fhirType() { 506 return "PaymentReconciliation.detail"; 507 508 } 509 510 } 511 512 @Block() 513 public static class NotesComponent extends BackboneElement implements IBaseBackboneElement { 514 /** 515 * The note purpose: Print/Display. 516 */ 517 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) 518 @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) 519 protected Coding type; 520 521 /** 522 * The note text. 523 */ 524 @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 525 @Description(shortDefinition="Notes text", formalDefinition="The note text." ) 526 protected StringType text; 527 528 private static final long serialVersionUID = 129959202L; 529 530 /* 531 * Constructor 532 */ 533 public NotesComponent() { 534 super(); 535 } 536 537 /** 538 * @return {@link #type} (The note purpose: Print/Display.) 539 */ 540 public Coding getType() { 541 if (this.type == null) 542 if (Configuration.errorOnAutoCreate()) 543 throw new Error("Attempt to auto-create NotesComponent.type"); 544 else if (Configuration.doAutoCreate()) 545 this.type = new Coding(); // cc 546 return this.type; 547 } 548 549 public boolean hasType() { 550 return this.type != null && !this.type.isEmpty(); 551 } 552 553 /** 554 * @param value {@link #type} (The note purpose: Print/Display.) 555 */ 556 public NotesComponent setType(Coding value) { 557 this.type = value; 558 return this; 559 } 560 561 /** 562 * @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 563 */ 564 public StringType getTextElement() { 565 if (this.text == null) 566 if (Configuration.errorOnAutoCreate()) 567 throw new Error("Attempt to auto-create NotesComponent.text"); 568 else if (Configuration.doAutoCreate()) 569 this.text = new StringType(); // bb 570 return this.text; 571 } 572 573 public boolean hasTextElement() { 574 return this.text != null && !this.text.isEmpty(); 575 } 576 577 public boolean hasText() { 578 return this.text != null && !this.text.isEmpty(); 579 } 580 581 /** 582 * @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 583 */ 584 public NotesComponent setTextElement(StringType value) { 585 this.text = value; 586 return this; 587 } 588 589 /** 590 * @return The note text. 591 */ 592 public String getText() { 593 return this.text == null ? null : this.text.getValue(); 594 } 595 596 /** 597 * @param value The note text. 598 */ 599 public NotesComponent setText(String value) { 600 if (Utilities.noString(value)) 601 this.text = null; 602 else { 603 if (this.text == null) 604 this.text = new StringType(); 605 this.text.setValue(value); 606 } 607 return this; 608 } 609 610 protected void listChildren(List<Property> childrenList) { 611 super.listChildren(childrenList); 612 childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); 613 childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); 614 } 615 616 @Override 617 public void setProperty(String name, Base value) throws FHIRException { 618 if (name.equals("type")) 619 this.type = castToCoding(value); // Coding 620 else if (name.equals("text")) 621 this.text = castToString(value); // StringType 622 else 623 super.setProperty(name, value); 624 } 625 626 @Override 627 public Base addChild(String name) throws FHIRException { 628 if (name.equals("type")) { 629 this.type = new Coding(); 630 return this.type; 631 } 632 else if (name.equals("text")) { 633 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.text"); 634 } 635 else 636 return super.addChild(name); 637 } 638 639 public NotesComponent copy() { 640 NotesComponent dst = new NotesComponent(); 641 copyValues(dst); 642 dst.type = type == null ? null : type.copy(); 643 dst.text = text == null ? null : text.copy(); 644 return dst; 645 } 646 647 @Override 648 public boolean equalsDeep(Base other) { 649 if (!super.equalsDeep(other)) 650 return false; 651 if (!(other instanceof NotesComponent)) 652 return false; 653 NotesComponent o = (NotesComponent) other; 654 return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); 655 } 656 657 @Override 658 public boolean equalsShallow(Base other) { 659 if (!super.equalsShallow(other)) 660 return false; 661 if (!(other instanceof NotesComponent)) 662 return false; 663 NotesComponent o = (NotesComponent) other; 664 return compareValues(text, o.text, true); 665 } 666 667 public boolean isEmpty() { 668 return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) 669 ; 670 } 671 672 public String fhirType() { 673 return "PaymentReconciliation.note"; 674 675 } 676 677 } 678 679 /** 680 * The Response business identifier. 681 */ 682 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 683 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 684 protected List<Identifier> identifier; 685 686 /** 687 * Original request resource reference. 688 */ 689 @Child(name = "request", type = {ProcessRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) 690 @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) 691 protected Reference request; 692 693 /** 694 * The actual object that is the target of the reference (Original request resource reference.) 695 */ 696 protected ProcessRequest requestTarget; 697 698 /** 699 * Transaction status: error, complete. 700 */ 701 @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 702 @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) 703 protected Enumeration<RemittanceOutcome> outcome; 704 705 /** 706 * A description of the status of the adjudication. 707 */ 708 @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 709 @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) 710 protected StringType disposition; 711 712 /** 713 * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. 714 */ 715 @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) 716 @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." ) 717 protected Coding ruleset; 718 719 /** 720 * The style (standard) and version of the original material which was converted into this resource. 721 */ 722 @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) 723 @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) 724 protected Coding originalRuleset; 725 726 /** 727 * The date when the enclosed suite of services were performed or completed. 728 */ 729 @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 730 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 731 protected DateTimeType created; 732 733 /** 734 * The period of time for which payments have been gathered into this bulk payment for settlement. 735 */ 736 @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 737 @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) 738 protected Period period; 739 740 /** 741 * The Insurer who produced this adjudicated response. 742 */ 743 @Child(name = "organization", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) 744 @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) 745 protected Reference organization; 746 747 /** 748 * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) 749 */ 750 protected Organization organizationTarget; 751 752 /** 753 * The practitioner who is responsible for the services rendered to the patient. 754 */ 755 @Child(name = "requestProvider", type = {Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) 756 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 757 protected Reference requestProvider; 758 759 /** 760 * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) 761 */ 762 protected Practitioner requestProviderTarget; 763 764 /** 765 * The organization which is responsible for the services rendered to the patient. 766 */ 767 @Child(name = "requestOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) 768 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) 769 protected Reference requestOrganization; 770 771 /** 772 * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) 773 */ 774 protected Organization requestOrganizationTarget; 775 776 /** 777 * List of individual settlement amounts and the corresponding transaction. 778 */ 779 @Child(name = "detail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 780 @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." ) 781 protected List<DetailsComponent> detail; 782 783 /** 784 * The form to be used for printing the content. 785 */ 786 @Child(name = "form", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) 787 @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) 788 protected Coding form; 789 790 /** 791 * Total payment amount. 792 */ 793 @Child(name = "total", type = {Money.class}, order=13, min=1, max=1, modifier=false, summary=true) 794 @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." ) 795 protected Money total; 796 797 /** 798 * Suite of notes. 799 */ 800 @Child(name = "note", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 801 @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) 802 protected List<NotesComponent> note; 803 804 private static final long serialVersionUID = 454328025L; 805 806 /* 807 * Constructor 808 */ 809 public PaymentReconciliation() { 810 super(); 811 } 812 813 /* 814 * Constructor 815 */ 816 public PaymentReconciliation(Money total) { 817 super(); 818 this.total = total; 819 } 820 821 /** 822 * @return {@link #identifier} (The Response business identifier.) 823 */ 824 public List<Identifier> getIdentifier() { 825 if (this.identifier == null) 826 this.identifier = new ArrayList<Identifier>(); 827 return this.identifier; 828 } 829 830 public boolean hasIdentifier() { 831 if (this.identifier == null) 832 return false; 833 for (Identifier item : this.identifier) 834 if (!item.isEmpty()) 835 return true; 836 return false; 837 } 838 839 /** 840 * @return {@link #identifier} (The Response business identifier.) 841 */ 842 // syntactic sugar 843 public Identifier addIdentifier() { //3 844 Identifier t = new Identifier(); 845 if (this.identifier == null) 846 this.identifier = new ArrayList<Identifier>(); 847 this.identifier.add(t); 848 return t; 849 } 850 851 // syntactic sugar 852 public PaymentReconciliation addIdentifier(Identifier t) { //3 853 if (t == null) 854 return this; 855 if (this.identifier == null) 856 this.identifier = new ArrayList<Identifier>(); 857 this.identifier.add(t); 858 return this; 859 } 860 861 /** 862 * @return {@link #request} (Original request resource reference.) 863 */ 864 public Reference getRequest() { 865 if (this.request == null) 866 if (Configuration.errorOnAutoCreate()) 867 throw new Error("Attempt to auto-create PaymentReconciliation.request"); 868 else if (Configuration.doAutoCreate()) 869 this.request = new Reference(); // cc 870 return this.request; 871 } 872 873 public boolean hasRequest() { 874 return this.request != null && !this.request.isEmpty(); 875 } 876 877 /** 878 * @param value {@link #request} (Original request resource reference.) 879 */ 880 public PaymentReconciliation setRequest(Reference value) { 881 this.request = value; 882 return this; 883 } 884 885 /** 886 * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) 887 */ 888 public ProcessRequest getRequestTarget() { 889 if (this.requestTarget == null) 890 if (Configuration.errorOnAutoCreate()) 891 throw new Error("Attempt to auto-create PaymentReconciliation.request"); 892 else if (Configuration.doAutoCreate()) 893 this.requestTarget = new ProcessRequest(); // aa 894 return this.requestTarget; 895 } 896 897 /** 898 * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) 899 */ 900 public PaymentReconciliation setRequestTarget(ProcessRequest value) { 901 this.requestTarget = value; 902 return this; 903 } 904 905 /** 906 * @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 907 */ 908 public Enumeration<RemittanceOutcome> getOutcomeElement() { 909 if (this.outcome == null) 910 if (Configuration.errorOnAutoCreate()) 911 throw new Error("Attempt to auto-create PaymentReconciliation.outcome"); 912 else if (Configuration.doAutoCreate()) 913 this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); // bb 914 return this.outcome; 915 } 916 917 public boolean hasOutcomeElement() { 918 return this.outcome != null && !this.outcome.isEmpty(); 919 } 920 921 public boolean hasOutcome() { 922 return this.outcome != null && !this.outcome.isEmpty(); 923 } 924 925 /** 926 * @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 927 */ 928 public PaymentReconciliation setOutcomeElement(Enumeration<RemittanceOutcome> value) { 929 this.outcome = value; 930 return this; 931 } 932 933 /** 934 * @return Transaction status: error, complete. 935 */ 936 public RemittanceOutcome getOutcome() { 937 return this.outcome == null ? null : this.outcome.getValue(); 938 } 939 940 /** 941 * @param value Transaction status: error, complete. 942 */ 943 public PaymentReconciliation setOutcome(RemittanceOutcome value) { 944 if (value == null) 945 this.outcome = null; 946 else { 947 if (this.outcome == null) 948 this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); 949 this.outcome.setValue(value); 950 } 951 return this; 952 } 953 954 /** 955 * @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 956 */ 957 public StringType getDispositionElement() { 958 if (this.disposition == null) 959 if (Configuration.errorOnAutoCreate()) 960 throw new Error("Attempt to auto-create PaymentReconciliation.disposition"); 961 else if (Configuration.doAutoCreate()) 962 this.disposition = new StringType(); // bb 963 return this.disposition; 964 } 965 966 public boolean hasDispositionElement() { 967 return this.disposition != null && !this.disposition.isEmpty(); 968 } 969 970 public boolean hasDisposition() { 971 return this.disposition != null && !this.disposition.isEmpty(); 972 } 973 974 /** 975 * @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 976 */ 977 public PaymentReconciliation setDispositionElement(StringType value) { 978 this.disposition = value; 979 return this; 980 } 981 982 /** 983 * @return A description of the status of the adjudication. 984 */ 985 public String getDisposition() { 986 return this.disposition == null ? null : this.disposition.getValue(); 987 } 988 989 /** 990 * @param value A description of the status of the adjudication. 991 */ 992 public PaymentReconciliation setDisposition(String value) { 993 if (Utilities.noString(value)) 994 this.disposition = null; 995 else { 996 if (this.disposition == null) 997 this.disposition = new StringType(); 998 this.disposition.setValue(value); 999 } 1000 return this; 1001 } 1002 1003 /** 1004 * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 1005 */ 1006 public Coding getRuleset() { 1007 if (this.ruleset == null) 1008 if (Configuration.errorOnAutoCreate()) 1009 throw new Error("Attempt to auto-create PaymentReconciliation.ruleset"); 1010 else if (Configuration.doAutoCreate()) 1011 this.ruleset = new Coding(); // cc 1012 return this.ruleset; 1013 } 1014 1015 public boolean hasRuleset() { 1016 return this.ruleset != null && !this.ruleset.isEmpty(); 1017 } 1018 1019 /** 1020 * @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.) 1021 */ 1022 public PaymentReconciliation setRuleset(Coding value) { 1023 this.ruleset = value; 1024 return this; 1025 } 1026 1027 /** 1028 * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 1029 */ 1030 public Coding getOriginalRuleset() { 1031 if (this.originalRuleset == null) 1032 if (Configuration.errorOnAutoCreate()) 1033 throw new Error("Attempt to auto-create PaymentReconciliation.originalRuleset"); 1034 else if (Configuration.doAutoCreate()) 1035 this.originalRuleset = new Coding(); // cc 1036 return this.originalRuleset; 1037 } 1038 1039 public boolean hasOriginalRuleset() { 1040 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 1041 } 1042 1043 /** 1044 * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 1045 */ 1046 public PaymentReconciliation setOriginalRuleset(Coding value) { 1047 this.originalRuleset = value; 1048 return this; 1049 } 1050 1051 /** 1052 * @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 1053 */ 1054 public DateTimeType getCreatedElement() { 1055 if (this.created == null) 1056 if (Configuration.errorOnAutoCreate()) 1057 throw new Error("Attempt to auto-create PaymentReconciliation.created"); 1058 else if (Configuration.doAutoCreate()) 1059 this.created = new DateTimeType(); // bb 1060 return this.created; 1061 } 1062 1063 public boolean hasCreatedElement() { 1064 return this.created != null && !this.created.isEmpty(); 1065 } 1066 1067 public boolean hasCreated() { 1068 return this.created != null && !this.created.isEmpty(); 1069 } 1070 1071 /** 1072 * @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 1073 */ 1074 public PaymentReconciliation setCreatedElement(DateTimeType value) { 1075 this.created = value; 1076 return this; 1077 } 1078 1079 /** 1080 * @return The date when the enclosed suite of services were performed or completed. 1081 */ 1082 public Date getCreated() { 1083 return this.created == null ? null : this.created.getValue(); 1084 } 1085 1086 /** 1087 * @param value The date when the enclosed suite of services were performed or completed. 1088 */ 1089 public PaymentReconciliation setCreated(Date value) { 1090 if (value == null) 1091 this.created = null; 1092 else { 1093 if (this.created == null) 1094 this.created = new DateTimeType(); 1095 this.created.setValue(value); 1096 } 1097 return this; 1098 } 1099 1100 /** 1101 * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) 1102 */ 1103 public Period getPeriod() { 1104 if (this.period == null) 1105 if (Configuration.errorOnAutoCreate()) 1106 throw new Error("Attempt to auto-create PaymentReconciliation.period"); 1107 else if (Configuration.doAutoCreate()) 1108 this.period = new Period(); // cc 1109 return this.period; 1110 } 1111 1112 public boolean hasPeriod() { 1113 return this.period != null && !this.period.isEmpty(); 1114 } 1115 1116 /** 1117 * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) 1118 */ 1119 public PaymentReconciliation setPeriod(Period value) { 1120 this.period = value; 1121 return this; 1122 } 1123 1124 /** 1125 * @return {@link #organization} (The Insurer who produced this adjudicated response.) 1126 */ 1127 public Reference getOrganization() { 1128 if (this.organization == null) 1129 if (Configuration.errorOnAutoCreate()) 1130 throw new Error("Attempt to auto-create PaymentReconciliation.organization"); 1131 else if (Configuration.doAutoCreate()) 1132 this.organization = new Reference(); // cc 1133 return this.organization; 1134 } 1135 1136 public boolean hasOrganization() { 1137 return this.organization != null && !this.organization.isEmpty(); 1138 } 1139 1140 /** 1141 * @param value {@link #organization} (The Insurer who produced this adjudicated response.) 1142 */ 1143 public PaymentReconciliation setOrganization(Reference value) { 1144 this.organization = value; 1145 return this; 1146 } 1147 1148 /** 1149 * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) 1150 */ 1151 public Organization getOrganizationTarget() { 1152 if (this.organizationTarget == null) 1153 if (Configuration.errorOnAutoCreate()) 1154 throw new Error("Attempt to auto-create PaymentReconciliation.organization"); 1155 else if (Configuration.doAutoCreate()) 1156 this.organizationTarget = new Organization(); // aa 1157 return this.organizationTarget; 1158 } 1159 1160 /** 1161 * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) 1162 */ 1163 public PaymentReconciliation setOrganizationTarget(Organization value) { 1164 this.organizationTarget = value; 1165 return this; 1166 } 1167 1168 /** 1169 * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 1170 */ 1171 public Reference getRequestProvider() { 1172 if (this.requestProvider == null) 1173 if (Configuration.errorOnAutoCreate()) 1174 throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); 1175 else if (Configuration.doAutoCreate()) 1176 this.requestProvider = new Reference(); // cc 1177 return this.requestProvider; 1178 } 1179 1180 public boolean hasRequestProvider() { 1181 return this.requestProvider != null && !this.requestProvider.isEmpty(); 1182 } 1183 1184 /** 1185 * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 1186 */ 1187 public PaymentReconciliation setRequestProvider(Reference value) { 1188 this.requestProvider = value; 1189 return this; 1190 } 1191 1192 /** 1193 * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) 1194 */ 1195 public Practitioner getRequestProviderTarget() { 1196 if (this.requestProviderTarget == null) 1197 if (Configuration.errorOnAutoCreate()) 1198 throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); 1199 else if (Configuration.doAutoCreate()) 1200 this.requestProviderTarget = new Practitioner(); // aa 1201 return this.requestProviderTarget; 1202 } 1203 1204 /** 1205 * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) 1206 */ 1207 public PaymentReconciliation setRequestProviderTarget(Practitioner value) { 1208 this.requestProviderTarget = value; 1209 return this; 1210 } 1211 1212 /** 1213 * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 1214 */ 1215 public Reference getRequestOrganization() { 1216 if (this.requestOrganization == null) 1217 if (Configuration.errorOnAutoCreate()) 1218 throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); 1219 else if (Configuration.doAutoCreate()) 1220 this.requestOrganization = new Reference(); // cc 1221 return this.requestOrganization; 1222 } 1223 1224 public boolean hasRequestOrganization() { 1225 return this.requestOrganization != null && !this.requestOrganization.isEmpty(); 1226 } 1227 1228 /** 1229 * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) 1230 */ 1231 public PaymentReconciliation setRequestOrganization(Reference value) { 1232 this.requestOrganization = value; 1233 return this; 1234 } 1235 1236 /** 1237 * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) 1238 */ 1239 public Organization getRequestOrganizationTarget() { 1240 if (this.requestOrganizationTarget == null) 1241 if (Configuration.errorOnAutoCreate()) 1242 throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); 1243 else if (Configuration.doAutoCreate()) 1244 this.requestOrganizationTarget = new Organization(); // aa 1245 return this.requestOrganizationTarget; 1246 } 1247 1248 /** 1249 * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) 1250 */ 1251 public PaymentReconciliation setRequestOrganizationTarget(Organization value) { 1252 this.requestOrganizationTarget = value; 1253 return this; 1254 } 1255 1256 /** 1257 * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.) 1258 */ 1259 public List<DetailsComponent> getDetail() { 1260 if (this.detail == null) 1261 this.detail = new ArrayList<DetailsComponent>(); 1262 return this.detail; 1263 } 1264 1265 public boolean hasDetail() { 1266 if (this.detail == null) 1267 return false; 1268 for (DetailsComponent item : this.detail) 1269 if (!item.isEmpty()) 1270 return true; 1271 return false; 1272 } 1273 1274 /** 1275 * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.) 1276 */ 1277 // syntactic sugar 1278 public DetailsComponent addDetail() { //3 1279 DetailsComponent t = new DetailsComponent(); 1280 if (this.detail == null) 1281 this.detail = new ArrayList<DetailsComponent>(); 1282 this.detail.add(t); 1283 return t; 1284 } 1285 1286 // syntactic sugar 1287 public PaymentReconciliation addDetail(DetailsComponent t) { //3 1288 if (t == null) 1289 return this; 1290 if (this.detail == null) 1291 this.detail = new ArrayList<DetailsComponent>(); 1292 this.detail.add(t); 1293 return this; 1294 } 1295 1296 /** 1297 * @return {@link #form} (The form to be used for printing the content.) 1298 */ 1299 public Coding getForm() { 1300 if (this.form == null) 1301 if (Configuration.errorOnAutoCreate()) 1302 throw new Error("Attempt to auto-create PaymentReconciliation.form"); 1303 else if (Configuration.doAutoCreate()) 1304 this.form = new Coding(); // cc 1305 return this.form; 1306 } 1307 1308 public boolean hasForm() { 1309 return this.form != null && !this.form.isEmpty(); 1310 } 1311 1312 /** 1313 * @param value {@link #form} (The form to be used for printing the content.) 1314 */ 1315 public PaymentReconciliation setForm(Coding value) { 1316 this.form = value; 1317 return this; 1318 } 1319 1320 /** 1321 * @return {@link #total} (Total payment amount.) 1322 */ 1323 public Money getTotal() { 1324 if (this.total == null) 1325 if (Configuration.errorOnAutoCreate()) 1326 throw new Error("Attempt to auto-create PaymentReconciliation.total"); 1327 else if (Configuration.doAutoCreate()) 1328 this.total = new Money(); // cc 1329 return this.total; 1330 } 1331 1332 public boolean hasTotal() { 1333 return this.total != null && !this.total.isEmpty(); 1334 } 1335 1336 /** 1337 * @param value {@link #total} (Total payment amount.) 1338 */ 1339 public PaymentReconciliation setTotal(Money value) { 1340 this.total = value; 1341 return this; 1342 } 1343 1344 /** 1345 * @return {@link #note} (Suite of notes.) 1346 */ 1347 public List<NotesComponent> getNote() { 1348 if (this.note == null) 1349 this.note = new ArrayList<NotesComponent>(); 1350 return this.note; 1351 } 1352 1353 public boolean hasNote() { 1354 if (this.note == null) 1355 return false; 1356 for (NotesComponent item : this.note) 1357 if (!item.isEmpty()) 1358 return true; 1359 return false; 1360 } 1361 1362 /** 1363 * @return {@link #note} (Suite of notes.) 1364 */ 1365 // syntactic sugar 1366 public NotesComponent addNote() { //3 1367 NotesComponent t = new NotesComponent(); 1368 if (this.note == null) 1369 this.note = new ArrayList<NotesComponent>(); 1370 this.note.add(t); 1371 return t; 1372 } 1373 1374 // syntactic sugar 1375 public PaymentReconciliation addNote(NotesComponent t) { //3 1376 if (t == null) 1377 return this; 1378 if (this.note == null) 1379 this.note = new ArrayList<NotesComponent>(); 1380 this.note.add(t); 1381 return this; 1382 } 1383 1384 protected void listChildren(List<Property> childrenList) { 1385 super.listChildren(childrenList); 1386 childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1387 childrenList.add(new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); 1388 childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); 1389 childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); 1390 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)); 1391 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)); 1392 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)); 1393 childrenList.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, java.lang.Integer.MAX_VALUE, period)); 1394 childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); 1395 childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); 1396 childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); 1397 childrenList.add(new Property("detail", "", "List of individual settlement amounts and the corresponding transaction.", 0, java.lang.Integer.MAX_VALUE, detail)); 1398 childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); 1399 childrenList.add(new Property("total", "Money", "Total payment amount.", 0, java.lang.Integer.MAX_VALUE, total)); 1400 childrenList.add(new Property("note", "", "Suite of notes.", 0, java.lang.Integer.MAX_VALUE, note)); 1401 } 1402 1403 @Override 1404 public void setProperty(String name, Base value) throws FHIRException { 1405 if (name.equals("identifier")) 1406 this.getIdentifier().add(castToIdentifier(value)); 1407 else if (name.equals("request")) 1408 this.request = castToReference(value); // Reference 1409 else if (name.equals("outcome")) 1410 this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome> 1411 else if (name.equals("disposition")) 1412 this.disposition = castToString(value); // StringType 1413 else if (name.equals("ruleset")) 1414 this.ruleset = castToCoding(value); // Coding 1415 else if (name.equals("originalRuleset")) 1416 this.originalRuleset = castToCoding(value); // Coding 1417 else if (name.equals("created")) 1418 this.created = castToDateTime(value); // DateTimeType 1419 else if (name.equals("period")) 1420 this.period = castToPeriod(value); // Period 1421 else if (name.equals("organization")) 1422 this.organization = castToReference(value); // Reference 1423 else if (name.equals("requestProvider")) 1424 this.requestProvider = castToReference(value); // Reference 1425 else if (name.equals("requestOrganization")) 1426 this.requestOrganization = castToReference(value); // Reference 1427 else if (name.equals("detail")) 1428 this.getDetail().add((DetailsComponent) value); 1429 else if (name.equals("form")) 1430 this.form = castToCoding(value); // Coding 1431 else if (name.equals("total")) 1432 this.total = castToMoney(value); // Money 1433 else if (name.equals("note")) 1434 this.getNote().add((NotesComponent) value); 1435 else 1436 super.setProperty(name, value); 1437 } 1438 1439 @Override 1440 public Base addChild(String name) throws FHIRException { 1441 if (name.equals("identifier")) { 1442 return addIdentifier(); 1443 } 1444 else if (name.equals("request")) { 1445 this.request = new Reference(); 1446 return this.request; 1447 } 1448 else if (name.equals("outcome")) { 1449 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome"); 1450 } 1451 else if (name.equals("disposition")) { 1452 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition"); 1453 } 1454 else if (name.equals("ruleset")) { 1455 this.ruleset = new Coding(); 1456 return this.ruleset; 1457 } 1458 else if (name.equals("originalRuleset")) { 1459 this.originalRuleset = new Coding(); 1460 return this.originalRuleset; 1461 } 1462 else if (name.equals("created")) { 1463 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created"); 1464 } 1465 else if (name.equals("period")) { 1466 this.period = new Period(); 1467 return this.period; 1468 } 1469 else if (name.equals("organization")) { 1470 this.organization = new Reference(); 1471 return this.organization; 1472 } 1473 else if (name.equals("requestProvider")) { 1474 this.requestProvider = new Reference(); 1475 return this.requestProvider; 1476 } 1477 else if (name.equals("requestOrganization")) { 1478 this.requestOrganization = new Reference(); 1479 return this.requestOrganization; 1480 } 1481 else if (name.equals("detail")) { 1482 return addDetail(); 1483 } 1484 else if (name.equals("form")) { 1485 this.form = new Coding(); 1486 return this.form; 1487 } 1488 else if (name.equals("total")) { 1489 this.total = new Money(); 1490 return this.total; 1491 } 1492 else if (name.equals("note")) { 1493 return addNote(); 1494 } 1495 else 1496 return super.addChild(name); 1497 } 1498 1499 public String fhirType() { 1500 return "PaymentReconciliation"; 1501 1502 } 1503 1504 public PaymentReconciliation copy() { 1505 PaymentReconciliation dst = new PaymentReconciliation(); 1506 copyValues(dst); 1507 if (identifier != null) { 1508 dst.identifier = new ArrayList<Identifier>(); 1509 for (Identifier i : identifier) 1510 dst.identifier.add(i.copy()); 1511 }; 1512 dst.request = request == null ? null : request.copy(); 1513 dst.outcome = outcome == null ? null : outcome.copy(); 1514 dst.disposition = disposition == null ? null : disposition.copy(); 1515 dst.ruleset = ruleset == null ? null : ruleset.copy(); 1516 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 1517 dst.created = created == null ? null : created.copy(); 1518 dst.period = period == null ? null : period.copy(); 1519 dst.organization = organization == null ? null : organization.copy(); 1520 dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); 1521 dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); 1522 if (detail != null) { 1523 dst.detail = new ArrayList<DetailsComponent>(); 1524 for (DetailsComponent i : detail) 1525 dst.detail.add(i.copy()); 1526 }; 1527 dst.form = form == null ? null : form.copy(); 1528 dst.total = total == null ? null : total.copy(); 1529 if (note != null) { 1530 dst.note = new ArrayList<NotesComponent>(); 1531 for (NotesComponent i : note) 1532 dst.note.add(i.copy()); 1533 }; 1534 return dst; 1535 } 1536 1537 protected PaymentReconciliation typedCopy() { 1538 return copy(); 1539 } 1540 1541 @Override 1542 public boolean equalsDeep(Base other) { 1543 if (!super.equalsDeep(other)) 1544 return false; 1545 if (!(other instanceof PaymentReconciliation)) 1546 return false; 1547 PaymentReconciliation o = (PaymentReconciliation) other; 1548 return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) 1549 && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) 1550 && compareDeep(created, o.created, true) && compareDeep(period, o.period, true) && compareDeep(organization, o.organization, true) 1551 && compareDeep(requestProvider, o.requestProvider, true) && compareDeep(requestOrganization, o.requestOrganization, true) 1552 && compareDeep(detail, o.detail, true) && compareDeep(form, o.form, true) && compareDeep(total, o.total, true) 1553 && compareDeep(note, o.note, true); 1554 } 1555 1556 @Override 1557 public boolean equalsShallow(Base other) { 1558 if (!super.equalsShallow(other)) 1559 return false; 1560 if (!(other instanceof PaymentReconciliation)) 1561 return false; 1562 PaymentReconciliation o = (PaymentReconciliation) other; 1563 return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true) 1564 ; 1565 } 1566 1567 public boolean isEmpty() { 1568 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) 1569 && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) 1570 && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) 1571 && (created == null || created.isEmpty()) && (period == null || period.isEmpty()) && (organization == null || organization.isEmpty()) 1572 && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) 1573 && (detail == null || detail.isEmpty()) && (form == null || form.isEmpty()) && (total == null || total.isEmpty()) 1574 && (note == null || note.isEmpty()); 1575 } 1576 1577 @Override 1578 public ResourceType getResourceType() { 1579 return ResourceType.PaymentReconciliation; 1580 } 1581 1582 @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) 1583 public static final String SP_IDENTIFIER = "identifier"; 1584 1585} 1586