001package org.hl7.fhir.r5.model; 002 003 004/* 005 * #%L 006 * org.hl7.fhir.r5 007 * %% 008 * Copyright (C) 2014 - 2019 Health Level 7 009 * %% 010 * Licensed under the Apache License, Version 2.0 (the \"License\"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an \"AS IS\" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * #L% 022 */ 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, \ 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this \ 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, \ 034 this list of conditions and the following disclaimer in the documentation \ 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 049 POSSIBILITY OF SUCH DAMAGE. 050 */ 051 052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent 053 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057import org.hl7.fhir.utilities.Utilities; 058import org.hl7.fhir.r5.model.Enumerations.*; 059import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 060import org.hl7.fhir.exceptions.FHIRException; 061import org.hl7.fhir.instance.model.api.ICompositeType; 062import ca.uhn.fhir.model.api.annotation.ResourceDef; 063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 064import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 065import ca.uhn.fhir.model.api.annotation.Child; 066import ca.uhn.fhir.model.api.annotation.ChildOrder; 067import ca.uhn.fhir.model.api.annotation.Description; 068import ca.uhn.fhir.model.api.annotation.Block; 069 070/** 071 * This resource provides the details including amount of a payment and allocates the payment items being paid. 072 */ 073@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/StructureDefinition/PaymentReconciliation") 074public class PaymentReconciliation extends DomainResource { 075 076 @Block() 077 public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement { 078 /** 079 * Unique identifier for the current payment item for the referenced payable. 080 */ 081 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) 082 @Description(shortDefinition="Business identifier of the payment detail", formalDefinition="Unique identifier for the current payment item for the referenced payable." ) 083 protected Identifier identifier; 084 085 /** 086 * Unique identifier for the prior payment item for the referenced payable. 087 */ 088 @Child(name = "predecessor", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 089 @Description(shortDefinition="Business identifier of the prior payment detail", formalDefinition="Unique identifier for the prior payment item for the referenced payable." ) 090 protected Identifier predecessor; 091 092 /** 093 * Code to indicate the nature of the payment. 094 */ 095 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false) 096 @Description(shortDefinition="Category of payment", formalDefinition="Code to indicate the nature of the payment." ) 097 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-type") 098 protected CodeableConcept type; 099 100 /** 101 * A resource, such as a Claim, the evaluation of which could lead to payment. 102 */ 103 @Child(name = "request", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 104 @Description(shortDefinition="Request giving rise to the payment", formalDefinition="A resource, such as a Claim, the evaluation of which could lead to payment." ) 105 protected Reference request; 106 107 /** 108 * The party which submitted the claim or financial transaction. 109 */ 110 @Child(name = "submitter", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=false) 111 @Description(shortDefinition="Submitter of the request", formalDefinition="The party which submitted the claim or financial transaction." ) 112 protected Reference submitter; 113 114 /** 115 * A resource, such as a ClaimResponse, which contains a commitment to payment. 116 */ 117 @Child(name = "response", type = {Reference.class}, order=6, min=0, max=1, modifier=false, summary=false) 118 @Description(shortDefinition="Response committing to a payment", formalDefinition="A resource, such as a ClaimResponse, which contains a commitment to payment." ) 119 protected Reference response; 120 121 /** 122 * The date from the response resource containing a commitment to pay. 123 */ 124 @Child(name = "date", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=false) 125 @Description(shortDefinition="Date of commitment to pay", formalDefinition="The date from the response resource containing a commitment to pay." ) 126 protected DateType date; 127 128 /** 129 * A reference to the individual who is responsible for inquiries regarding the response and its payment. 130 */ 131 @Child(name = "responsible", type = {PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=false) 132 @Description(shortDefinition="Contact for the response", formalDefinition="A reference to the individual who is responsible for inquiries regarding the response and its payment." ) 133 protected Reference responsible; 134 135 /** 136 * The party which is receiving the payment. 137 */ 138 @Child(name = "payee", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=false) 139 @Description(shortDefinition="Recipient of the payment", formalDefinition="The party which is receiving the payment." ) 140 protected Reference payee; 141 142 /** 143 * The monetary amount allocated from the total payment to the payable. 144 */ 145 @Child(name = "amount", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false) 146 @Description(shortDefinition="Amount allocated to this payable", formalDefinition="The monetary amount allocated from the total payment to the payable." ) 147 protected Money amount; 148 149 private static final long serialVersionUID = 1747960963L; 150 151 /** 152 * Constructor 153 */ 154 public DetailsComponent() { 155 super(); 156 } 157 158 /** 159 * Constructor 160 */ 161 public DetailsComponent(CodeableConcept type) { 162 super(); 163 this.setType(type); 164 } 165 166 /** 167 * @return {@link #identifier} (Unique identifier for the current payment item for the referenced payable.) 168 */ 169 public Identifier getIdentifier() { 170 if (this.identifier == null) 171 if (Configuration.errorOnAutoCreate()) 172 throw new Error("Attempt to auto-create DetailsComponent.identifier"); 173 else if (Configuration.doAutoCreate()) 174 this.identifier = new Identifier(); // cc 175 return this.identifier; 176 } 177 178 public boolean hasIdentifier() { 179 return this.identifier != null && !this.identifier.isEmpty(); 180 } 181 182 /** 183 * @param value {@link #identifier} (Unique identifier for the current payment item for the referenced payable.) 184 */ 185 public DetailsComponent setIdentifier(Identifier value) { 186 this.identifier = value; 187 return this; 188 } 189 190 /** 191 * @return {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.) 192 */ 193 public Identifier getPredecessor() { 194 if (this.predecessor == null) 195 if (Configuration.errorOnAutoCreate()) 196 throw new Error("Attempt to auto-create DetailsComponent.predecessor"); 197 else if (Configuration.doAutoCreate()) 198 this.predecessor = new Identifier(); // cc 199 return this.predecessor; 200 } 201 202 public boolean hasPredecessor() { 203 return this.predecessor != null && !this.predecessor.isEmpty(); 204 } 205 206 /** 207 * @param value {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.) 208 */ 209 public DetailsComponent setPredecessor(Identifier value) { 210 this.predecessor = value; 211 return this; 212 } 213 214 /** 215 * @return {@link #type} (Code to indicate the nature of the payment.) 216 */ 217 public CodeableConcept getType() { 218 if (this.type == null) 219 if (Configuration.errorOnAutoCreate()) 220 throw new Error("Attempt to auto-create DetailsComponent.type"); 221 else if (Configuration.doAutoCreate()) 222 this.type = new CodeableConcept(); // cc 223 return this.type; 224 } 225 226 public boolean hasType() { 227 return this.type != null && !this.type.isEmpty(); 228 } 229 230 /** 231 * @param value {@link #type} (Code to indicate the nature of the payment.) 232 */ 233 public DetailsComponent setType(CodeableConcept value) { 234 this.type = value; 235 return this; 236 } 237 238 /** 239 * @return {@link #request} (A resource, such as a Claim, the evaluation of which could lead to payment.) 240 */ 241 public Reference getRequest() { 242 if (this.request == null) 243 if (Configuration.errorOnAutoCreate()) 244 throw new Error("Attempt to auto-create DetailsComponent.request"); 245 else if (Configuration.doAutoCreate()) 246 this.request = new Reference(); // cc 247 return this.request; 248 } 249 250 public boolean hasRequest() { 251 return this.request != null && !this.request.isEmpty(); 252 } 253 254 /** 255 * @param value {@link #request} (A resource, such as a Claim, the evaluation of which could lead to payment.) 256 */ 257 public DetailsComponent setRequest(Reference value) { 258 this.request = value; 259 return this; 260 } 261 262 /** 263 * @return {@link #submitter} (The party which submitted the claim or financial transaction.) 264 */ 265 public Reference getSubmitter() { 266 if (this.submitter == null) 267 if (Configuration.errorOnAutoCreate()) 268 throw new Error("Attempt to auto-create DetailsComponent.submitter"); 269 else if (Configuration.doAutoCreate()) 270 this.submitter = new Reference(); // cc 271 return this.submitter; 272 } 273 274 public boolean hasSubmitter() { 275 return this.submitter != null && !this.submitter.isEmpty(); 276 } 277 278 /** 279 * @param value {@link #submitter} (The party which submitted the claim or financial transaction.) 280 */ 281 public DetailsComponent setSubmitter(Reference value) { 282 this.submitter = value; 283 return this; 284 } 285 286 /** 287 * @return {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.) 288 */ 289 public Reference getResponse() { 290 if (this.response == null) 291 if (Configuration.errorOnAutoCreate()) 292 throw new Error("Attempt to auto-create DetailsComponent.response"); 293 else if (Configuration.doAutoCreate()) 294 this.response = new Reference(); // cc 295 return this.response; 296 } 297 298 public boolean hasResponse() { 299 return this.response != null && !this.response.isEmpty(); 300 } 301 302 /** 303 * @param value {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.) 304 */ 305 public DetailsComponent setResponse(Reference value) { 306 this.response = value; 307 return this; 308 } 309 310 /** 311 * @return {@link #date} (The date from the response resource containing a commitment to pay.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 312 */ 313 public DateType getDateElement() { 314 if (this.date == null) 315 if (Configuration.errorOnAutoCreate()) 316 throw new Error("Attempt to auto-create DetailsComponent.date"); 317 else if (Configuration.doAutoCreate()) 318 this.date = new DateType(); // bb 319 return this.date; 320 } 321 322 public boolean hasDateElement() { 323 return this.date != null && !this.date.isEmpty(); 324 } 325 326 public boolean hasDate() { 327 return this.date != null && !this.date.isEmpty(); 328 } 329 330 /** 331 * @param value {@link #date} (The date from the response resource containing a commitment to pay.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 332 */ 333 public DetailsComponent setDateElement(DateType value) { 334 this.date = value; 335 return this; 336 } 337 338 /** 339 * @return The date from the response resource containing a commitment to pay. 340 */ 341 public Date getDate() { 342 return this.date == null ? null : this.date.getValue(); 343 } 344 345 /** 346 * @param value The date from the response resource containing a commitment to pay. 347 */ 348 public DetailsComponent setDate(Date value) { 349 if (value == null) 350 this.date = null; 351 else { 352 if (this.date == null) 353 this.date = new DateType(); 354 this.date.setValue(value); 355 } 356 return this; 357 } 358 359 /** 360 * @return {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.) 361 */ 362 public Reference getResponsible() { 363 if (this.responsible == null) 364 if (Configuration.errorOnAutoCreate()) 365 throw new Error("Attempt to auto-create DetailsComponent.responsible"); 366 else if (Configuration.doAutoCreate()) 367 this.responsible = new Reference(); // cc 368 return this.responsible; 369 } 370 371 public boolean hasResponsible() { 372 return this.responsible != null && !this.responsible.isEmpty(); 373 } 374 375 /** 376 * @param value {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.) 377 */ 378 public DetailsComponent setResponsible(Reference value) { 379 this.responsible = value; 380 return this; 381 } 382 383 /** 384 * @return {@link #payee} (The party which is receiving the payment.) 385 */ 386 public Reference getPayee() { 387 if (this.payee == null) 388 if (Configuration.errorOnAutoCreate()) 389 throw new Error("Attempt to auto-create DetailsComponent.payee"); 390 else if (Configuration.doAutoCreate()) 391 this.payee = new Reference(); // cc 392 return this.payee; 393 } 394 395 public boolean hasPayee() { 396 return this.payee != null && !this.payee.isEmpty(); 397 } 398 399 /** 400 * @param value {@link #payee} (The party which is receiving the payment.) 401 */ 402 public DetailsComponent setPayee(Reference value) { 403 this.payee = value; 404 return this; 405 } 406 407 /** 408 * @return {@link #amount} (The monetary amount allocated from the total payment to the payable.) 409 */ 410 public Money getAmount() { 411 if (this.amount == null) 412 if (Configuration.errorOnAutoCreate()) 413 throw new Error("Attempt to auto-create DetailsComponent.amount"); 414 else if (Configuration.doAutoCreate()) 415 this.amount = new Money(); // cc 416 return this.amount; 417 } 418 419 public boolean hasAmount() { 420 return this.amount != null && !this.amount.isEmpty(); 421 } 422 423 /** 424 * @param value {@link #amount} (The monetary amount allocated from the total payment to the payable.) 425 */ 426 public DetailsComponent setAmount(Money value) { 427 this.amount = value; 428 return this; 429 } 430 431 protected void listChildren(List<Property> children) { 432 super.listChildren(children); 433 children.add(new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier)); 434 children.add(new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor)); 435 children.add(new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type)); 436 children.add(new Property("request", "Reference(Any)", "A resource, such as a Claim, the evaluation of which could lead to payment.", 0, 1, request)); 437 children.add(new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter)); 438 children.add(new Property("response", "Reference(Any)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response)); 439 children.add(new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date)); 440 children.add(new Property("responsible", "Reference(PractitionerRole)", "A reference to the individual who is responsible for inquiries regarding the response and its payment.", 0, 1, responsible)); 441 children.add(new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee)); 442 children.add(new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount)); 443 } 444 445 @Override 446 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 447 switch (_hash) { 448 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier); 449 case -1925032183: /*predecessor*/ return new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor); 450 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type); 451 case 1095692943: /*request*/ return new Property("request", "Reference(Any)", "A resource, such as a Claim, the evaluation of which could lead to payment.", 0, 1, request); 452 case 348678409: /*submitter*/ return new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter); 453 case -340323263: /*response*/ return new Property("response", "Reference(Any)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response); 454 case 3076014: /*date*/ return new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date); 455 case 1847674614: /*responsible*/ return new Property("responsible", "Reference(PractitionerRole)", "A reference to the individual who is responsible for inquiries regarding the response and its payment.", 0, 1, responsible); 456 case 106443592: /*payee*/ return new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee); 457 case -1413853096: /*amount*/ return new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount); 458 default: return super.getNamedProperty(_hash, _name, _checkValid); 459 } 460 461 } 462 463 @Override 464 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 465 switch (hash) { 466 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 467 case -1925032183: /*predecessor*/ return this.predecessor == null ? new Base[0] : new Base[] {this.predecessor}; // Identifier 468 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 469 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 470 case 348678409: /*submitter*/ return this.submitter == null ? new Base[0] : new Base[] {this.submitter}; // Reference 471 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Reference 472 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType 473 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference 474 case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // Reference 475 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 476 default: return super.getProperty(hash, name, checkValid); 477 } 478 479 } 480 481 @Override 482 public Base setProperty(int hash, String name, Base value) throws FHIRException { 483 switch (hash) { 484 case -1618432855: // identifier 485 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 486 return value; 487 case -1925032183: // predecessor 488 this.predecessor = TypeConvertor.castToIdentifier(value); // Identifier 489 return value; 490 case 3575610: // type 491 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 492 return value; 493 case 1095692943: // request 494 this.request = TypeConvertor.castToReference(value); // Reference 495 return value; 496 case 348678409: // submitter 497 this.submitter = TypeConvertor.castToReference(value); // Reference 498 return value; 499 case -340323263: // response 500 this.response = TypeConvertor.castToReference(value); // Reference 501 return value; 502 case 3076014: // date 503 this.date = TypeConvertor.castToDate(value); // DateType 504 return value; 505 case 1847674614: // responsible 506 this.responsible = TypeConvertor.castToReference(value); // Reference 507 return value; 508 case 106443592: // payee 509 this.payee = TypeConvertor.castToReference(value); // Reference 510 return value; 511 case -1413853096: // amount 512 this.amount = TypeConvertor.castToMoney(value); // Money 513 return value; 514 default: return super.setProperty(hash, name, value); 515 } 516 517 } 518 519 @Override 520 public Base setProperty(String name, Base value) throws FHIRException { 521 if (name.equals("identifier")) { 522 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 523 } else if (name.equals("predecessor")) { 524 this.predecessor = TypeConvertor.castToIdentifier(value); // Identifier 525 } else if (name.equals("type")) { 526 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 527 } else if (name.equals("request")) { 528 this.request = TypeConvertor.castToReference(value); // Reference 529 } else if (name.equals("submitter")) { 530 this.submitter = TypeConvertor.castToReference(value); // Reference 531 } else if (name.equals("response")) { 532 this.response = TypeConvertor.castToReference(value); // Reference 533 } else if (name.equals("date")) { 534 this.date = TypeConvertor.castToDate(value); // DateType 535 } else if (name.equals("responsible")) { 536 this.responsible = TypeConvertor.castToReference(value); // Reference 537 } else if (name.equals("payee")) { 538 this.payee = TypeConvertor.castToReference(value); // Reference 539 } else if (name.equals("amount")) { 540 this.amount = TypeConvertor.castToMoney(value); // Money 541 } else 542 return super.setProperty(name, value); 543 return value; 544 } 545 546 @Override 547 public Base makeProperty(int hash, String name) throws FHIRException { 548 switch (hash) { 549 case -1618432855: return getIdentifier(); 550 case -1925032183: return getPredecessor(); 551 case 3575610: return getType(); 552 case 1095692943: return getRequest(); 553 case 348678409: return getSubmitter(); 554 case -340323263: return getResponse(); 555 case 3076014: return getDateElement(); 556 case 1847674614: return getResponsible(); 557 case 106443592: return getPayee(); 558 case -1413853096: return getAmount(); 559 default: return super.makeProperty(hash, name); 560 } 561 562 } 563 564 @Override 565 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 566 switch (hash) { 567 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 568 case -1925032183: /*predecessor*/ return new String[] {"Identifier"}; 569 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 570 case 1095692943: /*request*/ return new String[] {"Reference"}; 571 case 348678409: /*submitter*/ return new String[] {"Reference"}; 572 case -340323263: /*response*/ return new String[] {"Reference"}; 573 case 3076014: /*date*/ return new String[] {"date"}; 574 case 1847674614: /*responsible*/ return new String[] {"Reference"}; 575 case 106443592: /*payee*/ return new String[] {"Reference"}; 576 case -1413853096: /*amount*/ return new String[] {"Money"}; 577 default: return super.getTypesForProperty(hash, name); 578 } 579 580 } 581 582 @Override 583 public Base addChild(String name) throws FHIRException { 584 if (name.equals("identifier")) { 585 this.identifier = new Identifier(); 586 return this.identifier; 587 } 588 else if (name.equals("predecessor")) { 589 this.predecessor = new Identifier(); 590 return this.predecessor; 591 } 592 else if (name.equals("type")) { 593 this.type = new CodeableConcept(); 594 return this.type; 595 } 596 else if (name.equals("request")) { 597 this.request = new Reference(); 598 return this.request; 599 } 600 else if (name.equals("submitter")) { 601 this.submitter = new Reference(); 602 return this.submitter; 603 } 604 else if (name.equals("response")) { 605 this.response = new Reference(); 606 return this.response; 607 } 608 else if (name.equals("date")) { 609 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.detail.date"); 610 } 611 else if (name.equals("responsible")) { 612 this.responsible = new Reference(); 613 return this.responsible; 614 } 615 else if (name.equals("payee")) { 616 this.payee = new Reference(); 617 return this.payee; 618 } 619 else if (name.equals("amount")) { 620 this.amount = new Money(); 621 return this.amount; 622 } 623 else 624 return super.addChild(name); 625 } 626 627 public DetailsComponent copy() { 628 DetailsComponent dst = new DetailsComponent(); 629 copyValues(dst); 630 return dst; 631 } 632 633 public void copyValues(DetailsComponent dst) { 634 super.copyValues(dst); 635 dst.identifier = identifier == null ? null : identifier.copy(); 636 dst.predecessor = predecessor == null ? null : predecessor.copy(); 637 dst.type = type == null ? null : type.copy(); 638 dst.request = request == null ? null : request.copy(); 639 dst.submitter = submitter == null ? null : submitter.copy(); 640 dst.response = response == null ? null : response.copy(); 641 dst.date = date == null ? null : date.copy(); 642 dst.responsible = responsible == null ? null : responsible.copy(); 643 dst.payee = payee == null ? null : payee.copy(); 644 dst.amount = amount == null ? null : amount.copy(); 645 } 646 647 @Override 648 public boolean equalsDeep(Base other_) { 649 if (!super.equalsDeep(other_)) 650 return false; 651 if (!(other_ instanceof DetailsComponent)) 652 return false; 653 DetailsComponent o = (DetailsComponent) other_; 654 return compareDeep(identifier, o.identifier, true) && compareDeep(predecessor, o.predecessor, true) 655 && compareDeep(type, o.type, true) && compareDeep(request, o.request, true) && compareDeep(submitter, o.submitter, true) 656 && compareDeep(response, o.response, true) && compareDeep(date, o.date, true) && compareDeep(responsible, o.responsible, true) 657 && compareDeep(payee, o.payee, true) && compareDeep(amount, o.amount, true); 658 } 659 660 @Override 661 public boolean equalsShallow(Base other_) { 662 if (!super.equalsShallow(other_)) 663 return false; 664 if (!(other_ instanceof DetailsComponent)) 665 return false; 666 DetailsComponent o = (DetailsComponent) other_; 667 return compareValues(date, o.date, true); 668 } 669 670 public boolean isEmpty() { 671 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, predecessor, type 672 , request, submitter, response, date, responsible, payee, amount); 673 } 674 675 public String fhirType() { 676 return "PaymentReconciliation.detail"; 677 678 } 679 680 } 681 682 @Block() 683 public static class NotesComponent extends BackboneElement implements IBaseBackboneElement { 684 /** 685 * The business purpose of the note text. 686 */ 687 @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) 688 @Description(shortDefinition="display | print | printoper", formalDefinition="The business purpose of the note text." ) 689 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type") 690 protected Enumeration<NoteType> type; 691 692 /** 693 * The explanation or description associated with the processing. 694 */ 695 @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 696 @Description(shortDefinition="Note explanatory text", formalDefinition="The explanation or description associated with the processing." ) 697 protected StringType text; 698 699 private static final long serialVersionUID = 529250161L; 700 701 /** 702 * Constructor 703 */ 704 public NotesComponent() { 705 super(); 706 } 707 708 /** 709 * @return {@link #type} (The business purpose of the note text.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 710 */ 711 public Enumeration<NoteType> getTypeElement() { 712 if (this.type == null) 713 if (Configuration.errorOnAutoCreate()) 714 throw new Error("Attempt to auto-create NotesComponent.type"); 715 else if (Configuration.doAutoCreate()) 716 this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory()); // bb 717 return this.type; 718 } 719 720 public boolean hasTypeElement() { 721 return this.type != null && !this.type.isEmpty(); 722 } 723 724 public boolean hasType() { 725 return this.type != null && !this.type.isEmpty(); 726 } 727 728 /** 729 * @param value {@link #type} (The business purpose of the note text.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 730 */ 731 public NotesComponent setTypeElement(Enumeration<NoteType> value) { 732 this.type = value; 733 return this; 734 } 735 736 /** 737 * @return The business purpose of the note text. 738 */ 739 public NoteType getType() { 740 return this.type == null ? null : this.type.getValue(); 741 } 742 743 /** 744 * @param value The business purpose of the note text. 745 */ 746 public NotesComponent setType(NoteType value) { 747 if (value == null) 748 this.type = null; 749 else { 750 if (this.type == null) 751 this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory()); 752 this.type.setValue(value); 753 } 754 return this; 755 } 756 757 /** 758 * @return {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 759 */ 760 public StringType getTextElement() { 761 if (this.text == null) 762 if (Configuration.errorOnAutoCreate()) 763 throw new Error("Attempt to auto-create NotesComponent.text"); 764 else if (Configuration.doAutoCreate()) 765 this.text = new StringType(); // bb 766 return this.text; 767 } 768 769 public boolean hasTextElement() { 770 return this.text != null && !this.text.isEmpty(); 771 } 772 773 public boolean hasText() { 774 return this.text != null && !this.text.isEmpty(); 775 } 776 777 /** 778 * @param value {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 779 */ 780 public NotesComponent setTextElement(StringType value) { 781 this.text = value; 782 return this; 783 } 784 785 /** 786 * @return The explanation or description associated with the processing. 787 */ 788 public String getText() { 789 return this.text == null ? null : this.text.getValue(); 790 } 791 792 /** 793 * @param value The explanation or description associated with the processing. 794 */ 795 public NotesComponent setText(String value) { 796 if (Utilities.noString(value)) 797 this.text = null; 798 else { 799 if (this.text == null) 800 this.text = new StringType(); 801 this.text.setValue(value); 802 } 803 return this; 804 } 805 806 protected void listChildren(List<Property> children) { 807 super.listChildren(children); 808 children.add(new Property("type", "code", "The business purpose of the note text.", 0, 1, type)); 809 children.add(new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text)); 810 } 811 812 @Override 813 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 814 switch (_hash) { 815 case 3575610: /*type*/ return new Property("type", "code", "The business purpose of the note text.", 0, 1, type); 816 case 3556653: /*text*/ return new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text); 817 default: return super.getNamedProperty(_hash, _name, _checkValid); 818 } 819 820 } 821 822 @Override 823 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 824 switch (hash) { 825 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<NoteType> 826 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 827 default: return super.getProperty(hash, name, checkValid); 828 } 829 830 } 831 832 @Override 833 public Base setProperty(int hash, String name, Base value) throws FHIRException { 834 switch (hash) { 835 case 3575610: // type 836 value = new NoteTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 837 this.type = (Enumeration) value; // Enumeration<NoteType> 838 return value; 839 case 3556653: // text 840 this.text = TypeConvertor.castToString(value); // StringType 841 return value; 842 default: return super.setProperty(hash, name, value); 843 } 844 845 } 846 847 @Override 848 public Base setProperty(String name, Base value) throws FHIRException { 849 if (name.equals("type")) { 850 value = new NoteTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 851 this.type = (Enumeration) value; // Enumeration<NoteType> 852 } else if (name.equals("text")) { 853 this.text = TypeConvertor.castToString(value); // StringType 854 } else 855 return super.setProperty(name, value); 856 return value; 857 } 858 859 @Override 860 public Base makeProperty(int hash, String name) throws FHIRException { 861 switch (hash) { 862 case 3575610: return getTypeElement(); 863 case 3556653: return getTextElement(); 864 default: return super.makeProperty(hash, name); 865 } 866 867 } 868 869 @Override 870 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 871 switch (hash) { 872 case 3575610: /*type*/ return new String[] {"code"}; 873 case 3556653: /*text*/ return new String[] {"string"}; 874 default: return super.getTypesForProperty(hash, name); 875 } 876 877 } 878 879 @Override 880 public Base addChild(String name) throws FHIRException { 881 if (name.equals("type")) { 882 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.processNote.type"); 883 } 884 else if (name.equals("text")) { 885 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.processNote.text"); 886 } 887 else 888 return super.addChild(name); 889 } 890 891 public NotesComponent copy() { 892 NotesComponent dst = new NotesComponent(); 893 copyValues(dst); 894 return dst; 895 } 896 897 public void copyValues(NotesComponent dst) { 898 super.copyValues(dst); 899 dst.type = type == null ? null : type.copy(); 900 dst.text = text == null ? null : text.copy(); 901 } 902 903 @Override 904 public boolean equalsDeep(Base other_) { 905 if (!super.equalsDeep(other_)) 906 return false; 907 if (!(other_ instanceof NotesComponent)) 908 return false; 909 NotesComponent o = (NotesComponent) other_; 910 return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); 911 } 912 913 @Override 914 public boolean equalsShallow(Base other_) { 915 if (!super.equalsShallow(other_)) 916 return false; 917 if (!(other_ instanceof NotesComponent)) 918 return false; 919 NotesComponent o = (NotesComponent) other_; 920 return compareValues(type, o.type, true) && compareValues(text, o.text, true); 921 } 922 923 public boolean isEmpty() { 924 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, text); 925 } 926 927 public String fhirType() { 928 return "PaymentReconciliation.processNote"; 929 930 } 931 932 } 933 934 /** 935 * A unique identifier assigned to this payment reconciliation. 936 */ 937 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 938 @Description(shortDefinition="Business Identifier for a payment reconciliation", formalDefinition="A unique identifier assigned to this payment reconciliation." ) 939 protected List<Identifier> identifier; 940 941 /** 942 * The status of the resource instance. 943 */ 944 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 945 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 946 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 947 protected Enumeration<FinancialResourceStatusCodes> status; 948 949 /** 950 * The period of time for which payments have been gathered into this bulk payment for settlement. 951 */ 952 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 953 @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) 954 protected Period period; 955 956 /** 957 * The date when the resource was created. 958 */ 959 @Child(name = "created", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 960 @Description(shortDefinition="Creation date", formalDefinition="The date when the resource was created." ) 961 protected DateTimeType created; 962 963 /** 964 * The party who generated the payment. 965 */ 966 @Child(name = "paymentIssuer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) 967 @Description(shortDefinition="Party generating payment", formalDefinition="The party who generated the payment." ) 968 protected Reference paymentIssuer; 969 970 /** 971 * Original request resource reference. 972 */ 973 @Child(name = "request", type = {Task.class}, order=5, min=0, max=1, modifier=false, summary=false) 974 @Description(shortDefinition="Reference to requesting resource", formalDefinition="Original request resource reference." ) 975 protected Reference request; 976 977 /** 978 * The practitioner who is responsible for the services rendered to the patient. 979 */ 980 @Child(name = "requestor", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) 981 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 982 protected Reference requestor; 983 984 /** 985 * The outcome of a request for a reconciliation. 986 */ 987 @Child(name = "outcome", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 988 @Description(shortDefinition="queued | complete | error | partial", formalDefinition="The outcome of a request for a reconciliation." ) 989 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") 990 protected Enumeration<ClaimProcessingCodes> outcome; 991 992 /** 993 * A human readable description of the status of the request for the reconciliation. 994 */ 995 @Child(name = "disposition", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 996 @Description(shortDefinition="Disposition message", formalDefinition="A human readable description of the status of the request for the reconciliation." ) 997 protected StringType disposition; 998 999 /** 1000 * The date of payment as indicated on the financial instrument. 1001 */ 1002 @Child(name = "paymentDate", type = {DateType.class}, order=9, min=1, max=1, modifier=false, summary=true) 1003 @Description(shortDefinition="When payment issued", formalDefinition="The date of payment as indicated on the financial instrument." ) 1004 protected DateType paymentDate; 1005 1006 /** 1007 * Total payment amount as indicated on the financial instrument. 1008 */ 1009 @Child(name = "paymentAmount", type = {Money.class}, order=10, min=1, max=1, modifier=false, summary=true) 1010 @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount as indicated on the financial instrument." ) 1011 protected Money paymentAmount; 1012 1013 /** 1014 * Issuer's unique identifier for the payment instrument. 1015 */ 1016 @Child(name = "paymentIdentifier", type = {Identifier.class}, order=11, min=0, max=1, modifier=false, summary=false) 1017 @Description(shortDefinition="Business identifier for the payment", formalDefinition="Issuer's unique identifier for the payment instrument." ) 1018 protected Identifier paymentIdentifier; 1019 1020 /** 1021 * Distribution of the payment amount for a previously acknowledged payable. 1022 */ 1023 @Child(name = "detail", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1024 @Description(shortDefinition="Settlement particulars", formalDefinition="Distribution of the payment amount for a previously acknowledged payable." ) 1025 protected List<DetailsComponent> detail; 1026 1027 /** 1028 * A code for the form to be used for printing the content. 1029 */ 1030 @Child(name = "formCode", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) 1031 @Description(shortDefinition="Printed form identifier", formalDefinition="A code for the form to be used for printing the content." ) 1032 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms") 1033 protected CodeableConcept formCode; 1034 1035 /** 1036 * A note that describes or explains the processing in a human readable form. 1037 */ 1038 @Child(name = "processNote", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1039 @Description(shortDefinition="Note concerning processing", formalDefinition="A note that describes or explains the processing in a human readable form." ) 1040 protected List<NotesComponent> processNote; 1041 1042 private static final long serialVersionUID = -1613598933L; 1043 1044 /** 1045 * Constructor 1046 */ 1047 public PaymentReconciliation() { 1048 super(); 1049 } 1050 1051 /** 1052 * Constructor 1053 */ 1054 public PaymentReconciliation(FinancialResourceStatusCodes status, Date created, Date paymentDate, Money paymentAmount) { 1055 super(); 1056 this.setStatus(status); 1057 this.setCreated(created); 1058 this.setPaymentDate(paymentDate); 1059 this.setPaymentAmount(paymentAmount); 1060 } 1061 1062 /** 1063 * @return {@link #identifier} (A unique identifier assigned to this payment reconciliation.) 1064 */ 1065 public List<Identifier> getIdentifier() { 1066 if (this.identifier == null) 1067 this.identifier = new ArrayList<Identifier>(); 1068 return this.identifier; 1069 } 1070 1071 /** 1072 * @return Returns a reference to <code>this</code> for easy method chaining 1073 */ 1074 public PaymentReconciliation setIdentifier(List<Identifier> theIdentifier) { 1075 this.identifier = theIdentifier; 1076 return this; 1077 } 1078 1079 public boolean hasIdentifier() { 1080 if (this.identifier == null) 1081 return false; 1082 for (Identifier item : this.identifier) 1083 if (!item.isEmpty()) 1084 return true; 1085 return false; 1086 } 1087 1088 public Identifier addIdentifier() { //3 1089 Identifier t = new Identifier(); 1090 if (this.identifier == null) 1091 this.identifier = new ArrayList<Identifier>(); 1092 this.identifier.add(t); 1093 return t; 1094 } 1095 1096 public PaymentReconciliation addIdentifier(Identifier t) { //3 1097 if (t == null) 1098 return this; 1099 if (this.identifier == null) 1100 this.identifier = new ArrayList<Identifier>(); 1101 this.identifier.add(t); 1102 return this; 1103 } 1104 1105 /** 1106 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1107 */ 1108 public Identifier getIdentifierFirstRep() { 1109 if (getIdentifier().isEmpty()) { 1110 addIdentifier(); 1111 } 1112 return getIdentifier().get(0); 1113 } 1114 1115 /** 1116 * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1117 */ 1118 public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 1119 if (this.status == null) 1120 if (Configuration.errorOnAutoCreate()) 1121 throw new Error("Attempt to auto-create PaymentReconciliation.status"); 1122 else if (Configuration.doAutoCreate()) 1123 this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb 1124 return this.status; 1125 } 1126 1127 public boolean hasStatusElement() { 1128 return this.status != null && !this.status.isEmpty(); 1129 } 1130 1131 public boolean hasStatus() { 1132 return this.status != null && !this.status.isEmpty(); 1133 } 1134 1135 /** 1136 * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1137 */ 1138 public PaymentReconciliation setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 1139 this.status = value; 1140 return this; 1141 } 1142 1143 /** 1144 * @return The status of the resource instance. 1145 */ 1146 public FinancialResourceStatusCodes getStatus() { 1147 return this.status == null ? null : this.status.getValue(); 1148 } 1149 1150 /** 1151 * @param value The status of the resource instance. 1152 */ 1153 public PaymentReconciliation setStatus(FinancialResourceStatusCodes value) { 1154 if (this.status == null) 1155 this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); 1156 this.status.setValue(value); 1157 return this; 1158 } 1159 1160 /** 1161 * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) 1162 */ 1163 public Period getPeriod() { 1164 if (this.period == null) 1165 if (Configuration.errorOnAutoCreate()) 1166 throw new Error("Attempt to auto-create PaymentReconciliation.period"); 1167 else if (Configuration.doAutoCreate()) 1168 this.period = new Period(); // cc 1169 return this.period; 1170 } 1171 1172 public boolean hasPeriod() { 1173 return this.period != null && !this.period.isEmpty(); 1174 } 1175 1176 /** 1177 * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.) 1178 */ 1179 public PaymentReconciliation setPeriod(Period value) { 1180 this.period = value; 1181 return this; 1182 } 1183 1184 /** 1185 * @return {@link #created} (The date when the resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 1186 */ 1187 public DateTimeType getCreatedElement() { 1188 if (this.created == null) 1189 if (Configuration.errorOnAutoCreate()) 1190 throw new Error("Attempt to auto-create PaymentReconciliation.created"); 1191 else if (Configuration.doAutoCreate()) 1192 this.created = new DateTimeType(); // bb 1193 return this.created; 1194 } 1195 1196 public boolean hasCreatedElement() { 1197 return this.created != null && !this.created.isEmpty(); 1198 } 1199 1200 public boolean hasCreated() { 1201 return this.created != null && !this.created.isEmpty(); 1202 } 1203 1204 /** 1205 * @param value {@link #created} (The date when the resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 1206 */ 1207 public PaymentReconciliation setCreatedElement(DateTimeType value) { 1208 this.created = value; 1209 return this; 1210 } 1211 1212 /** 1213 * @return The date when the resource was created. 1214 */ 1215 public Date getCreated() { 1216 return this.created == null ? null : this.created.getValue(); 1217 } 1218 1219 /** 1220 * @param value The date when the resource was created. 1221 */ 1222 public PaymentReconciliation setCreated(Date value) { 1223 if (this.created == null) 1224 this.created = new DateTimeType(); 1225 this.created.setValue(value); 1226 return this; 1227 } 1228 1229 /** 1230 * @return {@link #paymentIssuer} (The party who generated the payment.) 1231 */ 1232 public Reference getPaymentIssuer() { 1233 if (this.paymentIssuer == null) 1234 if (Configuration.errorOnAutoCreate()) 1235 throw new Error("Attempt to auto-create PaymentReconciliation.paymentIssuer"); 1236 else if (Configuration.doAutoCreate()) 1237 this.paymentIssuer = new Reference(); // cc 1238 return this.paymentIssuer; 1239 } 1240 1241 public boolean hasPaymentIssuer() { 1242 return this.paymentIssuer != null && !this.paymentIssuer.isEmpty(); 1243 } 1244 1245 /** 1246 * @param value {@link #paymentIssuer} (The party who generated the payment.) 1247 */ 1248 public PaymentReconciliation setPaymentIssuer(Reference value) { 1249 this.paymentIssuer = value; 1250 return this; 1251 } 1252 1253 /** 1254 * @return {@link #request} (Original request resource reference.) 1255 */ 1256 public Reference getRequest() { 1257 if (this.request == null) 1258 if (Configuration.errorOnAutoCreate()) 1259 throw new Error("Attempt to auto-create PaymentReconciliation.request"); 1260 else if (Configuration.doAutoCreate()) 1261 this.request = new Reference(); // cc 1262 return this.request; 1263 } 1264 1265 public boolean hasRequest() { 1266 return this.request != null && !this.request.isEmpty(); 1267 } 1268 1269 /** 1270 * @param value {@link #request} (Original request resource reference.) 1271 */ 1272 public PaymentReconciliation setRequest(Reference value) { 1273 this.request = value; 1274 return this; 1275 } 1276 1277 /** 1278 * @return {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.) 1279 */ 1280 public Reference getRequestor() { 1281 if (this.requestor == null) 1282 if (Configuration.errorOnAutoCreate()) 1283 throw new Error("Attempt to auto-create PaymentReconciliation.requestor"); 1284 else if (Configuration.doAutoCreate()) 1285 this.requestor = new Reference(); // cc 1286 return this.requestor; 1287 } 1288 1289 public boolean hasRequestor() { 1290 return this.requestor != null && !this.requestor.isEmpty(); 1291 } 1292 1293 /** 1294 * @param value {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.) 1295 */ 1296 public PaymentReconciliation setRequestor(Reference value) { 1297 this.requestor = value; 1298 return this; 1299 } 1300 1301 /** 1302 * @return {@link #outcome} (The outcome of a request for a reconciliation.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 1303 */ 1304 public Enumeration<ClaimProcessingCodes> getOutcomeElement() { 1305 if (this.outcome == null) 1306 if (Configuration.errorOnAutoCreate()) 1307 throw new Error("Attempt to auto-create PaymentReconciliation.outcome"); 1308 else if (Configuration.doAutoCreate()) 1309 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); // bb 1310 return this.outcome; 1311 } 1312 1313 public boolean hasOutcomeElement() { 1314 return this.outcome != null && !this.outcome.isEmpty(); 1315 } 1316 1317 public boolean hasOutcome() { 1318 return this.outcome != null && !this.outcome.isEmpty(); 1319 } 1320 1321 /** 1322 * @param value {@link #outcome} (The outcome of a request for a reconciliation.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 1323 */ 1324 public PaymentReconciliation setOutcomeElement(Enumeration<ClaimProcessingCodes> value) { 1325 this.outcome = value; 1326 return this; 1327 } 1328 1329 /** 1330 * @return The outcome of a request for a reconciliation. 1331 */ 1332 public ClaimProcessingCodes getOutcome() { 1333 return this.outcome == null ? null : this.outcome.getValue(); 1334 } 1335 1336 /** 1337 * @param value The outcome of a request for a reconciliation. 1338 */ 1339 public PaymentReconciliation setOutcome(ClaimProcessingCodes value) { 1340 if (value == null) 1341 this.outcome = null; 1342 else { 1343 if (this.outcome == null) 1344 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); 1345 this.outcome.setValue(value); 1346 } 1347 return this; 1348 } 1349 1350 /** 1351 * @return {@link #disposition} (A human readable description of the status of the request for the reconciliation.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 1352 */ 1353 public StringType getDispositionElement() { 1354 if (this.disposition == null) 1355 if (Configuration.errorOnAutoCreate()) 1356 throw new Error("Attempt to auto-create PaymentReconciliation.disposition"); 1357 else if (Configuration.doAutoCreate()) 1358 this.disposition = new StringType(); // bb 1359 return this.disposition; 1360 } 1361 1362 public boolean hasDispositionElement() { 1363 return this.disposition != null && !this.disposition.isEmpty(); 1364 } 1365 1366 public boolean hasDisposition() { 1367 return this.disposition != null && !this.disposition.isEmpty(); 1368 } 1369 1370 /** 1371 * @param value {@link #disposition} (A human readable description of the status of the request for the reconciliation.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 1372 */ 1373 public PaymentReconciliation setDispositionElement(StringType value) { 1374 this.disposition = value; 1375 return this; 1376 } 1377 1378 /** 1379 * @return A human readable description of the status of the request for the reconciliation. 1380 */ 1381 public String getDisposition() { 1382 return this.disposition == null ? null : this.disposition.getValue(); 1383 } 1384 1385 /** 1386 * @param value A human readable description of the status of the request for the reconciliation. 1387 */ 1388 public PaymentReconciliation setDisposition(String value) { 1389 if (Utilities.noString(value)) 1390 this.disposition = null; 1391 else { 1392 if (this.disposition == null) 1393 this.disposition = new StringType(); 1394 this.disposition.setValue(value); 1395 } 1396 return this; 1397 } 1398 1399 /** 1400 * @return {@link #paymentDate} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value 1401 */ 1402 public DateType getPaymentDateElement() { 1403 if (this.paymentDate == null) 1404 if (Configuration.errorOnAutoCreate()) 1405 throw new Error("Attempt to auto-create PaymentReconciliation.paymentDate"); 1406 else if (Configuration.doAutoCreate()) 1407 this.paymentDate = new DateType(); // bb 1408 return this.paymentDate; 1409 } 1410 1411 public boolean hasPaymentDateElement() { 1412 return this.paymentDate != null && !this.paymentDate.isEmpty(); 1413 } 1414 1415 public boolean hasPaymentDate() { 1416 return this.paymentDate != null && !this.paymentDate.isEmpty(); 1417 } 1418 1419 /** 1420 * @param value {@link #paymentDate} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value 1421 */ 1422 public PaymentReconciliation setPaymentDateElement(DateType value) { 1423 this.paymentDate = value; 1424 return this; 1425 } 1426 1427 /** 1428 * @return The date of payment as indicated on the financial instrument. 1429 */ 1430 public Date getPaymentDate() { 1431 return this.paymentDate == null ? null : this.paymentDate.getValue(); 1432 } 1433 1434 /** 1435 * @param value The date of payment as indicated on the financial instrument. 1436 */ 1437 public PaymentReconciliation setPaymentDate(Date value) { 1438 if (this.paymentDate == null) 1439 this.paymentDate = new DateType(); 1440 this.paymentDate.setValue(value); 1441 return this; 1442 } 1443 1444 /** 1445 * @return {@link #paymentAmount} (Total payment amount as indicated on the financial instrument.) 1446 */ 1447 public Money getPaymentAmount() { 1448 if (this.paymentAmount == null) 1449 if (Configuration.errorOnAutoCreate()) 1450 throw new Error("Attempt to auto-create PaymentReconciliation.paymentAmount"); 1451 else if (Configuration.doAutoCreate()) 1452 this.paymentAmount = new Money(); // cc 1453 return this.paymentAmount; 1454 } 1455 1456 public boolean hasPaymentAmount() { 1457 return this.paymentAmount != null && !this.paymentAmount.isEmpty(); 1458 } 1459 1460 /** 1461 * @param value {@link #paymentAmount} (Total payment amount as indicated on the financial instrument.) 1462 */ 1463 public PaymentReconciliation setPaymentAmount(Money value) { 1464 this.paymentAmount = value; 1465 return this; 1466 } 1467 1468 /** 1469 * @return {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.) 1470 */ 1471 public Identifier getPaymentIdentifier() { 1472 if (this.paymentIdentifier == null) 1473 if (Configuration.errorOnAutoCreate()) 1474 throw new Error("Attempt to auto-create PaymentReconciliation.paymentIdentifier"); 1475 else if (Configuration.doAutoCreate()) 1476 this.paymentIdentifier = new Identifier(); // cc 1477 return this.paymentIdentifier; 1478 } 1479 1480 public boolean hasPaymentIdentifier() { 1481 return this.paymentIdentifier != null && !this.paymentIdentifier.isEmpty(); 1482 } 1483 1484 /** 1485 * @param value {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.) 1486 */ 1487 public PaymentReconciliation setPaymentIdentifier(Identifier value) { 1488 this.paymentIdentifier = value; 1489 return this; 1490 } 1491 1492 /** 1493 * @return {@link #detail} (Distribution of the payment amount for a previously acknowledged payable.) 1494 */ 1495 public List<DetailsComponent> getDetail() { 1496 if (this.detail == null) 1497 this.detail = new ArrayList<DetailsComponent>(); 1498 return this.detail; 1499 } 1500 1501 /** 1502 * @return Returns a reference to <code>this</code> for easy method chaining 1503 */ 1504 public PaymentReconciliation setDetail(List<DetailsComponent> theDetail) { 1505 this.detail = theDetail; 1506 return this; 1507 } 1508 1509 public boolean hasDetail() { 1510 if (this.detail == null) 1511 return false; 1512 for (DetailsComponent item : this.detail) 1513 if (!item.isEmpty()) 1514 return true; 1515 return false; 1516 } 1517 1518 public DetailsComponent addDetail() { //3 1519 DetailsComponent t = new DetailsComponent(); 1520 if (this.detail == null) 1521 this.detail = new ArrayList<DetailsComponent>(); 1522 this.detail.add(t); 1523 return t; 1524 } 1525 1526 public PaymentReconciliation addDetail(DetailsComponent t) { //3 1527 if (t == null) 1528 return this; 1529 if (this.detail == null) 1530 this.detail = new ArrayList<DetailsComponent>(); 1531 this.detail.add(t); 1532 return this; 1533 } 1534 1535 /** 1536 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3} 1537 */ 1538 public DetailsComponent getDetailFirstRep() { 1539 if (getDetail().isEmpty()) { 1540 addDetail(); 1541 } 1542 return getDetail().get(0); 1543 } 1544 1545 /** 1546 * @return {@link #formCode} (A code for the form to be used for printing the content.) 1547 */ 1548 public CodeableConcept getFormCode() { 1549 if (this.formCode == null) 1550 if (Configuration.errorOnAutoCreate()) 1551 throw new Error("Attempt to auto-create PaymentReconciliation.formCode"); 1552 else if (Configuration.doAutoCreate()) 1553 this.formCode = new CodeableConcept(); // cc 1554 return this.formCode; 1555 } 1556 1557 public boolean hasFormCode() { 1558 return this.formCode != null && !this.formCode.isEmpty(); 1559 } 1560 1561 /** 1562 * @param value {@link #formCode} (A code for the form to be used for printing the content.) 1563 */ 1564 public PaymentReconciliation setFormCode(CodeableConcept value) { 1565 this.formCode = value; 1566 return this; 1567 } 1568 1569 /** 1570 * @return {@link #processNote} (A note that describes or explains the processing in a human readable form.) 1571 */ 1572 public List<NotesComponent> getProcessNote() { 1573 if (this.processNote == null) 1574 this.processNote = new ArrayList<NotesComponent>(); 1575 return this.processNote; 1576 } 1577 1578 /** 1579 * @return Returns a reference to <code>this</code> for easy method chaining 1580 */ 1581 public PaymentReconciliation setProcessNote(List<NotesComponent> theProcessNote) { 1582 this.processNote = theProcessNote; 1583 return this; 1584 } 1585 1586 public boolean hasProcessNote() { 1587 if (this.processNote == null) 1588 return false; 1589 for (NotesComponent item : this.processNote) 1590 if (!item.isEmpty()) 1591 return true; 1592 return false; 1593 } 1594 1595 public NotesComponent addProcessNote() { //3 1596 NotesComponent t = new NotesComponent(); 1597 if (this.processNote == null) 1598 this.processNote = new ArrayList<NotesComponent>(); 1599 this.processNote.add(t); 1600 return t; 1601 } 1602 1603 public PaymentReconciliation addProcessNote(NotesComponent t) { //3 1604 if (t == null) 1605 return this; 1606 if (this.processNote == null) 1607 this.processNote = new ArrayList<NotesComponent>(); 1608 this.processNote.add(t); 1609 return this; 1610 } 1611 1612 /** 1613 * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist {3} 1614 */ 1615 public NotesComponent getProcessNoteFirstRep() { 1616 if (getProcessNote().isEmpty()) { 1617 addProcessNote(); 1618 } 1619 return getProcessNote().get(0); 1620 } 1621 1622 protected void listChildren(List<Property> children) { 1623 super.listChildren(children); 1624 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1625 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 1626 children.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, 1, period)); 1627 children.add(new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created)); 1628 children.add(new Property("paymentIssuer", "Reference(Organization)", "The party who generated the payment.", 0, 1, paymentIssuer)); 1629 children.add(new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request)); 1630 children.add(new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestor)); 1631 children.add(new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome)); 1632 children.add(new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition)); 1633 children.add(new Property("paymentDate", "date", "The date of payment as indicated on the financial instrument.", 0, 1, paymentDate)); 1634 children.add(new Property("paymentAmount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, paymentAmount)); 1635 children.add(new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier)); 1636 children.add(new Property("detail", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, detail)); 1637 children.add(new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode)); 1638 children.add(new Property("processNote", "", "A note that describes or explains the processing in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote)); 1639 } 1640 1641 @Override 1642 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1643 switch (_hash) { 1644 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier); 1645 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 1646 case -991726143: /*period*/ return new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, 1, period); 1647 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created); 1648 case 1144026207: /*paymentIssuer*/ return new Property("paymentIssuer", "Reference(Organization)", "The party who generated the payment.", 0, 1, paymentIssuer); 1649 case 1095692943: /*request*/ return new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request); 1650 case 693934258: /*requestor*/ return new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestor); 1651 case -1106507950: /*outcome*/ return new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome); 1652 case 583380919: /*disposition*/ return new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition); 1653 case -1540873516: /*paymentDate*/ return new Property("paymentDate", "date", "The date of payment as indicated on the financial instrument.", 0, 1, paymentDate); 1654 case 909332990: /*paymentAmount*/ return new Property("paymentAmount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, paymentAmount); 1655 case 1555852111: /*paymentIdentifier*/ return new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier); 1656 case -1335224239: /*detail*/ return new Property("detail", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, detail); 1657 case 473181393: /*formCode*/ return new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode); 1658 case 202339073: /*processNote*/ return new Property("processNote", "", "A note that describes or explains the processing in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote); 1659 default: return super.getNamedProperty(_hash, _name, _checkValid); 1660 } 1661 1662 } 1663 1664 @Override 1665 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1666 switch (hash) { 1667 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1668 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes> 1669 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1670 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 1671 case 1144026207: /*paymentIssuer*/ return this.paymentIssuer == null ? new Base[0] : new Base[] {this.paymentIssuer}; // Reference 1672 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 1673 case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // Reference 1674 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<ClaimProcessingCodes> 1675 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 1676 case -1540873516: /*paymentDate*/ return this.paymentDate == null ? new Base[0] : new Base[] {this.paymentDate}; // DateType 1677 case 909332990: /*paymentAmount*/ return this.paymentAmount == null ? new Base[0] : new Base[] {this.paymentAmount}; // Money 1678 case 1555852111: /*paymentIdentifier*/ return this.paymentIdentifier == null ? new Base[0] : new Base[] {this.paymentIdentifier}; // Identifier 1679 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailsComponent 1680 case 473181393: /*formCode*/ return this.formCode == null ? new Base[0] : new Base[] {this.formCode}; // CodeableConcept 1681 case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // NotesComponent 1682 default: return super.getProperty(hash, name, checkValid); 1683 } 1684 1685 } 1686 1687 @Override 1688 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1689 switch (hash) { 1690 case -1618432855: // identifier 1691 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1692 return value; 1693 case -892481550: // status 1694 value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1695 this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes> 1696 return value; 1697 case -991726143: // period 1698 this.period = TypeConvertor.castToPeriod(value); // Period 1699 return value; 1700 case 1028554472: // created 1701 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 1702 return value; 1703 case 1144026207: // paymentIssuer 1704 this.paymentIssuer = TypeConvertor.castToReference(value); // Reference 1705 return value; 1706 case 1095692943: // request 1707 this.request = TypeConvertor.castToReference(value); // Reference 1708 return value; 1709 case 693934258: // requestor 1710 this.requestor = TypeConvertor.castToReference(value); // Reference 1711 return value; 1712 case -1106507950: // outcome 1713 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1714 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 1715 return value; 1716 case 583380919: // disposition 1717 this.disposition = TypeConvertor.castToString(value); // StringType 1718 return value; 1719 case -1540873516: // paymentDate 1720 this.paymentDate = TypeConvertor.castToDate(value); // DateType 1721 return value; 1722 case 909332990: // paymentAmount 1723 this.paymentAmount = TypeConvertor.castToMoney(value); // Money 1724 return value; 1725 case 1555852111: // paymentIdentifier 1726 this.paymentIdentifier = TypeConvertor.castToIdentifier(value); // Identifier 1727 return value; 1728 case -1335224239: // detail 1729 this.getDetail().add((DetailsComponent) value); // DetailsComponent 1730 return value; 1731 case 473181393: // formCode 1732 this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1733 return value; 1734 case 202339073: // processNote 1735 this.getProcessNote().add((NotesComponent) value); // NotesComponent 1736 return value; 1737 default: return super.setProperty(hash, name, value); 1738 } 1739 1740 } 1741 1742 @Override 1743 public Base setProperty(String name, Base value) throws FHIRException { 1744 if (name.equals("identifier")) { 1745 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1746 } else if (name.equals("status")) { 1747 value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1748 this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes> 1749 } else if (name.equals("period")) { 1750 this.period = TypeConvertor.castToPeriod(value); // Period 1751 } else if (name.equals("created")) { 1752 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 1753 } else if (name.equals("paymentIssuer")) { 1754 this.paymentIssuer = TypeConvertor.castToReference(value); // Reference 1755 } else if (name.equals("request")) { 1756 this.request = TypeConvertor.castToReference(value); // Reference 1757 } else if (name.equals("requestor")) { 1758 this.requestor = TypeConvertor.castToReference(value); // Reference 1759 } else if (name.equals("outcome")) { 1760 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1761 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 1762 } else if (name.equals("disposition")) { 1763 this.disposition = TypeConvertor.castToString(value); // StringType 1764 } else if (name.equals("paymentDate")) { 1765 this.paymentDate = TypeConvertor.castToDate(value); // DateType 1766 } else if (name.equals("paymentAmount")) { 1767 this.paymentAmount = TypeConvertor.castToMoney(value); // Money 1768 } else if (name.equals("paymentIdentifier")) { 1769 this.paymentIdentifier = TypeConvertor.castToIdentifier(value); // Identifier 1770 } else if (name.equals("detail")) { 1771 this.getDetail().add((DetailsComponent) value); 1772 } else if (name.equals("formCode")) { 1773 this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1774 } else if (name.equals("processNote")) { 1775 this.getProcessNote().add((NotesComponent) value); 1776 } else 1777 return super.setProperty(name, value); 1778 return value; 1779 } 1780 1781 @Override 1782 public Base makeProperty(int hash, String name) throws FHIRException { 1783 switch (hash) { 1784 case -1618432855: return addIdentifier(); 1785 case -892481550: return getStatusElement(); 1786 case -991726143: return getPeriod(); 1787 case 1028554472: return getCreatedElement(); 1788 case 1144026207: return getPaymentIssuer(); 1789 case 1095692943: return getRequest(); 1790 case 693934258: return getRequestor(); 1791 case -1106507950: return getOutcomeElement(); 1792 case 583380919: return getDispositionElement(); 1793 case -1540873516: return getPaymentDateElement(); 1794 case 909332990: return getPaymentAmount(); 1795 case 1555852111: return getPaymentIdentifier(); 1796 case -1335224239: return addDetail(); 1797 case 473181393: return getFormCode(); 1798 case 202339073: return addProcessNote(); 1799 default: return super.makeProperty(hash, name); 1800 } 1801 1802 } 1803 1804 @Override 1805 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1806 switch (hash) { 1807 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1808 case -892481550: /*status*/ return new String[] {"code"}; 1809 case -991726143: /*period*/ return new String[] {"Period"}; 1810 case 1028554472: /*created*/ return new String[] {"dateTime"}; 1811 case 1144026207: /*paymentIssuer*/ return new String[] {"Reference"}; 1812 case 1095692943: /*request*/ return new String[] {"Reference"}; 1813 case 693934258: /*requestor*/ return new String[] {"Reference"}; 1814 case -1106507950: /*outcome*/ return new String[] {"code"}; 1815 case 583380919: /*disposition*/ return new String[] {"string"}; 1816 case -1540873516: /*paymentDate*/ return new String[] {"date"}; 1817 case 909332990: /*paymentAmount*/ return new String[] {"Money"}; 1818 case 1555852111: /*paymentIdentifier*/ return new String[] {"Identifier"}; 1819 case -1335224239: /*detail*/ return new String[] {}; 1820 case 473181393: /*formCode*/ return new String[] {"CodeableConcept"}; 1821 case 202339073: /*processNote*/ return new String[] {}; 1822 default: return super.getTypesForProperty(hash, name); 1823 } 1824 1825 } 1826 1827 @Override 1828 public Base addChild(String name) throws FHIRException { 1829 if (name.equals("identifier")) { 1830 return addIdentifier(); 1831 } 1832 else if (name.equals("status")) { 1833 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.status"); 1834 } 1835 else if (name.equals("period")) { 1836 this.period = new Period(); 1837 return this.period; 1838 } 1839 else if (name.equals("created")) { 1840 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created"); 1841 } 1842 else if (name.equals("paymentIssuer")) { 1843 this.paymentIssuer = new Reference(); 1844 return this.paymentIssuer; 1845 } 1846 else if (name.equals("request")) { 1847 this.request = new Reference(); 1848 return this.request; 1849 } 1850 else if (name.equals("requestor")) { 1851 this.requestor = new Reference(); 1852 return this.requestor; 1853 } 1854 else if (name.equals("outcome")) { 1855 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome"); 1856 } 1857 else if (name.equals("disposition")) { 1858 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition"); 1859 } 1860 else if (name.equals("paymentDate")) { 1861 throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.paymentDate"); 1862 } 1863 else if (name.equals("paymentAmount")) { 1864 this.paymentAmount = new Money(); 1865 return this.paymentAmount; 1866 } 1867 else if (name.equals("paymentIdentifier")) { 1868 this.paymentIdentifier = new Identifier(); 1869 return this.paymentIdentifier; 1870 } 1871 else if (name.equals("detail")) { 1872 return addDetail(); 1873 } 1874 else if (name.equals("formCode")) { 1875 this.formCode = new CodeableConcept(); 1876 return this.formCode; 1877 } 1878 else if (name.equals("processNote")) { 1879 return addProcessNote(); 1880 } 1881 else 1882 return super.addChild(name); 1883 } 1884 1885 public String fhirType() { 1886 return "PaymentReconciliation"; 1887 1888 } 1889 1890 public PaymentReconciliation copy() { 1891 PaymentReconciliation dst = new PaymentReconciliation(); 1892 copyValues(dst); 1893 return dst; 1894 } 1895 1896 public void copyValues(PaymentReconciliation dst) { 1897 super.copyValues(dst); 1898 if (identifier != null) { 1899 dst.identifier = new ArrayList<Identifier>(); 1900 for (Identifier i : identifier) 1901 dst.identifier.add(i.copy()); 1902 }; 1903 dst.status = status == null ? null : status.copy(); 1904 dst.period = period == null ? null : period.copy(); 1905 dst.created = created == null ? null : created.copy(); 1906 dst.paymentIssuer = paymentIssuer == null ? null : paymentIssuer.copy(); 1907 dst.request = request == null ? null : request.copy(); 1908 dst.requestor = requestor == null ? null : requestor.copy(); 1909 dst.outcome = outcome == null ? null : outcome.copy(); 1910 dst.disposition = disposition == null ? null : disposition.copy(); 1911 dst.paymentDate = paymentDate == null ? null : paymentDate.copy(); 1912 dst.paymentAmount = paymentAmount == null ? null : paymentAmount.copy(); 1913 dst.paymentIdentifier = paymentIdentifier == null ? null : paymentIdentifier.copy(); 1914 if (detail != null) { 1915 dst.detail = new ArrayList<DetailsComponent>(); 1916 for (DetailsComponent i : detail) 1917 dst.detail.add(i.copy()); 1918 }; 1919 dst.formCode = formCode == null ? null : formCode.copy(); 1920 if (processNote != null) { 1921 dst.processNote = new ArrayList<NotesComponent>(); 1922 for (NotesComponent i : processNote) 1923 dst.processNote.add(i.copy()); 1924 }; 1925 } 1926 1927 protected PaymentReconciliation typedCopy() { 1928 return copy(); 1929 } 1930 1931 @Override 1932 public boolean equalsDeep(Base other_) { 1933 if (!super.equalsDeep(other_)) 1934 return false; 1935 if (!(other_ instanceof PaymentReconciliation)) 1936 return false; 1937 PaymentReconciliation o = (PaymentReconciliation) other_; 1938 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(period, o.period, true) 1939 && compareDeep(created, o.created, true) && compareDeep(paymentIssuer, o.paymentIssuer, true) && compareDeep(request, o.request, true) 1940 && compareDeep(requestor, o.requestor, true) && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true) 1941 && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(paymentAmount, o.paymentAmount, true) 1942 && compareDeep(paymentIdentifier, o.paymentIdentifier, true) && compareDeep(detail, o.detail, true) 1943 && compareDeep(formCode, o.formCode, true) && compareDeep(processNote, o.processNote, true); 1944 } 1945 1946 @Override 1947 public boolean equalsShallow(Base other_) { 1948 if (!super.equalsShallow(other_)) 1949 return false; 1950 if (!(other_ instanceof PaymentReconciliation)) 1951 return false; 1952 PaymentReconciliation o = (PaymentReconciliation) other_; 1953 return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true) 1954 && compareValues(disposition, o.disposition, true) && compareValues(paymentDate, o.paymentDate, true) 1955 ; 1956 } 1957 1958 public boolean isEmpty() { 1959 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, period 1960 , created, paymentIssuer, request, requestor, outcome, disposition, paymentDate 1961 , paymentAmount, paymentIdentifier, detail, formCode, processNote); 1962 } 1963 1964 @Override 1965 public ResourceType getResourceType() { 1966 return ResourceType.PaymentReconciliation; 1967 } 1968 1969 /** 1970 * Search parameter: <b>created</b> 1971 * <p> 1972 * Description: <b>The creation date</b><br> 1973 * Type: <b>date</b><br> 1974 * Path: <b>PaymentReconciliation.created</b><br> 1975 * </p> 1976 */ 1977 @SearchParamDefinition(name="created", path="PaymentReconciliation.created", description="The creation date", type="date" ) 1978 public static final String SP_CREATED = "created"; 1979 /** 1980 * <b>Fluent Client</b> search parameter constant for <b>created</b> 1981 * <p> 1982 * Description: <b>The creation date</b><br> 1983 * Type: <b>date</b><br> 1984 * Path: <b>PaymentReconciliation.created</b><br> 1985 * </p> 1986 */ 1987 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 1988 1989 /** 1990 * Search parameter: <b>disposition</b> 1991 * <p> 1992 * Description: <b>The contents of the disposition message</b><br> 1993 * Type: <b>string</b><br> 1994 * Path: <b>PaymentReconciliation.disposition</b><br> 1995 * </p> 1996 */ 1997 @SearchParamDefinition(name="disposition", path="PaymentReconciliation.disposition", description="The contents of the disposition message", type="string" ) 1998 public static final String SP_DISPOSITION = "disposition"; 1999 /** 2000 * <b>Fluent Client</b> search parameter constant for <b>disposition</b> 2001 * <p> 2002 * Description: <b>The contents of the disposition message</b><br> 2003 * Type: <b>string</b><br> 2004 * Path: <b>PaymentReconciliation.disposition</b><br> 2005 * </p> 2006 */ 2007 public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); 2008 2009 /** 2010 * Search parameter: <b>identifier</b> 2011 * <p> 2012 * Description: <b>The business identifier of the ExplanationOfBenefit</b><br> 2013 * Type: <b>token</b><br> 2014 * Path: <b>PaymentReconciliation.identifier</b><br> 2015 * </p> 2016 */ 2017 @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the ExplanationOfBenefit", type="token" ) 2018 public static final String SP_IDENTIFIER = "identifier"; 2019 /** 2020 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2021 * <p> 2022 * Description: <b>The business identifier of the ExplanationOfBenefit</b><br> 2023 * Type: <b>token</b><br> 2024 * Path: <b>PaymentReconciliation.identifier</b><br> 2025 * </p> 2026 */ 2027 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2028 2029 /** 2030 * Search parameter: <b>outcome</b> 2031 * <p> 2032 * Description: <b>The processing outcome</b><br> 2033 * Type: <b>token</b><br> 2034 * Path: <b>PaymentReconciliation.outcome</b><br> 2035 * </p> 2036 */ 2037 @SearchParamDefinition(name="outcome", path="PaymentReconciliation.outcome", description="The processing outcome", type="token" ) 2038 public static final String SP_OUTCOME = "outcome"; 2039 /** 2040 * <b>Fluent Client</b> search parameter constant for <b>outcome</b> 2041 * <p> 2042 * Description: <b>The processing outcome</b><br> 2043 * Type: <b>token</b><br> 2044 * Path: <b>PaymentReconciliation.outcome</b><br> 2045 * </p> 2046 */ 2047 public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME); 2048 2049 /** 2050 * Search parameter: <b>payment-issuer</b> 2051 * <p> 2052 * Description: <b>The organization which generated this resource</b><br> 2053 * Type: <b>reference</b><br> 2054 * Path: <b>PaymentReconciliation.paymentIssuer</b><br> 2055 * </p> 2056 */ 2057 @SearchParamDefinition(name="payment-issuer", path="PaymentReconciliation.paymentIssuer", description="The organization which generated this resource", type="reference", target={Organization.class } ) 2058 public static final String SP_PAYMENT_ISSUER = "payment-issuer"; 2059 /** 2060 * <b>Fluent Client</b> search parameter constant for <b>payment-issuer</b> 2061 * <p> 2062 * Description: <b>The organization which generated this resource</b><br> 2063 * Type: <b>reference</b><br> 2064 * Path: <b>PaymentReconciliation.paymentIssuer</b><br> 2065 * </p> 2066 */ 2067 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PAYMENT_ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PAYMENT_ISSUER); 2068 2069/** 2070 * Constant for fluent queries to be used to add include statements. Specifies 2071 * the path value of "<b>PaymentReconciliation:payment-issuer</b>". 2072 */ 2073 public static final ca.uhn.fhir.model.api.Include INCLUDE_PAYMENT_ISSUER = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:payment-issuer").toLocked(); 2074 2075 /** 2076 * Search parameter: <b>request</b> 2077 * <p> 2078 * Description: <b>The reference to the claim</b><br> 2079 * Type: <b>reference</b><br> 2080 * Path: <b>PaymentReconciliation.request</b><br> 2081 * </p> 2082 */ 2083 @SearchParamDefinition(name="request", path="PaymentReconciliation.request", description="The reference to the claim", type="reference", target={Task.class } ) 2084 public static final String SP_REQUEST = "request"; 2085 /** 2086 * <b>Fluent Client</b> search parameter constant for <b>request</b> 2087 * <p> 2088 * Description: <b>The reference to the claim</b><br> 2089 * Type: <b>reference</b><br> 2090 * Path: <b>PaymentReconciliation.request</b><br> 2091 * </p> 2092 */ 2093 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); 2094 2095/** 2096 * Constant for fluent queries to be used to add include statements. Specifies 2097 * the path value of "<b>PaymentReconciliation:request</b>". 2098 */ 2099 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:request").toLocked(); 2100 2101 /** 2102 * Search parameter: <b>requestor</b> 2103 * <p> 2104 * Description: <b>The reference to the provider who submitted the claim</b><br> 2105 * Type: <b>reference</b><br> 2106 * Path: <b>PaymentReconciliation.requestor</b><br> 2107 * </p> 2108 */ 2109 @SearchParamDefinition(name="requestor", path="PaymentReconciliation.requestor", description="The reference to the provider who submitted the claim", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } ) 2110 public static final String SP_REQUESTOR = "requestor"; 2111 /** 2112 * <b>Fluent Client</b> search parameter constant for <b>requestor</b> 2113 * <p> 2114 * Description: <b>The reference to the provider who submitted the claim</b><br> 2115 * Type: <b>reference</b><br> 2116 * Path: <b>PaymentReconciliation.requestor</b><br> 2117 * </p> 2118 */ 2119 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTOR); 2120 2121/** 2122 * Constant for fluent queries to be used to add include statements. Specifies 2123 * the path value of "<b>PaymentReconciliation:requestor</b>". 2124 */ 2125 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTOR = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestor").toLocked(); 2126 2127 /** 2128 * Search parameter: <b>status</b> 2129 * <p> 2130 * Description: <b>The status of the payment reconciliation</b><br> 2131 * Type: <b>token</b><br> 2132 * Path: <b>PaymentReconciliation.status</b><br> 2133 * </p> 2134 */ 2135 @SearchParamDefinition(name="status", path="PaymentReconciliation.status", description="The status of the payment reconciliation", type="token" ) 2136 public static final String SP_STATUS = "status"; 2137 /** 2138 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2139 * <p> 2140 * Description: <b>The status of the payment reconciliation</b><br> 2141 * Type: <b>token</b><br> 2142 * Path: <b>PaymentReconciliation.status</b><br> 2143 * </p> 2144 */ 2145 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2146 2147 2148} 2149