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