![](/hapi-fhir/images/logos/raccoon-forwards.png)
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 Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.List; 035 036import org.hl7.fhir.exceptions.FHIRException; 037import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 038import org.hl7.fhir.utilities.Utilities; 039 040import ca.uhn.fhir.model.api.annotation.Block; 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045 046/** 047 * A financial tool for tracking value accrued for a particular purpose. In the 048 * healthcare field, used to track charges for a patient, cost centers, etc. 049 */ 050@ResourceDef(name = "Account", profile = "http://hl7.org/fhir/StructureDefinition/Account") 051public class Account extends DomainResource { 052 053 public enum AccountStatus { 054 /** 055 * This account is active and may be used. 056 */ 057 ACTIVE, 058 /** 059 * This account is inactive and should not be used to track financial 060 * information. 061 */ 062 INACTIVE, 063 /** 064 * This instance should not have been part of this patient's medical record. 065 */ 066 ENTEREDINERROR, 067 /** 068 * This account is on hold. 069 */ 070 ONHOLD, 071 /** 072 * The account status is unknown. 073 */ 074 UNKNOWN, 075 /** 076 * added to help the parsers with the generic types 077 */ 078 NULL; 079 080 public static AccountStatus fromCode(String codeString) throws FHIRException { 081 if (codeString == null || "".equals(codeString)) 082 return null; 083 if ("active".equals(codeString)) 084 return ACTIVE; 085 if ("inactive".equals(codeString)) 086 return INACTIVE; 087 if ("entered-in-error".equals(codeString)) 088 return ENTEREDINERROR; 089 if ("on-hold".equals(codeString)) 090 return ONHOLD; 091 if ("unknown".equals(codeString)) 092 return UNKNOWN; 093 if (Configuration.isAcceptInvalidEnums()) 094 return null; 095 else 096 throw new FHIRException("Unknown AccountStatus code '" + codeString + "'"); 097 } 098 099 public String toCode() { 100 switch (this) { 101 case ACTIVE: 102 return "active"; 103 case INACTIVE: 104 return "inactive"; 105 case ENTEREDINERROR: 106 return "entered-in-error"; 107 case ONHOLD: 108 return "on-hold"; 109 case UNKNOWN: 110 return "unknown"; 111 case NULL: 112 return null; 113 default: 114 return "?"; 115 } 116 } 117 118 public String getSystem() { 119 switch (this) { 120 case ACTIVE: 121 return "http://hl7.org/fhir/account-status"; 122 case INACTIVE: 123 return "http://hl7.org/fhir/account-status"; 124 case ENTEREDINERROR: 125 return "http://hl7.org/fhir/account-status"; 126 case ONHOLD: 127 return "http://hl7.org/fhir/account-status"; 128 case UNKNOWN: 129 return "http://hl7.org/fhir/account-status"; 130 case NULL: 131 return null; 132 default: 133 return "?"; 134 } 135 } 136 137 public String getDefinition() { 138 switch (this) { 139 case ACTIVE: 140 return "This account is active and may be used."; 141 case INACTIVE: 142 return "This account is inactive and should not be used to track financial information."; 143 case ENTEREDINERROR: 144 return "This instance should not have been part of this patient's medical record."; 145 case ONHOLD: 146 return "This account is on hold."; 147 case UNKNOWN: 148 return "The account status is unknown."; 149 case NULL: 150 return null; 151 default: 152 return "?"; 153 } 154 } 155 156 public String getDisplay() { 157 switch (this) { 158 case ACTIVE: 159 return "Active"; 160 case INACTIVE: 161 return "Inactive"; 162 case ENTEREDINERROR: 163 return "Entered in error"; 164 case ONHOLD: 165 return "On Hold"; 166 case UNKNOWN: 167 return "Unknown"; 168 case NULL: 169 return null; 170 default: 171 return "?"; 172 } 173 } 174 } 175 176 public static class AccountStatusEnumFactory implements EnumFactory<AccountStatus> { 177 public AccountStatus fromCode(String codeString) throws IllegalArgumentException { 178 if (codeString == null || "".equals(codeString)) 179 if (codeString == null || "".equals(codeString)) 180 return null; 181 if ("active".equals(codeString)) 182 return AccountStatus.ACTIVE; 183 if ("inactive".equals(codeString)) 184 return AccountStatus.INACTIVE; 185 if ("entered-in-error".equals(codeString)) 186 return AccountStatus.ENTEREDINERROR; 187 if ("on-hold".equals(codeString)) 188 return AccountStatus.ONHOLD; 189 if ("unknown".equals(codeString)) 190 return AccountStatus.UNKNOWN; 191 throw new IllegalArgumentException("Unknown AccountStatus code '" + codeString + "'"); 192 } 193 194 public Enumeration<AccountStatus> fromType(PrimitiveType<?> code) throws FHIRException { 195 if (code == null) 196 return null; 197 if (code.isEmpty()) 198 return new Enumeration<AccountStatus>(this, AccountStatus.NULL, code); 199 String codeString = code.asStringValue(); 200 if (codeString == null || "".equals(codeString)) 201 return new Enumeration<AccountStatus>(this, AccountStatus.NULL, code); 202 if ("active".equals(codeString)) 203 return new Enumeration<AccountStatus>(this, AccountStatus.ACTIVE, code); 204 if ("inactive".equals(codeString)) 205 return new Enumeration<AccountStatus>(this, AccountStatus.INACTIVE, code); 206 if ("entered-in-error".equals(codeString)) 207 return new Enumeration<AccountStatus>(this, AccountStatus.ENTEREDINERROR, code); 208 if ("on-hold".equals(codeString)) 209 return new Enumeration<AccountStatus>(this, AccountStatus.ONHOLD, code); 210 if ("unknown".equals(codeString)) 211 return new Enumeration<AccountStatus>(this, AccountStatus.UNKNOWN, code); 212 throw new FHIRException("Unknown AccountStatus code '" + codeString + "'"); 213 } 214 215 public String toCode(AccountStatus code) { 216 if (code == AccountStatus.ACTIVE) 217 return "active"; 218 if (code == AccountStatus.INACTIVE) 219 return "inactive"; 220 if (code == AccountStatus.ENTEREDINERROR) 221 return "entered-in-error"; 222 if (code == AccountStatus.ONHOLD) 223 return "on-hold"; 224 if (code == AccountStatus.UNKNOWN) 225 return "unknown"; 226 return "?"; 227 } 228 229 public String toSystem(AccountStatus code) { 230 return code.getSystem(); 231 } 232 } 233 234 @Block() 235 public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { 236 /** 237 * The party(s) that contribute to payment (or part of) of the charges applied 238 * to this account (including self-pay). 239 * 240 * A coverage may only be responsible for specific types of charges, and the 241 * sequence of the coverages in the account could be important when processing 242 * billing. 243 */ 244 @Child(name = "coverage", type = { Coverage.class }, order = 1, min = 1, max = 1, modifier = false, summary = true) 245 @Description(shortDefinition = "The party(s), such as insurances, that may contribute to the payment of this account", formalDefinition = "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.") 246 protected Reference coverage; 247 248 /** 249 * The actual object that is the target of the reference (The party(s) that 250 * contribute to payment (or part of) of the charges applied to this account 251 * (including self-pay). 252 * 253 * A coverage may only be responsible for specific types of charges, and the 254 * sequence of the coverages in the account could be important when processing 255 * billing.) 256 */ 257 protected Coverage coverageTarget; 258 259 /** 260 * The priority of the coverage in the context of this account. 261 */ 262 @Child(name = "priority", type = { 263 PositiveIntType.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 264 @Description(shortDefinition = "The priority of the coverage in the context of this account", formalDefinition = "The priority of the coverage in the context of this account.") 265 protected PositiveIntType priority; 266 267 private static final long serialVersionUID = -1046265008L; 268 269 /** 270 * Constructor 271 */ 272 public CoverageComponent() { 273 super(); 274 } 275 276 /** 277 * Constructor 278 */ 279 public CoverageComponent(Reference coverage) { 280 super(); 281 this.coverage = coverage; 282 } 283 284 /** 285 * @return {@link #coverage} (The party(s) that contribute to payment (or part 286 * of) of the charges applied to this account (including self-pay). 287 * 288 * A coverage may only be responsible for specific types of charges, and 289 * the sequence of the coverages in the account could be important when 290 * processing billing.) 291 */ 292 public Reference getCoverage() { 293 if (this.coverage == null) 294 if (Configuration.errorOnAutoCreate()) 295 throw new Error("Attempt to auto-create CoverageComponent.coverage"); 296 else if (Configuration.doAutoCreate()) 297 this.coverage = new Reference(); // cc 298 return this.coverage; 299 } 300 301 public boolean hasCoverage() { 302 return this.coverage != null && !this.coverage.isEmpty(); 303 } 304 305 /** 306 * @param value {@link #coverage} (The party(s) that contribute to payment (or 307 * part of) of the charges applied to this account (including 308 * self-pay). 309 * 310 * A coverage may only be responsible for specific types of 311 * charges, and the sequence of the coverages in the account could 312 * be important when processing billing.) 313 */ 314 public CoverageComponent setCoverage(Reference value) { 315 this.coverage = value; 316 return this; 317 } 318 319 /** 320 * @return {@link #coverage} The actual object that is the target of the 321 * reference. The reference library doesn't populate this, but you can 322 * use it to hold the resource if you resolve it. (The party(s) that 323 * contribute to payment (or part of) of the charges applied to this 324 * account (including self-pay). 325 * 326 * A coverage may only be responsible for specific types of charges, and 327 * the sequence of the coverages in the account could be important when 328 * processing billing.) 329 */ 330 public Coverage getCoverageTarget() { 331 if (this.coverageTarget == null) 332 if (Configuration.errorOnAutoCreate()) 333 throw new Error("Attempt to auto-create CoverageComponent.coverage"); 334 else if (Configuration.doAutoCreate()) 335 this.coverageTarget = new Coverage(); // aa 336 return this.coverageTarget; 337 } 338 339 /** 340 * @param value {@link #coverage} The actual object that is the target of the 341 * reference. The reference library doesn't use these, but you can 342 * use it to hold the resource if you resolve it. (The party(s) 343 * that contribute to payment (or part of) of the charges applied 344 * to this account (including self-pay). 345 * 346 * A coverage may only be responsible for specific types of 347 * charges, and the sequence of the coverages in the account could 348 * be important when processing billing.) 349 */ 350 public CoverageComponent setCoverageTarget(Coverage value) { 351 this.coverageTarget = value; 352 return this; 353 } 354 355 /** 356 * @return {@link #priority} (The priority of the coverage in the context of 357 * this account.). This is the underlying object with id, value and 358 * extensions. The accessor "getPriority" gives direct access to the 359 * value 360 */ 361 public PositiveIntType getPriorityElement() { 362 if (this.priority == null) 363 if (Configuration.errorOnAutoCreate()) 364 throw new Error("Attempt to auto-create CoverageComponent.priority"); 365 else if (Configuration.doAutoCreate()) 366 this.priority = new PositiveIntType(); // bb 367 return this.priority; 368 } 369 370 public boolean hasPriorityElement() { 371 return this.priority != null && !this.priority.isEmpty(); 372 } 373 374 public boolean hasPriority() { 375 return this.priority != null && !this.priority.isEmpty(); 376 } 377 378 /** 379 * @param value {@link #priority} (The priority of the coverage in the context 380 * of this account.). This is the underlying object with id, value 381 * and extensions. The accessor "getPriority" gives direct access 382 * to the value 383 */ 384 public CoverageComponent setPriorityElement(PositiveIntType value) { 385 this.priority = value; 386 return this; 387 } 388 389 /** 390 * @return The priority of the coverage in the context of this account. 391 */ 392 public int getPriority() { 393 return this.priority == null || this.priority.isEmpty() ? 0 : this.priority.getValue(); 394 } 395 396 /** 397 * @param value The priority of the coverage in the context of this account. 398 */ 399 public CoverageComponent setPriority(int value) { 400 if (this.priority == null) 401 this.priority = new PositiveIntType(); 402 this.priority.setValue(value); 403 return this; 404 } 405 406 protected void listChildren(List<Property> children) { 407 super.listChildren(children); 408 children.add(new Property("coverage", "Reference(Coverage)", 409 "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 410 0, 1, coverage)); 411 children.add(new Property("priority", "positiveInt", 412 "The priority of the coverage in the context of this account.", 0, 1, priority)); 413 } 414 415 @Override 416 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 417 switch (_hash) { 418 case -351767064: 419 /* coverage */ return new Property("coverage", "Reference(Coverage)", 420 "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 421 0, 1, coverage); 422 case -1165461084: 423 /* priority */ return new Property("priority", "positiveInt", 424 "The priority of the coverage in the context of this account.", 0, 1, priority); 425 default: 426 return super.getNamedProperty(_hash, _name, _checkValid); 427 } 428 429 } 430 431 @Override 432 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 433 switch (hash) { 434 case -351767064: 435 /* coverage */ return this.coverage == null ? new Base[0] : new Base[] { this.coverage }; // Reference 436 case -1165461084: 437 /* priority */ return this.priority == null ? new Base[0] : new Base[] { this.priority }; // PositiveIntType 438 default: 439 return super.getProperty(hash, name, checkValid); 440 } 441 442 } 443 444 @Override 445 public Base setProperty(int hash, String name, Base value) throws FHIRException { 446 switch (hash) { 447 case -351767064: // coverage 448 this.coverage = castToReference(value); // Reference 449 return value; 450 case -1165461084: // priority 451 this.priority = castToPositiveInt(value); // PositiveIntType 452 return value; 453 default: 454 return super.setProperty(hash, name, value); 455 } 456 457 } 458 459 @Override 460 public Base setProperty(String name, Base value) throws FHIRException { 461 if (name.equals("coverage")) { 462 this.coverage = castToReference(value); // Reference 463 } else if (name.equals("priority")) { 464 this.priority = castToPositiveInt(value); // PositiveIntType 465 } else 466 return super.setProperty(name, value); 467 return value; 468 } 469 470 @Override 471 public void removeChild(String name, Base value) throws FHIRException { 472 if (name.equals("coverage")) { 473 this.coverage = null; 474 } else if (name.equals("priority")) { 475 this.priority = null; 476 } else 477 super.removeChild(name, value); 478 479 } 480 481 @Override 482 public Base makeProperty(int hash, String name) throws FHIRException { 483 switch (hash) { 484 case -351767064: 485 return getCoverage(); 486 case -1165461084: 487 return getPriorityElement(); 488 default: 489 return super.makeProperty(hash, name); 490 } 491 492 } 493 494 @Override 495 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 496 switch (hash) { 497 case -351767064: 498 /* coverage */ return new String[] { "Reference" }; 499 case -1165461084: 500 /* priority */ return new String[] { "positiveInt" }; 501 default: 502 return super.getTypesForProperty(hash, name); 503 } 504 505 } 506 507 @Override 508 public Base addChild(String name) throws FHIRException { 509 if (name.equals("coverage")) { 510 this.coverage = new Reference(); 511 return this.coverage; 512 } else if (name.equals("priority")) { 513 throw new FHIRException("Cannot call addChild on a singleton property Account.priority"); 514 } else 515 return super.addChild(name); 516 } 517 518 public CoverageComponent copy() { 519 CoverageComponent dst = new CoverageComponent(); 520 copyValues(dst); 521 return dst; 522 } 523 524 public void copyValues(CoverageComponent dst) { 525 super.copyValues(dst); 526 dst.coverage = coverage == null ? null : coverage.copy(); 527 dst.priority = priority == null ? null : priority.copy(); 528 } 529 530 @Override 531 public boolean equalsDeep(Base other_) { 532 if (!super.equalsDeep(other_)) 533 return false; 534 if (!(other_ instanceof CoverageComponent)) 535 return false; 536 CoverageComponent o = (CoverageComponent) other_; 537 return compareDeep(coverage, o.coverage, true) && compareDeep(priority, o.priority, true); 538 } 539 540 @Override 541 public boolean equalsShallow(Base other_) { 542 if (!super.equalsShallow(other_)) 543 return false; 544 if (!(other_ instanceof CoverageComponent)) 545 return false; 546 CoverageComponent o = (CoverageComponent) other_; 547 return compareValues(priority, o.priority, true); 548 } 549 550 public boolean isEmpty() { 551 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, priority); 552 } 553 554 public String fhirType() { 555 return "Account.coverage"; 556 557 } 558 559 } 560 561 @Block() 562 public static class GuarantorComponent extends BackboneElement implements IBaseBackboneElement { 563 /** 564 * The entity who is responsible. 565 */ 566 @Child(name = "party", type = { Patient.class, RelatedPerson.class, 567 Organization.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 568 @Description(shortDefinition = "Responsible entity", formalDefinition = "The entity who is responsible.") 569 protected Reference party; 570 571 /** 572 * The actual object that is the target of the reference (The entity who is 573 * responsible.) 574 */ 575 protected Resource partyTarget; 576 577 /** 578 * A guarantor may be placed on credit hold or otherwise have their role 579 * temporarily suspended. 580 */ 581 @Child(name = "onHold", type = { 582 BooleanType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 583 @Description(shortDefinition = "Credit or other hold applied", formalDefinition = "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.") 584 protected BooleanType onHold; 585 586 /** 587 * The timeframe during which the guarantor accepts responsibility for the 588 * account. 589 */ 590 @Child(name = "period", type = { Period.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 591 @Description(shortDefinition = "Guarantee account during", formalDefinition = "The timeframe during which the guarantor accepts responsibility for the account.") 592 protected Period period; 593 594 private static final long serialVersionUID = -1012345396L; 595 596 /** 597 * Constructor 598 */ 599 public GuarantorComponent() { 600 super(); 601 } 602 603 /** 604 * Constructor 605 */ 606 public GuarantorComponent(Reference party) { 607 super(); 608 this.party = party; 609 } 610 611 /** 612 * @return {@link #party} (The entity who is responsible.) 613 */ 614 public Reference getParty() { 615 if (this.party == null) 616 if (Configuration.errorOnAutoCreate()) 617 throw new Error("Attempt to auto-create GuarantorComponent.party"); 618 else if (Configuration.doAutoCreate()) 619 this.party = new Reference(); // cc 620 return this.party; 621 } 622 623 public boolean hasParty() { 624 return this.party != null && !this.party.isEmpty(); 625 } 626 627 /** 628 * @param value {@link #party} (The entity who is responsible.) 629 */ 630 public GuarantorComponent setParty(Reference value) { 631 this.party = value; 632 return this; 633 } 634 635 /** 636 * @return {@link #party} The actual object that is the target of the reference. 637 * The reference library doesn't populate this, but you can use it to 638 * hold the resource if you resolve it. (The entity who is responsible.) 639 */ 640 public Resource getPartyTarget() { 641 return this.partyTarget; 642 } 643 644 /** 645 * @param value {@link #party} The actual object that is the target of the 646 * reference. The reference library doesn't use these, but you can 647 * use it to hold the resource if you resolve it. (The entity who 648 * is responsible.) 649 */ 650 public GuarantorComponent setPartyTarget(Resource value) { 651 this.partyTarget = value; 652 return this; 653 } 654 655 /** 656 * @return {@link #onHold} (A guarantor may be placed on credit hold or 657 * otherwise have their role temporarily suspended.). This is the 658 * underlying object with id, value and extensions. The accessor 659 * "getOnHold" gives direct access to the value 660 */ 661 public BooleanType getOnHoldElement() { 662 if (this.onHold == null) 663 if (Configuration.errorOnAutoCreate()) 664 throw new Error("Attempt to auto-create GuarantorComponent.onHold"); 665 else if (Configuration.doAutoCreate()) 666 this.onHold = new BooleanType(); // bb 667 return this.onHold; 668 } 669 670 public boolean hasOnHoldElement() { 671 return this.onHold != null && !this.onHold.isEmpty(); 672 } 673 674 public boolean hasOnHold() { 675 return this.onHold != null && !this.onHold.isEmpty(); 676 } 677 678 /** 679 * @param value {@link #onHold} (A guarantor may be placed on credit hold or 680 * otherwise have their role temporarily suspended.). This is the 681 * underlying object with id, value and extensions. The accessor 682 * "getOnHold" gives direct access to the value 683 */ 684 public GuarantorComponent setOnHoldElement(BooleanType value) { 685 this.onHold = value; 686 return this; 687 } 688 689 /** 690 * @return A guarantor may be placed on credit hold or otherwise have their role 691 * temporarily suspended. 692 */ 693 public boolean getOnHold() { 694 return this.onHold == null || this.onHold.isEmpty() ? false : this.onHold.getValue(); 695 } 696 697 /** 698 * @param value A guarantor may be placed on credit hold or otherwise have their 699 * role temporarily suspended. 700 */ 701 public GuarantorComponent setOnHold(boolean value) { 702 if (this.onHold == null) 703 this.onHold = new BooleanType(); 704 this.onHold.setValue(value); 705 return this; 706 } 707 708 /** 709 * @return {@link #period} (The timeframe during which the guarantor accepts 710 * responsibility for the account.) 711 */ 712 public Period getPeriod() { 713 if (this.period == null) 714 if (Configuration.errorOnAutoCreate()) 715 throw new Error("Attempt to auto-create GuarantorComponent.period"); 716 else if (Configuration.doAutoCreate()) 717 this.period = new Period(); // cc 718 return this.period; 719 } 720 721 public boolean hasPeriod() { 722 return this.period != null && !this.period.isEmpty(); 723 } 724 725 /** 726 * @param value {@link #period} (The timeframe during which the guarantor 727 * accepts responsibility for the account.) 728 */ 729 public GuarantorComponent setPeriod(Period value) { 730 this.period = value; 731 return this; 732 } 733 734 protected void listChildren(List<Property> children) { 735 super.listChildren(children); 736 children.add(new Property("party", "Reference(Patient|RelatedPerson|Organization)", 737 "The entity who is responsible.", 0, 1, party)); 738 children.add(new Property("onHold", "boolean", 739 "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, 740 onHold)); 741 children.add(new Property("period", "Period", 742 "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period)); 743 } 744 745 @Override 746 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 747 switch (_hash) { 748 case 106437350: 749 /* party */ return new Property("party", "Reference(Patient|RelatedPerson|Organization)", 750 "The entity who is responsible.", 0, 1, party); 751 case -1013289154: 752 /* onHold */ return new Property("onHold", "boolean", 753 "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, 754 onHold); 755 case -991726143: 756 /* period */ return new Property("period", "Period", 757 "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period); 758 default: 759 return super.getNamedProperty(_hash, _name, _checkValid); 760 } 761 762 } 763 764 @Override 765 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 766 switch (hash) { 767 case 106437350: 768 /* party */ return this.party == null ? new Base[0] : new Base[] { this.party }; // Reference 769 case -1013289154: 770 /* onHold */ return this.onHold == null ? new Base[0] : new Base[] { this.onHold }; // BooleanType 771 case -991726143: 772 /* period */ return this.period == null ? new Base[0] : new Base[] { this.period }; // Period 773 default: 774 return super.getProperty(hash, name, checkValid); 775 } 776 777 } 778 779 @Override 780 public Base setProperty(int hash, String name, Base value) throws FHIRException { 781 switch (hash) { 782 case 106437350: // party 783 this.party = castToReference(value); // Reference 784 return value; 785 case -1013289154: // onHold 786 this.onHold = castToBoolean(value); // BooleanType 787 return value; 788 case -991726143: // period 789 this.period = castToPeriod(value); // Period 790 return value; 791 default: 792 return super.setProperty(hash, name, value); 793 } 794 795 } 796 797 @Override 798 public Base setProperty(String name, Base value) throws FHIRException { 799 if (name.equals("party")) { 800 this.party = castToReference(value); // Reference 801 } else if (name.equals("onHold")) { 802 this.onHold = castToBoolean(value); // BooleanType 803 } else if (name.equals("period")) { 804 this.period = castToPeriod(value); // Period 805 } else 806 return super.setProperty(name, value); 807 return value; 808 } 809 810 @Override 811 public void removeChild(String name, Base value) throws FHIRException { 812 if (name.equals("party")) { 813 this.party = null; 814 } else if (name.equals("onHold")) { 815 this.onHold = null; 816 } else if (name.equals("period")) { 817 this.period = null; 818 } else 819 super.removeChild(name, value); 820 821 } 822 823 @Override 824 public Base makeProperty(int hash, String name) throws FHIRException { 825 switch (hash) { 826 case 106437350: 827 return getParty(); 828 case -1013289154: 829 return getOnHoldElement(); 830 case -991726143: 831 return getPeriod(); 832 default: 833 return super.makeProperty(hash, name); 834 } 835 836 } 837 838 @Override 839 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 840 switch (hash) { 841 case 106437350: 842 /* party */ return new String[] { "Reference" }; 843 case -1013289154: 844 /* onHold */ return new String[] { "boolean" }; 845 case -991726143: 846 /* period */ return new String[] { "Period" }; 847 default: 848 return super.getTypesForProperty(hash, name); 849 } 850 851 } 852 853 @Override 854 public Base addChild(String name) throws FHIRException { 855 if (name.equals("party")) { 856 this.party = new Reference(); 857 return this.party; 858 } else if (name.equals("onHold")) { 859 throw new FHIRException("Cannot call addChild on a singleton property Account.onHold"); 860 } else if (name.equals("period")) { 861 this.period = new Period(); 862 return this.period; 863 } else 864 return super.addChild(name); 865 } 866 867 public GuarantorComponent copy() { 868 GuarantorComponent dst = new GuarantorComponent(); 869 copyValues(dst); 870 return dst; 871 } 872 873 public void copyValues(GuarantorComponent dst) { 874 super.copyValues(dst); 875 dst.party = party == null ? null : party.copy(); 876 dst.onHold = onHold == null ? null : onHold.copy(); 877 dst.period = period == null ? null : period.copy(); 878 } 879 880 @Override 881 public boolean equalsDeep(Base other_) { 882 if (!super.equalsDeep(other_)) 883 return false; 884 if (!(other_ instanceof GuarantorComponent)) 885 return false; 886 GuarantorComponent o = (GuarantorComponent) other_; 887 return compareDeep(party, o.party, true) && compareDeep(onHold, o.onHold, true) 888 && compareDeep(period, o.period, true); 889 } 890 891 @Override 892 public boolean equalsShallow(Base other_) { 893 if (!super.equalsShallow(other_)) 894 return false; 895 if (!(other_ instanceof GuarantorComponent)) 896 return false; 897 GuarantorComponent o = (GuarantorComponent) other_; 898 return compareValues(onHold, o.onHold, true); 899 } 900 901 public boolean isEmpty() { 902 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(party, onHold, period); 903 } 904 905 public String fhirType() { 906 return "Account.guarantor"; 907 908 } 909 910 } 911 912 /** 913 * Unique identifier used to reference the account. Might or might not be 914 * intended for human use (e.g. credit card number). 915 */ 916 @Child(name = "identifier", type = { 917 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 918 @Description(shortDefinition = "Account number", formalDefinition = "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).") 919 protected List<Identifier> identifier; 920 921 /** 922 * Indicates whether the account is presently used/usable or not. 923 */ 924 @Child(name = "status", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = true, summary = true) 925 @Description(shortDefinition = "active | inactive | entered-in-error | on-hold | unknown", formalDefinition = "Indicates whether the account is presently used/usable or not.") 926 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/account-status") 927 protected Enumeration<AccountStatus> status; 928 929 /** 930 * Categorizes the account for reporting and searching purposes. 931 */ 932 @Child(name = "type", type = { CodeableConcept.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 933 @Description(shortDefinition = "E.g. patient, expense, depreciation", formalDefinition = "Categorizes the account for reporting and searching purposes.") 934 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/account-type") 935 protected CodeableConcept type; 936 937 /** 938 * Name used for the account when displaying it to humans in reports, etc. 939 */ 940 @Child(name = "name", type = { StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 941 @Description(shortDefinition = "Human-readable label", formalDefinition = "Name used for the account when displaying it to humans in reports, etc.") 942 protected StringType name; 943 944 /** 945 * Identifies the entity which incurs the expenses. While the immediate 946 * recipients of services or goods might be entities related to the subject, the 947 * expenses were ultimately incurred by the subject of the Account. 948 */ 949 @Child(name = "subject", type = { Patient.class, Device.class, Practitioner.class, PractitionerRole.class, 950 Location.class, HealthcareService.class, 951 Organization.class }, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 952 @Description(shortDefinition = "The entity that caused the expenses", formalDefinition = "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.") 953 protected List<Reference> subject; 954 /** 955 * The actual objects that are the target of the reference (Identifies the 956 * entity which incurs the expenses. While the immediate recipients of services 957 * or goods might be entities related to the subject, the expenses were 958 * ultimately incurred by the subject of the Account.) 959 */ 960 protected List<Resource> subjectTarget; 961 962 /** 963 * The date range of services associated with this account. 964 */ 965 @Child(name = "servicePeriod", type = { Period.class }, order = 5, min = 0, max = 1, modifier = false, summary = true) 966 @Description(shortDefinition = "Transaction window", formalDefinition = "The date range of services associated with this account.") 967 protected Period servicePeriod; 968 969 /** 970 * The party(s) that are responsible for covering the payment of this account, 971 * and what order should they be applied to the account. 972 */ 973 @Child(name = "coverage", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 974 @Description(shortDefinition = "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account", formalDefinition = "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.") 975 protected List<CoverageComponent> coverage; 976 977 /** 978 * Indicates the service area, hospital, department, etc. with responsibility 979 * for managing the Account. 980 */ 981 @Child(name = "owner", type = { Organization.class }, order = 7, min = 0, max = 1, modifier = false, summary = true) 982 @Description(shortDefinition = "Entity managing the Account", formalDefinition = "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.") 983 protected Reference owner; 984 985 /** 986 * The actual object that is the target of the reference (Indicates the service 987 * area, hospital, department, etc. with responsibility for managing the 988 * Account.) 989 */ 990 protected Organization ownerTarget; 991 992 /** 993 * Provides additional information about what the account tracks and how it is 994 * used. 995 */ 996 @Child(name = "description", type = { 997 StringType.class }, order = 8, min = 0, max = 1, modifier = false, summary = true) 998 @Description(shortDefinition = "Explanation of purpose/use", formalDefinition = "Provides additional information about what the account tracks and how it is used.") 999 protected StringType description; 1000 1001 /** 1002 * The parties responsible for balancing the account if other payment options 1003 * fall short. 1004 */ 1005 @Child(name = "guarantor", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1006 @Description(shortDefinition = "The parties ultimately responsible for balancing the Account", formalDefinition = "The parties responsible for balancing the account if other payment options fall short.") 1007 protected List<GuarantorComponent> guarantor; 1008 1009 /** 1010 * Reference to a parent Account. 1011 */ 1012 @Child(name = "partOf", type = { Account.class }, order = 10, min = 0, max = 1, modifier = false, summary = false) 1013 @Description(shortDefinition = "Reference to a parent Account", formalDefinition = "Reference to a parent Account.") 1014 protected Reference partOf; 1015 1016 /** 1017 * The actual object that is the target of the reference (Reference to a parent 1018 * Account.) 1019 */ 1020 protected Account partOfTarget; 1021 1022 private static final long serialVersionUID = 1211238069L; 1023 1024 /** 1025 * Constructor 1026 */ 1027 public Account() { 1028 super(); 1029 } 1030 1031 /** 1032 * Constructor 1033 */ 1034 public Account(Enumeration<AccountStatus> status) { 1035 super(); 1036 this.status = status; 1037 } 1038 1039 /** 1040 * @return {@link #identifier} (Unique identifier used to reference the account. 1041 * Might or might not be intended for human use (e.g. credit card 1042 * number).) 1043 */ 1044 public List<Identifier> getIdentifier() { 1045 if (this.identifier == null) 1046 this.identifier = new ArrayList<Identifier>(); 1047 return this.identifier; 1048 } 1049 1050 /** 1051 * @return Returns a reference to <code>this</code> for easy method chaining 1052 */ 1053 public Account setIdentifier(List<Identifier> theIdentifier) { 1054 this.identifier = theIdentifier; 1055 return this; 1056 } 1057 1058 public boolean hasIdentifier() { 1059 if (this.identifier == null) 1060 return false; 1061 for (Identifier item : this.identifier) 1062 if (!item.isEmpty()) 1063 return true; 1064 return false; 1065 } 1066 1067 public Identifier addIdentifier() { // 3 1068 Identifier t = new Identifier(); 1069 if (this.identifier == null) 1070 this.identifier = new ArrayList<Identifier>(); 1071 this.identifier.add(t); 1072 return t; 1073 } 1074 1075 public Account addIdentifier(Identifier t) { // 3 1076 if (t == null) 1077 return this; 1078 if (this.identifier == null) 1079 this.identifier = new ArrayList<Identifier>(); 1080 this.identifier.add(t); 1081 return this; 1082 } 1083 1084 /** 1085 * @return The first repetition of repeating field {@link #identifier}, creating 1086 * it if it does not already exist 1087 */ 1088 public Identifier getIdentifierFirstRep() { 1089 if (getIdentifier().isEmpty()) { 1090 addIdentifier(); 1091 } 1092 return getIdentifier().get(0); 1093 } 1094 1095 /** 1096 * @return {@link #status} (Indicates whether the account is presently 1097 * used/usable or not.). This is the underlying object with id, value 1098 * and extensions. The accessor "getStatus" gives direct access to the 1099 * value 1100 */ 1101 public Enumeration<AccountStatus> getStatusElement() { 1102 if (this.status == null) 1103 if (Configuration.errorOnAutoCreate()) 1104 throw new Error("Attempt to auto-create Account.status"); 1105 else if (Configuration.doAutoCreate()) 1106 this.status = new Enumeration<AccountStatus>(new AccountStatusEnumFactory()); // bb 1107 return this.status; 1108 } 1109 1110 public boolean hasStatusElement() { 1111 return this.status != null && !this.status.isEmpty(); 1112 } 1113 1114 public boolean hasStatus() { 1115 return this.status != null && !this.status.isEmpty(); 1116 } 1117 1118 /** 1119 * @param value {@link #status} (Indicates whether the account is presently 1120 * used/usable or not.). This is the underlying object with id, 1121 * value and extensions. The accessor "getStatus" gives direct 1122 * access to the value 1123 */ 1124 public Account setStatusElement(Enumeration<AccountStatus> value) { 1125 this.status = value; 1126 return this; 1127 } 1128 1129 /** 1130 * @return Indicates whether the account is presently used/usable or not. 1131 */ 1132 public AccountStatus getStatus() { 1133 return this.status == null ? null : this.status.getValue(); 1134 } 1135 1136 /** 1137 * @param value Indicates whether the account is presently used/usable or not. 1138 */ 1139 public Account setStatus(AccountStatus value) { 1140 if (this.status == null) 1141 this.status = new Enumeration<AccountStatus>(new AccountStatusEnumFactory()); 1142 this.status.setValue(value); 1143 return this; 1144 } 1145 1146 /** 1147 * @return {@link #type} (Categorizes the account for reporting and searching 1148 * purposes.) 1149 */ 1150 public CodeableConcept getType() { 1151 if (this.type == null) 1152 if (Configuration.errorOnAutoCreate()) 1153 throw new Error("Attempt to auto-create Account.type"); 1154 else if (Configuration.doAutoCreate()) 1155 this.type = new CodeableConcept(); // cc 1156 return this.type; 1157 } 1158 1159 public boolean hasType() { 1160 return this.type != null && !this.type.isEmpty(); 1161 } 1162 1163 /** 1164 * @param value {@link #type} (Categorizes the account for reporting and 1165 * searching purposes.) 1166 */ 1167 public Account setType(CodeableConcept value) { 1168 this.type = value; 1169 return this; 1170 } 1171 1172 /** 1173 * @return {@link #name} (Name used for the account when displaying it to humans 1174 * in reports, etc.). This is the underlying object with id, value and 1175 * extensions. The accessor "getName" gives direct access to the value 1176 */ 1177 public StringType getNameElement() { 1178 if (this.name == null) 1179 if (Configuration.errorOnAutoCreate()) 1180 throw new Error("Attempt to auto-create Account.name"); 1181 else if (Configuration.doAutoCreate()) 1182 this.name = new StringType(); // bb 1183 return this.name; 1184 } 1185 1186 public boolean hasNameElement() { 1187 return this.name != null && !this.name.isEmpty(); 1188 } 1189 1190 public boolean hasName() { 1191 return this.name != null && !this.name.isEmpty(); 1192 } 1193 1194 /** 1195 * @param value {@link #name} (Name used for the account when displaying it to 1196 * humans in reports, etc.). This is the underlying object with id, 1197 * value and extensions. The accessor "getName" gives direct access 1198 * to the value 1199 */ 1200 public Account setNameElement(StringType value) { 1201 this.name = value; 1202 return this; 1203 } 1204 1205 /** 1206 * @return Name used for the account when displaying it to humans in reports, 1207 * etc. 1208 */ 1209 public String getName() { 1210 return this.name == null ? null : this.name.getValue(); 1211 } 1212 1213 /** 1214 * @param value Name used for the account when displaying it to humans in 1215 * reports, etc. 1216 */ 1217 public Account setName(String value) { 1218 if (Utilities.noString(value)) 1219 this.name = null; 1220 else { 1221 if (this.name == null) 1222 this.name = new StringType(); 1223 this.name.setValue(value); 1224 } 1225 return this; 1226 } 1227 1228 /** 1229 * @return {@link #subject} (Identifies the entity which incurs the expenses. 1230 * While the immediate recipients of services or goods might be entities 1231 * related to the subject, the expenses were ultimately incurred by the 1232 * subject of the Account.) 1233 */ 1234 public List<Reference> getSubject() { 1235 if (this.subject == null) 1236 this.subject = new ArrayList<Reference>(); 1237 return this.subject; 1238 } 1239 1240 /** 1241 * @return Returns a reference to <code>this</code> for easy method chaining 1242 */ 1243 public Account setSubject(List<Reference> theSubject) { 1244 this.subject = theSubject; 1245 return this; 1246 } 1247 1248 public boolean hasSubject() { 1249 if (this.subject == null) 1250 return false; 1251 for (Reference item : this.subject) 1252 if (!item.isEmpty()) 1253 return true; 1254 return false; 1255 } 1256 1257 public Reference addSubject() { // 3 1258 Reference t = new Reference(); 1259 if (this.subject == null) 1260 this.subject = new ArrayList<Reference>(); 1261 this.subject.add(t); 1262 return t; 1263 } 1264 1265 public Account addSubject(Reference t) { // 3 1266 if (t == null) 1267 return this; 1268 if (this.subject == null) 1269 this.subject = new ArrayList<Reference>(); 1270 this.subject.add(t); 1271 return this; 1272 } 1273 1274 /** 1275 * @return The first repetition of repeating field {@link #subject}, creating it 1276 * if it does not already exist 1277 */ 1278 public Reference getSubjectFirstRep() { 1279 if (getSubject().isEmpty()) { 1280 addSubject(); 1281 } 1282 return getSubject().get(0); 1283 } 1284 1285 /** 1286 * @deprecated Use Reference#setResource(IBaseResource) instead 1287 */ 1288 @Deprecated 1289 public List<Resource> getSubjectTarget() { 1290 if (this.subjectTarget == null) 1291 this.subjectTarget = new ArrayList<Resource>(); 1292 return this.subjectTarget; 1293 } 1294 1295 /** 1296 * @return {@link #servicePeriod} (The date range of services associated with 1297 * this account.) 1298 */ 1299 public Period getServicePeriod() { 1300 if (this.servicePeriod == null) 1301 if (Configuration.errorOnAutoCreate()) 1302 throw new Error("Attempt to auto-create Account.servicePeriod"); 1303 else if (Configuration.doAutoCreate()) 1304 this.servicePeriod = new Period(); // cc 1305 return this.servicePeriod; 1306 } 1307 1308 public boolean hasServicePeriod() { 1309 return this.servicePeriod != null && !this.servicePeriod.isEmpty(); 1310 } 1311 1312 /** 1313 * @param value {@link #servicePeriod} (The date range of services associated 1314 * with this account.) 1315 */ 1316 public Account setServicePeriod(Period value) { 1317 this.servicePeriod = value; 1318 return this; 1319 } 1320 1321 /** 1322 * @return {@link #coverage} (The party(s) that are responsible for covering the 1323 * payment of this account, and what order should they be applied to the 1324 * account.) 1325 */ 1326 public List<CoverageComponent> getCoverage() { 1327 if (this.coverage == null) 1328 this.coverage = new ArrayList<CoverageComponent>(); 1329 return this.coverage; 1330 } 1331 1332 /** 1333 * @return Returns a reference to <code>this</code> for easy method chaining 1334 */ 1335 public Account setCoverage(List<CoverageComponent> theCoverage) { 1336 this.coverage = theCoverage; 1337 return this; 1338 } 1339 1340 public boolean hasCoverage() { 1341 if (this.coverage == null) 1342 return false; 1343 for (CoverageComponent item : this.coverage) 1344 if (!item.isEmpty()) 1345 return true; 1346 return false; 1347 } 1348 1349 public CoverageComponent addCoverage() { // 3 1350 CoverageComponent t = new CoverageComponent(); 1351 if (this.coverage == null) 1352 this.coverage = new ArrayList<CoverageComponent>(); 1353 this.coverage.add(t); 1354 return t; 1355 } 1356 1357 public Account addCoverage(CoverageComponent t) { // 3 1358 if (t == null) 1359 return this; 1360 if (this.coverage == null) 1361 this.coverage = new ArrayList<CoverageComponent>(); 1362 this.coverage.add(t); 1363 return this; 1364 } 1365 1366 /** 1367 * @return The first repetition of repeating field {@link #coverage}, creating 1368 * it if it does not already exist 1369 */ 1370 public CoverageComponent getCoverageFirstRep() { 1371 if (getCoverage().isEmpty()) { 1372 addCoverage(); 1373 } 1374 return getCoverage().get(0); 1375 } 1376 1377 /** 1378 * @return {@link #owner} (Indicates the service area, hospital, department, 1379 * etc. with responsibility for managing the Account.) 1380 */ 1381 public Reference getOwner() { 1382 if (this.owner == null) 1383 if (Configuration.errorOnAutoCreate()) 1384 throw new Error("Attempt to auto-create Account.owner"); 1385 else if (Configuration.doAutoCreate()) 1386 this.owner = new Reference(); // cc 1387 return this.owner; 1388 } 1389 1390 public boolean hasOwner() { 1391 return this.owner != null && !this.owner.isEmpty(); 1392 } 1393 1394 /** 1395 * @param value {@link #owner} (Indicates the service area, hospital, 1396 * department, etc. with responsibility for managing the Account.) 1397 */ 1398 public Account setOwner(Reference value) { 1399 this.owner = value; 1400 return this; 1401 } 1402 1403 /** 1404 * @return {@link #owner} The actual object that is the target of the reference. 1405 * The reference library doesn't populate this, but you can use it to 1406 * hold the resource if you resolve it. (Indicates the service area, 1407 * hospital, department, etc. with responsibility for managing the 1408 * Account.) 1409 */ 1410 public Organization getOwnerTarget() { 1411 if (this.ownerTarget == null) 1412 if (Configuration.errorOnAutoCreate()) 1413 throw new Error("Attempt to auto-create Account.owner"); 1414 else if (Configuration.doAutoCreate()) 1415 this.ownerTarget = new Organization(); // aa 1416 return this.ownerTarget; 1417 } 1418 1419 /** 1420 * @param value {@link #owner} The actual object that is the target of the 1421 * reference. The reference library doesn't use these, but you can 1422 * use it to hold the resource if you resolve it. (Indicates the 1423 * service area, hospital, department, etc. with responsibility for 1424 * managing the Account.) 1425 */ 1426 public Account setOwnerTarget(Organization value) { 1427 this.ownerTarget = value; 1428 return this; 1429 } 1430 1431 /** 1432 * @return {@link #description} (Provides additional information about what the 1433 * account tracks and how it is used.). This is the underlying object 1434 * with id, value and extensions. The accessor "getDescription" gives 1435 * direct access to the value 1436 */ 1437 public StringType getDescriptionElement() { 1438 if (this.description == null) 1439 if (Configuration.errorOnAutoCreate()) 1440 throw new Error("Attempt to auto-create Account.description"); 1441 else if (Configuration.doAutoCreate()) 1442 this.description = new StringType(); // bb 1443 return this.description; 1444 } 1445 1446 public boolean hasDescriptionElement() { 1447 return this.description != null && !this.description.isEmpty(); 1448 } 1449 1450 public boolean hasDescription() { 1451 return this.description != null && !this.description.isEmpty(); 1452 } 1453 1454 /** 1455 * @param value {@link #description} (Provides additional information about what 1456 * the account tracks and how it is used.). This is the underlying 1457 * object with id, value and extensions. The accessor 1458 * "getDescription" gives direct access to the value 1459 */ 1460 public Account setDescriptionElement(StringType value) { 1461 this.description = value; 1462 return this; 1463 } 1464 1465 /** 1466 * @return Provides additional information about what the account tracks and how 1467 * it is used. 1468 */ 1469 public String getDescription() { 1470 return this.description == null ? null : this.description.getValue(); 1471 } 1472 1473 /** 1474 * @param value Provides additional information about what the account tracks 1475 * and how it is used. 1476 */ 1477 public Account setDescription(String value) { 1478 if (Utilities.noString(value)) 1479 this.description = null; 1480 else { 1481 if (this.description == null) 1482 this.description = new StringType(); 1483 this.description.setValue(value); 1484 } 1485 return this; 1486 } 1487 1488 /** 1489 * @return {@link #guarantor} (The parties responsible for balancing the account 1490 * if other payment options fall short.) 1491 */ 1492 public List<GuarantorComponent> getGuarantor() { 1493 if (this.guarantor == null) 1494 this.guarantor = new ArrayList<GuarantorComponent>(); 1495 return this.guarantor; 1496 } 1497 1498 /** 1499 * @return Returns a reference to <code>this</code> for easy method chaining 1500 */ 1501 public Account setGuarantor(List<GuarantorComponent> theGuarantor) { 1502 this.guarantor = theGuarantor; 1503 return this; 1504 } 1505 1506 public boolean hasGuarantor() { 1507 if (this.guarantor == null) 1508 return false; 1509 for (GuarantorComponent item : this.guarantor) 1510 if (!item.isEmpty()) 1511 return true; 1512 return false; 1513 } 1514 1515 public GuarantorComponent addGuarantor() { // 3 1516 GuarantorComponent t = new GuarantorComponent(); 1517 if (this.guarantor == null) 1518 this.guarantor = new ArrayList<GuarantorComponent>(); 1519 this.guarantor.add(t); 1520 return t; 1521 } 1522 1523 public Account addGuarantor(GuarantorComponent t) { // 3 1524 if (t == null) 1525 return this; 1526 if (this.guarantor == null) 1527 this.guarantor = new ArrayList<GuarantorComponent>(); 1528 this.guarantor.add(t); 1529 return this; 1530 } 1531 1532 /** 1533 * @return The first repetition of repeating field {@link #guarantor}, creating 1534 * it if it does not already exist 1535 */ 1536 public GuarantorComponent getGuarantorFirstRep() { 1537 if (getGuarantor().isEmpty()) { 1538 addGuarantor(); 1539 } 1540 return getGuarantor().get(0); 1541 } 1542 1543 /** 1544 * @return {@link #partOf} (Reference to a parent Account.) 1545 */ 1546 public Reference getPartOf() { 1547 if (this.partOf == null) 1548 if (Configuration.errorOnAutoCreate()) 1549 throw new Error("Attempt to auto-create Account.partOf"); 1550 else if (Configuration.doAutoCreate()) 1551 this.partOf = new Reference(); // cc 1552 return this.partOf; 1553 } 1554 1555 public boolean hasPartOf() { 1556 return this.partOf != null && !this.partOf.isEmpty(); 1557 } 1558 1559 /** 1560 * @param value {@link #partOf} (Reference to a parent Account.) 1561 */ 1562 public Account setPartOf(Reference value) { 1563 this.partOf = value; 1564 return this; 1565 } 1566 1567 /** 1568 * @return {@link #partOf} The actual object that is the target of the 1569 * reference. The reference library doesn't populate this, but you can 1570 * use it to hold the resource if you resolve it. (Reference to a parent 1571 * Account.) 1572 */ 1573 public Account getPartOfTarget() { 1574 if (this.partOfTarget == null) 1575 if (Configuration.errorOnAutoCreate()) 1576 throw new Error("Attempt to auto-create Account.partOf"); 1577 else if (Configuration.doAutoCreate()) 1578 this.partOfTarget = new Account(); // aa 1579 return this.partOfTarget; 1580 } 1581 1582 /** 1583 * @param value {@link #partOf} The actual object that is the target of the 1584 * reference. The reference library doesn't use these, but you can 1585 * use it to hold the resource if you resolve it. (Reference to a 1586 * parent Account.) 1587 */ 1588 public Account setPartOfTarget(Account value) { 1589 this.partOfTarget = value; 1590 return this; 1591 } 1592 1593 protected void listChildren(List<Property> children) { 1594 super.listChildren(children); 1595 children.add(new Property("identifier", "Identifier", 1596 "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 1597 0, java.lang.Integer.MAX_VALUE, identifier)); 1598 children.add( 1599 new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status)); 1600 children.add(new Property("type", "CodeableConcept", 1601 "Categorizes the account for reporting and searching purposes.", 0, 1, type)); 1602 children.add(new Property("name", "string", 1603 "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name)); 1604 children.add(new Property("subject", 1605 "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", 1606 "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 1607 0, java.lang.Integer.MAX_VALUE, subject)); 1608 children.add(new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1609 1, servicePeriod)); 1610 children.add(new Property("coverage", "", 1611 "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 1612 0, java.lang.Integer.MAX_VALUE, coverage)); 1613 children.add(new Property("owner", "Reference(Organization)", 1614 "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, 1615 owner)); 1616 children.add(new Property("description", "string", 1617 "Provides additional information about what the account tracks and how it is used.", 0, 1, description)); 1618 children.add(new Property("guarantor", "", 1619 "The parties responsible for balancing the account if other payment options fall short.", 0, 1620 java.lang.Integer.MAX_VALUE, guarantor)); 1621 children.add(new Property("partOf", "Reference(Account)", "Reference to a parent Account.", 0, 1, partOf)); 1622 } 1623 1624 @Override 1625 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1626 switch (_hash) { 1627 case -1618432855: 1628 /* identifier */ return new Property("identifier", "Identifier", 1629 "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 1630 0, java.lang.Integer.MAX_VALUE, identifier); 1631 case -892481550: 1632 /* status */ return new Property("status", "code", 1633 "Indicates whether the account is presently used/usable or not.", 0, 1, status); 1634 case 3575610: 1635 /* type */ return new Property("type", "CodeableConcept", 1636 "Categorizes the account for reporting and searching purposes.", 0, 1, type); 1637 case 3373707: 1638 /* name */ return new Property("name", "string", 1639 "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name); 1640 case -1867885268: 1641 /* subject */ return new Property("subject", 1642 "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", 1643 "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 1644 0, java.lang.Integer.MAX_VALUE, subject); 1645 case 2129104086: 1646 /* servicePeriod */ return new Property("servicePeriod", "Period", 1647 "The date range of services associated with this account.", 0, 1, servicePeriod); 1648 case -351767064: 1649 /* coverage */ return new Property("coverage", "", 1650 "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 1651 0, java.lang.Integer.MAX_VALUE, coverage); 1652 case 106164915: 1653 /* owner */ return new Property("owner", "Reference(Organization)", 1654 "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, 1655 owner); 1656 case -1724546052: 1657 /* description */ return new Property("description", "string", 1658 "Provides additional information about what the account tracks and how it is used.", 0, 1, description); 1659 case -188629045: 1660 /* guarantor */ return new Property("guarantor", "", 1661 "The parties responsible for balancing the account if other payment options fall short.", 0, 1662 java.lang.Integer.MAX_VALUE, guarantor); 1663 case -995410646: 1664 /* partOf */ return new Property("partOf", "Reference(Account)", "Reference to a parent Account.", 0, 1, partOf); 1665 default: 1666 return super.getNamedProperty(_hash, _name, _checkValid); 1667 } 1668 1669 } 1670 1671 @Override 1672 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1673 switch (hash) { 1674 case -1618432855: 1675 /* identifier */ return this.identifier == null ? new Base[0] 1676 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1677 case -892481550: 1678 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<AccountStatus> 1679 case 3575610: 1680 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 1681 case 3373707: 1682 /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType 1683 case -1867885268: 1684 /* subject */ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference 1685 case 2129104086: 1686 /* servicePeriod */ return this.servicePeriod == null ? new Base[0] : new Base[] { this.servicePeriod }; // Period 1687 case -351767064: 1688 /* coverage */ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // CoverageComponent 1689 case 106164915: 1690 /* owner */ return this.owner == null ? new Base[0] : new Base[] { this.owner }; // Reference 1691 case -1724546052: 1692 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 1693 case -188629045: 1694 /* guarantor */ return this.guarantor == null ? new Base[0] 1695 : this.guarantor.toArray(new Base[this.guarantor.size()]); // GuarantorComponent 1696 case -995410646: 1697 /* partOf */ return this.partOf == null ? new Base[0] : new Base[] { this.partOf }; // Reference 1698 default: 1699 return super.getProperty(hash, name, checkValid); 1700 } 1701 1702 } 1703 1704 @Override 1705 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1706 switch (hash) { 1707 case -1618432855: // identifier 1708 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1709 return value; 1710 case -892481550: // status 1711 value = new AccountStatusEnumFactory().fromType(castToCode(value)); 1712 this.status = (Enumeration) value; // Enumeration<AccountStatus> 1713 return value; 1714 case 3575610: // type 1715 this.type = castToCodeableConcept(value); // CodeableConcept 1716 return value; 1717 case 3373707: // name 1718 this.name = castToString(value); // StringType 1719 return value; 1720 case -1867885268: // subject 1721 this.getSubject().add(castToReference(value)); // Reference 1722 return value; 1723 case 2129104086: // servicePeriod 1724 this.servicePeriod = castToPeriod(value); // Period 1725 return value; 1726 case -351767064: // coverage 1727 this.getCoverage().add((CoverageComponent) value); // CoverageComponent 1728 return value; 1729 case 106164915: // owner 1730 this.owner = castToReference(value); // Reference 1731 return value; 1732 case -1724546052: // description 1733 this.description = castToString(value); // StringType 1734 return value; 1735 case -188629045: // guarantor 1736 this.getGuarantor().add((GuarantorComponent) value); // GuarantorComponent 1737 return value; 1738 case -995410646: // partOf 1739 this.partOf = castToReference(value); // Reference 1740 return value; 1741 default: 1742 return super.setProperty(hash, name, value); 1743 } 1744 1745 } 1746 1747 @Override 1748 public Base setProperty(String name, Base value) throws FHIRException { 1749 if (name.equals("identifier")) { 1750 this.getIdentifier().add(castToIdentifier(value)); 1751 } else if (name.equals("status")) { 1752 value = new AccountStatusEnumFactory().fromType(castToCode(value)); 1753 this.status = (Enumeration) value; // Enumeration<AccountStatus> 1754 } else if (name.equals("type")) { 1755 this.type = castToCodeableConcept(value); // CodeableConcept 1756 } else if (name.equals("name")) { 1757 this.name = castToString(value); // StringType 1758 } else if (name.equals("subject")) { 1759 this.getSubject().add(castToReference(value)); 1760 } else if (name.equals("servicePeriod")) { 1761 this.servicePeriod = castToPeriod(value); // Period 1762 } else if (name.equals("coverage")) { 1763 this.getCoverage().add((CoverageComponent) value); 1764 } else if (name.equals("owner")) { 1765 this.owner = castToReference(value); // Reference 1766 } else if (name.equals("description")) { 1767 this.description = castToString(value); // StringType 1768 } else if (name.equals("guarantor")) { 1769 this.getGuarantor().add((GuarantorComponent) value); 1770 } else if (name.equals("partOf")) { 1771 this.partOf = castToReference(value); // Reference 1772 } else 1773 return super.setProperty(name, value); 1774 return value; 1775 } 1776 1777 @Override 1778 public void removeChild(String name, Base value) throws FHIRException { 1779 if (name.equals("identifier")) { 1780 this.getIdentifier().remove(castToIdentifier(value)); 1781 } else if (name.equals("status")) { 1782 this.status = null; 1783 } else if (name.equals("type")) { 1784 this.type = null; 1785 } else if (name.equals("name")) { 1786 this.name = null; 1787 } else if (name.equals("subject")) { 1788 this.getSubject().remove(castToReference(value)); 1789 } else if (name.equals("servicePeriod")) { 1790 this.servicePeriod = null; 1791 } else if (name.equals("coverage")) { 1792 this.getCoverage().remove((CoverageComponent) value); 1793 } else if (name.equals("owner")) { 1794 this.owner = null; 1795 } else if (name.equals("description")) { 1796 this.description = null; 1797 } else if (name.equals("guarantor")) { 1798 this.getGuarantor().remove((GuarantorComponent) value); 1799 } else if (name.equals("partOf")) { 1800 this.partOf = null; 1801 } else 1802 super.removeChild(name, value); 1803 1804 } 1805 1806 @Override 1807 public Base makeProperty(int hash, String name) throws FHIRException { 1808 switch (hash) { 1809 case -1618432855: 1810 return addIdentifier(); 1811 case -892481550: 1812 return getStatusElement(); 1813 case 3575610: 1814 return getType(); 1815 case 3373707: 1816 return getNameElement(); 1817 case -1867885268: 1818 return addSubject(); 1819 case 2129104086: 1820 return getServicePeriod(); 1821 case -351767064: 1822 return addCoverage(); 1823 case 106164915: 1824 return getOwner(); 1825 case -1724546052: 1826 return getDescriptionElement(); 1827 case -188629045: 1828 return addGuarantor(); 1829 case -995410646: 1830 return getPartOf(); 1831 default: 1832 return super.makeProperty(hash, name); 1833 } 1834 1835 } 1836 1837 @Override 1838 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1839 switch (hash) { 1840 case -1618432855: 1841 /* identifier */ return new String[] { "Identifier" }; 1842 case -892481550: 1843 /* status */ return new String[] { "code" }; 1844 case 3575610: 1845 /* type */ return new String[] { "CodeableConcept" }; 1846 case 3373707: 1847 /* name */ return new String[] { "string" }; 1848 case -1867885268: 1849 /* subject */ return new String[] { "Reference" }; 1850 case 2129104086: 1851 /* servicePeriod */ return new String[] { "Period" }; 1852 case -351767064: 1853 /* coverage */ return new String[] {}; 1854 case 106164915: 1855 /* owner */ return new String[] { "Reference" }; 1856 case -1724546052: 1857 /* description */ return new String[] { "string" }; 1858 case -188629045: 1859 /* guarantor */ return new String[] {}; 1860 case -995410646: 1861 /* partOf */ return new String[] { "Reference" }; 1862 default: 1863 return super.getTypesForProperty(hash, name); 1864 } 1865 1866 } 1867 1868 @Override 1869 public Base addChild(String name) throws FHIRException { 1870 if (name.equals("identifier")) { 1871 return addIdentifier(); 1872 } else if (name.equals("status")) { 1873 throw new FHIRException("Cannot call addChild on a singleton property Account.status"); 1874 } else if (name.equals("type")) { 1875 this.type = new CodeableConcept(); 1876 return this.type; 1877 } else if (name.equals("name")) { 1878 throw new FHIRException("Cannot call addChild on a singleton property Account.name"); 1879 } else if (name.equals("subject")) { 1880 return addSubject(); 1881 } else if (name.equals("servicePeriod")) { 1882 this.servicePeriod = new Period(); 1883 return this.servicePeriod; 1884 } else if (name.equals("coverage")) { 1885 return addCoverage(); 1886 } else if (name.equals("owner")) { 1887 this.owner = new Reference(); 1888 return this.owner; 1889 } else if (name.equals("description")) { 1890 throw new FHIRException("Cannot call addChild on a singleton property Account.description"); 1891 } else if (name.equals("guarantor")) { 1892 return addGuarantor(); 1893 } else if (name.equals("partOf")) { 1894 this.partOf = new Reference(); 1895 return this.partOf; 1896 } else 1897 return super.addChild(name); 1898 } 1899 1900 public String fhirType() { 1901 return "Account"; 1902 1903 } 1904 1905 public Account copy() { 1906 Account dst = new Account(); 1907 copyValues(dst); 1908 return dst; 1909 } 1910 1911 public void copyValues(Account dst) { 1912 super.copyValues(dst); 1913 if (identifier != null) { 1914 dst.identifier = new ArrayList<Identifier>(); 1915 for (Identifier i : identifier) 1916 dst.identifier.add(i.copy()); 1917 } 1918 ; 1919 dst.status = status == null ? null : status.copy(); 1920 dst.type = type == null ? null : type.copy(); 1921 dst.name = name == null ? null : name.copy(); 1922 if (subject != null) { 1923 dst.subject = new ArrayList<Reference>(); 1924 for (Reference i : subject) 1925 dst.subject.add(i.copy()); 1926 } 1927 ; 1928 dst.servicePeriod = servicePeriod == null ? null : servicePeriod.copy(); 1929 if (coverage != null) { 1930 dst.coverage = new ArrayList<CoverageComponent>(); 1931 for (CoverageComponent i : coverage) 1932 dst.coverage.add(i.copy()); 1933 } 1934 ; 1935 dst.owner = owner == null ? null : owner.copy(); 1936 dst.description = description == null ? null : description.copy(); 1937 if (guarantor != null) { 1938 dst.guarantor = new ArrayList<GuarantorComponent>(); 1939 for (GuarantorComponent i : guarantor) 1940 dst.guarantor.add(i.copy()); 1941 } 1942 ; 1943 dst.partOf = partOf == null ? null : partOf.copy(); 1944 } 1945 1946 protected Account typedCopy() { 1947 return copy(); 1948 } 1949 1950 @Override 1951 public boolean equalsDeep(Base other_) { 1952 if (!super.equalsDeep(other_)) 1953 return false; 1954 if (!(other_ instanceof Account)) 1955 return false; 1956 Account o = (Account) other_; 1957 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) 1958 && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) 1959 && compareDeep(servicePeriod, o.servicePeriod, true) && compareDeep(coverage, o.coverage, true) 1960 && compareDeep(owner, o.owner, true) && compareDeep(description, o.description, true) 1961 && compareDeep(guarantor, o.guarantor, true) && compareDeep(partOf, o.partOf, true); 1962 } 1963 1964 @Override 1965 public boolean equalsShallow(Base other_) { 1966 if (!super.equalsShallow(other_)) 1967 return false; 1968 if (!(other_ instanceof Account)) 1969 return false; 1970 Account o = (Account) other_; 1971 return compareValues(status, o.status, true) && compareValues(name, o.name, true) 1972 && compareValues(description, o.description, true); 1973 } 1974 1975 public boolean isEmpty() { 1976 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type, name, subject, 1977 servicePeriod, coverage, owner, description, guarantor, partOf); 1978 } 1979 1980 @Override 1981 public ResourceType getResourceType() { 1982 return ResourceType.Account; 1983 } 1984 1985 /** 1986 * Search parameter: <b>owner</b> 1987 * <p> 1988 * Description: <b>Entity managing the Account</b><br> 1989 * Type: <b>reference</b><br> 1990 * Path: <b>Account.owner</b><br> 1991 * </p> 1992 */ 1993 @SearchParamDefinition(name = "owner", path = "Account.owner", description = "Entity managing the Account", type = "reference", target = { 1994 Organization.class }) 1995 public static final String SP_OWNER = "owner"; 1996 /** 1997 * <b>Fluent Client</b> search parameter constant for <b>owner</b> 1998 * <p> 1999 * Description: <b>Entity managing the Account</b><br> 2000 * Type: <b>reference</b><br> 2001 * Path: <b>Account.owner</b><br> 2002 * </p> 2003 */ 2004 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2005 SP_OWNER); 2006 2007 /** 2008 * Constant for fluent queries to be used to add include statements. Specifies 2009 * the path value of "<b>Account:owner</b>". 2010 */ 2011 public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Account:owner") 2012 .toLocked(); 2013 2014 /** 2015 * Search parameter: <b>identifier</b> 2016 * <p> 2017 * Description: <b>Account number</b><br> 2018 * Type: <b>token</b><br> 2019 * Path: <b>Account.identifier</b><br> 2020 * </p> 2021 */ 2022 @SearchParamDefinition(name = "identifier", path = "Account.identifier", description = "Account number", type = "token") 2023 public static final String SP_IDENTIFIER = "identifier"; 2024 /** 2025 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2026 * <p> 2027 * Description: <b>Account number</b><br> 2028 * Type: <b>token</b><br> 2029 * Path: <b>Account.identifier</b><br> 2030 * </p> 2031 */ 2032 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2033 SP_IDENTIFIER); 2034 2035 /** 2036 * Search parameter: <b>period</b> 2037 * <p> 2038 * Description: <b>Transaction window</b><br> 2039 * Type: <b>date</b><br> 2040 * Path: <b>Account.servicePeriod</b><br> 2041 * </p> 2042 */ 2043 @SearchParamDefinition(name = "period", path = "Account.servicePeriod", description = "Transaction window", type = "date") 2044 public static final String SP_PERIOD = "period"; 2045 /** 2046 * <b>Fluent Client</b> search parameter constant for <b>period</b> 2047 * <p> 2048 * Description: <b>Transaction window</b><br> 2049 * Type: <b>date</b><br> 2050 * Path: <b>Account.servicePeriod</b><br> 2051 * </p> 2052 */ 2053 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam( 2054 SP_PERIOD); 2055 2056 /** 2057 * Search parameter: <b>subject</b> 2058 * <p> 2059 * Description: <b>The entity that caused the expenses</b><br> 2060 * Type: <b>reference</b><br> 2061 * Path: <b>Account.subject</b><br> 2062 * </p> 2063 */ 2064 @SearchParamDefinition(name = "subject", path = "Account.subject", description = "The entity that caused the expenses", type = "reference", providesMembershipIn = { 2065 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Device"), 2066 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Patient"), 2067 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Practitioner") }, target = { Device.class, 2068 HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, 2069 PractitionerRole.class }) 2070 public static final String SP_SUBJECT = "subject"; 2071 /** 2072 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2073 * <p> 2074 * Description: <b>The entity that caused the expenses</b><br> 2075 * Type: <b>reference</b><br> 2076 * Path: <b>Account.subject</b><br> 2077 * </p> 2078 */ 2079 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2080 SP_SUBJECT); 2081 2082 /** 2083 * Constant for fluent queries to be used to add include statements. Specifies 2084 * the path value of "<b>Account:subject</b>". 2085 */ 2086 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include( 2087 "Account:subject").toLocked(); 2088 2089 /** 2090 * Search parameter: <b>patient</b> 2091 * <p> 2092 * Description: <b>The entity that caused the expenses</b><br> 2093 * Type: <b>reference</b><br> 2094 * Path: <b>Account.subject</b><br> 2095 * </p> 2096 */ 2097 @SearchParamDefinition(name = "patient", path = "Account.subject.where(resolve() is Patient)", description = "The entity that caused the expenses", type = "reference", target = { 2098 Patient.class }) 2099 public static final String SP_PATIENT = "patient"; 2100 /** 2101 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2102 * <p> 2103 * Description: <b>The entity that caused the expenses</b><br> 2104 * Type: <b>reference</b><br> 2105 * Path: <b>Account.subject</b><br> 2106 * </p> 2107 */ 2108 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2109 SP_PATIENT); 2110 2111 /** 2112 * Constant for fluent queries to be used to add include statements. Specifies 2113 * the path value of "<b>Account:patient</b>". 2114 */ 2115 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include( 2116 "Account:patient").toLocked(); 2117 2118 /** 2119 * Search parameter: <b>name</b> 2120 * <p> 2121 * Description: <b>Human-readable label</b><br> 2122 * Type: <b>string</b><br> 2123 * Path: <b>Account.name</b><br> 2124 * </p> 2125 */ 2126 @SearchParamDefinition(name = "name", path = "Account.name", description = "Human-readable label", type = "string") 2127 public static final String SP_NAME = "name"; 2128 /** 2129 * <b>Fluent Client</b> search parameter constant for <b>name</b> 2130 * <p> 2131 * Description: <b>Human-readable label</b><br> 2132 * Type: <b>string</b><br> 2133 * Path: <b>Account.name</b><br> 2134 * </p> 2135 */ 2136 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam( 2137 SP_NAME); 2138 2139 /** 2140 * Search parameter: <b>type</b> 2141 * <p> 2142 * Description: <b>E.g. patient, expense, depreciation</b><br> 2143 * Type: <b>token</b><br> 2144 * Path: <b>Account.type</b><br> 2145 * </p> 2146 */ 2147 @SearchParamDefinition(name = "type", path = "Account.type", description = "E.g. patient, expense, depreciation", type = "token") 2148 public static final String SP_TYPE = "type"; 2149 /** 2150 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2151 * <p> 2152 * Description: <b>E.g. patient, expense, depreciation</b><br> 2153 * Type: <b>token</b><br> 2154 * Path: <b>Account.type</b><br> 2155 * </p> 2156 */ 2157 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2158 SP_TYPE); 2159 2160 /** 2161 * Search parameter: <b>status</b> 2162 * <p> 2163 * Description: <b>active | inactive | entered-in-error | on-hold | 2164 * unknown</b><br> 2165 * Type: <b>token</b><br> 2166 * Path: <b>Account.status</b><br> 2167 * </p> 2168 */ 2169 @SearchParamDefinition(name = "status", path = "Account.status", description = "active | inactive | entered-in-error | on-hold | unknown", type = "token") 2170 public static final String SP_STATUS = "status"; 2171 /** 2172 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2173 * <p> 2174 * Description: <b>active | inactive | entered-in-error | on-hold | 2175 * unknown</b><br> 2176 * Type: <b>token</b><br> 2177 * Path: <b>Account.status</b><br> 2178 * </p> 2179 */ 2180 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2181 SP_STATUS); 2182 2183}