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