001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
052 */
053@ResourceDef(name="Account", profile="http://hl7.org/fhir/StructureDefinition/Account")
054public class Account extends DomainResource {
055
056    public enum AccountStatus {
057        /**
058         * This account is active and may be used.
059         */
060        ACTIVE, 
061        /**
062         * This account is inactive and should not be used to track financial information.
063         */
064        INACTIVE, 
065        /**
066         * This instance should not have been part of this patient's medical record.
067         */
068        ENTEREDINERROR, 
069        /**
070         * This account is on hold.
071         */
072        ONHOLD, 
073        /**
074         * The account status is unknown.
075         */
076        UNKNOWN, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static AccountStatus fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("active".equals(codeString))
085          return ACTIVE;
086        if ("inactive".equals(codeString))
087          return INACTIVE;
088        if ("entered-in-error".equals(codeString))
089          return ENTEREDINERROR;
090        if ("on-hold".equals(codeString))
091          return ONHOLD;
092        if ("unknown".equals(codeString))
093          return UNKNOWN;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown AccountStatus code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case ACTIVE: return "active";
102            case INACTIVE: return "inactive";
103            case ENTEREDINERROR: return "entered-in-error";
104            case ONHOLD: return "on-hold";
105            case UNKNOWN: return "unknown";
106            default: return "?";
107          }
108        }
109        public String getSystem() {
110          switch (this) {
111            case ACTIVE: return "http://hl7.org/fhir/account-status";
112            case INACTIVE: return "http://hl7.org/fhir/account-status";
113            case ENTEREDINERROR: return "http://hl7.org/fhir/account-status";
114            case ONHOLD: return "http://hl7.org/fhir/account-status";
115            case UNKNOWN: return "http://hl7.org/fhir/account-status";
116            default: return "?";
117          }
118        }
119        public String getDefinition() {
120          switch (this) {
121            case ACTIVE: return "This account is active and may be used.";
122            case INACTIVE: return "This account is inactive and should not be used to track financial information.";
123            case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record.";
124            case ONHOLD: return "This account is on hold.";
125            case UNKNOWN: return "The account status is unknown.";
126            default: return "?";
127          }
128        }
129        public String getDisplay() {
130          switch (this) {
131            case ACTIVE: return "Active";
132            case INACTIVE: return "Inactive";
133            case ENTEREDINERROR: return "Entered in error";
134            case ONHOLD: return "On Hold";
135            case UNKNOWN: return "Unknown";
136            default: return "?";
137          }
138        }
139    }
140
141  public static class AccountStatusEnumFactory implements EnumFactory<AccountStatus> {
142    public AccountStatus fromCode(String codeString) throws IllegalArgumentException {
143      if (codeString == null || "".equals(codeString))
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("active".equals(codeString))
147          return AccountStatus.ACTIVE;
148        if ("inactive".equals(codeString))
149          return AccountStatus.INACTIVE;
150        if ("entered-in-error".equals(codeString))
151          return AccountStatus.ENTEREDINERROR;
152        if ("on-hold".equals(codeString))
153          return AccountStatus.ONHOLD;
154        if ("unknown".equals(codeString))
155          return AccountStatus.UNKNOWN;
156        throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'");
157        }
158        public Enumeration<AccountStatus> fromType(Base code) throws FHIRException {
159          if (code == null)
160            return null;
161          if (code.isEmpty())
162            return new Enumeration<AccountStatus>(this);
163          String codeString = ((PrimitiveType) code).asStringValue();
164          if (codeString == null || "".equals(codeString))
165            return null;
166        if ("active".equals(codeString))
167          return new Enumeration<AccountStatus>(this, AccountStatus.ACTIVE);
168        if ("inactive".equals(codeString))
169          return new Enumeration<AccountStatus>(this, AccountStatus.INACTIVE);
170        if ("entered-in-error".equals(codeString))
171          return new Enumeration<AccountStatus>(this, AccountStatus.ENTEREDINERROR);
172        if ("on-hold".equals(codeString))
173          return new Enumeration<AccountStatus>(this, AccountStatus.ONHOLD);
174        if ("unknown".equals(codeString))
175          return new Enumeration<AccountStatus>(this, AccountStatus.UNKNOWN);
176        throw new FHIRException("Unknown AccountStatus code '"+codeString+"'");
177        }
178    public String toCode(AccountStatus code) {
179      if (code == AccountStatus.ACTIVE)
180        return "active";
181      if (code == AccountStatus.INACTIVE)
182        return "inactive";
183      if (code == AccountStatus.ENTEREDINERROR)
184        return "entered-in-error";
185      if (code == AccountStatus.ONHOLD)
186        return "on-hold";
187      if (code == AccountStatus.UNKNOWN)
188        return "unknown";
189      return "?";
190      }
191    public String toSystem(AccountStatus code) {
192      return code.getSystem();
193      }
194    }
195
196    @Block()
197    public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement {
198        /**
199         * The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
200
201A 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.
202         */
203        @Child(name = "coverage", type = {Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true)
204        @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." )
205        protected Reference coverage;
206
207        /**
208         * The priority of the coverage in the context of this account.
209         */
210        @Child(name = "priority", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=true)
211        @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." )
212        protected PositiveIntType priority;
213
214        private static final long serialVersionUID = 1695665065L;
215
216    /**
217     * Constructor
218     */
219      public CoverageComponent() {
220        super();
221      }
222
223    /**
224     * Constructor
225     */
226      public CoverageComponent(Reference coverage) {
227        super();
228        this.setCoverage(coverage);
229      }
230
231        /**
232         * @return {@link #coverage} (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
233
234A 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.)
235         */
236        public Reference getCoverage() { 
237          if (this.coverage == null)
238            if (Configuration.errorOnAutoCreate())
239              throw new Error("Attempt to auto-create CoverageComponent.coverage");
240            else if (Configuration.doAutoCreate())
241              this.coverage = new Reference(); // cc
242          return this.coverage;
243        }
244
245        public boolean hasCoverage() { 
246          return this.coverage != null && !this.coverage.isEmpty();
247        }
248
249        /**
250         * @param value {@link #coverage} (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
251
252A 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.)
253         */
254        public CoverageComponent setCoverage(Reference value) { 
255          this.coverage = value;
256          return this;
257        }
258
259        /**
260         * @return {@link #priority} (The priority of the coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
261         */
262        public PositiveIntType getPriorityElement() { 
263          if (this.priority == null)
264            if (Configuration.errorOnAutoCreate())
265              throw new Error("Attempt to auto-create CoverageComponent.priority");
266            else if (Configuration.doAutoCreate())
267              this.priority = new PositiveIntType(); // bb
268          return this.priority;
269        }
270
271        public boolean hasPriorityElement() { 
272          return this.priority != null && !this.priority.isEmpty();
273        }
274
275        public boolean hasPriority() { 
276          return this.priority != null && !this.priority.isEmpty();
277        }
278
279        /**
280         * @param value {@link #priority} (The priority of the coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
281         */
282        public CoverageComponent setPriorityElement(PositiveIntType value) { 
283          this.priority = value;
284          return this;
285        }
286
287        /**
288         * @return The priority of the coverage in the context of this account.
289         */
290        public int getPriority() { 
291          return this.priority == null || this.priority.isEmpty() ? 0 : this.priority.getValue();
292        }
293
294        /**
295         * @param value The priority of the coverage in the context of this account.
296         */
297        public CoverageComponent setPriority(int value) { 
298            if (this.priority == null)
299              this.priority = new PositiveIntType();
300            this.priority.setValue(value);
301          return this;
302        }
303
304        protected void listChildren(List<Property> children) {
305          super.listChildren(children);
306          children.add(new Property("coverage", "Reference(Coverage)", "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.", 0, 1, coverage));
307          children.add(new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority));
308        }
309
310        @Override
311        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
312          switch (_hash) {
313          case -351767064: /*coverage*/  return new Property("coverage", "Reference(Coverage)", "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.", 0, 1, coverage);
314          case -1165461084: /*priority*/  return new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority);
315          default: return super.getNamedProperty(_hash, _name, _checkValid);
316          }
317
318        }
319
320      @Override
321      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
322        switch (hash) {
323        case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference
324        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // PositiveIntType
325        default: return super.getProperty(hash, name, checkValid);
326        }
327
328      }
329
330      @Override
331      public Base setProperty(int hash, String name, Base value) throws FHIRException {
332        switch (hash) {
333        case -351767064: // coverage
334          this.coverage = TypeConvertor.castToReference(value); // Reference
335          return value;
336        case -1165461084: // priority
337          this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType
338          return value;
339        default: return super.setProperty(hash, name, value);
340        }
341
342      }
343
344      @Override
345      public Base setProperty(String name, Base value) throws FHIRException {
346        if (name.equals("coverage")) {
347          this.coverage = TypeConvertor.castToReference(value); // Reference
348        } else if (name.equals("priority")) {
349          this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType
350        } else
351          return super.setProperty(name, value);
352        return value;
353      }
354
355      @Override
356      public Base makeProperty(int hash, String name) throws FHIRException {
357        switch (hash) {
358        case -351767064:  return getCoverage();
359        case -1165461084:  return getPriorityElement();
360        default: return super.makeProperty(hash, name);
361        }
362
363      }
364
365      @Override
366      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
367        switch (hash) {
368        case -351767064: /*coverage*/ return new String[] {"Reference"};
369        case -1165461084: /*priority*/ return new String[] {"positiveInt"};
370        default: return super.getTypesForProperty(hash, name);
371        }
372
373      }
374
375      @Override
376      public Base addChild(String name) throws FHIRException {
377        if (name.equals("coverage")) {
378          this.coverage = new Reference();
379          return this.coverage;
380        }
381        else if (name.equals("priority")) {
382          throw new FHIRException("Cannot call addChild on a primitive type Account.coverage.priority");
383        }
384        else
385          return super.addChild(name);
386      }
387
388      public CoverageComponent copy() {
389        CoverageComponent dst = new CoverageComponent();
390        copyValues(dst);
391        return dst;
392      }
393
394      public void copyValues(CoverageComponent dst) {
395        super.copyValues(dst);
396        dst.coverage = coverage == null ? null : coverage.copy();
397        dst.priority = priority == null ? null : priority.copy();
398      }
399
400      @Override
401      public boolean equalsDeep(Base other_) {
402        if (!super.equalsDeep(other_))
403          return false;
404        if (!(other_ instanceof CoverageComponent))
405          return false;
406        CoverageComponent o = (CoverageComponent) other_;
407        return compareDeep(coverage, o.coverage, true) && compareDeep(priority, o.priority, true);
408      }
409
410      @Override
411      public boolean equalsShallow(Base other_) {
412        if (!super.equalsShallow(other_))
413          return false;
414        if (!(other_ instanceof CoverageComponent))
415          return false;
416        CoverageComponent o = (CoverageComponent) other_;
417        return compareValues(priority, o.priority, true);
418      }
419
420      public boolean isEmpty() {
421        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, priority);
422      }
423
424  public String fhirType() {
425    return "Account.coverage";
426
427  }
428
429  }
430
431    @Block()
432    public static class GuarantorComponent extends BackboneElement implements IBaseBackboneElement {
433        /**
434         * The entity who is responsible.
435         */
436        @Child(name = "party", type = {Patient.class, RelatedPerson.class, Organization.class}, order=1, min=1, max=1, modifier=false, summary=false)
437        @Description(shortDefinition="Responsible entity", formalDefinition="The entity who is responsible." )
438        protected Reference party;
439
440        /**
441         * A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.
442         */
443        @Child(name = "onHold", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
444        @Description(shortDefinition="Credit or other hold applied", formalDefinition="A guarantor may be placed on credit hold or otherwise have their role temporarily suspended." )
445        protected BooleanType onHold;
446
447        /**
448         * The timeframe during which the guarantor accepts responsibility for the account.
449         */
450        @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
451        @Description(shortDefinition="Guarantee account during", formalDefinition="The timeframe during which the guarantor accepts responsibility for the account." )
452        protected Period period;
453
454        private static final long serialVersionUID = -523056773L;
455
456    /**
457     * Constructor
458     */
459      public GuarantorComponent() {
460        super();
461      }
462
463    /**
464     * Constructor
465     */
466      public GuarantorComponent(Reference party) {
467        super();
468        this.setParty(party);
469      }
470
471        /**
472         * @return {@link #party} (The entity who is responsible.)
473         */
474        public Reference getParty() { 
475          if (this.party == null)
476            if (Configuration.errorOnAutoCreate())
477              throw new Error("Attempt to auto-create GuarantorComponent.party");
478            else if (Configuration.doAutoCreate())
479              this.party = new Reference(); // cc
480          return this.party;
481        }
482
483        public boolean hasParty() { 
484          return this.party != null && !this.party.isEmpty();
485        }
486
487        /**
488         * @param value {@link #party} (The entity who is responsible.)
489         */
490        public GuarantorComponent setParty(Reference value) { 
491          this.party = value;
492          return this;
493        }
494
495        /**
496         * @return {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value
497         */
498        public BooleanType getOnHoldElement() { 
499          if (this.onHold == null)
500            if (Configuration.errorOnAutoCreate())
501              throw new Error("Attempt to auto-create GuarantorComponent.onHold");
502            else if (Configuration.doAutoCreate())
503              this.onHold = new BooleanType(); // bb
504          return this.onHold;
505        }
506
507        public boolean hasOnHoldElement() { 
508          return this.onHold != null && !this.onHold.isEmpty();
509        }
510
511        public boolean hasOnHold() { 
512          return this.onHold != null && !this.onHold.isEmpty();
513        }
514
515        /**
516         * @param value {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value
517         */
518        public GuarantorComponent setOnHoldElement(BooleanType value) { 
519          this.onHold = value;
520          return this;
521        }
522
523        /**
524         * @return A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.
525         */
526        public boolean getOnHold() { 
527          return this.onHold == null || this.onHold.isEmpty() ? false : this.onHold.getValue();
528        }
529
530        /**
531         * @param value A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.
532         */
533        public GuarantorComponent setOnHold(boolean value) { 
534            if (this.onHold == null)
535              this.onHold = new BooleanType();
536            this.onHold.setValue(value);
537          return this;
538        }
539
540        /**
541         * @return {@link #period} (The timeframe during which the guarantor accepts responsibility for the account.)
542         */
543        public Period getPeriod() { 
544          if (this.period == null)
545            if (Configuration.errorOnAutoCreate())
546              throw new Error("Attempt to auto-create GuarantorComponent.period");
547            else if (Configuration.doAutoCreate())
548              this.period = new Period(); // cc
549          return this.period;
550        }
551
552        public boolean hasPeriod() { 
553          return this.period != null && !this.period.isEmpty();
554        }
555
556        /**
557         * @param value {@link #period} (The timeframe during which the guarantor accepts responsibility for the account.)
558         */
559        public GuarantorComponent setPeriod(Period value) { 
560          this.period = value;
561          return this;
562        }
563
564        protected void listChildren(List<Property> children) {
565          super.listChildren(children);
566          children.add(new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party));
567          children.add(new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold));
568          children.add(new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period));
569        }
570
571        @Override
572        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
573          switch (_hash) {
574          case 106437350: /*party*/  return new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party);
575          case -1013289154: /*onHold*/  return new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold);
576          case -991726143: /*period*/  return new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period);
577          default: return super.getNamedProperty(_hash, _name, _checkValid);
578          }
579
580        }
581
582      @Override
583      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
584        switch (hash) {
585        case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference
586        case -1013289154: /*onHold*/ return this.onHold == null ? new Base[0] : new Base[] {this.onHold}; // BooleanType
587        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
588        default: return super.getProperty(hash, name, checkValid);
589        }
590
591      }
592
593      @Override
594      public Base setProperty(int hash, String name, Base value) throws FHIRException {
595        switch (hash) {
596        case 106437350: // party
597          this.party = TypeConvertor.castToReference(value); // Reference
598          return value;
599        case -1013289154: // onHold
600          this.onHold = TypeConvertor.castToBoolean(value); // BooleanType
601          return value;
602        case -991726143: // period
603          this.period = TypeConvertor.castToPeriod(value); // Period
604          return value;
605        default: return super.setProperty(hash, name, value);
606        }
607
608      }
609
610      @Override
611      public Base setProperty(String name, Base value) throws FHIRException {
612        if (name.equals("party")) {
613          this.party = TypeConvertor.castToReference(value); // Reference
614        } else if (name.equals("onHold")) {
615          this.onHold = TypeConvertor.castToBoolean(value); // BooleanType
616        } else if (name.equals("period")) {
617          this.period = TypeConvertor.castToPeriod(value); // Period
618        } else
619          return super.setProperty(name, value);
620        return value;
621      }
622
623      @Override
624      public Base makeProperty(int hash, String name) throws FHIRException {
625        switch (hash) {
626        case 106437350:  return getParty();
627        case -1013289154:  return getOnHoldElement();
628        case -991726143:  return getPeriod();
629        default: return super.makeProperty(hash, name);
630        }
631
632      }
633
634      @Override
635      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
636        switch (hash) {
637        case 106437350: /*party*/ return new String[] {"Reference"};
638        case -1013289154: /*onHold*/ return new String[] {"boolean"};
639        case -991726143: /*period*/ return new String[] {"Period"};
640        default: return super.getTypesForProperty(hash, name);
641        }
642
643      }
644
645      @Override
646      public Base addChild(String name) throws FHIRException {
647        if (name.equals("party")) {
648          this.party = new Reference();
649          return this.party;
650        }
651        else if (name.equals("onHold")) {
652          throw new FHIRException("Cannot call addChild on a primitive type Account.guarantor.onHold");
653        }
654        else if (name.equals("period")) {
655          this.period = new Period();
656          return this.period;
657        }
658        else
659          return super.addChild(name);
660      }
661
662      public GuarantorComponent copy() {
663        GuarantorComponent dst = new GuarantorComponent();
664        copyValues(dst);
665        return dst;
666      }
667
668      public void copyValues(GuarantorComponent dst) {
669        super.copyValues(dst);
670        dst.party = party == null ? null : party.copy();
671        dst.onHold = onHold == null ? null : onHold.copy();
672        dst.period = period == null ? null : period.copy();
673      }
674
675      @Override
676      public boolean equalsDeep(Base other_) {
677        if (!super.equalsDeep(other_))
678          return false;
679        if (!(other_ instanceof GuarantorComponent))
680          return false;
681        GuarantorComponent o = (GuarantorComponent) other_;
682        return compareDeep(party, o.party, true) && compareDeep(onHold, o.onHold, true) && compareDeep(period, o.period, true)
683          ;
684      }
685
686      @Override
687      public boolean equalsShallow(Base other_) {
688        if (!super.equalsShallow(other_))
689          return false;
690        if (!(other_ instanceof GuarantorComponent))
691          return false;
692        GuarantorComponent o = (GuarantorComponent) other_;
693        return compareValues(onHold, o.onHold, true);
694      }
695
696      public boolean isEmpty() {
697        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(party, onHold, period);
698      }
699
700  public String fhirType() {
701    return "Account.guarantor";
702
703  }
704
705  }
706
707    /**
708     * Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).
709     */
710    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
711    @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)." )
712    protected List<Identifier> identifier;
713
714    /**
715     * Indicates whether the account is presently used/usable or not.
716     */
717    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
718    @Description(shortDefinition="active | inactive | entered-in-error | on-hold | unknown", formalDefinition="Indicates whether the account is presently used/usable or not." )
719    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-status")
720    protected Enumeration<AccountStatus> status;
721
722    /**
723     * The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.
724     */
725    @Child(name = "billingStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
726    @Description(shortDefinition="Tracks the lifecycle of the account through the billing process", formalDefinition="The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account." )
727    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-billing-status")
728    protected CodeableConcept billingStatus;
729
730    /**
731     * Categorizes the account for reporting and searching purposes.
732     */
733    @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
734    @Description(shortDefinition="E.g. patient, expense, depreciation", formalDefinition="Categorizes the account for reporting and searching purposes." )
735    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-type")
736    protected CodeableConcept type;
737
738    /**
739     * Name used for the account when displaying it to humans in reports, etc.
740     */
741    @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
742    @Description(shortDefinition="Human-readable label", formalDefinition="Name used for the account when displaying it to humans in reports, etc." )
743    protected StringType name;
744
745    /**
746     * 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.
747     */
748    @Child(name = "subject", type = {Patient.class, Device.class, Practitioner.class, PractitionerRole.class, Location.class, HealthcareService.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
749    @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." )
750    protected List<Reference> subject;
751
752    /**
753     * The date range of services associated with this account.
754     */
755    @Child(name = "servicePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
756    @Description(shortDefinition="Transaction window", formalDefinition="The date range of services associated with this account." )
757    protected Period servicePeriod;
758
759    /**
760     * The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.
761     */
762    @Child(name = "coverage", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
763    @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." )
764    protected List<CoverageComponent> coverage;
765
766    /**
767     * Indicates the service area, hospital, department, etc. with responsibility for managing the Account.
768     */
769    @Child(name = "owner", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true)
770    @Description(shortDefinition="Entity managing the Account", formalDefinition="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." )
771    protected Reference owner;
772
773    /**
774     * Provides additional information about what the account tracks and how it is used.
775     */
776    @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
777    @Description(shortDefinition="Explanation of purpose/use", formalDefinition="Provides additional information about what the account tracks and how it is used." )
778    protected StringType description;
779
780    /**
781     * The parties responsible for balancing the account if other payment options fall short.
782     */
783    @Child(name = "guarantor", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
784    @Description(shortDefinition="The parties ultimately responsible for balancing the Account", formalDefinition="The parties responsible for balancing the account if other payment options fall short." )
785    protected List<GuarantorComponent> guarantor;
786
787    /**
788     * Reference to a parent Account.
789     */
790    @Child(name = "partOf", type = {Account.class}, order=11, min=0, max=1, modifier=false, summary=false)
791    @Description(shortDefinition="Reference to a parent Account", formalDefinition="Reference to a parent Account." )
792    protected Reference partOf;
793
794    private static final long serialVersionUID = 1419356403L;
795
796  /**
797   * Constructor
798   */
799    public Account() {
800      super();
801    }
802
803  /**
804   * Constructor
805   */
806    public Account(AccountStatus status) {
807      super();
808      this.setStatus(status);
809    }
810
811    /**
812     * @return {@link #identifier} (Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).)
813     */
814    public List<Identifier> getIdentifier() { 
815      if (this.identifier == null)
816        this.identifier = new ArrayList<Identifier>();
817      return this.identifier;
818    }
819
820    /**
821     * @return Returns a reference to <code>this</code> for easy method chaining
822     */
823    public Account setIdentifier(List<Identifier> theIdentifier) { 
824      this.identifier = theIdentifier;
825      return this;
826    }
827
828    public boolean hasIdentifier() { 
829      if (this.identifier == null)
830        return false;
831      for (Identifier item : this.identifier)
832        if (!item.isEmpty())
833          return true;
834      return false;
835    }
836
837    public Identifier addIdentifier() { //3
838      Identifier t = new Identifier();
839      if (this.identifier == null)
840        this.identifier = new ArrayList<Identifier>();
841      this.identifier.add(t);
842      return t;
843    }
844
845    public Account addIdentifier(Identifier t) { //3
846      if (t == null)
847        return this;
848      if (this.identifier == null)
849        this.identifier = new ArrayList<Identifier>();
850      this.identifier.add(t);
851      return this;
852    }
853
854    /**
855     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
856     */
857    public Identifier getIdentifierFirstRep() { 
858      if (getIdentifier().isEmpty()) {
859        addIdentifier();
860      }
861      return getIdentifier().get(0);
862    }
863
864    /**
865     * @return {@link #status} (Indicates whether the account is presently used/usable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
866     */
867    public Enumeration<AccountStatus> getStatusElement() { 
868      if (this.status == null)
869        if (Configuration.errorOnAutoCreate())
870          throw new Error("Attempt to auto-create Account.status");
871        else if (Configuration.doAutoCreate())
872          this.status = new Enumeration<AccountStatus>(new AccountStatusEnumFactory()); // bb
873      return this.status;
874    }
875
876    public boolean hasStatusElement() { 
877      return this.status != null && !this.status.isEmpty();
878    }
879
880    public boolean hasStatus() { 
881      return this.status != null && !this.status.isEmpty();
882    }
883
884    /**
885     * @param value {@link #status} (Indicates whether the account is presently used/usable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
886     */
887    public Account setStatusElement(Enumeration<AccountStatus> value) { 
888      this.status = value;
889      return this;
890    }
891
892    /**
893     * @return Indicates whether the account is presently used/usable or not.
894     */
895    public AccountStatus getStatus() { 
896      return this.status == null ? null : this.status.getValue();
897    }
898
899    /**
900     * @param value Indicates whether the account is presently used/usable or not.
901     */
902    public Account setStatus(AccountStatus value) { 
903        if (this.status == null)
904          this.status = new Enumeration<AccountStatus>(new AccountStatusEnumFactory());
905        this.status.setValue(value);
906      return this;
907    }
908
909    /**
910     * @return {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.)
911     */
912    public CodeableConcept getBillingStatus() { 
913      if (this.billingStatus == null)
914        if (Configuration.errorOnAutoCreate())
915          throw new Error("Attempt to auto-create Account.billingStatus");
916        else if (Configuration.doAutoCreate())
917          this.billingStatus = new CodeableConcept(); // cc
918      return this.billingStatus;
919    }
920
921    public boolean hasBillingStatus() { 
922      return this.billingStatus != null && !this.billingStatus.isEmpty();
923    }
924
925    /**
926     * @param value {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.)
927     */
928    public Account setBillingStatus(CodeableConcept value) { 
929      this.billingStatus = value;
930      return this;
931    }
932
933    /**
934     * @return {@link #type} (Categorizes the account for reporting and searching purposes.)
935     */
936    public CodeableConcept getType() { 
937      if (this.type == null)
938        if (Configuration.errorOnAutoCreate())
939          throw new Error("Attempt to auto-create Account.type");
940        else if (Configuration.doAutoCreate())
941          this.type = new CodeableConcept(); // cc
942      return this.type;
943    }
944
945    public boolean hasType() { 
946      return this.type != null && !this.type.isEmpty();
947    }
948
949    /**
950     * @param value {@link #type} (Categorizes the account for reporting and searching purposes.)
951     */
952    public Account setType(CodeableConcept value) { 
953      this.type = value;
954      return this;
955    }
956
957    /**
958     * @return {@link #name} (Name used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
959     */
960    public StringType getNameElement() { 
961      if (this.name == null)
962        if (Configuration.errorOnAutoCreate())
963          throw new Error("Attempt to auto-create Account.name");
964        else if (Configuration.doAutoCreate())
965          this.name = new StringType(); // bb
966      return this.name;
967    }
968
969    public boolean hasNameElement() { 
970      return this.name != null && !this.name.isEmpty();
971    }
972
973    public boolean hasName() { 
974      return this.name != null && !this.name.isEmpty();
975    }
976
977    /**
978     * @param value {@link #name} (Name used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
979     */
980    public Account setNameElement(StringType value) { 
981      this.name = value;
982      return this;
983    }
984
985    /**
986     * @return Name used for the account when displaying it to humans in reports, etc.
987     */
988    public String getName() { 
989      return this.name == null ? null : this.name.getValue();
990    }
991
992    /**
993     * @param value Name used for the account when displaying it to humans in reports, etc.
994     */
995    public Account setName(String value) { 
996      if (Utilities.noString(value))
997        this.name = null;
998      else {
999        if (this.name == null)
1000          this.name = new StringType();
1001        this.name.setValue(value);
1002      }
1003      return this;
1004    }
1005
1006    /**
1007     * @return {@link #subject} (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.)
1008     */
1009    public List<Reference> getSubject() { 
1010      if (this.subject == null)
1011        this.subject = new ArrayList<Reference>();
1012      return this.subject;
1013    }
1014
1015    /**
1016     * @return Returns a reference to <code>this</code> for easy method chaining
1017     */
1018    public Account setSubject(List<Reference> theSubject) { 
1019      this.subject = theSubject;
1020      return this;
1021    }
1022
1023    public boolean hasSubject() { 
1024      if (this.subject == null)
1025        return false;
1026      for (Reference item : this.subject)
1027        if (!item.isEmpty())
1028          return true;
1029      return false;
1030    }
1031
1032    public Reference addSubject() { //3
1033      Reference t = new Reference();
1034      if (this.subject == null)
1035        this.subject = new ArrayList<Reference>();
1036      this.subject.add(t);
1037      return t;
1038    }
1039
1040    public Account addSubject(Reference t) { //3
1041      if (t == null)
1042        return this;
1043      if (this.subject == null)
1044        this.subject = new ArrayList<Reference>();
1045      this.subject.add(t);
1046      return this;
1047    }
1048
1049    /**
1050     * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist {3}
1051     */
1052    public Reference getSubjectFirstRep() { 
1053      if (getSubject().isEmpty()) {
1054        addSubject();
1055      }
1056      return getSubject().get(0);
1057    }
1058
1059    /**
1060     * @return {@link #servicePeriod} (The date range of services associated with this account.)
1061     */
1062    public Period getServicePeriod() { 
1063      if (this.servicePeriod == null)
1064        if (Configuration.errorOnAutoCreate())
1065          throw new Error("Attempt to auto-create Account.servicePeriod");
1066        else if (Configuration.doAutoCreate())
1067          this.servicePeriod = new Period(); // cc
1068      return this.servicePeriod;
1069    }
1070
1071    public boolean hasServicePeriod() { 
1072      return this.servicePeriod != null && !this.servicePeriod.isEmpty();
1073    }
1074
1075    /**
1076     * @param value {@link #servicePeriod} (The date range of services associated with this account.)
1077     */
1078    public Account setServicePeriod(Period value) { 
1079      this.servicePeriod = value;
1080      return this;
1081    }
1082
1083    /**
1084     * @return {@link #coverage} (The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.)
1085     */
1086    public List<CoverageComponent> getCoverage() { 
1087      if (this.coverage == null)
1088        this.coverage = new ArrayList<CoverageComponent>();
1089      return this.coverage;
1090    }
1091
1092    /**
1093     * @return Returns a reference to <code>this</code> for easy method chaining
1094     */
1095    public Account setCoverage(List<CoverageComponent> theCoverage) { 
1096      this.coverage = theCoverage;
1097      return this;
1098    }
1099
1100    public boolean hasCoverage() { 
1101      if (this.coverage == null)
1102        return false;
1103      for (CoverageComponent item : this.coverage)
1104        if (!item.isEmpty())
1105          return true;
1106      return false;
1107    }
1108
1109    public CoverageComponent addCoverage() { //3
1110      CoverageComponent t = new CoverageComponent();
1111      if (this.coverage == null)
1112        this.coverage = new ArrayList<CoverageComponent>();
1113      this.coverage.add(t);
1114      return t;
1115    }
1116
1117    public Account addCoverage(CoverageComponent t) { //3
1118      if (t == null)
1119        return this;
1120      if (this.coverage == null)
1121        this.coverage = new ArrayList<CoverageComponent>();
1122      this.coverage.add(t);
1123      return this;
1124    }
1125
1126    /**
1127     * @return The first repetition of repeating field {@link #coverage}, creating it if it does not already exist {3}
1128     */
1129    public CoverageComponent getCoverageFirstRep() { 
1130      if (getCoverage().isEmpty()) {
1131        addCoverage();
1132      }
1133      return getCoverage().get(0);
1134    }
1135
1136    /**
1137     * @return {@link #owner} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.)
1138     */
1139    public Reference getOwner() { 
1140      if (this.owner == null)
1141        if (Configuration.errorOnAutoCreate())
1142          throw new Error("Attempt to auto-create Account.owner");
1143        else if (Configuration.doAutoCreate())
1144          this.owner = new Reference(); // cc
1145      return this.owner;
1146    }
1147
1148    public boolean hasOwner() { 
1149      return this.owner != null && !this.owner.isEmpty();
1150    }
1151
1152    /**
1153     * @param value {@link #owner} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.)
1154     */
1155    public Account setOwner(Reference value) { 
1156      this.owner = value;
1157      return this;
1158    }
1159
1160    /**
1161     * @return {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1162     */
1163    public StringType getDescriptionElement() { 
1164      if (this.description == null)
1165        if (Configuration.errorOnAutoCreate())
1166          throw new Error("Attempt to auto-create Account.description");
1167        else if (Configuration.doAutoCreate())
1168          this.description = new StringType(); // bb
1169      return this.description;
1170    }
1171
1172    public boolean hasDescriptionElement() { 
1173      return this.description != null && !this.description.isEmpty();
1174    }
1175
1176    public boolean hasDescription() { 
1177      return this.description != null && !this.description.isEmpty();
1178    }
1179
1180    /**
1181     * @param value {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1182     */
1183    public Account setDescriptionElement(StringType value) { 
1184      this.description = value;
1185      return this;
1186    }
1187
1188    /**
1189     * @return Provides additional information about what the account tracks and how it is used.
1190     */
1191    public String getDescription() { 
1192      return this.description == null ? null : this.description.getValue();
1193    }
1194
1195    /**
1196     * @param value Provides additional information about what the account tracks and how it is used.
1197     */
1198    public Account setDescription(String value) { 
1199      if (Utilities.noString(value))
1200        this.description = null;
1201      else {
1202        if (this.description == null)
1203          this.description = new StringType();
1204        this.description.setValue(value);
1205      }
1206      return this;
1207    }
1208
1209    /**
1210     * @return {@link #guarantor} (The parties responsible for balancing the account if other payment options fall short.)
1211     */
1212    public List<GuarantorComponent> getGuarantor() { 
1213      if (this.guarantor == null)
1214        this.guarantor = new ArrayList<GuarantorComponent>();
1215      return this.guarantor;
1216    }
1217
1218    /**
1219     * @return Returns a reference to <code>this</code> for easy method chaining
1220     */
1221    public Account setGuarantor(List<GuarantorComponent> theGuarantor) { 
1222      this.guarantor = theGuarantor;
1223      return this;
1224    }
1225
1226    public boolean hasGuarantor() { 
1227      if (this.guarantor == null)
1228        return false;
1229      for (GuarantorComponent item : this.guarantor)
1230        if (!item.isEmpty())
1231          return true;
1232      return false;
1233    }
1234
1235    public GuarantorComponent addGuarantor() { //3
1236      GuarantorComponent t = new GuarantorComponent();
1237      if (this.guarantor == null)
1238        this.guarantor = new ArrayList<GuarantorComponent>();
1239      this.guarantor.add(t);
1240      return t;
1241    }
1242
1243    public Account addGuarantor(GuarantorComponent t) { //3
1244      if (t == null)
1245        return this;
1246      if (this.guarantor == null)
1247        this.guarantor = new ArrayList<GuarantorComponent>();
1248      this.guarantor.add(t);
1249      return this;
1250    }
1251
1252    /**
1253     * @return The first repetition of repeating field {@link #guarantor}, creating it if it does not already exist {3}
1254     */
1255    public GuarantorComponent getGuarantorFirstRep() { 
1256      if (getGuarantor().isEmpty()) {
1257        addGuarantor();
1258      }
1259      return getGuarantor().get(0);
1260    }
1261
1262    /**
1263     * @return {@link #partOf} (Reference to a parent Account.)
1264     */
1265    public Reference getPartOf() { 
1266      if (this.partOf == null)
1267        if (Configuration.errorOnAutoCreate())
1268          throw new Error("Attempt to auto-create Account.partOf");
1269        else if (Configuration.doAutoCreate())
1270          this.partOf = new Reference(); // cc
1271      return this.partOf;
1272    }
1273
1274    public boolean hasPartOf() { 
1275      return this.partOf != null && !this.partOf.isEmpty();
1276    }
1277
1278    /**
1279     * @param value {@link #partOf} (Reference to a parent Account.)
1280     */
1281    public Account setPartOf(Reference value) { 
1282      this.partOf = value;
1283      return this;
1284    }
1285
1286      protected void listChildren(List<Property> children) {
1287        super.listChildren(children);
1288        children.add(new Property("identifier", "Identifier", "Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier));
1289        children.add(new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status));
1290        children.add(new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus));
1291        children.add(new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type));
1292        children.add(new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name));
1293        children.add(new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "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.", 0, java.lang.Integer.MAX_VALUE, subject));
1294        children.add(new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod));
1295        children.add(new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage));
1296        children.add(new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner));
1297        children.add(new Property("description", "string", "Provides additional information about what the account tracks and how it is used.", 0, 1, description));
1298        children.add(new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor));
1299        children.add(new Property("partOf", "Reference(Account)", "Reference to a parent Account.", 0, 1, partOf));
1300      }
1301
1302      @Override
1303      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1304        switch (_hash) {
1305        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier);
1306        case -892481550: /*status*/  return new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status);
1307        case -1524378035: /*billingStatus*/  return new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus);
1308        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type);
1309        case 3373707: /*name*/  return new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name);
1310        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "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.", 0, java.lang.Integer.MAX_VALUE, subject);
1311        case 2129104086: /*servicePeriod*/  return new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod);
1312        case -351767064: /*coverage*/  return new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage);
1313        case 106164915: /*owner*/  return new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner);
1314        case -1724546052: /*description*/  return new Property("description", "string", "Provides additional information about what the account tracks and how it is used.", 0, 1, description);
1315        case -188629045: /*guarantor*/  return new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor);
1316        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Account)", "Reference to a parent Account.", 0, 1, partOf);
1317        default: return super.getNamedProperty(_hash, _name, _checkValid);
1318        }
1319
1320      }
1321
1322      @Override
1323      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1324        switch (hash) {
1325        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1326        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<AccountStatus>
1327        case -1524378035: /*billingStatus*/ return this.billingStatus == null ? new Base[0] : new Base[] {this.billingStatus}; // CodeableConcept
1328        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1329        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1330        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference
1331        case 2129104086: /*servicePeriod*/ return this.servicePeriod == null ? new Base[0] : new Base[] {this.servicePeriod}; // Period
1332        case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // CoverageComponent
1333        case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
1334        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1335        case -188629045: /*guarantor*/ return this.guarantor == null ? new Base[0] : this.guarantor.toArray(new Base[this.guarantor.size()]); // GuarantorComponent
1336        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference
1337        default: return super.getProperty(hash, name, checkValid);
1338        }
1339
1340      }
1341
1342      @Override
1343      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1344        switch (hash) {
1345        case -1618432855: // identifier
1346          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1347          return value;
1348        case -892481550: // status
1349          value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1350          this.status = (Enumeration) value; // Enumeration<AccountStatus>
1351          return value;
1352        case -1524378035: // billingStatus
1353          this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1354          return value;
1355        case 3575610: // type
1356          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1357          return value;
1358        case 3373707: // name
1359          this.name = TypeConvertor.castToString(value); // StringType
1360          return value;
1361        case -1867885268: // subject
1362          this.getSubject().add(TypeConvertor.castToReference(value)); // Reference
1363          return value;
1364        case 2129104086: // servicePeriod
1365          this.servicePeriod = TypeConvertor.castToPeriod(value); // Period
1366          return value;
1367        case -351767064: // coverage
1368          this.getCoverage().add((CoverageComponent) value); // CoverageComponent
1369          return value;
1370        case 106164915: // owner
1371          this.owner = TypeConvertor.castToReference(value); // Reference
1372          return value;
1373        case -1724546052: // description
1374          this.description = TypeConvertor.castToString(value); // StringType
1375          return value;
1376        case -188629045: // guarantor
1377          this.getGuarantor().add((GuarantorComponent) value); // GuarantorComponent
1378          return value;
1379        case -995410646: // partOf
1380          this.partOf = TypeConvertor.castToReference(value); // Reference
1381          return value;
1382        default: return super.setProperty(hash, name, value);
1383        }
1384
1385      }
1386
1387      @Override
1388      public Base setProperty(String name, Base value) throws FHIRException {
1389        if (name.equals("identifier")) {
1390          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1391        } else if (name.equals("status")) {
1392          value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1393          this.status = (Enumeration) value; // Enumeration<AccountStatus>
1394        } else if (name.equals("billingStatus")) {
1395          this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1396        } else if (name.equals("type")) {
1397          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1398        } else if (name.equals("name")) {
1399          this.name = TypeConvertor.castToString(value); // StringType
1400        } else if (name.equals("subject")) {
1401          this.getSubject().add(TypeConvertor.castToReference(value));
1402        } else if (name.equals("servicePeriod")) {
1403          this.servicePeriod = TypeConvertor.castToPeriod(value); // Period
1404        } else if (name.equals("coverage")) {
1405          this.getCoverage().add((CoverageComponent) value);
1406        } else if (name.equals("owner")) {
1407          this.owner = TypeConvertor.castToReference(value); // Reference
1408        } else if (name.equals("description")) {
1409          this.description = TypeConvertor.castToString(value); // StringType
1410        } else if (name.equals("guarantor")) {
1411          this.getGuarantor().add((GuarantorComponent) value);
1412        } else if (name.equals("partOf")) {
1413          this.partOf = TypeConvertor.castToReference(value); // Reference
1414        } else
1415          return super.setProperty(name, value);
1416        return value;
1417      }
1418
1419      @Override
1420      public Base makeProperty(int hash, String name) throws FHIRException {
1421        switch (hash) {
1422        case -1618432855:  return addIdentifier(); 
1423        case -892481550:  return getStatusElement();
1424        case -1524378035:  return getBillingStatus();
1425        case 3575610:  return getType();
1426        case 3373707:  return getNameElement();
1427        case -1867885268:  return addSubject(); 
1428        case 2129104086:  return getServicePeriod();
1429        case -351767064:  return addCoverage(); 
1430        case 106164915:  return getOwner();
1431        case -1724546052:  return getDescriptionElement();
1432        case -188629045:  return addGuarantor(); 
1433        case -995410646:  return getPartOf();
1434        default: return super.makeProperty(hash, name);
1435        }
1436
1437      }
1438
1439      @Override
1440      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1441        switch (hash) {
1442        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1443        case -892481550: /*status*/ return new String[] {"code"};
1444        case -1524378035: /*billingStatus*/ return new String[] {"CodeableConcept"};
1445        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1446        case 3373707: /*name*/ return new String[] {"string"};
1447        case -1867885268: /*subject*/ return new String[] {"Reference"};
1448        case 2129104086: /*servicePeriod*/ return new String[] {"Period"};
1449        case -351767064: /*coverage*/ return new String[] {};
1450        case 106164915: /*owner*/ return new String[] {"Reference"};
1451        case -1724546052: /*description*/ return new String[] {"string"};
1452        case -188629045: /*guarantor*/ return new String[] {};
1453        case -995410646: /*partOf*/ return new String[] {"Reference"};
1454        default: return super.getTypesForProperty(hash, name);
1455        }
1456
1457      }
1458
1459      @Override
1460      public Base addChild(String name) throws FHIRException {
1461        if (name.equals("identifier")) {
1462          return addIdentifier();
1463        }
1464        else if (name.equals("status")) {
1465          throw new FHIRException("Cannot call addChild on a primitive type Account.status");
1466        }
1467        else if (name.equals("billingStatus")) {
1468          this.billingStatus = new CodeableConcept();
1469          return this.billingStatus;
1470        }
1471        else if (name.equals("type")) {
1472          this.type = new CodeableConcept();
1473          return this.type;
1474        }
1475        else if (name.equals("name")) {
1476          throw new FHIRException("Cannot call addChild on a primitive type Account.name");
1477        }
1478        else if (name.equals("subject")) {
1479          return addSubject();
1480        }
1481        else if (name.equals("servicePeriod")) {
1482          this.servicePeriod = new Period();
1483          return this.servicePeriod;
1484        }
1485        else if (name.equals("coverage")) {
1486          return addCoverage();
1487        }
1488        else if (name.equals("owner")) {
1489          this.owner = new Reference();
1490          return this.owner;
1491        }
1492        else if (name.equals("description")) {
1493          throw new FHIRException("Cannot call addChild on a primitive type Account.description");
1494        }
1495        else if (name.equals("guarantor")) {
1496          return addGuarantor();
1497        }
1498        else if (name.equals("partOf")) {
1499          this.partOf = new Reference();
1500          return this.partOf;
1501        }
1502        else
1503          return super.addChild(name);
1504      }
1505
1506  public String fhirType() {
1507    return "Account";
1508
1509  }
1510
1511      public Account copy() {
1512        Account dst = new Account();
1513        copyValues(dst);
1514        return dst;
1515      }
1516
1517      public void copyValues(Account dst) {
1518        super.copyValues(dst);
1519        if (identifier != null) {
1520          dst.identifier = new ArrayList<Identifier>();
1521          for (Identifier i : identifier)
1522            dst.identifier.add(i.copy());
1523        };
1524        dst.status = status == null ? null : status.copy();
1525        dst.billingStatus = billingStatus == null ? null : billingStatus.copy();
1526        dst.type = type == null ? null : type.copy();
1527        dst.name = name == null ? null : name.copy();
1528        if (subject != null) {
1529          dst.subject = new ArrayList<Reference>();
1530          for (Reference i : subject)
1531            dst.subject.add(i.copy());
1532        };
1533        dst.servicePeriod = servicePeriod == null ? null : servicePeriod.copy();
1534        if (coverage != null) {
1535          dst.coverage = new ArrayList<CoverageComponent>();
1536          for (CoverageComponent i : coverage)
1537            dst.coverage.add(i.copy());
1538        };
1539        dst.owner = owner == null ? null : owner.copy();
1540        dst.description = description == null ? null : description.copy();
1541        if (guarantor != null) {
1542          dst.guarantor = new ArrayList<GuarantorComponent>();
1543          for (GuarantorComponent i : guarantor)
1544            dst.guarantor.add(i.copy());
1545        };
1546        dst.partOf = partOf == null ? null : partOf.copy();
1547      }
1548
1549      protected Account typedCopy() {
1550        return copy();
1551      }
1552
1553      @Override
1554      public boolean equalsDeep(Base other_) {
1555        if (!super.equalsDeep(other_))
1556          return false;
1557        if (!(other_ instanceof Account))
1558          return false;
1559        Account o = (Account) other_;
1560        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(billingStatus, o.billingStatus, true)
1561           && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true)
1562           && compareDeep(servicePeriod, o.servicePeriod, true) && compareDeep(coverage, o.coverage, true)
1563           && compareDeep(owner, o.owner, true) && compareDeep(description, o.description, true) && compareDeep(guarantor, o.guarantor, true)
1564           && compareDeep(partOf, o.partOf, true);
1565      }
1566
1567      @Override
1568      public boolean equalsShallow(Base other_) {
1569        if (!super.equalsShallow(other_))
1570          return false;
1571        if (!(other_ instanceof Account))
1572          return false;
1573        Account o = (Account) other_;
1574        return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true)
1575          ;
1576      }
1577
1578      public boolean isEmpty() {
1579        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, billingStatus
1580          , type, name, subject, servicePeriod, coverage, owner, description, guarantor
1581          , partOf);
1582      }
1583
1584  @Override
1585  public ResourceType getResourceType() {
1586    return ResourceType.Account;
1587   }
1588
1589 /**
1590   * Search parameter: <b>guarantor</b>
1591   * <p>
1592   * Description: <b>The parties ultimately responsible for balancing the Account</b><br>
1593   * Type: <b>reference</b><br>
1594   * Path: <b>Account.guarantor.party</b><br>
1595   * </p>
1596   */
1597  @SearchParamDefinition(name="guarantor", path="Account.guarantor.party", description="The parties ultimately responsible for balancing the Account", type="reference", target={Organization.class, Patient.class, RelatedPerson.class } )
1598  public static final String SP_GUARANTOR = "guarantor";
1599 /**
1600   * <b>Fluent Client</b> search parameter constant for <b>guarantor</b>
1601   * <p>
1602   * Description: <b>The parties ultimately responsible for balancing the Account</b><br>
1603   * Type: <b>reference</b><br>
1604   * Path: <b>Account.guarantor.party</b><br>
1605   * </p>
1606   */
1607  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GUARANTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GUARANTOR);
1608
1609/**
1610   * Constant for fluent queries to be used to add include statements. Specifies
1611   * the path value of "<b>Account:guarantor</b>".
1612   */
1613  public static final ca.uhn.fhir.model.api.Include INCLUDE_GUARANTOR = new ca.uhn.fhir.model.api.Include("Account:guarantor").toLocked();
1614
1615 /**
1616   * Search parameter: <b>identifier</b>
1617   * <p>
1618   * Description: <b>Account number</b><br>
1619   * Type: <b>token</b><br>
1620   * Path: <b>Account.identifier</b><br>
1621   * </p>
1622   */
1623  @SearchParamDefinition(name="identifier", path="Account.identifier", description="Account number", type="token" )
1624  public static final String SP_IDENTIFIER = "identifier";
1625 /**
1626   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1627   * <p>
1628   * Description: <b>Account number</b><br>
1629   * Type: <b>token</b><br>
1630   * Path: <b>Account.identifier</b><br>
1631   * </p>
1632   */
1633  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1634
1635 /**
1636   * Search parameter: <b>name</b>
1637   * <p>
1638   * Description: <b>Human-readable label</b><br>
1639   * Type: <b>string</b><br>
1640   * Path: <b>Account.name</b><br>
1641   * </p>
1642   */
1643  @SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" )
1644  public static final String SP_NAME = "name";
1645 /**
1646   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1647   * <p>
1648   * Description: <b>Human-readable label</b><br>
1649   * Type: <b>string</b><br>
1650   * Path: <b>Account.name</b><br>
1651   * </p>
1652   */
1653  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1654
1655 /**
1656   * Search parameter: <b>owner</b>
1657   * <p>
1658   * Description: <b>Entity managing the Account</b><br>
1659   * Type: <b>reference</b><br>
1660   * Path: <b>Account.owner</b><br>
1661   * </p>
1662   */
1663  @SearchParamDefinition(name="owner", path="Account.owner", description="Entity managing the Account", type="reference", target={Organization.class } )
1664  public static final String SP_OWNER = "owner";
1665 /**
1666   * <b>Fluent Client</b> search parameter constant for <b>owner</b>
1667   * <p>
1668   * Description: <b>Entity managing the Account</b><br>
1669   * Type: <b>reference</b><br>
1670   * Path: <b>Account.owner</b><br>
1671   * </p>
1672   */
1673  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER);
1674
1675/**
1676   * Constant for fluent queries to be used to add include statements. Specifies
1677   * the path value of "<b>Account:owner</b>".
1678   */
1679  public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Account:owner").toLocked();
1680
1681 /**
1682   * Search parameter: <b>patient</b>
1683   * <p>
1684   * Description: <b>The entity that caused the expenses</b><br>
1685   * Type: <b>reference</b><br>
1686   * Path: <b>Account.subject.where(resolve() is Patient)</b><br>
1687   * </p>
1688   */
1689  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient)", description="The entity that caused the expenses", type="reference", target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } )
1690  public static final String SP_PATIENT = "patient";
1691 /**
1692   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1693   * <p>
1694   * Description: <b>The entity that caused the expenses</b><br>
1695   * Type: <b>reference</b><br>
1696   * Path: <b>Account.subject.where(resolve() is Patient)</b><br>
1697   * </p>
1698   */
1699  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1700
1701/**
1702   * Constant for fluent queries to be used to add include statements. Specifies
1703   * the path value of "<b>Account:patient</b>".
1704   */
1705  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Account:patient").toLocked();
1706
1707 /**
1708   * Search parameter: <b>period</b>
1709   * <p>
1710   * Description: <b>Transaction window</b><br>
1711   * Type: <b>date</b><br>
1712   * Path: <b>Account.servicePeriod</b><br>
1713   * </p>
1714   */
1715  @SearchParamDefinition(name="period", path="Account.servicePeriod", description="Transaction window", type="date" )
1716  public static final String SP_PERIOD = "period";
1717 /**
1718   * <b>Fluent Client</b> search parameter constant for <b>period</b>
1719   * <p>
1720   * Description: <b>Transaction window</b><br>
1721   * Type: <b>date</b><br>
1722   * Path: <b>Account.servicePeriod</b><br>
1723   * </p>
1724   */
1725  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
1726
1727 /**
1728   * Search parameter: <b>status</b>
1729   * <p>
1730   * Description: <b>active | inactive | entered-in-error | on-hold | unknown</b><br>
1731   * Type: <b>token</b><br>
1732   * Path: <b>Account.status</b><br>
1733   * </p>
1734   */
1735  @SearchParamDefinition(name="status", path="Account.status", description="active | inactive | entered-in-error | on-hold | unknown", type="token" )
1736  public static final String SP_STATUS = "status";
1737 /**
1738   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1739   * <p>
1740   * Description: <b>active | inactive | entered-in-error | on-hold | unknown</b><br>
1741   * Type: <b>token</b><br>
1742   * Path: <b>Account.status</b><br>
1743   * </p>
1744   */
1745  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1746
1747 /**
1748   * Search parameter: <b>subject</b>
1749   * <p>
1750   * Description: <b>The entity that caused the expenses</b><br>
1751   * Type: <b>reference</b><br>
1752   * Path: <b>Account.subject</b><br>
1753   * </p>
1754   */
1755  @SearchParamDefinition(name="subject", path="Account.subject", description="The entity that caused the expenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } )
1756  public static final String SP_SUBJECT = "subject";
1757 /**
1758   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1759   * <p>
1760   * Description: <b>The entity that caused the expenses</b><br>
1761   * Type: <b>reference</b><br>
1762   * Path: <b>Account.subject</b><br>
1763   * </p>
1764   */
1765  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1766
1767/**
1768   * Constant for fluent queries to be used to add include statements. Specifies
1769   * the path value of "<b>Account:subject</b>".
1770   */
1771  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Account:subject").toLocked();
1772
1773 /**
1774   * Search parameter: <b>type</b>
1775   * <p>
1776   * Description: <b>E.g. patient, expense, depreciation</b><br>
1777   * Type: <b>token</b><br>
1778   * Path: <b>Account.type</b><br>
1779   * </p>
1780   */
1781  @SearchParamDefinition(name="type", path="Account.type", description="E.g. patient, expense, depreciation", type="token" )
1782  public static final String SP_TYPE = "type";
1783 /**
1784   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1785   * <p>
1786   * Description: <b>E.g. patient, expense, depreciation</b><br>
1787   * Type: <b>token</b><br>
1788   * Path: <b>Account.type</b><br>
1789   * </p>
1790   */
1791  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1792
1793
1794}
1795