001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034import java.util.*;
035
036import java.math.*;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4.model.Enumerations.*;
039import ca.uhn.fhir.model.api.annotation.ResourceDef;
040import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
041import ca.uhn.fhir.model.api.annotation.Child;
042import ca.uhn.fhir.model.api.annotation.ChildOrder;
043import ca.uhn.fhir.model.api.annotation.Description;
044import ca.uhn.fhir.model.api.annotation.Block;
045import org.hl7.fhir.instance.model.api.*;
046import org.hl7.fhir.exceptions.FHIRException;
047/**
048 * The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.
049 */
050@ResourceDef(name="ChargeItemDefinition", profile="http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition")
051@ChildOrder(names={"url", "identifier", "version", "title", "derivedFromUri", "partOf", "replaces", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "copyright", "approvalDate", "lastReviewDate", "effectivePeriod", "code", "instance", "applicability", "propertyGroup"})
052public class ChargeItemDefinition extends MetadataResource {
053
054    public enum ChargeItemDefinitionPriceComponentType {
055        /**
056         * the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.
057         */
058        BASE, 
059        /**
060         * the amount is a surcharge applied on the base price.
061         */
062        SURCHARGE, 
063        /**
064         * the amount is a deduction applied on the base price.
065         */
066        DEDUCTION, 
067        /**
068         * the amount is a discount applied on the base price.
069         */
070        DISCOUNT, 
071        /**
072         * the amount is the tax component of the total price.
073         */
074        TAX, 
075        /**
076         * the amount is of informational character, it has not been applied in the calculation of the total price.
077         */
078        INFORMATIONAL, 
079        /**
080         * added to help the parsers with the generic types
081         */
082        NULL;
083        public static ChargeItemDefinitionPriceComponentType fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("base".equals(codeString))
087          return BASE;
088        if ("surcharge".equals(codeString))
089          return SURCHARGE;
090        if ("deduction".equals(codeString))
091          return DEDUCTION;
092        if ("discount".equals(codeString))
093          return DISCOUNT;
094        if ("tax".equals(codeString))
095          return TAX;
096        if ("informational".equals(codeString))
097          return INFORMATIONAL;
098        if (Configuration.isAcceptInvalidEnums())
099          return null;
100        else
101          throw new FHIRException("Unknown ChargeItemDefinitionPriceComponentType code '"+codeString+"'");
102        }
103        public String toCode() {
104          switch (this) {
105            case BASE: return "base";
106            case SURCHARGE: return "surcharge";
107            case DEDUCTION: return "deduction";
108            case DISCOUNT: return "discount";
109            case TAX: return "tax";
110            case INFORMATIONAL: return "informational";
111            default: return "?";
112          }
113        }
114        public String getSystem() {
115          switch (this) {
116            case BASE: return "http://hl7.org/fhir/invoice-priceComponentType";
117            case SURCHARGE: return "http://hl7.org/fhir/invoice-priceComponentType";
118            case DEDUCTION: return "http://hl7.org/fhir/invoice-priceComponentType";
119            case DISCOUNT: return "http://hl7.org/fhir/invoice-priceComponentType";
120            case TAX: return "http://hl7.org/fhir/invoice-priceComponentType";
121            case INFORMATIONAL: return "http://hl7.org/fhir/invoice-priceComponentType";
122            default: return "?";
123          }
124        }
125        public String getDefinition() {
126          switch (this) {
127            case BASE: return "the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.";
128            case SURCHARGE: return "the amount is a surcharge applied on the base price.";
129            case DEDUCTION: return "the amount is a deduction applied on the base price.";
130            case DISCOUNT: return "the amount is a discount applied on the base price.";
131            case TAX: return "the amount is the tax component of the total price.";
132            case INFORMATIONAL: return "the amount is of informational character, it has not been applied in the calculation of the total price.";
133            default: return "?";
134          }
135        }
136        public String getDisplay() {
137          switch (this) {
138            case BASE: return "base price";
139            case SURCHARGE: return "surcharge";
140            case DEDUCTION: return "deduction";
141            case DISCOUNT: return "discount";
142            case TAX: return "tax";
143            case INFORMATIONAL: return "informational";
144            default: return "?";
145          }
146        }
147    }
148
149  public static class ChargeItemDefinitionPriceComponentTypeEnumFactory implements EnumFactory<ChargeItemDefinitionPriceComponentType> {
150    public ChargeItemDefinitionPriceComponentType fromCode(String codeString) throws IllegalArgumentException {
151      if (codeString == null || "".equals(codeString))
152            if (codeString == null || "".equals(codeString))
153                return null;
154        if ("base".equals(codeString))
155          return ChargeItemDefinitionPriceComponentType.BASE;
156        if ("surcharge".equals(codeString))
157          return ChargeItemDefinitionPriceComponentType.SURCHARGE;
158        if ("deduction".equals(codeString))
159          return ChargeItemDefinitionPriceComponentType.DEDUCTION;
160        if ("discount".equals(codeString))
161          return ChargeItemDefinitionPriceComponentType.DISCOUNT;
162        if ("tax".equals(codeString))
163          return ChargeItemDefinitionPriceComponentType.TAX;
164        if ("informational".equals(codeString))
165          return ChargeItemDefinitionPriceComponentType.INFORMATIONAL;
166        throw new IllegalArgumentException("Unknown ChargeItemDefinitionPriceComponentType code '"+codeString+"'");
167        }
168        public Enumeration<ChargeItemDefinitionPriceComponentType> fromType(Base code) throws FHIRException {
169          if (code == null)
170            return null;
171          if (code.isEmpty())
172            return new Enumeration<ChargeItemDefinitionPriceComponentType>(this);
173          String codeString = ((PrimitiveType) code).asStringValue();
174          if (codeString == null || "".equals(codeString))
175            return null;
176        if ("base".equals(codeString))
177          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.BASE);
178        if ("surcharge".equals(codeString))
179          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.SURCHARGE);
180        if ("deduction".equals(codeString))
181          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.DEDUCTION);
182        if ("discount".equals(codeString))
183          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.DISCOUNT);
184        if ("tax".equals(codeString))
185          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.TAX);
186        if ("informational".equals(codeString))
187          return new Enumeration<ChargeItemDefinitionPriceComponentType>(this, ChargeItemDefinitionPriceComponentType.INFORMATIONAL);
188        throw new FHIRException("Unknown ChargeItemDefinitionPriceComponentType code '"+codeString+"'");
189        }
190    public String toCode(ChargeItemDefinitionPriceComponentType code) {
191      if (code == ChargeItemDefinitionPriceComponentType.BASE)
192        return "base";
193      if (code == ChargeItemDefinitionPriceComponentType.SURCHARGE)
194        return "surcharge";
195      if (code == ChargeItemDefinitionPriceComponentType.DEDUCTION)
196        return "deduction";
197      if (code == ChargeItemDefinitionPriceComponentType.DISCOUNT)
198        return "discount";
199      if (code == ChargeItemDefinitionPriceComponentType.TAX)
200        return "tax";
201      if (code == ChargeItemDefinitionPriceComponentType.INFORMATIONAL)
202        return "informational";
203      return "?";
204      }
205    public String toSystem(ChargeItemDefinitionPriceComponentType code) {
206      return code.getSystem();
207      }
208    }
209
210    @Block()
211    public static class ChargeItemDefinitionApplicabilityComponent extends BackboneElement implements IBaseBackboneElement {
212        /**
213         * A brief, natural language description of the condition that effectively communicates the intended semantics.
214         */
215        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
216        @Description(shortDefinition="Natural language description of the condition", formalDefinition="A brief, natural language description of the condition that effectively communicates the intended semantics." )
217        protected StringType description;
218
219        /**
220         * The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.
221         */
222        @Child(name = "language", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
223        @Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression, e.g. \"text/cql\" for Clinical Query Language expressions or \"text/fhirpath\" for FHIRPath expressions." )
224        protected StringType language;
225
226        /**
227         * An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.
228         */
229        @Child(name = "expression", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
230        @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied." )
231        protected StringType expression;
232
233        private static final long serialVersionUID = 1354288281L;
234
235    /**
236     * Constructor
237     */
238      public ChargeItemDefinitionApplicabilityComponent() {
239        super();
240      }
241
242        /**
243         * @return {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
244         */
245        public StringType getDescriptionElement() { 
246          if (this.description == null)
247            if (Configuration.errorOnAutoCreate())
248              throw new Error("Attempt to auto-create ChargeItemDefinitionApplicabilityComponent.description");
249            else if (Configuration.doAutoCreate())
250              this.description = new StringType(); // bb
251          return this.description;
252        }
253
254        public boolean hasDescriptionElement() { 
255          return this.description != null && !this.description.isEmpty();
256        }
257
258        public boolean hasDescription() { 
259          return this.description != null && !this.description.isEmpty();
260        }
261
262        /**
263         * @param value {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
264         */
265        public ChargeItemDefinitionApplicabilityComponent setDescriptionElement(StringType value) { 
266          this.description = value;
267          return this;
268        }
269
270        /**
271         * @return A brief, natural language description of the condition that effectively communicates the intended semantics.
272         */
273        public String getDescription() { 
274          return this.description == null ? null : this.description.getValue();
275        }
276
277        /**
278         * @param value A brief, natural language description of the condition that effectively communicates the intended semantics.
279         */
280        public ChargeItemDefinitionApplicabilityComponent setDescription(String value) { 
281          if (Utilities.noString(value))
282            this.description = null;
283          else {
284            if (this.description == null)
285              this.description = new StringType();
286            this.description.setValue(value);
287          }
288          return this;
289        }
290
291        /**
292         * @return {@link #language} (The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
293         */
294        public StringType getLanguageElement() { 
295          if (this.language == null)
296            if (Configuration.errorOnAutoCreate())
297              throw new Error("Attempt to auto-create ChargeItemDefinitionApplicabilityComponent.language");
298            else if (Configuration.doAutoCreate())
299              this.language = new StringType(); // bb
300          return this.language;
301        }
302
303        public boolean hasLanguageElement() { 
304          return this.language != null && !this.language.isEmpty();
305        }
306
307        public boolean hasLanguage() { 
308          return this.language != null && !this.language.isEmpty();
309        }
310
311        /**
312         * @param value {@link #language} (The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
313         */
314        public ChargeItemDefinitionApplicabilityComponent setLanguageElement(StringType value) { 
315          this.language = value;
316          return this;
317        }
318
319        /**
320         * @return The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.
321         */
322        public String getLanguage() { 
323          return this.language == null ? null : this.language.getValue();
324        }
325
326        /**
327         * @param value The media type of the language for the expression, e.g. "text/cql" for Clinical Query Language expressions or "text/fhirpath" for FHIRPath expressions.
328         */
329        public ChargeItemDefinitionApplicabilityComponent setLanguage(String value) { 
330          if (Utilities.noString(value))
331            this.language = null;
332          else {
333            if (this.language == null)
334              this.language = new StringType();
335            this.language.setValue(value);
336          }
337          return this;
338        }
339
340        /**
341         * @return {@link #expression} (An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
342         */
343        public StringType getExpressionElement() { 
344          if (this.expression == null)
345            if (Configuration.errorOnAutoCreate())
346              throw new Error("Attempt to auto-create ChargeItemDefinitionApplicabilityComponent.expression");
347            else if (Configuration.doAutoCreate())
348              this.expression = new StringType(); // bb
349          return this.expression;
350        }
351
352        public boolean hasExpressionElement() { 
353          return this.expression != null && !this.expression.isEmpty();
354        }
355
356        public boolean hasExpression() { 
357          return this.expression != null && !this.expression.isEmpty();
358        }
359
360        /**
361         * @param value {@link #expression} (An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
362         */
363        public ChargeItemDefinitionApplicabilityComponent setExpressionElement(StringType value) { 
364          this.expression = value;
365          return this;
366        }
367
368        /**
369         * @return An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.
370         */
371        public String getExpression() { 
372          return this.expression == null ? null : this.expression.getValue();
373        }
374
375        /**
376         * @param value An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.
377         */
378        public ChargeItemDefinitionApplicabilityComponent setExpression(String value) { 
379          if (Utilities.noString(value))
380            this.expression = null;
381          else {
382            if (this.expression == null)
383              this.expression = new StringType();
384            this.expression.setValue(value);
385          }
386          return this;
387        }
388
389        protected void listChildren(List<Property> children) {
390          super.listChildren(children);
391          children.add(new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description));
392          children.add(new Property("language", "string", "The media type of the language for the expression, e.g. \"text/cql\" for Clinical Query Language expressions or \"text/fhirpath\" for FHIRPath expressions.", 0, 1, language));
393          children.add(new Property("expression", "string", "An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.", 0, 1, expression));
394        }
395
396        @Override
397        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
398          switch (_hash) {
399          case -1724546052: /*description*/  return new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description);
400          case -1613589672: /*language*/  return new Property("language", "string", "The media type of the language for the expression, e.g. \"text/cql\" for Clinical Query Language expressions or \"text/fhirpath\" for FHIRPath expressions.", 0, 1, language);
401          case -1795452264: /*expression*/  return new Property("expression", "string", "An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context evironment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.", 0, 1, expression);
402          default: return super.getNamedProperty(_hash, _name, _checkValid);
403          }
404
405        }
406
407      @Override
408      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
409        switch (hash) {
410        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
411        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // StringType
412        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
413        default: return super.getProperty(hash, name, checkValid);
414        }
415
416      }
417
418      @Override
419      public Base setProperty(int hash, String name, Base value) throws FHIRException {
420        switch (hash) {
421        case -1724546052: // description
422          this.description = castToString(value); // StringType
423          return value;
424        case -1613589672: // language
425          this.language = castToString(value); // StringType
426          return value;
427        case -1795452264: // expression
428          this.expression = castToString(value); // StringType
429          return value;
430        default: return super.setProperty(hash, name, value);
431        }
432
433      }
434
435      @Override
436      public Base setProperty(String name, Base value) throws FHIRException {
437        if (name.equals("description")) {
438          this.description = castToString(value); // StringType
439        } else if (name.equals("language")) {
440          this.language = castToString(value); // StringType
441        } else if (name.equals("expression")) {
442          this.expression = castToString(value); // StringType
443        } else
444          return super.setProperty(name, value);
445        return value;
446      }
447
448      @Override
449      public Base makeProperty(int hash, String name) throws FHIRException {
450        switch (hash) {
451        case -1724546052:  return getDescriptionElement();
452        case -1613589672:  return getLanguageElement();
453        case -1795452264:  return getExpressionElement();
454        default: return super.makeProperty(hash, name);
455        }
456
457      }
458
459      @Override
460      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
461        switch (hash) {
462        case -1724546052: /*description*/ return new String[] {"string"};
463        case -1613589672: /*language*/ return new String[] {"string"};
464        case -1795452264: /*expression*/ return new String[] {"string"};
465        default: return super.getTypesForProperty(hash, name);
466        }
467
468      }
469
470      @Override
471      public Base addChild(String name) throws FHIRException {
472        if (name.equals("description")) {
473          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.description");
474        }
475        else if (name.equals("language")) {
476          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.language");
477        }
478        else if (name.equals("expression")) {
479          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.expression");
480        }
481        else
482          return super.addChild(name);
483      }
484
485      public ChargeItemDefinitionApplicabilityComponent copy() {
486        ChargeItemDefinitionApplicabilityComponent dst = new ChargeItemDefinitionApplicabilityComponent();
487        copyValues(dst);
488        dst.description = description == null ? null : description.copy();
489        dst.language = language == null ? null : language.copy();
490        dst.expression = expression == null ? null : expression.copy();
491        return dst;
492      }
493
494      @Override
495      public boolean equalsDeep(Base other_) {
496        if (!super.equalsDeep(other_))
497          return false;
498        if (!(other_ instanceof ChargeItemDefinitionApplicabilityComponent))
499          return false;
500        ChargeItemDefinitionApplicabilityComponent o = (ChargeItemDefinitionApplicabilityComponent) other_;
501        return compareDeep(description, o.description, true) && compareDeep(language, o.language, true)
502           && compareDeep(expression, o.expression, true);
503      }
504
505      @Override
506      public boolean equalsShallow(Base other_) {
507        if (!super.equalsShallow(other_))
508          return false;
509        if (!(other_ instanceof ChargeItemDefinitionApplicabilityComponent))
510          return false;
511        ChargeItemDefinitionApplicabilityComponent o = (ChargeItemDefinitionApplicabilityComponent) other_;
512        return compareValues(description, o.description, true) && compareValues(language, o.language, true)
513           && compareValues(expression, o.expression, true);
514      }
515
516      public boolean isEmpty() {
517        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, language, expression
518          );
519      }
520
521  public String fhirType() {
522    return "ChargeItemDefinition.applicability";
523
524  }
525
526  }
527
528    @Block()
529    public static class ChargeItemDefinitionPropertyGroupComponent extends BackboneElement implements IBaseBackboneElement {
530        /**
531         * Expressions that describe applicability criteria for the priceComponent.
532         */
533        @Child(name = "applicability", type = {ChargeItemDefinitionApplicabilityComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
534        @Description(shortDefinition="Conditions under which the priceComponent is applicable", formalDefinition="Expressions that describe applicability criteria for the priceComponent." )
535        protected List<ChargeItemDefinitionApplicabilityComponent> applicability;
536
537        /**
538         * The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under developement. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.
539         */
540        @Child(name = "priceComponent", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
541        @Description(shortDefinition="Components of total line item price", formalDefinition="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under developement. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated." )
542        protected List<ChargeItemDefinitionPropertyGroupPriceComponentComponent> priceComponent;
543
544        private static final long serialVersionUID = 1723436176L;
545
546    /**
547     * Constructor
548     */
549      public ChargeItemDefinitionPropertyGroupComponent() {
550        super();
551      }
552
553        /**
554         * @return {@link #applicability} (Expressions that describe applicability criteria for the priceComponent.)
555         */
556        public List<ChargeItemDefinitionApplicabilityComponent> getApplicability() { 
557          if (this.applicability == null)
558            this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
559          return this.applicability;
560        }
561
562        /**
563         * @return Returns a reference to <code>this</code> for easy method chaining
564         */
565        public ChargeItemDefinitionPropertyGroupComponent setApplicability(List<ChargeItemDefinitionApplicabilityComponent> theApplicability) { 
566          this.applicability = theApplicability;
567          return this;
568        }
569
570        public boolean hasApplicability() { 
571          if (this.applicability == null)
572            return false;
573          for (ChargeItemDefinitionApplicabilityComponent item : this.applicability)
574            if (!item.isEmpty())
575              return true;
576          return false;
577        }
578
579        public ChargeItemDefinitionApplicabilityComponent addApplicability() { //3
580          ChargeItemDefinitionApplicabilityComponent t = new ChargeItemDefinitionApplicabilityComponent();
581          if (this.applicability == null)
582            this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
583          this.applicability.add(t);
584          return t;
585        }
586
587        public ChargeItemDefinitionPropertyGroupComponent addApplicability(ChargeItemDefinitionApplicabilityComponent t) { //3
588          if (t == null)
589            return this;
590          if (this.applicability == null)
591            this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
592          this.applicability.add(t);
593          return this;
594        }
595
596        /**
597         * @return The first repetition of repeating field {@link #applicability}, creating it if it does not already exist
598         */
599        public ChargeItemDefinitionApplicabilityComponent getApplicabilityFirstRep() { 
600          if (getApplicability().isEmpty()) {
601            addApplicability();
602          }
603          return getApplicability().get(0);
604        }
605
606        /**
607         * @return {@link #priceComponent} (The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under developement. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.)
608         */
609        public List<ChargeItemDefinitionPropertyGroupPriceComponentComponent> getPriceComponent() { 
610          if (this.priceComponent == null)
611            this.priceComponent = new ArrayList<ChargeItemDefinitionPropertyGroupPriceComponentComponent>();
612          return this.priceComponent;
613        }
614
615        /**
616         * @return Returns a reference to <code>this</code> for easy method chaining
617         */
618        public ChargeItemDefinitionPropertyGroupComponent setPriceComponent(List<ChargeItemDefinitionPropertyGroupPriceComponentComponent> thePriceComponent) { 
619          this.priceComponent = thePriceComponent;
620          return this;
621        }
622
623        public boolean hasPriceComponent() { 
624          if (this.priceComponent == null)
625            return false;
626          for (ChargeItemDefinitionPropertyGroupPriceComponentComponent item : this.priceComponent)
627            if (!item.isEmpty())
628              return true;
629          return false;
630        }
631
632        public ChargeItemDefinitionPropertyGroupPriceComponentComponent addPriceComponent() { //3
633          ChargeItemDefinitionPropertyGroupPriceComponentComponent t = new ChargeItemDefinitionPropertyGroupPriceComponentComponent();
634          if (this.priceComponent == null)
635            this.priceComponent = new ArrayList<ChargeItemDefinitionPropertyGroupPriceComponentComponent>();
636          this.priceComponent.add(t);
637          return t;
638        }
639
640        public ChargeItemDefinitionPropertyGroupComponent addPriceComponent(ChargeItemDefinitionPropertyGroupPriceComponentComponent t) { //3
641          if (t == null)
642            return this;
643          if (this.priceComponent == null)
644            this.priceComponent = new ArrayList<ChargeItemDefinitionPropertyGroupPriceComponentComponent>();
645          this.priceComponent.add(t);
646          return this;
647        }
648
649        /**
650         * @return The first repetition of repeating field {@link #priceComponent}, creating it if it does not already exist
651         */
652        public ChargeItemDefinitionPropertyGroupPriceComponentComponent getPriceComponentFirstRep() { 
653          if (getPriceComponent().isEmpty()) {
654            addPriceComponent();
655          }
656          return getPriceComponent().get(0);
657        }
658
659        protected void listChildren(List<Property> children) {
660          super.listChildren(children);
661          children.add(new Property("applicability", "@ChargeItemDefinition.applicability", "Expressions that describe applicability criteria for the priceComponent.", 0, java.lang.Integer.MAX_VALUE, applicability));
662          children.add(new Property("priceComponent", "", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under developement. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent));
663        }
664
665        @Override
666        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
667          switch (_hash) {
668          case -1526770491: /*applicability*/  return new Property("applicability", "@ChargeItemDefinition.applicability", "Expressions that describe applicability criteria for the priceComponent.", 0, java.lang.Integer.MAX_VALUE, applicability);
669          case 1219095988: /*priceComponent*/  return new Property("priceComponent", "", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under developement. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent);
670          default: return super.getNamedProperty(_hash, _name, _checkValid);
671          }
672
673        }
674
675      @Override
676      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
677        switch (hash) {
678        case -1526770491: /*applicability*/ return this.applicability == null ? new Base[0] : this.applicability.toArray(new Base[this.applicability.size()]); // ChargeItemDefinitionApplicabilityComponent
679        case 1219095988: /*priceComponent*/ return this.priceComponent == null ? new Base[0] : this.priceComponent.toArray(new Base[this.priceComponent.size()]); // ChargeItemDefinitionPropertyGroupPriceComponentComponent
680        default: return super.getProperty(hash, name, checkValid);
681        }
682
683      }
684
685      @Override
686      public Base setProperty(int hash, String name, Base value) throws FHIRException {
687        switch (hash) {
688        case -1526770491: // applicability
689          this.getApplicability().add((ChargeItemDefinitionApplicabilityComponent) value); // ChargeItemDefinitionApplicabilityComponent
690          return value;
691        case 1219095988: // priceComponent
692          this.getPriceComponent().add((ChargeItemDefinitionPropertyGroupPriceComponentComponent) value); // ChargeItemDefinitionPropertyGroupPriceComponentComponent
693          return value;
694        default: return super.setProperty(hash, name, value);
695        }
696
697      }
698
699      @Override
700      public Base setProperty(String name, Base value) throws FHIRException {
701        if (name.equals("applicability")) {
702          this.getApplicability().add((ChargeItemDefinitionApplicabilityComponent) value);
703        } else if (name.equals("priceComponent")) {
704          this.getPriceComponent().add((ChargeItemDefinitionPropertyGroupPriceComponentComponent) value);
705        } else
706          return super.setProperty(name, value);
707        return value;
708      }
709
710      @Override
711      public Base makeProperty(int hash, String name) throws FHIRException {
712        switch (hash) {
713        case -1526770491:  return addApplicability(); 
714        case 1219095988:  return addPriceComponent(); 
715        default: return super.makeProperty(hash, name);
716        }
717
718      }
719
720      @Override
721      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
722        switch (hash) {
723        case -1526770491: /*applicability*/ return new String[] {"@ChargeItemDefinition.applicability"};
724        case 1219095988: /*priceComponent*/ return new String[] {};
725        default: return super.getTypesForProperty(hash, name);
726        }
727
728      }
729
730      @Override
731      public Base addChild(String name) throws FHIRException {
732        if (name.equals("applicability")) {
733          return addApplicability();
734        }
735        else if (name.equals("priceComponent")) {
736          return addPriceComponent();
737        }
738        else
739          return super.addChild(name);
740      }
741
742      public ChargeItemDefinitionPropertyGroupComponent copy() {
743        ChargeItemDefinitionPropertyGroupComponent dst = new ChargeItemDefinitionPropertyGroupComponent();
744        copyValues(dst);
745        if (applicability != null) {
746          dst.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
747          for (ChargeItemDefinitionApplicabilityComponent i : applicability)
748            dst.applicability.add(i.copy());
749        };
750        if (priceComponent != null) {
751          dst.priceComponent = new ArrayList<ChargeItemDefinitionPropertyGroupPriceComponentComponent>();
752          for (ChargeItemDefinitionPropertyGroupPriceComponentComponent i : priceComponent)
753            dst.priceComponent.add(i.copy());
754        };
755        return dst;
756      }
757
758      @Override
759      public boolean equalsDeep(Base other_) {
760        if (!super.equalsDeep(other_))
761          return false;
762        if (!(other_ instanceof ChargeItemDefinitionPropertyGroupComponent))
763          return false;
764        ChargeItemDefinitionPropertyGroupComponent o = (ChargeItemDefinitionPropertyGroupComponent) other_;
765        return compareDeep(applicability, o.applicability, true) && compareDeep(priceComponent, o.priceComponent, true)
766          ;
767      }
768
769      @Override
770      public boolean equalsShallow(Base other_) {
771        if (!super.equalsShallow(other_))
772          return false;
773        if (!(other_ instanceof ChargeItemDefinitionPropertyGroupComponent))
774          return false;
775        ChargeItemDefinitionPropertyGroupComponent o = (ChargeItemDefinitionPropertyGroupComponent) other_;
776        return true;
777      }
778
779      public boolean isEmpty() {
780        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(applicability, priceComponent
781          );
782      }
783
784  public String fhirType() {
785    return "ChargeItemDefinition.propertyGroup";
786
787  }
788
789  }
790
791    @Block()
792    public static class ChargeItemDefinitionPropertyGroupPriceComponentComponent extends BackboneElement implements IBaseBackboneElement {
793        /**
794         * This code identifies the type of the component.
795         */
796        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
797        @Description(shortDefinition="base | surcharge | deduction | discount | tax | informational", formalDefinition="This code identifies the type of the component." )
798        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/invoice-priceComponentType")
799        protected Enumeration<ChargeItemDefinitionPriceComponentType> type;
800
801        /**
802         * A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.
803         */
804        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
805        @Description(shortDefinition="Code identifying the specific component", formalDefinition="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc." )
806        protected CodeableConcept code;
807
808        /**
809         * The factor that has been applied on the base price for calculating this component.
810         */
811        @Child(name = "factor", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false)
812        @Description(shortDefinition="Factor used for calculating this component", formalDefinition="The factor that has been applied on the base price for calculating this component." )
813        protected DecimalType factor;
814
815        /**
816         * The amount calculated for this component.
817         */
818        @Child(name = "amount", type = {Money.class}, order=4, min=0, max=1, modifier=false, summary=false)
819        @Description(shortDefinition="Monetary amount associated with this component", formalDefinition="The amount calculated for this component." )
820        protected Money amount;
821
822        private static final long serialVersionUID = -841451335L;
823
824    /**
825     * Constructor
826     */
827      public ChargeItemDefinitionPropertyGroupPriceComponentComponent() {
828        super();
829      }
830
831    /**
832     * Constructor
833     */
834      public ChargeItemDefinitionPropertyGroupPriceComponentComponent(Enumeration<ChargeItemDefinitionPriceComponentType> type) {
835        super();
836        this.type = type;
837      }
838
839        /**
840         * @return {@link #type} (This code identifies the type of the component.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
841         */
842        public Enumeration<ChargeItemDefinitionPriceComponentType> getTypeElement() { 
843          if (this.type == null)
844            if (Configuration.errorOnAutoCreate())
845              throw new Error("Attempt to auto-create ChargeItemDefinitionPropertyGroupPriceComponentComponent.type");
846            else if (Configuration.doAutoCreate())
847              this.type = new Enumeration<ChargeItemDefinitionPriceComponentType>(new ChargeItemDefinitionPriceComponentTypeEnumFactory()); // bb
848          return this.type;
849        }
850
851        public boolean hasTypeElement() { 
852          return this.type != null && !this.type.isEmpty();
853        }
854
855        public boolean hasType() { 
856          return this.type != null && !this.type.isEmpty();
857        }
858
859        /**
860         * @param value {@link #type} (This code identifies the type of the component.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
861         */
862        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setTypeElement(Enumeration<ChargeItemDefinitionPriceComponentType> value) { 
863          this.type = value;
864          return this;
865        }
866
867        /**
868         * @return This code identifies the type of the component.
869         */
870        public ChargeItemDefinitionPriceComponentType getType() { 
871          return this.type == null ? null : this.type.getValue();
872        }
873
874        /**
875         * @param value This code identifies the type of the component.
876         */
877        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setType(ChargeItemDefinitionPriceComponentType value) { 
878            if (this.type == null)
879              this.type = new Enumeration<ChargeItemDefinitionPriceComponentType>(new ChargeItemDefinitionPriceComponentTypeEnumFactory());
880            this.type.setValue(value);
881          return this;
882        }
883
884        /**
885         * @return {@link #code} (A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.)
886         */
887        public CodeableConcept getCode() { 
888          if (this.code == null)
889            if (Configuration.errorOnAutoCreate())
890              throw new Error("Attempt to auto-create ChargeItemDefinitionPropertyGroupPriceComponentComponent.code");
891            else if (Configuration.doAutoCreate())
892              this.code = new CodeableConcept(); // cc
893          return this.code;
894        }
895
896        public boolean hasCode() { 
897          return this.code != null && !this.code.isEmpty();
898        }
899
900        /**
901         * @param value {@link #code} (A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.)
902         */
903        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setCode(CodeableConcept value) { 
904          this.code = value;
905          return this;
906        }
907
908        /**
909         * @return {@link #factor} (The factor that has been applied on the base price for calculating this component.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
910         */
911        public DecimalType getFactorElement() { 
912          if (this.factor == null)
913            if (Configuration.errorOnAutoCreate())
914              throw new Error("Attempt to auto-create ChargeItemDefinitionPropertyGroupPriceComponentComponent.factor");
915            else if (Configuration.doAutoCreate())
916              this.factor = new DecimalType(); // bb
917          return this.factor;
918        }
919
920        public boolean hasFactorElement() { 
921          return this.factor != null && !this.factor.isEmpty();
922        }
923
924        public boolean hasFactor() { 
925          return this.factor != null && !this.factor.isEmpty();
926        }
927
928        /**
929         * @param value {@link #factor} (The factor that has been applied on the base price for calculating this component.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
930         */
931        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setFactorElement(DecimalType value) { 
932          this.factor = value;
933          return this;
934        }
935
936        /**
937         * @return The factor that has been applied on the base price for calculating this component.
938         */
939        public BigDecimal getFactor() { 
940          return this.factor == null ? null : this.factor.getValue();
941        }
942
943        /**
944         * @param value The factor that has been applied on the base price for calculating this component.
945         */
946        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setFactor(BigDecimal value) { 
947          if (value == null)
948            this.factor = null;
949          else {
950            if (this.factor == null)
951              this.factor = new DecimalType();
952            this.factor.setValue(value);
953          }
954          return this;
955        }
956
957        /**
958         * @param value The factor that has been applied on the base price for calculating this component.
959         */
960        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setFactor(long value) { 
961              this.factor = new DecimalType();
962            this.factor.setValue(value);
963          return this;
964        }
965
966        /**
967         * @param value The factor that has been applied on the base price for calculating this component.
968         */
969        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setFactor(double value) { 
970              this.factor = new DecimalType();
971            this.factor.setValue(value);
972          return this;
973        }
974
975        /**
976         * @return {@link #amount} (The amount calculated for this component.)
977         */
978        public Money getAmount() { 
979          if (this.amount == null)
980            if (Configuration.errorOnAutoCreate())
981              throw new Error("Attempt to auto-create ChargeItemDefinitionPropertyGroupPriceComponentComponent.amount");
982            else if (Configuration.doAutoCreate())
983              this.amount = new Money(); // cc
984          return this.amount;
985        }
986
987        public boolean hasAmount() { 
988          return this.amount != null && !this.amount.isEmpty();
989        }
990
991        /**
992         * @param value {@link #amount} (The amount calculated for this component.)
993         */
994        public ChargeItemDefinitionPropertyGroupPriceComponentComponent setAmount(Money value) { 
995          this.amount = value;
996          return this;
997        }
998
999        protected void listChildren(List<Property> children) {
1000          super.listChildren(children);
1001          children.add(new Property("type", "code", "This code identifies the type of the component.", 0, 1, type));
1002          children.add(new Property("code", "CodeableConcept", "A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", 0, 1, code));
1003          children.add(new Property("factor", "decimal", "The factor that has been applied on the base price for calculating this component.", 0, 1, factor));
1004          children.add(new Property("amount", "Money", "The amount calculated for this component.", 0, 1, amount));
1005        }
1006
1007        @Override
1008        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1009          switch (_hash) {
1010          case 3575610: /*type*/  return new Property("type", "code", "This code identifies the type of the component.", 0, 1, type);
1011          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.", 0, 1, code);
1012          case -1282148017: /*factor*/  return new Property("factor", "decimal", "The factor that has been applied on the base price for calculating this component.", 0, 1, factor);
1013          case -1413853096: /*amount*/  return new Property("amount", "Money", "The amount calculated for this component.", 0, 1, amount);
1014          default: return super.getNamedProperty(_hash, _name, _checkValid);
1015          }
1016
1017        }
1018
1019      @Override
1020      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1021        switch (hash) {
1022        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ChargeItemDefinitionPriceComponentType>
1023        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1024        case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType
1025        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
1026        default: return super.getProperty(hash, name, checkValid);
1027        }
1028
1029      }
1030
1031      @Override
1032      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1033        switch (hash) {
1034        case 3575610: // type
1035          value = new ChargeItemDefinitionPriceComponentTypeEnumFactory().fromType(castToCode(value));
1036          this.type = (Enumeration) value; // Enumeration<ChargeItemDefinitionPriceComponentType>
1037          return value;
1038        case 3059181: // code
1039          this.code = castToCodeableConcept(value); // CodeableConcept
1040          return value;
1041        case -1282148017: // factor
1042          this.factor = castToDecimal(value); // DecimalType
1043          return value;
1044        case -1413853096: // amount
1045          this.amount = castToMoney(value); // Money
1046          return value;
1047        default: return super.setProperty(hash, name, value);
1048        }
1049
1050      }
1051
1052      @Override
1053      public Base setProperty(String name, Base value) throws FHIRException {
1054        if (name.equals("type")) {
1055          value = new ChargeItemDefinitionPriceComponentTypeEnumFactory().fromType(castToCode(value));
1056          this.type = (Enumeration) value; // Enumeration<ChargeItemDefinitionPriceComponentType>
1057        } else if (name.equals("code")) {
1058          this.code = castToCodeableConcept(value); // CodeableConcept
1059        } else if (name.equals("factor")) {
1060          this.factor = castToDecimal(value); // DecimalType
1061        } else if (name.equals("amount")) {
1062          this.amount = castToMoney(value); // Money
1063        } else
1064          return super.setProperty(name, value);
1065        return value;
1066      }
1067
1068      @Override
1069      public Base makeProperty(int hash, String name) throws FHIRException {
1070        switch (hash) {
1071        case 3575610:  return getTypeElement();
1072        case 3059181:  return getCode(); 
1073        case -1282148017:  return getFactorElement();
1074        case -1413853096:  return getAmount(); 
1075        default: return super.makeProperty(hash, name);
1076        }
1077
1078      }
1079
1080      @Override
1081      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1082        switch (hash) {
1083        case 3575610: /*type*/ return new String[] {"code"};
1084        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1085        case -1282148017: /*factor*/ return new String[] {"decimal"};
1086        case -1413853096: /*amount*/ return new String[] {"Money"};
1087        default: return super.getTypesForProperty(hash, name);
1088        }
1089
1090      }
1091
1092      @Override
1093      public Base addChild(String name) throws FHIRException {
1094        if (name.equals("type")) {
1095          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.type");
1096        }
1097        else if (name.equals("code")) {
1098          this.code = new CodeableConcept();
1099          return this.code;
1100        }
1101        else if (name.equals("factor")) {
1102          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.factor");
1103        }
1104        else if (name.equals("amount")) {
1105          this.amount = new Money();
1106          return this.amount;
1107        }
1108        else
1109          return super.addChild(name);
1110      }
1111
1112      public ChargeItemDefinitionPropertyGroupPriceComponentComponent copy() {
1113        ChargeItemDefinitionPropertyGroupPriceComponentComponent dst = new ChargeItemDefinitionPropertyGroupPriceComponentComponent();
1114        copyValues(dst);
1115        dst.type = type == null ? null : type.copy();
1116        dst.code = code == null ? null : code.copy();
1117        dst.factor = factor == null ? null : factor.copy();
1118        dst.amount = amount == null ? null : amount.copy();
1119        return dst;
1120      }
1121
1122      @Override
1123      public boolean equalsDeep(Base other_) {
1124        if (!super.equalsDeep(other_))
1125          return false;
1126        if (!(other_ instanceof ChargeItemDefinitionPropertyGroupPriceComponentComponent))
1127          return false;
1128        ChargeItemDefinitionPropertyGroupPriceComponentComponent o = (ChargeItemDefinitionPropertyGroupPriceComponentComponent) other_;
1129        return compareDeep(type, o.type, true) && compareDeep(code, o.code, true) && compareDeep(factor, o.factor, true)
1130           && compareDeep(amount, o.amount, true);
1131      }
1132
1133      @Override
1134      public boolean equalsShallow(Base other_) {
1135        if (!super.equalsShallow(other_))
1136          return false;
1137        if (!(other_ instanceof ChargeItemDefinitionPropertyGroupPriceComponentComponent))
1138          return false;
1139        ChargeItemDefinitionPropertyGroupPriceComponentComponent o = (ChargeItemDefinitionPropertyGroupPriceComponentComponent) other_;
1140        return compareValues(type, o.type, true) && compareValues(factor, o.factor, true);
1141      }
1142
1143      public boolean isEmpty() {
1144        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, code, factor, amount
1145          );
1146      }
1147
1148  public String fhirType() {
1149    return "ChargeItemDefinition.propertyGroup.priceComponent";
1150
1151  }
1152
1153  }
1154
1155    /**
1156     * A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.
1157     */
1158    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1159    @Description(shortDefinition="Additional identifier for the charge item definition", formalDefinition="A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1160    protected List<Identifier> identifier;
1161
1162    /**
1163     * The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.
1164     */
1165    @Child(name = "derivedFromUri", type = {UriType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1166    @Description(shortDefinition="Underlying externally-defined charge item definition", formalDefinition="The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition." )
1167    protected List<UriType> derivedFromUri;
1168
1169    /**
1170     * A larger definition of which this particular definition is a component or step.
1171     */
1172    @Child(name = "partOf", type = {CanonicalType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1173    @Description(shortDefinition="A larger definition of which this particular definition is a component or step", formalDefinition="A larger definition of which this particular definition is a component or step." )
1174    protected List<CanonicalType> partOf;
1175
1176    /**
1177     * As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.
1178     */
1179    @Child(name = "replaces", type = {CanonicalType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1180    @Description(shortDefinition="Completed or terminated request(s) whose function is taken by this new request", formalDefinition="As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance." )
1181    protected List<CanonicalType> replaces;
1182
1183    /**
1184     * A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.
1185     */
1186    @Child(name = "copyright", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1187    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition." )
1188    protected MarkdownType copyright;
1189
1190    /**
1191     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1192     */
1193    @Child(name = "approvalDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1194    @Description(shortDefinition="When the charge item definition was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
1195    protected DateType approvalDate;
1196
1197    /**
1198     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1199     */
1200    @Child(name = "lastReviewDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=false)
1201    @Description(shortDefinition="When the charge item definition was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." )
1202    protected DateType lastReviewDate;
1203
1204    /**
1205     * The period during which the charge item definition content was or is planned to be in active use.
1206     */
1207    @Child(name = "effectivePeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true)
1208    @Description(shortDefinition="When the charge item definition is expected to be used", formalDefinition="The period during which the charge item definition content was or is planned to be in active use." )
1209    protected Period effectivePeriod;
1210
1211    /**
1212     * The defined billing details in this resource pertain to the given billing code.
1213     */
1214    @Child(name = "code", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
1215    @Description(shortDefinition="Billing codes or product types this definition applies to", formalDefinition="The defined billing details in this resource pertain to the given billing code." )
1216    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/chargeitem-billingcodes")
1217    protected CodeableConcept code;
1218
1219    /**
1220     * The defined billing details in this resource pertain to the given product instance(s).
1221     */
1222    @Child(name = "instance", type = {Medication.class, Substance.class, Device.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1223    @Description(shortDefinition="Instances this definition applies to", formalDefinition="The defined billing details in this resource pertain to the given product instance(s)." )
1224    protected List<Reference> instance;
1225    /**
1226     * The actual objects that are the target of the reference (The defined billing details in this resource pertain to the given product instance(s).)
1227     */
1228    protected List<Resource> instanceTarget;
1229
1230
1231    /**
1232     * Expressions that describe applicability criteria for the billing code.
1233     */
1234    @Child(name = "applicability", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1235    @Description(shortDefinition="Whether or not the billing code is applicable", formalDefinition="Expressions that describe applicability criteria for the billing code." )
1236    protected List<ChargeItemDefinitionApplicabilityComponent> applicability;
1237
1238    /**
1239     * Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.
1240     */
1241    @Child(name = "propertyGroup", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1242    @Description(shortDefinition="Group of properties which are applicable under the same conditions", formalDefinition="Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply." )
1243    protected List<ChargeItemDefinitionPropertyGroupComponent> propertyGroup;
1244
1245    private static final long serialVersionUID = -583681330L;
1246
1247  /**
1248   * Constructor
1249   */
1250    public ChargeItemDefinition() {
1251      super();
1252    }
1253
1254  /**
1255   * Constructor
1256   */
1257    public ChargeItemDefinition(UriType url, Enumeration<PublicationStatus> status) {
1258      super();
1259      this.url = url;
1260      this.status = status;
1261    }
1262
1263    /**
1264     * @return {@link #url} (An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1265     */
1266    public UriType getUrlElement() { 
1267      if (this.url == null)
1268        if (Configuration.errorOnAutoCreate())
1269          throw new Error("Attempt to auto-create ChargeItemDefinition.url");
1270        else if (Configuration.doAutoCreate())
1271          this.url = new UriType(); // bb
1272      return this.url;
1273    }
1274
1275    public boolean hasUrlElement() { 
1276      return this.url != null && !this.url.isEmpty();
1277    }
1278
1279    public boolean hasUrl() { 
1280      return this.url != null && !this.url.isEmpty();
1281    }
1282
1283    /**
1284     * @param value {@link #url} (An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1285     */
1286    public ChargeItemDefinition setUrlElement(UriType value) { 
1287      this.url = value;
1288      return this;
1289    }
1290
1291    /**
1292     * @return An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.
1293     */
1294    public String getUrl() { 
1295      return this.url == null ? null : this.url.getValue();
1296    }
1297
1298    /**
1299     * @param value An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.
1300     */
1301    public ChargeItemDefinition setUrl(String value) { 
1302        if (this.url == null)
1303          this.url = new UriType();
1304        this.url.setValue(value);
1305      return this;
1306    }
1307
1308    /**
1309     * @return {@link #identifier} (A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.)
1310     */
1311    public List<Identifier> getIdentifier() { 
1312      if (this.identifier == null)
1313        this.identifier = new ArrayList<Identifier>();
1314      return this.identifier;
1315    }
1316
1317    /**
1318     * @return Returns a reference to <code>this</code> for easy method chaining
1319     */
1320    public ChargeItemDefinition setIdentifier(List<Identifier> theIdentifier) { 
1321      this.identifier = theIdentifier;
1322      return this;
1323    }
1324
1325    public boolean hasIdentifier() { 
1326      if (this.identifier == null)
1327        return false;
1328      for (Identifier item : this.identifier)
1329        if (!item.isEmpty())
1330          return true;
1331      return false;
1332    }
1333
1334    public Identifier addIdentifier() { //3
1335      Identifier t = new Identifier();
1336      if (this.identifier == null)
1337        this.identifier = new ArrayList<Identifier>();
1338      this.identifier.add(t);
1339      return t;
1340    }
1341
1342    public ChargeItemDefinition addIdentifier(Identifier t) { //3
1343      if (t == null)
1344        return this;
1345      if (this.identifier == null)
1346        this.identifier = new ArrayList<Identifier>();
1347      this.identifier.add(t);
1348      return this;
1349    }
1350
1351    /**
1352     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1353     */
1354    public Identifier getIdentifierFirstRep() { 
1355      if (getIdentifier().isEmpty()) {
1356        addIdentifier();
1357      }
1358      return getIdentifier().get(0);
1359    }
1360
1361    /**
1362     * @return {@link #version} (The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1363     */
1364    public StringType getVersionElement() { 
1365      if (this.version == null)
1366        if (Configuration.errorOnAutoCreate())
1367          throw new Error("Attempt to auto-create ChargeItemDefinition.version");
1368        else if (Configuration.doAutoCreate())
1369          this.version = new StringType(); // bb
1370      return this.version;
1371    }
1372
1373    public boolean hasVersionElement() { 
1374      return this.version != null && !this.version.isEmpty();
1375    }
1376
1377    public boolean hasVersion() { 
1378      return this.version != null && !this.version.isEmpty();
1379    }
1380
1381    /**
1382     * @param value {@link #version} (The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1383     */
1384    public ChargeItemDefinition setVersionElement(StringType value) { 
1385      this.version = value;
1386      return this;
1387    }
1388
1389    /**
1390     * @return The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.
1391     */
1392    public String getVersion() { 
1393      return this.version == null ? null : this.version.getValue();
1394    }
1395
1396    /**
1397     * @param value The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.
1398     */
1399    public ChargeItemDefinition setVersion(String value) { 
1400      if (Utilities.noString(value))
1401        this.version = null;
1402      else {
1403        if (this.version == null)
1404          this.version = new StringType();
1405        this.version.setValue(value);
1406      }
1407      return this;
1408    }
1409
1410    /**
1411     * @return {@link #title} (A short, descriptive, user-friendly title for the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1412     */
1413    public StringType getTitleElement() { 
1414      if (this.title == null)
1415        if (Configuration.errorOnAutoCreate())
1416          throw new Error("Attempt to auto-create ChargeItemDefinition.title");
1417        else if (Configuration.doAutoCreate())
1418          this.title = new StringType(); // bb
1419      return this.title;
1420    }
1421
1422    public boolean hasTitleElement() { 
1423      return this.title != null && !this.title.isEmpty();
1424    }
1425
1426    public boolean hasTitle() { 
1427      return this.title != null && !this.title.isEmpty();
1428    }
1429
1430    /**
1431     * @param value {@link #title} (A short, descriptive, user-friendly title for the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1432     */
1433    public ChargeItemDefinition setTitleElement(StringType value) { 
1434      this.title = value;
1435      return this;
1436    }
1437
1438    /**
1439     * @return A short, descriptive, user-friendly title for the charge item definition.
1440     */
1441    public String getTitle() { 
1442      return this.title == null ? null : this.title.getValue();
1443    }
1444
1445    /**
1446     * @param value A short, descriptive, user-friendly title for the charge item definition.
1447     */
1448    public ChargeItemDefinition setTitle(String value) { 
1449      if (Utilities.noString(value))
1450        this.title = null;
1451      else {
1452        if (this.title == null)
1453          this.title = new StringType();
1454        this.title.setValue(value);
1455      }
1456      return this;
1457    }
1458
1459    /**
1460     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.)
1461     */
1462    public List<UriType> getDerivedFromUri() { 
1463      if (this.derivedFromUri == null)
1464        this.derivedFromUri = new ArrayList<UriType>();
1465      return this.derivedFromUri;
1466    }
1467
1468    /**
1469     * @return Returns a reference to <code>this</code> for easy method chaining
1470     */
1471    public ChargeItemDefinition setDerivedFromUri(List<UriType> theDerivedFromUri) { 
1472      this.derivedFromUri = theDerivedFromUri;
1473      return this;
1474    }
1475
1476    public boolean hasDerivedFromUri() { 
1477      if (this.derivedFromUri == null)
1478        return false;
1479      for (UriType item : this.derivedFromUri)
1480        if (!item.isEmpty())
1481          return true;
1482      return false;
1483    }
1484
1485    /**
1486     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.)
1487     */
1488    public UriType addDerivedFromUriElement() {//2 
1489      UriType t = new UriType();
1490      if (this.derivedFromUri == null)
1491        this.derivedFromUri = new ArrayList<UriType>();
1492      this.derivedFromUri.add(t);
1493      return t;
1494    }
1495
1496    /**
1497     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.)
1498     */
1499    public ChargeItemDefinition addDerivedFromUri(String value) { //1
1500      UriType t = new UriType();
1501      t.setValue(value);
1502      if (this.derivedFromUri == null)
1503        this.derivedFromUri = new ArrayList<UriType>();
1504      this.derivedFromUri.add(t);
1505      return this;
1506    }
1507
1508    /**
1509     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.)
1510     */
1511    public boolean hasDerivedFromUri(String value) { 
1512      if (this.derivedFromUri == null)
1513        return false;
1514      for (UriType v : this.derivedFromUri)
1515        if (v.getValue().equals(value)) // uri
1516          return true;
1517      return false;
1518    }
1519
1520    /**
1521     * @return {@link #partOf} (A larger definition of which this particular definition is a component or step.)
1522     */
1523    public List<CanonicalType> getPartOf() { 
1524      if (this.partOf == null)
1525        this.partOf = new ArrayList<CanonicalType>();
1526      return this.partOf;
1527    }
1528
1529    /**
1530     * @return Returns a reference to <code>this</code> for easy method chaining
1531     */
1532    public ChargeItemDefinition setPartOf(List<CanonicalType> thePartOf) { 
1533      this.partOf = thePartOf;
1534      return this;
1535    }
1536
1537    public boolean hasPartOf() { 
1538      if (this.partOf == null)
1539        return false;
1540      for (CanonicalType item : this.partOf)
1541        if (!item.isEmpty())
1542          return true;
1543      return false;
1544    }
1545
1546    /**
1547     * @return {@link #partOf} (A larger definition of which this particular definition is a component or step.)
1548     */
1549    public CanonicalType addPartOfElement() {//2 
1550      CanonicalType t = new CanonicalType();
1551      if (this.partOf == null)
1552        this.partOf = new ArrayList<CanonicalType>();
1553      this.partOf.add(t);
1554      return t;
1555    }
1556
1557    /**
1558     * @param value {@link #partOf} (A larger definition of which this particular definition is a component or step.)
1559     */
1560    public ChargeItemDefinition addPartOf(String value) { //1
1561      CanonicalType t = new CanonicalType();
1562      t.setValue(value);
1563      if (this.partOf == null)
1564        this.partOf = new ArrayList<CanonicalType>();
1565      this.partOf.add(t);
1566      return this;
1567    }
1568
1569    /**
1570     * @param value {@link #partOf} (A larger definition of which this particular definition is a component or step.)
1571     */
1572    public boolean hasPartOf(String value) { 
1573      if (this.partOf == null)
1574        return false;
1575      for (CanonicalType v : this.partOf)
1576        if (v.getValue().equals(value)) // canonical(ChargeItemDefinition)
1577          return true;
1578      return false;
1579    }
1580
1581    /**
1582     * @return {@link #replaces} (As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.)
1583     */
1584    public List<CanonicalType> getReplaces() { 
1585      if (this.replaces == null)
1586        this.replaces = new ArrayList<CanonicalType>();
1587      return this.replaces;
1588    }
1589
1590    /**
1591     * @return Returns a reference to <code>this</code> for easy method chaining
1592     */
1593    public ChargeItemDefinition setReplaces(List<CanonicalType> theReplaces) { 
1594      this.replaces = theReplaces;
1595      return this;
1596    }
1597
1598    public boolean hasReplaces() { 
1599      if (this.replaces == null)
1600        return false;
1601      for (CanonicalType item : this.replaces)
1602        if (!item.isEmpty())
1603          return true;
1604      return false;
1605    }
1606
1607    /**
1608     * @return {@link #replaces} (As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.)
1609     */
1610    public CanonicalType addReplacesElement() {//2 
1611      CanonicalType t = new CanonicalType();
1612      if (this.replaces == null)
1613        this.replaces = new ArrayList<CanonicalType>();
1614      this.replaces.add(t);
1615      return t;
1616    }
1617
1618    /**
1619     * @param value {@link #replaces} (As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.)
1620     */
1621    public ChargeItemDefinition addReplaces(String value) { //1
1622      CanonicalType t = new CanonicalType();
1623      t.setValue(value);
1624      if (this.replaces == null)
1625        this.replaces = new ArrayList<CanonicalType>();
1626      this.replaces.add(t);
1627      return this;
1628    }
1629
1630    /**
1631     * @param value {@link #replaces} (As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.)
1632     */
1633    public boolean hasReplaces(String value) { 
1634      if (this.replaces == null)
1635        return false;
1636      for (CanonicalType v : this.replaces)
1637        if (v.getValue().equals(value)) // canonical(ChargeItemDefinition)
1638          return true;
1639      return false;
1640    }
1641
1642    /**
1643     * @return {@link #status} (The current state of the ChargeItemDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1644     */
1645    public Enumeration<PublicationStatus> getStatusElement() { 
1646      if (this.status == null)
1647        if (Configuration.errorOnAutoCreate())
1648          throw new Error("Attempt to auto-create ChargeItemDefinition.status");
1649        else if (Configuration.doAutoCreate())
1650          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1651      return this.status;
1652    }
1653
1654    public boolean hasStatusElement() { 
1655      return this.status != null && !this.status.isEmpty();
1656    }
1657
1658    public boolean hasStatus() { 
1659      return this.status != null && !this.status.isEmpty();
1660    }
1661
1662    /**
1663     * @param value {@link #status} (The current state of the ChargeItemDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1664     */
1665    public ChargeItemDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
1666      this.status = value;
1667      return this;
1668    }
1669
1670    /**
1671     * @return The current state of the ChargeItemDefinition.
1672     */
1673    public PublicationStatus getStatus() { 
1674      return this.status == null ? null : this.status.getValue();
1675    }
1676
1677    /**
1678     * @param value The current state of the ChargeItemDefinition.
1679     */
1680    public ChargeItemDefinition setStatus(PublicationStatus value) { 
1681        if (this.status == null)
1682          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1683        this.status.setValue(value);
1684      return this;
1685    }
1686
1687    /**
1688     * @return {@link #experimental} (A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1689     */
1690    public BooleanType getExperimentalElement() { 
1691      if (this.experimental == null)
1692        if (Configuration.errorOnAutoCreate())
1693          throw new Error("Attempt to auto-create ChargeItemDefinition.experimental");
1694        else if (Configuration.doAutoCreate())
1695          this.experimental = new BooleanType(); // bb
1696      return this.experimental;
1697    }
1698
1699    public boolean hasExperimentalElement() { 
1700      return this.experimental != null && !this.experimental.isEmpty();
1701    }
1702
1703    public boolean hasExperimental() { 
1704      return this.experimental != null && !this.experimental.isEmpty();
1705    }
1706
1707    /**
1708     * @param value {@link #experimental} (A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1709     */
1710    public ChargeItemDefinition setExperimentalElement(BooleanType value) { 
1711      this.experimental = value;
1712      return this;
1713    }
1714
1715    /**
1716     * @return A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1717     */
1718    public boolean getExperimental() { 
1719      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
1720    }
1721
1722    /**
1723     * @param value A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1724     */
1725    public ChargeItemDefinition setExperimental(boolean value) { 
1726        if (this.experimental == null)
1727          this.experimental = new BooleanType();
1728        this.experimental.setValue(value);
1729      return this;
1730    }
1731
1732    /**
1733     * @return {@link #date} (The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1734     */
1735    public DateTimeType getDateElement() { 
1736      if (this.date == null)
1737        if (Configuration.errorOnAutoCreate())
1738          throw new Error("Attempt to auto-create ChargeItemDefinition.date");
1739        else if (Configuration.doAutoCreate())
1740          this.date = new DateTimeType(); // bb
1741      return this.date;
1742    }
1743
1744    public boolean hasDateElement() { 
1745      return this.date != null && !this.date.isEmpty();
1746    }
1747
1748    public boolean hasDate() { 
1749      return this.date != null && !this.date.isEmpty();
1750    }
1751
1752    /**
1753     * @param value {@link #date} (The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1754     */
1755    public ChargeItemDefinition setDateElement(DateTimeType value) { 
1756      this.date = value;
1757      return this;
1758    }
1759
1760    /**
1761     * @return The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.
1762     */
1763    public Date getDate() { 
1764      return this.date == null ? null : this.date.getValue();
1765    }
1766
1767    /**
1768     * @param value The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.
1769     */
1770    public ChargeItemDefinition setDate(Date value) { 
1771      if (value == null)
1772        this.date = null;
1773      else {
1774        if (this.date == null)
1775          this.date = new DateTimeType();
1776        this.date.setValue(value);
1777      }
1778      return this;
1779    }
1780
1781    /**
1782     * @return {@link #publisher} (The name of the organization or individual that published the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1783     */
1784    public StringType getPublisherElement() { 
1785      if (this.publisher == null)
1786        if (Configuration.errorOnAutoCreate())
1787          throw new Error("Attempt to auto-create ChargeItemDefinition.publisher");
1788        else if (Configuration.doAutoCreate())
1789          this.publisher = new StringType(); // bb
1790      return this.publisher;
1791    }
1792
1793    public boolean hasPublisherElement() { 
1794      return this.publisher != null && !this.publisher.isEmpty();
1795    }
1796
1797    public boolean hasPublisher() { 
1798      return this.publisher != null && !this.publisher.isEmpty();
1799    }
1800
1801    /**
1802     * @param value {@link #publisher} (The name of the organization or individual that published the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1803     */
1804    public ChargeItemDefinition setPublisherElement(StringType value) { 
1805      this.publisher = value;
1806      return this;
1807    }
1808
1809    /**
1810     * @return The name of the organization or individual that published the charge item definition.
1811     */
1812    public String getPublisher() { 
1813      return this.publisher == null ? null : this.publisher.getValue();
1814    }
1815
1816    /**
1817     * @param value The name of the organization or individual that published the charge item definition.
1818     */
1819    public ChargeItemDefinition setPublisher(String value) { 
1820      if (Utilities.noString(value))
1821        this.publisher = null;
1822      else {
1823        if (this.publisher == null)
1824          this.publisher = new StringType();
1825        this.publisher.setValue(value);
1826      }
1827      return this;
1828    }
1829
1830    /**
1831     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
1832     */
1833    public List<ContactDetail> getContact() { 
1834      if (this.contact == null)
1835        this.contact = new ArrayList<ContactDetail>();
1836      return this.contact;
1837    }
1838
1839    /**
1840     * @return Returns a reference to <code>this</code> for easy method chaining
1841     */
1842    public ChargeItemDefinition setContact(List<ContactDetail> theContact) { 
1843      this.contact = theContact;
1844      return this;
1845    }
1846
1847    public boolean hasContact() { 
1848      if (this.contact == null)
1849        return false;
1850      for (ContactDetail item : this.contact)
1851        if (!item.isEmpty())
1852          return true;
1853      return false;
1854    }
1855
1856    public ContactDetail addContact() { //3
1857      ContactDetail t = new ContactDetail();
1858      if (this.contact == null)
1859        this.contact = new ArrayList<ContactDetail>();
1860      this.contact.add(t);
1861      return t;
1862    }
1863
1864    public ChargeItemDefinition addContact(ContactDetail t) { //3
1865      if (t == null)
1866        return this;
1867      if (this.contact == null)
1868        this.contact = new ArrayList<ContactDetail>();
1869      this.contact.add(t);
1870      return this;
1871    }
1872
1873    /**
1874     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
1875     */
1876    public ContactDetail getContactFirstRep() { 
1877      if (getContact().isEmpty()) {
1878        addContact();
1879      }
1880      return getContact().get(0);
1881    }
1882
1883    /**
1884     * @return {@link #description} (A free text natural language description of the charge item definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1885     */
1886    public MarkdownType getDescriptionElement() { 
1887      if (this.description == null)
1888        if (Configuration.errorOnAutoCreate())
1889          throw new Error("Attempt to auto-create ChargeItemDefinition.description");
1890        else if (Configuration.doAutoCreate())
1891          this.description = new MarkdownType(); // bb
1892      return this.description;
1893    }
1894
1895    public boolean hasDescriptionElement() { 
1896      return this.description != null && !this.description.isEmpty();
1897    }
1898
1899    public boolean hasDescription() { 
1900      return this.description != null && !this.description.isEmpty();
1901    }
1902
1903    /**
1904     * @param value {@link #description} (A free text natural language description of the charge item definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1905     */
1906    public ChargeItemDefinition setDescriptionElement(MarkdownType value) { 
1907      this.description = value;
1908      return this;
1909    }
1910
1911    /**
1912     * @return A free text natural language description of the charge item definition from a consumer's perspective.
1913     */
1914    public String getDescription() { 
1915      return this.description == null ? null : this.description.getValue();
1916    }
1917
1918    /**
1919     * @param value A free text natural language description of the charge item definition from a consumer's perspective.
1920     */
1921    public ChargeItemDefinition setDescription(String value) { 
1922      if (value == null)
1923        this.description = null;
1924      else {
1925        if (this.description == null)
1926          this.description = new MarkdownType();
1927        this.description.setValue(value);
1928      }
1929      return this;
1930    }
1931
1932    /**
1933     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate charge item definition instances.)
1934     */
1935    public List<UsageContext> getUseContext() { 
1936      if (this.useContext == null)
1937        this.useContext = new ArrayList<UsageContext>();
1938      return this.useContext;
1939    }
1940
1941    /**
1942     * @return Returns a reference to <code>this</code> for easy method chaining
1943     */
1944    public ChargeItemDefinition setUseContext(List<UsageContext> theUseContext) { 
1945      this.useContext = theUseContext;
1946      return this;
1947    }
1948
1949    public boolean hasUseContext() { 
1950      if (this.useContext == null)
1951        return false;
1952      for (UsageContext item : this.useContext)
1953        if (!item.isEmpty())
1954          return true;
1955      return false;
1956    }
1957
1958    public UsageContext addUseContext() { //3
1959      UsageContext t = new UsageContext();
1960      if (this.useContext == null)
1961        this.useContext = new ArrayList<UsageContext>();
1962      this.useContext.add(t);
1963      return t;
1964    }
1965
1966    public ChargeItemDefinition addUseContext(UsageContext t) { //3
1967      if (t == null)
1968        return this;
1969      if (this.useContext == null)
1970        this.useContext = new ArrayList<UsageContext>();
1971      this.useContext.add(t);
1972      return this;
1973    }
1974
1975    /**
1976     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
1977     */
1978    public UsageContext getUseContextFirstRep() { 
1979      if (getUseContext().isEmpty()) {
1980        addUseContext();
1981      }
1982      return getUseContext().get(0);
1983    }
1984
1985    /**
1986     * @return {@link #jurisdiction} (A legal or geographic region in which the charge item definition is intended to be used.)
1987     */
1988    public List<CodeableConcept> getJurisdiction() { 
1989      if (this.jurisdiction == null)
1990        this.jurisdiction = new ArrayList<CodeableConcept>();
1991      return this.jurisdiction;
1992    }
1993
1994    /**
1995     * @return Returns a reference to <code>this</code> for easy method chaining
1996     */
1997    public ChargeItemDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
1998      this.jurisdiction = theJurisdiction;
1999      return this;
2000    }
2001
2002    public boolean hasJurisdiction() { 
2003      if (this.jurisdiction == null)
2004        return false;
2005      for (CodeableConcept item : this.jurisdiction)
2006        if (!item.isEmpty())
2007          return true;
2008      return false;
2009    }
2010
2011    public CodeableConcept addJurisdiction() { //3
2012      CodeableConcept t = new CodeableConcept();
2013      if (this.jurisdiction == null)
2014        this.jurisdiction = new ArrayList<CodeableConcept>();
2015      this.jurisdiction.add(t);
2016      return t;
2017    }
2018
2019    public ChargeItemDefinition addJurisdiction(CodeableConcept t) { //3
2020      if (t == null)
2021        return this;
2022      if (this.jurisdiction == null)
2023        this.jurisdiction = new ArrayList<CodeableConcept>();
2024      this.jurisdiction.add(t);
2025      return this;
2026    }
2027
2028    /**
2029     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
2030     */
2031    public CodeableConcept getJurisdictionFirstRep() { 
2032      if (getJurisdiction().isEmpty()) {
2033        addJurisdiction();
2034      }
2035      return getJurisdiction().get(0);
2036    }
2037
2038    /**
2039     * @return {@link #copyright} (A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2040     */
2041    public MarkdownType getCopyrightElement() { 
2042      if (this.copyright == null)
2043        if (Configuration.errorOnAutoCreate())
2044          throw new Error("Attempt to auto-create ChargeItemDefinition.copyright");
2045        else if (Configuration.doAutoCreate())
2046          this.copyright = new MarkdownType(); // bb
2047      return this.copyright;
2048    }
2049
2050    public boolean hasCopyrightElement() { 
2051      return this.copyright != null && !this.copyright.isEmpty();
2052    }
2053
2054    public boolean hasCopyright() { 
2055      return this.copyright != null && !this.copyright.isEmpty();
2056    }
2057
2058    /**
2059     * @param value {@link #copyright} (A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2060     */
2061    public ChargeItemDefinition setCopyrightElement(MarkdownType value) { 
2062      this.copyright = value;
2063      return this;
2064    }
2065
2066    /**
2067     * @return A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.
2068     */
2069    public String getCopyright() { 
2070      return this.copyright == null ? null : this.copyright.getValue();
2071    }
2072
2073    /**
2074     * @param value A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.
2075     */
2076    public ChargeItemDefinition setCopyright(String value) { 
2077      if (value == null)
2078        this.copyright = null;
2079      else {
2080        if (this.copyright == null)
2081          this.copyright = new MarkdownType();
2082        this.copyright.setValue(value);
2083      }
2084      return this;
2085    }
2086
2087    /**
2088     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2089     */
2090    public DateType getApprovalDateElement() { 
2091      if (this.approvalDate == null)
2092        if (Configuration.errorOnAutoCreate())
2093          throw new Error("Attempt to auto-create ChargeItemDefinition.approvalDate");
2094        else if (Configuration.doAutoCreate())
2095          this.approvalDate = new DateType(); // bb
2096      return this.approvalDate;
2097    }
2098
2099    public boolean hasApprovalDateElement() { 
2100      return this.approvalDate != null && !this.approvalDate.isEmpty();
2101    }
2102
2103    public boolean hasApprovalDate() { 
2104      return this.approvalDate != null && !this.approvalDate.isEmpty();
2105    }
2106
2107    /**
2108     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2109     */
2110    public ChargeItemDefinition setApprovalDateElement(DateType value) { 
2111      this.approvalDate = value;
2112      return this;
2113    }
2114
2115    /**
2116     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2117     */
2118    public Date getApprovalDate() { 
2119      return this.approvalDate == null ? null : this.approvalDate.getValue();
2120    }
2121
2122    /**
2123     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2124     */
2125    public ChargeItemDefinition setApprovalDate(Date value) { 
2126      if (value == null)
2127        this.approvalDate = null;
2128      else {
2129        if (this.approvalDate == null)
2130          this.approvalDate = new DateType();
2131        this.approvalDate.setValue(value);
2132      }
2133      return this;
2134    }
2135
2136    /**
2137     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2138     */
2139    public DateType getLastReviewDateElement() { 
2140      if (this.lastReviewDate == null)
2141        if (Configuration.errorOnAutoCreate())
2142          throw new Error("Attempt to auto-create ChargeItemDefinition.lastReviewDate");
2143        else if (Configuration.doAutoCreate())
2144          this.lastReviewDate = new DateType(); // bb
2145      return this.lastReviewDate;
2146    }
2147
2148    public boolean hasLastReviewDateElement() { 
2149      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2150    }
2151
2152    public boolean hasLastReviewDate() { 
2153      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2154    }
2155
2156    /**
2157     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2158     */
2159    public ChargeItemDefinition setLastReviewDateElement(DateType value) { 
2160      this.lastReviewDate = value;
2161      return this;
2162    }
2163
2164    /**
2165     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2166     */
2167    public Date getLastReviewDate() { 
2168      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
2169    }
2170
2171    /**
2172     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2173     */
2174    public ChargeItemDefinition setLastReviewDate(Date value) { 
2175      if (value == null)
2176        this.lastReviewDate = null;
2177      else {
2178        if (this.lastReviewDate == null)
2179          this.lastReviewDate = new DateType();
2180        this.lastReviewDate.setValue(value);
2181      }
2182      return this;
2183    }
2184
2185    /**
2186     * @return {@link #effectivePeriod} (The period during which the charge item definition content was or is planned to be in active use.)
2187     */
2188    public Period getEffectivePeriod() { 
2189      if (this.effectivePeriod == null)
2190        if (Configuration.errorOnAutoCreate())
2191          throw new Error("Attempt to auto-create ChargeItemDefinition.effectivePeriod");
2192        else if (Configuration.doAutoCreate())
2193          this.effectivePeriod = new Period(); // cc
2194      return this.effectivePeriod;
2195    }
2196
2197    public boolean hasEffectivePeriod() { 
2198      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
2199    }
2200
2201    /**
2202     * @param value {@link #effectivePeriod} (The period during which the charge item definition content was or is planned to be in active use.)
2203     */
2204    public ChargeItemDefinition setEffectivePeriod(Period value) { 
2205      this.effectivePeriod = value;
2206      return this;
2207    }
2208
2209    /**
2210     * @return {@link #code} (The defined billing details in this resource pertain to the given billing code.)
2211     */
2212    public CodeableConcept getCode() { 
2213      if (this.code == null)
2214        if (Configuration.errorOnAutoCreate())
2215          throw new Error("Attempt to auto-create ChargeItemDefinition.code");
2216        else if (Configuration.doAutoCreate())
2217          this.code = new CodeableConcept(); // cc
2218      return this.code;
2219    }
2220
2221    public boolean hasCode() { 
2222      return this.code != null && !this.code.isEmpty();
2223    }
2224
2225    /**
2226     * @param value {@link #code} (The defined billing details in this resource pertain to the given billing code.)
2227     */
2228    public ChargeItemDefinition setCode(CodeableConcept value) { 
2229      this.code = value;
2230      return this;
2231    }
2232
2233    /**
2234     * @return {@link #instance} (The defined billing details in this resource pertain to the given product instance(s).)
2235     */
2236    public List<Reference> getInstance() { 
2237      if (this.instance == null)
2238        this.instance = new ArrayList<Reference>();
2239      return this.instance;
2240    }
2241
2242    /**
2243     * @return Returns a reference to <code>this</code> for easy method chaining
2244     */
2245    public ChargeItemDefinition setInstance(List<Reference> theInstance) { 
2246      this.instance = theInstance;
2247      return this;
2248    }
2249
2250    public boolean hasInstance() { 
2251      if (this.instance == null)
2252        return false;
2253      for (Reference item : this.instance)
2254        if (!item.isEmpty())
2255          return true;
2256      return false;
2257    }
2258
2259    public Reference addInstance() { //3
2260      Reference t = new Reference();
2261      if (this.instance == null)
2262        this.instance = new ArrayList<Reference>();
2263      this.instance.add(t);
2264      return t;
2265    }
2266
2267    public ChargeItemDefinition addInstance(Reference t) { //3
2268      if (t == null)
2269        return this;
2270      if (this.instance == null)
2271        this.instance = new ArrayList<Reference>();
2272      this.instance.add(t);
2273      return this;
2274    }
2275
2276    /**
2277     * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist
2278     */
2279    public Reference getInstanceFirstRep() { 
2280      if (getInstance().isEmpty()) {
2281        addInstance();
2282      }
2283      return getInstance().get(0);
2284    }
2285
2286    /**
2287     * @deprecated Use Reference#setResource(IBaseResource) instead
2288     */
2289    @Deprecated
2290    public List<Resource> getInstanceTarget() { 
2291      if (this.instanceTarget == null)
2292        this.instanceTarget = new ArrayList<Resource>();
2293      return this.instanceTarget;
2294    }
2295
2296    /**
2297     * @return {@link #applicability} (Expressions that describe applicability criteria for the billing code.)
2298     */
2299    public List<ChargeItemDefinitionApplicabilityComponent> getApplicability() { 
2300      if (this.applicability == null)
2301        this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
2302      return this.applicability;
2303    }
2304
2305    /**
2306     * @return Returns a reference to <code>this</code> for easy method chaining
2307     */
2308    public ChargeItemDefinition setApplicability(List<ChargeItemDefinitionApplicabilityComponent> theApplicability) { 
2309      this.applicability = theApplicability;
2310      return this;
2311    }
2312
2313    public boolean hasApplicability() { 
2314      if (this.applicability == null)
2315        return false;
2316      for (ChargeItemDefinitionApplicabilityComponent item : this.applicability)
2317        if (!item.isEmpty())
2318          return true;
2319      return false;
2320    }
2321
2322    public ChargeItemDefinitionApplicabilityComponent addApplicability() { //3
2323      ChargeItemDefinitionApplicabilityComponent t = new ChargeItemDefinitionApplicabilityComponent();
2324      if (this.applicability == null)
2325        this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
2326      this.applicability.add(t);
2327      return t;
2328    }
2329
2330    public ChargeItemDefinition addApplicability(ChargeItemDefinitionApplicabilityComponent t) { //3
2331      if (t == null)
2332        return this;
2333      if (this.applicability == null)
2334        this.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
2335      this.applicability.add(t);
2336      return this;
2337    }
2338
2339    /**
2340     * @return The first repetition of repeating field {@link #applicability}, creating it if it does not already exist
2341     */
2342    public ChargeItemDefinitionApplicabilityComponent getApplicabilityFirstRep() { 
2343      if (getApplicability().isEmpty()) {
2344        addApplicability();
2345      }
2346      return getApplicability().get(0);
2347    }
2348
2349    /**
2350     * @return {@link #propertyGroup} (Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.)
2351     */
2352    public List<ChargeItemDefinitionPropertyGroupComponent> getPropertyGroup() { 
2353      if (this.propertyGroup == null)
2354        this.propertyGroup = new ArrayList<ChargeItemDefinitionPropertyGroupComponent>();
2355      return this.propertyGroup;
2356    }
2357
2358    /**
2359     * @return Returns a reference to <code>this</code> for easy method chaining
2360     */
2361    public ChargeItemDefinition setPropertyGroup(List<ChargeItemDefinitionPropertyGroupComponent> thePropertyGroup) { 
2362      this.propertyGroup = thePropertyGroup;
2363      return this;
2364    }
2365
2366    public boolean hasPropertyGroup() { 
2367      if (this.propertyGroup == null)
2368        return false;
2369      for (ChargeItemDefinitionPropertyGroupComponent item : this.propertyGroup)
2370        if (!item.isEmpty())
2371          return true;
2372      return false;
2373    }
2374
2375    public ChargeItemDefinitionPropertyGroupComponent addPropertyGroup() { //3
2376      ChargeItemDefinitionPropertyGroupComponent t = new ChargeItemDefinitionPropertyGroupComponent();
2377      if (this.propertyGroup == null)
2378        this.propertyGroup = new ArrayList<ChargeItemDefinitionPropertyGroupComponent>();
2379      this.propertyGroup.add(t);
2380      return t;
2381    }
2382
2383    public ChargeItemDefinition addPropertyGroup(ChargeItemDefinitionPropertyGroupComponent t) { //3
2384      if (t == null)
2385        return this;
2386      if (this.propertyGroup == null)
2387        this.propertyGroup = new ArrayList<ChargeItemDefinitionPropertyGroupComponent>();
2388      this.propertyGroup.add(t);
2389      return this;
2390    }
2391
2392    /**
2393     * @return The first repetition of repeating field {@link #propertyGroup}, creating it if it does not already exist
2394     */
2395    public ChargeItemDefinitionPropertyGroupComponent getPropertyGroupFirstRep() { 
2396      if (getPropertyGroup().isEmpty()) {
2397        addPropertyGroup();
2398      }
2399      return getPropertyGroup().get(0);
2400    }
2401
2402      protected void listChildren(List<Property> children) {
2403        super.listChildren(children);
2404        children.add(new Property("url", "uri", "An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.", 0, 1, url));
2405        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
2406        children.add(new Property("version", "string", "The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.", 0, 1, version));
2407        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the charge item definition.", 0, 1, title));
2408        children.add(new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri));
2409        children.add(new Property("partOf", "canonical(ChargeItemDefinition)", "A larger definition of which this particular definition is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf));
2410        children.add(new Property("replaces", "canonical(ChargeItemDefinition)", "As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.", 0, java.lang.Integer.MAX_VALUE, replaces));
2411        children.add(new Property("status", "code", "The current state of the ChargeItemDefinition.", 0, 1, status));
2412        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
2413        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.", 0, 1, date));
2414        children.add(new Property("publisher", "string", "The name of the organization or individual that published the charge item definition.", 0, 1, publisher));
2415        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
2416        children.add(new Property("description", "markdown", "A free text natural language description of the charge item definition from a consumer's perspective.", 0, 1, description));
2417        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate charge item definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2418        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the charge item definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
2419        children.add(new Property("copyright", "markdown", "A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.", 0, 1, copyright));
2420        children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
2421        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate));
2422        children.add(new Property("effectivePeriod", "Period", "The period during which the charge item definition content was or is planned to be in active use.", 0, 1, effectivePeriod));
2423        children.add(new Property("code", "CodeableConcept", "The defined billing details in this resource pertain to the given billing code.", 0, 1, code));
2424        children.add(new Property("instance", "Reference(Medication|Substance|Device)", "The defined billing details in this resource pertain to the given product instance(s).", 0, java.lang.Integer.MAX_VALUE, instance));
2425        children.add(new Property("applicability", "", "Expressions that describe applicability criteria for the billing code.", 0, java.lang.Integer.MAX_VALUE, applicability));
2426        children.add(new Property("propertyGroup", "", "Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.", 0, java.lang.Integer.MAX_VALUE, propertyGroup));
2427      }
2428
2429      @Override
2430      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2431        switch (_hash) {
2432        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.", 0, 1, url);
2433        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
2434        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.", 0, 1, version);
2435        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the charge item definition.", 0, 1, title);
2436        case -1076333435: /*derivedFromUri*/  return new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri);
2437        case -995410646: /*partOf*/  return new Property("partOf", "canonical(ChargeItemDefinition)", "A larger definition of which this particular definition is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf);
2438        case -430332865: /*replaces*/  return new Property("replaces", "canonical(ChargeItemDefinition)", "As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.", 0, java.lang.Integer.MAX_VALUE, replaces);
2439        case -892481550: /*status*/  return new Property("status", "code", "The current state of the ChargeItemDefinition.", 0, 1, status);
2440        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
2441        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.", 0, 1, date);
2442        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the charge item definition.", 0, 1, publisher);
2443        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
2444        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the charge item definition from a consumer's perspective.", 0, 1, description);
2445        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate charge item definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
2446        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the charge item definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
2447        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.", 0, 1, copyright);
2448        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
2449        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate);
2450        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the charge item definition content was or is planned to be in active use.", 0, 1, effectivePeriod);
2451        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The defined billing details in this resource pertain to the given billing code.", 0, 1, code);
2452        case 555127957: /*instance*/  return new Property("instance", "Reference(Medication|Substance|Device)", "The defined billing details in this resource pertain to the given product instance(s).", 0, java.lang.Integer.MAX_VALUE, instance);
2453        case -1526770491: /*applicability*/  return new Property("applicability", "", "Expressions that describe applicability criteria for the billing code.", 0, java.lang.Integer.MAX_VALUE, applicability);
2454        case -1041594966: /*propertyGroup*/  return new Property("propertyGroup", "", "Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.", 0, java.lang.Integer.MAX_VALUE, propertyGroup);
2455        default: return super.getNamedProperty(_hash, _name, _checkValid);
2456        }
2457
2458      }
2459
2460      @Override
2461      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2462        switch (hash) {
2463        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2464        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2465        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2466        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2467        case -1076333435: /*derivedFromUri*/ return this.derivedFromUri == null ? new Base[0] : this.derivedFromUri.toArray(new Base[this.derivedFromUri.size()]); // UriType
2468        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // CanonicalType
2469        case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // CanonicalType
2470        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2471        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2472        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2473        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2474        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2475        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2476        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2477        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2478        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
2479        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
2480        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
2481        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
2482        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
2483        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // Reference
2484        case -1526770491: /*applicability*/ return this.applicability == null ? new Base[0] : this.applicability.toArray(new Base[this.applicability.size()]); // ChargeItemDefinitionApplicabilityComponent
2485        case -1041594966: /*propertyGroup*/ return this.propertyGroup == null ? new Base[0] : this.propertyGroup.toArray(new Base[this.propertyGroup.size()]); // ChargeItemDefinitionPropertyGroupComponent
2486        default: return super.getProperty(hash, name, checkValid);
2487        }
2488
2489      }
2490
2491      @Override
2492      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2493        switch (hash) {
2494        case 116079: // url
2495          this.url = castToUri(value); // UriType
2496          return value;
2497        case -1618432855: // identifier
2498          this.getIdentifier().add(castToIdentifier(value)); // Identifier
2499          return value;
2500        case 351608024: // version
2501          this.version = castToString(value); // StringType
2502          return value;
2503        case 110371416: // title
2504          this.title = castToString(value); // StringType
2505          return value;
2506        case -1076333435: // derivedFromUri
2507          this.getDerivedFromUri().add(castToUri(value)); // UriType
2508          return value;
2509        case -995410646: // partOf
2510          this.getPartOf().add(castToCanonical(value)); // CanonicalType
2511          return value;
2512        case -430332865: // replaces
2513          this.getReplaces().add(castToCanonical(value)); // CanonicalType
2514          return value;
2515        case -892481550: // status
2516          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2517          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2518          return value;
2519        case -404562712: // experimental
2520          this.experimental = castToBoolean(value); // BooleanType
2521          return value;
2522        case 3076014: // date
2523          this.date = castToDateTime(value); // DateTimeType
2524          return value;
2525        case 1447404028: // publisher
2526          this.publisher = castToString(value); // StringType
2527          return value;
2528        case 951526432: // contact
2529          this.getContact().add(castToContactDetail(value)); // ContactDetail
2530          return value;
2531        case -1724546052: // description
2532          this.description = castToMarkdown(value); // MarkdownType
2533          return value;
2534        case -669707736: // useContext
2535          this.getUseContext().add(castToUsageContext(value)); // UsageContext
2536          return value;
2537        case -507075711: // jurisdiction
2538          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
2539          return value;
2540        case 1522889671: // copyright
2541          this.copyright = castToMarkdown(value); // MarkdownType
2542          return value;
2543        case 223539345: // approvalDate
2544          this.approvalDate = castToDate(value); // DateType
2545          return value;
2546        case -1687512484: // lastReviewDate
2547          this.lastReviewDate = castToDate(value); // DateType
2548          return value;
2549        case -403934648: // effectivePeriod
2550          this.effectivePeriod = castToPeriod(value); // Period
2551          return value;
2552        case 3059181: // code
2553          this.code = castToCodeableConcept(value); // CodeableConcept
2554          return value;
2555        case 555127957: // instance
2556          this.getInstance().add(castToReference(value)); // Reference
2557          return value;
2558        case -1526770491: // applicability
2559          this.getApplicability().add((ChargeItemDefinitionApplicabilityComponent) value); // ChargeItemDefinitionApplicabilityComponent
2560          return value;
2561        case -1041594966: // propertyGroup
2562          this.getPropertyGroup().add((ChargeItemDefinitionPropertyGroupComponent) value); // ChargeItemDefinitionPropertyGroupComponent
2563          return value;
2564        default: return super.setProperty(hash, name, value);
2565        }
2566
2567      }
2568
2569      @Override
2570      public Base setProperty(String name, Base value) throws FHIRException {
2571        if (name.equals("url")) {
2572          this.url = castToUri(value); // UriType
2573        } else if (name.equals("identifier")) {
2574          this.getIdentifier().add(castToIdentifier(value));
2575        } else if (name.equals("version")) {
2576          this.version = castToString(value); // StringType
2577        } else if (name.equals("title")) {
2578          this.title = castToString(value); // StringType
2579        } else if (name.equals("derivedFromUri")) {
2580          this.getDerivedFromUri().add(castToUri(value));
2581        } else if (name.equals("partOf")) {
2582          this.getPartOf().add(castToCanonical(value));
2583        } else if (name.equals("replaces")) {
2584          this.getReplaces().add(castToCanonical(value));
2585        } else if (name.equals("status")) {
2586          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2587          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2588        } else if (name.equals("experimental")) {
2589          this.experimental = castToBoolean(value); // BooleanType
2590        } else if (name.equals("date")) {
2591          this.date = castToDateTime(value); // DateTimeType
2592        } else if (name.equals("publisher")) {
2593          this.publisher = castToString(value); // StringType
2594        } else if (name.equals("contact")) {
2595          this.getContact().add(castToContactDetail(value));
2596        } else if (name.equals("description")) {
2597          this.description = castToMarkdown(value); // MarkdownType
2598        } else if (name.equals("useContext")) {
2599          this.getUseContext().add(castToUsageContext(value));
2600        } else if (name.equals("jurisdiction")) {
2601          this.getJurisdiction().add(castToCodeableConcept(value));
2602        } else if (name.equals("copyright")) {
2603          this.copyright = castToMarkdown(value); // MarkdownType
2604        } else if (name.equals("approvalDate")) {
2605          this.approvalDate = castToDate(value); // DateType
2606        } else if (name.equals("lastReviewDate")) {
2607          this.lastReviewDate = castToDate(value); // DateType
2608        } else if (name.equals("effectivePeriod")) {
2609          this.effectivePeriod = castToPeriod(value); // Period
2610        } else if (name.equals("code")) {
2611          this.code = castToCodeableConcept(value); // CodeableConcept
2612        } else if (name.equals("instance")) {
2613          this.getInstance().add(castToReference(value));
2614        } else if (name.equals("applicability")) {
2615          this.getApplicability().add((ChargeItemDefinitionApplicabilityComponent) value);
2616        } else if (name.equals("propertyGroup")) {
2617          this.getPropertyGroup().add((ChargeItemDefinitionPropertyGroupComponent) value);
2618        } else
2619          return super.setProperty(name, value);
2620        return value;
2621      }
2622
2623      @Override
2624      public Base makeProperty(int hash, String name) throws FHIRException {
2625        switch (hash) {
2626        case 116079:  return getUrlElement();
2627        case -1618432855:  return addIdentifier(); 
2628        case 351608024:  return getVersionElement();
2629        case 110371416:  return getTitleElement();
2630        case -1076333435:  return addDerivedFromUriElement();
2631        case -995410646:  return addPartOfElement();
2632        case -430332865:  return addReplacesElement();
2633        case -892481550:  return getStatusElement();
2634        case -404562712:  return getExperimentalElement();
2635        case 3076014:  return getDateElement();
2636        case 1447404028:  return getPublisherElement();
2637        case 951526432:  return addContact(); 
2638        case -1724546052:  return getDescriptionElement();
2639        case -669707736:  return addUseContext(); 
2640        case -507075711:  return addJurisdiction(); 
2641        case 1522889671:  return getCopyrightElement();
2642        case 223539345:  return getApprovalDateElement();
2643        case -1687512484:  return getLastReviewDateElement();
2644        case -403934648:  return getEffectivePeriod(); 
2645        case 3059181:  return getCode(); 
2646        case 555127957:  return addInstance(); 
2647        case -1526770491:  return addApplicability(); 
2648        case -1041594966:  return addPropertyGroup(); 
2649        default: return super.makeProperty(hash, name);
2650        }
2651
2652      }
2653
2654      @Override
2655      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2656        switch (hash) {
2657        case 116079: /*url*/ return new String[] {"uri"};
2658        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2659        case 351608024: /*version*/ return new String[] {"string"};
2660        case 110371416: /*title*/ return new String[] {"string"};
2661        case -1076333435: /*derivedFromUri*/ return new String[] {"uri"};
2662        case -995410646: /*partOf*/ return new String[] {"canonical"};
2663        case -430332865: /*replaces*/ return new String[] {"canonical"};
2664        case -892481550: /*status*/ return new String[] {"code"};
2665        case -404562712: /*experimental*/ return new String[] {"boolean"};
2666        case 3076014: /*date*/ return new String[] {"dateTime"};
2667        case 1447404028: /*publisher*/ return new String[] {"string"};
2668        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
2669        case -1724546052: /*description*/ return new String[] {"markdown"};
2670        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
2671        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
2672        case 1522889671: /*copyright*/ return new String[] {"markdown"};
2673        case 223539345: /*approvalDate*/ return new String[] {"date"};
2674        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
2675        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
2676        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2677        case 555127957: /*instance*/ return new String[] {"Reference"};
2678        case -1526770491: /*applicability*/ return new String[] {};
2679        case -1041594966: /*propertyGroup*/ return new String[] {};
2680        default: return super.getTypesForProperty(hash, name);
2681        }
2682
2683      }
2684
2685      @Override
2686      public Base addChild(String name) throws FHIRException {
2687        if (name.equals("url")) {
2688          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.url");
2689        }
2690        else if (name.equals("identifier")) {
2691          return addIdentifier();
2692        }
2693        else if (name.equals("version")) {
2694          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.version");
2695        }
2696        else if (name.equals("title")) {
2697          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.title");
2698        }
2699        else if (name.equals("derivedFromUri")) {
2700          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.derivedFromUri");
2701        }
2702        else if (name.equals("partOf")) {
2703          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.partOf");
2704        }
2705        else if (name.equals("replaces")) {
2706          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.replaces");
2707        }
2708        else if (name.equals("status")) {
2709          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.status");
2710        }
2711        else if (name.equals("experimental")) {
2712          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.experimental");
2713        }
2714        else if (name.equals("date")) {
2715          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.date");
2716        }
2717        else if (name.equals("publisher")) {
2718          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.publisher");
2719        }
2720        else if (name.equals("contact")) {
2721          return addContact();
2722        }
2723        else if (name.equals("description")) {
2724          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.description");
2725        }
2726        else if (name.equals("useContext")) {
2727          return addUseContext();
2728        }
2729        else if (name.equals("jurisdiction")) {
2730          return addJurisdiction();
2731        }
2732        else if (name.equals("copyright")) {
2733          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.copyright");
2734        }
2735        else if (name.equals("approvalDate")) {
2736          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.approvalDate");
2737        }
2738        else if (name.equals("lastReviewDate")) {
2739          throw new FHIRException("Cannot call addChild on a primitive type ChargeItemDefinition.lastReviewDate");
2740        }
2741        else if (name.equals("effectivePeriod")) {
2742          this.effectivePeriod = new Period();
2743          return this.effectivePeriod;
2744        }
2745        else if (name.equals("code")) {
2746          this.code = new CodeableConcept();
2747          return this.code;
2748        }
2749        else if (name.equals("instance")) {
2750          return addInstance();
2751        }
2752        else if (name.equals("applicability")) {
2753          return addApplicability();
2754        }
2755        else if (name.equals("propertyGroup")) {
2756          return addPropertyGroup();
2757        }
2758        else
2759          return super.addChild(name);
2760      }
2761
2762  public String fhirType() {
2763    return "ChargeItemDefinition";
2764
2765  }
2766
2767      public ChargeItemDefinition copy() {
2768        ChargeItemDefinition dst = new ChargeItemDefinition();
2769        copyValues(dst);
2770        dst.url = url == null ? null : url.copy();
2771        if (identifier != null) {
2772          dst.identifier = new ArrayList<Identifier>();
2773          for (Identifier i : identifier)
2774            dst.identifier.add(i.copy());
2775        };
2776        dst.version = version == null ? null : version.copy();
2777        dst.title = title == null ? null : title.copy();
2778        if (derivedFromUri != null) {
2779          dst.derivedFromUri = new ArrayList<UriType>();
2780          for (UriType i : derivedFromUri)
2781            dst.derivedFromUri.add(i.copy());
2782        };
2783        if (partOf != null) {
2784          dst.partOf = new ArrayList<CanonicalType>();
2785          for (CanonicalType i : partOf)
2786            dst.partOf.add(i.copy());
2787        };
2788        if (replaces != null) {
2789          dst.replaces = new ArrayList<CanonicalType>();
2790          for (CanonicalType i : replaces)
2791            dst.replaces.add(i.copy());
2792        };
2793        dst.status = status == null ? null : status.copy();
2794        dst.experimental = experimental == null ? null : experimental.copy();
2795        dst.date = date == null ? null : date.copy();
2796        dst.publisher = publisher == null ? null : publisher.copy();
2797        if (contact != null) {
2798          dst.contact = new ArrayList<ContactDetail>();
2799          for (ContactDetail i : contact)
2800            dst.contact.add(i.copy());
2801        };
2802        dst.description = description == null ? null : description.copy();
2803        if (useContext != null) {
2804          dst.useContext = new ArrayList<UsageContext>();
2805          for (UsageContext i : useContext)
2806            dst.useContext.add(i.copy());
2807        };
2808        if (jurisdiction != null) {
2809          dst.jurisdiction = new ArrayList<CodeableConcept>();
2810          for (CodeableConcept i : jurisdiction)
2811            dst.jurisdiction.add(i.copy());
2812        };
2813        dst.copyright = copyright == null ? null : copyright.copy();
2814        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
2815        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
2816        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
2817        dst.code = code == null ? null : code.copy();
2818        if (instance != null) {
2819          dst.instance = new ArrayList<Reference>();
2820          for (Reference i : instance)
2821            dst.instance.add(i.copy());
2822        };
2823        if (applicability != null) {
2824          dst.applicability = new ArrayList<ChargeItemDefinitionApplicabilityComponent>();
2825          for (ChargeItemDefinitionApplicabilityComponent i : applicability)
2826            dst.applicability.add(i.copy());
2827        };
2828        if (propertyGroup != null) {
2829          dst.propertyGroup = new ArrayList<ChargeItemDefinitionPropertyGroupComponent>();
2830          for (ChargeItemDefinitionPropertyGroupComponent i : propertyGroup)
2831            dst.propertyGroup.add(i.copy());
2832        };
2833        return dst;
2834      }
2835
2836      protected ChargeItemDefinition typedCopy() {
2837        return copy();
2838      }
2839
2840      @Override
2841      public boolean equalsDeep(Base other_) {
2842        if (!super.equalsDeep(other_))
2843          return false;
2844        if (!(other_ instanceof ChargeItemDefinition))
2845          return false;
2846        ChargeItemDefinition o = (ChargeItemDefinition) other_;
2847        return compareDeep(identifier, o.identifier, true) && compareDeep(derivedFromUri, o.derivedFromUri, true)
2848           && compareDeep(partOf, o.partOf, true) && compareDeep(replaces, o.replaces, true) && compareDeep(copyright, o.copyright, true)
2849           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
2850           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(code, o.code, true) && compareDeep(instance, o.instance, true)
2851           && compareDeep(applicability, o.applicability, true) && compareDeep(propertyGroup, o.propertyGroup, true)
2852          ;
2853      }
2854
2855      @Override
2856      public boolean equalsShallow(Base other_) {
2857        if (!super.equalsShallow(other_))
2858          return false;
2859        if (!(other_ instanceof ChargeItemDefinition))
2860          return false;
2861        ChargeItemDefinition o = (ChargeItemDefinition) other_;
2862        return compareValues(derivedFromUri, o.derivedFromUri, true) && compareValues(copyright, o.copyright, true)
2863           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
2864          ;
2865      }
2866
2867      public boolean isEmpty() {
2868        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, derivedFromUri
2869          , partOf, replaces, copyright, approvalDate, lastReviewDate, effectivePeriod, code
2870          , instance, applicability, propertyGroup);
2871      }
2872
2873  @Override
2874  public ResourceType getResourceType() {
2875    return ResourceType.ChargeItemDefinition;
2876   }
2877
2878 /**
2879   * Search parameter: <b>date</b>
2880   * <p>
2881   * Description: <b>The charge item definition publication date</b><br>
2882   * Type: <b>date</b><br>
2883   * Path: <b>ChargeItemDefinition.date</b><br>
2884   * </p>
2885   */
2886  @SearchParamDefinition(name="date", path="ChargeItemDefinition.date", description="The charge item definition publication date", type="date" )
2887  public static final String SP_DATE = "date";
2888 /**
2889   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2890   * <p>
2891   * Description: <b>The charge item definition publication date</b><br>
2892   * Type: <b>date</b><br>
2893   * Path: <b>ChargeItemDefinition.date</b><br>
2894   * </p>
2895   */
2896  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2897
2898 /**
2899   * Search parameter: <b>identifier</b>
2900   * <p>
2901   * Description: <b>External identifier for the charge item definition</b><br>
2902   * Type: <b>token</b><br>
2903   * Path: <b>ChargeItemDefinition.identifier</b><br>
2904   * </p>
2905   */
2906  @SearchParamDefinition(name="identifier", path="ChargeItemDefinition.identifier", description="External identifier for the charge item definition", type="token" )
2907  public static final String SP_IDENTIFIER = "identifier";
2908 /**
2909   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2910   * <p>
2911   * Description: <b>External identifier for the charge item definition</b><br>
2912   * Type: <b>token</b><br>
2913   * Path: <b>ChargeItemDefinition.identifier</b><br>
2914   * </p>
2915   */
2916  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2917
2918 /**
2919   * Search parameter: <b>context-type-value</b>
2920   * <p>
2921   * Description: <b>A use context type and value assigned to the charge item definition</b><br>
2922   * Type: <b>composite</b><br>
2923   * Path: <b></b><br>
2924   * </p>
2925   */
2926  @SearchParamDefinition(name="context-type-value", path="ChargeItemDefinition.useContext", description="A use context type and value assigned to the charge item definition", type="composite", compositeOf={"context-type", "context"} )
2927  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
2928 /**
2929   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
2930   * <p>
2931   * Description: <b>A use context type and value assigned to the charge item definition</b><br>
2932   * Type: <b>composite</b><br>
2933   * Path: <b></b><br>
2934   * </p>
2935   */
2936  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
2937
2938 /**
2939   * Search parameter: <b>jurisdiction</b>
2940   * <p>
2941   * Description: <b>Intended jurisdiction for the charge item definition</b><br>
2942   * Type: <b>token</b><br>
2943   * Path: <b>ChargeItemDefinition.jurisdiction</b><br>
2944   * </p>
2945   */
2946  @SearchParamDefinition(name="jurisdiction", path="ChargeItemDefinition.jurisdiction", description="Intended jurisdiction for the charge item definition", type="token" )
2947  public static final String SP_JURISDICTION = "jurisdiction";
2948 /**
2949   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
2950   * <p>
2951   * Description: <b>Intended jurisdiction for the charge item definition</b><br>
2952   * Type: <b>token</b><br>
2953   * Path: <b>ChargeItemDefinition.jurisdiction</b><br>
2954   * </p>
2955   */
2956  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
2957
2958 /**
2959   * Search parameter: <b>description</b>
2960   * <p>
2961   * Description: <b>The description of the charge item definition</b><br>
2962   * Type: <b>string</b><br>
2963   * Path: <b>ChargeItemDefinition.description</b><br>
2964   * </p>
2965   */
2966  @SearchParamDefinition(name="description", path="ChargeItemDefinition.description", description="The description of the charge item definition", type="string" )
2967  public static final String SP_DESCRIPTION = "description";
2968 /**
2969   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2970   * <p>
2971   * Description: <b>The description of the charge item definition</b><br>
2972   * Type: <b>string</b><br>
2973   * Path: <b>ChargeItemDefinition.description</b><br>
2974   * </p>
2975   */
2976  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
2977
2978 /**
2979   * Search parameter: <b>context-type</b>
2980   * <p>
2981   * Description: <b>A type of use context assigned to the charge item definition</b><br>
2982   * Type: <b>token</b><br>
2983   * Path: <b>ChargeItemDefinition.useContext.code</b><br>
2984   * </p>
2985   */
2986  @SearchParamDefinition(name="context-type", path="ChargeItemDefinition.useContext.code", description="A type of use context assigned to the charge item definition", type="token" )
2987  public static final String SP_CONTEXT_TYPE = "context-type";
2988 /**
2989   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
2990   * <p>
2991   * Description: <b>A type of use context assigned to the charge item definition</b><br>
2992   * Type: <b>token</b><br>
2993   * Path: <b>ChargeItemDefinition.useContext.code</b><br>
2994   * </p>
2995   */
2996  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
2997
2998 /**
2999   * Search parameter: <b>title</b>
3000   * <p>
3001   * Description: <b>The human-friendly name of the charge item definition</b><br>
3002   * Type: <b>string</b><br>
3003   * Path: <b>ChargeItemDefinition.title</b><br>
3004   * </p>
3005   */
3006  @SearchParamDefinition(name="title", path="ChargeItemDefinition.title", description="The human-friendly name of the charge item definition", type="string" )
3007  public static final String SP_TITLE = "title";
3008 /**
3009   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3010   * <p>
3011   * Description: <b>The human-friendly name of the charge item definition</b><br>
3012   * Type: <b>string</b><br>
3013   * Path: <b>ChargeItemDefinition.title</b><br>
3014   * </p>
3015   */
3016  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3017
3018 /**
3019   * Search parameter: <b>version</b>
3020   * <p>
3021   * Description: <b>The business version of the charge item definition</b><br>
3022   * Type: <b>token</b><br>
3023   * Path: <b>ChargeItemDefinition.version</b><br>
3024   * </p>
3025   */
3026  @SearchParamDefinition(name="version", path="ChargeItemDefinition.version", description="The business version of the charge item definition", type="token" )
3027  public static final String SP_VERSION = "version";
3028 /**
3029   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3030   * <p>
3031   * Description: <b>The business version of the charge item definition</b><br>
3032   * Type: <b>token</b><br>
3033   * Path: <b>ChargeItemDefinition.version</b><br>
3034   * </p>
3035   */
3036  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3037
3038 /**
3039   * Search parameter: <b>url</b>
3040   * <p>
3041   * Description: <b>The uri that identifies the charge item definition</b><br>
3042   * Type: <b>uri</b><br>
3043   * Path: <b>ChargeItemDefinition.url</b><br>
3044   * </p>
3045   */
3046  @SearchParamDefinition(name="url", path="ChargeItemDefinition.url", description="The uri that identifies the charge item definition", type="uri" )
3047  public static final String SP_URL = "url";
3048 /**
3049   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3050   * <p>
3051   * Description: <b>The uri that identifies the charge item definition</b><br>
3052   * Type: <b>uri</b><br>
3053   * Path: <b>ChargeItemDefinition.url</b><br>
3054   * </p>
3055   */
3056  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3057
3058 /**
3059   * Search parameter: <b>context-quantity</b>
3060   * <p>
3061   * Description: <b>A quantity- or range-valued use context assigned to the charge item definition</b><br>
3062   * Type: <b>quantity</b><br>
3063   * Path: <b>ChargeItemDefinition.useContext.valueQuantity, ChargeItemDefinition.useContext.valueRange</b><br>
3064   * </p>
3065   */
3066  @SearchParamDefinition(name="context-quantity", path="(ChargeItemDefinition.useContext.value as Quantity) | (ChargeItemDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the charge item definition", type="quantity" )
3067  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
3068 /**
3069   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
3070   * <p>
3071   * Description: <b>A quantity- or range-valued use context assigned to the charge item definition</b><br>
3072   * Type: <b>quantity</b><br>
3073   * Path: <b>ChargeItemDefinition.useContext.valueQuantity, ChargeItemDefinition.useContext.valueRange</b><br>
3074   * </p>
3075   */
3076  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
3077
3078 /**
3079   * Search parameter: <b>effective</b>
3080   * <p>
3081   * Description: <b>The time during which the charge item definition is intended to be in use</b><br>
3082   * Type: <b>date</b><br>
3083   * Path: <b>ChargeItemDefinition.effectivePeriod</b><br>
3084   * </p>
3085   */
3086  @SearchParamDefinition(name="effective", path="ChargeItemDefinition.effectivePeriod", description="The time during which the charge item definition is intended to be in use", type="date" )
3087  public static final String SP_EFFECTIVE = "effective";
3088 /**
3089   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
3090   * <p>
3091   * Description: <b>The time during which the charge item definition is intended to be in use</b><br>
3092   * Type: <b>date</b><br>
3093   * Path: <b>ChargeItemDefinition.effectivePeriod</b><br>
3094   * </p>
3095   */
3096  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
3097
3098 /**
3099   * Search parameter: <b>context</b>
3100   * <p>
3101   * Description: <b>A use context assigned to the charge item definition</b><br>
3102   * Type: <b>token</b><br>
3103   * Path: <b>ChargeItemDefinition.useContext.valueCodeableConcept</b><br>
3104   * </p>
3105   */
3106  @SearchParamDefinition(name="context", path="(ChargeItemDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the charge item definition", type="token" )
3107  public static final String SP_CONTEXT = "context";
3108 /**
3109   * <b>Fluent Client</b> search parameter constant for <b>context</b>
3110   * <p>
3111   * Description: <b>A use context assigned to the charge item definition</b><br>
3112   * Type: <b>token</b><br>
3113   * Path: <b>ChargeItemDefinition.useContext.valueCodeableConcept</b><br>
3114   * </p>
3115   */
3116  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
3117
3118 /**
3119   * Search parameter: <b>publisher</b>
3120   * <p>
3121   * Description: <b>Name of the publisher of the charge item definition</b><br>
3122   * Type: <b>string</b><br>
3123   * Path: <b>ChargeItemDefinition.publisher</b><br>
3124   * </p>
3125   */
3126  @SearchParamDefinition(name="publisher", path="ChargeItemDefinition.publisher", description="Name of the publisher of the charge item definition", type="string" )
3127  public static final String SP_PUBLISHER = "publisher";
3128 /**
3129   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3130   * <p>
3131   * Description: <b>Name of the publisher of the charge item definition</b><br>
3132   * Type: <b>string</b><br>
3133   * Path: <b>ChargeItemDefinition.publisher</b><br>
3134   * </p>
3135   */
3136  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
3137
3138 /**
3139   * Search parameter: <b>context-type-quantity</b>
3140   * <p>
3141   * Description: <b>A use context type and quantity- or range-based value assigned to the charge item definition</b><br>
3142   * Type: <b>composite</b><br>
3143   * Path: <b></b><br>
3144   * </p>
3145   */
3146  @SearchParamDefinition(name="context-type-quantity", path="ChargeItemDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the charge item definition", type="composite", compositeOf={"context-type", "context-quantity"} )
3147  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
3148 /**
3149   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
3150   * <p>
3151   * Description: <b>A use context type and quantity- or range-based value assigned to the charge item definition</b><br>
3152   * Type: <b>composite</b><br>
3153   * Path: <b></b><br>
3154   * </p>
3155   */
3156  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
3157
3158 /**
3159   * Search parameter: <b>status</b>
3160   * <p>
3161   * Description: <b>The current status of the charge item definition</b><br>
3162   * Type: <b>token</b><br>
3163   * Path: <b>ChargeItemDefinition.status</b><br>
3164   * </p>
3165   */
3166  @SearchParamDefinition(name="status", path="ChargeItemDefinition.status", description="The current status of the charge item definition", type="token" )
3167  public static final String SP_STATUS = "status";
3168 /**
3169   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3170   * <p>
3171   * Description: <b>The current status of the charge item definition</b><br>
3172   * Type: <b>token</b><br>
3173   * Path: <b>ChargeItemDefinition.status</b><br>
3174   * </p>
3175   */
3176  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3177
3178
3179}
3180