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