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