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 Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import java.math.*;
038import org.hl7.fhir.utilities.Utilities;
039import org.hl7.fhir.r5.model.Enumerations.*;
040import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
041import org.hl7.fhir.exceptions.FHIRException;
042import org.hl7.fhir.instance.model.api.ICompositeType;
043import ca.uhn.fhir.model.api.annotation.ResourceDef;
044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
045import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
046import ca.uhn.fhir.model.api.annotation.Child;
047import ca.uhn.fhir.model.api.annotation.ChildOrder;
048import ca.uhn.fhir.model.api.annotation.Description;
049import ca.uhn.fhir.model.api.annotation.Block;
050
051/**
052 * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
053 */
054@ResourceDef(name="ChargeItem", profile="http://hl7.org/fhir/StructureDefinition/ChargeItem")
055public class ChargeItem extends DomainResource {
056
057    public enum ChargeItemStatus {
058        /**
059         * The charge item has been entered, but the charged service is not  yet complete, so it shall not be billed yet but might be used in the context of pre-authorization.
060         */
061        PLANNED, 
062        /**
063         * The charge item is ready for billing.
064         */
065        BILLABLE, 
066        /**
067         * The charge item has been determined to be not billable (e.g. due to rules associated with the billing code).
068         */
069        NOTBILLABLE, 
070        /**
071         * The processing of the charge was aborted.
072         */
073        ABORTED, 
074        /**
075         * The charge item has been billed (e.g. a billing engine has generated financial transactions by applying the associated ruled for the charge item to the context of the Encounter, and placed them into Claims/Invoices.
076         */
077        BILLED, 
078        /**
079         * The charge item has been entered in error and should not be processed for billing.
080         */
081        ENTEREDINERROR, 
082        /**
083         * The authoring system does not know which of the status values currently applies for this charge item  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.
084         */
085        UNKNOWN, 
086        /**
087         * added to help the parsers with the generic types
088         */
089        NULL;
090        public static ChargeItemStatus fromCode(String codeString) throws FHIRException {
091            if (codeString == null || "".equals(codeString))
092                return null;
093        if ("planned".equals(codeString))
094          return PLANNED;
095        if ("billable".equals(codeString))
096          return BILLABLE;
097        if ("not-billable".equals(codeString))
098          return NOTBILLABLE;
099        if ("aborted".equals(codeString))
100          return ABORTED;
101        if ("billed".equals(codeString))
102          return BILLED;
103        if ("entered-in-error".equals(codeString))
104          return ENTEREDINERROR;
105        if ("unknown".equals(codeString))
106          return UNKNOWN;
107        if (Configuration.isAcceptInvalidEnums())
108          return null;
109        else
110          throw new FHIRException("Unknown ChargeItemStatus code '"+codeString+"'");
111        }
112        public String toCode() {
113          switch (this) {
114            case PLANNED: return "planned";
115            case BILLABLE: return "billable";
116            case NOTBILLABLE: return "not-billable";
117            case ABORTED: return "aborted";
118            case BILLED: return "billed";
119            case ENTEREDINERROR: return "entered-in-error";
120            case UNKNOWN: return "unknown";
121            case NULL: return null;
122            default: return "?";
123          }
124        }
125        public String getSystem() {
126          switch (this) {
127            case PLANNED: return "http://hl7.org/fhir/chargeitem-status";
128            case BILLABLE: return "http://hl7.org/fhir/chargeitem-status";
129            case NOTBILLABLE: return "http://hl7.org/fhir/chargeitem-status";
130            case ABORTED: return "http://hl7.org/fhir/chargeitem-status";
131            case BILLED: return "http://hl7.org/fhir/chargeitem-status";
132            case ENTEREDINERROR: return "http://hl7.org/fhir/chargeitem-status";
133            case UNKNOWN: return "http://hl7.org/fhir/chargeitem-status";
134            case NULL: return null;
135            default: return "?";
136          }
137        }
138        public String getDefinition() {
139          switch (this) {
140            case PLANNED: return "The charge item has been entered, but the charged service is not  yet complete, so it shall not be billed yet but might be used in the context of pre-authorization.";
141            case BILLABLE: return "The charge item is ready for billing.";
142            case NOTBILLABLE: return "The charge item has been determined to be not billable (e.g. due to rules associated with the billing code).";
143            case ABORTED: return "The processing of the charge was aborted.";
144            case BILLED: return "The charge item has been billed (e.g. a billing engine has generated financial transactions by applying the associated ruled for the charge item to the context of the Encounter, and placed them into Claims/Invoices.";
145            case ENTEREDINERROR: return "The charge item has been entered in error and should not be processed for billing.";
146            case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this charge item  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.";
147            case NULL: return null;
148            default: return "?";
149          }
150        }
151        public String getDisplay() {
152          switch (this) {
153            case PLANNED: return "Planned";
154            case BILLABLE: return "Billable";
155            case NOTBILLABLE: return "Not billable";
156            case ABORTED: return "Aborted";
157            case BILLED: return "Billed";
158            case ENTEREDINERROR: return "Entered in Error";
159            case UNKNOWN: return "Unknown";
160            case NULL: return null;
161            default: return "?";
162          }
163        }
164    }
165
166  public static class ChargeItemStatusEnumFactory implements EnumFactory<ChargeItemStatus> {
167    public ChargeItemStatus fromCode(String codeString) throws IllegalArgumentException {
168      if (codeString == null || "".equals(codeString))
169            if (codeString == null || "".equals(codeString))
170                return null;
171        if ("planned".equals(codeString))
172          return ChargeItemStatus.PLANNED;
173        if ("billable".equals(codeString))
174          return ChargeItemStatus.BILLABLE;
175        if ("not-billable".equals(codeString))
176          return ChargeItemStatus.NOTBILLABLE;
177        if ("aborted".equals(codeString))
178          return ChargeItemStatus.ABORTED;
179        if ("billed".equals(codeString))
180          return ChargeItemStatus.BILLED;
181        if ("entered-in-error".equals(codeString))
182          return ChargeItemStatus.ENTEREDINERROR;
183        if ("unknown".equals(codeString))
184          return ChargeItemStatus.UNKNOWN;
185        throw new IllegalArgumentException("Unknown ChargeItemStatus code '"+codeString+"'");
186        }
187        public Enumeration<ChargeItemStatus> fromType(Base code) throws FHIRException {
188          if (code == null)
189            return null;
190          if (code.isEmpty())
191            return new Enumeration<ChargeItemStatus>(this);
192          String codeString = ((PrimitiveType) code).asStringValue();
193          if (codeString == null || "".equals(codeString))
194            return null;
195        if ("planned".equals(codeString))
196          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.PLANNED);
197        if ("billable".equals(codeString))
198          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.BILLABLE);
199        if ("not-billable".equals(codeString))
200          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.NOTBILLABLE);
201        if ("aborted".equals(codeString))
202          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.ABORTED);
203        if ("billed".equals(codeString))
204          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.BILLED);
205        if ("entered-in-error".equals(codeString))
206          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.ENTEREDINERROR);
207        if ("unknown".equals(codeString))
208          return new Enumeration<ChargeItemStatus>(this, ChargeItemStatus.UNKNOWN);
209        throw new FHIRException("Unknown ChargeItemStatus code '"+codeString+"'");
210        }
211    public String toCode(ChargeItemStatus code) {
212      if (code == ChargeItemStatus.PLANNED)
213        return "planned";
214      if (code == ChargeItemStatus.BILLABLE)
215        return "billable";
216      if (code == ChargeItemStatus.NOTBILLABLE)
217        return "not-billable";
218      if (code == ChargeItemStatus.ABORTED)
219        return "aborted";
220      if (code == ChargeItemStatus.BILLED)
221        return "billed";
222      if (code == ChargeItemStatus.ENTEREDINERROR)
223        return "entered-in-error";
224      if (code == ChargeItemStatus.UNKNOWN)
225        return "unknown";
226      return "?";
227      }
228    public String toSystem(ChargeItemStatus code) {
229      return code.getSystem();
230      }
231    }
232
233    @Block()
234    public static class ChargeItemPerformerComponent extends BackboneElement implements IBaseBackboneElement {
235        /**
236         * Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).
237         */
238        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
239        @Description(shortDefinition="What type of performance was done", formalDefinition="Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.)." )
240        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
241        protected CodeableConcept function;
242
243        /**
244         * The device, practitioner, etc. who performed or participated in the service.
245         */
246        @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, Device.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false)
247        @Description(shortDefinition="Individual who was performing", formalDefinition="The device, practitioner, etc. who performed or participated in the service." )
248        protected Reference actor;
249
250        private static final long serialVersionUID = -576943815L;
251
252    /**
253     * Constructor
254     */
255      public ChargeItemPerformerComponent() {
256        super();
257      }
258
259    /**
260     * Constructor
261     */
262      public ChargeItemPerformerComponent(Reference actor) {
263        super();
264        this.setActor(actor);
265      }
266
267        /**
268         * @return {@link #function} (Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).)
269         */
270        public CodeableConcept getFunction() { 
271          if (this.function == null)
272            if (Configuration.errorOnAutoCreate())
273              throw new Error("Attempt to auto-create ChargeItemPerformerComponent.function");
274            else if (Configuration.doAutoCreate())
275              this.function = new CodeableConcept(); // cc
276          return this.function;
277        }
278
279        public boolean hasFunction() { 
280          return this.function != null && !this.function.isEmpty();
281        }
282
283        /**
284         * @param value {@link #function} (Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).)
285         */
286        public ChargeItemPerformerComponent setFunction(CodeableConcept value) { 
287          this.function = value;
288          return this;
289        }
290
291        /**
292         * @return {@link #actor} (The device, practitioner, etc. who performed or participated in the service.)
293         */
294        public Reference getActor() { 
295          if (this.actor == null)
296            if (Configuration.errorOnAutoCreate())
297              throw new Error("Attempt to auto-create ChargeItemPerformerComponent.actor");
298            else if (Configuration.doAutoCreate())
299              this.actor = new Reference(); // cc
300          return this.actor;
301        }
302
303        public boolean hasActor() { 
304          return this.actor != null && !this.actor.isEmpty();
305        }
306
307        /**
308         * @param value {@link #actor} (The device, practitioner, etc. who performed or participated in the service.)
309         */
310        public ChargeItemPerformerComponent setActor(Reference value) { 
311          this.actor = value;
312          return this;
313        }
314
315        protected void listChildren(List<Property> children) {
316          super.listChildren(children);
317          children.add(new Property("function", "CodeableConcept", "Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).", 0, 1, function));
318          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor));
319        }
320
321        @Override
322        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
323          switch (_hash) {
324          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).", 0, 1, function);
325          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor);
326          default: return super.getNamedProperty(_hash, _name, _checkValid);
327          }
328
329        }
330
331      @Override
332      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
333        switch (hash) {
334        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
335        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
336        default: return super.getProperty(hash, name, checkValid);
337        }
338
339      }
340
341      @Override
342      public Base setProperty(int hash, String name, Base value) throws FHIRException {
343        switch (hash) {
344        case 1380938712: // function
345          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
346          return value;
347        case 92645877: // actor
348          this.actor = TypeConvertor.castToReference(value); // Reference
349          return value;
350        default: return super.setProperty(hash, name, value);
351        }
352
353      }
354
355      @Override
356      public Base setProperty(String name, Base value) throws FHIRException {
357        if (name.equals("function")) {
358          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
359        } else if (name.equals("actor")) {
360          this.actor = TypeConvertor.castToReference(value); // Reference
361        } else
362          return super.setProperty(name, value);
363        return value;
364      }
365
366      @Override
367      public Base makeProperty(int hash, String name) throws FHIRException {
368        switch (hash) {
369        case 1380938712:  return getFunction();
370        case 92645877:  return getActor();
371        default: return super.makeProperty(hash, name);
372        }
373
374      }
375
376      @Override
377      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
378        switch (hash) {
379        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
380        case 92645877: /*actor*/ return new String[] {"Reference"};
381        default: return super.getTypesForProperty(hash, name);
382        }
383
384      }
385
386      @Override
387      public Base addChild(String name) throws FHIRException {
388        if (name.equals("function")) {
389          this.function = new CodeableConcept();
390          return this.function;
391        }
392        else if (name.equals("actor")) {
393          this.actor = new Reference();
394          return this.actor;
395        }
396        else
397          return super.addChild(name);
398      }
399
400      public ChargeItemPerformerComponent copy() {
401        ChargeItemPerformerComponent dst = new ChargeItemPerformerComponent();
402        copyValues(dst);
403        return dst;
404      }
405
406      public void copyValues(ChargeItemPerformerComponent dst) {
407        super.copyValues(dst);
408        dst.function = function == null ? null : function.copy();
409        dst.actor = actor == null ? null : actor.copy();
410      }
411
412      @Override
413      public boolean equalsDeep(Base other_) {
414        if (!super.equalsDeep(other_))
415          return false;
416        if (!(other_ instanceof ChargeItemPerformerComponent))
417          return false;
418        ChargeItemPerformerComponent o = (ChargeItemPerformerComponent) other_;
419        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
420      }
421
422      @Override
423      public boolean equalsShallow(Base other_) {
424        if (!super.equalsShallow(other_))
425          return false;
426        if (!(other_ instanceof ChargeItemPerformerComponent))
427          return false;
428        ChargeItemPerformerComponent o = (ChargeItemPerformerComponent) other_;
429        return true;
430      }
431
432      public boolean isEmpty() {
433        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
434      }
435
436  public String fhirType() {
437    return "ChargeItem.performer";
438
439  }
440
441  }
442
443    /**
444     * Identifiers assigned to this event performer or other systems.
445     */
446    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
447    @Description(shortDefinition="Business Identifier for item", formalDefinition="Identifiers assigned to this event performer or other systems." )
448    protected List<Identifier> identifier;
449
450    /**
451     * References the (external) source of pricing information, rules of application for the code this ChargeItem uses.
452     */
453    @Child(name = "definitionUri", type = {UriType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
454    @Description(shortDefinition="Defining information about the code of this charge item", formalDefinition="References the (external) source of pricing information, rules of application for the code this ChargeItem uses." )
455    protected List<UriType> definitionUri;
456
457    /**
458     * References the source of pricing information, rules of application for the code this ChargeItem uses.
459     */
460    @Child(name = "definitionCanonical", type = {CanonicalType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
461    @Description(shortDefinition="Resource defining the code of this ChargeItem", formalDefinition="References the source of pricing information, rules of application for the code this ChargeItem uses." )
462    protected List<CanonicalType> definitionCanonical;
463
464    /**
465     * The current state of the ChargeItem.
466     */
467    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
468    @Description(shortDefinition="planned | billable | not-billable | aborted | billed | entered-in-error | unknown", formalDefinition="The current state of the ChargeItem." )
469    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/chargeitem-status")
470    protected Enumeration<ChargeItemStatus> status;
471
472    /**
473     * ChargeItems can be grouped to larger ChargeItems covering the whole set.
474     */
475    @Child(name = "partOf", type = {ChargeItem.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
476    @Description(shortDefinition="Part of referenced ChargeItem", formalDefinition="ChargeItems can be grouped to larger ChargeItems covering the whole set." )
477    protected List<Reference> partOf;
478
479    /**
480     * A code that identifies the charge, like a billing code.
481     */
482    @Child(name = "code", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true)
483    @Description(shortDefinition="A code that identifies the charge, like a billing code", formalDefinition="A code that identifies the charge, like a billing code." )
484    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/chargeitem-billingcodes")
485    protected CodeableConcept code;
486
487    /**
488     * The individual or set of individuals the action is being or was performed on.
489     */
490    @Child(name = "subject", type = {Patient.class, Group.class}, order=6, min=1, max=1, modifier=false, summary=true)
491    @Description(shortDefinition="Individual service was done for/to", formalDefinition="The individual or set of individuals the action is being or was performed on." )
492    protected Reference subject;
493
494    /**
495     * The encounter or episode of care that establishes the context for this event.
496     */
497    @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=7, min=0, max=1, modifier=false, summary=true)
498    @Description(shortDefinition="Encounter / Episode associated with event", formalDefinition="The encounter or episode of care that establishes the context for this event." )
499    protected Reference context;
500
501    /**
502     * Date/time(s) or duration when the charged service was applied.
503     */
504    @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=8, min=0, max=1, modifier=false, summary=true)
505    @Description(shortDefinition="When the charged service was applied", formalDefinition="Date/time(s) or duration when the charged service was applied." )
506    protected DataType occurrence;
507
508    /**
509     * Indicates who or what performed or participated in the charged service.
510     */
511    @Child(name = "performer", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
512    @Description(shortDefinition="Who performed charged service", formalDefinition="Indicates who or what performed or participated in the charged service." )
513    protected List<ChargeItemPerformerComponent> performer;
514
515    /**
516     * The organization requesting the service.
517     */
518    @Child(name = "performingOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=false)
519    @Description(shortDefinition="Organization providing the charged service", formalDefinition="The organization requesting the service." )
520    protected Reference performingOrganization;
521
522    /**
523     * The organization performing the service.
524     */
525    @Child(name = "requestingOrganization", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=false)
526    @Description(shortDefinition="Organization requesting the charged service", formalDefinition="The organization performing the service." )
527    protected Reference requestingOrganization;
528
529    /**
530     * The financial cost center permits the tracking of charge attribution.
531     */
532    @Child(name = "costCenter", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=false)
533    @Description(shortDefinition="Organization that has ownership of the (potential, future) revenue", formalDefinition="The financial cost center permits the tracking of charge attribution." )
534    protected Reference costCenter;
535
536    /**
537     * Quantity of which the charge item has been serviced.
538     */
539    @Child(name = "quantity", type = {Quantity.class}, order=13, min=0, max=1, modifier=false, summary=true)
540    @Description(shortDefinition="Quantity of which the charge item has been serviced", formalDefinition="Quantity of which the charge item has been serviced." )
541    protected Quantity quantity;
542
543    /**
544     * The anatomical location where the related service has been applied.
545     */
546    @Child(name = "bodysite", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
547    @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where the related service has been applied." )
548    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
549    protected List<CodeableConcept> bodysite;
550
551    /**
552     * Factor overriding the factor determined by the rules associated with the code.
553     */
554    @Child(name = "factorOverride", type = {DecimalType.class}, order=15, min=0, max=1, modifier=false, summary=false)
555    @Description(shortDefinition="Factor overriding the associated rules", formalDefinition="Factor overriding the factor determined by the rules associated with the code." )
556    protected DecimalType factorOverride;
557
558    /**
559     * Total price of the charge overriding the list price associated with the code.
560     */
561    @Child(name = "priceOverride", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=false)
562    @Description(shortDefinition="Price overriding the associated rules", formalDefinition="Total price of the charge overriding the list price associated with the code." )
563    protected Money priceOverride;
564
565    /**
566     * If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.
567     */
568    @Child(name = "overrideReason", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false)
569    @Description(shortDefinition="Reason for overriding the list price/factor", formalDefinition="If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action." )
570    protected StringType overrideReason;
571
572    /**
573     * The device, practitioner, etc. who entered the charge item.
574     */
575    @Child(name = "enterer", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, Device.class, RelatedPerson.class}, order=18, min=0, max=1, modifier=false, summary=true)
576    @Description(shortDefinition="Individual who was entering", formalDefinition="The device, practitioner, etc. who entered the charge item." )
577    protected Reference enterer;
578
579    /**
580     * Date the charge item was entered.
581     */
582    @Child(name = "enteredDate", type = {DateTimeType.class}, order=19, min=0, max=1, modifier=false, summary=true)
583    @Description(shortDefinition="Date the charge item was entered", formalDefinition="Date the charge item was entered." )
584    protected DateTimeType enteredDate;
585
586    /**
587     * Describes why the event occurred in coded or textual form.
588     */
589    @Child(name = "reason", type = {CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
590    @Description(shortDefinition="Why was the charged  service rendered?", formalDefinition="Describes why the event occurred in coded or textual form." )
591    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10")
592    protected List<CodeableConcept> reason;
593
594    /**
595     * Indicated the rendered service that caused this charge.
596     */
597    @Child(name = "service", type = {DiagnosticReport.class, ImagingStudy.class, Immunization.class, MedicationAdministration.class, MedicationDispense.class, Observation.class, Procedure.class, SupplyDelivery.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
598    @Description(shortDefinition="Which rendered service is being charged?", formalDefinition="Indicated the rendered service that caused this charge." )
599    protected List<Reference> service;
600
601    /**
602     * Identifies the device, food, drug or other product being charged either by type code or reference to an instance.
603     */
604    @Child(name = "product", type = {CodeableReference.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
605    @Description(shortDefinition="Product charged", formalDefinition="Identifies the device, food, drug or other product being charged either by type code or reference to an instance." )
606    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-type")
607    protected List<CodeableReference> product;
608
609    /**
610     * Account into which this ChargeItems belongs.
611     */
612    @Child(name = "account", type = {Account.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
613    @Description(shortDefinition="Account to place this charge", formalDefinition="Account into which this ChargeItems belongs." )
614    protected List<Reference> account;
615
616    /**
617     * Comments made about the event by the performer, subject or other participants.
618     */
619    @Child(name = "note", type = {Annotation.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
620    @Description(shortDefinition="Comments made about the ChargeItem", formalDefinition="Comments made about the event by the performer, subject or other participants." )
621    protected List<Annotation> note;
622
623    /**
624     * Further information supporting this charge.
625     */
626    @Child(name = "supportingInformation", type = {Reference.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
627    @Description(shortDefinition="Further information supporting this charge", formalDefinition="Further information supporting this charge." )
628    protected List<Reference> supportingInformation;
629
630    private static final long serialVersionUID = 244289087L;
631
632  /**
633   * Constructor
634   */
635    public ChargeItem() {
636      super();
637    }
638
639  /**
640   * Constructor
641   */
642    public ChargeItem(ChargeItemStatus status, CodeableConcept code, Reference subject) {
643      super();
644      this.setStatus(status);
645      this.setCode(code);
646      this.setSubject(subject);
647    }
648
649    /**
650     * @return {@link #identifier} (Identifiers assigned to this event performer or other systems.)
651     */
652    public List<Identifier> getIdentifier() { 
653      if (this.identifier == null)
654        this.identifier = new ArrayList<Identifier>();
655      return this.identifier;
656    }
657
658    /**
659     * @return Returns a reference to <code>this</code> for easy method chaining
660     */
661    public ChargeItem setIdentifier(List<Identifier> theIdentifier) { 
662      this.identifier = theIdentifier;
663      return this;
664    }
665
666    public boolean hasIdentifier() { 
667      if (this.identifier == null)
668        return false;
669      for (Identifier item : this.identifier)
670        if (!item.isEmpty())
671          return true;
672      return false;
673    }
674
675    public Identifier addIdentifier() { //3
676      Identifier t = new Identifier();
677      if (this.identifier == null)
678        this.identifier = new ArrayList<Identifier>();
679      this.identifier.add(t);
680      return t;
681    }
682
683    public ChargeItem addIdentifier(Identifier t) { //3
684      if (t == null)
685        return this;
686      if (this.identifier == null)
687        this.identifier = new ArrayList<Identifier>();
688      this.identifier.add(t);
689      return this;
690    }
691
692    /**
693     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
694     */
695    public Identifier getIdentifierFirstRep() { 
696      if (getIdentifier().isEmpty()) {
697        addIdentifier();
698      }
699      return getIdentifier().get(0);
700    }
701
702    /**
703     * @return {@link #definitionUri} (References the (external) source of pricing information, rules of application for the code this ChargeItem uses.)
704     */
705    public List<UriType> getDefinitionUri() { 
706      if (this.definitionUri == null)
707        this.definitionUri = new ArrayList<UriType>();
708      return this.definitionUri;
709    }
710
711    /**
712     * @return Returns a reference to <code>this</code> for easy method chaining
713     */
714    public ChargeItem setDefinitionUri(List<UriType> theDefinitionUri) { 
715      this.definitionUri = theDefinitionUri;
716      return this;
717    }
718
719    public boolean hasDefinitionUri() { 
720      if (this.definitionUri == null)
721        return false;
722      for (UriType item : this.definitionUri)
723        if (!item.isEmpty())
724          return true;
725      return false;
726    }
727
728    /**
729     * @return {@link #definitionUri} (References the (external) source of pricing information, rules of application for the code this ChargeItem uses.)
730     */
731    public UriType addDefinitionUriElement() {//2 
732      UriType t = new UriType();
733      if (this.definitionUri == null)
734        this.definitionUri = new ArrayList<UriType>();
735      this.definitionUri.add(t);
736      return t;
737    }
738
739    /**
740     * @param value {@link #definitionUri} (References the (external) source of pricing information, rules of application for the code this ChargeItem uses.)
741     */
742    public ChargeItem addDefinitionUri(String value) { //1
743      UriType t = new UriType();
744      t.setValue(value);
745      if (this.definitionUri == null)
746        this.definitionUri = new ArrayList<UriType>();
747      this.definitionUri.add(t);
748      return this;
749    }
750
751    /**
752     * @param value {@link #definitionUri} (References the (external) source of pricing information, rules of application for the code this ChargeItem uses.)
753     */
754    public boolean hasDefinitionUri(String value) { 
755      if (this.definitionUri == null)
756        return false;
757      for (UriType v : this.definitionUri)
758        if (v.getValue().equals(value)) // uri
759          return true;
760      return false;
761    }
762
763    /**
764     * @return {@link #definitionCanonical} (References the source of pricing information, rules of application for the code this ChargeItem uses.)
765     */
766    public List<CanonicalType> getDefinitionCanonical() { 
767      if (this.definitionCanonical == null)
768        this.definitionCanonical = new ArrayList<CanonicalType>();
769      return this.definitionCanonical;
770    }
771
772    /**
773     * @return Returns a reference to <code>this</code> for easy method chaining
774     */
775    public ChargeItem setDefinitionCanonical(List<CanonicalType> theDefinitionCanonical) { 
776      this.definitionCanonical = theDefinitionCanonical;
777      return this;
778    }
779
780    public boolean hasDefinitionCanonical() { 
781      if (this.definitionCanonical == null)
782        return false;
783      for (CanonicalType item : this.definitionCanonical)
784        if (!item.isEmpty())
785          return true;
786      return false;
787    }
788
789    /**
790     * @return {@link #definitionCanonical} (References the source of pricing information, rules of application for the code this ChargeItem uses.)
791     */
792    public CanonicalType addDefinitionCanonicalElement() {//2 
793      CanonicalType t = new CanonicalType();
794      if (this.definitionCanonical == null)
795        this.definitionCanonical = new ArrayList<CanonicalType>();
796      this.definitionCanonical.add(t);
797      return t;
798    }
799
800    /**
801     * @param value {@link #definitionCanonical} (References the source of pricing information, rules of application for the code this ChargeItem uses.)
802     */
803    public ChargeItem addDefinitionCanonical(String value) { //1
804      CanonicalType t = new CanonicalType();
805      t.setValue(value);
806      if (this.definitionCanonical == null)
807        this.definitionCanonical = new ArrayList<CanonicalType>();
808      this.definitionCanonical.add(t);
809      return this;
810    }
811
812    /**
813     * @param value {@link #definitionCanonical} (References the source of pricing information, rules of application for the code this ChargeItem uses.)
814     */
815    public boolean hasDefinitionCanonical(String value) { 
816      if (this.definitionCanonical == null)
817        return false;
818      for (CanonicalType v : this.definitionCanonical)
819        if (v.getValue().equals(value)) // canonical
820          return true;
821      return false;
822    }
823
824    /**
825     * @return {@link #status} (The current state of the ChargeItem.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
826     */
827    public Enumeration<ChargeItemStatus> getStatusElement() { 
828      if (this.status == null)
829        if (Configuration.errorOnAutoCreate())
830          throw new Error("Attempt to auto-create ChargeItem.status");
831        else if (Configuration.doAutoCreate())
832          this.status = new Enumeration<ChargeItemStatus>(new ChargeItemStatusEnumFactory()); // bb
833      return this.status;
834    }
835
836    public boolean hasStatusElement() { 
837      return this.status != null && !this.status.isEmpty();
838    }
839
840    public boolean hasStatus() { 
841      return this.status != null && !this.status.isEmpty();
842    }
843
844    /**
845     * @param value {@link #status} (The current state of the ChargeItem.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
846     */
847    public ChargeItem setStatusElement(Enumeration<ChargeItemStatus> value) { 
848      this.status = value;
849      return this;
850    }
851
852    /**
853     * @return The current state of the ChargeItem.
854     */
855    public ChargeItemStatus getStatus() { 
856      return this.status == null ? null : this.status.getValue();
857    }
858
859    /**
860     * @param value The current state of the ChargeItem.
861     */
862    public ChargeItem setStatus(ChargeItemStatus value) { 
863        if (this.status == null)
864          this.status = new Enumeration<ChargeItemStatus>(new ChargeItemStatusEnumFactory());
865        this.status.setValue(value);
866      return this;
867    }
868
869    /**
870     * @return {@link #partOf} (ChargeItems can be grouped to larger ChargeItems covering the whole set.)
871     */
872    public List<Reference> getPartOf() { 
873      if (this.partOf == null)
874        this.partOf = new ArrayList<Reference>();
875      return this.partOf;
876    }
877
878    /**
879     * @return Returns a reference to <code>this</code> for easy method chaining
880     */
881    public ChargeItem setPartOf(List<Reference> thePartOf) { 
882      this.partOf = thePartOf;
883      return this;
884    }
885
886    public boolean hasPartOf() { 
887      if (this.partOf == null)
888        return false;
889      for (Reference item : this.partOf)
890        if (!item.isEmpty())
891          return true;
892      return false;
893    }
894
895    public Reference addPartOf() { //3
896      Reference t = new Reference();
897      if (this.partOf == null)
898        this.partOf = new ArrayList<Reference>();
899      this.partOf.add(t);
900      return t;
901    }
902
903    public ChargeItem addPartOf(Reference t) { //3
904      if (t == null)
905        return this;
906      if (this.partOf == null)
907        this.partOf = new ArrayList<Reference>();
908      this.partOf.add(t);
909      return this;
910    }
911
912    /**
913     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
914     */
915    public Reference getPartOfFirstRep() { 
916      if (getPartOf().isEmpty()) {
917        addPartOf();
918      }
919      return getPartOf().get(0);
920    }
921
922    /**
923     * @return {@link #code} (A code that identifies the charge, like a billing code.)
924     */
925    public CodeableConcept getCode() { 
926      if (this.code == null)
927        if (Configuration.errorOnAutoCreate())
928          throw new Error("Attempt to auto-create ChargeItem.code");
929        else if (Configuration.doAutoCreate())
930          this.code = new CodeableConcept(); // cc
931      return this.code;
932    }
933
934    public boolean hasCode() { 
935      return this.code != null && !this.code.isEmpty();
936    }
937
938    /**
939     * @param value {@link #code} (A code that identifies the charge, like a billing code.)
940     */
941    public ChargeItem setCode(CodeableConcept value) { 
942      this.code = value;
943      return this;
944    }
945
946    /**
947     * @return {@link #subject} (The individual or set of individuals the action is being or was performed on.)
948     */
949    public Reference getSubject() { 
950      if (this.subject == null)
951        if (Configuration.errorOnAutoCreate())
952          throw new Error("Attempt to auto-create ChargeItem.subject");
953        else if (Configuration.doAutoCreate())
954          this.subject = new Reference(); // cc
955      return this.subject;
956    }
957
958    public boolean hasSubject() { 
959      return this.subject != null && !this.subject.isEmpty();
960    }
961
962    /**
963     * @param value {@link #subject} (The individual or set of individuals the action is being or was performed on.)
964     */
965    public ChargeItem setSubject(Reference value) { 
966      this.subject = value;
967      return this;
968    }
969
970    /**
971     * @return {@link #context} (The encounter or episode of care that establishes the context for this event.)
972     */
973    public Reference getContext() { 
974      if (this.context == null)
975        if (Configuration.errorOnAutoCreate())
976          throw new Error("Attempt to auto-create ChargeItem.context");
977        else if (Configuration.doAutoCreate())
978          this.context = new Reference(); // cc
979      return this.context;
980    }
981
982    public boolean hasContext() { 
983      return this.context != null && !this.context.isEmpty();
984    }
985
986    /**
987     * @param value {@link #context} (The encounter or episode of care that establishes the context for this event.)
988     */
989    public ChargeItem setContext(Reference value) { 
990      this.context = value;
991      return this;
992    }
993
994    /**
995     * @return {@link #occurrence} (Date/time(s) or duration when the charged service was applied.)
996     */
997    public DataType getOccurrence() { 
998      return this.occurrence;
999    }
1000
1001    /**
1002     * @return {@link #occurrence} (Date/time(s) or duration when the charged service was applied.)
1003     */
1004    public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 
1005      if (this.occurrence == null)
1006        this.occurrence = new DateTimeType();
1007      if (!(this.occurrence instanceof DateTimeType))
1008        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1009      return (DateTimeType) this.occurrence;
1010    }
1011
1012    public boolean hasOccurrenceDateTimeType() { 
1013      return this != null && this.occurrence instanceof DateTimeType;
1014    }
1015
1016    /**
1017     * @return {@link #occurrence} (Date/time(s) or duration when the charged service was applied.)
1018     */
1019    public Period getOccurrencePeriod() throws FHIRException { 
1020      if (this.occurrence == null)
1021        this.occurrence = new Period();
1022      if (!(this.occurrence instanceof Period))
1023        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1024      return (Period) this.occurrence;
1025    }
1026
1027    public boolean hasOccurrencePeriod() { 
1028      return this != null && this.occurrence instanceof Period;
1029    }
1030
1031    /**
1032     * @return {@link #occurrence} (Date/time(s) or duration when the charged service was applied.)
1033     */
1034    public Timing getOccurrenceTiming() throws FHIRException { 
1035      if (this.occurrence == null)
1036        this.occurrence = new Timing();
1037      if (!(this.occurrence instanceof Timing))
1038        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1039      return (Timing) this.occurrence;
1040    }
1041
1042    public boolean hasOccurrenceTiming() { 
1043      return this != null && this.occurrence instanceof Timing;
1044    }
1045
1046    public boolean hasOccurrence() { 
1047      return this.occurrence != null && !this.occurrence.isEmpty();
1048    }
1049
1050    /**
1051     * @param value {@link #occurrence} (Date/time(s) or duration when the charged service was applied.)
1052     */
1053    public ChargeItem setOccurrence(DataType value) { 
1054      if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing))
1055        throw new Error("Not the right type for ChargeItem.occurrence[x]: "+value.fhirType());
1056      this.occurrence = value;
1057      return this;
1058    }
1059
1060    /**
1061     * @return {@link #performer} (Indicates who or what performed or participated in the charged service.)
1062     */
1063    public List<ChargeItemPerformerComponent> getPerformer() { 
1064      if (this.performer == null)
1065        this.performer = new ArrayList<ChargeItemPerformerComponent>();
1066      return this.performer;
1067    }
1068
1069    /**
1070     * @return Returns a reference to <code>this</code> for easy method chaining
1071     */
1072    public ChargeItem setPerformer(List<ChargeItemPerformerComponent> thePerformer) { 
1073      this.performer = thePerformer;
1074      return this;
1075    }
1076
1077    public boolean hasPerformer() { 
1078      if (this.performer == null)
1079        return false;
1080      for (ChargeItemPerformerComponent item : this.performer)
1081        if (!item.isEmpty())
1082          return true;
1083      return false;
1084    }
1085
1086    public ChargeItemPerformerComponent addPerformer() { //3
1087      ChargeItemPerformerComponent t = new ChargeItemPerformerComponent();
1088      if (this.performer == null)
1089        this.performer = new ArrayList<ChargeItemPerformerComponent>();
1090      this.performer.add(t);
1091      return t;
1092    }
1093
1094    public ChargeItem addPerformer(ChargeItemPerformerComponent t) { //3
1095      if (t == null)
1096        return this;
1097      if (this.performer == null)
1098        this.performer = new ArrayList<ChargeItemPerformerComponent>();
1099      this.performer.add(t);
1100      return this;
1101    }
1102
1103    /**
1104     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
1105     */
1106    public ChargeItemPerformerComponent getPerformerFirstRep() { 
1107      if (getPerformer().isEmpty()) {
1108        addPerformer();
1109      }
1110      return getPerformer().get(0);
1111    }
1112
1113    /**
1114     * @return {@link #performingOrganization} (The organization requesting the service.)
1115     */
1116    public Reference getPerformingOrganization() { 
1117      if (this.performingOrganization == null)
1118        if (Configuration.errorOnAutoCreate())
1119          throw new Error("Attempt to auto-create ChargeItem.performingOrganization");
1120        else if (Configuration.doAutoCreate())
1121          this.performingOrganization = new Reference(); // cc
1122      return this.performingOrganization;
1123    }
1124
1125    public boolean hasPerformingOrganization() { 
1126      return this.performingOrganization != null && !this.performingOrganization.isEmpty();
1127    }
1128
1129    /**
1130     * @param value {@link #performingOrganization} (The organization requesting the service.)
1131     */
1132    public ChargeItem setPerformingOrganization(Reference value) { 
1133      this.performingOrganization = value;
1134      return this;
1135    }
1136
1137    /**
1138     * @return {@link #requestingOrganization} (The organization performing the service.)
1139     */
1140    public Reference getRequestingOrganization() { 
1141      if (this.requestingOrganization == null)
1142        if (Configuration.errorOnAutoCreate())
1143          throw new Error("Attempt to auto-create ChargeItem.requestingOrganization");
1144        else if (Configuration.doAutoCreate())
1145          this.requestingOrganization = new Reference(); // cc
1146      return this.requestingOrganization;
1147    }
1148
1149    public boolean hasRequestingOrganization() { 
1150      return this.requestingOrganization != null && !this.requestingOrganization.isEmpty();
1151    }
1152
1153    /**
1154     * @param value {@link #requestingOrganization} (The organization performing the service.)
1155     */
1156    public ChargeItem setRequestingOrganization(Reference value) { 
1157      this.requestingOrganization = value;
1158      return this;
1159    }
1160
1161    /**
1162     * @return {@link #costCenter} (The financial cost center permits the tracking of charge attribution.)
1163     */
1164    public Reference getCostCenter() { 
1165      if (this.costCenter == null)
1166        if (Configuration.errorOnAutoCreate())
1167          throw new Error("Attempt to auto-create ChargeItem.costCenter");
1168        else if (Configuration.doAutoCreate())
1169          this.costCenter = new Reference(); // cc
1170      return this.costCenter;
1171    }
1172
1173    public boolean hasCostCenter() { 
1174      return this.costCenter != null && !this.costCenter.isEmpty();
1175    }
1176
1177    /**
1178     * @param value {@link #costCenter} (The financial cost center permits the tracking of charge attribution.)
1179     */
1180    public ChargeItem setCostCenter(Reference value) { 
1181      this.costCenter = value;
1182      return this;
1183    }
1184
1185    /**
1186     * @return {@link #quantity} (Quantity of which the charge item has been serviced.)
1187     */
1188    public Quantity getQuantity() { 
1189      if (this.quantity == null)
1190        if (Configuration.errorOnAutoCreate())
1191          throw new Error("Attempt to auto-create ChargeItem.quantity");
1192        else if (Configuration.doAutoCreate())
1193          this.quantity = new Quantity(); // cc
1194      return this.quantity;
1195    }
1196
1197    public boolean hasQuantity() { 
1198      return this.quantity != null && !this.quantity.isEmpty();
1199    }
1200
1201    /**
1202     * @param value {@link #quantity} (Quantity of which the charge item has been serviced.)
1203     */
1204    public ChargeItem setQuantity(Quantity value) { 
1205      this.quantity = value;
1206      return this;
1207    }
1208
1209    /**
1210     * @return {@link #bodysite} (The anatomical location where the related service has been applied.)
1211     */
1212    public List<CodeableConcept> getBodysite() { 
1213      if (this.bodysite == null)
1214        this.bodysite = new ArrayList<CodeableConcept>();
1215      return this.bodysite;
1216    }
1217
1218    /**
1219     * @return Returns a reference to <code>this</code> for easy method chaining
1220     */
1221    public ChargeItem setBodysite(List<CodeableConcept> theBodysite) { 
1222      this.bodysite = theBodysite;
1223      return this;
1224    }
1225
1226    public boolean hasBodysite() { 
1227      if (this.bodysite == null)
1228        return false;
1229      for (CodeableConcept item : this.bodysite)
1230        if (!item.isEmpty())
1231          return true;
1232      return false;
1233    }
1234
1235    public CodeableConcept addBodysite() { //3
1236      CodeableConcept t = new CodeableConcept();
1237      if (this.bodysite == null)
1238        this.bodysite = new ArrayList<CodeableConcept>();
1239      this.bodysite.add(t);
1240      return t;
1241    }
1242
1243    public ChargeItem addBodysite(CodeableConcept t) { //3
1244      if (t == null)
1245        return this;
1246      if (this.bodysite == null)
1247        this.bodysite = new ArrayList<CodeableConcept>();
1248      this.bodysite.add(t);
1249      return this;
1250    }
1251
1252    /**
1253     * @return The first repetition of repeating field {@link #bodysite}, creating it if it does not already exist {3}
1254     */
1255    public CodeableConcept getBodysiteFirstRep() { 
1256      if (getBodysite().isEmpty()) {
1257        addBodysite();
1258      }
1259      return getBodysite().get(0);
1260    }
1261
1262    /**
1263     * @return {@link #factorOverride} (Factor overriding the factor determined by the rules associated with the code.). This is the underlying object with id, value and extensions. The accessor "getFactorOverride" gives direct access to the value
1264     */
1265    public DecimalType getFactorOverrideElement() { 
1266      if (this.factorOverride == null)
1267        if (Configuration.errorOnAutoCreate())
1268          throw new Error("Attempt to auto-create ChargeItem.factorOverride");
1269        else if (Configuration.doAutoCreate())
1270          this.factorOverride = new DecimalType(); // bb
1271      return this.factorOverride;
1272    }
1273
1274    public boolean hasFactorOverrideElement() { 
1275      return this.factorOverride != null && !this.factorOverride.isEmpty();
1276    }
1277
1278    public boolean hasFactorOverride() { 
1279      return this.factorOverride != null && !this.factorOverride.isEmpty();
1280    }
1281
1282    /**
1283     * @param value {@link #factorOverride} (Factor overriding the factor determined by the rules associated with the code.). This is the underlying object with id, value and extensions. The accessor "getFactorOverride" gives direct access to the value
1284     */
1285    public ChargeItem setFactorOverrideElement(DecimalType value) { 
1286      this.factorOverride = value;
1287      return this;
1288    }
1289
1290    /**
1291     * @return Factor overriding the factor determined by the rules associated with the code.
1292     */
1293    public BigDecimal getFactorOverride() { 
1294      return this.factorOverride == null ? null : this.factorOverride.getValue();
1295    }
1296
1297    /**
1298     * @param value Factor overriding the factor determined by the rules associated with the code.
1299     */
1300    public ChargeItem setFactorOverride(BigDecimal value) { 
1301      if (value == null)
1302        this.factorOverride = null;
1303      else {
1304        if (this.factorOverride == null)
1305          this.factorOverride = new DecimalType();
1306        this.factorOverride.setValue(value);
1307      }
1308      return this;
1309    }
1310
1311    /**
1312     * @param value Factor overriding the factor determined by the rules associated with the code.
1313     */
1314    public ChargeItem setFactorOverride(long value) { 
1315          this.factorOverride = new DecimalType();
1316        this.factorOverride.setValue(value);
1317      return this;
1318    }
1319
1320    /**
1321     * @param value Factor overriding the factor determined by the rules associated with the code.
1322     */
1323    public ChargeItem setFactorOverride(double value) { 
1324          this.factorOverride = new DecimalType();
1325        this.factorOverride.setValue(value);
1326      return this;
1327    }
1328
1329    /**
1330     * @return {@link #priceOverride} (Total price of the charge overriding the list price associated with the code.)
1331     */
1332    public Money getPriceOverride() { 
1333      if (this.priceOverride == null)
1334        if (Configuration.errorOnAutoCreate())
1335          throw new Error("Attempt to auto-create ChargeItem.priceOverride");
1336        else if (Configuration.doAutoCreate())
1337          this.priceOverride = new Money(); // cc
1338      return this.priceOverride;
1339    }
1340
1341    public boolean hasPriceOverride() { 
1342      return this.priceOverride != null && !this.priceOverride.isEmpty();
1343    }
1344
1345    /**
1346     * @param value {@link #priceOverride} (Total price of the charge overriding the list price associated with the code.)
1347     */
1348    public ChargeItem setPriceOverride(Money value) { 
1349      this.priceOverride = value;
1350      return this;
1351    }
1352
1353    /**
1354     * @return {@link #overrideReason} (If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.). This is the underlying object with id, value and extensions. The accessor "getOverrideReason" gives direct access to the value
1355     */
1356    public StringType getOverrideReasonElement() { 
1357      if (this.overrideReason == null)
1358        if (Configuration.errorOnAutoCreate())
1359          throw new Error("Attempt to auto-create ChargeItem.overrideReason");
1360        else if (Configuration.doAutoCreate())
1361          this.overrideReason = new StringType(); // bb
1362      return this.overrideReason;
1363    }
1364
1365    public boolean hasOverrideReasonElement() { 
1366      return this.overrideReason != null && !this.overrideReason.isEmpty();
1367    }
1368
1369    public boolean hasOverrideReason() { 
1370      return this.overrideReason != null && !this.overrideReason.isEmpty();
1371    }
1372
1373    /**
1374     * @param value {@link #overrideReason} (If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.). This is the underlying object with id, value and extensions. The accessor "getOverrideReason" gives direct access to the value
1375     */
1376    public ChargeItem setOverrideReasonElement(StringType value) { 
1377      this.overrideReason = value;
1378      return this;
1379    }
1380
1381    /**
1382     * @return If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.
1383     */
1384    public String getOverrideReason() { 
1385      return this.overrideReason == null ? null : this.overrideReason.getValue();
1386    }
1387
1388    /**
1389     * @param value If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.
1390     */
1391    public ChargeItem setOverrideReason(String value) { 
1392      if (Utilities.noString(value))
1393        this.overrideReason = null;
1394      else {
1395        if (this.overrideReason == null)
1396          this.overrideReason = new StringType();
1397        this.overrideReason.setValue(value);
1398      }
1399      return this;
1400    }
1401
1402    /**
1403     * @return {@link #enterer} (The device, practitioner, etc. who entered the charge item.)
1404     */
1405    public Reference getEnterer() { 
1406      if (this.enterer == null)
1407        if (Configuration.errorOnAutoCreate())
1408          throw new Error("Attempt to auto-create ChargeItem.enterer");
1409        else if (Configuration.doAutoCreate())
1410          this.enterer = new Reference(); // cc
1411      return this.enterer;
1412    }
1413
1414    public boolean hasEnterer() { 
1415      return this.enterer != null && !this.enterer.isEmpty();
1416    }
1417
1418    /**
1419     * @param value {@link #enterer} (The device, practitioner, etc. who entered the charge item.)
1420     */
1421    public ChargeItem setEnterer(Reference value) { 
1422      this.enterer = value;
1423      return this;
1424    }
1425
1426    /**
1427     * @return {@link #enteredDate} (Date the charge item was entered.). This is the underlying object with id, value and extensions. The accessor "getEnteredDate" gives direct access to the value
1428     */
1429    public DateTimeType getEnteredDateElement() { 
1430      if (this.enteredDate == null)
1431        if (Configuration.errorOnAutoCreate())
1432          throw new Error("Attempt to auto-create ChargeItem.enteredDate");
1433        else if (Configuration.doAutoCreate())
1434          this.enteredDate = new DateTimeType(); // bb
1435      return this.enteredDate;
1436    }
1437
1438    public boolean hasEnteredDateElement() { 
1439      return this.enteredDate != null && !this.enteredDate.isEmpty();
1440    }
1441
1442    public boolean hasEnteredDate() { 
1443      return this.enteredDate != null && !this.enteredDate.isEmpty();
1444    }
1445
1446    /**
1447     * @param value {@link #enteredDate} (Date the charge item was entered.). This is the underlying object with id, value and extensions. The accessor "getEnteredDate" gives direct access to the value
1448     */
1449    public ChargeItem setEnteredDateElement(DateTimeType value) { 
1450      this.enteredDate = value;
1451      return this;
1452    }
1453
1454    /**
1455     * @return Date the charge item was entered.
1456     */
1457    public Date getEnteredDate() { 
1458      return this.enteredDate == null ? null : this.enteredDate.getValue();
1459    }
1460
1461    /**
1462     * @param value Date the charge item was entered.
1463     */
1464    public ChargeItem setEnteredDate(Date value) { 
1465      if (value == null)
1466        this.enteredDate = null;
1467      else {
1468        if (this.enteredDate == null)
1469          this.enteredDate = new DateTimeType();
1470        this.enteredDate.setValue(value);
1471      }
1472      return this;
1473    }
1474
1475    /**
1476     * @return {@link #reason} (Describes why the event occurred in coded or textual form.)
1477     */
1478    public List<CodeableConcept> getReason() { 
1479      if (this.reason == null)
1480        this.reason = new ArrayList<CodeableConcept>();
1481      return this.reason;
1482    }
1483
1484    /**
1485     * @return Returns a reference to <code>this</code> for easy method chaining
1486     */
1487    public ChargeItem setReason(List<CodeableConcept> theReason) { 
1488      this.reason = theReason;
1489      return this;
1490    }
1491
1492    public boolean hasReason() { 
1493      if (this.reason == null)
1494        return false;
1495      for (CodeableConcept item : this.reason)
1496        if (!item.isEmpty())
1497          return true;
1498      return false;
1499    }
1500
1501    public CodeableConcept addReason() { //3
1502      CodeableConcept t = new CodeableConcept();
1503      if (this.reason == null)
1504        this.reason = new ArrayList<CodeableConcept>();
1505      this.reason.add(t);
1506      return t;
1507    }
1508
1509    public ChargeItem addReason(CodeableConcept t) { //3
1510      if (t == null)
1511        return this;
1512      if (this.reason == null)
1513        this.reason = new ArrayList<CodeableConcept>();
1514      this.reason.add(t);
1515      return this;
1516    }
1517
1518    /**
1519     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
1520     */
1521    public CodeableConcept getReasonFirstRep() { 
1522      if (getReason().isEmpty()) {
1523        addReason();
1524      }
1525      return getReason().get(0);
1526    }
1527
1528    /**
1529     * @return {@link #service} (Indicated the rendered service that caused this charge.)
1530     */
1531    public List<Reference> getService() { 
1532      if (this.service == null)
1533        this.service = new ArrayList<Reference>();
1534      return this.service;
1535    }
1536
1537    /**
1538     * @return Returns a reference to <code>this</code> for easy method chaining
1539     */
1540    public ChargeItem setService(List<Reference> theService) { 
1541      this.service = theService;
1542      return this;
1543    }
1544
1545    public boolean hasService() { 
1546      if (this.service == null)
1547        return false;
1548      for (Reference item : this.service)
1549        if (!item.isEmpty())
1550          return true;
1551      return false;
1552    }
1553
1554    public Reference addService() { //3
1555      Reference t = new Reference();
1556      if (this.service == null)
1557        this.service = new ArrayList<Reference>();
1558      this.service.add(t);
1559      return t;
1560    }
1561
1562    public ChargeItem addService(Reference t) { //3
1563      if (t == null)
1564        return this;
1565      if (this.service == null)
1566        this.service = new ArrayList<Reference>();
1567      this.service.add(t);
1568      return this;
1569    }
1570
1571    /**
1572     * @return The first repetition of repeating field {@link #service}, creating it if it does not already exist {3}
1573     */
1574    public Reference getServiceFirstRep() { 
1575      if (getService().isEmpty()) {
1576        addService();
1577      }
1578      return getService().get(0);
1579    }
1580
1581    /**
1582     * @return {@link #product} (Identifies the device, food, drug or other product being charged either by type code or reference to an instance.)
1583     */
1584    public List<CodeableReference> getProduct() { 
1585      if (this.product == null)
1586        this.product = new ArrayList<CodeableReference>();
1587      return this.product;
1588    }
1589
1590    /**
1591     * @return Returns a reference to <code>this</code> for easy method chaining
1592     */
1593    public ChargeItem setProduct(List<CodeableReference> theProduct) { 
1594      this.product = theProduct;
1595      return this;
1596    }
1597
1598    public boolean hasProduct() { 
1599      if (this.product == null)
1600        return false;
1601      for (CodeableReference item : this.product)
1602        if (!item.isEmpty())
1603          return true;
1604      return false;
1605    }
1606
1607    public CodeableReference addProduct() { //3
1608      CodeableReference t = new CodeableReference();
1609      if (this.product == null)
1610        this.product = new ArrayList<CodeableReference>();
1611      this.product.add(t);
1612      return t;
1613    }
1614
1615    public ChargeItem addProduct(CodeableReference t) { //3
1616      if (t == null)
1617        return this;
1618      if (this.product == null)
1619        this.product = new ArrayList<CodeableReference>();
1620      this.product.add(t);
1621      return this;
1622    }
1623
1624    /**
1625     * @return The first repetition of repeating field {@link #product}, creating it if it does not already exist {3}
1626     */
1627    public CodeableReference getProductFirstRep() { 
1628      if (getProduct().isEmpty()) {
1629        addProduct();
1630      }
1631      return getProduct().get(0);
1632    }
1633
1634    /**
1635     * @return {@link #account} (Account into which this ChargeItems belongs.)
1636     */
1637    public List<Reference> getAccount() { 
1638      if (this.account == null)
1639        this.account = new ArrayList<Reference>();
1640      return this.account;
1641    }
1642
1643    /**
1644     * @return Returns a reference to <code>this</code> for easy method chaining
1645     */
1646    public ChargeItem setAccount(List<Reference> theAccount) { 
1647      this.account = theAccount;
1648      return this;
1649    }
1650
1651    public boolean hasAccount() { 
1652      if (this.account == null)
1653        return false;
1654      for (Reference item : this.account)
1655        if (!item.isEmpty())
1656          return true;
1657      return false;
1658    }
1659
1660    public Reference addAccount() { //3
1661      Reference t = new Reference();
1662      if (this.account == null)
1663        this.account = new ArrayList<Reference>();
1664      this.account.add(t);
1665      return t;
1666    }
1667
1668    public ChargeItem addAccount(Reference t) { //3
1669      if (t == null)
1670        return this;
1671      if (this.account == null)
1672        this.account = new ArrayList<Reference>();
1673      this.account.add(t);
1674      return this;
1675    }
1676
1677    /**
1678     * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3}
1679     */
1680    public Reference getAccountFirstRep() { 
1681      if (getAccount().isEmpty()) {
1682        addAccount();
1683      }
1684      return getAccount().get(0);
1685    }
1686
1687    /**
1688     * @return {@link #note} (Comments made about the event by the performer, subject or other participants.)
1689     */
1690    public List<Annotation> getNote() { 
1691      if (this.note == null)
1692        this.note = new ArrayList<Annotation>();
1693      return this.note;
1694    }
1695
1696    /**
1697     * @return Returns a reference to <code>this</code> for easy method chaining
1698     */
1699    public ChargeItem setNote(List<Annotation> theNote) { 
1700      this.note = theNote;
1701      return this;
1702    }
1703
1704    public boolean hasNote() { 
1705      if (this.note == null)
1706        return false;
1707      for (Annotation item : this.note)
1708        if (!item.isEmpty())
1709          return true;
1710      return false;
1711    }
1712
1713    public Annotation addNote() { //3
1714      Annotation t = new Annotation();
1715      if (this.note == null)
1716        this.note = new ArrayList<Annotation>();
1717      this.note.add(t);
1718      return t;
1719    }
1720
1721    public ChargeItem addNote(Annotation t) { //3
1722      if (t == null)
1723        return this;
1724      if (this.note == null)
1725        this.note = new ArrayList<Annotation>();
1726      this.note.add(t);
1727      return this;
1728    }
1729
1730    /**
1731     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1732     */
1733    public Annotation getNoteFirstRep() { 
1734      if (getNote().isEmpty()) {
1735        addNote();
1736      }
1737      return getNote().get(0);
1738    }
1739
1740    /**
1741     * @return {@link #supportingInformation} (Further information supporting this charge.)
1742     */
1743    public List<Reference> getSupportingInformation() { 
1744      if (this.supportingInformation == null)
1745        this.supportingInformation = new ArrayList<Reference>();
1746      return this.supportingInformation;
1747    }
1748
1749    /**
1750     * @return Returns a reference to <code>this</code> for easy method chaining
1751     */
1752    public ChargeItem setSupportingInformation(List<Reference> theSupportingInformation) { 
1753      this.supportingInformation = theSupportingInformation;
1754      return this;
1755    }
1756
1757    public boolean hasSupportingInformation() { 
1758      if (this.supportingInformation == null)
1759        return false;
1760      for (Reference item : this.supportingInformation)
1761        if (!item.isEmpty())
1762          return true;
1763      return false;
1764    }
1765
1766    public Reference addSupportingInformation() { //3
1767      Reference t = new Reference();
1768      if (this.supportingInformation == null)
1769        this.supportingInformation = new ArrayList<Reference>();
1770      this.supportingInformation.add(t);
1771      return t;
1772    }
1773
1774    public ChargeItem addSupportingInformation(Reference t) { //3
1775      if (t == null)
1776        return this;
1777      if (this.supportingInformation == null)
1778        this.supportingInformation = new ArrayList<Reference>();
1779      this.supportingInformation.add(t);
1780      return this;
1781    }
1782
1783    /**
1784     * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3}
1785     */
1786    public Reference getSupportingInformationFirstRep() { 
1787      if (getSupportingInformation().isEmpty()) {
1788        addSupportingInformation();
1789      }
1790      return getSupportingInformation().get(0);
1791    }
1792
1793      protected void listChildren(List<Property> children) {
1794        super.listChildren(children);
1795        children.add(new Property("identifier", "Identifier", "Identifiers assigned to this event performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier));
1796        children.add(new Property("definitionUri", "uri", "References the (external) source of pricing information, rules of application for the code this ChargeItem uses.", 0, java.lang.Integer.MAX_VALUE, definitionUri));
1797        children.add(new Property("definitionCanonical", "canonical(ChargeItemDefinition)", "References the source of pricing information, rules of application for the code this ChargeItem uses.", 0, java.lang.Integer.MAX_VALUE, definitionCanonical));
1798        children.add(new Property("status", "code", "The current state of the ChargeItem.", 0, 1, status));
1799        children.add(new Property("partOf", "Reference(ChargeItem)", "ChargeItems can be grouped to larger ChargeItems covering the whole set.", 0, java.lang.Integer.MAX_VALUE, partOf));
1800        children.add(new Property("code", "CodeableConcept", "A code that identifies the charge, like a billing code.", 0, 1, code));
1801        children.add(new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals the action is being or was performed on.", 0, 1, subject));
1802        children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this event.", 0, 1, context));
1803        children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence));
1804        children.add(new Property("performer", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, performer));
1805        children.add(new Property("performingOrganization", "Reference(Organization)", "The organization requesting the service.", 0, 1, performingOrganization));
1806        children.add(new Property("requestingOrganization", "Reference(Organization)", "The organization performing the service.", 0, 1, requestingOrganization));
1807        children.add(new Property("costCenter", "Reference(Organization)", "The financial cost center permits the tracking of charge attribution.", 0, 1, costCenter));
1808        children.add(new Property("quantity", "Quantity", "Quantity of which the charge item has been serviced.", 0, 1, quantity));
1809        children.add(new Property("bodysite", "CodeableConcept", "The anatomical location where the related service has been applied.", 0, java.lang.Integer.MAX_VALUE, bodysite));
1810        children.add(new Property("factorOverride", "decimal", "Factor overriding the factor determined by the rules associated with the code.", 0, 1, factorOverride));
1811        children.add(new Property("priceOverride", "Money", "Total price of the charge overriding the list price associated with the code.", 0, 1, priceOverride));
1812        children.add(new Property("overrideReason", "string", "If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.", 0, 1, overrideReason));
1813        children.add(new Property("enterer", "Reference(Practitioner|PractitionerRole|Organization|Patient|Device|RelatedPerson)", "The device, practitioner, etc. who entered the charge item.", 0, 1, enterer));
1814        children.add(new Property("enteredDate", "dateTime", "Date the charge item was entered.", 0, 1, enteredDate));
1815        children.add(new Property("reason", "CodeableConcept", "Describes why the event occurred in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reason));
1816        children.add(new Property("service", "Reference(DiagnosticReport|ImagingStudy|Immunization|MedicationAdministration|MedicationDispense|Observation|Procedure|SupplyDelivery)", "Indicated the rendered service that caused this charge.", 0, java.lang.Integer.MAX_VALUE, service));
1817        children.add(new Property("product", "CodeableReference(Device|Medication|Substance)", "Identifies the device, food, drug or other product being charged either by type code or reference to an instance.", 0, java.lang.Integer.MAX_VALUE, product));
1818        children.add(new Property("account", "Reference(Account)", "Account into which this ChargeItems belongs.", 0, java.lang.Integer.MAX_VALUE, account));
1819        children.add(new Property("note", "Annotation", "Comments made about the event by the performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note));
1820        children.add(new Property("supportingInformation", "Reference(Any)", "Further information supporting this charge.", 0, java.lang.Integer.MAX_VALUE, supportingInformation));
1821      }
1822
1823      @Override
1824      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1825        switch (_hash) {
1826        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers assigned to this event performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier);
1827        case -1139428583: /*definitionUri*/  return new Property("definitionUri", "uri", "References the (external) source of pricing information, rules of application for the code this ChargeItem uses.", 0, java.lang.Integer.MAX_VALUE, definitionUri);
1828        case 933485793: /*definitionCanonical*/  return new Property("definitionCanonical", "canonical(ChargeItemDefinition)", "References the source of pricing information, rules of application for the code this ChargeItem uses.", 0, java.lang.Integer.MAX_VALUE, definitionCanonical);
1829        case -892481550: /*status*/  return new Property("status", "code", "The current state of the ChargeItem.", 0, 1, status);
1830        case -995410646: /*partOf*/  return new Property("partOf", "Reference(ChargeItem)", "ChargeItems can be grouped to larger ChargeItems covering the whole set.", 0, java.lang.Integer.MAX_VALUE, partOf);
1831        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that identifies the charge, like a billing code.", 0, 1, code);
1832        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals the action is being or was performed on.", 0, 1, subject);
1833        case 951530927: /*context*/  return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this event.", 0, 1, context);
1834        case -2022646513: /*occurrence[x]*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence);
1835        case 1687874001: /*occurrence*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence);
1836        case -298443636: /*occurrenceDateTime*/  return new Property("occurrence[x]", "dateTime", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence);
1837        case 1397156594: /*occurrencePeriod*/  return new Property("occurrence[x]", "Period", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence);
1838        case 1515218299: /*occurrenceTiming*/  return new Property("occurrence[x]", "Timing", "Date/time(s) or duration when the charged service was applied.", 0, 1, occurrence);
1839        case 481140686: /*performer*/  return new Property("performer", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, performer);
1840        case 1273192628: /*performingOrganization*/  return new Property("performingOrganization", "Reference(Organization)", "The organization requesting the service.", 0, 1, performingOrganization);
1841        case 1279054790: /*requestingOrganization*/  return new Property("requestingOrganization", "Reference(Organization)", "The organization performing the service.", 0, 1, requestingOrganization);
1842        case -593192318: /*costCenter*/  return new Property("costCenter", "Reference(Organization)", "The financial cost center permits the tracking of charge attribution.", 0, 1, costCenter);
1843        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "Quantity of which the charge item has been serviced.", 0, 1, quantity);
1844        case 1703573481: /*bodysite*/  return new Property("bodysite", "CodeableConcept", "The anatomical location where the related service has been applied.", 0, java.lang.Integer.MAX_VALUE, bodysite);
1845        case -451233221: /*factorOverride*/  return new Property("factorOverride", "decimal", "Factor overriding the factor determined by the rules associated with the code.", 0, 1, factorOverride);
1846        case -216803275: /*priceOverride*/  return new Property("priceOverride", "Money", "Total price of the charge overriding the list price associated with the code.", 0, 1, priceOverride);
1847        case -742878928: /*overrideReason*/  return new Property("overrideReason", "string", "If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.", 0, 1, overrideReason);
1848        case -1591951995: /*enterer*/  return new Property("enterer", "Reference(Practitioner|PractitionerRole|Organization|Patient|Device|RelatedPerson)", "The device, practitioner, etc. who entered the charge item.", 0, 1, enterer);
1849        case 555978181: /*enteredDate*/  return new Property("enteredDate", "dateTime", "Date the charge item was entered.", 0, 1, enteredDate);
1850        case -934964668: /*reason*/  return new Property("reason", "CodeableConcept", "Describes why the event occurred in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reason);
1851        case 1984153269: /*service*/  return new Property("service", "Reference(DiagnosticReport|ImagingStudy|Immunization|MedicationAdministration|MedicationDispense|Observation|Procedure|SupplyDelivery)", "Indicated the rendered service that caused this charge.", 0, java.lang.Integer.MAX_VALUE, service);
1852        case -309474065: /*product*/  return new Property("product", "CodeableReference(Device|Medication|Substance)", "Identifies the device, food, drug or other product being charged either by type code or reference to an instance.", 0, java.lang.Integer.MAX_VALUE, product);
1853        case -1177318867: /*account*/  return new Property("account", "Reference(Account)", "Account into which this ChargeItems belongs.", 0, java.lang.Integer.MAX_VALUE, account);
1854        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments made about the event by the performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note);
1855        case -1248768647: /*supportingInformation*/  return new Property("supportingInformation", "Reference(Any)", "Further information supporting this charge.", 0, java.lang.Integer.MAX_VALUE, supportingInformation);
1856        default: return super.getNamedProperty(_hash, _name, _checkValid);
1857        }
1858
1859      }
1860
1861      @Override
1862      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1863        switch (hash) {
1864        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1865        case -1139428583: /*definitionUri*/ return this.definitionUri == null ? new Base[0] : this.definitionUri.toArray(new Base[this.definitionUri.size()]); // UriType
1866        case 933485793: /*definitionCanonical*/ return this.definitionCanonical == null ? new Base[0] : this.definitionCanonical.toArray(new Base[this.definitionCanonical.size()]); // CanonicalType
1867        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ChargeItemStatus>
1868        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
1869        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1870        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1871        case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference
1872        case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType
1873        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // ChargeItemPerformerComponent
1874        case 1273192628: /*performingOrganization*/ return this.performingOrganization == null ? new Base[0] : new Base[] {this.performingOrganization}; // Reference
1875        case 1279054790: /*requestingOrganization*/ return this.requestingOrganization == null ? new Base[0] : new Base[] {this.requestingOrganization}; // Reference
1876        case -593192318: /*costCenter*/ return this.costCenter == null ? new Base[0] : new Base[] {this.costCenter}; // Reference
1877        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1878        case 1703573481: /*bodysite*/ return this.bodysite == null ? new Base[0] : this.bodysite.toArray(new Base[this.bodysite.size()]); // CodeableConcept
1879        case -451233221: /*factorOverride*/ return this.factorOverride == null ? new Base[0] : new Base[] {this.factorOverride}; // DecimalType
1880        case -216803275: /*priceOverride*/ return this.priceOverride == null ? new Base[0] : new Base[] {this.priceOverride}; // Money
1881        case -742878928: /*overrideReason*/ return this.overrideReason == null ? new Base[0] : new Base[] {this.overrideReason}; // StringType
1882        case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Reference
1883        case 555978181: /*enteredDate*/ return this.enteredDate == null ? new Base[0] : new Base[] {this.enteredDate}; // DateTimeType
1884        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
1885        case 1984153269: /*service*/ return this.service == null ? new Base[0] : this.service.toArray(new Base[this.service.size()]); // Reference
1886        case -309474065: /*product*/ return this.product == null ? new Base[0] : this.product.toArray(new Base[this.product.size()]); // CodeableReference
1887        case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference
1888        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1889        case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference
1890        default: return super.getProperty(hash, name, checkValid);
1891        }
1892
1893      }
1894
1895      @Override
1896      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1897        switch (hash) {
1898        case -1618432855: // identifier
1899          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1900          return value;
1901        case -1139428583: // definitionUri
1902          this.getDefinitionUri().add(TypeConvertor.castToUri(value)); // UriType
1903          return value;
1904        case 933485793: // definitionCanonical
1905          this.getDefinitionCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
1906          return value;
1907        case -892481550: // status
1908          value = new ChargeItemStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1909          this.status = (Enumeration) value; // Enumeration<ChargeItemStatus>
1910          return value;
1911        case -995410646: // partOf
1912          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
1913          return value;
1914        case 3059181: // code
1915          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1916          return value;
1917        case -1867885268: // subject
1918          this.subject = TypeConvertor.castToReference(value); // Reference
1919          return value;
1920        case 951530927: // context
1921          this.context = TypeConvertor.castToReference(value); // Reference
1922          return value;
1923        case 1687874001: // occurrence
1924          this.occurrence = TypeConvertor.castToType(value); // DataType
1925          return value;
1926        case 481140686: // performer
1927          this.getPerformer().add((ChargeItemPerformerComponent) value); // ChargeItemPerformerComponent
1928          return value;
1929        case 1273192628: // performingOrganization
1930          this.performingOrganization = TypeConvertor.castToReference(value); // Reference
1931          return value;
1932        case 1279054790: // requestingOrganization
1933          this.requestingOrganization = TypeConvertor.castToReference(value); // Reference
1934          return value;
1935        case -593192318: // costCenter
1936          this.costCenter = TypeConvertor.castToReference(value); // Reference
1937          return value;
1938        case -1285004149: // quantity
1939          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1940          return value;
1941        case 1703573481: // bodysite
1942          this.getBodysite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1943          return value;
1944        case -451233221: // factorOverride
1945          this.factorOverride = TypeConvertor.castToDecimal(value); // DecimalType
1946          return value;
1947        case -216803275: // priceOverride
1948          this.priceOverride = TypeConvertor.castToMoney(value); // Money
1949          return value;
1950        case -742878928: // overrideReason
1951          this.overrideReason = TypeConvertor.castToString(value); // StringType
1952          return value;
1953        case -1591951995: // enterer
1954          this.enterer = TypeConvertor.castToReference(value); // Reference
1955          return value;
1956        case 555978181: // enteredDate
1957          this.enteredDate = TypeConvertor.castToDateTime(value); // DateTimeType
1958          return value;
1959        case -934964668: // reason
1960          this.getReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1961          return value;
1962        case 1984153269: // service
1963          this.getService().add(TypeConvertor.castToReference(value)); // Reference
1964          return value;
1965        case -309474065: // product
1966          this.getProduct().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1967          return value;
1968        case -1177318867: // account
1969          this.getAccount().add(TypeConvertor.castToReference(value)); // Reference
1970          return value;
1971        case 3387378: // note
1972          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1973          return value;
1974        case -1248768647: // supportingInformation
1975          this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference
1976          return value;
1977        default: return super.setProperty(hash, name, value);
1978        }
1979
1980      }
1981
1982      @Override
1983      public Base setProperty(String name, Base value) throws FHIRException {
1984        if (name.equals("identifier")) {
1985          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1986        } else if (name.equals("definitionUri")) {
1987          this.getDefinitionUri().add(TypeConvertor.castToUri(value));
1988        } else if (name.equals("definitionCanonical")) {
1989          this.getDefinitionCanonical().add(TypeConvertor.castToCanonical(value));
1990        } else if (name.equals("status")) {
1991          value = new ChargeItemStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1992          this.status = (Enumeration) value; // Enumeration<ChargeItemStatus>
1993        } else if (name.equals("partOf")) {
1994          this.getPartOf().add(TypeConvertor.castToReference(value));
1995        } else if (name.equals("code")) {
1996          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1997        } else if (name.equals("subject")) {
1998          this.subject = TypeConvertor.castToReference(value); // Reference
1999        } else if (name.equals("context")) {
2000          this.context = TypeConvertor.castToReference(value); // Reference
2001        } else if (name.equals("occurrence[x]")) {
2002          this.occurrence = TypeConvertor.castToType(value); // DataType
2003        } else if (name.equals("performer")) {
2004          this.getPerformer().add((ChargeItemPerformerComponent) value);
2005        } else if (name.equals("performingOrganization")) {
2006          this.performingOrganization = TypeConvertor.castToReference(value); // Reference
2007        } else if (name.equals("requestingOrganization")) {
2008          this.requestingOrganization = TypeConvertor.castToReference(value); // Reference
2009        } else if (name.equals("costCenter")) {
2010          this.costCenter = TypeConvertor.castToReference(value); // Reference
2011        } else if (name.equals("quantity")) {
2012          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
2013        } else if (name.equals("bodysite")) {
2014          this.getBodysite().add(TypeConvertor.castToCodeableConcept(value));
2015        } else if (name.equals("factorOverride")) {
2016          this.factorOverride = TypeConvertor.castToDecimal(value); // DecimalType
2017        } else if (name.equals("priceOverride")) {
2018          this.priceOverride = TypeConvertor.castToMoney(value); // Money
2019        } else if (name.equals("overrideReason")) {
2020          this.overrideReason = TypeConvertor.castToString(value); // StringType
2021        } else if (name.equals("enterer")) {
2022          this.enterer = TypeConvertor.castToReference(value); // Reference
2023        } else if (name.equals("enteredDate")) {
2024          this.enteredDate = TypeConvertor.castToDateTime(value); // DateTimeType
2025        } else if (name.equals("reason")) {
2026          this.getReason().add(TypeConvertor.castToCodeableConcept(value));
2027        } else if (name.equals("service")) {
2028          this.getService().add(TypeConvertor.castToReference(value));
2029        } else if (name.equals("product")) {
2030          this.getProduct().add(TypeConvertor.castToCodeableReference(value));
2031        } else if (name.equals("account")) {
2032          this.getAccount().add(TypeConvertor.castToReference(value));
2033        } else if (name.equals("note")) {
2034          this.getNote().add(TypeConvertor.castToAnnotation(value));
2035        } else if (name.equals("supportingInformation")) {
2036          this.getSupportingInformation().add(TypeConvertor.castToReference(value));
2037        } else
2038          return super.setProperty(name, value);
2039        return value;
2040      }
2041
2042      @Override
2043      public Base makeProperty(int hash, String name) throws FHIRException {
2044        switch (hash) {
2045        case -1618432855:  return addIdentifier(); 
2046        case -1139428583:  return addDefinitionUriElement();
2047        case 933485793:  return addDefinitionCanonicalElement();
2048        case -892481550:  return getStatusElement();
2049        case -995410646:  return addPartOf(); 
2050        case 3059181:  return getCode();
2051        case -1867885268:  return getSubject();
2052        case 951530927:  return getContext();
2053        case -2022646513:  return getOccurrence();
2054        case 1687874001:  return getOccurrence();
2055        case 481140686:  return addPerformer(); 
2056        case 1273192628:  return getPerformingOrganization();
2057        case 1279054790:  return getRequestingOrganization();
2058        case -593192318:  return getCostCenter();
2059        case -1285004149:  return getQuantity();
2060        case 1703573481:  return addBodysite(); 
2061        case -451233221:  return getFactorOverrideElement();
2062        case -216803275:  return getPriceOverride();
2063        case -742878928:  return getOverrideReasonElement();
2064        case -1591951995:  return getEnterer();
2065        case 555978181:  return getEnteredDateElement();
2066        case -934964668:  return addReason(); 
2067        case 1984153269:  return addService(); 
2068        case -309474065:  return addProduct(); 
2069        case -1177318867:  return addAccount(); 
2070        case 3387378:  return addNote(); 
2071        case -1248768647:  return addSupportingInformation(); 
2072        default: return super.makeProperty(hash, name);
2073        }
2074
2075      }
2076
2077      @Override
2078      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2079        switch (hash) {
2080        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2081        case -1139428583: /*definitionUri*/ return new String[] {"uri"};
2082        case 933485793: /*definitionCanonical*/ return new String[] {"canonical"};
2083        case -892481550: /*status*/ return new String[] {"code"};
2084        case -995410646: /*partOf*/ return new String[] {"Reference"};
2085        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2086        case -1867885268: /*subject*/ return new String[] {"Reference"};
2087        case 951530927: /*context*/ return new String[] {"Reference"};
2088        case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"};
2089        case 481140686: /*performer*/ return new String[] {};
2090        case 1273192628: /*performingOrganization*/ return new String[] {"Reference"};
2091        case 1279054790: /*requestingOrganization*/ return new String[] {"Reference"};
2092        case -593192318: /*costCenter*/ return new String[] {"Reference"};
2093        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
2094        case 1703573481: /*bodysite*/ return new String[] {"CodeableConcept"};
2095        case -451233221: /*factorOverride*/ return new String[] {"decimal"};
2096        case -216803275: /*priceOverride*/ return new String[] {"Money"};
2097        case -742878928: /*overrideReason*/ return new String[] {"string"};
2098        case -1591951995: /*enterer*/ return new String[] {"Reference"};
2099        case 555978181: /*enteredDate*/ return new String[] {"dateTime"};
2100        case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
2101        case 1984153269: /*service*/ return new String[] {"Reference"};
2102        case -309474065: /*product*/ return new String[] {"CodeableReference"};
2103        case -1177318867: /*account*/ return new String[] {"Reference"};
2104        case 3387378: /*note*/ return new String[] {"Annotation"};
2105        case -1248768647: /*supportingInformation*/ return new String[] {"Reference"};
2106        default: return super.getTypesForProperty(hash, name);
2107        }
2108
2109      }
2110
2111      @Override
2112      public Base addChild(String name) throws FHIRException {
2113        if (name.equals("identifier")) {
2114          return addIdentifier();
2115        }
2116        else if (name.equals("definitionUri")) {
2117          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.definitionUri");
2118        }
2119        else if (name.equals("definitionCanonical")) {
2120          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.definitionCanonical");
2121        }
2122        else if (name.equals("status")) {
2123          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.status");
2124        }
2125        else if (name.equals("partOf")) {
2126          return addPartOf();
2127        }
2128        else if (name.equals("code")) {
2129          this.code = new CodeableConcept();
2130          return this.code;
2131        }
2132        else if (name.equals("subject")) {
2133          this.subject = new Reference();
2134          return this.subject;
2135        }
2136        else if (name.equals("context")) {
2137          this.context = new Reference();
2138          return this.context;
2139        }
2140        else if (name.equals("occurrenceDateTime")) {
2141          this.occurrence = new DateTimeType();
2142          return this.occurrence;
2143        }
2144        else if (name.equals("occurrencePeriod")) {
2145          this.occurrence = new Period();
2146          return this.occurrence;
2147        }
2148        else if (name.equals("occurrenceTiming")) {
2149          this.occurrence = new Timing();
2150          return this.occurrence;
2151        }
2152        else if (name.equals("performer")) {
2153          return addPerformer();
2154        }
2155        else if (name.equals("performingOrganization")) {
2156          this.performingOrganization = new Reference();
2157          return this.performingOrganization;
2158        }
2159        else if (name.equals("requestingOrganization")) {
2160          this.requestingOrganization = new Reference();
2161          return this.requestingOrganization;
2162        }
2163        else if (name.equals("costCenter")) {
2164          this.costCenter = new Reference();
2165          return this.costCenter;
2166        }
2167        else if (name.equals("quantity")) {
2168          this.quantity = new Quantity();
2169          return this.quantity;
2170        }
2171        else if (name.equals("bodysite")) {
2172          return addBodysite();
2173        }
2174        else if (name.equals("factorOverride")) {
2175          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.factorOverride");
2176        }
2177        else if (name.equals("priceOverride")) {
2178          this.priceOverride = new Money();
2179          return this.priceOverride;
2180        }
2181        else if (name.equals("overrideReason")) {
2182          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.overrideReason");
2183        }
2184        else if (name.equals("enterer")) {
2185          this.enterer = new Reference();
2186          return this.enterer;
2187        }
2188        else if (name.equals("enteredDate")) {
2189          throw new FHIRException("Cannot call addChild on a primitive type ChargeItem.enteredDate");
2190        }
2191        else if (name.equals("reason")) {
2192          return addReason();
2193        }
2194        else if (name.equals("service")) {
2195          return addService();
2196        }
2197        else if (name.equals("product")) {
2198          return addProduct();
2199        }
2200        else if (name.equals("account")) {
2201          return addAccount();
2202        }
2203        else if (name.equals("note")) {
2204          return addNote();
2205        }
2206        else if (name.equals("supportingInformation")) {
2207          return addSupportingInformation();
2208        }
2209        else
2210          return super.addChild(name);
2211      }
2212
2213  public String fhirType() {
2214    return "ChargeItem";
2215
2216  }
2217
2218      public ChargeItem copy() {
2219        ChargeItem dst = new ChargeItem();
2220        copyValues(dst);
2221        return dst;
2222      }
2223
2224      public void copyValues(ChargeItem dst) {
2225        super.copyValues(dst);
2226        if (identifier != null) {
2227          dst.identifier = new ArrayList<Identifier>();
2228          for (Identifier i : identifier)
2229            dst.identifier.add(i.copy());
2230        };
2231        if (definitionUri != null) {
2232          dst.definitionUri = new ArrayList<UriType>();
2233          for (UriType i : definitionUri)
2234            dst.definitionUri.add(i.copy());
2235        };
2236        if (definitionCanonical != null) {
2237          dst.definitionCanonical = new ArrayList<CanonicalType>();
2238          for (CanonicalType i : definitionCanonical)
2239            dst.definitionCanonical.add(i.copy());
2240        };
2241        dst.status = status == null ? null : status.copy();
2242        if (partOf != null) {
2243          dst.partOf = new ArrayList<Reference>();
2244          for (Reference i : partOf)
2245            dst.partOf.add(i.copy());
2246        };
2247        dst.code = code == null ? null : code.copy();
2248        dst.subject = subject == null ? null : subject.copy();
2249        dst.context = context == null ? null : context.copy();
2250        dst.occurrence = occurrence == null ? null : occurrence.copy();
2251        if (performer != null) {
2252          dst.performer = new ArrayList<ChargeItemPerformerComponent>();
2253          for (ChargeItemPerformerComponent i : performer)
2254            dst.performer.add(i.copy());
2255        };
2256        dst.performingOrganization = performingOrganization == null ? null : performingOrganization.copy();
2257        dst.requestingOrganization = requestingOrganization == null ? null : requestingOrganization.copy();
2258        dst.costCenter = costCenter == null ? null : costCenter.copy();
2259        dst.quantity = quantity == null ? null : quantity.copy();
2260        if (bodysite != null) {
2261          dst.bodysite = new ArrayList<CodeableConcept>();
2262          for (CodeableConcept i : bodysite)
2263            dst.bodysite.add(i.copy());
2264        };
2265        dst.factorOverride = factorOverride == null ? null : factorOverride.copy();
2266        dst.priceOverride = priceOverride == null ? null : priceOverride.copy();
2267        dst.overrideReason = overrideReason == null ? null : overrideReason.copy();
2268        dst.enterer = enterer == null ? null : enterer.copy();
2269        dst.enteredDate = enteredDate == null ? null : enteredDate.copy();
2270        if (reason != null) {
2271          dst.reason = new ArrayList<CodeableConcept>();
2272          for (CodeableConcept i : reason)
2273            dst.reason.add(i.copy());
2274        };
2275        if (service != null) {
2276          dst.service = new ArrayList<Reference>();
2277          for (Reference i : service)
2278            dst.service.add(i.copy());
2279        };
2280        if (product != null) {
2281          dst.product = new ArrayList<CodeableReference>();
2282          for (CodeableReference i : product)
2283            dst.product.add(i.copy());
2284        };
2285        if (account != null) {
2286          dst.account = new ArrayList<Reference>();
2287          for (Reference i : account)
2288            dst.account.add(i.copy());
2289        };
2290        if (note != null) {
2291          dst.note = new ArrayList<Annotation>();
2292          for (Annotation i : note)
2293            dst.note.add(i.copy());
2294        };
2295        if (supportingInformation != null) {
2296          dst.supportingInformation = new ArrayList<Reference>();
2297          for (Reference i : supportingInformation)
2298            dst.supportingInformation.add(i.copy());
2299        };
2300      }
2301
2302      protected ChargeItem typedCopy() {
2303        return copy();
2304      }
2305
2306      @Override
2307      public boolean equalsDeep(Base other_) {
2308        if (!super.equalsDeep(other_))
2309          return false;
2310        if (!(other_ instanceof ChargeItem))
2311          return false;
2312        ChargeItem o = (ChargeItem) other_;
2313        return compareDeep(identifier, o.identifier, true) && compareDeep(definitionUri, o.definitionUri, true)
2314           && compareDeep(definitionCanonical, o.definitionCanonical, true) && compareDeep(status, o.status, true)
2315           && compareDeep(partOf, o.partOf, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true)
2316           && compareDeep(context, o.context, true) && compareDeep(occurrence, o.occurrence, true) && compareDeep(performer, o.performer, true)
2317           && compareDeep(performingOrganization, o.performingOrganization, true) && compareDeep(requestingOrganization, o.requestingOrganization, true)
2318           && compareDeep(costCenter, o.costCenter, true) && compareDeep(quantity, o.quantity, true) && compareDeep(bodysite, o.bodysite, true)
2319           && compareDeep(factorOverride, o.factorOverride, true) && compareDeep(priceOverride, o.priceOverride, true)
2320           && compareDeep(overrideReason, o.overrideReason, true) && compareDeep(enterer, o.enterer, true)
2321           && compareDeep(enteredDate, o.enteredDate, true) && compareDeep(reason, o.reason, true) && compareDeep(service, o.service, true)
2322           && compareDeep(product, o.product, true) && compareDeep(account, o.account, true) && compareDeep(note, o.note, true)
2323           && compareDeep(supportingInformation, o.supportingInformation, true);
2324      }
2325
2326      @Override
2327      public boolean equalsShallow(Base other_) {
2328        if (!super.equalsShallow(other_))
2329          return false;
2330        if (!(other_ instanceof ChargeItem))
2331          return false;
2332        ChargeItem o = (ChargeItem) other_;
2333        return compareValues(definitionUri, o.definitionUri, true) && compareValues(definitionCanonical, o.definitionCanonical, true)
2334           && compareValues(status, o.status, true) && compareValues(factorOverride, o.factorOverride, true) && compareValues(overrideReason, o.overrideReason, true)
2335           && compareValues(enteredDate, o.enteredDate, true);
2336      }
2337
2338      public boolean isEmpty() {
2339        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definitionUri
2340          , definitionCanonical, status, partOf, code, subject, context, occurrence, performer
2341          , performingOrganization, requestingOrganization, costCenter, quantity, bodysite, factorOverride
2342          , priceOverride, overrideReason, enterer, enteredDate, reason, service, product
2343          , account, note, supportingInformation);
2344      }
2345
2346  @Override
2347  public ResourceType getResourceType() {
2348    return ResourceType.ChargeItem;
2349   }
2350
2351 /**
2352   * Search parameter: <b>account</b>
2353   * <p>
2354   * Description: <b>Account to place this charge</b><br>
2355   * Type: <b>reference</b><br>
2356   * Path: <b>ChargeItem.account</b><br>
2357   * </p>
2358   */
2359  @SearchParamDefinition(name="account", path="ChargeItem.account", description="Account to place this charge", type="reference", target={Account.class } )
2360  public static final String SP_ACCOUNT = "account";
2361 /**
2362   * <b>Fluent Client</b> search parameter constant for <b>account</b>
2363   * <p>
2364   * Description: <b>Account to place this charge</b><br>
2365   * Type: <b>reference</b><br>
2366   * Path: <b>ChargeItem.account</b><br>
2367   * </p>
2368   */
2369  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACCOUNT);
2370
2371/**
2372   * Constant for fluent queries to be used to add include statements. Specifies
2373   * the path value of "<b>ChargeItem:account</b>".
2374   */
2375  public static final ca.uhn.fhir.model.api.Include INCLUDE_ACCOUNT = new ca.uhn.fhir.model.api.Include("ChargeItem:account").toLocked();
2376
2377 /**
2378   * Search parameter: <b>code</b>
2379   * <p>
2380   * Description: <b>A code that identifies the charge, like a billing code</b><br>
2381   * Type: <b>token</b><br>
2382   * Path: <b>ChargeItem.code</b><br>
2383   * </p>
2384   */
2385  @SearchParamDefinition(name="code", path="ChargeItem.code", description="A code that identifies the charge, like a billing code", type="token" )
2386  public static final String SP_CODE = "code";
2387 /**
2388   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2389   * <p>
2390   * Description: <b>A code that identifies the charge, like a billing code</b><br>
2391   * Type: <b>token</b><br>
2392   * Path: <b>ChargeItem.code</b><br>
2393   * </p>
2394   */
2395  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2396
2397 /**
2398   * Search parameter: <b>context</b>
2399   * <p>
2400   * Description: <b>Encounter / Episode associated with event</b><br>
2401   * Type: <b>reference</b><br>
2402   * Path: <b>ChargeItem.context</b><br>
2403   * </p>
2404   */
2405  @SearchParamDefinition(name="context", path="ChargeItem.context", description="Encounter / Episode associated with event", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class, EpisodeOfCare.class } )
2406  public static final String SP_CONTEXT = "context";
2407 /**
2408   * <b>Fluent Client</b> search parameter constant for <b>context</b>
2409   * <p>
2410   * Description: <b>Encounter / Episode associated with event</b><br>
2411   * Type: <b>reference</b><br>
2412   * Path: <b>ChargeItem.context</b><br>
2413   * </p>
2414   */
2415  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT);
2416
2417/**
2418   * Constant for fluent queries to be used to add include statements. Specifies
2419   * the path value of "<b>ChargeItem:context</b>".
2420   */
2421  public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("ChargeItem:context").toLocked();
2422
2423 /**
2424   * Search parameter: <b>entered-date</b>
2425   * <p>
2426   * Description: <b>Date the charge item was entered</b><br>
2427   * Type: <b>date</b><br>
2428   * Path: <b>ChargeItem.enteredDate</b><br>
2429   * </p>
2430   */
2431  @SearchParamDefinition(name="entered-date", path="ChargeItem.enteredDate", description="Date the charge item was entered", type="date" )
2432  public static final String SP_ENTERED_DATE = "entered-date";
2433 /**
2434   * <b>Fluent Client</b> search parameter constant for <b>entered-date</b>
2435   * <p>
2436   * Description: <b>Date the charge item was entered</b><br>
2437   * Type: <b>date</b><br>
2438   * Path: <b>ChargeItem.enteredDate</b><br>
2439   * </p>
2440   */
2441  public static final ca.uhn.fhir.rest.gclient.DateClientParam ENTERED_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ENTERED_DATE);
2442
2443 /**
2444   * Search parameter: <b>enterer</b>
2445   * <p>
2446   * Description: <b>Individual who was entering</b><br>
2447   * Type: <b>reference</b><br>
2448   * Path: <b>ChargeItem.enterer</b><br>
2449   * </p>
2450   */
2451  @SearchParamDefinition(name="enterer", path="ChargeItem.enterer", description="Individual who was entering", 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 Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2452  public static final String SP_ENTERER = "enterer";
2453 /**
2454   * <b>Fluent Client</b> search parameter constant for <b>enterer</b>
2455   * <p>
2456   * Description: <b>Individual who was entering</b><br>
2457   * Type: <b>reference</b><br>
2458   * Path: <b>ChargeItem.enterer</b><br>
2459   * </p>
2460   */
2461  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTERER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTERER);
2462
2463/**
2464   * Constant for fluent queries to be used to add include statements. Specifies
2465   * the path value of "<b>ChargeItem:enterer</b>".
2466   */
2467  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTERER = new ca.uhn.fhir.model.api.Include("ChargeItem:enterer").toLocked();
2468
2469 /**
2470   * Search parameter: <b>factor-override</b>
2471   * <p>
2472   * Description: <b>Factor overriding the associated rules</b><br>
2473   * Type: <b>number</b><br>
2474   * Path: <b>ChargeItem.factorOverride</b><br>
2475   * </p>
2476   */
2477  @SearchParamDefinition(name="factor-override", path="ChargeItem.factorOverride", description="Factor overriding the associated rules", type="number" )
2478  public static final String SP_FACTOR_OVERRIDE = "factor-override";
2479 /**
2480   * <b>Fluent Client</b> search parameter constant for <b>factor-override</b>
2481   * <p>
2482   * Description: <b>Factor overriding the associated rules</b><br>
2483   * Type: <b>number</b><br>
2484   * Path: <b>ChargeItem.factorOverride</b><br>
2485   * </p>
2486   */
2487  public static final ca.uhn.fhir.rest.gclient.NumberClientParam FACTOR_OVERRIDE = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_FACTOR_OVERRIDE);
2488
2489 /**
2490   * Search parameter: <b>identifier</b>
2491   * <p>
2492   * Description: <b>Business Identifier for item</b><br>
2493   * Type: <b>token</b><br>
2494   * Path: <b>ChargeItem.identifier</b><br>
2495   * </p>
2496   */
2497  @SearchParamDefinition(name="identifier", path="ChargeItem.identifier", description="Business Identifier for item", type="token" )
2498  public static final String SP_IDENTIFIER = "identifier";
2499 /**
2500   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2501   * <p>
2502   * Description: <b>Business Identifier for item</b><br>
2503   * Type: <b>token</b><br>
2504   * Path: <b>ChargeItem.identifier</b><br>
2505   * </p>
2506   */
2507  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2508
2509 /**
2510   * Search parameter: <b>occurrence</b>
2511   * <p>
2512   * Description: <b>When the charged service was applied</b><br>
2513   * Type: <b>date</b><br>
2514   * Path: <b>ChargeItem.occurrence</b><br>
2515   * </p>
2516   */
2517  @SearchParamDefinition(name="occurrence", path="ChargeItem.occurrence", description="When the charged service was applied", type="date" )
2518  public static final String SP_OCCURRENCE = "occurrence";
2519 /**
2520   * <b>Fluent Client</b> search parameter constant for <b>occurrence</b>
2521   * <p>
2522   * Description: <b>When the charged service was applied</b><br>
2523   * Type: <b>date</b><br>
2524   * Path: <b>ChargeItem.occurrence</b><br>
2525   * </p>
2526   */
2527  public static final ca.uhn.fhir.rest.gclient.DateClientParam OCCURRENCE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_OCCURRENCE);
2528
2529 /**
2530   * Search parameter: <b>patient</b>
2531   * <p>
2532   * Description: <b>Individual service was done for/to</b><br>
2533   * Type: <b>reference</b><br>
2534   * Path: <b>ChargeItem.subject.where(resolve() is Patient)</b><br>
2535   * </p>
2536   */
2537  @SearchParamDefinition(name="patient", path="ChargeItem.subject.where(resolve() is Patient)", description="Individual service was done for/to", type="reference", target={Patient.class } )
2538  public static final String SP_PATIENT = "patient";
2539 /**
2540   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2541   * <p>
2542   * Description: <b>Individual service was done for/to</b><br>
2543   * Type: <b>reference</b><br>
2544   * Path: <b>ChargeItem.subject.where(resolve() is Patient)</b><br>
2545   * </p>
2546   */
2547  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2548
2549/**
2550   * Constant for fluent queries to be used to add include statements. Specifies
2551   * the path value of "<b>ChargeItem:patient</b>".
2552   */
2553  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ChargeItem:patient").toLocked();
2554
2555 /**
2556   * Search parameter: <b>performer-actor</b>
2557   * <p>
2558   * Description: <b>Individual who was performing</b><br>
2559   * Type: <b>reference</b><br>
2560   * Path: <b>ChargeItem.performer.actor</b><br>
2561   * </p>
2562   */
2563  @SearchParamDefinition(name="performer-actor", path="ChargeItem.performer.actor", description="Individual who was performing", 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 Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2564  public static final String SP_PERFORMER_ACTOR = "performer-actor";
2565 /**
2566   * <b>Fluent Client</b> search parameter constant for <b>performer-actor</b>
2567   * <p>
2568   * Description: <b>Individual who was performing</b><br>
2569   * Type: <b>reference</b><br>
2570   * Path: <b>ChargeItem.performer.actor</b><br>
2571   * </p>
2572   */
2573  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER_ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER_ACTOR);
2574
2575/**
2576   * Constant for fluent queries to be used to add include statements. Specifies
2577   * the path value of "<b>ChargeItem:performer-actor</b>".
2578   */
2579  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER_ACTOR = new ca.uhn.fhir.model.api.Include("ChargeItem:performer-actor").toLocked();
2580
2581 /**
2582   * Search parameter: <b>performer-function</b>
2583   * <p>
2584   * Description: <b>What type of performance was done</b><br>
2585   * Type: <b>token</b><br>
2586   * Path: <b>ChargeItem.performer.function</b><br>
2587   * </p>
2588   */
2589  @SearchParamDefinition(name="performer-function", path="ChargeItem.performer.function", description="What type of performance was done", type="token" )
2590  public static final String SP_PERFORMER_FUNCTION = "performer-function";
2591 /**
2592   * <b>Fluent Client</b> search parameter constant for <b>performer-function</b>
2593   * <p>
2594   * Description: <b>What type of performance was done</b><br>
2595   * Type: <b>token</b><br>
2596   * Path: <b>ChargeItem.performer.function</b><br>
2597   * </p>
2598   */
2599  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER_FUNCTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER_FUNCTION);
2600
2601 /**
2602   * Search parameter: <b>performing-organization</b>
2603   * <p>
2604   * Description: <b>Organization providing the charged service</b><br>
2605   * Type: <b>reference</b><br>
2606   * Path: <b>ChargeItem.performingOrganization</b><br>
2607   * </p>
2608   */
2609  @SearchParamDefinition(name="performing-organization", path="ChargeItem.performingOrganization", description="Organization providing the charged service", type="reference", target={Organization.class } )
2610  public static final String SP_PERFORMING_ORGANIZATION = "performing-organization";
2611 /**
2612   * <b>Fluent Client</b> search parameter constant for <b>performing-organization</b>
2613   * <p>
2614   * Description: <b>Organization providing the charged service</b><br>
2615   * Type: <b>reference</b><br>
2616   * Path: <b>ChargeItem.performingOrganization</b><br>
2617   * </p>
2618   */
2619  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMING_ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMING_ORGANIZATION);
2620
2621/**
2622   * Constant for fluent queries to be used to add include statements. Specifies
2623   * the path value of "<b>ChargeItem:performing-organization</b>".
2624   */
2625  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMING_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ChargeItem:performing-organization").toLocked();
2626
2627 /**
2628   * Search parameter: <b>price-override</b>
2629   * <p>
2630   * Description: <b>Price overriding the associated rules</b><br>
2631   * Type: <b>quantity</b><br>
2632   * Path: <b>ChargeItem.priceOverride</b><br>
2633   * </p>
2634   */
2635  @SearchParamDefinition(name="price-override", path="ChargeItem.priceOverride", description="Price overriding the associated rules", type="quantity" )
2636  public static final String SP_PRICE_OVERRIDE = "price-override";
2637 /**
2638   * <b>Fluent Client</b> search parameter constant for <b>price-override</b>
2639   * <p>
2640   * Description: <b>Price overriding the associated rules</b><br>
2641   * Type: <b>quantity</b><br>
2642   * Path: <b>ChargeItem.priceOverride</b><br>
2643   * </p>
2644   */
2645  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam PRICE_OVERRIDE = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_PRICE_OVERRIDE);
2646
2647 /**
2648   * Search parameter: <b>quantity</b>
2649   * <p>
2650   * Description: <b>Quantity of which the charge item has been serviced</b><br>
2651   * Type: <b>quantity</b><br>
2652   * Path: <b>ChargeItem.quantity</b><br>
2653   * </p>
2654   */
2655  @SearchParamDefinition(name="quantity", path="ChargeItem.quantity", description="Quantity of which the charge item has been serviced", type="quantity" )
2656  public static final String SP_QUANTITY = "quantity";
2657 /**
2658   * <b>Fluent Client</b> search parameter constant for <b>quantity</b>
2659   * <p>
2660   * Description: <b>Quantity of which the charge item has been serviced</b><br>
2661   * Type: <b>quantity</b><br>
2662   * Path: <b>ChargeItem.quantity</b><br>
2663   * </p>
2664   */
2665  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_QUANTITY);
2666
2667 /**
2668   * Search parameter: <b>requesting-organization</b>
2669   * <p>
2670   * Description: <b>Organization requesting the charged service</b><br>
2671   * Type: <b>reference</b><br>
2672   * Path: <b>ChargeItem.requestingOrganization</b><br>
2673   * </p>
2674   */
2675  @SearchParamDefinition(name="requesting-organization", path="ChargeItem.requestingOrganization", description="Organization requesting the charged service", type="reference", target={Organization.class } )
2676  public static final String SP_REQUESTING_ORGANIZATION = "requesting-organization";
2677 /**
2678   * <b>Fluent Client</b> search parameter constant for <b>requesting-organization</b>
2679   * <p>
2680   * Description: <b>Organization requesting the charged service</b><br>
2681   * Type: <b>reference</b><br>
2682   * Path: <b>ChargeItem.requestingOrganization</b><br>
2683   * </p>
2684   */
2685  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTING_ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTING_ORGANIZATION);
2686
2687/**
2688   * Constant for fluent queries to be used to add include statements. Specifies
2689   * the path value of "<b>ChargeItem:requesting-organization</b>".
2690   */
2691  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTING_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ChargeItem:requesting-organization").toLocked();
2692
2693 /**
2694   * Search parameter: <b>service</b>
2695   * <p>
2696   * Description: <b>Which rendered service is being charged?</b><br>
2697   * Type: <b>reference</b><br>
2698   * Path: <b>ChargeItem.service</b><br>
2699   * </p>
2700   */
2701  @SearchParamDefinition(name="service", path="ChargeItem.service", description="Which rendered service is being charged?", type="reference", target={DiagnosticReport.class, ImagingStudy.class, Immunization.class, MedicationAdministration.class, MedicationDispense.class, Observation.class, Procedure.class, SupplyDelivery.class } )
2702  public static final String SP_SERVICE = "service";
2703 /**
2704   * <b>Fluent Client</b> search parameter constant for <b>service</b>
2705   * <p>
2706   * Description: <b>Which rendered service is being charged?</b><br>
2707   * Type: <b>reference</b><br>
2708   * Path: <b>ChargeItem.service</b><br>
2709   * </p>
2710   */
2711  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE);
2712
2713/**
2714   * Constant for fluent queries to be used to add include statements. Specifies
2715   * the path value of "<b>ChargeItem:service</b>".
2716   */
2717  public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE = new ca.uhn.fhir.model.api.Include("ChargeItem:service").toLocked();
2718
2719 /**
2720   * Search parameter: <b>subject</b>
2721   * <p>
2722   * Description: <b>Individual service was done for/to</b><br>
2723   * Type: <b>reference</b><br>
2724   * Path: <b>ChargeItem.subject</b><br>
2725   * </p>
2726   */
2727  @SearchParamDefinition(name="subject", path="ChargeItem.subject", description="Individual service was done for/to", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } )
2728  public static final String SP_SUBJECT = "subject";
2729 /**
2730   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2731   * <p>
2732   * Description: <b>Individual service was done for/to</b><br>
2733   * Type: <b>reference</b><br>
2734   * Path: <b>ChargeItem.subject</b><br>
2735   * </p>
2736   */
2737  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2738
2739/**
2740   * Constant for fluent queries to be used to add include statements. Specifies
2741   * the path value of "<b>ChargeItem:subject</b>".
2742   */
2743  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ChargeItem:subject").toLocked();
2744
2745
2746}
2747