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