001package org.hl7.fhir.r4b.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The Measure resource provides the definition of a quality measure.
052 */
053@ResourceDef(name="Measure", profile="http://hl7.org/fhir/StructureDefinition/Measure")
054public class Measure extends CanonicalResource {
055
056    @Block()
057    public static class MeasureGroupComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.
060         */
061        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="Meaning of the group", formalDefinition="Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-group-example")
064        protected CodeableConcept code;
065
066        /**
067         * The human readable description of this population group.
068         */
069        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="Summary description", formalDefinition="The human readable description of this population group." )
071        protected StringType description;
072
073        /**
074         * A population criteria for the measure.
075         */
076        @Child(name = "population", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
077        @Description(shortDefinition="Population criteria", formalDefinition="A population criteria for the measure." )
078        protected List<MeasureGroupPopulationComponent> population;
079
080        /**
081         * The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.
082         */
083        @Child(name = "stratifier", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
084        @Description(shortDefinition="Stratifier criteria for the measure", formalDefinition="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path." )
085        protected List<MeasureGroupStratifierComponent> stratifier;
086
087        private static final long serialVersionUID = -1797567579L;
088
089    /**
090     * Constructor
091     */
092      public MeasureGroupComponent() {
093        super();
094      }
095
096        /**
097         * @return {@link #code} (Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.)
098         */
099        public CodeableConcept getCode() { 
100          if (this.code == null)
101            if (Configuration.errorOnAutoCreate())
102              throw new Error("Attempt to auto-create MeasureGroupComponent.code");
103            else if (Configuration.doAutoCreate())
104              this.code = new CodeableConcept(); // cc
105          return this.code;
106        }
107
108        public boolean hasCode() { 
109          return this.code != null && !this.code.isEmpty();
110        }
111
112        /**
113         * @param value {@link #code} (Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.)
114         */
115        public MeasureGroupComponent setCode(CodeableConcept value) { 
116          this.code = value;
117          return this;
118        }
119
120        /**
121         * @return {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
122         */
123        public StringType getDescriptionElement() { 
124          if (this.description == null)
125            if (Configuration.errorOnAutoCreate())
126              throw new Error("Attempt to auto-create MeasureGroupComponent.description");
127            else if (Configuration.doAutoCreate())
128              this.description = new StringType(); // bb
129          return this.description;
130        }
131
132        public boolean hasDescriptionElement() { 
133          return this.description != null && !this.description.isEmpty();
134        }
135
136        public boolean hasDescription() { 
137          return this.description != null && !this.description.isEmpty();
138        }
139
140        /**
141         * @param value {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
142         */
143        public MeasureGroupComponent setDescriptionElement(StringType value) { 
144          this.description = value;
145          return this;
146        }
147
148        /**
149         * @return The human readable description of this population group.
150         */
151        public String getDescription() { 
152          return this.description == null ? null : this.description.getValue();
153        }
154
155        /**
156         * @param value The human readable description of this population group.
157         */
158        public MeasureGroupComponent setDescription(String value) { 
159          if (Utilities.noString(value))
160            this.description = null;
161          else {
162            if (this.description == null)
163              this.description = new StringType();
164            this.description.setValue(value);
165          }
166          return this;
167        }
168
169        /**
170         * @return {@link #population} (A population criteria for the measure.)
171         */
172        public List<MeasureGroupPopulationComponent> getPopulation() { 
173          if (this.population == null)
174            this.population = new ArrayList<MeasureGroupPopulationComponent>();
175          return this.population;
176        }
177
178        /**
179         * @return Returns a reference to <code>this</code> for easy method chaining
180         */
181        public MeasureGroupComponent setPopulation(List<MeasureGroupPopulationComponent> thePopulation) { 
182          this.population = thePopulation;
183          return this;
184        }
185
186        public boolean hasPopulation() { 
187          if (this.population == null)
188            return false;
189          for (MeasureGroupPopulationComponent item : this.population)
190            if (!item.isEmpty())
191              return true;
192          return false;
193        }
194
195        public MeasureGroupPopulationComponent addPopulation() { //3
196          MeasureGroupPopulationComponent t = new MeasureGroupPopulationComponent();
197          if (this.population == null)
198            this.population = new ArrayList<MeasureGroupPopulationComponent>();
199          this.population.add(t);
200          return t;
201        }
202
203        public MeasureGroupComponent addPopulation(MeasureGroupPopulationComponent t) { //3
204          if (t == null)
205            return this;
206          if (this.population == null)
207            this.population = new ArrayList<MeasureGroupPopulationComponent>();
208          this.population.add(t);
209          return this;
210        }
211
212        /**
213         * @return The first repetition of repeating field {@link #population}, creating it if it does not already exist {3}
214         */
215        public MeasureGroupPopulationComponent getPopulationFirstRep() { 
216          if (getPopulation().isEmpty()) {
217            addPopulation();
218          }
219          return getPopulation().get(0);
220        }
221
222        /**
223         * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.)
224         */
225        public List<MeasureGroupStratifierComponent> getStratifier() { 
226          if (this.stratifier == null)
227            this.stratifier = new ArrayList<MeasureGroupStratifierComponent>();
228          return this.stratifier;
229        }
230
231        /**
232         * @return Returns a reference to <code>this</code> for easy method chaining
233         */
234        public MeasureGroupComponent setStratifier(List<MeasureGroupStratifierComponent> theStratifier) { 
235          this.stratifier = theStratifier;
236          return this;
237        }
238
239        public boolean hasStratifier() { 
240          if (this.stratifier == null)
241            return false;
242          for (MeasureGroupStratifierComponent item : this.stratifier)
243            if (!item.isEmpty())
244              return true;
245          return false;
246        }
247
248        public MeasureGroupStratifierComponent addStratifier() { //3
249          MeasureGroupStratifierComponent t = new MeasureGroupStratifierComponent();
250          if (this.stratifier == null)
251            this.stratifier = new ArrayList<MeasureGroupStratifierComponent>();
252          this.stratifier.add(t);
253          return t;
254        }
255
256        public MeasureGroupComponent addStratifier(MeasureGroupStratifierComponent t) { //3
257          if (t == null)
258            return this;
259          if (this.stratifier == null)
260            this.stratifier = new ArrayList<MeasureGroupStratifierComponent>();
261          this.stratifier.add(t);
262          return this;
263        }
264
265        /**
266         * @return The first repetition of repeating field {@link #stratifier}, creating it if it does not already exist {3}
267         */
268        public MeasureGroupStratifierComponent getStratifierFirstRep() { 
269          if (getStratifier().isEmpty()) {
270            addStratifier();
271          }
272          return getStratifier().get(0);
273        }
274
275        protected void listChildren(List<Property> children) {
276          super.listChildren(children);
277          children.add(new Property("code", "CodeableConcept", "Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.", 0, 1, code));
278          children.add(new Property("description", "string", "The human readable description of this population group.", 0, 1, description));
279          children.add(new Property("population", "", "A population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, population));
280          children.add(new Property("stratifier", "", "The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier));
281        }
282
283        @Override
284        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
285          switch (_hash) {
286          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.", 0, 1, code);
287          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of this population group.", 0, 1, description);
288          case -2023558323: /*population*/  return new Property("population", "", "A population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, population);
289          case 90983669: /*stratifier*/  return new Property("stratifier", "", "The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier);
290          default: return super.getNamedProperty(_hash, _name, _checkValid);
291          }
292
293        }
294
295      @Override
296      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
297        switch (hash) {
298        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
299        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
300        case -2023558323: /*population*/ return this.population == null ? new Base[0] : this.population.toArray(new Base[this.population.size()]); // MeasureGroupPopulationComponent
301        case 90983669: /*stratifier*/ return this.stratifier == null ? new Base[0] : this.stratifier.toArray(new Base[this.stratifier.size()]); // MeasureGroupStratifierComponent
302        default: return super.getProperty(hash, name, checkValid);
303        }
304
305      }
306
307      @Override
308      public Base setProperty(int hash, String name, Base value) throws FHIRException {
309        switch (hash) {
310        case 3059181: // code
311          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
312          return value;
313        case -1724546052: // description
314          this.description = TypeConvertor.castToString(value); // StringType
315          return value;
316        case -2023558323: // population
317          this.getPopulation().add((MeasureGroupPopulationComponent) value); // MeasureGroupPopulationComponent
318          return value;
319        case 90983669: // stratifier
320          this.getStratifier().add((MeasureGroupStratifierComponent) value); // MeasureGroupStratifierComponent
321          return value;
322        default: return super.setProperty(hash, name, value);
323        }
324
325      }
326
327      @Override
328      public Base setProperty(String name, Base value) throws FHIRException {
329        if (name.equals("code")) {
330          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
331        } else if (name.equals("description")) {
332          this.description = TypeConvertor.castToString(value); // StringType
333        } else if (name.equals("population")) {
334          this.getPopulation().add((MeasureGroupPopulationComponent) value);
335        } else if (name.equals("stratifier")) {
336          this.getStratifier().add((MeasureGroupStratifierComponent) value);
337        } else
338          return super.setProperty(name, value);
339        return value;
340      }
341
342      @Override
343      public Base makeProperty(int hash, String name) throws FHIRException {
344        switch (hash) {
345        case 3059181:  return getCode();
346        case -1724546052:  return getDescriptionElement();
347        case -2023558323:  return addPopulation(); 
348        case 90983669:  return addStratifier(); 
349        default: return super.makeProperty(hash, name);
350        }
351
352      }
353
354      @Override
355      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
356        switch (hash) {
357        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
358        case -1724546052: /*description*/ return new String[] {"string"};
359        case -2023558323: /*population*/ return new String[] {};
360        case 90983669: /*stratifier*/ return new String[] {};
361        default: return super.getTypesForProperty(hash, name);
362        }
363
364      }
365
366      @Override
367      public Base addChild(String name) throws FHIRException {
368        if (name.equals("code")) {
369          this.code = new CodeableConcept();
370          return this.code;
371        }
372        else if (name.equals("description")) {
373          throw new FHIRException("Cannot call addChild on a primitive type Measure.group.description");
374        }
375        else if (name.equals("population")) {
376          return addPopulation();
377        }
378        else if (name.equals("stratifier")) {
379          return addStratifier();
380        }
381        else
382          return super.addChild(name);
383      }
384
385      public MeasureGroupComponent copy() {
386        MeasureGroupComponent dst = new MeasureGroupComponent();
387        copyValues(dst);
388        return dst;
389      }
390
391      public void copyValues(MeasureGroupComponent dst) {
392        super.copyValues(dst);
393        dst.code = code == null ? null : code.copy();
394        dst.description = description == null ? null : description.copy();
395        if (population != null) {
396          dst.population = new ArrayList<MeasureGroupPopulationComponent>();
397          for (MeasureGroupPopulationComponent i : population)
398            dst.population.add(i.copy());
399        };
400        if (stratifier != null) {
401          dst.stratifier = new ArrayList<MeasureGroupStratifierComponent>();
402          for (MeasureGroupStratifierComponent i : stratifier)
403            dst.stratifier.add(i.copy());
404        };
405      }
406
407      @Override
408      public boolean equalsDeep(Base other_) {
409        if (!super.equalsDeep(other_))
410          return false;
411        if (!(other_ instanceof MeasureGroupComponent))
412          return false;
413        MeasureGroupComponent o = (MeasureGroupComponent) other_;
414        return compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(population, o.population, true)
415           && compareDeep(stratifier, o.stratifier, true);
416      }
417
418      @Override
419      public boolean equalsShallow(Base other_) {
420        if (!super.equalsShallow(other_))
421          return false;
422        if (!(other_ instanceof MeasureGroupComponent))
423          return false;
424        MeasureGroupComponent o = (MeasureGroupComponent) other_;
425        return compareValues(description, o.description, true);
426      }
427
428      public boolean isEmpty() {
429        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, population
430          , stratifier);
431      }
432
433  public String fhirType() {
434    return "Measure.group";
435
436  }
437
438  }
439
440    @Block()
441    public static class MeasureGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement {
442        /**
443         * The type of population criteria.
444         */
445        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
446        @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation", formalDefinition="The type of population criteria." )
447        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-population")
448        protected CodeableConcept code;
449
450        /**
451         * The human readable description of this population criteria.
452         */
453        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
454        @Description(shortDefinition="The human readable description of this population criteria", formalDefinition="The human readable description of this population criteria." )
455        protected StringType description;
456
457        /**
458         * An expression that specifies the criteria for the population, typically the name of an expression in a library.
459         */
460        @Child(name = "criteria", type = {Expression.class}, order=3, min=1, max=1, modifier=false, summary=false)
461        @Description(shortDefinition="The criteria that defines this population", formalDefinition="An expression that specifies the criteria for the population, typically the name of an expression in a library." )
462        protected Expression criteria;
463
464        private static final long serialVersionUID = 2107514056L;
465
466    /**
467     * Constructor
468     */
469      public MeasureGroupPopulationComponent() {
470        super();
471      }
472
473    /**
474     * Constructor
475     */
476      public MeasureGroupPopulationComponent(Expression criteria) {
477        super();
478        this.setCriteria(criteria);
479      }
480
481        /**
482         * @return {@link #code} (The type of population criteria.)
483         */
484        public CodeableConcept getCode() { 
485          if (this.code == null)
486            if (Configuration.errorOnAutoCreate())
487              throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.code");
488            else if (Configuration.doAutoCreate())
489              this.code = new CodeableConcept(); // cc
490          return this.code;
491        }
492
493        public boolean hasCode() { 
494          return this.code != null && !this.code.isEmpty();
495        }
496
497        /**
498         * @param value {@link #code} (The type of population criteria.)
499         */
500        public MeasureGroupPopulationComponent setCode(CodeableConcept value) { 
501          this.code = value;
502          return this;
503        }
504
505        /**
506         * @return {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
507         */
508        public StringType getDescriptionElement() { 
509          if (this.description == null)
510            if (Configuration.errorOnAutoCreate())
511              throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.description");
512            else if (Configuration.doAutoCreate())
513              this.description = new StringType(); // bb
514          return this.description;
515        }
516
517        public boolean hasDescriptionElement() { 
518          return this.description != null && !this.description.isEmpty();
519        }
520
521        public boolean hasDescription() { 
522          return this.description != null && !this.description.isEmpty();
523        }
524
525        /**
526         * @param value {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
527         */
528        public MeasureGroupPopulationComponent setDescriptionElement(StringType value) { 
529          this.description = value;
530          return this;
531        }
532
533        /**
534         * @return The human readable description of this population criteria.
535         */
536        public String getDescription() { 
537          return this.description == null ? null : this.description.getValue();
538        }
539
540        /**
541         * @param value The human readable description of this population criteria.
542         */
543        public MeasureGroupPopulationComponent setDescription(String value) { 
544          if (Utilities.noString(value))
545            this.description = null;
546          else {
547            if (this.description == null)
548              this.description = new StringType();
549            this.description.setValue(value);
550          }
551          return this;
552        }
553
554        /**
555         * @return {@link #criteria} (An expression that specifies the criteria for the population, typically the name of an expression in a library.)
556         */
557        public Expression getCriteria() { 
558          if (this.criteria == null)
559            if (Configuration.errorOnAutoCreate())
560              throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.criteria");
561            else if (Configuration.doAutoCreate())
562              this.criteria = new Expression(); // cc
563          return this.criteria;
564        }
565
566        public boolean hasCriteria() { 
567          return this.criteria != null && !this.criteria.isEmpty();
568        }
569
570        /**
571         * @param value {@link #criteria} (An expression that specifies the criteria for the population, typically the name of an expression in a library.)
572         */
573        public MeasureGroupPopulationComponent setCriteria(Expression value) { 
574          this.criteria = value;
575          return this;
576        }
577
578        protected void listChildren(List<Property> children) {
579          super.listChildren(children);
580          children.add(new Property("code", "CodeableConcept", "The type of population criteria.", 0, 1, code));
581          children.add(new Property("description", "string", "The human readable description of this population criteria.", 0, 1, description));
582          children.add(new Property("criteria", "Expression", "An expression that specifies the criteria for the population, typically the name of an expression in a library.", 0, 1, criteria));
583        }
584
585        @Override
586        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
587          switch (_hash) {
588          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The type of population criteria.", 0, 1, code);
589          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of this population criteria.", 0, 1, description);
590          case 1952046943: /*criteria*/  return new Property("criteria", "Expression", "An expression that specifies the criteria for the population, typically the name of an expression in a library.", 0, 1, criteria);
591          default: return super.getNamedProperty(_hash, _name, _checkValid);
592          }
593
594        }
595
596      @Override
597      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
598        switch (hash) {
599        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
600        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
601        case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // Expression
602        default: return super.getProperty(hash, name, checkValid);
603        }
604
605      }
606
607      @Override
608      public Base setProperty(int hash, String name, Base value) throws FHIRException {
609        switch (hash) {
610        case 3059181: // code
611          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
612          return value;
613        case -1724546052: // description
614          this.description = TypeConvertor.castToString(value); // StringType
615          return value;
616        case 1952046943: // criteria
617          this.criteria = TypeConvertor.castToExpression(value); // Expression
618          return value;
619        default: return super.setProperty(hash, name, value);
620        }
621
622      }
623
624      @Override
625      public Base setProperty(String name, Base value) throws FHIRException {
626        if (name.equals("code")) {
627          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
628        } else if (name.equals("description")) {
629          this.description = TypeConvertor.castToString(value); // StringType
630        } else if (name.equals("criteria")) {
631          this.criteria = TypeConvertor.castToExpression(value); // Expression
632        } else
633          return super.setProperty(name, value);
634        return value;
635      }
636
637      @Override
638      public Base makeProperty(int hash, String name) throws FHIRException {
639        switch (hash) {
640        case 3059181:  return getCode();
641        case -1724546052:  return getDescriptionElement();
642        case 1952046943:  return getCriteria();
643        default: return super.makeProperty(hash, name);
644        }
645
646      }
647
648      @Override
649      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
650        switch (hash) {
651        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
652        case -1724546052: /*description*/ return new String[] {"string"};
653        case 1952046943: /*criteria*/ return new String[] {"Expression"};
654        default: return super.getTypesForProperty(hash, name);
655        }
656
657      }
658
659      @Override
660      public Base addChild(String name) throws FHIRException {
661        if (name.equals("code")) {
662          this.code = new CodeableConcept();
663          return this.code;
664        }
665        else if (name.equals("description")) {
666          throw new FHIRException("Cannot call addChild on a primitive type Measure.group.population.description");
667        }
668        else if (name.equals("criteria")) {
669          this.criteria = new Expression();
670          return this.criteria;
671        }
672        else
673          return super.addChild(name);
674      }
675
676      public MeasureGroupPopulationComponent copy() {
677        MeasureGroupPopulationComponent dst = new MeasureGroupPopulationComponent();
678        copyValues(dst);
679        return dst;
680      }
681
682      public void copyValues(MeasureGroupPopulationComponent dst) {
683        super.copyValues(dst);
684        dst.code = code == null ? null : code.copy();
685        dst.description = description == null ? null : description.copy();
686        dst.criteria = criteria == null ? null : criteria.copy();
687      }
688
689      @Override
690      public boolean equalsDeep(Base other_) {
691        if (!super.equalsDeep(other_))
692          return false;
693        if (!(other_ instanceof MeasureGroupPopulationComponent))
694          return false;
695        MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other_;
696        return compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(criteria, o.criteria, true)
697          ;
698      }
699
700      @Override
701      public boolean equalsShallow(Base other_) {
702        if (!super.equalsShallow(other_))
703          return false;
704        if (!(other_ instanceof MeasureGroupPopulationComponent))
705          return false;
706        MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other_;
707        return compareValues(description, o.description, true);
708      }
709
710      public boolean isEmpty() {
711        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, criteria
712          );
713      }
714
715  public String fhirType() {
716    return "Measure.group.population";
717
718  }
719
720  }
721
722    @Block()
723    public static class MeasureGroupStratifierComponent extends BackboneElement implements IBaseBackboneElement {
724        /**
725         * Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.
726         */
727        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
728        @Description(shortDefinition="Meaning of the stratifier", formalDefinition="Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures." )
729        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-stratifier-example")
730        protected CodeableConcept code;
731
732        /**
733         * The human readable description of this stratifier criteria.
734         */
735        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
736        @Description(shortDefinition="The human readable description of this stratifier", formalDefinition="The human readable description of this stratifier criteria." )
737        protected StringType description;
738
739        /**
740         * An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.
741         */
742        @Child(name = "criteria", type = {Expression.class}, order=3, min=0, max=1, modifier=false, summary=false)
743        @Description(shortDefinition="How the measure should be stratified", formalDefinition="An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element." )
744        protected Expression criteria;
745
746        /**
747         * A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.
748         */
749        @Child(name = "component", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
750        @Description(shortDefinition="Stratifier criteria component for the measure", formalDefinition="A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path." )
751        protected List<MeasureGroupStratifierComponentComponent> component;
752
753        private static final long serialVersionUID = -1706793609L;
754
755    /**
756     * Constructor
757     */
758      public MeasureGroupStratifierComponent() {
759        super();
760      }
761
762        /**
763         * @return {@link #code} (Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.)
764         */
765        public CodeableConcept getCode() { 
766          if (this.code == null)
767            if (Configuration.errorOnAutoCreate())
768              throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.code");
769            else if (Configuration.doAutoCreate())
770              this.code = new CodeableConcept(); // cc
771          return this.code;
772        }
773
774        public boolean hasCode() { 
775          return this.code != null && !this.code.isEmpty();
776        }
777
778        /**
779         * @param value {@link #code} (Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.)
780         */
781        public MeasureGroupStratifierComponent setCode(CodeableConcept value) { 
782          this.code = value;
783          return this;
784        }
785
786        /**
787         * @return {@link #description} (The human readable description of this stratifier criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
788         */
789        public StringType getDescriptionElement() { 
790          if (this.description == null)
791            if (Configuration.errorOnAutoCreate())
792              throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.description");
793            else if (Configuration.doAutoCreate())
794              this.description = new StringType(); // bb
795          return this.description;
796        }
797
798        public boolean hasDescriptionElement() { 
799          return this.description != null && !this.description.isEmpty();
800        }
801
802        public boolean hasDescription() { 
803          return this.description != null && !this.description.isEmpty();
804        }
805
806        /**
807         * @param value {@link #description} (The human readable description of this stratifier criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
808         */
809        public MeasureGroupStratifierComponent setDescriptionElement(StringType value) { 
810          this.description = value;
811          return this;
812        }
813
814        /**
815         * @return The human readable description of this stratifier criteria.
816         */
817        public String getDescription() { 
818          return this.description == null ? null : this.description.getValue();
819        }
820
821        /**
822         * @param value The human readable description of this stratifier criteria.
823         */
824        public MeasureGroupStratifierComponent setDescription(String value) { 
825          if (Utilities.noString(value))
826            this.description = null;
827          else {
828            if (this.description == null)
829              this.description = new StringType();
830            this.description.setValue(value);
831          }
832          return this;
833        }
834
835        /**
836         * @return {@link #criteria} (An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.)
837         */
838        public Expression getCriteria() { 
839          if (this.criteria == null)
840            if (Configuration.errorOnAutoCreate())
841              throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.criteria");
842            else if (Configuration.doAutoCreate())
843              this.criteria = new Expression(); // cc
844          return this.criteria;
845        }
846
847        public boolean hasCriteria() { 
848          return this.criteria != null && !this.criteria.isEmpty();
849        }
850
851        /**
852         * @param value {@link #criteria} (An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.)
853         */
854        public MeasureGroupStratifierComponent setCriteria(Expression value) { 
855          this.criteria = value;
856          return this;
857        }
858
859        /**
860         * @return {@link #component} (A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.)
861         */
862        public List<MeasureGroupStratifierComponentComponent> getComponent() { 
863          if (this.component == null)
864            this.component = new ArrayList<MeasureGroupStratifierComponentComponent>();
865          return this.component;
866        }
867
868        /**
869         * @return Returns a reference to <code>this</code> for easy method chaining
870         */
871        public MeasureGroupStratifierComponent setComponent(List<MeasureGroupStratifierComponentComponent> theComponent) { 
872          this.component = theComponent;
873          return this;
874        }
875
876        public boolean hasComponent() { 
877          if (this.component == null)
878            return false;
879          for (MeasureGroupStratifierComponentComponent item : this.component)
880            if (!item.isEmpty())
881              return true;
882          return false;
883        }
884
885        public MeasureGroupStratifierComponentComponent addComponent() { //3
886          MeasureGroupStratifierComponentComponent t = new MeasureGroupStratifierComponentComponent();
887          if (this.component == null)
888            this.component = new ArrayList<MeasureGroupStratifierComponentComponent>();
889          this.component.add(t);
890          return t;
891        }
892
893        public MeasureGroupStratifierComponent addComponent(MeasureGroupStratifierComponentComponent t) { //3
894          if (t == null)
895            return this;
896          if (this.component == null)
897            this.component = new ArrayList<MeasureGroupStratifierComponentComponent>();
898          this.component.add(t);
899          return this;
900        }
901
902        /**
903         * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3}
904         */
905        public MeasureGroupStratifierComponentComponent getComponentFirstRep() { 
906          if (getComponent().isEmpty()) {
907            addComponent();
908          }
909          return getComponent().get(0);
910        }
911
912        protected void listChildren(List<Property> children) {
913          super.listChildren(children);
914          children.add(new Property("code", "CodeableConcept", "Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", 0, 1, code));
915          children.add(new Property("description", "string", "The human readable description of this stratifier criteria.", 0, 1, description));
916          children.add(new Property("criteria", "Expression", "An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.", 0, 1, criteria));
917          children.add(new Property("component", "", "A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, component));
918        }
919
920        @Override
921        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
922          switch (_hash) {
923          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", 0, 1, code);
924          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of this stratifier criteria.", 0, 1, description);
925          case 1952046943: /*criteria*/  return new Property("criteria", "Expression", "An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.", 0, 1, criteria);
926          case -1399907075: /*component*/  return new Property("component", "", "A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, component);
927          default: return super.getNamedProperty(_hash, _name, _checkValid);
928          }
929
930        }
931
932      @Override
933      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
934        switch (hash) {
935        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
936        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
937        case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // Expression
938        case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // MeasureGroupStratifierComponentComponent
939        default: return super.getProperty(hash, name, checkValid);
940        }
941
942      }
943
944      @Override
945      public Base setProperty(int hash, String name, Base value) throws FHIRException {
946        switch (hash) {
947        case 3059181: // code
948          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
949          return value;
950        case -1724546052: // description
951          this.description = TypeConvertor.castToString(value); // StringType
952          return value;
953        case 1952046943: // criteria
954          this.criteria = TypeConvertor.castToExpression(value); // Expression
955          return value;
956        case -1399907075: // component
957          this.getComponent().add((MeasureGroupStratifierComponentComponent) value); // MeasureGroupStratifierComponentComponent
958          return value;
959        default: return super.setProperty(hash, name, value);
960        }
961
962      }
963
964      @Override
965      public Base setProperty(String name, Base value) throws FHIRException {
966        if (name.equals("code")) {
967          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
968        } else if (name.equals("description")) {
969          this.description = TypeConvertor.castToString(value); // StringType
970        } else if (name.equals("criteria")) {
971          this.criteria = TypeConvertor.castToExpression(value); // Expression
972        } else if (name.equals("component")) {
973          this.getComponent().add((MeasureGroupStratifierComponentComponent) value);
974        } else
975          return super.setProperty(name, value);
976        return value;
977      }
978
979      @Override
980      public Base makeProperty(int hash, String name) throws FHIRException {
981        switch (hash) {
982        case 3059181:  return getCode();
983        case -1724546052:  return getDescriptionElement();
984        case 1952046943:  return getCriteria();
985        case -1399907075:  return addComponent(); 
986        default: return super.makeProperty(hash, name);
987        }
988
989      }
990
991      @Override
992      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
993        switch (hash) {
994        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
995        case -1724546052: /*description*/ return new String[] {"string"};
996        case 1952046943: /*criteria*/ return new String[] {"Expression"};
997        case -1399907075: /*component*/ return new String[] {};
998        default: return super.getTypesForProperty(hash, name);
999        }
1000
1001      }
1002
1003      @Override
1004      public Base addChild(String name) throws FHIRException {
1005        if (name.equals("code")) {
1006          this.code = new CodeableConcept();
1007          return this.code;
1008        }
1009        else if (name.equals("description")) {
1010          throw new FHIRException("Cannot call addChild on a primitive type Measure.group.stratifier.description");
1011        }
1012        else if (name.equals("criteria")) {
1013          this.criteria = new Expression();
1014          return this.criteria;
1015        }
1016        else if (name.equals("component")) {
1017          return addComponent();
1018        }
1019        else
1020          return super.addChild(name);
1021      }
1022
1023      public MeasureGroupStratifierComponent copy() {
1024        MeasureGroupStratifierComponent dst = new MeasureGroupStratifierComponent();
1025        copyValues(dst);
1026        return dst;
1027      }
1028
1029      public void copyValues(MeasureGroupStratifierComponent dst) {
1030        super.copyValues(dst);
1031        dst.code = code == null ? null : code.copy();
1032        dst.description = description == null ? null : description.copy();
1033        dst.criteria = criteria == null ? null : criteria.copy();
1034        if (component != null) {
1035          dst.component = new ArrayList<MeasureGroupStratifierComponentComponent>();
1036          for (MeasureGroupStratifierComponentComponent i : component)
1037            dst.component.add(i.copy());
1038        };
1039      }
1040
1041      @Override
1042      public boolean equalsDeep(Base other_) {
1043        if (!super.equalsDeep(other_))
1044          return false;
1045        if (!(other_ instanceof MeasureGroupStratifierComponent))
1046          return false;
1047        MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other_;
1048        return compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(criteria, o.criteria, true)
1049           && compareDeep(component, o.component, true);
1050      }
1051
1052      @Override
1053      public boolean equalsShallow(Base other_) {
1054        if (!super.equalsShallow(other_))
1055          return false;
1056        if (!(other_ instanceof MeasureGroupStratifierComponent))
1057          return false;
1058        MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other_;
1059        return compareValues(description, o.description, true);
1060      }
1061
1062      public boolean isEmpty() {
1063        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, criteria
1064          , component);
1065      }
1066
1067  public String fhirType() {
1068    return "Measure.group.stratifier";
1069
1070  }
1071
1072  }
1073
1074    @Block()
1075    public static class MeasureGroupStratifierComponentComponent extends BackboneElement implements IBaseBackboneElement {
1076        /**
1077         * Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.
1078         */
1079        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1080        @Description(shortDefinition="Meaning of the stratifier component", formalDefinition="Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures." )
1081        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-stratifier-example")
1082        protected CodeableConcept code;
1083
1084        /**
1085         * The human readable description of this stratifier criteria component.
1086         */
1087        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1088        @Description(shortDefinition="The human readable description of this stratifier component", formalDefinition="The human readable description of this stratifier criteria component." )
1089        protected StringType description;
1090
1091        /**
1092         * An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.
1093         */
1094        @Child(name = "criteria", type = {Expression.class}, order=3, min=1, max=1, modifier=false, summary=false)
1095        @Description(shortDefinition="Component of how the measure should be stratified", formalDefinition="An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element." )
1096        protected Expression criteria;
1097
1098        private static final long serialVersionUID = 2107514056L;
1099
1100    /**
1101     * Constructor
1102     */
1103      public MeasureGroupStratifierComponentComponent() {
1104        super();
1105      }
1106
1107    /**
1108     * Constructor
1109     */
1110      public MeasureGroupStratifierComponentComponent(Expression criteria) {
1111        super();
1112        this.setCriteria(criteria);
1113      }
1114
1115        /**
1116         * @return {@link #code} (Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.)
1117         */
1118        public CodeableConcept getCode() { 
1119          if (this.code == null)
1120            if (Configuration.errorOnAutoCreate())
1121              throw new Error("Attempt to auto-create MeasureGroupStratifierComponentComponent.code");
1122            else if (Configuration.doAutoCreate())
1123              this.code = new CodeableConcept(); // cc
1124          return this.code;
1125        }
1126
1127        public boolean hasCode() { 
1128          return this.code != null && !this.code.isEmpty();
1129        }
1130
1131        /**
1132         * @param value {@link #code} (Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.)
1133         */
1134        public MeasureGroupStratifierComponentComponent setCode(CodeableConcept value) { 
1135          this.code = value;
1136          return this;
1137        }
1138
1139        /**
1140         * @return {@link #description} (The human readable description of this stratifier criteria component.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1141         */
1142        public StringType getDescriptionElement() { 
1143          if (this.description == null)
1144            if (Configuration.errorOnAutoCreate())
1145              throw new Error("Attempt to auto-create MeasureGroupStratifierComponentComponent.description");
1146            else if (Configuration.doAutoCreate())
1147              this.description = new StringType(); // bb
1148          return this.description;
1149        }
1150
1151        public boolean hasDescriptionElement() { 
1152          return this.description != null && !this.description.isEmpty();
1153        }
1154
1155        public boolean hasDescription() { 
1156          return this.description != null && !this.description.isEmpty();
1157        }
1158
1159        /**
1160         * @param value {@link #description} (The human readable description of this stratifier criteria component.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1161         */
1162        public MeasureGroupStratifierComponentComponent setDescriptionElement(StringType value) { 
1163          this.description = value;
1164          return this;
1165        }
1166
1167        /**
1168         * @return The human readable description of this stratifier criteria component.
1169         */
1170        public String getDescription() { 
1171          return this.description == null ? null : this.description.getValue();
1172        }
1173
1174        /**
1175         * @param value The human readable description of this stratifier criteria component.
1176         */
1177        public MeasureGroupStratifierComponentComponent setDescription(String value) { 
1178          if (Utilities.noString(value))
1179            this.description = null;
1180          else {
1181            if (this.description == null)
1182              this.description = new StringType();
1183            this.description.setValue(value);
1184          }
1185          return this;
1186        }
1187
1188        /**
1189         * @return {@link #criteria} (An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.)
1190         */
1191        public Expression getCriteria() { 
1192          if (this.criteria == null)
1193            if (Configuration.errorOnAutoCreate())
1194              throw new Error("Attempt to auto-create MeasureGroupStratifierComponentComponent.criteria");
1195            else if (Configuration.doAutoCreate())
1196              this.criteria = new Expression(); // cc
1197          return this.criteria;
1198        }
1199
1200        public boolean hasCriteria() { 
1201          return this.criteria != null && !this.criteria.isEmpty();
1202        }
1203
1204        /**
1205         * @param value {@link #criteria} (An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.)
1206         */
1207        public MeasureGroupStratifierComponentComponent setCriteria(Expression value) { 
1208          this.criteria = value;
1209          return this;
1210        }
1211
1212        protected void listChildren(List<Property> children) {
1213          super.listChildren(children);
1214          children.add(new Property("code", "CodeableConcept", "Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", 0, 1, code));
1215          children.add(new Property("description", "string", "The human readable description of this stratifier criteria component.", 0, 1, description));
1216          children.add(new Property("criteria", "Expression", "An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.", 0, 1, criteria));
1217        }
1218
1219        @Override
1220        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1221          switch (_hash) {
1222          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.", 0, 1, code);
1223          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of this stratifier criteria component.", 0, 1, description);
1224          case 1952046943: /*criteria*/  return new Property("criteria", "Expression", "An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.", 0, 1, criteria);
1225          default: return super.getNamedProperty(_hash, _name, _checkValid);
1226          }
1227
1228        }
1229
1230      @Override
1231      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1232        switch (hash) {
1233        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1234        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1235        case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // Expression
1236        default: return super.getProperty(hash, name, checkValid);
1237        }
1238
1239      }
1240
1241      @Override
1242      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1243        switch (hash) {
1244        case 3059181: // code
1245          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1246          return value;
1247        case -1724546052: // description
1248          this.description = TypeConvertor.castToString(value); // StringType
1249          return value;
1250        case 1952046943: // criteria
1251          this.criteria = TypeConvertor.castToExpression(value); // Expression
1252          return value;
1253        default: return super.setProperty(hash, name, value);
1254        }
1255
1256      }
1257
1258      @Override
1259      public Base setProperty(String name, Base value) throws FHIRException {
1260        if (name.equals("code")) {
1261          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1262        } else if (name.equals("description")) {
1263          this.description = TypeConvertor.castToString(value); // StringType
1264        } else if (name.equals("criteria")) {
1265          this.criteria = TypeConvertor.castToExpression(value); // Expression
1266        } else
1267          return super.setProperty(name, value);
1268        return value;
1269      }
1270
1271      @Override
1272      public Base makeProperty(int hash, String name) throws FHIRException {
1273        switch (hash) {
1274        case 3059181:  return getCode();
1275        case -1724546052:  return getDescriptionElement();
1276        case 1952046943:  return getCriteria();
1277        default: return super.makeProperty(hash, name);
1278        }
1279
1280      }
1281
1282      @Override
1283      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1284        switch (hash) {
1285        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1286        case -1724546052: /*description*/ return new String[] {"string"};
1287        case 1952046943: /*criteria*/ return new String[] {"Expression"};
1288        default: return super.getTypesForProperty(hash, name);
1289        }
1290
1291      }
1292
1293      @Override
1294      public Base addChild(String name) throws FHIRException {
1295        if (name.equals("code")) {
1296          this.code = new CodeableConcept();
1297          return this.code;
1298        }
1299        else if (name.equals("description")) {
1300          throw new FHIRException("Cannot call addChild on a primitive type Measure.group.stratifier.component.description");
1301        }
1302        else if (name.equals("criteria")) {
1303          this.criteria = new Expression();
1304          return this.criteria;
1305        }
1306        else
1307          return super.addChild(name);
1308      }
1309
1310      public MeasureGroupStratifierComponentComponent copy() {
1311        MeasureGroupStratifierComponentComponent dst = new MeasureGroupStratifierComponentComponent();
1312        copyValues(dst);
1313        return dst;
1314      }
1315
1316      public void copyValues(MeasureGroupStratifierComponentComponent dst) {
1317        super.copyValues(dst);
1318        dst.code = code == null ? null : code.copy();
1319        dst.description = description == null ? null : description.copy();
1320        dst.criteria = criteria == null ? null : criteria.copy();
1321      }
1322
1323      @Override
1324      public boolean equalsDeep(Base other_) {
1325        if (!super.equalsDeep(other_))
1326          return false;
1327        if (!(other_ instanceof MeasureGroupStratifierComponentComponent))
1328          return false;
1329        MeasureGroupStratifierComponentComponent o = (MeasureGroupStratifierComponentComponent) other_;
1330        return compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(criteria, o.criteria, true)
1331          ;
1332      }
1333
1334      @Override
1335      public boolean equalsShallow(Base other_) {
1336        if (!super.equalsShallow(other_))
1337          return false;
1338        if (!(other_ instanceof MeasureGroupStratifierComponentComponent))
1339          return false;
1340        MeasureGroupStratifierComponentComponent o = (MeasureGroupStratifierComponentComponent) other_;
1341        return compareValues(description, o.description, true);
1342      }
1343
1344      public boolean isEmpty() {
1345        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, criteria
1346          );
1347      }
1348
1349  public String fhirType() {
1350    return "Measure.group.stratifier.component";
1351
1352  }
1353
1354  }
1355
1356    @Block()
1357    public static class MeasureSupplementalDataComponent extends BackboneElement implements IBaseBackboneElement {
1358        /**
1359         * Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.
1360         */
1361        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1362        @Description(shortDefinition="Meaning of the supplemental data", formalDefinition="Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures." )
1363        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-supplemental-data-example")
1364        protected CodeableConcept code;
1365
1366        /**
1367         * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.
1368         */
1369        @Child(name = "usage", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1370        @Description(shortDefinition="supplemental-data | risk-adjustment-factor", formalDefinition="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation." )
1371        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-data-usage")
1372        protected List<CodeableConcept> usage;
1373
1374        /**
1375         * The human readable description of this supplemental data.
1376         */
1377        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1378        @Description(shortDefinition="The human readable description of this supplemental data", formalDefinition="The human readable description of this supplemental data." )
1379        protected StringType description;
1380
1381        /**
1382         * The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.
1383         */
1384        @Child(name = "criteria", type = {Expression.class}, order=4, min=1, max=1, modifier=false, summary=false)
1385        @Description(shortDefinition="Expression describing additional data to be reported", formalDefinition="The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element." )
1386        protected Expression criteria;
1387
1388        private static final long serialVersionUID = -1897021670L;
1389
1390    /**
1391     * Constructor
1392     */
1393      public MeasureSupplementalDataComponent() {
1394        super();
1395      }
1396
1397    /**
1398     * Constructor
1399     */
1400      public MeasureSupplementalDataComponent(Expression criteria) {
1401        super();
1402        this.setCriteria(criteria);
1403      }
1404
1405        /**
1406         * @return {@link #code} (Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.)
1407         */
1408        public CodeableConcept getCode() { 
1409          if (this.code == null)
1410            if (Configuration.errorOnAutoCreate())
1411              throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.code");
1412            else if (Configuration.doAutoCreate())
1413              this.code = new CodeableConcept(); // cc
1414          return this.code;
1415        }
1416
1417        public boolean hasCode() { 
1418          return this.code != null && !this.code.isEmpty();
1419        }
1420
1421        /**
1422         * @param value {@link #code} (Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.)
1423         */
1424        public MeasureSupplementalDataComponent setCode(CodeableConcept value) { 
1425          this.code = value;
1426          return this;
1427        }
1428
1429        /**
1430         * @return {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.)
1431         */
1432        public List<CodeableConcept> getUsage() { 
1433          if (this.usage == null)
1434            this.usage = new ArrayList<CodeableConcept>();
1435          return this.usage;
1436        }
1437
1438        /**
1439         * @return Returns a reference to <code>this</code> for easy method chaining
1440         */
1441        public MeasureSupplementalDataComponent setUsage(List<CodeableConcept> theUsage) { 
1442          this.usage = theUsage;
1443          return this;
1444        }
1445
1446        public boolean hasUsage() { 
1447          if (this.usage == null)
1448            return false;
1449          for (CodeableConcept item : this.usage)
1450            if (!item.isEmpty())
1451              return true;
1452          return false;
1453        }
1454
1455        public CodeableConcept addUsage() { //3
1456          CodeableConcept t = new CodeableConcept();
1457          if (this.usage == null)
1458            this.usage = new ArrayList<CodeableConcept>();
1459          this.usage.add(t);
1460          return t;
1461        }
1462
1463        public MeasureSupplementalDataComponent addUsage(CodeableConcept t) { //3
1464          if (t == null)
1465            return this;
1466          if (this.usage == null)
1467            this.usage = new ArrayList<CodeableConcept>();
1468          this.usage.add(t);
1469          return this;
1470        }
1471
1472        /**
1473         * @return The first repetition of repeating field {@link #usage}, creating it if it does not already exist {3}
1474         */
1475        public CodeableConcept getUsageFirstRep() { 
1476          if (getUsage().isEmpty()) {
1477            addUsage();
1478          }
1479          return getUsage().get(0);
1480        }
1481
1482        /**
1483         * @return {@link #description} (The human readable description of this supplemental data.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1484         */
1485        public StringType getDescriptionElement() { 
1486          if (this.description == null)
1487            if (Configuration.errorOnAutoCreate())
1488              throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.description");
1489            else if (Configuration.doAutoCreate())
1490              this.description = new StringType(); // bb
1491          return this.description;
1492        }
1493
1494        public boolean hasDescriptionElement() { 
1495          return this.description != null && !this.description.isEmpty();
1496        }
1497
1498        public boolean hasDescription() { 
1499          return this.description != null && !this.description.isEmpty();
1500        }
1501
1502        /**
1503         * @param value {@link #description} (The human readable description of this supplemental data.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1504         */
1505        public MeasureSupplementalDataComponent setDescriptionElement(StringType value) { 
1506          this.description = value;
1507          return this;
1508        }
1509
1510        /**
1511         * @return The human readable description of this supplemental data.
1512         */
1513        public String getDescription() { 
1514          return this.description == null ? null : this.description.getValue();
1515        }
1516
1517        /**
1518         * @param value The human readable description of this supplemental data.
1519         */
1520        public MeasureSupplementalDataComponent setDescription(String value) { 
1521          if (Utilities.noString(value))
1522            this.description = null;
1523          else {
1524            if (this.description == null)
1525              this.description = new StringType();
1526            this.description.setValue(value);
1527          }
1528          return this;
1529        }
1530
1531        /**
1532         * @return {@link #criteria} (The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.)
1533         */
1534        public Expression getCriteria() { 
1535          if (this.criteria == null)
1536            if (Configuration.errorOnAutoCreate())
1537              throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.criteria");
1538            else if (Configuration.doAutoCreate())
1539              this.criteria = new Expression(); // cc
1540          return this.criteria;
1541        }
1542
1543        public boolean hasCriteria() { 
1544          return this.criteria != null && !this.criteria.isEmpty();
1545        }
1546
1547        /**
1548         * @param value {@link #criteria} (The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.)
1549         */
1550        public MeasureSupplementalDataComponent setCriteria(Expression value) { 
1551          this.criteria = value;
1552          return this;
1553        }
1554
1555        protected void listChildren(List<Property> children) {
1556          super.listChildren(children);
1557          children.add(new Property("code", "CodeableConcept", "Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.", 0, 1, code));
1558          children.add(new Property("usage", "CodeableConcept", "An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.", 0, java.lang.Integer.MAX_VALUE, usage));
1559          children.add(new Property("description", "string", "The human readable description of this supplemental data.", 0, 1, description));
1560          children.add(new Property("criteria", "Expression", "The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.", 0, 1, criteria));
1561        }
1562
1563        @Override
1564        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1565          switch (_hash) {
1566          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.", 0, 1, code);
1567          case 111574433: /*usage*/  return new Property("usage", "CodeableConcept", "An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.", 0, java.lang.Integer.MAX_VALUE, usage);
1568          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of this supplemental data.", 0, 1, description);
1569          case 1952046943: /*criteria*/  return new Property("criteria", "Expression", "The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.", 0, 1, criteria);
1570          default: return super.getNamedProperty(_hash, _name, _checkValid);
1571          }
1572
1573        }
1574
1575      @Override
1576      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1577        switch (hash) {
1578        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1579        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : this.usage.toArray(new Base[this.usage.size()]); // CodeableConcept
1580        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1581        case 1952046943: /*criteria*/ return this.criteria == null ? new Base[0] : new Base[] {this.criteria}; // Expression
1582        default: return super.getProperty(hash, name, checkValid);
1583        }
1584
1585      }
1586
1587      @Override
1588      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1589        switch (hash) {
1590        case 3059181: // code
1591          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1592          return value;
1593        case 111574433: // usage
1594          this.getUsage().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1595          return value;
1596        case -1724546052: // description
1597          this.description = TypeConvertor.castToString(value); // StringType
1598          return value;
1599        case 1952046943: // criteria
1600          this.criteria = TypeConvertor.castToExpression(value); // Expression
1601          return value;
1602        default: return super.setProperty(hash, name, value);
1603        }
1604
1605      }
1606
1607      @Override
1608      public Base setProperty(String name, Base value) throws FHIRException {
1609        if (name.equals("code")) {
1610          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1611        } else if (name.equals("usage")) {
1612          this.getUsage().add(TypeConvertor.castToCodeableConcept(value));
1613        } else if (name.equals("description")) {
1614          this.description = TypeConvertor.castToString(value); // StringType
1615        } else if (name.equals("criteria")) {
1616          this.criteria = TypeConvertor.castToExpression(value); // Expression
1617        } else
1618          return super.setProperty(name, value);
1619        return value;
1620      }
1621
1622      @Override
1623      public Base makeProperty(int hash, String name) throws FHIRException {
1624        switch (hash) {
1625        case 3059181:  return getCode();
1626        case 111574433:  return addUsage(); 
1627        case -1724546052:  return getDescriptionElement();
1628        case 1952046943:  return getCriteria();
1629        default: return super.makeProperty(hash, name);
1630        }
1631
1632      }
1633
1634      @Override
1635      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1636        switch (hash) {
1637        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1638        case 111574433: /*usage*/ return new String[] {"CodeableConcept"};
1639        case -1724546052: /*description*/ return new String[] {"string"};
1640        case 1952046943: /*criteria*/ return new String[] {"Expression"};
1641        default: return super.getTypesForProperty(hash, name);
1642        }
1643
1644      }
1645
1646      @Override
1647      public Base addChild(String name) throws FHIRException {
1648        if (name.equals("code")) {
1649          this.code = new CodeableConcept();
1650          return this.code;
1651        }
1652        else if (name.equals("usage")) {
1653          return addUsage();
1654        }
1655        else if (name.equals("description")) {
1656          throw new FHIRException("Cannot call addChild on a primitive type Measure.supplementalData.description");
1657        }
1658        else if (name.equals("criteria")) {
1659          this.criteria = new Expression();
1660          return this.criteria;
1661        }
1662        else
1663          return super.addChild(name);
1664      }
1665
1666      public MeasureSupplementalDataComponent copy() {
1667        MeasureSupplementalDataComponent dst = new MeasureSupplementalDataComponent();
1668        copyValues(dst);
1669        return dst;
1670      }
1671
1672      public void copyValues(MeasureSupplementalDataComponent dst) {
1673        super.copyValues(dst);
1674        dst.code = code == null ? null : code.copy();
1675        if (usage != null) {
1676          dst.usage = new ArrayList<CodeableConcept>();
1677          for (CodeableConcept i : usage)
1678            dst.usage.add(i.copy());
1679        };
1680        dst.description = description == null ? null : description.copy();
1681        dst.criteria = criteria == null ? null : criteria.copy();
1682      }
1683
1684      @Override
1685      public boolean equalsDeep(Base other_) {
1686        if (!super.equalsDeep(other_))
1687          return false;
1688        if (!(other_ instanceof MeasureSupplementalDataComponent))
1689          return false;
1690        MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other_;
1691        return compareDeep(code, o.code, true) && compareDeep(usage, o.usage, true) && compareDeep(description, o.description, true)
1692           && compareDeep(criteria, o.criteria, true);
1693      }
1694
1695      @Override
1696      public boolean equalsShallow(Base other_) {
1697        if (!super.equalsShallow(other_))
1698          return false;
1699        if (!(other_ instanceof MeasureSupplementalDataComponent))
1700          return false;
1701        MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other_;
1702        return compareValues(description, o.description, true);
1703      }
1704
1705      public boolean isEmpty() {
1706        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, usage, description
1707          , criteria);
1708      }
1709
1710  public String fhirType() {
1711    return "Measure.supplementalData";
1712
1713  }
1714
1715  }
1716
1717    /**
1718     * An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.
1719     */
1720    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1721    @Description(shortDefinition="Canonical identifier for this measure, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers." )
1722    protected UriType url;
1723
1724    /**
1725     * A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.
1726     */
1727    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1728    @Description(shortDefinition="Additional identifier for the measure", formalDefinition="A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1729    protected List<Identifier> identifier;
1730
1731    /**
1732     * The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.
1733     */
1734    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1735    @Description(shortDefinition="Business version of the measure", formalDefinition="The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts." )
1736    protected StringType version;
1737
1738    /**
1739     * A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1740     */
1741    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1742    @Description(shortDefinition="Name for this measure (computer friendly)", formalDefinition="A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
1743    protected StringType name;
1744
1745    /**
1746     * A short, descriptive, user-friendly title for the measure.
1747     */
1748    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1749    @Description(shortDefinition="Name for this measure (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the measure." )
1750    protected StringType title;
1751
1752    /**
1753     * An explanatory or alternate title for the measure giving additional information about its content.
1754     */
1755    @Child(name = "subtitle", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1756    @Description(shortDefinition="Subordinate title of the measure", formalDefinition="An explanatory or alternate title for the measure giving additional information about its content." )
1757    protected StringType subtitle;
1758
1759    /**
1760     * The status of this measure. Enables tracking the life-cycle of the content.
1761     */
1762    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
1763    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this measure. Enables tracking the life-cycle of the content." )
1764    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
1765    protected Enumeration<PublicationStatus> status;
1766
1767    /**
1768     * A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1769     */
1770    @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1771    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
1772    protected BooleanType experimental;
1773
1774    /**
1775     * The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.
1776     */
1777    @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=8, min=0, max=1, modifier=false, summary=false)
1778    @Description(shortDefinition="E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device", formalDefinition="The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything." )
1779    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type")
1780    protected DataType subject;
1781
1782    /**
1783     * The date  (and optionally time) when the measure 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 measure changes.
1784     */
1785    @Child(name = "date", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1786    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the measure 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 measure changes." )
1787    protected DateTimeType date;
1788
1789    /**
1790     * The name of the organization or individual that published the measure.
1791     */
1792    @Child(name = "publisher", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true)
1793    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the measure." )
1794    protected StringType publisher;
1795
1796    /**
1797     * Contact details to assist a user in finding and communicating with the publisher.
1798     */
1799    @Child(name = "contact", type = {ContactDetail.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1800    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
1801    protected List<ContactDetail> contact;
1802
1803    /**
1804     * A free text natural language description of the measure from a consumer's perspective.
1805     */
1806    @Child(name = "description", type = {MarkdownType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1807    @Description(shortDefinition="Natural language description of the measure", formalDefinition="A free text natural language description of the measure from a consumer's perspective." )
1808    protected MarkdownType description;
1809
1810    /**
1811     * 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 measure instances.
1812     */
1813    @Child(name = "useContext", type = {UsageContext.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1814    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="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 measure instances." )
1815    protected List<UsageContext> useContext;
1816
1817    /**
1818     * A legal or geographic region in which the measure is intended to be used.
1819     */
1820    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1821    @Description(shortDefinition="Intended jurisdiction for measure (if applicable)", formalDefinition="A legal or geographic region in which the measure is intended to be used." )
1822    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
1823    protected List<CodeableConcept> jurisdiction;
1824
1825    /**
1826     * Explanation of why this measure is needed and why it has been designed as it has.
1827     */
1828    @Child(name = "purpose", type = {MarkdownType.class}, order=15, min=0, max=1, modifier=false, summary=false)
1829    @Description(shortDefinition="Why this measure is defined", formalDefinition="Explanation of why this measure is needed and why it has been designed as it has." )
1830    protected MarkdownType purpose;
1831
1832    /**
1833     * A detailed description, from a clinical perspective, of how the measure is used.
1834     */
1835    @Child(name = "usage", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false)
1836    @Description(shortDefinition="Describes the clinical usage of the measure", formalDefinition="A detailed description, from a clinical perspective, of how the measure is used." )
1837    protected StringType usage;
1838
1839    /**
1840     * A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.
1841     */
1842    @Child(name = "copyright", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=false)
1843    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure." )
1844    protected MarkdownType copyright;
1845
1846    /**
1847     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1848     */
1849    @Child(name = "approvalDate", type = {DateType.class}, order=18, min=0, max=1, modifier=false, summary=false)
1850    @Description(shortDefinition="When the measure 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." )
1851    protected DateType approvalDate;
1852
1853    /**
1854     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1855     */
1856    @Child(name = "lastReviewDate", type = {DateType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1857    @Description(shortDefinition="When the measure 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." )
1858    protected DateType lastReviewDate;
1859
1860    /**
1861     * The period during which the measure content was or is planned to be in active use.
1862     */
1863    @Child(name = "effectivePeriod", type = {Period.class}, order=20, min=0, max=1, modifier=false, summary=true)
1864    @Description(shortDefinition="When the measure is expected to be used", formalDefinition="The period during which the measure content was or is planned to be in active use." )
1865    protected Period effectivePeriod;
1866
1867    /**
1868     * Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.
1869     */
1870    @Child(name = "topic", type = {CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1871    @Description(shortDefinition="The category of the measure, such as Education, Treatment, Assessment, etc.", formalDefinition="Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching." )
1872    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
1873    protected List<CodeableConcept> topic;
1874
1875    /**
1876     * An individiual or organization primarily involved in the creation and maintenance of the content.
1877     */
1878    @Child(name = "author", type = {ContactDetail.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1879    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." )
1880    protected List<ContactDetail> author;
1881
1882    /**
1883     * An individual or organization primarily responsible for internal coherence of the content.
1884     */
1885    @Child(name = "editor", type = {ContactDetail.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1886    @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." )
1887    protected List<ContactDetail> editor;
1888
1889    /**
1890     * An individual or organization primarily responsible for review of some aspect of the content.
1891     */
1892    @Child(name = "reviewer", type = {ContactDetail.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1893    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." )
1894    protected List<ContactDetail> reviewer;
1895
1896    /**
1897     * An individual or organization responsible for officially endorsing the content for use in some setting.
1898     */
1899    @Child(name = "endorser", type = {ContactDetail.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1900    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." )
1901    protected List<ContactDetail> endorser;
1902
1903    /**
1904     * Related artifacts such as additional documentation, justification, or bibliographic references.
1905     */
1906    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1907    @Description(shortDefinition="Additional documentation, citations, etc.", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
1908    protected List<RelatedArtifact> relatedArtifact;
1909
1910    /**
1911     * A reference to a Library resource containing the formal logic used by the measure.
1912     */
1913    @Child(name = "library", type = {CanonicalType.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1914    @Description(shortDefinition="Logic used by the measure", formalDefinition="A reference to a Library resource containing the formal logic used by the measure." )
1915    protected List<CanonicalType> library;
1916
1917    /**
1918     * Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.
1919     */
1920    @Child(name = "disclaimer", type = {MarkdownType.class}, order=28, min=0, max=1, modifier=false, summary=true)
1921    @Description(shortDefinition="Disclaimer for use of the measure or its referenced content", formalDefinition="Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure." )
1922    protected MarkdownType disclaimer;
1923
1924    /**
1925     * Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.
1926     */
1927    @Child(name = "scoring", type = {CodeableConcept.class}, order=29, min=0, max=1, modifier=false, summary=true)
1928    @Description(shortDefinition="proportion | ratio | continuous-variable | cohort", formalDefinition="Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented." )
1929    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-scoring")
1930    protected CodeableConcept scoring;
1931
1932    /**
1933     * If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.
1934     */
1935    @Child(name = "compositeScoring", type = {CodeableConcept.class}, order=30, min=0, max=1, modifier=false, summary=true)
1936    @Description(shortDefinition="opportunity | all-or-nothing | linear | weighted", formalDefinition="If this is a composite measure, the scoring method used to combine the component measures to determine the composite score." )
1937    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/composite-measure-scoring")
1938    protected CodeableConcept compositeScoring;
1939
1940    /**
1941     * Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.
1942     */
1943    @Child(name = "type", type = {CodeableConcept.class}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1944    @Description(shortDefinition="process | outcome | structure | patient-reported-outcome | composite", formalDefinition="Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization." )
1945    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-type")
1946    protected List<CodeableConcept> type;
1947
1948    /**
1949     * A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.
1950     */
1951    @Child(name = "riskAdjustment", type = {StringType.class}, order=32, min=0, max=1, modifier=false, summary=true)
1952    @Description(shortDefinition="How risk adjustment is applied for this measure", formalDefinition="A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results." )
1953    protected StringType riskAdjustment;
1954
1955    /**
1956     * Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.
1957     */
1958    @Child(name = "rateAggregation", type = {StringType.class}, order=33, min=0, max=1, modifier=false, summary=true)
1959    @Description(shortDefinition="How is rate aggregation performed for this measure", formalDefinition="Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result." )
1960    protected StringType rateAggregation;
1961
1962    /**
1963     * Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.
1964     */
1965    @Child(name = "rationale", type = {MarkdownType.class}, order=34, min=0, max=1, modifier=false, summary=true)
1966    @Description(shortDefinition="Detailed description of why the measure exists", formalDefinition="Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence." )
1967    protected MarkdownType rationale;
1968
1969    /**
1970     * Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.
1971     */
1972    @Child(name = "clinicalRecommendationStatement", type = {MarkdownType.class}, order=35, min=0, max=1, modifier=false, summary=true)
1973    @Description(shortDefinition="Summary of clinical guidelines", formalDefinition="Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure." )
1974    protected MarkdownType clinicalRecommendationStatement;
1975
1976    /**
1977     * Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).
1978     */
1979    @Child(name = "improvementNotation", type = {CodeableConcept.class}, order=36, min=0, max=1, modifier=false, summary=true)
1980    @Description(shortDefinition="increase | decrease", formalDefinition="Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range)." )
1981    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-improvement-notation")
1982    protected CodeableConcept improvementNotation;
1983
1984    /**
1985     * Provides a description of an individual term used within the measure.
1986     */
1987    @Child(name = "definition", type = {MarkdownType.class}, order=37, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1988    @Description(shortDefinition="Defined terms used in the measure documentation", formalDefinition="Provides a description of an individual term used within the measure." )
1989    protected List<MarkdownType> definition;
1990
1991    /**
1992     * Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.
1993     */
1994    @Child(name = "guidance", type = {MarkdownType.class}, order=38, min=0, max=1, modifier=false, summary=true)
1995    @Description(shortDefinition="Additional guidance for implementers", formalDefinition="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure." )
1996    protected MarkdownType guidance;
1997
1998    /**
1999     * A group of population criteria for the measure.
2000     */
2001    @Child(name = "group", type = {}, order=39, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2002    @Description(shortDefinition="Population criteria group", formalDefinition="A group of population criteria for the measure." )
2003    protected List<MeasureGroupComponent> group;
2004
2005    /**
2006     * The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.
2007     */
2008    @Child(name = "supplementalData", type = {}, order=40, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2009    @Description(shortDefinition="What other data should be reported with the measure", formalDefinition="The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path." )
2010    protected List<MeasureSupplementalDataComponent> supplementalData;
2011
2012    private static final long serialVersionUID = -994119782L;
2013
2014  /**
2015   * Constructor
2016   */
2017    public Measure() {
2018      super();
2019    }
2020
2021  /**
2022   * Constructor
2023   */
2024    public Measure(PublicationStatus status) {
2025      super();
2026      this.setStatus(status);
2027    }
2028
2029    /**
2030     * @return {@link #url} (An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2031     */
2032    public UriType getUrlElement() { 
2033      if (this.url == null)
2034        if (Configuration.errorOnAutoCreate())
2035          throw new Error("Attempt to auto-create Measure.url");
2036        else if (Configuration.doAutoCreate())
2037          this.url = new UriType(); // bb
2038      return this.url;
2039    }
2040
2041    public boolean hasUrlElement() { 
2042      return this.url != null && !this.url.isEmpty();
2043    }
2044
2045    public boolean hasUrl() { 
2046      return this.url != null && !this.url.isEmpty();
2047    }
2048
2049    /**
2050     * @param value {@link #url} (An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2051     */
2052    public Measure setUrlElement(UriType value) { 
2053      this.url = value;
2054      return this;
2055    }
2056
2057    /**
2058     * @return An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.
2059     */
2060    public String getUrl() { 
2061      return this.url == null ? null : this.url.getValue();
2062    }
2063
2064    /**
2065     * @param value An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.
2066     */
2067    public Measure setUrl(String value) { 
2068      if (Utilities.noString(value))
2069        this.url = null;
2070      else {
2071        if (this.url == null)
2072          this.url = new UriType();
2073        this.url.setValue(value);
2074      }
2075      return this;
2076    }
2077
2078    /**
2079     * @return {@link #identifier} (A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.)
2080     */
2081    public List<Identifier> getIdentifier() { 
2082      if (this.identifier == null)
2083        this.identifier = new ArrayList<Identifier>();
2084      return this.identifier;
2085    }
2086
2087    /**
2088     * @return Returns a reference to <code>this</code> for easy method chaining
2089     */
2090    public Measure setIdentifier(List<Identifier> theIdentifier) { 
2091      this.identifier = theIdentifier;
2092      return this;
2093    }
2094
2095    public boolean hasIdentifier() { 
2096      if (this.identifier == null)
2097        return false;
2098      for (Identifier item : this.identifier)
2099        if (!item.isEmpty())
2100          return true;
2101      return false;
2102    }
2103
2104    public Identifier addIdentifier() { //3
2105      Identifier t = new Identifier();
2106      if (this.identifier == null)
2107        this.identifier = new ArrayList<Identifier>();
2108      this.identifier.add(t);
2109      return t;
2110    }
2111
2112    public Measure addIdentifier(Identifier t) { //3
2113      if (t == null)
2114        return this;
2115      if (this.identifier == null)
2116        this.identifier = new ArrayList<Identifier>();
2117      this.identifier.add(t);
2118      return this;
2119    }
2120
2121    /**
2122     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
2123     */
2124    public Identifier getIdentifierFirstRep() { 
2125      if (getIdentifier().isEmpty()) {
2126        addIdentifier();
2127      }
2128      return getIdentifier().get(0);
2129    }
2130
2131    /**
2132     * @return {@link #version} (The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2133     */
2134    public StringType getVersionElement() { 
2135      if (this.version == null)
2136        if (Configuration.errorOnAutoCreate())
2137          throw new Error("Attempt to auto-create Measure.version");
2138        else if (Configuration.doAutoCreate())
2139          this.version = new StringType(); // bb
2140      return this.version;
2141    }
2142
2143    public boolean hasVersionElement() { 
2144      return this.version != null && !this.version.isEmpty();
2145    }
2146
2147    public boolean hasVersion() { 
2148      return this.version != null && !this.version.isEmpty();
2149    }
2150
2151    /**
2152     * @param value {@link #version} (The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2153     */
2154    public Measure setVersionElement(StringType value) { 
2155      this.version = value;
2156      return this;
2157    }
2158
2159    /**
2160     * @return The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.
2161     */
2162    public String getVersion() { 
2163      return this.version == null ? null : this.version.getValue();
2164    }
2165
2166    /**
2167     * @param value The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.
2168     */
2169    public Measure setVersion(String value) { 
2170      if (Utilities.noString(value))
2171        this.version = null;
2172      else {
2173        if (this.version == null)
2174          this.version = new StringType();
2175        this.version.setValue(value);
2176      }
2177      return this;
2178    }
2179
2180    /**
2181     * @return {@link #name} (A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2182     */
2183    public StringType getNameElement() { 
2184      if (this.name == null)
2185        if (Configuration.errorOnAutoCreate())
2186          throw new Error("Attempt to auto-create Measure.name");
2187        else if (Configuration.doAutoCreate())
2188          this.name = new StringType(); // bb
2189      return this.name;
2190    }
2191
2192    public boolean hasNameElement() { 
2193      return this.name != null && !this.name.isEmpty();
2194    }
2195
2196    public boolean hasName() { 
2197      return this.name != null && !this.name.isEmpty();
2198    }
2199
2200    /**
2201     * @param value {@link #name} (A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2202     */
2203    public Measure setNameElement(StringType value) { 
2204      this.name = value;
2205      return this;
2206    }
2207
2208    /**
2209     * @return A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2210     */
2211    public String getName() { 
2212      return this.name == null ? null : this.name.getValue();
2213    }
2214
2215    /**
2216     * @param value A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2217     */
2218    public Measure setName(String value) { 
2219      if (Utilities.noString(value))
2220        this.name = null;
2221      else {
2222        if (this.name == null)
2223          this.name = new StringType();
2224        this.name.setValue(value);
2225      }
2226      return this;
2227    }
2228
2229    /**
2230     * @return {@link #title} (A short, descriptive, user-friendly title for the measure.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2231     */
2232    public StringType getTitleElement() { 
2233      if (this.title == null)
2234        if (Configuration.errorOnAutoCreate())
2235          throw new Error("Attempt to auto-create Measure.title");
2236        else if (Configuration.doAutoCreate())
2237          this.title = new StringType(); // bb
2238      return this.title;
2239    }
2240
2241    public boolean hasTitleElement() { 
2242      return this.title != null && !this.title.isEmpty();
2243    }
2244
2245    public boolean hasTitle() { 
2246      return this.title != null && !this.title.isEmpty();
2247    }
2248
2249    /**
2250     * @param value {@link #title} (A short, descriptive, user-friendly title for the measure.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2251     */
2252    public Measure setTitleElement(StringType value) { 
2253      this.title = value;
2254      return this;
2255    }
2256
2257    /**
2258     * @return A short, descriptive, user-friendly title for the measure.
2259     */
2260    public String getTitle() { 
2261      return this.title == null ? null : this.title.getValue();
2262    }
2263
2264    /**
2265     * @param value A short, descriptive, user-friendly title for the measure.
2266     */
2267    public Measure setTitle(String value) { 
2268      if (Utilities.noString(value))
2269        this.title = null;
2270      else {
2271        if (this.title == null)
2272          this.title = new StringType();
2273        this.title.setValue(value);
2274      }
2275      return this;
2276    }
2277
2278    /**
2279     * @return {@link #subtitle} (An explanatory or alternate title for the measure giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
2280     */
2281    public StringType getSubtitleElement() { 
2282      if (this.subtitle == null)
2283        if (Configuration.errorOnAutoCreate())
2284          throw new Error("Attempt to auto-create Measure.subtitle");
2285        else if (Configuration.doAutoCreate())
2286          this.subtitle = new StringType(); // bb
2287      return this.subtitle;
2288    }
2289
2290    public boolean hasSubtitleElement() { 
2291      return this.subtitle != null && !this.subtitle.isEmpty();
2292    }
2293
2294    public boolean hasSubtitle() { 
2295      return this.subtitle != null && !this.subtitle.isEmpty();
2296    }
2297
2298    /**
2299     * @param value {@link #subtitle} (An explanatory or alternate title for the measure giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
2300     */
2301    public Measure setSubtitleElement(StringType value) { 
2302      this.subtitle = value;
2303      return this;
2304    }
2305
2306    /**
2307     * @return An explanatory or alternate title for the measure giving additional information about its content.
2308     */
2309    public String getSubtitle() { 
2310      return this.subtitle == null ? null : this.subtitle.getValue();
2311    }
2312
2313    /**
2314     * @param value An explanatory or alternate title for the measure giving additional information about its content.
2315     */
2316    public Measure setSubtitle(String value) { 
2317      if (Utilities.noString(value))
2318        this.subtitle = null;
2319      else {
2320        if (this.subtitle == null)
2321          this.subtitle = new StringType();
2322        this.subtitle.setValue(value);
2323      }
2324      return this;
2325    }
2326
2327    /**
2328     * @return {@link #status} (The status of this measure. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2329     */
2330    public Enumeration<PublicationStatus> getStatusElement() { 
2331      if (this.status == null)
2332        if (Configuration.errorOnAutoCreate())
2333          throw new Error("Attempt to auto-create Measure.status");
2334        else if (Configuration.doAutoCreate())
2335          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2336      return this.status;
2337    }
2338
2339    public boolean hasStatusElement() { 
2340      return this.status != null && !this.status.isEmpty();
2341    }
2342
2343    public boolean hasStatus() { 
2344      return this.status != null && !this.status.isEmpty();
2345    }
2346
2347    /**
2348     * @param value {@link #status} (The status of this measure. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2349     */
2350    public Measure setStatusElement(Enumeration<PublicationStatus> value) { 
2351      this.status = value;
2352      return this;
2353    }
2354
2355    /**
2356     * @return The status of this measure. Enables tracking the life-cycle of the content.
2357     */
2358    public PublicationStatus getStatus() { 
2359      return this.status == null ? null : this.status.getValue();
2360    }
2361
2362    /**
2363     * @param value The status of this measure. Enables tracking the life-cycle of the content.
2364     */
2365    public Measure setStatus(PublicationStatus value) { 
2366        if (this.status == null)
2367          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2368        this.status.setValue(value);
2369      return this;
2370    }
2371
2372    /**
2373     * @return {@link #experimental} (A Boolean value to indicate that this measure 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
2374     */
2375    public BooleanType getExperimentalElement() { 
2376      if (this.experimental == null)
2377        if (Configuration.errorOnAutoCreate())
2378          throw new Error("Attempt to auto-create Measure.experimental");
2379        else if (Configuration.doAutoCreate())
2380          this.experimental = new BooleanType(); // bb
2381      return this.experimental;
2382    }
2383
2384    public boolean hasExperimentalElement() { 
2385      return this.experimental != null && !this.experimental.isEmpty();
2386    }
2387
2388    public boolean hasExperimental() { 
2389      return this.experimental != null && !this.experimental.isEmpty();
2390    }
2391
2392    /**
2393     * @param value {@link #experimental} (A Boolean value to indicate that this measure 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
2394     */
2395    public Measure setExperimentalElement(BooleanType value) { 
2396      this.experimental = value;
2397      return this;
2398    }
2399
2400    /**
2401     * @return A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2402     */
2403    public boolean getExperimental() { 
2404      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2405    }
2406
2407    /**
2408     * @param value A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2409     */
2410    public Measure setExperimental(boolean value) { 
2411        if (this.experimental == null)
2412          this.experimental = new BooleanType();
2413        this.experimental.setValue(value);
2414      return this;
2415    }
2416
2417    /**
2418     * @return {@link #subject} (The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.)
2419     */
2420    public DataType getSubject() { 
2421      return this.subject;
2422    }
2423
2424    /**
2425     * @return {@link #subject} (The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.)
2426     */
2427    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
2428      if (this.subject == null)
2429        this.subject = new CodeableConcept();
2430      if (!(this.subject instanceof CodeableConcept))
2431        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
2432      return (CodeableConcept) this.subject;
2433    }
2434
2435    public boolean hasSubjectCodeableConcept() { 
2436      return this != null && this.subject instanceof CodeableConcept;
2437    }
2438
2439    /**
2440     * @return {@link #subject} (The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.)
2441     */
2442    public Reference getSubjectReference() throws FHIRException { 
2443      if (this.subject == null)
2444        this.subject = new Reference();
2445      if (!(this.subject instanceof Reference))
2446        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
2447      return (Reference) this.subject;
2448    }
2449
2450    public boolean hasSubjectReference() { 
2451      return this != null && this.subject instanceof Reference;
2452    }
2453
2454    public boolean hasSubject() { 
2455      return this.subject != null && !this.subject.isEmpty();
2456    }
2457
2458    /**
2459     * @param value {@link #subject} (The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.)
2460     */
2461    public Measure setSubject(DataType value) { 
2462      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
2463        throw new Error("Not the right type for Measure.subject[x]: "+value.fhirType());
2464      this.subject = value;
2465      return this;
2466    }
2467
2468    /**
2469     * @return {@link #date} (The date  (and optionally time) when the measure 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 measure changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2470     */
2471    public DateTimeType getDateElement() { 
2472      if (this.date == null)
2473        if (Configuration.errorOnAutoCreate())
2474          throw new Error("Attempt to auto-create Measure.date");
2475        else if (Configuration.doAutoCreate())
2476          this.date = new DateTimeType(); // bb
2477      return this.date;
2478    }
2479
2480    public boolean hasDateElement() { 
2481      return this.date != null && !this.date.isEmpty();
2482    }
2483
2484    public boolean hasDate() { 
2485      return this.date != null && !this.date.isEmpty();
2486    }
2487
2488    /**
2489     * @param value {@link #date} (The date  (and optionally time) when the measure 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 measure changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2490     */
2491    public Measure setDateElement(DateTimeType value) { 
2492      this.date = value;
2493      return this;
2494    }
2495
2496    /**
2497     * @return The date  (and optionally time) when the measure 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 measure changes.
2498     */
2499    public Date getDate() { 
2500      return this.date == null ? null : this.date.getValue();
2501    }
2502
2503    /**
2504     * @param value The date  (and optionally time) when the measure 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 measure changes.
2505     */
2506    public Measure setDate(Date value) { 
2507      if (value == null)
2508        this.date = null;
2509      else {
2510        if (this.date == null)
2511          this.date = new DateTimeType();
2512        this.date.setValue(value);
2513      }
2514      return this;
2515    }
2516
2517    /**
2518     * @return {@link #publisher} (The name of the organization or individual that published the measure.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2519     */
2520    public StringType getPublisherElement() { 
2521      if (this.publisher == null)
2522        if (Configuration.errorOnAutoCreate())
2523          throw new Error("Attempt to auto-create Measure.publisher");
2524        else if (Configuration.doAutoCreate())
2525          this.publisher = new StringType(); // bb
2526      return this.publisher;
2527    }
2528
2529    public boolean hasPublisherElement() { 
2530      return this.publisher != null && !this.publisher.isEmpty();
2531    }
2532
2533    public boolean hasPublisher() { 
2534      return this.publisher != null && !this.publisher.isEmpty();
2535    }
2536
2537    /**
2538     * @param value {@link #publisher} (The name of the organization or individual that published the measure.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2539     */
2540    public Measure setPublisherElement(StringType value) { 
2541      this.publisher = value;
2542      return this;
2543    }
2544
2545    /**
2546     * @return The name of the organization or individual that published the measure.
2547     */
2548    public String getPublisher() { 
2549      return this.publisher == null ? null : this.publisher.getValue();
2550    }
2551
2552    /**
2553     * @param value The name of the organization or individual that published the measure.
2554     */
2555    public Measure setPublisher(String value) { 
2556      if (Utilities.noString(value))
2557        this.publisher = null;
2558      else {
2559        if (this.publisher == null)
2560          this.publisher = new StringType();
2561        this.publisher.setValue(value);
2562      }
2563      return this;
2564    }
2565
2566    /**
2567     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2568     */
2569    public List<ContactDetail> getContact() { 
2570      if (this.contact == null)
2571        this.contact = new ArrayList<ContactDetail>();
2572      return this.contact;
2573    }
2574
2575    /**
2576     * @return Returns a reference to <code>this</code> for easy method chaining
2577     */
2578    public Measure setContact(List<ContactDetail> theContact) { 
2579      this.contact = theContact;
2580      return this;
2581    }
2582
2583    public boolean hasContact() { 
2584      if (this.contact == null)
2585        return false;
2586      for (ContactDetail item : this.contact)
2587        if (!item.isEmpty())
2588          return true;
2589      return false;
2590    }
2591
2592    public ContactDetail addContact() { //3
2593      ContactDetail t = new ContactDetail();
2594      if (this.contact == null)
2595        this.contact = new ArrayList<ContactDetail>();
2596      this.contact.add(t);
2597      return t;
2598    }
2599
2600    public Measure addContact(ContactDetail t) { //3
2601      if (t == null)
2602        return this;
2603      if (this.contact == null)
2604        this.contact = new ArrayList<ContactDetail>();
2605      this.contact.add(t);
2606      return this;
2607    }
2608
2609    /**
2610     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
2611     */
2612    public ContactDetail getContactFirstRep() { 
2613      if (getContact().isEmpty()) {
2614        addContact();
2615      }
2616      return getContact().get(0);
2617    }
2618
2619    /**
2620     * @return {@link #description} (A free text natural language description of the measure from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2621     */
2622    public MarkdownType getDescriptionElement() { 
2623      if (this.description == null)
2624        if (Configuration.errorOnAutoCreate())
2625          throw new Error("Attempt to auto-create Measure.description");
2626        else if (Configuration.doAutoCreate())
2627          this.description = new MarkdownType(); // bb
2628      return this.description;
2629    }
2630
2631    public boolean hasDescriptionElement() { 
2632      return this.description != null && !this.description.isEmpty();
2633    }
2634
2635    public boolean hasDescription() { 
2636      return this.description != null && !this.description.isEmpty();
2637    }
2638
2639    /**
2640     * @param value {@link #description} (A free text natural language description of the measure from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2641     */
2642    public Measure setDescriptionElement(MarkdownType value) { 
2643      this.description = value;
2644      return this;
2645    }
2646
2647    /**
2648     * @return A free text natural language description of the measure from a consumer's perspective.
2649     */
2650    public String getDescription() { 
2651      return this.description == null ? null : this.description.getValue();
2652    }
2653
2654    /**
2655     * @param value A free text natural language description of the measure from a consumer's perspective.
2656     */
2657    public Measure setDescription(String value) { 
2658      if (value == null)
2659        this.description = null;
2660      else {
2661        if (this.description == null)
2662          this.description = new MarkdownType();
2663        this.description.setValue(value);
2664      }
2665      return this;
2666    }
2667
2668    /**
2669     * @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 measure instances.)
2670     */
2671    public List<UsageContext> getUseContext() { 
2672      if (this.useContext == null)
2673        this.useContext = new ArrayList<UsageContext>();
2674      return this.useContext;
2675    }
2676
2677    /**
2678     * @return Returns a reference to <code>this</code> for easy method chaining
2679     */
2680    public Measure setUseContext(List<UsageContext> theUseContext) { 
2681      this.useContext = theUseContext;
2682      return this;
2683    }
2684
2685    public boolean hasUseContext() { 
2686      if (this.useContext == null)
2687        return false;
2688      for (UsageContext item : this.useContext)
2689        if (!item.isEmpty())
2690          return true;
2691      return false;
2692    }
2693
2694    public UsageContext addUseContext() { //3
2695      UsageContext t = new UsageContext();
2696      if (this.useContext == null)
2697        this.useContext = new ArrayList<UsageContext>();
2698      this.useContext.add(t);
2699      return t;
2700    }
2701
2702    public Measure addUseContext(UsageContext t) { //3
2703      if (t == null)
2704        return this;
2705      if (this.useContext == null)
2706        this.useContext = new ArrayList<UsageContext>();
2707      this.useContext.add(t);
2708      return this;
2709    }
2710
2711    /**
2712     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
2713     */
2714    public UsageContext getUseContextFirstRep() { 
2715      if (getUseContext().isEmpty()) {
2716        addUseContext();
2717      }
2718      return getUseContext().get(0);
2719    }
2720
2721    /**
2722     * @return {@link #jurisdiction} (A legal or geographic region in which the measure is intended to be used.)
2723     */
2724    public List<CodeableConcept> getJurisdiction() { 
2725      if (this.jurisdiction == null)
2726        this.jurisdiction = new ArrayList<CodeableConcept>();
2727      return this.jurisdiction;
2728    }
2729
2730    /**
2731     * @return Returns a reference to <code>this</code> for easy method chaining
2732     */
2733    public Measure setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2734      this.jurisdiction = theJurisdiction;
2735      return this;
2736    }
2737
2738    public boolean hasJurisdiction() { 
2739      if (this.jurisdiction == null)
2740        return false;
2741      for (CodeableConcept item : this.jurisdiction)
2742        if (!item.isEmpty())
2743          return true;
2744      return false;
2745    }
2746
2747    public CodeableConcept addJurisdiction() { //3
2748      CodeableConcept t = new CodeableConcept();
2749      if (this.jurisdiction == null)
2750        this.jurisdiction = new ArrayList<CodeableConcept>();
2751      this.jurisdiction.add(t);
2752      return t;
2753    }
2754
2755    public Measure addJurisdiction(CodeableConcept t) { //3
2756      if (t == null)
2757        return this;
2758      if (this.jurisdiction == null)
2759        this.jurisdiction = new ArrayList<CodeableConcept>();
2760      this.jurisdiction.add(t);
2761      return this;
2762    }
2763
2764    /**
2765     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
2766     */
2767    public CodeableConcept getJurisdictionFirstRep() { 
2768      if (getJurisdiction().isEmpty()) {
2769        addJurisdiction();
2770      }
2771      return getJurisdiction().get(0);
2772    }
2773
2774    /**
2775     * @return {@link #purpose} (Explanation of why this measure is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2776     */
2777    public MarkdownType getPurposeElement() { 
2778      if (this.purpose == null)
2779        if (Configuration.errorOnAutoCreate())
2780          throw new Error("Attempt to auto-create Measure.purpose");
2781        else if (Configuration.doAutoCreate())
2782          this.purpose = new MarkdownType(); // bb
2783      return this.purpose;
2784    }
2785
2786    public boolean hasPurposeElement() { 
2787      return this.purpose != null && !this.purpose.isEmpty();
2788    }
2789
2790    public boolean hasPurpose() { 
2791      return this.purpose != null && !this.purpose.isEmpty();
2792    }
2793
2794    /**
2795     * @param value {@link #purpose} (Explanation of why this measure is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2796     */
2797    public Measure setPurposeElement(MarkdownType value) { 
2798      this.purpose = value;
2799      return this;
2800    }
2801
2802    /**
2803     * @return Explanation of why this measure is needed and why it has been designed as it has.
2804     */
2805    public String getPurpose() { 
2806      return this.purpose == null ? null : this.purpose.getValue();
2807    }
2808
2809    /**
2810     * @param value Explanation of why this measure is needed and why it has been designed as it has.
2811     */
2812    public Measure setPurpose(String value) { 
2813      if (value == null)
2814        this.purpose = null;
2815      else {
2816        if (this.purpose == null)
2817          this.purpose = new MarkdownType();
2818        this.purpose.setValue(value);
2819      }
2820      return this;
2821    }
2822
2823    /**
2824     * @return {@link #usage} (A detailed description, from a clinical perspective, of how the measure is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2825     */
2826    public StringType getUsageElement() { 
2827      if (this.usage == null)
2828        if (Configuration.errorOnAutoCreate())
2829          throw new Error("Attempt to auto-create Measure.usage");
2830        else if (Configuration.doAutoCreate())
2831          this.usage = new StringType(); // bb
2832      return this.usage;
2833    }
2834
2835    public boolean hasUsageElement() { 
2836      return this.usage != null && !this.usage.isEmpty();
2837    }
2838
2839    public boolean hasUsage() { 
2840      return this.usage != null && !this.usage.isEmpty();
2841    }
2842
2843    /**
2844     * @param value {@link #usage} (A detailed description, from a clinical perspective, of how the measure is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2845     */
2846    public Measure setUsageElement(StringType value) { 
2847      this.usage = value;
2848      return this;
2849    }
2850
2851    /**
2852     * @return A detailed description, from a clinical perspective, of how the measure is used.
2853     */
2854    public String getUsage() { 
2855      return this.usage == null ? null : this.usage.getValue();
2856    }
2857
2858    /**
2859     * @param value A detailed description, from a clinical perspective, of how the measure is used.
2860     */
2861    public Measure setUsage(String value) { 
2862      if (Utilities.noString(value))
2863        this.usage = null;
2864      else {
2865        if (this.usage == null)
2866          this.usage = new StringType();
2867        this.usage.setValue(value);
2868      }
2869      return this;
2870    }
2871
2872    /**
2873     * @return {@link #copyright} (A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2874     */
2875    public MarkdownType getCopyrightElement() { 
2876      if (this.copyright == null)
2877        if (Configuration.errorOnAutoCreate())
2878          throw new Error("Attempt to auto-create Measure.copyright");
2879        else if (Configuration.doAutoCreate())
2880          this.copyright = new MarkdownType(); // bb
2881      return this.copyright;
2882    }
2883
2884    public boolean hasCopyrightElement() { 
2885      return this.copyright != null && !this.copyright.isEmpty();
2886    }
2887
2888    public boolean hasCopyright() { 
2889      return this.copyright != null && !this.copyright.isEmpty();
2890    }
2891
2892    /**
2893     * @param value {@link #copyright} (A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2894     */
2895    public Measure setCopyrightElement(MarkdownType value) { 
2896      this.copyright = value;
2897      return this;
2898    }
2899
2900    /**
2901     * @return A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.
2902     */
2903    public String getCopyright() { 
2904      return this.copyright == null ? null : this.copyright.getValue();
2905    }
2906
2907    /**
2908     * @param value A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.
2909     */
2910    public Measure setCopyright(String value) { 
2911      if (value == null)
2912        this.copyright = null;
2913      else {
2914        if (this.copyright == null)
2915          this.copyright = new MarkdownType();
2916        this.copyright.setValue(value);
2917      }
2918      return this;
2919    }
2920
2921    /**
2922     * @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
2923     */
2924    public DateType getApprovalDateElement() { 
2925      if (this.approvalDate == null)
2926        if (Configuration.errorOnAutoCreate())
2927          throw new Error("Attempt to auto-create Measure.approvalDate");
2928        else if (Configuration.doAutoCreate())
2929          this.approvalDate = new DateType(); // bb
2930      return this.approvalDate;
2931    }
2932
2933    public boolean hasApprovalDateElement() { 
2934      return this.approvalDate != null && !this.approvalDate.isEmpty();
2935    }
2936
2937    public boolean hasApprovalDate() { 
2938      return this.approvalDate != null && !this.approvalDate.isEmpty();
2939    }
2940
2941    /**
2942     * @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
2943     */
2944    public Measure setApprovalDateElement(DateType value) { 
2945      this.approvalDate = value;
2946      return this;
2947    }
2948
2949    /**
2950     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2951     */
2952    public Date getApprovalDate() { 
2953      return this.approvalDate == null ? null : this.approvalDate.getValue();
2954    }
2955
2956    /**
2957     * @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.
2958     */
2959    public Measure setApprovalDate(Date value) { 
2960      if (value == null)
2961        this.approvalDate = null;
2962      else {
2963        if (this.approvalDate == null)
2964          this.approvalDate = new DateType();
2965        this.approvalDate.setValue(value);
2966      }
2967      return this;
2968    }
2969
2970    /**
2971     * @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
2972     */
2973    public DateType getLastReviewDateElement() { 
2974      if (this.lastReviewDate == null)
2975        if (Configuration.errorOnAutoCreate())
2976          throw new Error("Attempt to auto-create Measure.lastReviewDate");
2977        else if (Configuration.doAutoCreate())
2978          this.lastReviewDate = new DateType(); // bb
2979      return this.lastReviewDate;
2980    }
2981
2982    public boolean hasLastReviewDateElement() { 
2983      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2984    }
2985
2986    public boolean hasLastReviewDate() { 
2987      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2988    }
2989
2990    /**
2991     * @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
2992     */
2993    public Measure setLastReviewDateElement(DateType value) { 
2994      this.lastReviewDate = value;
2995      return this;
2996    }
2997
2998    /**
2999     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
3000     */
3001    public Date getLastReviewDate() { 
3002      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
3003    }
3004
3005    /**
3006     * @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.
3007     */
3008    public Measure setLastReviewDate(Date value) { 
3009      if (value == null)
3010        this.lastReviewDate = null;
3011      else {
3012        if (this.lastReviewDate == null)
3013          this.lastReviewDate = new DateType();
3014        this.lastReviewDate.setValue(value);
3015      }
3016      return this;
3017    }
3018
3019    /**
3020     * @return {@link #effectivePeriod} (The period during which the measure content was or is planned to be in active use.)
3021     */
3022    public Period getEffectivePeriod() { 
3023      if (this.effectivePeriod == null)
3024        if (Configuration.errorOnAutoCreate())
3025          throw new Error("Attempt to auto-create Measure.effectivePeriod");
3026        else if (Configuration.doAutoCreate())
3027          this.effectivePeriod = new Period(); // cc
3028      return this.effectivePeriod;
3029    }
3030
3031    public boolean hasEffectivePeriod() { 
3032      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
3033    }
3034
3035    /**
3036     * @param value {@link #effectivePeriod} (The period during which the measure content was or is planned to be in active use.)
3037     */
3038    public Measure setEffectivePeriod(Period value) { 
3039      this.effectivePeriod = value;
3040      return this;
3041    }
3042
3043    /**
3044     * @return {@link #topic} (Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.)
3045     */
3046    public List<CodeableConcept> getTopic() { 
3047      if (this.topic == null)
3048        this.topic = new ArrayList<CodeableConcept>();
3049      return this.topic;
3050    }
3051
3052    /**
3053     * @return Returns a reference to <code>this</code> for easy method chaining
3054     */
3055    public Measure setTopic(List<CodeableConcept> theTopic) { 
3056      this.topic = theTopic;
3057      return this;
3058    }
3059
3060    public boolean hasTopic() { 
3061      if (this.topic == null)
3062        return false;
3063      for (CodeableConcept item : this.topic)
3064        if (!item.isEmpty())
3065          return true;
3066      return false;
3067    }
3068
3069    public CodeableConcept addTopic() { //3
3070      CodeableConcept t = new CodeableConcept();
3071      if (this.topic == null)
3072        this.topic = new ArrayList<CodeableConcept>();
3073      this.topic.add(t);
3074      return t;
3075    }
3076
3077    public Measure addTopic(CodeableConcept t) { //3
3078      if (t == null)
3079        return this;
3080      if (this.topic == null)
3081        this.topic = new ArrayList<CodeableConcept>();
3082      this.topic.add(t);
3083      return this;
3084    }
3085
3086    /**
3087     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {3}
3088     */
3089    public CodeableConcept getTopicFirstRep() { 
3090      if (getTopic().isEmpty()) {
3091        addTopic();
3092      }
3093      return getTopic().get(0);
3094    }
3095
3096    /**
3097     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.)
3098     */
3099    public List<ContactDetail> getAuthor() { 
3100      if (this.author == null)
3101        this.author = new ArrayList<ContactDetail>();
3102      return this.author;
3103    }
3104
3105    /**
3106     * @return Returns a reference to <code>this</code> for easy method chaining
3107     */
3108    public Measure setAuthor(List<ContactDetail> theAuthor) { 
3109      this.author = theAuthor;
3110      return this;
3111    }
3112
3113    public boolean hasAuthor() { 
3114      if (this.author == null)
3115        return false;
3116      for (ContactDetail item : this.author)
3117        if (!item.isEmpty())
3118          return true;
3119      return false;
3120    }
3121
3122    public ContactDetail addAuthor() { //3
3123      ContactDetail t = new ContactDetail();
3124      if (this.author == null)
3125        this.author = new ArrayList<ContactDetail>();
3126      this.author.add(t);
3127      return t;
3128    }
3129
3130    public Measure addAuthor(ContactDetail t) { //3
3131      if (t == null)
3132        return this;
3133      if (this.author == null)
3134        this.author = new ArrayList<ContactDetail>();
3135      this.author.add(t);
3136      return this;
3137    }
3138
3139    /**
3140     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
3141     */
3142    public ContactDetail getAuthorFirstRep() { 
3143      if (getAuthor().isEmpty()) {
3144        addAuthor();
3145      }
3146      return getAuthor().get(0);
3147    }
3148
3149    /**
3150     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.)
3151     */
3152    public List<ContactDetail> getEditor() { 
3153      if (this.editor == null)
3154        this.editor = new ArrayList<ContactDetail>();
3155      return this.editor;
3156    }
3157
3158    /**
3159     * @return Returns a reference to <code>this</code> for easy method chaining
3160     */
3161    public Measure setEditor(List<ContactDetail> theEditor) { 
3162      this.editor = theEditor;
3163      return this;
3164    }
3165
3166    public boolean hasEditor() { 
3167      if (this.editor == null)
3168        return false;
3169      for (ContactDetail item : this.editor)
3170        if (!item.isEmpty())
3171          return true;
3172      return false;
3173    }
3174
3175    public ContactDetail addEditor() { //3
3176      ContactDetail t = new ContactDetail();
3177      if (this.editor == null)
3178        this.editor = new ArrayList<ContactDetail>();
3179      this.editor.add(t);
3180      return t;
3181    }
3182
3183    public Measure addEditor(ContactDetail t) { //3
3184      if (t == null)
3185        return this;
3186      if (this.editor == null)
3187        this.editor = new ArrayList<ContactDetail>();
3188      this.editor.add(t);
3189      return this;
3190    }
3191
3192    /**
3193     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3}
3194     */
3195    public ContactDetail getEditorFirstRep() { 
3196      if (getEditor().isEmpty()) {
3197        addEditor();
3198      }
3199      return getEditor().get(0);
3200    }
3201
3202    /**
3203     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.)
3204     */
3205    public List<ContactDetail> getReviewer() { 
3206      if (this.reviewer == null)
3207        this.reviewer = new ArrayList<ContactDetail>();
3208      return this.reviewer;
3209    }
3210
3211    /**
3212     * @return Returns a reference to <code>this</code> for easy method chaining
3213     */
3214    public Measure setReviewer(List<ContactDetail> theReviewer) { 
3215      this.reviewer = theReviewer;
3216      return this;
3217    }
3218
3219    public boolean hasReviewer() { 
3220      if (this.reviewer == null)
3221        return false;
3222      for (ContactDetail item : this.reviewer)
3223        if (!item.isEmpty())
3224          return true;
3225      return false;
3226    }
3227
3228    public ContactDetail addReviewer() { //3
3229      ContactDetail t = new ContactDetail();
3230      if (this.reviewer == null)
3231        this.reviewer = new ArrayList<ContactDetail>();
3232      this.reviewer.add(t);
3233      return t;
3234    }
3235
3236    public Measure addReviewer(ContactDetail t) { //3
3237      if (t == null)
3238        return this;
3239      if (this.reviewer == null)
3240        this.reviewer = new ArrayList<ContactDetail>();
3241      this.reviewer.add(t);
3242      return this;
3243    }
3244
3245    /**
3246     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3}
3247     */
3248    public ContactDetail getReviewerFirstRep() { 
3249      if (getReviewer().isEmpty()) {
3250        addReviewer();
3251      }
3252      return getReviewer().get(0);
3253    }
3254
3255    /**
3256     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.)
3257     */
3258    public List<ContactDetail> getEndorser() { 
3259      if (this.endorser == null)
3260        this.endorser = new ArrayList<ContactDetail>();
3261      return this.endorser;
3262    }
3263
3264    /**
3265     * @return Returns a reference to <code>this</code> for easy method chaining
3266     */
3267    public Measure setEndorser(List<ContactDetail> theEndorser) { 
3268      this.endorser = theEndorser;
3269      return this;
3270    }
3271
3272    public boolean hasEndorser() { 
3273      if (this.endorser == null)
3274        return false;
3275      for (ContactDetail item : this.endorser)
3276        if (!item.isEmpty())
3277          return true;
3278      return false;
3279    }
3280
3281    public ContactDetail addEndorser() { //3
3282      ContactDetail t = new ContactDetail();
3283      if (this.endorser == null)
3284        this.endorser = new ArrayList<ContactDetail>();
3285      this.endorser.add(t);
3286      return t;
3287    }
3288
3289    public Measure addEndorser(ContactDetail t) { //3
3290      if (t == null)
3291        return this;
3292      if (this.endorser == null)
3293        this.endorser = new ArrayList<ContactDetail>();
3294      this.endorser.add(t);
3295      return this;
3296    }
3297
3298    /**
3299     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3}
3300     */
3301    public ContactDetail getEndorserFirstRep() { 
3302      if (getEndorser().isEmpty()) {
3303        addEndorser();
3304      }
3305      return getEndorser().get(0);
3306    }
3307
3308    /**
3309     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
3310     */
3311    public List<RelatedArtifact> getRelatedArtifact() { 
3312      if (this.relatedArtifact == null)
3313        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3314      return this.relatedArtifact;
3315    }
3316
3317    /**
3318     * @return Returns a reference to <code>this</code> for easy method chaining
3319     */
3320    public Measure setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
3321      this.relatedArtifact = theRelatedArtifact;
3322      return this;
3323    }
3324
3325    public boolean hasRelatedArtifact() { 
3326      if (this.relatedArtifact == null)
3327        return false;
3328      for (RelatedArtifact item : this.relatedArtifact)
3329        if (!item.isEmpty())
3330          return true;
3331      return false;
3332    }
3333
3334    public RelatedArtifact addRelatedArtifact() { //3
3335      RelatedArtifact t = new RelatedArtifact();
3336      if (this.relatedArtifact == null)
3337        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3338      this.relatedArtifact.add(t);
3339      return t;
3340    }
3341
3342    public Measure addRelatedArtifact(RelatedArtifact t) { //3
3343      if (t == null)
3344        return this;
3345      if (this.relatedArtifact == null)
3346        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3347      this.relatedArtifact.add(t);
3348      return this;
3349    }
3350
3351    /**
3352     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
3353     */
3354    public RelatedArtifact getRelatedArtifactFirstRep() { 
3355      if (getRelatedArtifact().isEmpty()) {
3356        addRelatedArtifact();
3357      }
3358      return getRelatedArtifact().get(0);
3359    }
3360
3361    /**
3362     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.)
3363     */
3364    public List<CanonicalType> getLibrary() { 
3365      if (this.library == null)
3366        this.library = new ArrayList<CanonicalType>();
3367      return this.library;
3368    }
3369
3370    /**
3371     * @return Returns a reference to <code>this</code> for easy method chaining
3372     */
3373    public Measure setLibrary(List<CanonicalType> theLibrary) { 
3374      this.library = theLibrary;
3375      return this;
3376    }
3377
3378    public boolean hasLibrary() { 
3379      if (this.library == null)
3380        return false;
3381      for (CanonicalType item : this.library)
3382        if (!item.isEmpty())
3383          return true;
3384      return false;
3385    }
3386
3387    /**
3388     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.)
3389     */
3390    public CanonicalType addLibraryElement() {//2 
3391      CanonicalType t = new CanonicalType();
3392      if (this.library == null)
3393        this.library = new ArrayList<CanonicalType>();
3394      this.library.add(t);
3395      return t;
3396    }
3397
3398    /**
3399     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the measure.)
3400     */
3401    public Measure addLibrary(String value) { //1
3402      CanonicalType t = new CanonicalType();
3403      t.setValue(value);
3404      if (this.library == null)
3405        this.library = new ArrayList<CanonicalType>();
3406      this.library.add(t);
3407      return this;
3408    }
3409
3410    /**
3411     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the measure.)
3412     */
3413    public boolean hasLibrary(String value) { 
3414      if (this.library == null)
3415        return false;
3416      for (CanonicalType v : this.library)
3417        if (v.getValue().equals(value)) // canonical
3418          return true;
3419      return false;
3420    }
3421
3422    /**
3423     * @return {@link #disclaimer} (Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value
3424     */
3425    public MarkdownType getDisclaimerElement() { 
3426      if (this.disclaimer == null)
3427        if (Configuration.errorOnAutoCreate())
3428          throw new Error("Attempt to auto-create Measure.disclaimer");
3429        else if (Configuration.doAutoCreate())
3430          this.disclaimer = new MarkdownType(); // bb
3431      return this.disclaimer;
3432    }
3433
3434    public boolean hasDisclaimerElement() { 
3435      return this.disclaimer != null && !this.disclaimer.isEmpty();
3436    }
3437
3438    public boolean hasDisclaimer() { 
3439      return this.disclaimer != null && !this.disclaimer.isEmpty();
3440    }
3441
3442    /**
3443     * @param value {@link #disclaimer} (Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value
3444     */
3445    public Measure setDisclaimerElement(MarkdownType value) { 
3446      this.disclaimer = value;
3447      return this;
3448    }
3449
3450    /**
3451     * @return Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.
3452     */
3453    public String getDisclaimer() { 
3454      return this.disclaimer == null ? null : this.disclaimer.getValue();
3455    }
3456
3457    /**
3458     * @param value Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.
3459     */
3460    public Measure setDisclaimer(String value) { 
3461      if (value == null)
3462        this.disclaimer = null;
3463      else {
3464        if (this.disclaimer == null)
3465          this.disclaimer = new MarkdownType();
3466        this.disclaimer.setValue(value);
3467      }
3468      return this;
3469    }
3470
3471    /**
3472     * @return {@link #scoring} (Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.)
3473     */
3474    public CodeableConcept getScoring() { 
3475      if (this.scoring == null)
3476        if (Configuration.errorOnAutoCreate())
3477          throw new Error("Attempt to auto-create Measure.scoring");
3478        else if (Configuration.doAutoCreate())
3479          this.scoring = new CodeableConcept(); // cc
3480      return this.scoring;
3481    }
3482
3483    public boolean hasScoring() { 
3484      return this.scoring != null && !this.scoring.isEmpty();
3485    }
3486
3487    /**
3488     * @param value {@link #scoring} (Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.)
3489     */
3490    public Measure setScoring(CodeableConcept value) { 
3491      this.scoring = value;
3492      return this;
3493    }
3494
3495    /**
3496     * @return {@link #compositeScoring} (If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.)
3497     */
3498    public CodeableConcept getCompositeScoring() { 
3499      if (this.compositeScoring == null)
3500        if (Configuration.errorOnAutoCreate())
3501          throw new Error("Attempt to auto-create Measure.compositeScoring");
3502        else if (Configuration.doAutoCreate())
3503          this.compositeScoring = new CodeableConcept(); // cc
3504      return this.compositeScoring;
3505    }
3506
3507    public boolean hasCompositeScoring() { 
3508      return this.compositeScoring != null && !this.compositeScoring.isEmpty();
3509    }
3510
3511    /**
3512     * @param value {@link #compositeScoring} (If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.)
3513     */
3514    public Measure setCompositeScoring(CodeableConcept value) { 
3515      this.compositeScoring = value;
3516      return this;
3517    }
3518
3519    /**
3520     * @return {@link #type} (Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.)
3521     */
3522    public List<CodeableConcept> getType() { 
3523      if (this.type == null)
3524        this.type = new ArrayList<CodeableConcept>();
3525      return this.type;
3526    }
3527
3528    /**
3529     * @return Returns a reference to <code>this</code> for easy method chaining
3530     */
3531    public Measure setType(List<CodeableConcept> theType) { 
3532      this.type = theType;
3533      return this;
3534    }
3535
3536    public boolean hasType() { 
3537      if (this.type == null)
3538        return false;
3539      for (CodeableConcept item : this.type)
3540        if (!item.isEmpty())
3541          return true;
3542      return false;
3543    }
3544
3545    public CodeableConcept addType() { //3
3546      CodeableConcept t = new CodeableConcept();
3547      if (this.type == null)
3548        this.type = new ArrayList<CodeableConcept>();
3549      this.type.add(t);
3550      return t;
3551    }
3552
3553    public Measure addType(CodeableConcept t) { //3
3554      if (t == null)
3555        return this;
3556      if (this.type == null)
3557        this.type = new ArrayList<CodeableConcept>();
3558      this.type.add(t);
3559      return this;
3560    }
3561
3562    /**
3563     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
3564     */
3565    public CodeableConcept getTypeFirstRep() { 
3566      if (getType().isEmpty()) {
3567        addType();
3568      }
3569      return getType().get(0);
3570    }
3571
3572    /**
3573     * @return {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value
3574     */
3575    public StringType getRiskAdjustmentElement() { 
3576      if (this.riskAdjustment == null)
3577        if (Configuration.errorOnAutoCreate())
3578          throw new Error("Attempt to auto-create Measure.riskAdjustment");
3579        else if (Configuration.doAutoCreate())
3580          this.riskAdjustment = new StringType(); // bb
3581      return this.riskAdjustment;
3582    }
3583
3584    public boolean hasRiskAdjustmentElement() { 
3585      return this.riskAdjustment != null && !this.riskAdjustment.isEmpty();
3586    }
3587
3588    public boolean hasRiskAdjustment() { 
3589      return this.riskAdjustment != null && !this.riskAdjustment.isEmpty();
3590    }
3591
3592    /**
3593     * @param value {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value
3594     */
3595    public Measure setRiskAdjustmentElement(StringType value) { 
3596      this.riskAdjustment = value;
3597      return this;
3598    }
3599
3600    /**
3601     * @return A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.
3602     */
3603    public String getRiskAdjustment() { 
3604      return this.riskAdjustment == null ? null : this.riskAdjustment.getValue();
3605    }
3606
3607    /**
3608     * @param value A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.
3609     */
3610    public Measure setRiskAdjustment(String value) { 
3611      if (Utilities.noString(value))
3612        this.riskAdjustment = null;
3613      else {
3614        if (this.riskAdjustment == null)
3615          this.riskAdjustment = new StringType();
3616        this.riskAdjustment.setValue(value);
3617      }
3618      return this;
3619    }
3620
3621    /**
3622     * @return {@link #rateAggregation} (Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value
3623     */
3624    public StringType getRateAggregationElement() { 
3625      if (this.rateAggregation == null)
3626        if (Configuration.errorOnAutoCreate())
3627          throw new Error("Attempt to auto-create Measure.rateAggregation");
3628        else if (Configuration.doAutoCreate())
3629          this.rateAggregation = new StringType(); // bb
3630      return this.rateAggregation;
3631    }
3632
3633    public boolean hasRateAggregationElement() { 
3634      return this.rateAggregation != null && !this.rateAggregation.isEmpty();
3635    }
3636
3637    public boolean hasRateAggregation() { 
3638      return this.rateAggregation != null && !this.rateAggregation.isEmpty();
3639    }
3640
3641    /**
3642     * @param value {@link #rateAggregation} (Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value
3643     */
3644    public Measure setRateAggregationElement(StringType value) { 
3645      this.rateAggregation = value;
3646      return this;
3647    }
3648
3649    /**
3650     * @return Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.
3651     */
3652    public String getRateAggregation() { 
3653      return this.rateAggregation == null ? null : this.rateAggregation.getValue();
3654    }
3655
3656    /**
3657     * @param value Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.
3658     */
3659    public Measure setRateAggregation(String value) { 
3660      if (Utilities.noString(value))
3661        this.rateAggregation = null;
3662      else {
3663        if (this.rateAggregation == null)
3664          this.rateAggregation = new StringType();
3665        this.rateAggregation.setValue(value);
3666      }
3667      return this;
3668    }
3669
3670    /**
3671     * @return {@link #rationale} (Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value
3672     */
3673    public MarkdownType getRationaleElement() { 
3674      if (this.rationale == null)
3675        if (Configuration.errorOnAutoCreate())
3676          throw new Error("Attempt to auto-create Measure.rationale");
3677        else if (Configuration.doAutoCreate())
3678          this.rationale = new MarkdownType(); // bb
3679      return this.rationale;
3680    }
3681
3682    public boolean hasRationaleElement() { 
3683      return this.rationale != null && !this.rationale.isEmpty();
3684    }
3685
3686    public boolean hasRationale() { 
3687      return this.rationale != null && !this.rationale.isEmpty();
3688    }
3689
3690    /**
3691     * @param value {@link #rationale} (Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value
3692     */
3693    public Measure setRationaleElement(MarkdownType value) { 
3694      this.rationale = value;
3695      return this;
3696    }
3697
3698    /**
3699     * @return Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.
3700     */
3701    public String getRationale() { 
3702      return this.rationale == null ? null : this.rationale.getValue();
3703    }
3704
3705    /**
3706     * @param value Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.
3707     */
3708    public Measure setRationale(String value) { 
3709      if (value == null)
3710        this.rationale = null;
3711      else {
3712        if (this.rationale == null)
3713          this.rationale = new MarkdownType();
3714        this.rationale.setValue(value);
3715      }
3716      return this;
3717    }
3718
3719    /**
3720     * @return {@link #clinicalRecommendationStatement} (Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value
3721     */
3722    public MarkdownType getClinicalRecommendationStatementElement() { 
3723      if (this.clinicalRecommendationStatement == null)
3724        if (Configuration.errorOnAutoCreate())
3725          throw new Error("Attempt to auto-create Measure.clinicalRecommendationStatement");
3726        else if (Configuration.doAutoCreate())
3727          this.clinicalRecommendationStatement = new MarkdownType(); // bb
3728      return this.clinicalRecommendationStatement;
3729    }
3730
3731    public boolean hasClinicalRecommendationStatementElement() { 
3732      return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty();
3733    }
3734
3735    public boolean hasClinicalRecommendationStatement() { 
3736      return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty();
3737    }
3738
3739    /**
3740     * @param value {@link #clinicalRecommendationStatement} (Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value
3741     */
3742    public Measure setClinicalRecommendationStatementElement(MarkdownType value) { 
3743      this.clinicalRecommendationStatement = value;
3744      return this;
3745    }
3746
3747    /**
3748     * @return Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.
3749     */
3750    public String getClinicalRecommendationStatement() { 
3751      return this.clinicalRecommendationStatement == null ? null : this.clinicalRecommendationStatement.getValue();
3752    }
3753
3754    /**
3755     * @param value Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.
3756     */
3757    public Measure setClinicalRecommendationStatement(String value) { 
3758      if (value == null)
3759        this.clinicalRecommendationStatement = null;
3760      else {
3761        if (this.clinicalRecommendationStatement == null)
3762          this.clinicalRecommendationStatement = new MarkdownType();
3763        this.clinicalRecommendationStatement.setValue(value);
3764      }
3765      return this;
3766    }
3767
3768    /**
3769     * @return {@link #improvementNotation} (Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).)
3770     */
3771    public CodeableConcept getImprovementNotation() { 
3772      if (this.improvementNotation == null)
3773        if (Configuration.errorOnAutoCreate())
3774          throw new Error("Attempt to auto-create Measure.improvementNotation");
3775        else if (Configuration.doAutoCreate())
3776          this.improvementNotation = new CodeableConcept(); // cc
3777      return this.improvementNotation;
3778    }
3779
3780    public boolean hasImprovementNotation() { 
3781      return this.improvementNotation != null && !this.improvementNotation.isEmpty();
3782    }
3783
3784    /**
3785     * @param value {@link #improvementNotation} (Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).)
3786     */
3787    public Measure setImprovementNotation(CodeableConcept value) { 
3788      this.improvementNotation = value;
3789      return this;
3790    }
3791
3792    /**
3793     * @return {@link #definition} (Provides a description of an individual term used within the measure.)
3794     */
3795    public List<MarkdownType> getDefinition() { 
3796      if (this.definition == null)
3797        this.definition = new ArrayList<MarkdownType>();
3798      return this.definition;
3799    }
3800
3801    /**
3802     * @return Returns a reference to <code>this</code> for easy method chaining
3803     */
3804    public Measure setDefinition(List<MarkdownType> theDefinition) { 
3805      this.definition = theDefinition;
3806      return this;
3807    }
3808
3809    public boolean hasDefinition() { 
3810      if (this.definition == null)
3811        return false;
3812      for (MarkdownType item : this.definition)
3813        if (!item.isEmpty())
3814          return true;
3815      return false;
3816    }
3817
3818    /**
3819     * @return {@link #definition} (Provides a description of an individual term used within the measure.)
3820     */
3821    public MarkdownType addDefinitionElement() {//2 
3822      MarkdownType t = new MarkdownType();
3823      if (this.definition == null)
3824        this.definition = new ArrayList<MarkdownType>();
3825      this.definition.add(t);
3826      return t;
3827    }
3828
3829    /**
3830     * @param value {@link #definition} (Provides a description of an individual term used within the measure.)
3831     */
3832    public Measure addDefinition(String value) { //1
3833      MarkdownType t = new MarkdownType();
3834      t.setValue(value);
3835      if (this.definition == null)
3836        this.definition = new ArrayList<MarkdownType>();
3837      this.definition.add(t);
3838      return this;
3839    }
3840
3841    /**
3842     * @param value {@link #definition} (Provides a description of an individual term used within the measure.)
3843     */
3844    public boolean hasDefinition(String value) { 
3845      if (this.definition == null)
3846        return false;
3847      for (MarkdownType v : this.definition)
3848        if (v.getValue().equals(value)) // markdown
3849          return true;
3850      return false;
3851    }
3852
3853    /**
3854     * @return {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value
3855     */
3856    public MarkdownType getGuidanceElement() { 
3857      if (this.guidance == null)
3858        if (Configuration.errorOnAutoCreate())
3859          throw new Error("Attempt to auto-create Measure.guidance");
3860        else if (Configuration.doAutoCreate())
3861          this.guidance = new MarkdownType(); // bb
3862      return this.guidance;
3863    }
3864
3865    public boolean hasGuidanceElement() { 
3866      return this.guidance != null && !this.guidance.isEmpty();
3867    }
3868
3869    public boolean hasGuidance() { 
3870      return this.guidance != null && !this.guidance.isEmpty();
3871    }
3872
3873    /**
3874     * @param value {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value
3875     */
3876    public Measure setGuidanceElement(MarkdownType value) { 
3877      this.guidance = value;
3878      return this;
3879    }
3880
3881    /**
3882     * @return Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.
3883     */
3884    public String getGuidance() { 
3885      return this.guidance == null ? null : this.guidance.getValue();
3886    }
3887
3888    /**
3889     * @param value Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.
3890     */
3891    public Measure setGuidance(String value) { 
3892      if (value == null)
3893        this.guidance = null;
3894      else {
3895        if (this.guidance == null)
3896          this.guidance = new MarkdownType();
3897        this.guidance.setValue(value);
3898      }
3899      return this;
3900    }
3901
3902    /**
3903     * @return {@link #group} (A group of population criteria for the measure.)
3904     */
3905    public List<MeasureGroupComponent> getGroup() { 
3906      if (this.group == null)
3907        this.group = new ArrayList<MeasureGroupComponent>();
3908      return this.group;
3909    }
3910
3911    /**
3912     * @return Returns a reference to <code>this</code> for easy method chaining
3913     */
3914    public Measure setGroup(List<MeasureGroupComponent> theGroup) { 
3915      this.group = theGroup;
3916      return this;
3917    }
3918
3919    public boolean hasGroup() { 
3920      if (this.group == null)
3921        return false;
3922      for (MeasureGroupComponent item : this.group)
3923        if (!item.isEmpty())
3924          return true;
3925      return false;
3926    }
3927
3928    public MeasureGroupComponent addGroup() { //3
3929      MeasureGroupComponent t = new MeasureGroupComponent();
3930      if (this.group == null)
3931        this.group = new ArrayList<MeasureGroupComponent>();
3932      this.group.add(t);
3933      return t;
3934    }
3935
3936    public Measure addGroup(MeasureGroupComponent t) { //3
3937      if (t == null)
3938        return this;
3939      if (this.group == null)
3940        this.group = new ArrayList<MeasureGroupComponent>();
3941      this.group.add(t);
3942      return this;
3943    }
3944
3945    /**
3946     * @return The first repetition of repeating field {@link #group}, creating it if it does not already exist {3}
3947     */
3948    public MeasureGroupComponent getGroupFirstRep() { 
3949      if (getGroup().isEmpty()) {
3950        addGroup();
3951      }
3952      return getGroup().get(0);
3953    }
3954
3955    /**
3956     * @return {@link #supplementalData} (The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.)
3957     */
3958    public List<MeasureSupplementalDataComponent> getSupplementalData() { 
3959      if (this.supplementalData == null)
3960        this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>();
3961      return this.supplementalData;
3962    }
3963
3964    /**
3965     * @return Returns a reference to <code>this</code> for easy method chaining
3966     */
3967    public Measure setSupplementalData(List<MeasureSupplementalDataComponent> theSupplementalData) { 
3968      this.supplementalData = theSupplementalData;
3969      return this;
3970    }
3971
3972    public boolean hasSupplementalData() { 
3973      if (this.supplementalData == null)
3974        return false;
3975      for (MeasureSupplementalDataComponent item : this.supplementalData)
3976        if (!item.isEmpty())
3977          return true;
3978      return false;
3979    }
3980
3981    public MeasureSupplementalDataComponent addSupplementalData() { //3
3982      MeasureSupplementalDataComponent t = new MeasureSupplementalDataComponent();
3983      if (this.supplementalData == null)
3984        this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>();
3985      this.supplementalData.add(t);
3986      return t;
3987    }
3988
3989    public Measure addSupplementalData(MeasureSupplementalDataComponent t) { //3
3990      if (t == null)
3991        return this;
3992      if (this.supplementalData == null)
3993        this.supplementalData = new ArrayList<MeasureSupplementalDataComponent>();
3994      this.supplementalData.add(t);
3995      return this;
3996    }
3997
3998    /**
3999     * @return The first repetition of repeating field {@link #supplementalData}, creating it if it does not already exist {3}
4000     */
4001    public MeasureSupplementalDataComponent getSupplementalDataFirstRep() { 
4002      if (getSupplementalData().isEmpty()) {
4003        addSupplementalData();
4004      }
4005      return getSupplementalData().get(0);
4006    }
4007
4008      protected void listChildren(List<Property> children) {
4009        super.listChildren(children);
4010        children.add(new Property("url", "uri", "An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.", 0, 1, url));
4011        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
4012        children.add(new Property("version", "string", "The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.", 0, 1, version));
4013        children.add(new Property("name", "string", "A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
4014        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the measure.", 0, 1, title));
4015        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the measure giving additional information about its content.", 0, 1, subtitle));
4016        children.add(new Property("status", "code", "The status of this measure. Enables tracking the life-cycle of the content.", 0, 1, status));
4017        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
4018        children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", 0, 1, subject));
4019        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the measure 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 measure changes.", 0, 1, date));
4020        children.add(new Property("publisher", "string", "The name of the organization or individual that published the measure.", 0, 1, publisher));
4021        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));
4022        children.add(new Property("description", "markdown", "A free text natural language description of the measure from a consumer's perspective.", 0, 1, description));
4023        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 measure instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
4024        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the measure is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
4025        children.add(new Property("purpose", "markdown", "Explanation of why this measure is needed and why it has been designed as it has.", 0, 1, purpose));
4026        children.add(new Property("usage", "string", "A detailed description, from a clinical perspective, of how the measure is used.", 0, 1, usage));
4027        children.add(new Property("copyright", "markdown", "A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.", 0, 1, copyright));
4028        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));
4029        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));
4030        children.add(new Property("effectivePeriod", "Period", "The period during which the measure content was or is planned to be in active use.", 0, 1, effectivePeriod));
4031        children.add(new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic));
4032        children.add(new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author));
4033        children.add(new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor));
4034        children.add(new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer));
4035        children.add(new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser));
4036        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
4037        children.add(new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the measure.", 0, java.lang.Integer.MAX_VALUE, library));
4038        children.add(new Property("disclaimer", "markdown", "Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.", 0, 1, disclaimer));
4039        children.add(new Property("scoring", "CodeableConcept", "Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.", 0, 1, scoring));
4040        children.add(new Property("compositeScoring", "CodeableConcept", "If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.", 0, 1, compositeScoring));
4041        children.add(new Property("type", "CodeableConcept", "Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.", 0, java.lang.Integer.MAX_VALUE, type));
4042        children.add(new Property("riskAdjustment", "string", "A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.", 0, 1, riskAdjustment));
4043        children.add(new Property("rateAggregation", "string", "Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.", 0, 1, rateAggregation));
4044        children.add(new Property("rationale", "markdown", "Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.", 0, 1, rationale));
4045        children.add(new Property("clinicalRecommendationStatement", "markdown", "Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.", 0, 1, clinicalRecommendationStatement));
4046        children.add(new Property("improvementNotation", "CodeableConcept", "Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).", 0, 1, improvementNotation));
4047        children.add(new Property("definition", "markdown", "Provides a description of an individual term used within the measure.", 0, java.lang.Integer.MAX_VALUE, definition));
4048        children.add(new Property("guidance", "markdown", "Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.", 0, 1, guidance));
4049        children.add(new Property("group", "", "A group of population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, group));
4050        children.add(new Property("supplementalData", "", "The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData));
4051      }
4052
4053      @Override
4054      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4055        switch (_hash) {
4056        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this measure 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 measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.", 0, 1, url);
4057        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
4058        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure 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 artifacts.", 0, 1, version);
4059        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
4060        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the measure.", 0, 1, title);
4061        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the measure giving additional information about its content.", 0, 1, subtitle);
4062        case -892481550: /*status*/  return new Property("status", "code", "The status of this measure. Enables tracking the life-cycle of the content.", 0, 1, status);
4063        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
4064        case -573640748: /*subject[x]*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", 0, 1, subject);
4065        case -1867885268: /*subject*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", 0, 1, subject);
4066        case -1257122603: /*subjectCodeableConcept*/  return new Property("subject[x]", "CodeableConcept", "The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", 0, 1, subject);
4067        case 772938623: /*subjectReference*/  return new Property("subject[x]", "Reference(Group)", "The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.", 0, 1, subject);
4068        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the measure 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 measure changes.", 0, 1, date);
4069        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the measure.", 0, 1, publisher);
4070        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);
4071        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the measure from a consumer's perspective.", 0, 1, description);
4072        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 measure instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
4073        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the measure is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
4074        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this measure is needed and why it has been designed as it has.", 0, 1, purpose);
4075        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description, from a clinical perspective, of how the measure is used.", 0, 1, usage);
4076        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.", 0, 1, copyright);
4077        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);
4078        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);
4079        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the measure content was or is planned to be in active use.", 0, 1, effectivePeriod);
4080        case 110546223: /*topic*/  return new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic);
4081        case -1406328437: /*author*/  return new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author);
4082        case -1307827859: /*editor*/  return new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor);
4083        case -261190139: /*reviewer*/  return new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer);
4084        case 1740277666: /*endorser*/  return new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser);
4085        case 666807069: /*relatedArtifact*/  return new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact);
4086        case 166208699: /*library*/  return new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the measure.", 0, java.lang.Integer.MAX_VALUE, library);
4087        case 432371099: /*disclaimer*/  return new Property("disclaimer", "markdown", "Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.", 0, 1, disclaimer);
4088        case 1924005583: /*scoring*/  return new Property("scoring", "CodeableConcept", "Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.", 0, 1, scoring);
4089        case 569347656: /*compositeScoring*/  return new Property("compositeScoring", "CodeableConcept", "If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.", 0, 1, compositeScoring);
4090        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.", 0, java.lang.Integer.MAX_VALUE, type);
4091        case 93273500: /*riskAdjustment*/  return new Property("riskAdjustment", "string", "A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.", 0, 1, riskAdjustment);
4092        case 1254503906: /*rateAggregation*/  return new Property("rateAggregation", "string", "Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.", 0, 1, rateAggregation);
4093        case 345689335: /*rationale*/  return new Property("rationale", "markdown", "Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.", 0, 1, rationale);
4094        case -18631389: /*clinicalRecommendationStatement*/  return new Property("clinicalRecommendationStatement", "markdown", "Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.", 0, 1, clinicalRecommendationStatement);
4095        case -2085456136: /*improvementNotation*/  return new Property("improvementNotation", "CodeableConcept", "Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).", 0, 1, improvementNotation);
4096        case -1014418093: /*definition*/  return new Property("definition", "markdown", "Provides a description of an individual term used within the measure.", 0, java.lang.Integer.MAX_VALUE, definition);
4097        case -1314002088: /*guidance*/  return new Property("guidance", "markdown", "Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.", 0, 1, guidance);
4098        case 98629247: /*group*/  return new Property("group", "", "A group of population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, group);
4099        case 1447496814: /*supplementalData*/  return new Property("supplementalData", "", "The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData);
4100        default: return super.getNamedProperty(_hash, _name, _checkValid);
4101        }
4102
4103      }
4104
4105      @Override
4106      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4107        switch (hash) {
4108        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
4109        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4110        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
4111        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4112        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
4113        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
4114        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
4115        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
4116        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // DataType
4117        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
4118        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
4119        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
4120        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
4121        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
4122        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
4123        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
4124        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
4125        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
4126        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
4127        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
4128        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
4129        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
4130        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
4131        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
4132        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
4133        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
4134        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
4135        case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType
4136        case 432371099: /*disclaimer*/ return this.disclaimer == null ? new Base[0] : new Base[] {this.disclaimer}; // MarkdownType
4137        case 1924005583: /*scoring*/ return this.scoring == null ? new Base[0] : new Base[] {this.scoring}; // CodeableConcept
4138        case 569347656: /*compositeScoring*/ return this.compositeScoring == null ? new Base[0] : new Base[] {this.compositeScoring}; // CodeableConcept
4139        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
4140        case 93273500: /*riskAdjustment*/ return this.riskAdjustment == null ? new Base[0] : new Base[] {this.riskAdjustment}; // StringType
4141        case 1254503906: /*rateAggregation*/ return this.rateAggregation == null ? new Base[0] : new Base[] {this.rateAggregation}; // StringType
4142        case 345689335: /*rationale*/ return this.rationale == null ? new Base[0] : new Base[] {this.rationale}; // MarkdownType
4143        case -18631389: /*clinicalRecommendationStatement*/ return this.clinicalRecommendationStatement == null ? new Base[0] : new Base[] {this.clinicalRecommendationStatement}; // MarkdownType
4144        case -2085456136: /*improvementNotation*/ return this.improvementNotation == null ? new Base[0] : new Base[] {this.improvementNotation}; // CodeableConcept
4145        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : this.definition.toArray(new Base[this.definition.size()]); // MarkdownType
4146        case -1314002088: /*guidance*/ return this.guidance == null ? new Base[0] : new Base[] {this.guidance}; // MarkdownType
4147        case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // MeasureGroupComponent
4148        case 1447496814: /*supplementalData*/ return this.supplementalData == null ? new Base[0] : this.supplementalData.toArray(new Base[this.supplementalData.size()]); // MeasureSupplementalDataComponent
4149        default: return super.getProperty(hash, name, checkValid);
4150        }
4151
4152      }
4153
4154      @Override
4155      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4156        switch (hash) {
4157        case 116079: // url
4158          this.url = TypeConvertor.castToUri(value); // UriType
4159          return value;
4160        case -1618432855: // identifier
4161          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
4162          return value;
4163        case 351608024: // version
4164          this.version = TypeConvertor.castToString(value); // StringType
4165          return value;
4166        case 3373707: // name
4167          this.name = TypeConvertor.castToString(value); // StringType
4168          return value;
4169        case 110371416: // title
4170          this.title = TypeConvertor.castToString(value); // StringType
4171          return value;
4172        case -2060497896: // subtitle
4173          this.subtitle = TypeConvertor.castToString(value); // StringType
4174          return value;
4175        case -892481550: // status
4176          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4177          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4178          return value;
4179        case -404562712: // experimental
4180          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
4181          return value;
4182        case -1867885268: // subject
4183          this.subject = TypeConvertor.castToType(value); // DataType
4184          return value;
4185        case 3076014: // date
4186          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
4187          return value;
4188        case 1447404028: // publisher
4189          this.publisher = TypeConvertor.castToString(value); // StringType
4190          return value;
4191        case 951526432: // contact
4192          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4193          return value;
4194        case -1724546052: // description
4195          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
4196          return value;
4197        case -669707736: // useContext
4198          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
4199          return value;
4200        case -507075711: // jurisdiction
4201          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
4202          return value;
4203        case -220463842: // purpose
4204          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
4205          return value;
4206        case 111574433: // usage
4207          this.usage = TypeConvertor.castToString(value); // StringType
4208          return value;
4209        case 1522889671: // copyright
4210          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
4211          return value;
4212        case 223539345: // approvalDate
4213          this.approvalDate = TypeConvertor.castToDate(value); // DateType
4214          return value;
4215        case -1687512484: // lastReviewDate
4216          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
4217          return value;
4218        case -403934648: // effectivePeriod
4219          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
4220          return value;
4221        case 110546223: // topic
4222          this.getTopic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
4223          return value;
4224        case -1406328437: // author
4225          this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4226          return value;
4227        case -1307827859: // editor
4228          this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4229          return value;
4230        case -261190139: // reviewer
4231          this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4232          return value;
4233        case 1740277666: // endorser
4234          this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4235          return value;
4236        case 666807069: // relatedArtifact
4237          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
4238          return value;
4239        case 166208699: // library
4240          this.getLibrary().add(TypeConvertor.castToCanonical(value)); // CanonicalType
4241          return value;
4242        case 432371099: // disclaimer
4243          this.disclaimer = TypeConvertor.castToMarkdown(value); // MarkdownType
4244          return value;
4245        case 1924005583: // scoring
4246          this.scoring = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4247          return value;
4248        case 569347656: // compositeScoring
4249          this.compositeScoring = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4250          return value;
4251        case 3575610: // type
4252          this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
4253          return value;
4254        case 93273500: // riskAdjustment
4255          this.riskAdjustment = TypeConvertor.castToString(value); // StringType
4256          return value;
4257        case 1254503906: // rateAggregation
4258          this.rateAggregation = TypeConvertor.castToString(value); // StringType
4259          return value;
4260        case 345689335: // rationale
4261          this.rationale = TypeConvertor.castToMarkdown(value); // MarkdownType
4262          return value;
4263        case -18631389: // clinicalRecommendationStatement
4264          this.clinicalRecommendationStatement = TypeConvertor.castToMarkdown(value); // MarkdownType
4265          return value;
4266        case -2085456136: // improvementNotation
4267          this.improvementNotation = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4268          return value;
4269        case -1014418093: // definition
4270          this.getDefinition().add(TypeConvertor.castToMarkdown(value)); // MarkdownType
4271          return value;
4272        case -1314002088: // guidance
4273          this.guidance = TypeConvertor.castToMarkdown(value); // MarkdownType
4274          return value;
4275        case 98629247: // group
4276          this.getGroup().add((MeasureGroupComponent) value); // MeasureGroupComponent
4277          return value;
4278        case 1447496814: // supplementalData
4279          this.getSupplementalData().add((MeasureSupplementalDataComponent) value); // MeasureSupplementalDataComponent
4280          return value;
4281        default: return super.setProperty(hash, name, value);
4282        }
4283
4284      }
4285
4286      @Override
4287      public Base setProperty(String name, Base value) throws FHIRException {
4288        if (name.equals("url")) {
4289          this.url = TypeConvertor.castToUri(value); // UriType
4290        } else if (name.equals("identifier")) {
4291          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
4292        } else if (name.equals("version")) {
4293          this.version = TypeConvertor.castToString(value); // StringType
4294        } else if (name.equals("name")) {
4295          this.name = TypeConvertor.castToString(value); // StringType
4296        } else if (name.equals("title")) {
4297          this.title = TypeConvertor.castToString(value); // StringType
4298        } else if (name.equals("subtitle")) {
4299          this.subtitle = TypeConvertor.castToString(value); // StringType
4300        } else if (name.equals("status")) {
4301          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4302          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4303        } else if (name.equals("experimental")) {
4304          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
4305        } else if (name.equals("subject[x]")) {
4306          this.subject = TypeConvertor.castToType(value); // DataType
4307        } else if (name.equals("date")) {
4308          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
4309        } else if (name.equals("publisher")) {
4310          this.publisher = TypeConvertor.castToString(value); // StringType
4311        } else if (name.equals("contact")) {
4312          this.getContact().add(TypeConvertor.castToContactDetail(value));
4313        } else if (name.equals("description")) {
4314          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
4315        } else if (name.equals("useContext")) {
4316          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
4317        } else if (name.equals("jurisdiction")) {
4318          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
4319        } else if (name.equals("purpose")) {
4320          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
4321        } else if (name.equals("usage")) {
4322          this.usage = TypeConvertor.castToString(value); // StringType
4323        } else if (name.equals("copyright")) {
4324          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
4325        } else if (name.equals("approvalDate")) {
4326          this.approvalDate = TypeConvertor.castToDate(value); // DateType
4327        } else if (name.equals("lastReviewDate")) {
4328          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
4329        } else if (name.equals("effectivePeriod")) {
4330          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
4331        } else if (name.equals("topic")) {
4332          this.getTopic().add(TypeConvertor.castToCodeableConcept(value));
4333        } else if (name.equals("author")) {
4334          this.getAuthor().add(TypeConvertor.castToContactDetail(value));
4335        } else if (name.equals("editor")) {
4336          this.getEditor().add(TypeConvertor.castToContactDetail(value));
4337        } else if (name.equals("reviewer")) {
4338          this.getReviewer().add(TypeConvertor.castToContactDetail(value));
4339        } else if (name.equals("endorser")) {
4340          this.getEndorser().add(TypeConvertor.castToContactDetail(value));
4341        } else if (name.equals("relatedArtifact")) {
4342          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
4343        } else if (name.equals("library")) {
4344          this.getLibrary().add(TypeConvertor.castToCanonical(value));
4345        } else if (name.equals("disclaimer")) {
4346          this.disclaimer = TypeConvertor.castToMarkdown(value); // MarkdownType
4347        } else if (name.equals("scoring")) {
4348          this.scoring = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4349        } else if (name.equals("compositeScoring")) {
4350          this.compositeScoring = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4351        } else if (name.equals("type")) {
4352          this.getType().add(TypeConvertor.castToCodeableConcept(value));
4353        } else if (name.equals("riskAdjustment")) {
4354          this.riskAdjustment = TypeConvertor.castToString(value); // StringType
4355        } else if (name.equals("rateAggregation")) {
4356          this.rateAggregation = TypeConvertor.castToString(value); // StringType
4357        } else if (name.equals("rationale")) {
4358          this.rationale = TypeConvertor.castToMarkdown(value); // MarkdownType
4359        } else if (name.equals("clinicalRecommendationStatement")) {
4360          this.clinicalRecommendationStatement = TypeConvertor.castToMarkdown(value); // MarkdownType
4361        } else if (name.equals("improvementNotation")) {
4362          this.improvementNotation = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4363        } else if (name.equals("definition")) {
4364          this.getDefinition().add(TypeConvertor.castToMarkdown(value));
4365        } else if (name.equals("guidance")) {
4366          this.guidance = TypeConvertor.castToMarkdown(value); // MarkdownType
4367        } else if (name.equals("group")) {
4368          this.getGroup().add((MeasureGroupComponent) value);
4369        } else if (name.equals("supplementalData")) {
4370          this.getSupplementalData().add((MeasureSupplementalDataComponent) value);
4371        } else
4372          return super.setProperty(name, value);
4373        return value;
4374      }
4375
4376      @Override
4377      public Base makeProperty(int hash, String name) throws FHIRException {
4378        switch (hash) {
4379        case 116079:  return getUrlElement();
4380        case -1618432855:  return addIdentifier(); 
4381        case 351608024:  return getVersionElement();
4382        case 3373707:  return getNameElement();
4383        case 110371416:  return getTitleElement();
4384        case -2060497896:  return getSubtitleElement();
4385        case -892481550:  return getStatusElement();
4386        case -404562712:  return getExperimentalElement();
4387        case -573640748:  return getSubject();
4388        case -1867885268:  return getSubject();
4389        case 3076014:  return getDateElement();
4390        case 1447404028:  return getPublisherElement();
4391        case 951526432:  return addContact(); 
4392        case -1724546052:  return getDescriptionElement();
4393        case -669707736:  return addUseContext(); 
4394        case -507075711:  return addJurisdiction(); 
4395        case -220463842:  return getPurposeElement();
4396        case 111574433:  return getUsageElement();
4397        case 1522889671:  return getCopyrightElement();
4398        case 223539345:  return getApprovalDateElement();
4399        case -1687512484:  return getLastReviewDateElement();
4400        case -403934648:  return getEffectivePeriod();
4401        case 110546223:  return addTopic(); 
4402        case -1406328437:  return addAuthor(); 
4403        case -1307827859:  return addEditor(); 
4404        case -261190139:  return addReviewer(); 
4405        case 1740277666:  return addEndorser(); 
4406        case 666807069:  return addRelatedArtifact(); 
4407        case 166208699:  return addLibraryElement();
4408        case 432371099:  return getDisclaimerElement();
4409        case 1924005583:  return getScoring();
4410        case 569347656:  return getCompositeScoring();
4411        case 3575610:  return addType(); 
4412        case 93273500:  return getRiskAdjustmentElement();
4413        case 1254503906:  return getRateAggregationElement();
4414        case 345689335:  return getRationaleElement();
4415        case -18631389:  return getClinicalRecommendationStatementElement();
4416        case -2085456136:  return getImprovementNotation();
4417        case -1014418093:  return addDefinitionElement();
4418        case -1314002088:  return getGuidanceElement();
4419        case 98629247:  return addGroup(); 
4420        case 1447496814:  return addSupplementalData(); 
4421        default: return super.makeProperty(hash, name);
4422        }
4423
4424      }
4425
4426      @Override
4427      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4428        switch (hash) {
4429        case 116079: /*url*/ return new String[] {"uri"};
4430        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
4431        case 351608024: /*version*/ return new String[] {"string"};
4432        case 3373707: /*name*/ return new String[] {"string"};
4433        case 110371416: /*title*/ return new String[] {"string"};
4434        case -2060497896: /*subtitle*/ return new String[] {"string"};
4435        case -892481550: /*status*/ return new String[] {"code"};
4436        case -404562712: /*experimental*/ return new String[] {"boolean"};
4437        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"};
4438        case 3076014: /*date*/ return new String[] {"dateTime"};
4439        case 1447404028: /*publisher*/ return new String[] {"string"};
4440        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
4441        case -1724546052: /*description*/ return new String[] {"markdown"};
4442        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
4443        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
4444        case -220463842: /*purpose*/ return new String[] {"markdown"};
4445        case 111574433: /*usage*/ return new String[] {"string"};
4446        case 1522889671: /*copyright*/ return new String[] {"markdown"};
4447        case 223539345: /*approvalDate*/ return new String[] {"date"};
4448        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
4449        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
4450        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
4451        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
4452        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
4453        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
4454        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
4455        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
4456        case 166208699: /*library*/ return new String[] {"canonical"};
4457        case 432371099: /*disclaimer*/ return new String[] {"markdown"};
4458        case 1924005583: /*scoring*/ return new String[] {"CodeableConcept"};
4459        case 569347656: /*compositeScoring*/ return new String[] {"CodeableConcept"};
4460        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
4461        case 93273500: /*riskAdjustment*/ return new String[] {"string"};
4462        case 1254503906: /*rateAggregation*/ return new String[] {"string"};
4463        case 345689335: /*rationale*/ return new String[] {"markdown"};
4464        case -18631389: /*clinicalRecommendationStatement*/ return new String[] {"markdown"};
4465        case -2085456136: /*improvementNotation*/ return new String[] {"CodeableConcept"};
4466        case -1014418093: /*definition*/ return new String[] {"markdown"};
4467        case -1314002088: /*guidance*/ return new String[] {"markdown"};
4468        case 98629247: /*group*/ return new String[] {};
4469        case 1447496814: /*supplementalData*/ return new String[] {};
4470        default: return super.getTypesForProperty(hash, name);
4471        }
4472
4473      }
4474
4475      @Override
4476      public Base addChild(String name) throws FHIRException {
4477        if (name.equals("url")) {
4478          throw new FHIRException("Cannot call addChild on a primitive type Measure.url");
4479        }
4480        else if (name.equals("identifier")) {
4481          return addIdentifier();
4482        }
4483        else if (name.equals("version")) {
4484          throw new FHIRException("Cannot call addChild on a primitive type Measure.version");
4485        }
4486        else if (name.equals("name")) {
4487          throw new FHIRException("Cannot call addChild on a primitive type Measure.name");
4488        }
4489        else if (name.equals("title")) {
4490          throw new FHIRException("Cannot call addChild on a primitive type Measure.title");
4491        }
4492        else if (name.equals("subtitle")) {
4493          throw new FHIRException("Cannot call addChild on a primitive type Measure.subtitle");
4494        }
4495        else if (name.equals("status")) {
4496          throw new FHIRException("Cannot call addChild on a primitive type Measure.status");
4497        }
4498        else if (name.equals("experimental")) {
4499          throw new FHIRException("Cannot call addChild on a primitive type Measure.experimental");
4500        }
4501        else if (name.equals("subjectCodeableConcept")) {
4502          this.subject = new CodeableConcept();
4503          return this.subject;
4504        }
4505        else if (name.equals("subjectReference")) {
4506          this.subject = new Reference();
4507          return this.subject;
4508        }
4509        else if (name.equals("date")) {
4510          throw new FHIRException("Cannot call addChild on a primitive type Measure.date");
4511        }
4512        else if (name.equals("publisher")) {
4513          throw new FHIRException("Cannot call addChild on a primitive type Measure.publisher");
4514        }
4515        else if (name.equals("contact")) {
4516          return addContact();
4517        }
4518        else if (name.equals("description")) {
4519          throw new FHIRException("Cannot call addChild on a primitive type Measure.description");
4520        }
4521        else if (name.equals("useContext")) {
4522          return addUseContext();
4523        }
4524        else if (name.equals("jurisdiction")) {
4525          return addJurisdiction();
4526        }
4527        else if (name.equals("purpose")) {
4528          throw new FHIRException("Cannot call addChild on a primitive type Measure.purpose");
4529        }
4530        else if (name.equals("usage")) {
4531          throw new FHIRException("Cannot call addChild on a primitive type Measure.usage");
4532        }
4533        else if (name.equals("copyright")) {
4534          throw new FHIRException("Cannot call addChild on a primitive type Measure.copyright");
4535        }
4536        else if (name.equals("approvalDate")) {
4537          throw new FHIRException("Cannot call addChild on a primitive type Measure.approvalDate");
4538        }
4539        else if (name.equals("lastReviewDate")) {
4540          throw new FHIRException("Cannot call addChild on a primitive type Measure.lastReviewDate");
4541        }
4542        else if (name.equals("effectivePeriod")) {
4543          this.effectivePeriod = new Period();
4544          return this.effectivePeriod;
4545        }
4546        else if (name.equals("topic")) {
4547          return addTopic();
4548        }
4549        else if (name.equals("author")) {
4550          return addAuthor();
4551        }
4552        else if (name.equals("editor")) {
4553          return addEditor();
4554        }
4555        else if (name.equals("reviewer")) {
4556          return addReviewer();
4557        }
4558        else if (name.equals("endorser")) {
4559          return addEndorser();
4560        }
4561        else if (name.equals("relatedArtifact")) {
4562          return addRelatedArtifact();
4563        }
4564        else if (name.equals("library")) {
4565          throw new FHIRException("Cannot call addChild on a primitive type Measure.library");
4566        }
4567        else if (name.equals("disclaimer")) {
4568          throw new FHIRException("Cannot call addChild on a primitive type Measure.disclaimer");
4569        }
4570        else if (name.equals("scoring")) {
4571          this.scoring = new CodeableConcept();
4572          return this.scoring;
4573        }
4574        else if (name.equals("compositeScoring")) {
4575          this.compositeScoring = new CodeableConcept();
4576          return this.compositeScoring;
4577        }
4578        else if (name.equals("type")) {
4579          return addType();
4580        }
4581        else if (name.equals("riskAdjustment")) {
4582          throw new FHIRException("Cannot call addChild on a primitive type Measure.riskAdjustment");
4583        }
4584        else if (name.equals("rateAggregation")) {
4585          throw new FHIRException("Cannot call addChild on a primitive type Measure.rateAggregation");
4586        }
4587        else if (name.equals("rationale")) {
4588          throw new FHIRException("Cannot call addChild on a primitive type Measure.rationale");
4589        }
4590        else if (name.equals("clinicalRecommendationStatement")) {
4591          throw new FHIRException("Cannot call addChild on a primitive type Measure.clinicalRecommendationStatement");
4592        }
4593        else if (name.equals("improvementNotation")) {
4594          this.improvementNotation = new CodeableConcept();
4595          return this.improvementNotation;
4596        }
4597        else if (name.equals("definition")) {
4598          throw new FHIRException("Cannot call addChild on a primitive type Measure.definition");
4599        }
4600        else if (name.equals("guidance")) {
4601          throw new FHIRException("Cannot call addChild on a primitive type Measure.guidance");
4602        }
4603        else if (name.equals("group")) {
4604          return addGroup();
4605        }
4606        else if (name.equals("supplementalData")) {
4607          return addSupplementalData();
4608        }
4609        else
4610          return super.addChild(name);
4611      }
4612
4613  public String fhirType() {
4614    return "Measure";
4615
4616  }
4617
4618      public Measure copy() {
4619        Measure dst = new Measure();
4620        copyValues(dst);
4621        return dst;
4622      }
4623
4624      public void copyValues(Measure dst) {
4625        super.copyValues(dst);
4626        dst.url = url == null ? null : url.copy();
4627        if (identifier != null) {
4628          dst.identifier = new ArrayList<Identifier>();
4629          for (Identifier i : identifier)
4630            dst.identifier.add(i.copy());
4631        };
4632        dst.version = version == null ? null : version.copy();
4633        dst.name = name == null ? null : name.copy();
4634        dst.title = title == null ? null : title.copy();
4635        dst.subtitle = subtitle == null ? null : subtitle.copy();
4636        dst.status = status == null ? null : status.copy();
4637        dst.experimental = experimental == null ? null : experimental.copy();
4638        dst.subject = subject == null ? null : subject.copy();
4639        dst.date = date == null ? null : date.copy();
4640        dst.publisher = publisher == null ? null : publisher.copy();
4641        if (contact != null) {
4642          dst.contact = new ArrayList<ContactDetail>();
4643          for (ContactDetail i : contact)
4644            dst.contact.add(i.copy());
4645        };
4646        dst.description = description == null ? null : description.copy();
4647        if (useContext != null) {
4648          dst.useContext = new ArrayList<UsageContext>();
4649          for (UsageContext i : useContext)
4650            dst.useContext.add(i.copy());
4651        };
4652        if (jurisdiction != null) {
4653          dst.jurisdiction = new ArrayList<CodeableConcept>();
4654          for (CodeableConcept i : jurisdiction)
4655            dst.jurisdiction.add(i.copy());
4656        };
4657        dst.purpose = purpose == null ? null : purpose.copy();
4658        dst.usage = usage == null ? null : usage.copy();
4659        dst.copyright = copyright == null ? null : copyright.copy();
4660        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
4661        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
4662        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
4663        if (topic != null) {
4664          dst.topic = new ArrayList<CodeableConcept>();
4665          for (CodeableConcept i : topic)
4666            dst.topic.add(i.copy());
4667        };
4668        if (author != null) {
4669          dst.author = new ArrayList<ContactDetail>();
4670          for (ContactDetail i : author)
4671            dst.author.add(i.copy());
4672        };
4673        if (editor != null) {
4674          dst.editor = new ArrayList<ContactDetail>();
4675          for (ContactDetail i : editor)
4676            dst.editor.add(i.copy());
4677        };
4678        if (reviewer != null) {
4679          dst.reviewer = new ArrayList<ContactDetail>();
4680          for (ContactDetail i : reviewer)
4681            dst.reviewer.add(i.copy());
4682        };
4683        if (endorser != null) {
4684          dst.endorser = new ArrayList<ContactDetail>();
4685          for (ContactDetail i : endorser)
4686            dst.endorser.add(i.copy());
4687        };
4688        if (relatedArtifact != null) {
4689          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
4690          for (RelatedArtifact i : relatedArtifact)
4691            dst.relatedArtifact.add(i.copy());
4692        };
4693        if (library != null) {
4694          dst.library = new ArrayList<CanonicalType>();
4695          for (CanonicalType i : library)
4696            dst.library.add(i.copy());
4697        };
4698        dst.disclaimer = disclaimer == null ? null : disclaimer.copy();
4699        dst.scoring = scoring == null ? null : scoring.copy();
4700        dst.compositeScoring = compositeScoring == null ? null : compositeScoring.copy();
4701        if (type != null) {
4702          dst.type = new ArrayList<CodeableConcept>();
4703          for (CodeableConcept i : type)
4704            dst.type.add(i.copy());
4705        };
4706        dst.riskAdjustment = riskAdjustment == null ? null : riskAdjustment.copy();
4707        dst.rateAggregation = rateAggregation == null ? null : rateAggregation.copy();
4708        dst.rationale = rationale == null ? null : rationale.copy();
4709        dst.clinicalRecommendationStatement = clinicalRecommendationStatement == null ? null : clinicalRecommendationStatement.copy();
4710        dst.improvementNotation = improvementNotation == null ? null : improvementNotation.copy();
4711        if (definition != null) {
4712          dst.definition = new ArrayList<MarkdownType>();
4713          for (MarkdownType i : definition)
4714            dst.definition.add(i.copy());
4715        };
4716        dst.guidance = guidance == null ? null : guidance.copy();
4717        if (group != null) {
4718          dst.group = new ArrayList<MeasureGroupComponent>();
4719          for (MeasureGroupComponent i : group)
4720            dst.group.add(i.copy());
4721        };
4722        if (supplementalData != null) {
4723          dst.supplementalData = new ArrayList<MeasureSupplementalDataComponent>();
4724          for (MeasureSupplementalDataComponent i : supplementalData)
4725            dst.supplementalData.add(i.copy());
4726        };
4727      }
4728
4729      protected Measure typedCopy() {
4730        return copy();
4731      }
4732
4733      @Override
4734      public boolean equalsDeep(Base other_) {
4735        if (!super.equalsDeep(other_))
4736          return false;
4737        if (!(other_ instanceof Measure))
4738          return false;
4739        Measure o = (Measure) other_;
4740        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
4741           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(subtitle, o.subtitle, true)
4742           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(subject, o.subject, true)
4743           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
4744           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
4745           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true)
4746           && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true)
4747           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true)
4748           && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true) && compareDeep(editor, o.editor, true)
4749           && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
4750           && compareDeep(library, o.library, true) && compareDeep(disclaimer, o.disclaimer, true) && compareDeep(scoring, o.scoring, true)
4751           && compareDeep(compositeScoring, o.compositeScoring, true) && compareDeep(type, o.type, true) && compareDeep(riskAdjustment, o.riskAdjustment, true)
4752           && compareDeep(rateAggregation, o.rateAggregation, true) && compareDeep(rationale, o.rationale, true)
4753           && compareDeep(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) && compareDeep(improvementNotation, o.improvementNotation, true)
4754           && compareDeep(definition, o.definition, true) && compareDeep(guidance, o.guidance, true) && compareDeep(group, o.group, true)
4755           && compareDeep(supplementalData, o.supplementalData, true);
4756      }
4757
4758      @Override
4759      public boolean equalsShallow(Base other_) {
4760        if (!super.equalsShallow(other_))
4761          return false;
4762        if (!(other_ instanceof Measure))
4763          return false;
4764        Measure o = (Measure) other_;
4765        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
4766           && compareValues(title, o.title, true) && compareValues(subtitle, o.subtitle, true) && compareValues(status, o.status, true)
4767           && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true)
4768           && compareValues(description, o.description, true) && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true)
4769           && compareValues(copyright, o.copyright, true) && compareValues(approvalDate, o.approvalDate, true)
4770           && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(library, o.library, true)
4771           && compareValues(disclaimer, o.disclaimer, true) && compareValues(riskAdjustment, o.riskAdjustment, true)
4772           && compareValues(rateAggregation, o.rateAggregation, true) && compareValues(rationale, o.rationale, true)
4773           && compareValues(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) && compareValues(definition, o.definition, true)
4774           && compareValues(guidance, o.guidance, true);
4775      }
4776
4777      public boolean isEmpty() {
4778        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
4779          , name, title, subtitle, status, experimental, subject, date, publisher, contact
4780          , description, useContext, jurisdiction, purpose, usage, copyright, approvalDate
4781          , lastReviewDate, effectivePeriod, topic, author, editor, reviewer, endorser, relatedArtifact
4782          , library, disclaimer, scoring, compositeScoring, type, riskAdjustment, rateAggregation
4783          , rationale, clinicalRecommendationStatement, improvementNotation, definition, guidance
4784          , group, supplementalData);
4785      }
4786
4787  @Override
4788  public ResourceType getResourceType() {
4789    return ResourceType.Measure;
4790   }
4791
4792 /**
4793   * Search parameter: <b>composed-of</b>
4794   * <p>
4795   * Description: <b>What resource is being referenced</b><br>
4796   * Type: <b>reference</b><br>
4797   * Path: <b>Measure.relatedArtifact.where(type='composed-of').resource</b><br>
4798   * </p>
4799   */
4800  @SearchParamDefinition(name="composed-of", path="Measure.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4801  public static final String SP_COMPOSED_OF = "composed-of";
4802 /**
4803   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
4804   * <p>
4805   * Description: <b>What resource is being referenced</b><br>
4806   * Type: <b>reference</b><br>
4807   * Path: <b>Measure.relatedArtifact.where(type='composed-of').resource</b><br>
4808   * </p>
4809   */
4810  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
4811
4812/**
4813   * Constant for fluent queries to be used to add include statements. Specifies
4814   * the path value of "<b>Measure:composed-of</b>".
4815   */
4816  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("Measure:composed-of").toLocked();
4817
4818 /**
4819   * Search parameter: <b>context-quantity</b>
4820   * <p>
4821   * Description: <b>A quantity- or range-valued use context assigned to the measure</b><br>
4822   * Type: <b>quantity</b><br>
4823   * Path: <b>(Measure.useContext.value as Quantity) | (Measure.useContext.value as Range)</b><br>
4824   * </p>
4825   */
4826  @SearchParamDefinition(name="context-quantity", path="(Measure.useContext.value as Quantity) | (Measure.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the measure", type="quantity" )
4827  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
4828 /**
4829   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
4830   * <p>
4831   * Description: <b>A quantity- or range-valued use context assigned to the measure</b><br>
4832   * Type: <b>quantity</b><br>
4833   * Path: <b>(Measure.useContext.value as Quantity) | (Measure.useContext.value as Range)</b><br>
4834   * </p>
4835   */
4836  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
4837
4838 /**
4839   * Search parameter: <b>context-type-quantity</b>
4840   * <p>
4841   * Description: <b>A use context type and quantity- or range-based value assigned to the measure</b><br>
4842   * Type: <b>composite</b><br>
4843   * Path: <b>Measure.useContext</b><br>
4844   * </p>
4845   */
4846  @SearchParamDefinition(name="context-type-quantity", path="Measure.useContext", description="A use context type and quantity- or range-based value assigned to the measure", type="composite", compositeOf={"context-type", "context-quantity"} )
4847  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
4848 /**
4849   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
4850   * <p>
4851   * Description: <b>A use context type and quantity- or range-based value assigned to the measure</b><br>
4852   * Type: <b>composite</b><br>
4853   * Path: <b>Measure.useContext</b><br>
4854   * </p>
4855   */
4856  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);
4857
4858 /**
4859   * Search parameter: <b>context-type-value</b>
4860   * <p>
4861   * Description: <b>A use context type and value assigned to the measure</b><br>
4862   * Type: <b>composite</b><br>
4863   * Path: <b>Measure.useContext</b><br>
4864   * </p>
4865   */
4866  @SearchParamDefinition(name="context-type-value", path="Measure.useContext", description="A use context type and value assigned to the measure", type="composite", compositeOf={"context-type", "context"} )
4867  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
4868 /**
4869   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
4870   * <p>
4871   * Description: <b>A use context type and value assigned to the measure</b><br>
4872   * Type: <b>composite</b><br>
4873   * Path: <b>Measure.useContext</b><br>
4874   * </p>
4875   */
4876  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);
4877
4878 /**
4879   * Search parameter: <b>context-type</b>
4880   * <p>
4881   * Description: <b>A type of use context assigned to the measure</b><br>
4882   * Type: <b>token</b><br>
4883   * Path: <b>Measure.useContext.code</b><br>
4884   * </p>
4885   */
4886  @SearchParamDefinition(name="context-type", path="Measure.useContext.code", description="A type of use context assigned to the measure", type="token" )
4887  public static final String SP_CONTEXT_TYPE = "context-type";
4888 /**
4889   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
4890   * <p>
4891   * Description: <b>A type of use context assigned to the measure</b><br>
4892   * Type: <b>token</b><br>
4893   * Path: <b>Measure.useContext.code</b><br>
4894   * </p>
4895   */
4896  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
4897
4898 /**
4899   * Search parameter: <b>context</b>
4900   * <p>
4901   * Description: <b>A use context assigned to the measure</b><br>
4902   * Type: <b>token</b><br>
4903   * Path: <b>(Measure.useContext.value as CodeableConcept)</b><br>
4904   * </p>
4905   */
4906  @SearchParamDefinition(name="context", path="(Measure.useContext.value as CodeableConcept)", description="A use context assigned to the measure", type="token" )
4907  public static final String SP_CONTEXT = "context";
4908 /**
4909   * <b>Fluent Client</b> search parameter constant for <b>context</b>
4910   * <p>
4911   * Description: <b>A use context assigned to the measure</b><br>
4912   * Type: <b>token</b><br>
4913   * Path: <b>(Measure.useContext.value as CodeableConcept)</b><br>
4914   * </p>
4915   */
4916  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
4917
4918 /**
4919   * Search parameter: <b>date</b>
4920   * <p>
4921   * Description: <b>The measure publication date</b><br>
4922   * Type: <b>date</b><br>
4923   * Path: <b>Measure.date</b><br>
4924   * </p>
4925   */
4926  @SearchParamDefinition(name="date", path="Measure.date", description="The measure publication date", type="date" )
4927  public static final String SP_DATE = "date";
4928 /**
4929   * <b>Fluent Client</b> search parameter constant for <b>date</b>
4930   * <p>
4931   * Description: <b>The measure publication date</b><br>
4932   * Type: <b>date</b><br>
4933   * Path: <b>Measure.date</b><br>
4934   * </p>
4935   */
4936  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
4937
4938 /**
4939   * Search parameter: <b>depends-on</b>
4940   * <p>
4941   * Description: <b>What resource is being referenced</b><br>
4942   * Type: <b>reference</b><br>
4943   * Path: <b>Measure.relatedArtifact.where(type='depends-on').resource | Measure.library</b><br>
4944   * </p>
4945   */
4946  @SearchParamDefinition(name="depends-on", path="Measure.relatedArtifact.where(type='depends-on').resource | Measure.library", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4947  public static final String SP_DEPENDS_ON = "depends-on";
4948 /**
4949   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
4950   * <p>
4951   * Description: <b>What resource is being referenced</b><br>
4952   * Type: <b>reference</b><br>
4953   * Path: <b>Measure.relatedArtifact.where(type='depends-on').resource | Measure.library</b><br>
4954   * </p>
4955   */
4956  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
4957
4958/**
4959   * Constant for fluent queries to be used to add include statements. Specifies
4960   * the path value of "<b>Measure:depends-on</b>".
4961   */
4962  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("Measure:depends-on").toLocked();
4963
4964 /**
4965   * Search parameter: <b>derived-from</b>
4966   * <p>
4967   * Description: <b>What resource is being referenced</b><br>
4968   * Type: <b>reference</b><br>
4969   * Path: <b>Measure.relatedArtifact.where(type='derived-from').resource</b><br>
4970   * </p>
4971   */
4972  @SearchParamDefinition(name="derived-from", path="Measure.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4973  public static final String SP_DERIVED_FROM = "derived-from";
4974 /**
4975   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
4976   * <p>
4977   * Description: <b>What resource is being referenced</b><br>
4978   * Type: <b>reference</b><br>
4979   * Path: <b>Measure.relatedArtifact.where(type='derived-from').resource</b><br>
4980   * </p>
4981   */
4982  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
4983
4984/**
4985   * Constant for fluent queries to be used to add include statements. Specifies
4986   * the path value of "<b>Measure:derived-from</b>".
4987   */
4988  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("Measure:derived-from").toLocked();
4989
4990 /**
4991   * Search parameter: <b>description</b>
4992   * <p>
4993   * Description: <b>The description of the measure</b><br>
4994   * Type: <b>string</b><br>
4995   * Path: <b>Measure.description</b><br>
4996   * </p>
4997   */
4998  @SearchParamDefinition(name="description", path="Measure.description", description="The description of the measure", type="string" )
4999  public static final String SP_DESCRIPTION = "description";
5000 /**
5001   * <b>Fluent Client</b> search parameter constant for <b>description</b>
5002   * <p>
5003   * Description: <b>The description of the measure</b><br>
5004   * Type: <b>string</b><br>
5005   * Path: <b>Measure.description</b><br>
5006   * </p>
5007   */
5008  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
5009
5010 /**
5011   * Search parameter: <b>effective</b>
5012   * <p>
5013   * Description: <b>The time during which the measure is intended to be in use</b><br>
5014   * Type: <b>date</b><br>
5015   * Path: <b>Measure.effectivePeriod</b><br>
5016   * </p>
5017   */
5018  @SearchParamDefinition(name="effective", path="Measure.effectivePeriod", description="The time during which the measure is intended to be in use", type="date" )
5019  public static final String SP_EFFECTIVE = "effective";
5020 /**
5021   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
5022   * <p>
5023   * Description: <b>The time during which the measure is intended to be in use</b><br>
5024   * Type: <b>date</b><br>
5025   * Path: <b>Measure.effectivePeriod</b><br>
5026   * </p>
5027   */
5028  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
5029
5030 /**
5031   * Search parameter: <b>identifier</b>
5032   * <p>
5033   * Description: <b>External identifier for the measure</b><br>
5034   * Type: <b>token</b><br>
5035   * Path: <b>Measure.identifier</b><br>
5036   * </p>
5037   */
5038  @SearchParamDefinition(name="identifier", path="Measure.identifier", description="External identifier for the measure", type="token" )
5039  public static final String SP_IDENTIFIER = "identifier";
5040 /**
5041   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5042   * <p>
5043   * Description: <b>External identifier for the measure</b><br>
5044   * Type: <b>token</b><br>
5045   * Path: <b>Measure.identifier</b><br>
5046   * </p>
5047   */
5048  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5049
5050 /**
5051   * Search parameter: <b>jurisdiction</b>
5052   * <p>
5053   * Description: <b>Intended jurisdiction for the measure</b><br>
5054   * Type: <b>token</b><br>
5055   * Path: <b>Measure.jurisdiction</b><br>
5056   * </p>
5057   */
5058  @SearchParamDefinition(name="jurisdiction", path="Measure.jurisdiction", description="Intended jurisdiction for the measure", type="token" )
5059  public static final String SP_JURISDICTION = "jurisdiction";
5060 /**
5061   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
5062   * <p>
5063   * Description: <b>Intended jurisdiction for the measure</b><br>
5064   * Type: <b>token</b><br>
5065   * Path: <b>Measure.jurisdiction</b><br>
5066   * </p>
5067   */
5068  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
5069
5070 /**
5071   * Search parameter: <b>name</b>
5072   * <p>
5073   * Description: <b>Computationally friendly name of the measure</b><br>
5074   * Type: <b>string</b><br>
5075   * Path: <b>Measure.name</b><br>
5076   * </p>
5077   */
5078  @SearchParamDefinition(name="name", path="Measure.name", description="Computationally friendly name of the measure", type="string" )
5079  public static final String SP_NAME = "name";
5080 /**
5081   * <b>Fluent Client</b> search parameter constant for <b>name</b>
5082   * <p>
5083   * Description: <b>Computationally friendly name of the measure</b><br>
5084   * Type: <b>string</b><br>
5085   * Path: <b>Measure.name</b><br>
5086   * </p>
5087   */
5088  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
5089
5090 /**
5091   * Search parameter: <b>predecessor</b>
5092   * <p>
5093   * Description: <b>What resource is being referenced</b><br>
5094   * Type: <b>reference</b><br>
5095   * Path: <b>Measure.relatedArtifact.where(type='predecessor').resource</b><br>
5096   * </p>
5097   */
5098  @SearchParamDefinition(name="predecessor", path="Measure.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5099  public static final String SP_PREDECESSOR = "predecessor";
5100 /**
5101   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
5102   * <p>
5103   * Description: <b>What resource is being referenced</b><br>
5104   * Type: <b>reference</b><br>
5105   * Path: <b>Measure.relatedArtifact.where(type='predecessor').resource</b><br>
5106   * </p>
5107   */
5108  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
5109
5110/**
5111   * Constant for fluent queries to be used to add include statements. Specifies
5112   * the path value of "<b>Measure:predecessor</b>".
5113   */
5114  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("Measure:predecessor").toLocked();
5115
5116 /**
5117   * Search parameter: <b>publisher</b>
5118   * <p>
5119   * Description: <b>Name of the publisher of the measure</b><br>
5120   * Type: <b>string</b><br>
5121   * Path: <b>Measure.publisher</b><br>
5122   * </p>
5123   */
5124  @SearchParamDefinition(name="publisher", path="Measure.publisher", description="Name of the publisher of the measure", type="string" )
5125  public static final String SP_PUBLISHER = "publisher";
5126 /**
5127   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
5128   * <p>
5129   * Description: <b>Name of the publisher of the measure</b><br>
5130   * Type: <b>string</b><br>
5131   * Path: <b>Measure.publisher</b><br>
5132   * </p>
5133   */
5134  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
5135
5136 /**
5137   * Search parameter: <b>status</b>
5138   * <p>
5139   * Description: <b>The current status of the measure</b><br>
5140   * Type: <b>token</b><br>
5141   * Path: <b>Measure.status</b><br>
5142   * </p>
5143   */
5144  @SearchParamDefinition(name="status", path="Measure.status", description="The current status of the measure", type="token" )
5145  public static final String SP_STATUS = "status";
5146 /**
5147   * <b>Fluent Client</b> search parameter constant for <b>status</b>
5148   * <p>
5149   * Description: <b>The current status of the measure</b><br>
5150   * Type: <b>token</b><br>
5151   * Path: <b>Measure.status</b><br>
5152   * </p>
5153   */
5154  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
5155
5156 /**
5157   * Search parameter: <b>successor</b>
5158   * <p>
5159   * Description: <b>What resource is being referenced</b><br>
5160   * Type: <b>reference</b><br>
5161   * Path: <b>Measure.relatedArtifact.where(type='successor').resource</b><br>
5162   * </p>
5163   */
5164  @SearchParamDefinition(name="successor", path="Measure.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5165  public static final String SP_SUCCESSOR = "successor";
5166 /**
5167   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
5168   * <p>
5169   * Description: <b>What resource is being referenced</b><br>
5170   * Type: <b>reference</b><br>
5171   * Path: <b>Measure.relatedArtifact.where(type='successor').resource</b><br>
5172   * </p>
5173   */
5174  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
5175
5176/**
5177   * Constant for fluent queries to be used to add include statements. Specifies
5178   * the path value of "<b>Measure:successor</b>".
5179   */
5180  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("Measure:successor").toLocked();
5181
5182 /**
5183   * Search parameter: <b>title</b>
5184   * <p>
5185   * Description: <b>The human-friendly name of the measure</b><br>
5186   * Type: <b>string</b><br>
5187   * Path: <b>Measure.title</b><br>
5188   * </p>
5189   */
5190  @SearchParamDefinition(name="title", path="Measure.title", description="The human-friendly name of the measure", type="string" )
5191  public static final String SP_TITLE = "title";
5192 /**
5193   * <b>Fluent Client</b> search parameter constant for <b>title</b>
5194   * <p>
5195   * Description: <b>The human-friendly name of the measure</b><br>
5196   * Type: <b>string</b><br>
5197   * Path: <b>Measure.title</b><br>
5198   * </p>
5199   */
5200  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
5201
5202 /**
5203   * Search parameter: <b>topic</b>
5204   * <p>
5205   * Description: <b>Topics associated with the measure</b><br>
5206   * Type: <b>token</b><br>
5207   * Path: <b>Measure.topic</b><br>
5208   * </p>
5209   */
5210  @SearchParamDefinition(name="topic", path="Measure.topic", description="Topics associated with the measure", type="token" )
5211  public static final String SP_TOPIC = "topic";
5212 /**
5213   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
5214   * <p>
5215   * Description: <b>Topics associated with the measure</b><br>
5216   * Type: <b>token</b><br>
5217   * Path: <b>Measure.topic</b><br>
5218   * </p>
5219   */
5220  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
5221
5222 /**
5223   * Search parameter: <b>url</b>
5224   * <p>
5225   * Description: <b>The uri that identifies the measure</b><br>
5226   * Type: <b>uri</b><br>
5227   * Path: <b>Measure.url</b><br>
5228   * </p>
5229   */
5230  @SearchParamDefinition(name="url", path="Measure.url", description="The uri that identifies the measure", type="uri" )
5231  public static final String SP_URL = "url";
5232 /**
5233   * <b>Fluent Client</b> search parameter constant for <b>url</b>
5234   * <p>
5235   * Description: <b>The uri that identifies the measure</b><br>
5236   * Type: <b>uri</b><br>
5237   * Path: <b>Measure.url</b><br>
5238   * </p>
5239   */
5240  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
5241
5242 /**
5243   * Search parameter: <b>version</b>
5244   * <p>
5245   * Description: <b>The business version of the measure</b><br>
5246   * Type: <b>token</b><br>
5247   * Path: <b>Measure.version</b><br>
5248   * </p>
5249   */
5250  @SearchParamDefinition(name="version", path="Measure.version", description="The business version of the measure", type="token" )
5251  public static final String SP_VERSION = "version";
5252 /**
5253   * <b>Fluent Client</b> search parameter constant for <b>version</b>
5254   * <p>
5255   * Description: <b>The business version of the measure</b><br>
5256   * Type: <b>token</b><br>
5257   * Path: <b>Measure.version</b><br>
5258   * </p>
5259   */
5260  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
5261
5262
5263}
5264