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