001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import java.math.*; 040import org.hl7.fhir.utilities.Utilities; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose. 051 */ 052@ResourceDef(name="Invoice", profile="http://hl7.org/fhir/StructureDefinition/Invoice") 053public class Invoice extends DomainResource { 054 055 public enum InvoiceStatus { 056 /** 057 * the invoice has been prepared but not yet finalized. 058 */ 059 DRAFT, 060 /** 061 * the invoice has been finalized and sent to the recipient. 062 */ 063 ISSUED, 064 /** 065 * the invoice has been balaced / completely paid. 066 */ 067 BALANCED, 068 /** 069 * the invoice was cancelled. 070 */ 071 CANCELLED, 072 /** 073 * the invoice was determined as entered in error before it was issued. 074 */ 075 ENTEREDINERROR, 076 /** 077 * added to help the parsers with the generic types 078 */ 079 NULL; 080 public static InvoiceStatus fromCode(String codeString) throws FHIRException { 081 if (codeString == null || "".equals(codeString)) 082 return null; 083 if ("draft".equals(codeString)) 084 return DRAFT; 085 if ("issued".equals(codeString)) 086 return ISSUED; 087 if ("balanced".equals(codeString)) 088 return BALANCED; 089 if ("cancelled".equals(codeString)) 090 return CANCELLED; 091 if ("entered-in-error".equals(codeString)) 092 return ENTEREDINERROR; 093 if (Configuration.isAcceptInvalidEnums()) 094 return null; 095 else 096 throw new FHIRException("Unknown InvoiceStatus code '"+codeString+"'"); 097 } 098 public String toCode() { 099 switch (this) { 100 case DRAFT: return "draft"; 101 case ISSUED: return "issued"; 102 case BALANCED: return "balanced"; 103 case CANCELLED: return "cancelled"; 104 case ENTEREDINERROR: return "entered-in-error"; 105 default: return "?"; 106 } 107 } 108 public String getSystem() { 109 switch (this) { 110 case DRAFT: return "http://hl7.org/fhir/invoice-status"; 111 case ISSUED: return "http://hl7.org/fhir/invoice-status"; 112 case BALANCED: return "http://hl7.org/fhir/invoice-status"; 113 case CANCELLED: return "http://hl7.org/fhir/invoice-status"; 114 case ENTEREDINERROR: return "http://hl7.org/fhir/invoice-status"; 115 default: return "?"; 116 } 117 } 118 public String getDefinition() { 119 switch (this) { 120 case DRAFT: return "the invoice has been prepared but not yet finalized."; 121 case ISSUED: return "the invoice has been finalized and sent to the recipient."; 122 case BALANCED: return "the invoice has been balaced / completely paid."; 123 case CANCELLED: return "the invoice was cancelled."; 124 case ENTEREDINERROR: return "the invoice was determined as entered in error before it was issued."; 125 default: return "?"; 126 } 127 } 128 public String getDisplay() { 129 switch (this) { 130 case DRAFT: return "draft"; 131 case ISSUED: return "issued"; 132 case BALANCED: return "balanced"; 133 case CANCELLED: return "cancelled"; 134 case ENTEREDINERROR: return "entered in error"; 135 default: return "?"; 136 } 137 } 138 } 139 140 public static class InvoiceStatusEnumFactory implements EnumFactory<InvoiceStatus> { 141 public InvoiceStatus fromCode(String codeString) throws IllegalArgumentException { 142 if (codeString == null || "".equals(codeString)) 143 if (codeString == null || "".equals(codeString)) 144 return null; 145 if ("draft".equals(codeString)) 146 return InvoiceStatus.DRAFT; 147 if ("issued".equals(codeString)) 148 return InvoiceStatus.ISSUED; 149 if ("balanced".equals(codeString)) 150 return InvoiceStatus.BALANCED; 151 if ("cancelled".equals(codeString)) 152 return InvoiceStatus.CANCELLED; 153 if ("entered-in-error".equals(codeString)) 154 return InvoiceStatus.ENTEREDINERROR; 155 throw new IllegalArgumentException("Unknown InvoiceStatus code '"+codeString+"'"); 156 } 157 public Enumeration<InvoiceStatus> fromType(Base code) throws FHIRException { 158 if (code == null) 159 return null; 160 if (code.isEmpty()) 161 return new Enumeration<InvoiceStatus>(this); 162 String codeString = ((PrimitiveType) code).asStringValue(); 163 if (codeString == null || "".equals(codeString)) 164 return null; 165 if ("draft".equals(codeString)) 166 return new Enumeration<InvoiceStatus>(this, InvoiceStatus.DRAFT); 167 if ("issued".equals(codeString)) 168 return new Enumeration<InvoiceStatus>(this, InvoiceStatus.ISSUED); 169 if ("balanced".equals(codeString)) 170 return new Enumeration<InvoiceStatus>(this, InvoiceStatus.BALANCED); 171 if ("cancelled".equals(codeString)) 172 return new Enumeration<InvoiceStatus>(this, InvoiceStatus.CANCELLED); 173 if ("entered-in-error".equals(codeString)) 174 return new Enumeration<InvoiceStatus>(this, InvoiceStatus.ENTEREDINERROR); 175 throw new FHIRException("Unknown InvoiceStatus code '"+codeString+"'"); 176 } 177 public String toCode(InvoiceStatus code) { 178 if (code == InvoiceStatus.DRAFT) 179 return "draft"; 180 if (code == InvoiceStatus.ISSUED) 181 return "issued"; 182 if (code == InvoiceStatus.BALANCED) 183 return "balanced"; 184 if (code == InvoiceStatus.CANCELLED) 185 return "cancelled"; 186 if (code == InvoiceStatus.ENTEREDINERROR) 187 return "entered-in-error"; 188 return "?"; 189 } 190 public String toSystem(InvoiceStatus code) { 191 return code.getSystem(); 192 } 193 } 194 195 public enum InvoicePriceComponentType { 196 /** 197 * the amount is the base price used for calculating the total price before applying surcharges, discount or taxes. 198 */ 199 BASE, 200 /** 201 * the amount is a surcharge applied on the base price. 202 */ 203 SURCHARGE, 204 /** 205 * the amount is a deduction applied on the base price. 206 */ 207 DEDUCTION, 208 /** 209 * the amount is a discount applied on the base price. 210 */ 211 DISCOUNT, 212 /** 213 * the amount is the tax component of the total price. 214 */ 215 TAX, 216 /** 217 * the amount is of informational character, it has not been applied in the calculation of the total price. 218 */ 219 INFORMATIONAL, 220 /** 221 * added to help the parsers with the generic types 222 */ 223 NULL; 224 public static InvoicePriceComponentType fromCode(String codeString) throws FHIRException { 225 if (codeString == null || "".equals(codeString)) 226 return null; 227 if ("base".equals(codeString)) 228 return BASE; 229 if ("surcharge".equals(codeString)) 230 return SURCHARGE; 231 if ("deduction".equals(codeString)) 232 return DEDUCTION; 233 if ("discount".equals(codeString)) 234 return DISCOUNT; 235 if ("tax".equals(codeString)) 236 return TAX; 237 if ("informational".equals(codeString)) 238 return INFORMATIONAL; 239 if (Configuration.isAcceptInvalidEnums()) 240 return null; 241 else 242 throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'"); 243 } 244 public String toCode() { 245 switch (this) { 246 case BASE: return "base"; 247 case SURCHARGE: return "surcharge"; 248 case DEDUCTION: return "deduction"; 249 case DISCOUNT: return "discount"; 250 case TAX: return "tax"; 251 case INFORMATIONAL: return "informational"; 252 default: return "?"; 253 } 254 } 255 public String getSystem() { 256 switch (this) { 257 case BASE: return "http://hl7.org/fhir/invoice-priceComponentType"; 258 case SURCHARGE: return "http://hl7.org/fhir/invoice-priceComponentType"; 259 case DEDUCTION: return "http://hl7.org/fhir/invoice-priceComponentType"; 260 case DISCOUNT: return "http://hl7.org/fhir/invoice-priceComponentType"; 261 case TAX: return "http://hl7.org/fhir/invoice-priceComponentType"; 262 case INFORMATIONAL: return "http://hl7.org/fhir/invoice-priceComponentType"; 263 default: return "?"; 264 } 265 } 266 public String getDefinition() { 267 switch (this) { 268 case BASE: return "the amount is the base price used for calculating the total price before applying surcharges, discount or taxes."; 269 case SURCHARGE: return "the amount is a surcharge applied on the base price."; 270 case DEDUCTION: return "the amount is a deduction applied on the base price."; 271 case DISCOUNT: return "the amount is a discount applied on the base price."; 272 case TAX: return "the amount is the tax component of the total price."; 273 case INFORMATIONAL: return "the amount is of informational character, it has not been applied in the calculation of the total price."; 274 default: return "?"; 275 } 276 } 277 public String getDisplay() { 278 switch (this) { 279 case BASE: return "base price"; 280 case SURCHARGE: return "surcharge"; 281 case DEDUCTION: return "deduction"; 282 case DISCOUNT: return "discount"; 283 case TAX: return "tax"; 284 case INFORMATIONAL: return "informational"; 285 default: return "?"; 286 } 287 } 288 } 289 290 public static class InvoicePriceComponentTypeEnumFactory implements EnumFactory<InvoicePriceComponentType> { 291 public InvoicePriceComponentType fromCode(String codeString) throws IllegalArgumentException { 292 if (codeString == null || "".equals(codeString)) 293 if (codeString == null || "".equals(codeString)) 294 return null; 295 if ("base".equals(codeString)) 296 return InvoicePriceComponentType.BASE; 297 if ("surcharge".equals(codeString)) 298 return InvoicePriceComponentType.SURCHARGE; 299 if ("deduction".equals(codeString)) 300 return InvoicePriceComponentType.DEDUCTION; 301 if ("discount".equals(codeString)) 302 return InvoicePriceComponentType.DISCOUNT; 303 if ("tax".equals(codeString)) 304 return InvoicePriceComponentType.TAX; 305 if ("informational".equals(codeString)) 306 return InvoicePriceComponentType.INFORMATIONAL; 307 throw new IllegalArgumentException("Unknown InvoicePriceComponentType code '"+codeString+"'"); 308 } 309 public Enumeration<InvoicePriceComponentType> fromType(Base code) throws FHIRException { 310 if (code == null) 311 return null; 312 if (code.isEmpty()) 313 return new Enumeration<InvoicePriceComponentType>(this); 314 String codeString = ((PrimitiveType) code).asStringValue(); 315 if (codeString == null || "".equals(codeString)) 316 return null; 317 if ("base".equals(codeString)) 318 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.BASE); 319 if ("surcharge".equals(codeString)) 320 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.SURCHARGE); 321 if ("deduction".equals(codeString)) 322 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DEDUCTION); 323 if ("discount".equals(codeString)) 324 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DISCOUNT); 325 if ("tax".equals(codeString)) 326 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.TAX); 327 if ("informational".equals(codeString)) 328 return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.INFORMATIONAL); 329 throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'"); 330 } 331 public String toCode(InvoicePriceComponentType code) { 332 if (code == InvoicePriceComponentType.BASE) 333 return "base"; 334 if (code == InvoicePriceComponentType.SURCHARGE) 335 return "surcharge"; 336 if (code == InvoicePriceComponentType.DEDUCTION) 337 return "deduction"; 338 if (code == InvoicePriceComponentType.DISCOUNT) 339 return "discount"; 340 if (code == InvoicePriceComponentType.TAX) 341 return "tax"; 342 if (code == InvoicePriceComponentType.INFORMATIONAL) 343 return "informational"; 344 return "?"; 345 } 346 public String toSystem(InvoicePriceComponentType code) { 347 return code.getSystem(); 348 } 349 } 350 351 @Block() 352 public static class InvoiceParticipantComponent extends BackboneElement implements IBaseBackboneElement { 353 /** 354 * Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device. 355 */ 356 @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 357 @Description(shortDefinition="Type of involvement in creation of this Invoice", formalDefinition="Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device." ) 358 protected CodeableConcept role; 359 360 /** 361 * The device, practitioner, etc. who performed or participated in the service. 362 */ 363 @Child(name = "actor", type = {Practitioner.class, Organization.class, Patient.class, PractitionerRole.class, Device.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) 364 @Description(shortDefinition="Individual who was involved", formalDefinition="The device, practitioner, etc. who performed or participated in the service." ) 365 protected Reference actor; 366 367 /** 368 * The actual object that is the target of the reference (The device, practitioner, etc. who performed or participated in the service.) 369 */ 370 protected Resource actorTarget; 371 372 private static final long serialVersionUID = 805521719L; 373 374 /** 375 * Constructor 376 */ 377 public InvoiceParticipantComponent() { 378 super(); 379 } 380 381 /** 382 * Constructor 383 */ 384 public InvoiceParticipantComponent(Reference actor) { 385 super(); 386 this.actor = actor; 387 } 388 389 /** 390 * @return {@link #role} (Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.) 391 */ 392 public CodeableConcept getRole() { 393 if (this.role == null) 394 if (Configuration.errorOnAutoCreate()) 395 throw new Error("Attempt to auto-create InvoiceParticipantComponent.role"); 396 else if (Configuration.doAutoCreate()) 397 this.role = new CodeableConcept(); // cc 398 return this.role; 399 } 400 401 public boolean hasRole() { 402 return this.role != null && !this.role.isEmpty(); 403 } 404 405 /** 406 * @param value {@link #role} (Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.) 407 */ 408 public InvoiceParticipantComponent setRole(CodeableConcept value) { 409 this.role = value; 410 return this; 411 } 412 413 /** 414 * @return {@link #actor} (The device, practitioner, etc. who performed or participated in the service.) 415 */ 416 public Reference getActor() { 417 if (this.actor == null) 418 if (Configuration.errorOnAutoCreate()) 419 throw new Error("Attempt to auto-create InvoiceParticipantComponent.actor"); 420 else if (Configuration.doAutoCreate()) 421 this.actor = new Reference(); // cc 422 return this.actor; 423 } 424 425 public boolean hasActor() { 426 return this.actor != null && !this.actor.isEmpty(); 427 } 428 429 /** 430 * @param value {@link #actor} (The device, practitioner, etc. who performed or participated in the service.) 431 */ 432 public InvoiceParticipantComponent setActor(Reference value) { 433 this.actor = value; 434 return this; 435 } 436 437 /** 438 * @return {@link #actor} 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 device, practitioner, etc. who performed or participated in the service.) 439 */ 440 public Resource getActorTarget() { 441 return this.actorTarget; 442 } 443 444 /** 445 * @param value {@link #actor} 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 device, practitioner, etc. who performed or participated in the service.) 446 */ 447 public InvoiceParticipantComponent setActorTarget(Resource value) { 448 this.actorTarget = value; 449 return this; 450 } 451 452 protected void listChildren(List<Property> children) { 453 super.listChildren(children); 454 children.add(new Property("role", "CodeableConcept", "Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.", 0, 1, role)); 455 children.add(new Property("actor", "Reference(Practitioner|Organization|Patient|PractitionerRole|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor)); 456 } 457 458 @Override 459 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 460 switch (_hash) { 461 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.", 0, 1, role); 462 case 92645877: /*actor*/ return new Property("actor", "Reference(Practitioner|Organization|Patient|PractitionerRole|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor); 463 default: return super.getNamedProperty(_hash, _name, _checkValid); 464 } 465 466 } 467 468 @Override 469 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 470 switch (hash) { 471 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 472 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 473 default: return super.getProperty(hash, name, checkValid); 474 } 475 476 } 477 478 @Override 479 public Base setProperty(int hash, String name, Base value) throws FHIRException { 480 switch (hash) { 481 case 3506294: // role 482 this.role = castToCodeableConcept(value); // CodeableConcept 483 return value; 484 case 92645877: // actor 485 this.actor = castToReference(value); // Reference 486 return value; 487 default: return super.setProperty(hash, name, value); 488 } 489 490 } 491 492 @Override 493 public Base setProperty(String name, Base value) throws FHIRException { 494 if (name.equals("role")) { 495 this.role = castToCodeableConcept(value); // CodeableConcept 496 } else if (name.equals("actor")) { 497 this.actor = castToReference(value); // Reference 498 } else 499 return super.setProperty(name, value); 500 return value; 501 } 502 503 @Override 504 public Base makeProperty(int hash, String name) throws FHIRException { 505 switch (hash) { 506 case 3506294: return getRole(); 507 case 92645877: return getActor(); 508 default: return super.makeProperty(hash, name); 509 } 510 511 } 512 513 @Override 514 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 515 switch (hash) { 516 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 517 case 92645877: /*actor*/ return new String[] {"Reference"}; 518 default: return super.getTypesForProperty(hash, name); 519 } 520 521 } 522 523 @Override 524 public Base addChild(String name) throws FHIRException { 525 if (name.equals("role")) { 526 this.role = new CodeableConcept(); 527 return this.role; 528 } 529 else if (name.equals("actor")) { 530 this.actor = new Reference(); 531 return this.actor; 532 } 533 else 534 return super.addChild(name); 535 } 536 537 public InvoiceParticipantComponent copy() { 538 InvoiceParticipantComponent dst = new InvoiceParticipantComponent(); 539 copyValues(dst); 540 return dst; 541 } 542 543 public void copyValues(InvoiceParticipantComponent dst) { 544 super.copyValues(dst); 545 dst.role = role == null ? null : role.copy(); 546 dst.actor = actor == null ? null : actor.copy(); 547 } 548 549 @Override 550 public boolean equalsDeep(Base other_) { 551 if (!super.equalsDeep(other_)) 552 return false; 553 if (!(other_ instanceof InvoiceParticipantComponent)) 554 return false; 555 InvoiceParticipantComponent o = (InvoiceParticipantComponent) other_; 556 return compareDeep(role, o.role, true) && compareDeep(actor, o.actor, true); 557 } 558 559 @Override 560 public boolean equalsShallow(Base other_) { 561 if (!super.equalsShallow(other_)) 562 return false; 563 if (!(other_ instanceof InvoiceParticipantComponent)) 564 return false; 565 InvoiceParticipantComponent o = (InvoiceParticipantComponent) other_; 566 return true; 567 } 568 569 public boolean isEmpty() { 570 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, actor); 571 } 572 573 public String fhirType() { 574 return "Invoice.participant"; 575 576 } 577 578 } 579 580 @Block() 581 public static class InvoiceLineItemComponent extends BackboneElement implements IBaseBackboneElement { 582 /** 583 * Sequence in which the items appear on the invoice. 584 */ 585 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 586 @Description(shortDefinition="Sequence number of line item", formalDefinition="Sequence in which the items appear on the invoice." ) 587 protected PositiveIntType sequence; 588 589 /** 590 * The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference. 591 */ 592 @Child(name = "chargeItem", type = {ChargeItem.class, CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 593 @Description(shortDefinition="Reference to ChargeItem containing details of this line item or an inline billing code", formalDefinition="The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference." ) 594 protected Type chargeItem; 595 596 /** 597 * The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated. 598 */ 599 @Child(name = "priceComponent", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 600 @Description(shortDefinition="Components of total line item price", formalDefinition="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated." ) 601 protected List<InvoiceLineItemPriceComponentComponent> priceComponent; 602 603 private static final long serialVersionUID = -1013610189L; 604 605 /** 606 * Constructor 607 */ 608 public InvoiceLineItemComponent() { 609 super(); 610 } 611 612 /** 613 * Constructor 614 */ 615 public InvoiceLineItemComponent(Type chargeItem) { 616 super(); 617 this.chargeItem = chargeItem; 618 } 619 620 /** 621 * @return {@link #sequence} (Sequence in which the items appear on the invoice.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 622 */ 623 public PositiveIntType getSequenceElement() { 624 if (this.sequence == null) 625 if (Configuration.errorOnAutoCreate()) 626 throw new Error("Attempt to auto-create InvoiceLineItemComponent.sequence"); 627 else if (Configuration.doAutoCreate()) 628 this.sequence = new PositiveIntType(); // bb 629 return this.sequence; 630 } 631 632 public boolean hasSequenceElement() { 633 return this.sequence != null && !this.sequence.isEmpty(); 634 } 635 636 public boolean hasSequence() { 637 return this.sequence != null && !this.sequence.isEmpty(); 638 } 639 640 /** 641 * @param value {@link #sequence} (Sequence in which the items appear on the invoice.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 642 */ 643 public InvoiceLineItemComponent setSequenceElement(PositiveIntType value) { 644 this.sequence = value; 645 return this; 646 } 647 648 /** 649 * @return Sequence in which the items appear on the invoice. 650 */ 651 public int getSequence() { 652 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 653 } 654 655 /** 656 * @param value Sequence in which the items appear on the invoice. 657 */ 658 public InvoiceLineItemComponent setSequence(int value) { 659 if (this.sequence == null) 660 this.sequence = new PositiveIntType(); 661 this.sequence.setValue(value); 662 return this; 663 } 664 665 /** 666 * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.) 667 */ 668 public Type getChargeItem() { 669 return this.chargeItem; 670 } 671 672 /** 673 * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.) 674 */ 675 public Reference getChargeItemReference() throws FHIRException { 676 if (this.chargeItem == null) 677 this.chargeItem = new Reference(); 678 if (!(this.chargeItem instanceof Reference)) 679 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.chargeItem.getClass().getName()+" was encountered"); 680 return (Reference) this.chargeItem; 681 } 682 683 public boolean hasChargeItemReference() { 684 return this != null && this.chargeItem instanceof Reference; 685 } 686 687 /** 688 * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.) 689 */ 690 public CodeableConcept getChargeItemCodeableConcept() throws FHIRException { 691 if (this.chargeItem == null) 692 this.chargeItem = new CodeableConcept(); 693 if (!(this.chargeItem instanceof CodeableConcept)) 694 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.chargeItem.getClass().getName()+" was encountered"); 695 return (CodeableConcept) this.chargeItem; 696 } 697 698 public boolean hasChargeItemCodeableConcept() { 699 return this != null && this.chargeItem instanceof CodeableConcept; 700 } 701 702 public boolean hasChargeItem() { 703 return this.chargeItem != null && !this.chargeItem.isEmpty(); 704 } 705 706 /** 707 * @param value {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.) 708 */ 709 public InvoiceLineItemComponent setChargeItem(Type value) { 710 if (value != null && !(value instanceof Reference || value instanceof CodeableConcept)) 711 throw new Error("Not the right type for Invoice.lineItem.chargeItem[x]: "+value.fhirType()); 712 this.chargeItem = value; 713 return this; 714 } 715 716 /** 717 * @return {@link #priceComponent} (The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.) 718 */ 719 public List<InvoiceLineItemPriceComponentComponent> getPriceComponent() { 720 if (this.priceComponent == null) 721 this.priceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 722 return this.priceComponent; 723 } 724 725 /** 726 * @return Returns a reference to <code>this</code> for easy method chaining 727 */ 728 public InvoiceLineItemComponent setPriceComponent(List<InvoiceLineItemPriceComponentComponent> thePriceComponent) { 729 this.priceComponent = thePriceComponent; 730 return this; 731 } 732 733 public boolean hasPriceComponent() { 734 if (this.priceComponent == null) 735 return false; 736 for (InvoiceLineItemPriceComponentComponent item : this.priceComponent) 737 if (!item.isEmpty()) 738 return true; 739 return false; 740 } 741 742 public InvoiceLineItemPriceComponentComponent addPriceComponent() { //3 743 InvoiceLineItemPriceComponentComponent t = new InvoiceLineItemPriceComponentComponent(); 744 if (this.priceComponent == null) 745 this.priceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 746 this.priceComponent.add(t); 747 return t; 748 } 749 750 public InvoiceLineItemComponent addPriceComponent(InvoiceLineItemPriceComponentComponent t) { //3 751 if (t == null) 752 return this; 753 if (this.priceComponent == null) 754 this.priceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 755 this.priceComponent.add(t); 756 return this; 757 } 758 759 /** 760 * @return The first repetition of repeating field {@link #priceComponent}, creating it if it does not already exist 761 */ 762 public InvoiceLineItemPriceComponentComponent getPriceComponentFirstRep() { 763 if (getPriceComponent().isEmpty()) { 764 addPriceComponent(); 765 } 766 return getPriceComponent().get(0); 767 } 768 769 protected void listChildren(List<Property> children) { 770 super.listChildren(children); 771 children.add(new Property("sequence", "positiveInt", "Sequence in which the items appear on the invoice.", 0, 1, sequence)); 772 children.add(new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem)); 773 children.add(new Property("priceComponent", "", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent)); 774 } 775 776 @Override 777 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 778 switch (_hash) { 779 case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Sequence in which the items appear on the invoice.", 0, 1, sequence); 780 case 351104825: /*chargeItem[x]*/ return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem); 781 case 1417779175: /*chargeItem*/ return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem); 782 case 753580836: /*chargeItemReference*/ return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem); 783 case 1226532026: /*chargeItemCodeableConcept*/ return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem); 784 case 1219095988: /*priceComponent*/ return new Property("priceComponent", "", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent); 785 default: return super.getNamedProperty(_hash, _name, _checkValid); 786 } 787 788 } 789 790 @Override 791 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 792 switch (hash) { 793 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 794 case 1417779175: /*chargeItem*/ return this.chargeItem == null ? new Base[0] : new Base[] {this.chargeItem}; // Type 795 case 1219095988: /*priceComponent*/ return this.priceComponent == null ? new Base[0] : this.priceComponent.toArray(new Base[this.priceComponent.size()]); // InvoiceLineItemPriceComponentComponent 796 default: return super.getProperty(hash, name, checkValid); 797 } 798 799 } 800 801 @Override 802 public Base setProperty(int hash, String name, Base value) throws FHIRException { 803 switch (hash) { 804 case 1349547969: // sequence 805 this.sequence = castToPositiveInt(value); // PositiveIntType 806 return value; 807 case 1417779175: // chargeItem 808 this.chargeItem = castToType(value); // Type 809 return value; 810 case 1219095988: // priceComponent 811 this.getPriceComponent().add((InvoiceLineItemPriceComponentComponent) value); // InvoiceLineItemPriceComponentComponent 812 return value; 813 default: return super.setProperty(hash, name, value); 814 } 815 816 } 817 818 @Override 819 public Base setProperty(String name, Base value) throws FHIRException { 820 if (name.equals("sequence")) { 821 this.sequence = castToPositiveInt(value); // PositiveIntType 822 } else if (name.equals("chargeItem[x]")) { 823 this.chargeItem = castToType(value); // Type 824 } else if (name.equals("priceComponent")) { 825 this.getPriceComponent().add((InvoiceLineItemPriceComponentComponent) value); 826 } else 827 return super.setProperty(name, value); 828 return value; 829 } 830 831 @Override 832 public Base makeProperty(int hash, String name) throws FHIRException { 833 switch (hash) { 834 case 1349547969: return getSequenceElement(); 835 case 351104825: return getChargeItem(); 836 case 1417779175: return getChargeItem(); 837 case 1219095988: return addPriceComponent(); 838 default: return super.makeProperty(hash, name); 839 } 840 841 } 842 843 @Override 844 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 845 switch (hash) { 846 case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; 847 case 1417779175: /*chargeItem*/ return new String[] {"Reference", "CodeableConcept"}; 848 case 1219095988: /*priceComponent*/ return new String[] {}; 849 default: return super.getTypesForProperty(hash, name); 850 } 851 852 } 853 854 @Override 855 public Base addChild(String name) throws FHIRException { 856 if (name.equals("sequence")) { 857 throw new FHIRException("Cannot call addChild on a primitive type Invoice.sequence"); 858 } 859 else if (name.equals("chargeItemReference")) { 860 this.chargeItem = new Reference(); 861 return this.chargeItem; 862 } 863 else if (name.equals("chargeItemCodeableConcept")) { 864 this.chargeItem = new CodeableConcept(); 865 return this.chargeItem; 866 } 867 else if (name.equals("priceComponent")) { 868 return addPriceComponent(); 869 } 870 else 871 return super.addChild(name); 872 } 873 874 public InvoiceLineItemComponent copy() { 875 InvoiceLineItemComponent dst = new InvoiceLineItemComponent(); 876 copyValues(dst); 877 return dst; 878 } 879 880 public void copyValues(InvoiceLineItemComponent dst) { 881 super.copyValues(dst); 882 dst.sequence = sequence == null ? null : sequence.copy(); 883 dst.chargeItem = chargeItem == null ? null : chargeItem.copy(); 884 if (priceComponent != null) { 885 dst.priceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 886 for (InvoiceLineItemPriceComponentComponent i : priceComponent) 887 dst.priceComponent.add(i.copy()); 888 }; 889 } 890 891 @Override 892 public boolean equalsDeep(Base other_) { 893 if (!super.equalsDeep(other_)) 894 return false; 895 if (!(other_ instanceof InvoiceLineItemComponent)) 896 return false; 897 InvoiceLineItemComponent o = (InvoiceLineItemComponent) other_; 898 return compareDeep(sequence, o.sequence, true) && compareDeep(chargeItem, o.chargeItem, true) && compareDeep(priceComponent, o.priceComponent, true) 899 ; 900 } 901 902 @Override 903 public boolean equalsShallow(Base other_) { 904 if (!super.equalsShallow(other_)) 905 return false; 906 if (!(other_ instanceof InvoiceLineItemComponent)) 907 return false; 908 InvoiceLineItemComponent o = (InvoiceLineItemComponent) other_; 909 return compareValues(sequence, o.sequence, true); 910 } 911 912 public boolean isEmpty() { 913 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, chargeItem, priceComponent 914 ); 915 } 916 917 public String fhirType() { 918 return "Invoice.lineItem"; 919 920 } 921 922 } 923 924 @Block() 925 public static class InvoiceLineItemPriceComponentComponent extends BackboneElement implements IBaseBackboneElement { 926 /** 927 * This code identifies the type of the component. 928 */ 929 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 930 @Description(shortDefinition="base | surcharge | deduction | discount | tax | informational", formalDefinition="This code identifies the type of the component." ) 931 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/invoice-priceComponentType") 932 protected Enumeration<InvoicePriceComponentType> type; 933 934 /** 935 * A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc. 936 */ 937 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 938 @Description(shortDefinition="Code identifying the specific component", formalDefinition="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc." ) 939 protected CodeableConcept code; 940 941 /** 942 * The factor that has been applied on the base price for calculating this component. 943 */ 944 @Child(name = "factor", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) 945 @Description(shortDefinition="Factor used for calculating this component", formalDefinition="The factor that has been applied on the base price for calculating this component." ) 946 protected DecimalType factor; 947 948 /** 949 * The amount calculated for this component. 950 */ 951 @Child(name = "amount", type = {Money.class}, order=4, min=0, max=1, modifier=false, summary=false) 952 @Description(shortDefinition="Monetary amount associated with this component", formalDefinition="The amount calculated for this component." ) 953 protected Money amount; 954 955 private static final long serialVersionUID = 1223988958L; 956 957 /** 958 * Constructor 959 */ 960 public InvoiceLineItemPriceComponentComponent() { 961 super(); 962 } 963 964 /** 965 * Constructor 966 */ 967 public InvoiceLineItemPriceComponentComponent(Enumeration<InvoicePriceComponentType> type) { 968 super(); 969 this.type = type; 970 } 971 972 /** 973 * @return {@link #type} (This code identifies the type of the component.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 974 */ 975 public Enumeration<InvoicePriceComponentType> getTypeElement() { 976 if (this.type == null) 977 if (Configuration.errorOnAutoCreate()) 978 throw new Error("Attempt to auto-create InvoiceLineItemPriceComponentComponent.type"); 979 else if (Configuration.doAutoCreate()) 980 this.type = new Enumeration<InvoicePriceComponentType>(new InvoicePriceComponentTypeEnumFactory()); // bb 981 return this.type; 982 } 983 984 public boolean hasTypeElement() { 985 return this.type != null && !this.type.isEmpty(); 986 } 987 988 public boolean hasType() { 989 return this.type != null && !this.type.isEmpty(); 990 } 991 992 /** 993 * @param value {@link #type} (This code identifies the type of the component.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 994 */ 995 public InvoiceLineItemPriceComponentComponent setTypeElement(Enumeration<InvoicePriceComponentType> value) { 996 this.type = value; 997 return this; 998 } 999 1000 /** 1001 * @return This code identifies the type of the component. 1002 */ 1003 public InvoicePriceComponentType getType() { 1004 return this.type == null ? null : this.type.getValue(); 1005 } 1006 1007 /** 1008 * @param value This code identifies the type of the component. 1009 */ 1010 public InvoiceLineItemPriceComponentComponent setType(InvoicePriceComponentType value) { 1011 if (this.type == null) 1012 this.type = new Enumeration<InvoicePriceComponentType>(new InvoicePriceComponentTypeEnumFactory()); 1013 this.type.setValue(value); 1014 return this; 1015 } 1016 1017 /** 1018 * @return {@link #code} (A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.) 1019 */ 1020 public CodeableConcept getCode() { 1021 if (this.code == null) 1022 if (Configuration.errorOnAutoCreate()) 1023 throw new Error("Attempt to auto-create InvoiceLineItemPriceComponentComponent.code"); 1024 else if (Configuration.doAutoCreate()) 1025 this.code = new CodeableConcept(); // cc 1026 return this.code; 1027 } 1028 1029 public boolean hasCode() { 1030 return this.code != null && !this.code.isEmpty(); 1031 } 1032 1033 /** 1034 * @param value {@link #code} (A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.) 1035 */ 1036 public InvoiceLineItemPriceComponentComponent setCode(CodeableConcept value) { 1037 this.code = value; 1038 return this; 1039 } 1040 1041 /** 1042 * @return {@link #factor} (The factor that has been applied on the base price for calculating this component.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 1043 */ 1044 public DecimalType getFactorElement() { 1045 if (this.factor == null) 1046 if (Configuration.errorOnAutoCreate()) 1047 throw new Error("Attempt to auto-create InvoiceLineItemPriceComponentComponent.factor"); 1048 else if (Configuration.doAutoCreate()) 1049 this.factor = new DecimalType(); // bb 1050 return this.factor; 1051 } 1052 1053 public boolean hasFactorElement() { 1054 return this.factor != null && !this.factor.isEmpty(); 1055 } 1056 1057 public boolean hasFactor() { 1058 return this.factor != null && !this.factor.isEmpty(); 1059 } 1060 1061 /** 1062 * @param value {@link #factor} (The factor that has been applied on the base price for calculating this component.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 1063 */ 1064 public InvoiceLineItemPriceComponentComponent setFactorElement(DecimalType value) { 1065 this.factor = value; 1066 return this; 1067 } 1068 1069 /** 1070 * @return The factor that has been applied on the base price for calculating this component. 1071 */ 1072 public BigDecimal getFactor() { 1073 return this.factor == null ? null : this.factor.getValue(); 1074 } 1075 1076 /** 1077 * @param value The factor that has been applied on the base price for calculating this component. 1078 */ 1079 public InvoiceLineItemPriceComponentComponent setFactor(BigDecimal value) { 1080 if (value == null) 1081 this.factor = null; 1082 else { 1083 if (this.factor == null) 1084 this.factor = new DecimalType(); 1085 this.factor.setValue(value); 1086 } 1087 return this; 1088 } 1089 1090 /** 1091 * @param value The factor that has been applied on the base price for calculating this component. 1092 */ 1093 public InvoiceLineItemPriceComponentComponent setFactor(long value) { 1094 this.factor = new DecimalType(); 1095 this.factor.setValue(value); 1096 return this; 1097 } 1098 1099 /** 1100 * @param value The factor that has been applied on the base price for calculating this component. 1101 */ 1102 public InvoiceLineItemPriceComponentComponent setFactor(double value) { 1103 this.factor = new DecimalType(); 1104 this.factor.setValue(value); 1105 return this; 1106 } 1107 1108 /** 1109 * @return {@link #amount} (The amount calculated for this component.) 1110 */ 1111 public Money getAmount() { 1112 if (this.amount == null) 1113 if (Configuration.errorOnAutoCreate()) 1114 throw new Error("Attempt to auto-create InvoiceLineItemPriceComponentComponent.amount"); 1115 else if (Configuration.doAutoCreate()) 1116 this.amount = new Money(); // cc 1117 return this.amount; 1118 } 1119 1120 public boolean hasAmount() { 1121 return this.amount != null && !this.amount.isEmpty(); 1122 } 1123 1124 /** 1125 * @param value {@link #amount} (The amount calculated for this component.) 1126 */ 1127 public InvoiceLineItemPriceComponentComponent setAmount(Money value) { 1128 this.amount = value; 1129 return this; 1130 } 1131 1132 protected void listChildren(List<Property> children) { 1133 super.listChildren(children); 1134 children.add(new Property("type", "code", "This code identifies the type of the component.", 0, 1, type)); 1135 children.add(new Property("code", "CodeableConcept", "A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", 0, 1, code)); 1136 children.add(new Property("factor", "decimal", "The factor that has been applied on the base price for calculating this component.", 0, 1, factor)); 1137 children.add(new Property("amount", "Money", "The amount calculated for this component.", 0, 1, amount)); 1138 } 1139 1140 @Override 1141 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1142 switch (_hash) { 1143 case 3575610: /*type*/ return new Property("type", "code", "This code identifies the type of the component.", 0, 1, type); 1144 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", 0, 1, code); 1145 case -1282148017: /*factor*/ return new Property("factor", "decimal", "The factor that has been applied on the base price for calculating this component.", 0, 1, factor); 1146 case -1413853096: /*amount*/ return new Property("amount", "Money", "The amount calculated for this component.", 0, 1, amount); 1147 default: return super.getNamedProperty(_hash, _name, _checkValid); 1148 } 1149 1150 } 1151 1152 @Override 1153 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1154 switch (hash) { 1155 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<InvoicePriceComponentType> 1156 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1157 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 1158 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money 1159 default: return super.getProperty(hash, name, checkValid); 1160 } 1161 1162 } 1163 1164 @Override 1165 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1166 switch (hash) { 1167 case 3575610: // type 1168 value = new InvoicePriceComponentTypeEnumFactory().fromType(castToCode(value)); 1169 this.type = (Enumeration) value; // Enumeration<InvoicePriceComponentType> 1170 return value; 1171 case 3059181: // code 1172 this.code = castToCodeableConcept(value); // CodeableConcept 1173 return value; 1174 case -1282148017: // factor 1175 this.factor = castToDecimal(value); // DecimalType 1176 return value; 1177 case -1413853096: // amount 1178 this.amount = castToMoney(value); // Money 1179 return value; 1180 default: return super.setProperty(hash, name, value); 1181 } 1182 1183 } 1184 1185 @Override 1186 public Base setProperty(String name, Base value) throws FHIRException { 1187 if (name.equals("type")) { 1188 value = new InvoicePriceComponentTypeEnumFactory().fromType(castToCode(value)); 1189 this.type = (Enumeration) value; // Enumeration<InvoicePriceComponentType> 1190 } else if (name.equals("code")) { 1191 this.code = castToCodeableConcept(value); // CodeableConcept 1192 } else if (name.equals("factor")) { 1193 this.factor = castToDecimal(value); // DecimalType 1194 } else if (name.equals("amount")) { 1195 this.amount = castToMoney(value); // Money 1196 } else 1197 return super.setProperty(name, value); 1198 return value; 1199 } 1200 1201 @Override 1202 public Base makeProperty(int hash, String name) throws FHIRException { 1203 switch (hash) { 1204 case 3575610: return getTypeElement(); 1205 case 3059181: return getCode(); 1206 case -1282148017: return getFactorElement(); 1207 case -1413853096: return getAmount(); 1208 default: return super.makeProperty(hash, name); 1209 } 1210 1211 } 1212 1213 @Override 1214 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1215 switch (hash) { 1216 case 3575610: /*type*/ return new String[] {"code"}; 1217 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1218 case -1282148017: /*factor*/ return new String[] {"decimal"}; 1219 case -1413853096: /*amount*/ return new String[] {"Money"}; 1220 default: return super.getTypesForProperty(hash, name); 1221 } 1222 1223 } 1224 1225 @Override 1226 public Base addChild(String name) throws FHIRException { 1227 if (name.equals("type")) { 1228 throw new FHIRException("Cannot call addChild on a primitive type Invoice.type"); 1229 } 1230 else if (name.equals("code")) { 1231 this.code = new CodeableConcept(); 1232 return this.code; 1233 } 1234 else if (name.equals("factor")) { 1235 throw new FHIRException("Cannot call addChild on a primitive type Invoice.factor"); 1236 } 1237 else if (name.equals("amount")) { 1238 this.amount = new Money(); 1239 return this.amount; 1240 } 1241 else 1242 return super.addChild(name); 1243 } 1244 1245 public InvoiceLineItemPriceComponentComponent copy() { 1246 InvoiceLineItemPriceComponentComponent dst = new InvoiceLineItemPriceComponentComponent(); 1247 copyValues(dst); 1248 return dst; 1249 } 1250 1251 public void copyValues(InvoiceLineItemPriceComponentComponent dst) { 1252 super.copyValues(dst); 1253 dst.type = type == null ? null : type.copy(); 1254 dst.code = code == null ? null : code.copy(); 1255 dst.factor = factor == null ? null : factor.copy(); 1256 dst.amount = amount == null ? null : amount.copy(); 1257 } 1258 1259 @Override 1260 public boolean equalsDeep(Base other_) { 1261 if (!super.equalsDeep(other_)) 1262 return false; 1263 if (!(other_ instanceof InvoiceLineItemPriceComponentComponent)) 1264 return false; 1265 InvoiceLineItemPriceComponentComponent o = (InvoiceLineItemPriceComponentComponent) other_; 1266 return compareDeep(type, o.type, true) && compareDeep(code, o.code, true) && compareDeep(factor, o.factor, true) 1267 && compareDeep(amount, o.amount, true); 1268 } 1269 1270 @Override 1271 public boolean equalsShallow(Base other_) { 1272 if (!super.equalsShallow(other_)) 1273 return false; 1274 if (!(other_ instanceof InvoiceLineItemPriceComponentComponent)) 1275 return false; 1276 InvoiceLineItemPriceComponentComponent o = (InvoiceLineItemPriceComponentComponent) other_; 1277 return compareValues(type, o.type, true) && compareValues(factor, o.factor, true); 1278 } 1279 1280 public boolean isEmpty() { 1281 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, code, factor, amount 1282 ); 1283 } 1284 1285 public String fhirType() { 1286 return "Invoice.lineItem.priceComponent"; 1287 1288 } 1289 1290 } 1291 1292 /** 1293 * Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments. 1294 */ 1295 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1296 @Description(shortDefinition="Business Identifier for item", formalDefinition="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments." ) 1297 protected List<Identifier> identifier; 1298 1299 /** 1300 * The current state of the Invoice. 1301 */ 1302 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1303 @Description(shortDefinition="draft | issued | balanced | cancelled | entered-in-error", formalDefinition="The current state of the Invoice." ) 1304 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/invoice-status") 1305 protected Enumeration<InvoiceStatus> status; 1306 1307 /** 1308 * In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.). 1309 */ 1310 @Child(name = "cancelledReason", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1311 @Description(shortDefinition="Reason for cancellation of this Invoice", formalDefinition="In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.)." ) 1312 protected StringType cancelledReason; 1313 1314 /** 1315 * Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary). 1316 */ 1317 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 1318 @Description(shortDefinition="Type of Invoice", formalDefinition="Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary)." ) 1319 protected CodeableConcept type; 1320 1321 /** 1322 * The individual or set of individuals receiving the goods and services billed in this invoice. 1323 */ 1324 @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true) 1325 @Description(shortDefinition="Recipient(s) of goods and services", formalDefinition="The individual or set of individuals receiving the goods and services billed in this invoice." ) 1326 protected Reference subject; 1327 1328 /** 1329 * The actual object that is the target of the reference (The individual or set of individuals receiving the goods and services billed in this invoice.) 1330 */ 1331 protected Resource subjectTarget; 1332 1333 /** 1334 * The individual or Organization responsible for balancing of this invoice. 1335 */ 1336 @Child(name = "recipient", type = {Organization.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=1, modifier=false, summary=true) 1337 @Description(shortDefinition="Recipient of this invoice", formalDefinition="The individual or Organization responsible for balancing of this invoice." ) 1338 protected Reference recipient; 1339 1340 /** 1341 * The actual object that is the target of the reference (The individual or Organization responsible for balancing of this invoice.) 1342 */ 1343 protected Resource recipientTarget; 1344 1345 /** 1346 * Date/time(s) of when this Invoice was posted. 1347 */ 1348 @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 1349 @Description(shortDefinition="Invoice date / posting date", formalDefinition="Date/time(s) of when this Invoice was posted." ) 1350 protected DateTimeType date; 1351 1352 /** 1353 * Indicates who or what performed or participated in the charged service. 1354 */ 1355 @Child(name = "participant", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1356 @Description(shortDefinition="Participant in creation of this Invoice", formalDefinition="Indicates who or what performed or participated in the charged service." ) 1357 protected List<InvoiceParticipantComponent> participant; 1358 1359 /** 1360 * The organizationissuing the Invoice. 1361 */ 1362 @Child(name = "issuer", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=false) 1363 @Description(shortDefinition="Issuing Organization of Invoice", formalDefinition="The organizationissuing the Invoice." ) 1364 protected Reference issuer; 1365 1366 /** 1367 * The actual object that is the target of the reference (The organizationissuing the Invoice.) 1368 */ 1369 protected Organization issuerTarget; 1370 1371 /** 1372 * Account which is supposed to be balanced with this Invoice. 1373 */ 1374 @Child(name = "account", type = {Account.class}, order=9, min=0, max=1, modifier=false, summary=false) 1375 @Description(shortDefinition="Account that is being balanced", formalDefinition="Account which is supposed to be balanced with this Invoice." ) 1376 protected Reference account; 1377 1378 /** 1379 * The actual object that is the target of the reference (Account which is supposed to be balanced with this Invoice.) 1380 */ 1381 protected Account accountTarget; 1382 1383 /** 1384 * Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource. 1385 */ 1386 @Child(name = "lineItem", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1387 @Description(shortDefinition="Line items of this Invoice", formalDefinition="Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource." ) 1388 protected List<InvoiceLineItemComponent> lineItem; 1389 1390 /** 1391 * The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated. 1392 */ 1393 @Child(name = "totalPriceComponent", type = {InvoiceLineItemPriceComponentComponent.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1394 @Description(shortDefinition="Components of Invoice total", formalDefinition="The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated." ) 1395 protected List<InvoiceLineItemPriceComponentComponent> totalPriceComponent; 1396 1397 /** 1398 * Invoice total , taxes excluded. 1399 */ 1400 @Child(name = "totalNet", type = {Money.class}, order=12, min=0, max=1, modifier=false, summary=true) 1401 @Description(shortDefinition="Net total of this Invoice", formalDefinition="Invoice total , taxes excluded." ) 1402 protected Money totalNet; 1403 1404 /** 1405 * Invoice total, tax included. 1406 */ 1407 @Child(name = "totalGross", type = {Money.class}, order=13, min=0, max=1, modifier=false, summary=true) 1408 @Description(shortDefinition="Gross total of this Invoice", formalDefinition="Invoice total, tax included." ) 1409 protected Money totalGross; 1410 1411 /** 1412 * Payment details such as banking details, period of payment, deductibles, methods of payment. 1413 */ 1414 @Child(name = "paymentTerms", type = {MarkdownType.class}, order=14, min=0, max=1, modifier=false, summary=false) 1415 @Description(shortDefinition="Payment details", formalDefinition="Payment details such as banking details, period of payment, deductibles, methods of payment." ) 1416 protected MarkdownType paymentTerms; 1417 1418 /** 1419 * Comments made about the invoice by the issuer, subject, or other participants. 1420 */ 1421 @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1422 @Description(shortDefinition="Comments made about the invoice", formalDefinition="Comments made about the invoice by the issuer, subject, or other participants." ) 1423 protected List<Annotation> note; 1424 1425 private static final long serialVersionUID = -62357265L; 1426 1427 /** 1428 * Constructor 1429 */ 1430 public Invoice() { 1431 super(); 1432 } 1433 1434 /** 1435 * Constructor 1436 */ 1437 public Invoice(Enumeration<InvoiceStatus> status) { 1438 super(); 1439 this.status = status; 1440 } 1441 1442 /** 1443 * @return {@link #identifier} (Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.) 1444 */ 1445 public List<Identifier> getIdentifier() { 1446 if (this.identifier == null) 1447 this.identifier = new ArrayList<Identifier>(); 1448 return this.identifier; 1449 } 1450 1451 /** 1452 * @return Returns a reference to <code>this</code> for easy method chaining 1453 */ 1454 public Invoice setIdentifier(List<Identifier> theIdentifier) { 1455 this.identifier = theIdentifier; 1456 return this; 1457 } 1458 1459 public boolean hasIdentifier() { 1460 if (this.identifier == null) 1461 return false; 1462 for (Identifier item : this.identifier) 1463 if (!item.isEmpty()) 1464 return true; 1465 return false; 1466 } 1467 1468 public Identifier addIdentifier() { //3 1469 Identifier t = new Identifier(); 1470 if (this.identifier == null) 1471 this.identifier = new ArrayList<Identifier>(); 1472 this.identifier.add(t); 1473 return t; 1474 } 1475 1476 public Invoice addIdentifier(Identifier t) { //3 1477 if (t == null) 1478 return this; 1479 if (this.identifier == null) 1480 this.identifier = new ArrayList<Identifier>(); 1481 this.identifier.add(t); 1482 return this; 1483 } 1484 1485 /** 1486 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1487 */ 1488 public Identifier getIdentifierFirstRep() { 1489 if (getIdentifier().isEmpty()) { 1490 addIdentifier(); 1491 } 1492 return getIdentifier().get(0); 1493 } 1494 1495 /** 1496 * @return {@link #status} (The current state of the Invoice.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1497 */ 1498 public Enumeration<InvoiceStatus> getStatusElement() { 1499 if (this.status == null) 1500 if (Configuration.errorOnAutoCreate()) 1501 throw new Error("Attempt to auto-create Invoice.status"); 1502 else if (Configuration.doAutoCreate()) 1503 this.status = new Enumeration<InvoiceStatus>(new InvoiceStatusEnumFactory()); // bb 1504 return this.status; 1505 } 1506 1507 public boolean hasStatusElement() { 1508 return this.status != null && !this.status.isEmpty(); 1509 } 1510 1511 public boolean hasStatus() { 1512 return this.status != null && !this.status.isEmpty(); 1513 } 1514 1515 /** 1516 * @param value {@link #status} (The current state of the Invoice.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1517 */ 1518 public Invoice setStatusElement(Enumeration<InvoiceStatus> value) { 1519 this.status = value; 1520 return this; 1521 } 1522 1523 /** 1524 * @return The current state of the Invoice. 1525 */ 1526 public InvoiceStatus getStatus() { 1527 return this.status == null ? null : this.status.getValue(); 1528 } 1529 1530 /** 1531 * @param value The current state of the Invoice. 1532 */ 1533 public Invoice setStatus(InvoiceStatus value) { 1534 if (this.status == null) 1535 this.status = new Enumeration<InvoiceStatus>(new InvoiceStatusEnumFactory()); 1536 this.status.setValue(value); 1537 return this; 1538 } 1539 1540 /** 1541 * @return {@link #cancelledReason} (In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).). This is the underlying object with id, value and extensions. The accessor "getCancelledReason" gives direct access to the value 1542 */ 1543 public StringType getCancelledReasonElement() { 1544 if (this.cancelledReason == null) 1545 if (Configuration.errorOnAutoCreate()) 1546 throw new Error("Attempt to auto-create Invoice.cancelledReason"); 1547 else if (Configuration.doAutoCreate()) 1548 this.cancelledReason = new StringType(); // bb 1549 return this.cancelledReason; 1550 } 1551 1552 public boolean hasCancelledReasonElement() { 1553 return this.cancelledReason != null && !this.cancelledReason.isEmpty(); 1554 } 1555 1556 public boolean hasCancelledReason() { 1557 return this.cancelledReason != null && !this.cancelledReason.isEmpty(); 1558 } 1559 1560 /** 1561 * @param value {@link #cancelledReason} (In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).). This is the underlying object with id, value and extensions. The accessor "getCancelledReason" gives direct access to the value 1562 */ 1563 public Invoice setCancelledReasonElement(StringType value) { 1564 this.cancelledReason = value; 1565 return this; 1566 } 1567 1568 /** 1569 * @return In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.). 1570 */ 1571 public String getCancelledReason() { 1572 return this.cancelledReason == null ? null : this.cancelledReason.getValue(); 1573 } 1574 1575 /** 1576 * @param value In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.). 1577 */ 1578 public Invoice setCancelledReason(String value) { 1579 if (Utilities.noString(value)) 1580 this.cancelledReason = null; 1581 else { 1582 if (this.cancelledReason == null) 1583 this.cancelledReason = new StringType(); 1584 this.cancelledReason.setValue(value); 1585 } 1586 return this; 1587 } 1588 1589 /** 1590 * @return {@link #type} (Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).) 1591 */ 1592 public CodeableConcept getType() { 1593 if (this.type == null) 1594 if (Configuration.errorOnAutoCreate()) 1595 throw new Error("Attempt to auto-create Invoice.type"); 1596 else if (Configuration.doAutoCreate()) 1597 this.type = new CodeableConcept(); // cc 1598 return this.type; 1599 } 1600 1601 public boolean hasType() { 1602 return this.type != null && !this.type.isEmpty(); 1603 } 1604 1605 /** 1606 * @param value {@link #type} (Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).) 1607 */ 1608 public Invoice setType(CodeableConcept value) { 1609 this.type = value; 1610 return this; 1611 } 1612 1613 /** 1614 * @return {@link #subject} (The individual or set of individuals receiving the goods and services billed in this invoice.) 1615 */ 1616 public Reference getSubject() { 1617 if (this.subject == null) 1618 if (Configuration.errorOnAutoCreate()) 1619 throw new Error("Attempt to auto-create Invoice.subject"); 1620 else if (Configuration.doAutoCreate()) 1621 this.subject = new Reference(); // cc 1622 return this.subject; 1623 } 1624 1625 public boolean hasSubject() { 1626 return this.subject != null && !this.subject.isEmpty(); 1627 } 1628 1629 /** 1630 * @param value {@link #subject} (The individual or set of individuals receiving the goods and services billed in this invoice.) 1631 */ 1632 public Invoice setSubject(Reference value) { 1633 this.subject = value; 1634 return this; 1635 } 1636 1637 /** 1638 * @return {@link #subject} 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 individual or set of individuals receiving the goods and services billed in this invoice.) 1639 */ 1640 public Resource getSubjectTarget() { 1641 return this.subjectTarget; 1642 } 1643 1644 /** 1645 * @param value {@link #subject} 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 individual or set of individuals receiving the goods and services billed in this invoice.) 1646 */ 1647 public Invoice setSubjectTarget(Resource value) { 1648 this.subjectTarget = value; 1649 return this; 1650 } 1651 1652 /** 1653 * @return {@link #recipient} (The individual or Organization responsible for balancing of this invoice.) 1654 */ 1655 public Reference getRecipient() { 1656 if (this.recipient == null) 1657 if (Configuration.errorOnAutoCreate()) 1658 throw new Error("Attempt to auto-create Invoice.recipient"); 1659 else if (Configuration.doAutoCreate()) 1660 this.recipient = new Reference(); // cc 1661 return this.recipient; 1662 } 1663 1664 public boolean hasRecipient() { 1665 return this.recipient != null && !this.recipient.isEmpty(); 1666 } 1667 1668 /** 1669 * @param value {@link #recipient} (The individual or Organization responsible for balancing of this invoice.) 1670 */ 1671 public Invoice setRecipient(Reference value) { 1672 this.recipient = value; 1673 return this; 1674 } 1675 1676 /** 1677 * @return {@link #recipient} 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 individual or Organization responsible for balancing of this invoice.) 1678 */ 1679 public Resource getRecipientTarget() { 1680 return this.recipientTarget; 1681 } 1682 1683 /** 1684 * @param value {@link #recipient} 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 individual or Organization responsible for balancing of this invoice.) 1685 */ 1686 public Invoice setRecipientTarget(Resource value) { 1687 this.recipientTarget = value; 1688 return this; 1689 } 1690 1691 /** 1692 * @return {@link #date} (Date/time(s) of when this Invoice was posted.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1693 */ 1694 public DateTimeType getDateElement() { 1695 if (this.date == null) 1696 if (Configuration.errorOnAutoCreate()) 1697 throw new Error("Attempt to auto-create Invoice.date"); 1698 else if (Configuration.doAutoCreate()) 1699 this.date = new DateTimeType(); // bb 1700 return this.date; 1701 } 1702 1703 public boolean hasDateElement() { 1704 return this.date != null && !this.date.isEmpty(); 1705 } 1706 1707 public boolean hasDate() { 1708 return this.date != null && !this.date.isEmpty(); 1709 } 1710 1711 /** 1712 * @param value {@link #date} (Date/time(s) of when this Invoice was posted.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1713 */ 1714 public Invoice setDateElement(DateTimeType value) { 1715 this.date = value; 1716 return this; 1717 } 1718 1719 /** 1720 * @return Date/time(s) of when this Invoice was posted. 1721 */ 1722 public Date getDate() { 1723 return this.date == null ? null : this.date.getValue(); 1724 } 1725 1726 /** 1727 * @param value Date/time(s) of when this Invoice was posted. 1728 */ 1729 public Invoice setDate(Date value) { 1730 if (value == null) 1731 this.date = null; 1732 else { 1733 if (this.date == null) 1734 this.date = new DateTimeType(); 1735 this.date.setValue(value); 1736 } 1737 return this; 1738 } 1739 1740 /** 1741 * @return {@link #participant} (Indicates who or what performed or participated in the charged service.) 1742 */ 1743 public List<InvoiceParticipantComponent> getParticipant() { 1744 if (this.participant == null) 1745 this.participant = new ArrayList<InvoiceParticipantComponent>(); 1746 return this.participant; 1747 } 1748 1749 /** 1750 * @return Returns a reference to <code>this</code> for easy method chaining 1751 */ 1752 public Invoice setParticipant(List<InvoiceParticipantComponent> theParticipant) { 1753 this.participant = theParticipant; 1754 return this; 1755 } 1756 1757 public boolean hasParticipant() { 1758 if (this.participant == null) 1759 return false; 1760 for (InvoiceParticipantComponent item : this.participant) 1761 if (!item.isEmpty()) 1762 return true; 1763 return false; 1764 } 1765 1766 public InvoiceParticipantComponent addParticipant() { //3 1767 InvoiceParticipantComponent t = new InvoiceParticipantComponent(); 1768 if (this.participant == null) 1769 this.participant = new ArrayList<InvoiceParticipantComponent>(); 1770 this.participant.add(t); 1771 return t; 1772 } 1773 1774 public Invoice addParticipant(InvoiceParticipantComponent t) { //3 1775 if (t == null) 1776 return this; 1777 if (this.participant == null) 1778 this.participant = new ArrayList<InvoiceParticipantComponent>(); 1779 this.participant.add(t); 1780 return this; 1781 } 1782 1783 /** 1784 * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist 1785 */ 1786 public InvoiceParticipantComponent getParticipantFirstRep() { 1787 if (getParticipant().isEmpty()) { 1788 addParticipant(); 1789 } 1790 return getParticipant().get(0); 1791 } 1792 1793 /** 1794 * @return {@link #issuer} (The organizationissuing the Invoice.) 1795 */ 1796 public Reference getIssuer() { 1797 if (this.issuer == null) 1798 if (Configuration.errorOnAutoCreate()) 1799 throw new Error("Attempt to auto-create Invoice.issuer"); 1800 else if (Configuration.doAutoCreate()) 1801 this.issuer = new Reference(); // cc 1802 return this.issuer; 1803 } 1804 1805 public boolean hasIssuer() { 1806 return this.issuer != null && !this.issuer.isEmpty(); 1807 } 1808 1809 /** 1810 * @param value {@link #issuer} (The organizationissuing the Invoice.) 1811 */ 1812 public Invoice setIssuer(Reference value) { 1813 this.issuer = value; 1814 return this; 1815 } 1816 1817 /** 1818 * @return {@link #issuer} 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 organizationissuing the Invoice.) 1819 */ 1820 public Organization getIssuerTarget() { 1821 if (this.issuerTarget == null) 1822 if (Configuration.errorOnAutoCreate()) 1823 throw new Error("Attempt to auto-create Invoice.issuer"); 1824 else if (Configuration.doAutoCreate()) 1825 this.issuerTarget = new Organization(); // aa 1826 return this.issuerTarget; 1827 } 1828 1829 /** 1830 * @param value {@link #issuer} 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 organizationissuing the Invoice.) 1831 */ 1832 public Invoice setIssuerTarget(Organization value) { 1833 this.issuerTarget = value; 1834 return this; 1835 } 1836 1837 /** 1838 * @return {@link #account} (Account which is supposed to be balanced with this Invoice.) 1839 */ 1840 public Reference getAccount() { 1841 if (this.account == null) 1842 if (Configuration.errorOnAutoCreate()) 1843 throw new Error("Attempt to auto-create Invoice.account"); 1844 else if (Configuration.doAutoCreate()) 1845 this.account = new Reference(); // cc 1846 return this.account; 1847 } 1848 1849 public boolean hasAccount() { 1850 return this.account != null && !this.account.isEmpty(); 1851 } 1852 1853 /** 1854 * @param value {@link #account} (Account which is supposed to be balanced with this Invoice.) 1855 */ 1856 public Invoice setAccount(Reference value) { 1857 this.account = value; 1858 return this; 1859 } 1860 1861 /** 1862 * @return {@link #account} 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. (Account which is supposed to be balanced with this Invoice.) 1863 */ 1864 public Account getAccountTarget() { 1865 if (this.accountTarget == null) 1866 if (Configuration.errorOnAutoCreate()) 1867 throw new Error("Attempt to auto-create Invoice.account"); 1868 else if (Configuration.doAutoCreate()) 1869 this.accountTarget = new Account(); // aa 1870 return this.accountTarget; 1871 } 1872 1873 /** 1874 * @param value {@link #account} 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. (Account which is supposed to be balanced with this Invoice.) 1875 */ 1876 public Invoice setAccountTarget(Account value) { 1877 this.accountTarget = value; 1878 return this; 1879 } 1880 1881 /** 1882 * @return {@link #lineItem} (Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.) 1883 */ 1884 public List<InvoiceLineItemComponent> getLineItem() { 1885 if (this.lineItem == null) 1886 this.lineItem = new ArrayList<InvoiceLineItemComponent>(); 1887 return this.lineItem; 1888 } 1889 1890 /** 1891 * @return Returns a reference to <code>this</code> for easy method chaining 1892 */ 1893 public Invoice setLineItem(List<InvoiceLineItemComponent> theLineItem) { 1894 this.lineItem = theLineItem; 1895 return this; 1896 } 1897 1898 public boolean hasLineItem() { 1899 if (this.lineItem == null) 1900 return false; 1901 for (InvoiceLineItemComponent item : this.lineItem) 1902 if (!item.isEmpty()) 1903 return true; 1904 return false; 1905 } 1906 1907 public InvoiceLineItemComponent addLineItem() { //3 1908 InvoiceLineItemComponent t = new InvoiceLineItemComponent(); 1909 if (this.lineItem == null) 1910 this.lineItem = new ArrayList<InvoiceLineItemComponent>(); 1911 this.lineItem.add(t); 1912 return t; 1913 } 1914 1915 public Invoice addLineItem(InvoiceLineItemComponent t) { //3 1916 if (t == null) 1917 return this; 1918 if (this.lineItem == null) 1919 this.lineItem = new ArrayList<InvoiceLineItemComponent>(); 1920 this.lineItem.add(t); 1921 return this; 1922 } 1923 1924 /** 1925 * @return The first repetition of repeating field {@link #lineItem}, creating it if it does not already exist 1926 */ 1927 public InvoiceLineItemComponent getLineItemFirstRep() { 1928 if (getLineItem().isEmpty()) { 1929 addLineItem(); 1930 } 1931 return getLineItem().get(0); 1932 } 1933 1934 /** 1935 * @return {@link #totalPriceComponent} (The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.) 1936 */ 1937 public List<InvoiceLineItemPriceComponentComponent> getTotalPriceComponent() { 1938 if (this.totalPriceComponent == null) 1939 this.totalPriceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 1940 return this.totalPriceComponent; 1941 } 1942 1943 /** 1944 * @return Returns a reference to <code>this</code> for easy method chaining 1945 */ 1946 public Invoice setTotalPriceComponent(List<InvoiceLineItemPriceComponentComponent> theTotalPriceComponent) { 1947 this.totalPriceComponent = theTotalPriceComponent; 1948 return this; 1949 } 1950 1951 public boolean hasTotalPriceComponent() { 1952 if (this.totalPriceComponent == null) 1953 return false; 1954 for (InvoiceLineItemPriceComponentComponent item : this.totalPriceComponent) 1955 if (!item.isEmpty()) 1956 return true; 1957 return false; 1958 } 1959 1960 public InvoiceLineItemPriceComponentComponent addTotalPriceComponent() { //3 1961 InvoiceLineItemPriceComponentComponent t = new InvoiceLineItemPriceComponentComponent(); 1962 if (this.totalPriceComponent == null) 1963 this.totalPriceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 1964 this.totalPriceComponent.add(t); 1965 return t; 1966 } 1967 1968 public Invoice addTotalPriceComponent(InvoiceLineItemPriceComponentComponent t) { //3 1969 if (t == null) 1970 return this; 1971 if (this.totalPriceComponent == null) 1972 this.totalPriceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 1973 this.totalPriceComponent.add(t); 1974 return this; 1975 } 1976 1977 /** 1978 * @return The first repetition of repeating field {@link #totalPriceComponent}, creating it if it does not already exist 1979 */ 1980 public InvoiceLineItemPriceComponentComponent getTotalPriceComponentFirstRep() { 1981 if (getTotalPriceComponent().isEmpty()) { 1982 addTotalPriceComponent(); 1983 } 1984 return getTotalPriceComponent().get(0); 1985 } 1986 1987 /** 1988 * @return {@link #totalNet} (Invoice total , taxes excluded.) 1989 */ 1990 public Money getTotalNet() { 1991 if (this.totalNet == null) 1992 if (Configuration.errorOnAutoCreate()) 1993 throw new Error("Attempt to auto-create Invoice.totalNet"); 1994 else if (Configuration.doAutoCreate()) 1995 this.totalNet = new Money(); // cc 1996 return this.totalNet; 1997 } 1998 1999 public boolean hasTotalNet() { 2000 return this.totalNet != null && !this.totalNet.isEmpty(); 2001 } 2002 2003 /** 2004 * @param value {@link #totalNet} (Invoice total , taxes excluded.) 2005 */ 2006 public Invoice setTotalNet(Money value) { 2007 this.totalNet = value; 2008 return this; 2009 } 2010 2011 /** 2012 * @return {@link #totalGross} (Invoice total, tax included.) 2013 */ 2014 public Money getTotalGross() { 2015 if (this.totalGross == null) 2016 if (Configuration.errorOnAutoCreate()) 2017 throw new Error("Attempt to auto-create Invoice.totalGross"); 2018 else if (Configuration.doAutoCreate()) 2019 this.totalGross = new Money(); // cc 2020 return this.totalGross; 2021 } 2022 2023 public boolean hasTotalGross() { 2024 return this.totalGross != null && !this.totalGross.isEmpty(); 2025 } 2026 2027 /** 2028 * @param value {@link #totalGross} (Invoice total, tax included.) 2029 */ 2030 public Invoice setTotalGross(Money value) { 2031 this.totalGross = value; 2032 return this; 2033 } 2034 2035 /** 2036 * @return {@link #paymentTerms} (Payment details such as banking details, period of payment, deductibles, methods of payment.). This is the underlying object with id, value and extensions. The accessor "getPaymentTerms" gives direct access to the value 2037 */ 2038 public MarkdownType getPaymentTermsElement() { 2039 if (this.paymentTerms == null) 2040 if (Configuration.errorOnAutoCreate()) 2041 throw new Error("Attempt to auto-create Invoice.paymentTerms"); 2042 else if (Configuration.doAutoCreate()) 2043 this.paymentTerms = new MarkdownType(); // bb 2044 return this.paymentTerms; 2045 } 2046 2047 public boolean hasPaymentTermsElement() { 2048 return this.paymentTerms != null && !this.paymentTerms.isEmpty(); 2049 } 2050 2051 public boolean hasPaymentTerms() { 2052 return this.paymentTerms != null && !this.paymentTerms.isEmpty(); 2053 } 2054 2055 /** 2056 * @param value {@link #paymentTerms} (Payment details such as banking details, period of payment, deductibles, methods of payment.). This is the underlying object with id, value and extensions. The accessor "getPaymentTerms" gives direct access to the value 2057 */ 2058 public Invoice setPaymentTermsElement(MarkdownType value) { 2059 this.paymentTerms = value; 2060 return this; 2061 } 2062 2063 /** 2064 * @return Payment details such as banking details, period of payment, deductibles, methods of payment. 2065 */ 2066 public String getPaymentTerms() { 2067 return this.paymentTerms == null ? null : this.paymentTerms.getValue(); 2068 } 2069 2070 /** 2071 * @param value Payment details such as banking details, period of payment, deductibles, methods of payment. 2072 */ 2073 public Invoice setPaymentTerms(String value) { 2074 if (value == null) 2075 this.paymentTerms = null; 2076 else { 2077 if (this.paymentTerms == null) 2078 this.paymentTerms = new MarkdownType(); 2079 this.paymentTerms.setValue(value); 2080 } 2081 return this; 2082 } 2083 2084 /** 2085 * @return {@link #note} (Comments made about the invoice by the issuer, subject, or other participants.) 2086 */ 2087 public List<Annotation> getNote() { 2088 if (this.note == null) 2089 this.note = new ArrayList<Annotation>(); 2090 return this.note; 2091 } 2092 2093 /** 2094 * @return Returns a reference to <code>this</code> for easy method chaining 2095 */ 2096 public Invoice setNote(List<Annotation> theNote) { 2097 this.note = theNote; 2098 return this; 2099 } 2100 2101 public boolean hasNote() { 2102 if (this.note == null) 2103 return false; 2104 for (Annotation item : this.note) 2105 if (!item.isEmpty()) 2106 return true; 2107 return false; 2108 } 2109 2110 public Annotation addNote() { //3 2111 Annotation t = new Annotation(); 2112 if (this.note == null) 2113 this.note = new ArrayList<Annotation>(); 2114 this.note.add(t); 2115 return t; 2116 } 2117 2118 public Invoice addNote(Annotation t) { //3 2119 if (t == null) 2120 return this; 2121 if (this.note == null) 2122 this.note = new ArrayList<Annotation>(); 2123 this.note.add(t); 2124 return this; 2125 } 2126 2127 /** 2128 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 2129 */ 2130 public Annotation getNoteFirstRep() { 2131 if (getNote().isEmpty()) { 2132 addNote(); 2133 } 2134 return getNote().get(0); 2135 } 2136 2137 protected void listChildren(List<Property> children) { 2138 super.listChildren(children); 2139 children.add(new Property("identifier", "Identifier", "Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2140 children.add(new Property("status", "code", "The current state of the Invoice.", 0, 1, status)); 2141 children.add(new Property("cancelledReason", "string", "In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).", 0, 1, cancelledReason)); 2142 children.add(new Property("type", "CodeableConcept", "Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).", 0, 1, type)); 2143 children.add(new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals receiving the goods and services billed in this invoice.", 0, 1, subject)); 2144 children.add(new Property("recipient", "Reference(Organization|Patient|RelatedPerson)", "The individual or Organization responsible for balancing of this invoice.", 0, 1, recipient)); 2145 children.add(new Property("date", "dateTime", "Date/time(s) of when this Invoice was posted.", 0, 1, date)); 2146 children.add(new Property("participant", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, participant)); 2147 children.add(new Property("issuer", "Reference(Organization)", "The organizationissuing the Invoice.", 0, 1, issuer)); 2148 children.add(new Property("account", "Reference(Account)", "Account which is supposed to be balanced with this Invoice.", 0, 1, account)); 2149 children.add(new Property("lineItem", "", "Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.", 0, java.lang.Integer.MAX_VALUE, lineItem)); 2150 children.add(new Property("totalPriceComponent", "@Invoice.lineItem.priceComponent", "The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.", 0, java.lang.Integer.MAX_VALUE, totalPriceComponent)); 2151 children.add(new Property("totalNet", "Money", "Invoice total , taxes excluded.", 0, 1, totalNet)); 2152 children.add(new Property("totalGross", "Money", "Invoice total, tax included.", 0, 1, totalGross)); 2153 children.add(new Property("paymentTerms", "markdown", "Payment details such as banking details, period of payment, deductibles, methods of payment.", 0, 1, paymentTerms)); 2154 children.add(new Property("note", "Annotation", "Comments made about the invoice by the issuer, subject, or other participants.", 0, java.lang.Integer.MAX_VALUE, note)); 2155 } 2156 2157 @Override 2158 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2159 switch (_hash) { 2160 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.", 0, java.lang.Integer.MAX_VALUE, identifier); 2161 case -892481550: /*status*/ return new Property("status", "code", "The current state of the Invoice.", 0, 1, status); 2162 case 1550362357: /*cancelledReason*/ return new Property("cancelledReason", "string", "In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).", 0, 1, cancelledReason); 2163 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).", 0, 1, type); 2164 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals receiving the goods and services billed in this invoice.", 0, 1, subject); 2165 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Organization|Patient|RelatedPerson)", "The individual or Organization responsible for balancing of this invoice.", 0, 1, recipient); 2166 case 3076014: /*date*/ return new Property("date", "dateTime", "Date/time(s) of when this Invoice was posted.", 0, 1, date); 2167 case 767422259: /*participant*/ return new Property("participant", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, participant); 2168 case -1179159879: /*issuer*/ return new Property("issuer", "Reference(Organization)", "The organizationissuing the Invoice.", 0, 1, issuer); 2169 case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "Account which is supposed to be balanced with this Invoice.", 0, 1, account); 2170 case 1188332839: /*lineItem*/ return new Property("lineItem", "", "Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.", 0, java.lang.Integer.MAX_VALUE, lineItem); 2171 case 1731497496: /*totalPriceComponent*/ return new Property("totalPriceComponent", "@Invoice.lineItem.priceComponent", "The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.", 0, java.lang.Integer.MAX_VALUE, totalPriceComponent); 2172 case -849911879: /*totalNet*/ return new Property("totalNet", "Money", "Invoice total , taxes excluded.", 0, 1, totalNet); 2173 case -727607968: /*totalGross*/ return new Property("totalGross", "Money", "Invoice total, tax included.", 0, 1, totalGross); 2174 case -507544799: /*paymentTerms*/ return new Property("paymentTerms", "markdown", "Payment details such as banking details, period of payment, deductibles, methods of payment.", 0, 1, paymentTerms); 2175 case 3387378: /*note*/ return new Property("note", "Annotation", "Comments made about the invoice by the issuer, subject, or other participants.", 0, java.lang.Integer.MAX_VALUE, note); 2176 default: return super.getNamedProperty(_hash, _name, _checkValid); 2177 } 2178 2179 } 2180 2181 @Override 2182 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2183 switch (hash) { 2184 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2185 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<InvoiceStatus> 2186 case 1550362357: /*cancelledReason*/ return this.cancelledReason == null ? new Base[0] : new Base[] {this.cancelledReason}; // StringType 2187 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2188 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 2189 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : new Base[] {this.recipient}; // Reference 2190 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2191 case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // InvoiceParticipantComponent 2192 case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // Reference 2193 case -1177318867: /*account*/ return this.account == null ? new Base[0] : new Base[] {this.account}; // Reference 2194 case 1188332839: /*lineItem*/ return this.lineItem == null ? new Base[0] : this.lineItem.toArray(new Base[this.lineItem.size()]); // InvoiceLineItemComponent 2195 case 1731497496: /*totalPriceComponent*/ return this.totalPriceComponent == null ? new Base[0] : this.totalPriceComponent.toArray(new Base[this.totalPriceComponent.size()]); // InvoiceLineItemPriceComponentComponent 2196 case -849911879: /*totalNet*/ return this.totalNet == null ? new Base[0] : new Base[] {this.totalNet}; // Money 2197 case -727607968: /*totalGross*/ return this.totalGross == null ? new Base[0] : new Base[] {this.totalGross}; // Money 2198 case -507544799: /*paymentTerms*/ return this.paymentTerms == null ? new Base[0] : new Base[] {this.paymentTerms}; // MarkdownType 2199 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 2200 default: return super.getProperty(hash, name, checkValid); 2201 } 2202 2203 } 2204 2205 @Override 2206 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2207 switch (hash) { 2208 case -1618432855: // identifier 2209 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2210 return value; 2211 case -892481550: // status 2212 value = new InvoiceStatusEnumFactory().fromType(castToCode(value)); 2213 this.status = (Enumeration) value; // Enumeration<InvoiceStatus> 2214 return value; 2215 case 1550362357: // cancelledReason 2216 this.cancelledReason = castToString(value); // StringType 2217 return value; 2218 case 3575610: // type 2219 this.type = castToCodeableConcept(value); // CodeableConcept 2220 return value; 2221 case -1867885268: // subject 2222 this.subject = castToReference(value); // Reference 2223 return value; 2224 case 820081177: // recipient 2225 this.recipient = castToReference(value); // Reference 2226 return value; 2227 case 3076014: // date 2228 this.date = castToDateTime(value); // DateTimeType 2229 return value; 2230 case 767422259: // participant 2231 this.getParticipant().add((InvoiceParticipantComponent) value); // InvoiceParticipantComponent 2232 return value; 2233 case -1179159879: // issuer 2234 this.issuer = castToReference(value); // Reference 2235 return value; 2236 case -1177318867: // account 2237 this.account = castToReference(value); // Reference 2238 return value; 2239 case 1188332839: // lineItem 2240 this.getLineItem().add((InvoiceLineItemComponent) value); // InvoiceLineItemComponent 2241 return value; 2242 case 1731497496: // totalPriceComponent 2243 this.getTotalPriceComponent().add((InvoiceLineItemPriceComponentComponent) value); // InvoiceLineItemPriceComponentComponent 2244 return value; 2245 case -849911879: // totalNet 2246 this.totalNet = castToMoney(value); // Money 2247 return value; 2248 case -727607968: // totalGross 2249 this.totalGross = castToMoney(value); // Money 2250 return value; 2251 case -507544799: // paymentTerms 2252 this.paymentTerms = castToMarkdown(value); // MarkdownType 2253 return value; 2254 case 3387378: // note 2255 this.getNote().add(castToAnnotation(value)); // Annotation 2256 return value; 2257 default: return super.setProperty(hash, name, value); 2258 } 2259 2260 } 2261 2262 @Override 2263 public Base setProperty(String name, Base value) throws FHIRException { 2264 if (name.equals("identifier")) { 2265 this.getIdentifier().add(castToIdentifier(value)); 2266 } else if (name.equals("status")) { 2267 value = new InvoiceStatusEnumFactory().fromType(castToCode(value)); 2268 this.status = (Enumeration) value; // Enumeration<InvoiceStatus> 2269 } else if (name.equals("cancelledReason")) { 2270 this.cancelledReason = castToString(value); // StringType 2271 } else if (name.equals("type")) { 2272 this.type = castToCodeableConcept(value); // CodeableConcept 2273 } else if (name.equals("subject")) { 2274 this.subject = castToReference(value); // Reference 2275 } else if (name.equals("recipient")) { 2276 this.recipient = castToReference(value); // Reference 2277 } else if (name.equals("date")) { 2278 this.date = castToDateTime(value); // DateTimeType 2279 } else if (name.equals("participant")) { 2280 this.getParticipant().add((InvoiceParticipantComponent) value); 2281 } else if (name.equals("issuer")) { 2282 this.issuer = castToReference(value); // Reference 2283 } else if (name.equals("account")) { 2284 this.account = castToReference(value); // Reference 2285 } else if (name.equals("lineItem")) { 2286 this.getLineItem().add((InvoiceLineItemComponent) value); 2287 } else if (name.equals("totalPriceComponent")) { 2288 this.getTotalPriceComponent().add((InvoiceLineItemPriceComponentComponent) value); 2289 } else if (name.equals("totalNet")) { 2290 this.totalNet = castToMoney(value); // Money 2291 } else if (name.equals("totalGross")) { 2292 this.totalGross = castToMoney(value); // Money 2293 } else if (name.equals("paymentTerms")) { 2294 this.paymentTerms = castToMarkdown(value); // MarkdownType 2295 } else if (name.equals("note")) { 2296 this.getNote().add(castToAnnotation(value)); 2297 } else 2298 return super.setProperty(name, value); 2299 return value; 2300 } 2301 2302 @Override 2303 public Base makeProperty(int hash, String name) throws FHIRException { 2304 switch (hash) { 2305 case -1618432855: return addIdentifier(); 2306 case -892481550: return getStatusElement(); 2307 case 1550362357: return getCancelledReasonElement(); 2308 case 3575610: return getType(); 2309 case -1867885268: return getSubject(); 2310 case 820081177: return getRecipient(); 2311 case 3076014: return getDateElement(); 2312 case 767422259: return addParticipant(); 2313 case -1179159879: return getIssuer(); 2314 case -1177318867: return getAccount(); 2315 case 1188332839: return addLineItem(); 2316 case 1731497496: return addTotalPriceComponent(); 2317 case -849911879: return getTotalNet(); 2318 case -727607968: return getTotalGross(); 2319 case -507544799: return getPaymentTermsElement(); 2320 case 3387378: return addNote(); 2321 default: return super.makeProperty(hash, name); 2322 } 2323 2324 } 2325 2326 @Override 2327 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2328 switch (hash) { 2329 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2330 case -892481550: /*status*/ return new String[] {"code"}; 2331 case 1550362357: /*cancelledReason*/ return new String[] {"string"}; 2332 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2333 case -1867885268: /*subject*/ return new String[] {"Reference"}; 2334 case 820081177: /*recipient*/ return new String[] {"Reference"}; 2335 case 3076014: /*date*/ return new String[] {"dateTime"}; 2336 case 767422259: /*participant*/ return new String[] {}; 2337 case -1179159879: /*issuer*/ return new String[] {"Reference"}; 2338 case -1177318867: /*account*/ return new String[] {"Reference"}; 2339 case 1188332839: /*lineItem*/ return new String[] {}; 2340 case 1731497496: /*totalPriceComponent*/ return new String[] {"@Invoice.lineItem.priceComponent"}; 2341 case -849911879: /*totalNet*/ return new String[] {"Money"}; 2342 case -727607968: /*totalGross*/ return new String[] {"Money"}; 2343 case -507544799: /*paymentTerms*/ return new String[] {"markdown"}; 2344 case 3387378: /*note*/ return new String[] {"Annotation"}; 2345 default: return super.getTypesForProperty(hash, name); 2346 } 2347 2348 } 2349 2350 @Override 2351 public Base addChild(String name) throws FHIRException { 2352 if (name.equals("identifier")) { 2353 return addIdentifier(); 2354 } 2355 else if (name.equals("status")) { 2356 throw new FHIRException("Cannot call addChild on a primitive type Invoice.status"); 2357 } 2358 else if (name.equals("cancelledReason")) { 2359 throw new FHIRException("Cannot call addChild on a primitive type Invoice.cancelledReason"); 2360 } 2361 else if (name.equals("type")) { 2362 this.type = new CodeableConcept(); 2363 return this.type; 2364 } 2365 else if (name.equals("subject")) { 2366 this.subject = new Reference(); 2367 return this.subject; 2368 } 2369 else if (name.equals("recipient")) { 2370 this.recipient = new Reference(); 2371 return this.recipient; 2372 } 2373 else if (name.equals("date")) { 2374 throw new FHIRException("Cannot call addChild on a primitive type Invoice.date"); 2375 } 2376 else if (name.equals("participant")) { 2377 return addParticipant(); 2378 } 2379 else if (name.equals("issuer")) { 2380 this.issuer = new Reference(); 2381 return this.issuer; 2382 } 2383 else if (name.equals("account")) { 2384 this.account = new Reference(); 2385 return this.account; 2386 } 2387 else if (name.equals("lineItem")) { 2388 return addLineItem(); 2389 } 2390 else if (name.equals("totalPriceComponent")) { 2391 return addTotalPriceComponent(); 2392 } 2393 else if (name.equals("totalNet")) { 2394 this.totalNet = new Money(); 2395 return this.totalNet; 2396 } 2397 else if (name.equals("totalGross")) { 2398 this.totalGross = new Money(); 2399 return this.totalGross; 2400 } 2401 else if (name.equals("paymentTerms")) { 2402 throw new FHIRException("Cannot call addChild on a primitive type Invoice.paymentTerms"); 2403 } 2404 else if (name.equals("note")) { 2405 return addNote(); 2406 } 2407 else 2408 return super.addChild(name); 2409 } 2410 2411 public String fhirType() { 2412 return "Invoice"; 2413 2414 } 2415 2416 public Invoice copy() { 2417 Invoice dst = new Invoice(); 2418 copyValues(dst); 2419 return dst; 2420 } 2421 2422 public void copyValues(Invoice dst) { 2423 super.copyValues(dst); 2424 if (identifier != null) { 2425 dst.identifier = new ArrayList<Identifier>(); 2426 for (Identifier i : identifier) 2427 dst.identifier.add(i.copy()); 2428 }; 2429 dst.status = status == null ? null : status.copy(); 2430 dst.cancelledReason = cancelledReason == null ? null : cancelledReason.copy(); 2431 dst.type = type == null ? null : type.copy(); 2432 dst.subject = subject == null ? null : subject.copy(); 2433 dst.recipient = recipient == null ? null : recipient.copy(); 2434 dst.date = date == null ? null : date.copy(); 2435 if (participant != null) { 2436 dst.participant = new ArrayList<InvoiceParticipantComponent>(); 2437 for (InvoiceParticipantComponent i : participant) 2438 dst.participant.add(i.copy()); 2439 }; 2440 dst.issuer = issuer == null ? null : issuer.copy(); 2441 dst.account = account == null ? null : account.copy(); 2442 if (lineItem != null) { 2443 dst.lineItem = new ArrayList<InvoiceLineItemComponent>(); 2444 for (InvoiceLineItemComponent i : lineItem) 2445 dst.lineItem.add(i.copy()); 2446 }; 2447 if (totalPriceComponent != null) { 2448 dst.totalPriceComponent = new ArrayList<InvoiceLineItemPriceComponentComponent>(); 2449 for (InvoiceLineItemPriceComponentComponent i : totalPriceComponent) 2450 dst.totalPriceComponent.add(i.copy()); 2451 }; 2452 dst.totalNet = totalNet == null ? null : totalNet.copy(); 2453 dst.totalGross = totalGross == null ? null : totalGross.copy(); 2454 dst.paymentTerms = paymentTerms == null ? null : paymentTerms.copy(); 2455 if (note != null) { 2456 dst.note = new ArrayList<Annotation>(); 2457 for (Annotation i : note) 2458 dst.note.add(i.copy()); 2459 }; 2460 } 2461 2462 protected Invoice typedCopy() { 2463 return copy(); 2464 } 2465 2466 @Override 2467 public boolean equalsDeep(Base other_) { 2468 if (!super.equalsDeep(other_)) 2469 return false; 2470 if (!(other_ instanceof Invoice)) 2471 return false; 2472 Invoice o = (Invoice) other_; 2473 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(cancelledReason, o.cancelledReason, true) 2474 && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) && compareDeep(recipient, o.recipient, true) 2475 && compareDeep(date, o.date, true) && compareDeep(participant, o.participant, true) && compareDeep(issuer, o.issuer, true) 2476 && compareDeep(account, o.account, true) && compareDeep(lineItem, o.lineItem, true) && compareDeep(totalPriceComponent, o.totalPriceComponent, true) 2477 && compareDeep(totalNet, o.totalNet, true) && compareDeep(totalGross, o.totalGross, true) && compareDeep(paymentTerms, o.paymentTerms, true) 2478 && compareDeep(note, o.note, true); 2479 } 2480 2481 @Override 2482 public boolean equalsShallow(Base other_) { 2483 if (!super.equalsShallow(other_)) 2484 return false; 2485 if (!(other_ instanceof Invoice)) 2486 return false; 2487 Invoice o = (Invoice) other_; 2488 return compareValues(status, o.status, true) && compareValues(cancelledReason, o.cancelledReason, true) 2489 && compareValues(date, o.date, true) && compareValues(paymentTerms, o.paymentTerms, true); 2490 } 2491 2492 public boolean isEmpty() { 2493 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, cancelledReason 2494 , type, subject, recipient, date, participant, issuer, account, lineItem, totalPriceComponent 2495 , totalNet, totalGross, paymentTerms, note); 2496 } 2497 2498 @Override 2499 public ResourceType getResourceType() { 2500 return ResourceType.Invoice; 2501 } 2502 2503 /** 2504 * Search parameter: <b>date</b> 2505 * <p> 2506 * Description: <b>Invoice date / posting date</b><br> 2507 * Type: <b>date</b><br> 2508 * Path: <b>Invoice.date</b><br> 2509 * </p> 2510 */ 2511 @SearchParamDefinition(name="date", path="Invoice.date", description="Invoice date / posting date", type="date" ) 2512 public static final String SP_DATE = "date"; 2513 /** 2514 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2515 * <p> 2516 * Description: <b>Invoice date / posting date</b><br> 2517 * Type: <b>date</b><br> 2518 * Path: <b>Invoice.date</b><br> 2519 * </p> 2520 */ 2521 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2522 2523 /** 2524 * Search parameter: <b>identifier</b> 2525 * <p> 2526 * Description: <b>Business Identifier for item</b><br> 2527 * Type: <b>token</b><br> 2528 * Path: <b>Invoice.identifier</b><br> 2529 * </p> 2530 */ 2531 @SearchParamDefinition(name="identifier", path="Invoice.identifier", description="Business Identifier for item", type="token" ) 2532 public static final String SP_IDENTIFIER = "identifier"; 2533 /** 2534 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2535 * <p> 2536 * Description: <b>Business Identifier for item</b><br> 2537 * Type: <b>token</b><br> 2538 * Path: <b>Invoice.identifier</b><br> 2539 * </p> 2540 */ 2541 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2542 2543 /** 2544 * Search parameter: <b>totalgross</b> 2545 * <p> 2546 * Description: <b>Gross total of this Invoice</b><br> 2547 * Type: <b>quantity</b><br> 2548 * Path: <b>Invoice.totalGross</b><br> 2549 * </p> 2550 */ 2551 @SearchParamDefinition(name="totalgross", path="Invoice.totalGross", description="Gross total of this Invoice", type="quantity" ) 2552 public static final String SP_TOTALGROSS = "totalgross"; 2553 /** 2554 * <b>Fluent Client</b> search parameter constant for <b>totalgross</b> 2555 * <p> 2556 * Description: <b>Gross total of this Invoice</b><br> 2557 * Type: <b>quantity</b><br> 2558 * Path: <b>Invoice.totalGross</b><br> 2559 * </p> 2560 */ 2561 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam TOTALGROSS = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_TOTALGROSS); 2562 2563 /** 2564 * Search parameter: <b>subject</b> 2565 * <p> 2566 * Description: <b>Recipient(s) of goods and services</b><br> 2567 * Type: <b>reference</b><br> 2568 * Path: <b>Invoice.subject</b><br> 2569 * </p> 2570 */ 2571 @SearchParamDefinition(name="subject", path="Invoice.subject", description="Recipient(s) of goods and services", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Group.class, Patient.class } ) 2572 public static final String SP_SUBJECT = "subject"; 2573 /** 2574 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2575 * <p> 2576 * Description: <b>Recipient(s) of goods and services</b><br> 2577 * Type: <b>reference</b><br> 2578 * Path: <b>Invoice.subject</b><br> 2579 * </p> 2580 */ 2581 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2582 2583/** 2584 * Constant for fluent queries to be used to add include statements. Specifies 2585 * the path value of "<b>Invoice:subject</b>". 2586 */ 2587 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Invoice:subject").toLocked(); 2588 2589 /** 2590 * Search parameter: <b>participant-role</b> 2591 * <p> 2592 * Description: <b>Type of involvement in creation of this Invoice</b><br> 2593 * Type: <b>token</b><br> 2594 * Path: <b>Invoice.participant.role</b><br> 2595 * </p> 2596 */ 2597 @SearchParamDefinition(name="participant-role", path="Invoice.participant.role", description="Type of involvement in creation of this Invoice", type="token" ) 2598 public static final String SP_PARTICIPANT_ROLE = "participant-role"; 2599 /** 2600 * <b>Fluent Client</b> search parameter constant for <b>participant-role</b> 2601 * <p> 2602 * Description: <b>Type of involvement in creation of this Invoice</b><br> 2603 * Type: <b>token</b><br> 2604 * Path: <b>Invoice.participant.role</b><br> 2605 * </p> 2606 */ 2607 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PARTICIPANT_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PARTICIPANT_ROLE); 2608 2609 /** 2610 * Search parameter: <b>type</b> 2611 * <p> 2612 * Description: <b>Type of Invoice</b><br> 2613 * Type: <b>token</b><br> 2614 * Path: <b>Invoice.type</b><br> 2615 * </p> 2616 */ 2617 @SearchParamDefinition(name="type", path="Invoice.type", description="Type of Invoice", type="token" ) 2618 public static final String SP_TYPE = "type"; 2619 /** 2620 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2621 * <p> 2622 * Description: <b>Type of Invoice</b><br> 2623 * Type: <b>token</b><br> 2624 * Path: <b>Invoice.type</b><br> 2625 * </p> 2626 */ 2627 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 2628 2629 /** 2630 * Search parameter: <b>issuer</b> 2631 * <p> 2632 * Description: <b>Issuing Organization of Invoice</b><br> 2633 * Type: <b>reference</b><br> 2634 * Path: <b>Invoice.issuer</b><br> 2635 * </p> 2636 */ 2637 @SearchParamDefinition(name="issuer", path="Invoice.issuer", description="Issuing Organization of Invoice", type="reference", target={Organization.class } ) 2638 public static final String SP_ISSUER = "issuer"; 2639 /** 2640 * <b>Fluent Client</b> search parameter constant for <b>issuer</b> 2641 * <p> 2642 * Description: <b>Issuing Organization of Invoice</b><br> 2643 * Type: <b>reference</b><br> 2644 * Path: <b>Invoice.issuer</b><br> 2645 * </p> 2646 */ 2647 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ISSUER); 2648 2649/** 2650 * Constant for fluent queries to be used to add include statements. Specifies 2651 * the path value of "<b>Invoice:issuer</b>". 2652 */ 2653 public static final ca.uhn.fhir.model.api.Include INCLUDE_ISSUER = new ca.uhn.fhir.model.api.Include("Invoice:issuer").toLocked(); 2654 2655 /** 2656 * Search parameter: <b>participant</b> 2657 * <p> 2658 * Description: <b>Individual who was involved</b><br> 2659 * Type: <b>reference</b><br> 2660 * Path: <b>Invoice.participant.actor</b><br> 2661 * </p> 2662 */ 2663 @SearchParamDefinition(name="participant", path="Invoice.participant.actor", description="Individual who was involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 2664 public static final String SP_PARTICIPANT = "participant"; 2665 /** 2666 * <b>Fluent Client</b> search parameter constant for <b>participant</b> 2667 * <p> 2668 * Description: <b>Individual who was involved</b><br> 2669 * Type: <b>reference</b><br> 2670 * Path: <b>Invoice.participant.actor</b><br> 2671 * </p> 2672 */ 2673 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT); 2674 2675/** 2676 * Constant for fluent queries to be used to add include statements. Specifies 2677 * the path value of "<b>Invoice:participant</b>". 2678 */ 2679 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("Invoice:participant").toLocked(); 2680 2681 /** 2682 * Search parameter: <b>totalnet</b> 2683 * <p> 2684 * Description: <b>Net total of this Invoice</b><br> 2685 * Type: <b>quantity</b><br> 2686 * Path: <b>Invoice.totalNet</b><br> 2687 * </p> 2688 */ 2689 @SearchParamDefinition(name="totalnet", path="Invoice.totalNet", description="Net total of this Invoice", type="quantity" ) 2690 public static final String SP_TOTALNET = "totalnet"; 2691 /** 2692 * <b>Fluent Client</b> search parameter constant for <b>totalnet</b> 2693 * <p> 2694 * Description: <b>Net total of this Invoice</b><br> 2695 * Type: <b>quantity</b><br> 2696 * Path: <b>Invoice.totalNet</b><br> 2697 * </p> 2698 */ 2699 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam TOTALNET = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_TOTALNET); 2700 2701 /** 2702 * Search parameter: <b>patient</b> 2703 * <p> 2704 * Description: <b>Recipient(s) of goods and services</b><br> 2705 * Type: <b>reference</b><br> 2706 * Path: <b>Invoice.subject</b><br> 2707 * </p> 2708 */ 2709 @SearchParamDefinition(name="patient", path="Invoice.subject.where(resolve() is Patient)", description="Recipient(s) of goods and services", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 2710 public static final String SP_PATIENT = "patient"; 2711 /** 2712 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2713 * <p> 2714 * Description: <b>Recipient(s) of goods and services</b><br> 2715 * Type: <b>reference</b><br> 2716 * Path: <b>Invoice.subject</b><br> 2717 * </p> 2718 */ 2719 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2720 2721/** 2722 * Constant for fluent queries to be used to add include statements. Specifies 2723 * the path value of "<b>Invoice:patient</b>". 2724 */ 2725 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Invoice:patient").toLocked(); 2726 2727 /** 2728 * Search parameter: <b>recipient</b> 2729 * <p> 2730 * Description: <b>Recipient of this invoice</b><br> 2731 * Type: <b>reference</b><br> 2732 * Path: <b>Invoice.recipient</b><br> 2733 * </p> 2734 */ 2735 @SearchParamDefinition(name="recipient", path="Invoice.recipient", description="Recipient of this invoice", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Organization.class, Patient.class, RelatedPerson.class } ) 2736 public static final String SP_RECIPIENT = "recipient"; 2737 /** 2738 * <b>Fluent Client</b> search parameter constant for <b>recipient</b> 2739 * <p> 2740 * Description: <b>Recipient of this invoice</b><br> 2741 * Type: <b>reference</b><br> 2742 * Path: <b>Invoice.recipient</b><br> 2743 * </p> 2744 */ 2745 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT); 2746 2747/** 2748 * Constant for fluent queries to be used to add include statements. Specifies 2749 * the path value of "<b>Invoice:recipient</b>". 2750 */ 2751 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("Invoice:recipient").toLocked(); 2752 2753 /** 2754 * Search parameter: <b>account</b> 2755 * <p> 2756 * Description: <b>Account that is being balanced</b><br> 2757 * Type: <b>reference</b><br> 2758 * Path: <b>Invoice.account</b><br> 2759 * </p> 2760 */ 2761 @SearchParamDefinition(name="account", path="Invoice.account", description="Account that is being balanced", type="reference", target={Account.class } ) 2762 public static final String SP_ACCOUNT = "account"; 2763 /** 2764 * <b>Fluent Client</b> search parameter constant for <b>account</b> 2765 * <p> 2766 * Description: <b>Account that is being balanced</b><br> 2767 * Type: <b>reference</b><br> 2768 * Path: <b>Invoice.account</b><br> 2769 * </p> 2770 */ 2771 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACCOUNT); 2772 2773/** 2774 * Constant for fluent queries to be used to add include statements. Specifies 2775 * the path value of "<b>Invoice:account</b>". 2776 */ 2777 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACCOUNT = new ca.uhn.fhir.model.api.Include("Invoice:account").toLocked(); 2778 2779 /** 2780 * Search parameter: <b>status</b> 2781 * <p> 2782 * Description: <b>draft | issued | balanced | cancelled | entered-in-error</b><br> 2783 * Type: <b>token</b><br> 2784 * Path: <b>Invoice.status</b><br> 2785 * </p> 2786 */ 2787 @SearchParamDefinition(name="status", path="Invoice.status", description="draft | issued | balanced | cancelled | entered-in-error", type="token" ) 2788 public static final String SP_STATUS = "status"; 2789 /** 2790 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2791 * <p> 2792 * Description: <b>draft | issued | balanced | cancelled | entered-in-error</b><br> 2793 * Type: <b>token</b><br> 2794 * Path: <b>Invoice.status</b><br> 2795 * </p> 2796 */ 2797 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2798 2799 2800}