001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import ca.uhn.fhir.model.api.annotation.ResourceDef;
038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
039import ca.uhn.fhir.model.api.annotation.Child;
040import ca.uhn.fhir.model.api.annotation.ChildOrder;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.Block;
043import org.hl7.fhir.instance.model.api.*;
044import org.hl7.fhir.exceptions.FHIRException;
045/**
046 * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
047 */
048@ResourceDef(name="MeasureReport", profile="http://hl7.org/fhir/StructureDefinition/MeasureReport")
049public class MeasureReport extends DomainResource {
050
051    public enum MeasureReportStatus {
052        /**
053         * The report is complete and ready for use.
054         */
055        COMPLETE, 
056        /**
057         * The report is currently being generated.
058         */
059        PENDING, 
060        /**
061         * An error occurred attempting to generate the report.
062         */
063        ERROR, 
064        /**
065         * added to help the parsers with the generic types
066         */
067        NULL;
068        public static MeasureReportStatus fromCode(String codeString) throws FHIRException {
069            if (codeString == null || "".equals(codeString))
070                return null;
071        if ("complete".equals(codeString))
072          return COMPLETE;
073        if ("pending".equals(codeString))
074          return PENDING;
075        if ("error".equals(codeString))
076          return ERROR;
077        if (Configuration.isAcceptInvalidEnums())
078          return null;
079        else
080          throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'");
081        }
082        public String toCode() {
083          switch (this) {
084            case COMPLETE: return "complete";
085            case PENDING: return "pending";
086            case ERROR: return "error";
087            default: return "?";
088          }
089        }
090        public String getSystem() {
091          switch (this) {
092            case COMPLETE: return "http://hl7.org/fhir/measure-report-status";
093            case PENDING: return "http://hl7.org/fhir/measure-report-status";
094            case ERROR: return "http://hl7.org/fhir/measure-report-status";
095            default: return "?";
096          }
097        }
098        public String getDefinition() {
099          switch (this) {
100            case COMPLETE: return "The report is complete and ready for use.";
101            case PENDING: return "The report is currently being generated.";
102            case ERROR: return "An error occurred attempting to generate the report.";
103            default: return "?";
104          }
105        }
106        public String getDisplay() {
107          switch (this) {
108            case COMPLETE: return "Complete";
109            case PENDING: return "Pending";
110            case ERROR: return "Error";
111            default: return "?";
112          }
113        }
114    }
115
116  public static class MeasureReportStatusEnumFactory implements EnumFactory<MeasureReportStatus> {
117    public MeasureReportStatus fromCode(String codeString) throws IllegalArgumentException {
118      if (codeString == null || "".equals(codeString))
119            if (codeString == null || "".equals(codeString))
120                return null;
121        if ("complete".equals(codeString))
122          return MeasureReportStatus.COMPLETE;
123        if ("pending".equals(codeString))
124          return MeasureReportStatus.PENDING;
125        if ("error".equals(codeString))
126          return MeasureReportStatus.ERROR;
127        throw new IllegalArgumentException("Unknown MeasureReportStatus code '"+codeString+"'");
128        }
129        public Enumeration<MeasureReportStatus> fromType(Base code) throws FHIRException {
130          if (code == null)
131            return null;
132          if (code.isEmpty())
133            return new Enumeration<MeasureReportStatus>(this);
134          String codeString = ((PrimitiveType) code).asStringValue();
135          if (codeString == null || "".equals(codeString))
136            return null;
137        if ("complete".equals(codeString))
138          return new Enumeration<MeasureReportStatus>(this, MeasureReportStatus.COMPLETE);
139        if ("pending".equals(codeString))
140          return new Enumeration<MeasureReportStatus>(this, MeasureReportStatus.PENDING);
141        if ("error".equals(codeString))
142          return new Enumeration<MeasureReportStatus>(this, MeasureReportStatus.ERROR);
143        throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'");
144        }
145    public String toCode(MeasureReportStatus code) {
146      if (code == MeasureReportStatus.COMPLETE)
147        return "complete";
148      if (code == MeasureReportStatus.PENDING)
149        return "pending";
150      if (code == MeasureReportStatus.ERROR)
151        return "error";
152      return "?";
153      }
154    public String toSystem(MeasureReportStatus code) {
155      return code.getSystem();
156      }
157    }
158
159    public enum MeasureReportType {
160        /**
161         * An individual report that provides information on the performance for a given measure with respect to a single subject.
162         */
163        INDIVIDUAL, 
164        /**
165         * A subject list report that includes a listing of subjects that satisfied each population criteria in the measure.
166         */
167        SUBJECTLIST, 
168        /**
169         * A summary report that returns the number of members in each population criteria for the measure.
170         */
171        SUMMARY, 
172        /**
173         * A data collection report that contains data-of-interest for the measure.
174         */
175        DATACOLLECTION, 
176        /**
177         * added to help the parsers with the generic types
178         */
179        NULL;
180        public static MeasureReportType fromCode(String codeString) throws FHIRException {
181            if (codeString == null || "".equals(codeString))
182                return null;
183        if ("individual".equals(codeString))
184          return INDIVIDUAL;
185        if ("subject-list".equals(codeString))
186          return SUBJECTLIST;
187        if ("summary".equals(codeString))
188          return SUMMARY;
189        if ("data-collection".equals(codeString))
190          return DATACOLLECTION;
191        if (Configuration.isAcceptInvalidEnums())
192          return null;
193        else
194          throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'");
195        }
196        public String toCode() {
197          switch (this) {
198            case INDIVIDUAL: return "individual";
199            case SUBJECTLIST: return "subject-list";
200            case SUMMARY: return "summary";
201            case DATACOLLECTION: return "data-collection";
202            default: return "?";
203          }
204        }
205        public String getSystem() {
206          switch (this) {
207            case INDIVIDUAL: return "http://hl7.org/fhir/measure-report-type";
208            case SUBJECTLIST: return "http://hl7.org/fhir/measure-report-type";
209            case SUMMARY: return "http://hl7.org/fhir/measure-report-type";
210            case DATACOLLECTION: return "http://hl7.org/fhir/measure-report-type";
211            default: return "?";
212          }
213        }
214        public String getDefinition() {
215          switch (this) {
216            case INDIVIDUAL: return "An individual report that provides information on the performance for a given measure with respect to a single subject.";
217            case SUBJECTLIST: return "A subject list report that includes a listing of subjects that satisfied each population criteria in the measure.";
218            case SUMMARY: return "A summary report that returns the number of members in each population criteria for the measure.";
219            case DATACOLLECTION: return "A data collection report that contains data-of-interest for the measure.";
220            default: return "?";
221          }
222        }
223        public String getDisplay() {
224          switch (this) {
225            case INDIVIDUAL: return "Individual";
226            case SUBJECTLIST: return "Subject List";
227            case SUMMARY: return "Summary";
228            case DATACOLLECTION: return "Data Collection";
229            default: return "?";
230          }
231        }
232    }
233
234  public static class MeasureReportTypeEnumFactory implements EnumFactory<MeasureReportType> {
235    public MeasureReportType fromCode(String codeString) throws IllegalArgumentException {
236      if (codeString == null || "".equals(codeString))
237            if (codeString == null || "".equals(codeString))
238                return null;
239        if ("individual".equals(codeString))
240          return MeasureReportType.INDIVIDUAL;
241        if ("subject-list".equals(codeString))
242          return MeasureReportType.SUBJECTLIST;
243        if ("summary".equals(codeString))
244          return MeasureReportType.SUMMARY;
245        if ("data-collection".equals(codeString))
246          return MeasureReportType.DATACOLLECTION;
247        throw new IllegalArgumentException("Unknown MeasureReportType code '"+codeString+"'");
248        }
249        public Enumeration<MeasureReportType> fromType(Base code) throws FHIRException {
250          if (code == null)
251            return null;
252          if (code.isEmpty())
253            return new Enumeration<MeasureReportType>(this);
254          String codeString = ((PrimitiveType) code).asStringValue();
255          if (codeString == null || "".equals(codeString))
256            return null;
257        if ("individual".equals(codeString))
258          return new Enumeration<MeasureReportType>(this, MeasureReportType.INDIVIDUAL);
259        if ("subject-list".equals(codeString))
260          return new Enumeration<MeasureReportType>(this, MeasureReportType.SUBJECTLIST);
261        if ("summary".equals(codeString))
262          return new Enumeration<MeasureReportType>(this, MeasureReportType.SUMMARY);
263        if ("data-collection".equals(codeString))
264          return new Enumeration<MeasureReportType>(this, MeasureReportType.DATACOLLECTION);
265        throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'");
266        }
267    public String toCode(MeasureReportType code) {
268      if (code == MeasureReportType.INDIVIDUAL)
269        return "individual";
270      if (code == MeasureReportType.SUBJECTLIST)
271        return "subject-list";
272      if (code == MeasureReportType.SUMMARY)
273        return "summary";
274      if (code == MeasureReportType.DATACOLLECTION)
275        return "data-collection";
276      return "?";
277      }
278    public String toSystem(MeasureReportType code) {
279      return code.getSystem();
280      }
281    }
282
283    public enum MeasureImprovementNotation {
284        /**
285         * Improvement in the measure is noted as an increase in the measure score.
286         */
287        INCREASE, 
288        /**
289         * Improvement in the measure is noted as a decrease in the measure score.
290         */
291        DECREASE, 
292        /**
293         * added to help the parsers with the generic types
294         */
295        NULL;
296        public static MeasureImprovementNotation fromCode(String codeString) throws FHIRException {
297            if (codeString == null || "".equals(codeString))
298                return null;
299        if ("increase".equals(codeString))
300          return INCREASE;
301        if ("decrease".equals(codeString))
302          return DECREASE;
303        if (Configuration.isAcceptInvalidEnums())
304          return null;
305        else
306          throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
307        }
308        public String toCode() {
309          switch (this) {
310            case INCREASE: return "increase";
311            case DECREASE: return "decrease";
312            default: return "?";
313          }
314        }
315        public String getSystem() {
316          switch (this) {
317            case INCREASE: return "http://hl7.org/fhir/measure-improvement-notation";
318            case DECREASE: return "http://hl7.org/fhir/measure-improvement-notation";
319            default: return "?";
320          }
321        }
322        public String getDefinition() {
323          switch (this) {
324            case INCREASE: return "Improvement in the measure is noted as an increase in the measure score.";
325            case DECREASE: return "Improvement in the measure is noted as a decrease in the measure score.";
326            default: return "?";
327          }
328        }
329        public String getDisplay() {
330          switch (this) {
331            case INCREASE: return "Increase";
332            case DECREASE: return "Decrease";
333            default: return "?";
334          }
335        }
336    }
337
338  public static class MeasureImprovementNotationEnumFactory implements EnumFactory<MeasureImprovementNotation> {
339    public MeasureImprovementNotation fromCode(String codeString) throws IllegalArgumentException {
340      if (codeString == null || "".equals(codeString))
341            if (codeString == null || "".equals(codeString))
342                return null;
343        if ("increase".equals(codeString))
344          return MeasureImprovementNotation.INCREASE;
345        if ("decrease".equals(codeString))
346          return MeasureImprovementNotation.DECREASE;
347        throw new IllegalArgumentException("Unknown MeasureImprovementNotation code '"+codeString+"'");
348        }
349        public Enumeration<MeasureImprovementNotation> fromType(Base code) throws FHIRException {
350          if (code == null)
351            return null;
352          if (code.isEmpty())
353            return new Enumeration<MeasureImprovementNotation>(this);
354          String codeString = ((PrimitiveType) code).asStringValue();
355          if (codeString == null || "".equals(codeString))
356            return null;
357        if ("increase".equals(codeString))
358          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.INCREASE);
359        if ("decrease".equals(codeString))
360          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.DECREASE);
361        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
362        }
363    public String toCode(MeasureImprovementNotation code) {
364      if (code == MeasureImprovementNotation.INCREASE)
365        return "increase";
366      if (code == MeasureImprovementNotation.DECREASE)
367        return "decrease";
368      return "?";
369      }
370    public String toSystem(MeasureImprovementNotation code) {
371      return code.getSystem();
372      }
373    }
374
375    @Block()
376    public static class MeasureReportGroupComponent extends BackboneElement implements IBaseBackboneElement {
377        /**
378         * The meaning of the population group as defined in the measure definition.
379         */
380        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
381        @Description(shortDefinition="Meaning of the group", formalDefinition="The meaning of the population group as defined in the measure definition." )
382        protected CodeableConcept code;
383
384        /**
385         * The populations that make up the population group, one for each type of population appropriate for the measure.
386         */
387        @Child(name = "population", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
388        @Description(shortDefinition="The populations in the group", formalDefinition="The populations that make up the population group, one for each type of population appropriate for the measure." )
389        protected List<MeasureReportGroupPopulationComponent> population;
390
391        /**
392         * The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.
393         */
394        @Child(name = "measureScore", type = {Quantity.class}, order=3, min=0, max=1, modifier=false, summary=true)
395        @Description(shortDefinition="What score this group achieved", formalDefinition="The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group." )
396        protected Quantity measureScore;
397
398        /**
399         * When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.
400         */
401        @Child(name = "stratifier", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
402        @Description(shortDefinition="Stratification results", formalDefinition="When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure." )
403        protected List<MeasureReportGroupStratifierComponent> stratifier;
404
405        private static final long serialVersionUID = 1744426009L;
406
407    /**
408     * Constructor
409     */
410      public MeasureReportGroupComponent() {
411        super();
412      }
413
414        /**
415         * @return {@link #code} (The meaning of the population group as defined in the measure definition.)
416         */
417        public CodeableConcept getCode() { 
418          if (this.code == null)
419            if (Configuration.errorOnAutoCreate())
420              throw new Error("Attempt to auto-create MeasureReportGroupComponent.code");
421            else if (Configuration.doAutoCreate())
422              this.code = new CodeableConcept(); // cc
423          return this.code;
424        }
425
426        public boolean hasCode() { 
427          return this.code != null && !this.code.isEmpty();
428        }
429
430        /**
431         * @param value {@link #code} (The meaning of the population group as defined in the measure definition.)
432         */
433        public MeasureReportGroupComponent setCode(CodeableConcept value) { 
434          this.code = value;
435          return this;
436        }
437
438        /**
439         * @return {@link #population} (The populations that make up the population group, one for each type of population appropriate for the measure.)
440         */
441        public List<MeasureReportGroupPopulationComponent> getPopulation() { 
442          if (this.population == null)
443            this.population = new ArrayList<MeasureReportGroupPopulationComponent>();
444          return this.population;
445        }
446
447        /**
448         * @return Returns a reference to <code>this</code> for easy method chaining
449         */
450        public MeasureReportGroupComponent setPopulation(List<MeasureReportGroupPopulationComponent> thePopulation) { 
451          this.population = thePopulation;
452          return this;
453        }
454
455        public boolean hasPopulation() { 
456          if (this.population == null)
457            return false;
458          for (MeasureReportGroupPopulationComponent item : this.population)
459            if (!item.isEmpty())
460              return true;
461          return false;
462        }
463
464        public MeasureReportGroupPopulationComponent addPopulation() { //3
465          MeasureReportGroupPopulationComponent t = new MeasureReportGroupPopulationComponent();
466          if (this.population == null)
467            this.population = new ArrayList<MeasureReportGroupPopulationComponent>();
468          this.population.add(t);
469          return t;
470        }
471
472        public MeasureReportGroupComponent addPopulation(MeasureReportGroupPopulationComponent t) { //3
473          if (t == null)
474            return this;
475          if (this.population == null)
476            this.population = new ArrayList<MeasureReportGroupPopulationComponent>();
477          this.population.add(t);
478          return this;
479        }
480
481        /**
482         * @return The first repetition of repeating field {@link #population}, creating it if it does not already exist
483         */
484        public MeasureReportGroupPopulationComponent getPopulationFirstRep() { 
485          if (getPopulation().isEmpty()) {
486            addPopulation();
487          }
488          return getPopulation().get(0);
489        }
490
491        /**
492         * @return {@link #measureScore} (The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.)
493         */
494        public Quantity getMeasureScore() { 
495          if (this.measureScore == null)
496            if (Configuration.errorOnAutoCreate())
497              throw new Error("Attempt to auto-create MeasureReportGroupComponent.measureScore");
498            else if (Configuration.doAutoCreate())
499              this.measureScore = new Quantity(); // cc
500          return this.measureScore;
501        }
502
503        public boolean hasMeasureScore() { 
504          return this.measureScore != null && !this.measureScore.isEmpty();
505        }
506
507        /**
508         * @param value {@link #measureScore} (The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.)
509         */
510        public MeasureReportGroupComponent setMeasureScore(Quantity value) { 
511          this.measureScore = value;
512          return this;
513        }
514
515        /**
516         * @return {@link #stratifier} (When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.)
517         */
518        public List<MeasureReportGroupStratifierComponent> getStratifier() { 
519          if (this.stratifier == null)
520            this.stratifier = new ArrayList<MeasureReportGroupStratifierComponent>();
521          return this.stratifier;
522        }
523
524        /**
525         * @return Returns a reference to <code>this</code> for easy method chaining
526         */
527        public MeasureReportGroupComponent setStratifier(List<MeasureReportGroupStratifierComponent> theStratifier) { 
528          this.stratifier = theStratifier;
529          return this;
530        }
531
532        public boolean hasStratifier() { 
533          if (this.stratifier == null)
534            return false;
535          for (MeasureReportGroupStratifierComponent item : this.stratifier)
536            if (!item.isEmpty())
537              return true;
538          return false;
539        }
540
541        public MeasureReportGroupStratifierComponent addStratifier() { //3
542          MeasureReportGroupStratifierComponent t = new MeasureReportGroupStratifierComponent();
543          if (this.stratifier == null)
544            this.stratifier = new ArrayList<MeasureReportGroupStratifierComponent>();
545          this.stratifier.add(t);
546          return t;
547        }
548
549        public MeasureReportGroupComponent addStratifier(MeasureReportGroupStratifierComponent t) { //3
550          if (t == null)
551            return this;
552          if (this.stratifier == null)
553            this.stratifier = new ArrayList<MeasureReportGroupStratifierComponent>();
554          this.stratifier.add(t);
555          return this;
556        }
557
558        /**
559         * @return The first repetition of repeating field {@link #stratifier}, creating it if it does not already exist
560         */
561        public MeasureReportGroupStratifierComponent getStratifierFirstRep() { 
562          if (getStratifier().isEmpty()) {
563            addStratifier();
564          }
565          return getStratifier().get(0);
566        }
567
568        protected void listChildren(List<Property> children) {
569          super.listChildren(children);
570          children.add(new Property("code", "CodeableConcept", "The meaning of the population group as defined in the measure definition.", 0, 1, code));
571          children.add(new Property("population", "", "The populations that make up the population group, one for each type of population appropriate for the measure.", 0, java.lang.Integer.MAX_VALUE, population));
572          children.add(new Property("measureScore", "Quantity", "The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.", 0, 1, measureScore));
573          children.add(new Property("stratifier", "", "When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.", 0, java.lang.Integer.MAX_VALUE, stratifier));
574        }
575
576        @Override
577        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
578          switch (_hash) {
579          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The meaning of the population group as defined in the measure definition.", 0, 1, code);
580          case -2023558323: /*population*/  return new Property("population", "", "The populations that make up the population group, one for each type of population appropriate for the measure.", 0, java.lang.Integer.MAX_VALUE, population);
581          case -386313260: /*measureScore*/  return new Property("measureScore", "Quantity", "The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.", 0, 1, measureScore);
582          case 90983669: /*stratifier*/  return new Property("stratifier", "", "When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.", 0, java.lang.Integer.MAX_VALUE, stratifier);
583          default: return super.getNamedProperty(_hash, _name, _checkValid);
584          }
585
586        }
587
588      @Override
589      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
590        switch (hash) {
591        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
592        case -2023558323: /*population*/ return this.population == null ? new Base[0] : this.population.toArray(new Base[this.population.size()]); // MeasureReportGroupPopulationComponent
593        case -386313260: /*measureScore*/ return this.measureScore == null ? new Base[0] : new Base[] {this.measureScore}; // Quantity
594        case 90983669: /*stratifier*/ return this.stratifier == null ? new Base[0] : this.stratifier.toArray(new Base[this.stratifier.size()]); // MeasureReportGroupStratifierComponent
595        default: return super.getProperty(hash, name, checkValid);
596        }
597
598      }
599
600      @Override
601      public Base setProperty(int hash, String name, Base value) throws FHIRException {
602        switch (hash) {
603        case 3059181: // code
604          this.code = castToCodeableConcept(value); // CodeableConcept
605          return value;
606        case -2023558323: // population
607          this.getPopulation().add((MeasureReportGroupPopulationComponent) value); // MeasureReportGroupPopulationComponent
608          return value;
609        case -386313260: // measureScore
610          this.measureScore = castToQuantity(value); // Quantity
611          return value;
612        case 90983669: // stratifier
613          this.getStratifier().add((MeasureReportGroupStratifierComponent) value); // MeasureReportGroupStratifierComponent
614          return value;
615        default: return super.setProperty(hash, name, value);
616        }
617
618      }
619
620      @Override
621      public Base setProperty(String name, Base value) throws FHIRException {
622        if (name.equals("code")) {
623          this.code = castToCodeableConcept(value); // CodeableConcept
624        } else if (name.equals("population")) {
625          this.getPopulation().add((MeasureReportGroupPopulationComponent) value);
626        } else if (name.equals("measureScore")) {
627          this.measureScore = castToQuantity(value); // Quantity
628        } else if (name.equals("stratifier")) {
629          this.getStratifier().add((MeasureReportGroupStratifierComponent) value);
630        } else
631          return super.setProperty(name, value);
632        return value;
633      }
634
635      @Override
636      public Base makeProperty(int hash, String name) throws FHIRException {
637        switch (hash) {
638        case 3059181:  return getCode(); 
639        case -2023558323:  return addPopulation(); 
640        case -386313260:  return getMeasureScore(); 
641        case 90983669:  return addStratifier(); 
642        default: return super.makeProperty(hash, name);
643        }
644
645      }
646
647      @Override
648      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
649        switch (hash) {
650        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
651        case -2023558323: /*population*/ return new String[] {};
652        case -386313260: /*measureScore*/ return new String[] {"Quantity"};
653        case 90983669: /*stratifier*/ return new String[] {};
654        default: return super.getTypesForProperty(hash, name);
655        }
656
657      }
658
659      @Override
660      public Base addChild(String name) throws FHIRException {
661        if (name.equals("code")) {
662          this.code = new CodeableConcept();
663          return this.code;
664        }
665        else if (name.equals("population")) {
666          return addPopulation();
667        }
668        else if (name.equals("measureScore")) {
669          this.measureScore = new Quantity();
670          return this.measureScore;
671        }
672        else if (name.equals("stratifier")) {
673          return addStratifier();
674        }
675        else
676          return super.addChild(name);
677      }
678
679      public MeasureReportGroupComponent copy() {
680        MeasureReportGroupComponent dst = new MeasureReportGroupComponent();
681        copyValues(dst);
682        dst.code = code == null ? null : code.copy();
683        if (population != null) {
684          dst.population = new ArrayList<MeasureReportGroupPopulationComponent>();
685          for (MeasureReportGroupPopulationComponent i : population)
686            dst.population.add(i.copy());
687        };
688        dst.measureScore = measureScore == null ? null : measureScore.copy();
689        if (stratifier != null) {
690          dst.stratifier = new ArrayList<MeasureReportGroupStratifierComponent>();
691          for (MeasureReportGroupStratifierComponent i : stratifier)
692            dst.stratifier.add(i.copy());
693        };
694        return dst;
695      }
696
697      @Override
698      public boolean equalsDeep(Base other_) {
699        if (!super.equalsDeep(other_))
700          return false;
701        if (!(other_ instanceof MeasureReportGroupComponent))
702          return false;
703        MeasureReportGroupComponent o = (MeasureReportGroupComponent) other_;
704        return compareDeep(code, o.code, true) && compareDeep(population, o.population, true) && compareDeep(measureScore, o.measureScore, true)
705           && compareDeep(stratifier, o.stratifier, true);
706      }
707
708      @Override
709      public boolean equalsShallow(Base other_) {
710        if (!super.equalsShallow(other_))
711          return false;
712        if (!(other_ instanceof MeasureReportGroupComponent))
713          return false;
714        MeasureReportGroupComponent o = (MeasureReportGroupComponent) other_;
715        return true;
716      }
717
718      public boolean isEmpty() {
719        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, population, measureScore
720          , stratifier);
721      }
722
723  public String fhirType() {
724    return "MeasureReport.group";
725
726  }
727
728  }
729
730    @Block()
731    public static class MeasureReportGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement {
732        /**
733         * The type of the population.
734         */
735        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
736        @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation", formalDefinition="The type of the population." )
737        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-population")
738        protected CodeableConcept code;
739
740        /**
741         * The number of members of the population.
742         */
743        @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=false)
744        @Description(shortDefinition="Size of the population", formalDefinition="The number of members of the population." )
745        protected IntegerType count;
746
747        /**
748         * This element refers to a List of subject level MeasureReport resources, one for each subject in this population.
749         */
750        @Child(name = "subjectResults", type = {ListResource.class}, order=3, min=0, max=1, modifier=false, summary=false)
751        @Description(shortDefinition="For subject-list reports, the subject results in this population", formalDefinition="This element refers to a List of subject level MeasureReport resources, one for each subject in this population." )
752        protected Reference subjectResults;
753
754        /**
755         * The actual object that is the target of the reference (This element refers to a List of subject level MeasureReport resources, one for each subject in this population.)
756         */
757        protected ListResource subjectResultsTarget;
758
759        private static final long serialVersionUID = 210461445L;
760
761    /**
762     * Constructor
763     */
764      public MeasureReportGroupPopulationComponent() {
765        super();
766      }
767
768        /**
769         * @return {@link #code} (The type of the population.)
770         */
771        public CodeableConcept getCode() { 
772          if (this.code == null)
773            if (Configuration.errorOnAutoCreate())
774              throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.code");
775            else if (Configuration.doAutoCreate())
776              this.code = new CodeableConcept(); // cc
777          return this.code;
778        }
779
780        public boolean hasCode() { 
781          return this.code != null && !this.code.isEmpty();
782        }
783
784        /**
785         * @param value {@link #code} (The type of the population.)
786         */
787        public MeasureReportGroupPopulationComponent setCode(CodeableConcept value) { 
788          this.code = value;
789          return this;
790        }
791
792        /**
793         * @return {@link #count} (The number of members of the population.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value
794         */
795        public IntegerType getCountElement() { 
796          if (this.count == null)
797            if (Configuration.errorOnAutoCreate())
798              throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.count");
799            else if (Configuration.doAutoCreate())
800              this.count = new IntegerType(); // bb
801          return this.count;
802        }
803
804        public boolean hasCountElement() { 
805          return this.count != null && !this.count.isEmpty();
806        }
807
808        public boolean hasCount() { 
809          return this.count != null && !this.count.isEmpty();
810        }
811
812        /**
813         * @param value {@link #count} (The number of members of the population.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value
814         */
815        public MeasureReportGroupPopulationComponent setCountElement(IntegerType value) { 
816          this.count = value;
817          return this;
818        }
819
820        /**
821         * @return The number of members of the population.
822         */
823        public int getCount() { 
824          return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue();
825        }
826
827        /**
828         * @param value The number of members of the population.
829         */
830        public MeasureReportGroupPopulationComponent setCount(int value) { 
831            if (this.count == null)
832              this.count = new IntegerType();
833            this.count.setValue(value);
834          return this;
835        }
836
837        /**
838         * @return {@link #subjectResults} (This element refers to a List of subject level MeasureReport resources, one for each subject in this population.)
839         */
840        public Reference getSubjectResults() { 
841          if (this.subjectResults == null)
842            if (Configuration.errorOnAutoCreate())
843              throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.subjectResults");
844            else if (Configuration.doAutoCreate())
845              this.subjectResults = new Reference(); // cc
846          return this.subjectResults;
847        }
848
849        public boolean hasSubjectResults() { 
850          return this.subjectResults != null && !this.subjectResults.isEmpty();
851        }
852
853        /**
854         * @param value {@link #subjectResults} (This element refers to a List of subject level MeasureReport resources, one for each subject in this population.)
855         */
856        public MeasureReportGroupPopulationComponent setSubjectResults(Reference value) { 
857          this.subjectResults = value;
858          return this;
859        }
860
861        /**
862         * @return {@link #subjectResults} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element refers to a List of subject level MeasureReport resources, one for each subject in this population.)
863         */
864        public ListResource getSubjectResultsTarget() { 
865          if (this.subjectResultsTarget == null)
866            if (Configuration.errorOnAutoCreate())
867              throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.subjectResults");
868            else if (Configuration.doAutoCreate())
869              this.subjectResultsTarget = new ListResource(); // aa
870          return this.subjectResultsTarget;
871        }
872
873        /**
874         * @param value {@link #subjectResults} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element refers to a List of subject level MeasureReport resources, one for each subject in this population.)
875         */
876        public MeasureReportGroupPopulationComponent setSubjectResultsTarget(ListResource value) { 
877          this.subjectResultsTarget = value;
878          return this;
879        }
880
881        protected void listChildren(List<Property> children) {
882          super.listChildren(children);
883          children.add(new Property("code", "CodeableConcept", "The type of the population.", 0, 1, code));
884          children.add(new Property("count", "integer", "The number of members of the population.", 0, 1, count));
885          children.add(new Property("subjectResults", "Reference(List)", "This element refers to a List of subject level MeasureReport resources, one for each subject in this population.", 0, 1, subjectResults));
886        }
887
888        @Override
889        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
890          switch (_hash) {
891          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The type of the population.", 0, 1, code);
892          case 94851343: /*count*/  return new Property("count", "integer", "The number of members of the population.", 0, 1, count);
893          case 2136184106: /*subjectResults*/  return new Property("subjectResults", "Reference(List)", "This element refers to a List of subject level MeasureReport resources, one for each subject in this population.", 0, 1, subjectResults);
894          default: return super.getNamedProperty(_hash, _name, _checkValid);
895          }
896
897        }
898
899      @Override
900      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
901        switch (hash) {
902        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
903        case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // IntegerType
904        case 2136184106: /*subjectResults*/ return this.subjectResults == null ? new Base[0] : new Base[] {this.subjectResults}; // Reference
905        default: return super.getProperty(hash, name, checkValid);
906        }
907
908      }
909
910      @Override
911      public Base setProperty(int hash, String name, Base value) throws FHIRException {
912        switch (hash) {
913        case 3059181: // code
914          this.code = castToCodeableConcept(value); // CodeableConcept
915          return value;
916        case 94851343: // count
917          this.count = castToInteger(value); // IntegerType
918          return value;
919        case 2136184106: // subjectResults
920          this.subjectResults = castToReference(value); // Reference
921          return value;
922        default: return super.setProperty(hash, name, value);
923        }
924
925      }
926
927      @Override
928      public Base setProperty(String name, Base value) throws FHIRException {
929        if (name.equals("code")) {
930          this.code = castToCodeableConcept(value); // CodeableConcept
931        } else if (name.equals("count")) {
932          this.count = castToInteger(value); // IntegerType
933        } else if (name.equals("subjectResults")) {
934          this.subjectResults = castToReference(value); // Reference
935        } else
936          return super.setProperty(name, value);
937        return value;
938      }
939
940      @Override
941      public Base makeProperty(int hash, String name) throws FHIRException {
942        switch (hash) {
943        case 3059181:  return getCode(); 
944        case 94851343:  return getCountElement();
945        case 2136184106:  return getSubjectResults(); 
946        default: return super.makeProperty(hash, name);
947        }
948
949      }
950
951      @Override
952      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
953        switch (hash) {
954        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
955        case 94851343: /*count*/ return new String[] {"integer"};
956        case 2136184106: /*subjectResults*/ return new String[] {"Reference"};
957        default: return super.getTypesForProperty(hash, name);
958        }
959
960      }
961
962      @Override
963      public Base addChild(String name) throws FHIRException {
964        if (name.equals("code")) {
965          this.code = new CodeableConcept();
966          return this.code;
967        }
968        else if (name.equals("count")) {
969          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.count");
970        }
971        else if (name.equals("subjectResults")) {
972          this.subjectResults = new Reference();
973          return this.subjectResults;
974        }
975        else
976          return super.addChild(name);
977      }
978
979      public MeasureReportGroupPopulationComponent copy() {
980        MeasureReportGroupPopulationComponent dst = new MeasureReportGroupPopulationComponent();
981        copyValues(dst);
982        dst.code = code == null ? null : code.copy();
983        dst.count = count == null ? null : count.copy();
984        dst.subjectResults = subjectResults == null ? null : subjectResults.copy();
985        return dst;
986      }
987
988      @Override
989      public boolean equalsDeep(Base other_) {
990        if (!super.equalsDeep(other_))
991          return false;
992        if (!(other_ instanceof MeasureReportGroupPopulationComponent))
993          return false;
994        MeasureReportGroupPopulationComponent o = (MeasureReportGroupPopulationComponent) other_;
995        return compareDeep(code, o.code, true) && compareDeep(count, o.count, true) && compareDeep(subjectResults, o.subjectResults, true)
996          ;
997      }
998
999      @Override
1000      public boolean equalsShallow(Base other_) {
1001        if (!super.equalsShallow(other_))
1002          return false;
1003        if (!(other_ instanceof MeasureReportGroupPopulationComponent))
1004          return false;
1005        MeasureReportGroupPopulationComponent o = (MeasureReportGroupPopulationComponent) other_;
1006        return compareValues(count, o.count, true);
1007      }
1008
1009      public boolean isEmpty() {
1010        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, count, subjectResults
1011          );
1012      }
1013
1014  public String fhirType() {
1015    return "MeasureReport.group.population";
1016
1017  }
1018
1019  }
1020
1021    @Block()
1022    public static class MeasureReportGroupStratifierComponent extends BackboneElement implements IBaseBackboneElement {
1023        /**
1024         * The meaning of this stratifier, as defined in the measure definition.
1025         */
1026        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1027        @Description(shortDefinition="What stratifier of the group", formalDefinition="The meaning of this stratifier, as defined in the measure definition." )
1028        protected CodeableConcept code;
1029
1030        /**
1031         * This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.
1032         */
1033        @Child(name = "stratum", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1034        @Description(shortDefinition="Stratum results, one for each unique value in the stratifier", formalDefinition="This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value." )
1035        protected List<StratifierGroupComponent> stratum;
1036
1037        private static final long serialVersionUID = 362479683L;
1038
1039    /**
1040     * Constructor
1041     */
1042      public MeasureReportGroupStratifierComponent() {
1043        super();
1044      }
1045
1046        /**
1047         * @return {@link #code} (The meaning of this stratifier, as defined in the measure definition.)
1048         */
1049        public CodeableConcept getCode() { 
1050          if (this.code == null)
1051            if (Configuration.errorOnAutoCreate())
1052              throw new Error("Attempt to auto-create MeasureReportGroupStratifierComponent.code");
1053            else if (Configuration.doAutoCreate())
1054              this.code = new CodeableConcept(); // cc
1055          return this.code;
1056        }
1057
1058        public boolean hasCode() { 
1059          return this.code != null && !this.code.isEmpty();
1060        }
1061
1062        /**
1063         * @param value {@link #code} (The meaning of this stratifier, as defined in the measure definition.)
1064         */
1065        public MeasureReportGroupStratifierComponent setCode(CodeableConcept value) { 
1066          this.code = value;
1067          return this;
1068        }
1069
1070        /**
1071         * @return {@link #stratum} (This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.)
1072         */
1073        public List<StratifierGroupComponent> getStratum() { 
1074          if (this.stratum == null)
1075            this.stratum = new ArrayList<StratifierGroupComponent>();
1076          return this.stratum;
1077        }
1078
1079        /**
1080         * @return Returns a reference to <code>this</code> for easy method chaining
1081         */
1082        public MeasureReportGroupStratifierComponent setStratum(List<StratifierGroupComponent> theStratum) { 
1083          this.stratum = theStratum;
1084          return this;
1085        }
1086
1087        public boolean hasStratum() { 
1088          if (this.stratum == null)
1089            return false;
1090          for (StratifierGroupComponent item : this.stratum)
1091            if (!item.isEmpty())
1092              return true;
1093          return false;
1094        }
1095
1096        public StratifierGroupComponent addStratum() { //3
1097          StratifierGroupComponent t = new StratifierGroupComponent();
1098          if (this.stratum == null)
1099            this.stratum = new ArrayList<StratifierGroupComponent>();
1100          this.stratum.add(t);
1101          return t;
1102        }
1103
1104        public MeasureReportGroupStratifierComponent addStratum(StratifierGroupComponent t) { //3
1105          if (t == null)
1106            return this;
1107          if (this.stratum == null)
1108            this.stratum = new ArrayList<StratifierGroupComponent>();
1109          this.stratum.add(t);
1110          return this;
1111        }
1112
1113        /**
1114         * @return The first repetition of repeating field {@link #stratum}, creating it if it does not already exist
1115         */
1116        public StratifierGroupComponent getStratumFirstRep() { 
1117          if (getStratum().isEmpty()) {
1118            addStratum();
1119          }
1120          return getStratum().get(0);
1121        }
1122
1123        protected void listChildren(List<Property> children) {
1124          super.listChildren(children);
1125          children.add(new Property("code", "CodeableConcept", "The meaning of this stratifier, as defined in the measure definition.", 0, 1, code));
1126          children.add(new Property("stratum", "", "This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.", 0, java.lang.Integer.MAX_VALUE, stratum));
1127        }
1128
1129        @Override
1130        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1131          switch (_hash) {
1132          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The meaning of this stratifier, as defined in the measure definition.", 0, 1, code);
1133          case -1881991236: /*stratum*/  return new Property("stratum", "", "This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.", 0, java.lang.Integer.MAX_VALUE, stratum);
1134          default: return super.getNamedProperty(_hash, _name, _checkValid);
1135          }
1136
1137        }
1138
1139      @Override
1140      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1141        switch (hash) {
1142        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1143        case -1881991236: /*stratum*/ return this.stratum == null ? new Base[0] : this.stratum.toArray(new Base[this.stratum.size()]); // StratifierGroupComponent
1144        default: return super.getProperty(hash, name, checkValid);
1145        }
1146
1147      }
1148
1149      @Override
1150      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1151        switch (hash) {
1152        case 3059181: // code
1153          this.code = castToCodeableConcept(value); // CodeableConcept
1154          return value;
1155        case -1881991236: // stratum
1156          this.getStratum().add((StratifierGroupComponent) value); // StratifierGroupComponent
1157          return value;
1158        default: return super.setProperty(hash, name, value);
1159        }
1160
1161      }
1162
1163      @Override
1164      public Base setProperty(String name, Base value) throws FHIRException {
1165        if (name.equals("code")) {
1166          this.code = castToCodeableConcept(value); // CodeableConcept
1167        } else if (name.equals("stratum")) {
1168          this.getStratum().add((StratifierGroupComponent) value);
1169        } else
1170          return super.setProperty(name, value);
1171        return value;
1172      }
1173
1174      @Override
1175      public Base makeProperty(int hash, String name) throws FHIRException {
1176        switch (hash) {
1177        case 3059181:  return getCode(); 
1178        case -1881991236:  return addStratum(); 
1179        default: return super.makeProperty(hash, name);
1180        }
1181
1182      }
1183
1184      @Override
1185      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1186        switch (hash) {
1187        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1188        case -1881991236: /*stratum*/ return new String[] {};
1189        default: return super.getTypesForProperty(hash, name);
1190        }
1191
1192      }
1193
1194      @Override
1195      public Base addChild(String name) throws FHIRException {
1196        if (name.equals("code")) {
1197          this.code = new CodeableConcept();
1198          return this.code;
1199        }
1200        else if (name.equals("stratum")) {
1201          return addStratum();
1202        }
1203        else
1204          return super.addChild(name);
1205      }
1206
1207      public MeasureReportGroupStratifierComponent copy() {
1208        MeasureReportGroupStratifierComponent dst = new MeasureReportGroupStratifierComponent();
1209        copyValues(dst);
1210        dst.code = code == null ? null : code.copy();
1211        if (stratum != null) {
1212          dst.stratum = new ArrayList<StratifierGroupComponent>();
1213          for (StratifierGroupComponent i : stratum)
1214            dst.stratum.add(i.copy());
1215        };
1216        return dst;
1217      }
1218
1219      @Override
1220      public boolean equalsDeep(Base other_) {
1221        if (!super.equalsDeep(other_))
1222          return false;
1223        if (!(other_ instanceof MeasureReportGroupStratifierComponent))
1224          return false;
1225        MeasureReportGroupStratifierComponent o = (MeasureReportGroupStratifierComponent) other_;
1226        return compareDeep(code, o.code, true) && compareDeep(stratum, o.stratum, true);
1227      }
1228
1229      @Override
1230      public boolean equalsShallow(Base other_) {
1231        if (!super.equalsShallow(other_))
1232          return false;
1233        if (!(other_ instanceof MeasureReportGroupStratifierComponent))
1234          return false;
1235        MeasureReportGroupStratifierComponent o = (MeasureReportGroupStratifierComponent) other_;
1236        return true;
1237      }
1238
1239      public boolean isEmpty() {
1240        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, stratum);
1241      }
1242
1243  public String fhirType() {
1244    return "MeasureReport.group.stratifier";
1245
1246  }
1247
1248  }
1249
1250    @Block()
1251    public static class StratifierGroupComponent extends BackboneElement implements IBaseBackboneElement {
1252        /**
1253         * The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.
1254         */
1255        @Child(name = "value", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
1256        @Description(shortDefinition="The stratum value, e.g. male", formalDefinition="The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique." )
1257        protected CodeableConcept value;
1258
1259        /**
1260         * The populations that make up the stratum, one for each type of population appropriate to the measure.
1261         */
1262        @Child(name = "population", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1263        @Description(shortDefinition="Population results in this stratum", formalDefinition="The populations that make up the stratum, one for each type of population appropriate to the measure." )
1264        protected List<StratifierGroupPopulationComponent> population;
1265
1266        /**
1267         * The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.
1268         */
1269        @Child(name = "measureScore", type = {Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false)
1270        @Description(shortDefinition="What score this stratum achieved", formalDefinition="The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum." )
1271        protected Quantity measureScore;
1272
1273        private static final long serialVersionUID = 515764240L;
1274
1275    /**
1276     * Constructor
1277     */
1278      public StratifierGroupComponent() {
1279        super();
1280      }
1281
1282    /**
1283     * Constructor
1284     */
1285      public StratifierGroupComponent(CodeableConcept value) {
1286        super();
1287        this.value = value;
1288      }
1289
1290        /**
1291         * @return {@link #value} (The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.)
1292         */
1293        public CodeableConcept getValue() { 
1294          if (this.value == null)
1295            if (Configuration.errorOnAutoCreate())
1296              throw new Error("Attempt to auto-create StratifierGroupComponent.value");
1297            else if (Configuration.doAutoCreate())
1298              this.value = new CodeableConcept(); // cc
1299          return this.value;
1300        }
1301
1302        public boolean hasValue() { 
1303          return this.value != null && !this.value.isEmpty();
1304        }
1305
1306        /**
1307         * @param value {@link #value} (The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.)
1308         */
1309        public StratifierGroupComponent setValue(CodeableConcept value) { 
1310          this.value = value;
1311          return this;
1312        }
1313
1314        /**
1315         * @return {@link #population} (The populations that make up the stratum, one for each type of population appropriate to the measure.)
1316         */
1317        public List<StratifierGroupPopulationComponent> getPopulation() { 
1318          if (this.population == null)
1319            this.population = new ArrayList<StratifierGroupPopulationComponent>();
1320          return this.population;
1321        }
1322
1323        /**
1324         * @return Returns a reference to <code>this</code> for easy method chaining
1325         */
1326        public StratifierGroupComponent setPopulation(List<StratifierGroupPopulationComponent> thePopulation) { 
1327          this.population = thePopulation;
1328          return this;
1329        }
1330
1331        public boolean hasPopulation() { 
1332          if (this.population == null)
1333            return false;
1334          for (StratifierGroupPopulationComponent item : this.population)
1335            if (!item.isEmpty())
1336              return true;
1337          return false;
1338        }
1339
1340        public StratifierGroupPopulationComponent addPopulation() { //3
1341          StratifierGroupPopulationComponent t = new StratifierGroupPopulationComponent();
1342          if (this.population == null)
1343            this.population = new ArrayList<StratifierGroupPopulationComponent>();
1344          this.population.add(t);
1345          return t;
1346        }
1347
1348        public StratifierGroupComponent addPopulation(StratifierGroupPopulationComponent t) { //3
1349          if (t == null)
1350            return this;
1351          if (this.population == null)
1352            this.population = new ArrayList<StratifierGroupPopulationComponent>();
1353          this.population.add(t);
1354          return this;
1355        }
1356
1357        /**
1358         * @return The first repetition of repeating field {@link #population}, creating it if it does not already exist
1359         */
1360        public StratifierGroupPopulationComponent getPopulationFirstRep() { 
1361          if (getPopulation().isEmpty()) {
1362            addPopulation();
1363          }
1364          return getPopulation().get(0);
1365        }
1366
1367        /**
1368         * @return {@link #measureScore} (The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.)
1369         */
1370        public Quantity getMeasureScore() { 
1371          if (this.measureScore == null)
1372            if (Configuration.errorOnAutoCreate())
1373              throw new Error("Attempt to auto-create StratifierGroupComponent.measureScore");
1374            else if (Configuration.doAutoCreate())
1375              this.measureScore = new Quantity(); // cc
1376          return this.measureScore;
1377        }
1378
1379        public boolean hasMeasureScore() { 
1380          return this.measureScore != null && !this.measureScore.isEmpty();
1381        }
1382
1383        /**
1384         * @param value {@link #measureScore} (The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.)
1385         */
1386        public StratifierGroupComponent setMeasureScore(Quantity value) { 
1387          this.measureScore = value;
1388          return this;
1389        }
1390
1391        protected void listChildren(List<Property> children) {
1392          super.listChildren(children);
1393          children.add(new Property("value", "CodeableConcept", "The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.", 0, 1, value));
1394          children.add(new Property("population", "", "The populations that make up the stratum, one for each type of population appropriate to the measure.", 0, java.lang.Integer.MAX_VALUE, population));
1395          children.add(new Property("measureScore", "Quantity", "The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.", 0, 1, measureScore));
1396        }
1397
1398        @Override
1399        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1400          switch (_hash) {
1401          case 111972721: /*value*/  return new Property("value", "CodeableConcept", "The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.", 0, 1, value);
1402          case -2023558323: /*population*/  return new Property("population", "", "The populations that make up the stratum, one for each type of population appropriate to the measure.", 0, java.lang.Integer.MAX_VALUE, population);
1403          case -386313260: /*measureScore*/  return new Property("measureScore", "Quantity", "The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.", 0, 1, measureScore);
1404          default: return super.getNamedProperty(_hash, _name, _checkValid);
1405          }
1406
1407        }
1408
1409      @Override
1410      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1411        switch (hash) {
1412        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // CodeableConcept
1413        case -2023558323: /*population*/ return this.population == null ? new Base[0] : this.population.toArray(new Base[this.population.size()]); // StratifierGroupPopulationComponent
1414        case -386313260: /*measureScore*/ return this.measureScore == null ? new Base[0] : new Base[] {this.measureScore}; // Quantity
1415        default: return super.getProperty(hash, name, checkValid);
1416        }
1417
1418      }
1419
1420      @Override
1421      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1422        switch (hash) {
1423        case 111972721: // value
1424          this.value = castToCodeableConcept(value); // CodeableConcept
1425          return value;
1426        case -2023558323: // population
1427          this.getPopulation().add((StratifierGroupPopulationComponent) value); // StratifierGroupPopulationComponent
1428          return value;
1429        case -386313260: // measureScore
1430          this.measureScore = castToQuantity(value); // Quantity
1431          return value;
1432        default: return super.setProperty(hash, name, value);
1433        }
1434
1435      }
1436
1437      @Override
1438      public Base setProperty(String name, Base value) throws FHIRException {
1439        if (name.equals("value")) {
1440          this.value = castToCodeableConcept(value); // CodeableConcept
1441        } else if (name.equals("population")) {
1442          this.getPopulation().add((StratifierGroupPopulationComponent) value);
1443        } else if (name.equals("measureScore")) {
1444          this.measureScore = castToQuantity(value); // Quantity
1445        } else
1446          return super.setProperty(name, value);
1447        return value;
1448      }
1449
1450      @Override
1451      public Base makeProperty(int hash, String name) throws FHIRException {
1452        switch (hash) {
1453        case 111972721:  return getValue(); 
1454        case -2023558323:  return addPopulation(); 
1455        case -386313260:  return getMeasureScore(); 
1456        default: return super.makeProperty(hash, name);
1457        }
1458
1459      }
1460
1461      @Override
1462      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1463        switch (hash) {
1464        case 111972721: /*value*/ return new String[] {"CodeableConcept"};
1465        case -2023558323: /*population*/ return new String[] {};
1466        case -386313260: /*measureScore*/ return new String[] {"Quantity"};
1467        default: return super.getTypesForProperty(hash, name);
1468        }
1469
1470      }
1471
1472      @Override
1473      public Base addChild(String name) throws FHIRException {
1474        if (name.equals("value")) {
1475          this.value = new CodeableConcept();
1476          return this.value;
1477        }
1478        else if (name.equals("population")) {
1479          return addPopulation();
1480        }
1481        else if (name.equals("measureScore")) {
1482          this.measureScore = new Quantity();
1483          return this.measureScore;
1484        }
1485        else
1486          return super.addChild(name);
1487      }
1488
1489      public StratifierGroupComponent copy() {
1490        StratifierGroupComponent dst = new StratifierGroupComponent();
1491        copyValues(dst);
1492        dst.value = value == null ? null : value.copy();
1493        if (population != null) {
1494          dst.population = new ArrayList<StratifierGroupPopulationComponent>();
1495          for (StratifierGroupPopulationComponent i : population)
1496            dst.population.add(i.copy());
1497        };
1498        dst.measureScore = measureScore == null ? null : measureScore.copy();
1499        return dst;
1500      }
1501
1502      @Override
1503      public boolean equalsDeep(Base other_) {
1504        if (!super.equalsDeep(other_))
1505          return false;
1506        if (!(other_ instanceof StratifierGroupComponent))
1507          return false;
1508        StratifierGroupComponent o = (StratifierGroupComponent) other_;
1509        return compareDeep(value, o.value, true) && compareDeep(population, o.population, true) && compareDeep(measureScore, o.measureScore, true)
1510          ;
1511      }
1512
1513      @Override
1514      public boolean equalsShallow(Base other_) {
1515        if (!super.equalsShallow(other_))
1516          return false;
1517        if (!(other_ instanceof StratifierGroupComponent))
1518          return false;
1519        StratifierGroupComponent o = (StratifierGroupComponent) other_;
1520        return true;
1521      }
1522
1523      public boolean isEmpty() {
1524        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, population, measureScore
1525          );
1526      }
1527
1528  public String fhirType() {
1529    return "MeasureReport.group.stratifier.stratum";
1530
1531  }
1532
1533  }
1534
1535    @Block()
1536    public static class StratifierGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement {
1537        /**
1538         * The type of the population.
1539         */
1540        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1541        @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation", formalDefinition="The type of the population." )
1542        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-population")
1543        protected CodeableConcept code;
1544
1545        /**
1546         * The number of members of the population in this stratum.
1547         */
1548        @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1549        @Description(shortDefinition="Size of the population", formalDefinition="The number of members of the population in this stratum." )
1550        protected IntegerType count;
1551
1552        /**
1553         * This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.
1554         */
1555        @Child(name = "subjectResults", type = {ListResource.class}, order=3, min=0, max=1, modifier=false, summary=false)
1556        @Description(shortDefinition="For subject-list reports, the subject results in this population", formalDefinition="This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum." )
1557        protected Reference subjectResults;
1558
1559        /**
1560         * The actual object that is the target of the reference (This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.)
1561         */
1562        protected ListResource subjectResultsTarget;
1563
1564        private static final long serialVersionUID = 210461445L;
1565
1566    /**
1567     * Constructor
1568     */
1569      public StratifierGroupPopulationComponent() {
1570        super();
1571      }
1572
1573        /**
1574         * @return {@link #code} (The type of the population.)
1575         */
1576        public CodeableConcept getCode() { 
1577          if (this.code == null)
1578            if (Configuration.errorOnAutoCreate())
1579              throw new Error("Attempt to auto-create StratifierGroupPopulationComponent.code");
1580            else if (Configuration.doAutoCreate())
1581              this.code = new CodeableConcept(); // cc
1582          return this.code;
1583        }
1584
1585        public boolean hasCode() { 
1586          return this.code != null && !this.code.isEmpty();
1587        }
1588
1589        /**
1590         * @param value {@link #code} (The type of the population.)
1591         */
1592        public StratifierGroupPopulationComponent setCode(CodeableConcept value) { 
1593          this.code = value;
1594          return this;
1595        }
1596
1597        /**
1598         * @return {@link #count} (The number of members of the population in this stratum.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value
1599         */
1600        public IntegerType getCountElement() { 
1601          if (this.count == null)
1602            if (Configuration.errorOnAutoCreate())
1603              throw new Error("Attempt to auto-create StratifierGroupPopulationComponent.count");
1604            else if (Configuration.doAutoCreate())
1605              this.count = new IntegerType(); // bb
1606          return this.count;
1607        }
1608
1609        public boolean hasCountElement() { 
1610          return this.count != null && !this.count.isEmpty();
1611        }
1612
1613        public boolean hasCount() { 
1614          return this.count != null && !this.count.isEmpty();
1615        }
1616
1617        /**
1618         * @param value {@link #count} (The number of members of the population in this stratum.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value
1619         */
1620        public StratifierGroupPopulationComponent setCountElement(IntegerType value) { 
1621          this.count = value;
1622          return this;
1623        }
1624
1625        /**
1626         * @return The number of members of the population in this stratum.
1627         */
1628        public int getCount() { 
1629          return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue();
1630        }
1631
1632        /**
1633         * @param value The number of members of the population in this stratum.
1634         */
1635        public StratifierGroupPopulationComponent setCount(int value) { 
1636            if (this.count == null)
1637              this.count = new IntegerType();
1638            this.count.setValue(value);
1639          return this;
1640        }
1641
1642        /**
1643         * @return {@link #subjectResults} (This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.)
1644         */
1645        public Reference getSubjectResults() { 
1646          if (this.subjectResults == null)
1647            if (Configuration.errorOnAutoCreate())
1648              throw new Error("Attempt to auto-create StratifierGroupPopulationComponent.subjectResults");
1649            else if (Configuration.doAutoCreate())
1650              this.subjectResults = new Reference(); // cc
1651          return this.subjectResults;
1652        }
1653
1654        public boolean hasSubjectResults() { 
1655          return this.subjectResults != null && !this.subjectResults.isEmpty();
1656        }
1657
1658        /**
1659         * @param value {@link #subjectResults} (This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.)
1660         */
1661        public StratifierGroupPopulationComponent setSubjectResults(Reference value) { 
1662          this.subjectResults = value;
1663          return this;
1664        }
1665
1666        /**
1667         * @return {@link #subjectResults} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.)
1668         */
1669        public ListResource getSubjectResultsTarget() { 
1670          if (this.subjectResultsTarget == null)
1671            if (Configuration.errorOnAutoCreate())
1672              throw new Error("Attempt to auto-create StratifierGroupPopulationComponent.subjectResults");
1673            else if (Configuration.doAutoCreate())
1674              this.subjectResultsTarget = new ListResource(); // aa
1675          return this.subjectResultsTarget;
1676        }
1677
1678        /**
1679         * @param value {@link #subjectResults} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.)
1680         */
1681        public StratifierGroupPopulationComponent setSubjectResultsTarget(ListResource value) { 
1682          this.subjectResultsTarget = value;
1683          return this;
1684        }
1685
1686        protected void listChildren(List<Property> children) {
1687          super.listChildren(children);
1688          children.add(new Property("code", "CodeableConcept", "The type of the population.", 0, 1, code));
1689          children.add(new Property("count", "integer", "The number of members of the population in this stratum.", 0, 1, count));
1690          children.add(new Property("subjectResults", "Reference(List)", "This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.", 0, 1, subjectResults));
1691        }
1692
1693        @Override
1694        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1695          switch (_hash) {
1696          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The type of the population.", 0, 1, code);
1697          case 94851343: /*count*/  return new Property("count", "integer", "The number of members of the population in this stratum.", 0, 1, count);
1698          case 2136184106: /*subjectResults*/  return new Property("subjectResults", "Reference(List)", "This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.", 0, 1, subjectResults);
1699          default: return super.getNamedProperty(_hash, _name, _checkValid);
1700          }
1701
1702        }
1703
1704      @Override
1705      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1706        switch (hash) {
1707        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1708        case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // IntegerType
1709        case 2136184106: /*subjectResults*/ return this.subjectResults == null ? new Base[0] : new Base[] {this.subjectResults}; // Reference
1710        default: return super.getProperty(hash, name, checkValid);
1711        }
1712
1713      }
1714
1715      @Override
1716      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1717        switch (hash) {
1718        case 3059181: // code
1719          this.code = castToCodeableConcept(value); // CodeableConcept
1720          return value;
1721        case 94851343: // count
1722          this.count = castToInteger(value); // IntegerType
1723          return value;
1724        case 2136184106: // subjectResults
1725          this.subjectResults = castToReference(value); // Reference
1726          return value;
1727        default: return super.setProperty(hash, name, value);
1728        }
1729
1730      }
1731
1732      @Override
1733      public Base setProperty(String name, Base value) throws FHIRException {
1734        if (name.equals("code")) {
1735          this.code = castToCodeableConcept(value); // CodeableConcept
1736        } else if (name.equals("count")) {
1737          this.count = castToInteger(value); // IntegerType
1738        } else if (name.equals("subjectResults")) {
1739          this.subjectResults = castToReference(value); // Reference
1740        } else
1741          return super.setProperty(name, value);
1742        return value;
1743      }
1744
1745      @Override
1746      public Base makeProperty(int hash, String name) throws FHIRException {
1747        switch (hash) {
1748        case 3059181:  return getCode(); 
1749        case 94851343:  return getCountElement();
1750        case 2136184106:  return getSubjectResults(); 
1751        default: return super.makeProperty(hash, name);
1752        }
1753
1754      }
1755
1756      @Override
1757      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1758        switch (hash) {
1759        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1760        case 94851343: /*count*/ return new String[] {"integer"};
1761        case 2136184106: /*subjectResults*/ return new String[] {"Reference"};
1762        default: return super.getTypesForProperty(hash, name);
1763        }
1764
1765      }
1766
1767      @Override
1768      public Base addChild(String name) throws FHIRException {
1769        if (name.equals("code")) {
1770          this.code = new CodeableConcept();
1771          return this.code;
1772        }
1773        else if (name.equals("count")) {
1774          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.count");
1775        }
1776        else if (name.equals("subjectResults")) {
1777          this.subjectResults = new Reference();
1778          return this.subjectResults;
1779        }
1780        else
1781          return super.addChild(name);
1782      }
1783
1784      public StratifierGroupPopulationComponent copy() {
1785        StratifierGroupPopulationComponent dst = new StratifierGroupPopulationComponent();
1786        copyValues(dst);
1787        dst.code = code == null ? null : code.copy();
1788        dst.count = count == null ? null : count.copy();
1789        dst.subjectResults = subjectResults == null ? null : subjectResults.copy();
1790        return dst;
1791      }
1792
1793      @Override
1794      public boolean equalsDeep(Base other_) {
1795        if (!super.equalsDeep(other_))
1796          return false;
1797        if (!(other_ instanceof StratifierGroupPopulationComponent))
1798          return false;
1799        StratifierGroupPopulationComponent o = (StratifierGroupPopulationComponent) other_;
1800        return compareDeep(code, o.code, true) && compareDeep(count, o.count, true) && compareDeep(subjectResults, o.subjectResults, true)
1801          ;
1802      }
1803
1804      @Override
1805      public boolean equalsShallow(Base other_) {
1806        if (!super.equalsShallow(other_))
1807          return false;
1808        if (!(other_ instanceof StratifierGroupPopulationComponent))
1809          return false;
1810        StratifierGroupPopulationComponent o = (StratifierGroupPopulationComponent) other_;
1811        return compareValues(count, o.count, true);
1812      }
1813
1814      public boolean isEmpty() {
1815        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, count, subjectResults
1816          );
1817      }
1818
1819  public String fhirType() {
1820    return "MeasureReport.group.stratifier.stratum.population";
1821
1822  }
1823
1824  }
1825
1826    /**
1827     * A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.
1828     */
1829    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1830    @Description(shortDefinition="Additional identifier for the MeasureReport", formalDefinition="A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance." )
1831    protected List<Identifier> identifier;
1832
1833    /**
1834     * The MeasureReport status. No data will be available until the MeasureReport status is complete.
1835     */
1836    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
1837    @Description(shortDefinition="complete | pending | error", formalDefinition="The MeasureReport status. No data will be available until the MeasureReport status is complete." )
1838    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-report-status")
1839    protected Enumeration<MeasureReportStatus> status;
1840
1841    /**
1842     * The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.
1843     */
1844    @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1845    @Description(shortDefinition="individual | subject-list | summary | data-collection", formalDefinition="The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure." )
1846    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-report-type")
1847    protected Enumeration<MeasureReportType> type;
1848
1849    /**
1850     * A reference to the Measure that was calculated to produce this report.
1851     */
1852    @Child(name = "measure", type = {CanonicalType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1853    @Description(shortDefinition="What measure was calculated", formalDefinition="A reference to the Measure that was calculated to produce this report." )
1854    protected CanonicalType measure;
1855
1856    /**
1857     * Optional subject identifying the individual or individuals the report is for.
1858     */
1859    @Child(name = "subject", type = {Patient.class, Practitioner.class, PractitionerRole.class, Location.class, Device.class, RelatedPerson.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true)
1860    @Description(shortDefinition="What individual(s) the report is for", formalDefinition="Optional subject identifying the individual or individuals the report is for." )
1861    protected Reference subject;
1862
1863    /**
1864     * The actual object that is the target of the reference (Optional subject identifying the individual or individuals the report is for.)
1865     */
1866    protected Resource subjectTarget;
1867
1868    /**
1869     * The date this measure report was generated.
1870     */
1871    @Child(name = "date", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1872    @Description(shortDefinition="When the report was generated", formalDefinition="The date this measure report was generated." )
1873    protected DateTimeType date;
1874
1875    /**
1876     * The individual, location, or organization that is reporting the data.
1877     */
1878    @Child(name = "reporter", type = {Practitioner.class, PractitionerRole.class, Location.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
1879    @Description(shortDefinition="Who is reporting the data", formalDefinition="The individual, location, or organization that is reporting the data." )
1880    protected Reference reporter;
1881
1882    /**
1883     * The actual object that is the target of the reference (The individual, location, or organization that is reporting the data.)
1884     */
1885    protected Resource reporterTarget;
1886
1887    /**
1888     * The reporting period for which the report was calculated.
1889     */
1890    @Child(name = "period", type = {Period.class}, order=7, min=1, max=1, modifier=false, summary=true)
1891    @Description(shortDefinition="What period the report covers", formalDefinition="The reporting period for which the report was calculated." )
1892    protected Period period;
1893
1894    /**
1895     * Whether improvement in the measure is noted by an increase or decrease in the measure score.
1896     */
1897    @Child(name = "improvementNotation", type = {CodeType.class}, order=8, min=0, max=1, modifier=true, summary=true)
1898    @Description(shortDefinition="increase | decrease", formalDefinition="Whether improvement in the measure is noted by an increase or decrease in the measure score." )
1899    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measure-improvement-notation")
1900    protected Enumeration<MeasureImprovementNotation> improvementNotation;
1901
1902    /**
1903     * The results of the calculation, one for each population group in the measure.
1904     */
1905    @Child(name = "group", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1906    @Description(shortDefinition="Measure results for each group", formalDefinition="The results of the calculation, one for each population group in the measure." )
1907    protected List<MeasureReportGroupComponent> group;
1908
1909    /**
1910     * A reference to a Bundle containing the Resources that were used in the calculation of this measure.
1911     */
1912    @Child(name = "evaluatedResource", type = {Reference.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1913    @Description(shortDefinition="What data was used to calculate the measure score", formalDefinition="A reference to a Bundle containing the Resources that were used in the calculation of this measure." )
1914    protected List<Reference> evaluatedResource;
1915    /**
1916     * The actual objects that are the target of the reference (A reference to a Bundle containing the Resources that were used in the calculation of this measure.)
1917     */
1918    protected List<Resource> evaluatedResourceTarget;
1919
1920
1921    private static final long serialVersionUID = -1690162707L;
1922
1923  /**
1924   * Constructor
1925   */
1926    public MeasureReport() {
1927      super();
1928    }
1929
1930  /**
1931   * Constructor
1932   */
1933    public MeasureReport(Enumeration<MeasureReportStatus> status, Enumeration<MeasureReportType> type, CanonicalType measure, Period period) {
1934      super();
1935      this.status = status;
1936      this.type = type;
1937      this.measure = measure;
1938      this.period = period;
1939    }
1940
1941    /**
1942     * @return {@link #identifier} (A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.)
1943     */
1944    public List<Identifier> getIdentifier() { 
1945      if (this.identifier == null)
1946        this.identifier = new ArrayList<Identifier>();
1947      return this.identifier;
1948    }
1949
1950    /**
1951     * @return Returns a reference to <code>this</code> for easy method chaining
1952     */
1953    public MeasureReport setIdentifier(List<Identifier> theIdentifier) { 
1954      this.identifier = theIdentifier;
1955      return this;
1956    }
1957
1958    public boolean hasIdentifier() { 
1959      if (this.identifier == null)
1960        return false;
1961      for (Identifier item : this.identifier)
1962        if (!item.isEmpty())
1963          return true;
1964      return false;
1965    }
1966
1967    public Identifier addIdentifier() { //3
1968      Identifier t = new Identifier();
1969      if (this.identifier == null)
1970        this.identifier = new ArrayList<Identifier>();
1971      this.identifier.add(t);
1972      return t;
1973    }
1974
1975    public MeasureReport addIdentifier(Identifier t) { //3
1976      if (t == null)
1977        return this;
1978      if (this.identifier == null)
1979        this.identifier = new ArrayList<Identifier>();
1980      this.identifier.add(t);
1981      return this;
1982    }
1983
1984    /**
1985     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1986     */
1987    public Identifier getIdentifierFirstRep() { 
1988      if (getIdentifier().isEmpty()) {
1989        addIdentifier();
1990      }
1991      return getIdentifier().get(0);
1992    }
1993
1994    /**
1995     * @return {@link #status} (The MeasureReport status. No data will be available until the MeasureReport status is complete.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1996     */
1997    public Enumeration<MeasureReportStatus> getStatusElement() { 
1998      if (this.status == null)
1999        if (Configuration.errorOnAutoCreate())
2000          throw new Error("Attempt to auto-create MeasureReport.status");
2001        else if (Configuration.doAutoCreate())
2002          this.status = new Enumeration<MeasureReportStatus>(new MeasureReportStatusEnumFactory()); // bb
2003      return this.status;
2004    }
2005
2006    public boolean hasStatusElement() { 
2007      return this.status != null && !this.status.isEmpty();
2008    }
2009
2010    public boolean hasStatus() { 
2011      return this.status != null && !this.status.isEmpty();
2012    }
2013
2014    /**
2015     * @param value {@link #status} (The MeasureReport status. No data will be available until the MeasureReport status is complete.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2016     */
2017    public MeasureReport setStatusElement(Enumeration<MeasureReportStatus> value) { 
2018      this.status = value;
2019      return this;
2020    }
2021
2022    /**
2023     * @return The MeasureReport status. No data will be available until the MeasureReport status is complete.
2024     */
2025    public MeasureReportStatus getStatus() { 
2026      return this.status == null ? null : this.status.getValue();
2027    }
2028
2029    /**
2030     * @param value The MeasureReport status. No data will be available until the MeasureReport status is complete.
2031     */
2032    public MeasureReport setStatus(MeasureReportStatus value) { 
2033        if (this.status == null)
2034          this.status = new Enumeration<MeasureReportStatus>(new MeasureReportStatusEnumFactory());
2035        this.status.setValue(value);
2036      return this;
2037    }
2038
2039    /**
2040     * @return {@link #type} (The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2041     */
2042    public Enumeration<MeasureReportType> getTypeElement() { 
2043      if (this.type == null)
2044        if (Configuration.errorOnAutoCreate())
2045          throw new Error("Attempt to auto-create MeasureReport.type");
2046        else if (Configuration.doAutoCreate())
2047          this.type = new Enumeration<MeasureReportType>(new MeasureReportTypeEnumFactory()); // bb
2048      return this.type;
2049    }
2050
2051    public boolean hasTypeElement() { 
2052      return this.type != null && !this.type.isEmpty();
2053    }
2054
2055    public boolean hasType() { 
2056      return this.type != null && !this.type.isEmpty();
2057    }
2058
2059    /**
2060     * @param value {@link #type} (The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2061     */
2062    public MeasureReport setTypeElement(Enumeration<MeasureReportType> value) { 
2063      this.type = value;
2064      return this;
2065    }
2066
2067    /**
2068     * @return The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.
2069     */
2070    public MeasureReportType getType() { 
2071      return this.type == null ? null : this.type.getValue();
2072    }
2073
2074    /**
2075     * @param value The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.
2076     */
2077    public MeasureReport setType(MeasureReportType value) { 
2078        if (this.type == null)
2079          this.type = new Enumeration<MeasureReportType>(new MeasureReportTypeEnumFactory());
2080        this.type.setValue(value);
2081      return this;
2082    }
2083
2084    /**
2085     * @return {@link #measure} (A reference to the Measure that was calculated to produce this report.). This is the underlying object with id, value and extensions. The accessor "getMeasure" gives direct access to the value
2086     */
2087    public CanonicalType getMeasureElement() { 
2088      if (this.measure == null)
2089        if (Configuration.errorOnAutoCreate())
2090          throw new Error("Attempt to auto-create MeasureReport.measure");
2091        else if (Configuration.doAutoCreate())
2092          this.measure = new CanonicalType(); // bb
2093      return this.measure;
2094    }
2095
2096    public boolean hasMeasureElement() { 
2097      return this.measure != null && !this.measure.isEmpty();
2098    }
2099
2100    public boolean hasMeasure() { 
2101      return this.measure != null && !this.measure.isEmpty();
2102    }
2103
2104    /**
2105     * @param value {@link #measure} (A reference to the Measure that was calculated to produce this report.). This is the underlying object with id, value and extensions. The accessor "getMeasure" gives direct access to the value
2106     */
2107    public MeasureReport setMeasureElement(CanonicalType value) { 
2108      this.measure = value;
2109      return this;
2110    }
2111
2112    /**
2113     * @return A reference to the Measure that was calculated to produce this report.
2114     */
2115    public String getMeasure() { 
2116      return this.measure == null ? null : this.measure.getValue();
2117    }
2118
2119    /**
2120     * @param value A reference to the Measure that was calculated to produce this report.
2121     */
2122    public MeasureReport setMeasure(String value) { 
2123        if (this.measure == null)
2124          this.measure = new CanonicalType();
2125        this.measure.setValue(value);
2126      return this;
2127    }
2128
2129    /**
2130     * @return {@link #subject} (Optional subject identifying the individual or individuals the report is for.)
2131     */
2132    public Reference getSubject() { 
2133      if (this.subject == null)
2134        if (Configuration.errorOnAutoCreate())
2135          throw new Error("Attempt to auto-create MeasureReport.subject");
2136        else if (Configuration.doAutoCreate())
2137          this.subject = new Reference(); // cc
2138      return this.subject;
2139    }
2140
2141    public boolean hasSubject() { 
2142      return this.subject != null && !this.subject.isEmpty();
2143    }
2144
2145    /**
2146     * @param value {@link #subject} (Optional subject identifying the individual or individuals the report is for.)
2147     */
2148    public MeasureReport setSubject(Reference value) { 
2149      this.subject = value;
2150      return this;
2151    }
2152
2153    /**
2154     * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Optional subject identifying the individual or individuals the report is for.)
2155     */
2156    public Resource getSubjectTarget() { 
2157      return this.subjectTarget;
2158    }
2159
2160    /**
2161     * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Optional subject identifying the individual or individuals the report is for.)
2162     */
2163    public MeasureReport setSubjectTarget(Resource value) { 
2164      this.subjectTarget = value;
2165      return this;
2166    }
2167
2168    /**
2169     * @return {@link #date} (The date this measure report was generated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2170     */
2171    public DateTimeType getDateElement() { 
2172      if (this.date == null)
2173        if (Configuration.errorOnAutoCreate())
2174          throw new Error("Attempt to auto-create MeasureReport.date");
2175        else if (Configuration.doAutoCreate())
2176          this.date = new DateTimeType(); // bb
2177      return this.date;
2178    }
2179
2180    public boolean hasDateElement() { 
2181      return this.date != null && !this.date.isEmpty();
2182    }
2183
2184    public boolean hasDate() { 
2185      return this.date != null && !this.date.isEmpty();
2186    }
2187
2188    /**
2189     * @param value {@link #date} (The date this measure report was generated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2190     */
2191    public MeasureReport setDateElement(DateTimeType value) { 
2192      this.date = value;
2193      return this;
2194    }
2195
2196    /**
2197     * @return The date this measure report was generated.
2198     */
2199    public Date getDate() { 
2200      return this.date == null ? null : this.date.getValue();
2201    }
2202
2203    /**
2204     * @param value The date this measure report was generated.
2205     */
2206    public MeasureReport setDate(Date value) { 
2207      if (value == null)
2208        this.date = null;
2209      else {
2210        if (this.date == null)
2211          this.date = new DateTimeType();
2212        this.date.setValue(value);
2213      }
2214      return this;
2215    }
2216
2217    /**
2218     * @return {@link #reporter} (The individual, location, or organization that is reporting the data.)
2219     */
2220    public Reference getReporter() { 
2221      if (this.reporter == null)
2222        if (Configuration.errorOnAutoCreate())
2223          throw new Error("Attempt to auto-create MeasureReport.reporter");
2224        else if (Configuration.doAutoCreate())
2225          this.reporter = new Reference(); // cc
2226      return this.reporter;
2227    }
2228
2229    public boolean hasReporter() { 
2230      return this.reporter != null && !this.reporter.isEmpty();
2231    }
2232
2233    /**
2234     * @param value {@link #reporter} (The individual, location, or organization that is reporting the data.)
2235     */
2236    public MeasureReport setReporter(Reference value) { 
2237      this.reporter = value;
2238      return this;
2239    }
2240
2241    /**
2242     * @return {@link #reporter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The individual, location, or organization that is reporting the data.)
2243     */
2244    public Resource getReporterTarget() { 
2245      return this.reporterTarget;
2246    }
2247
2248    /**
2249     * @param value {@link #reporter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The individual, location, or organization that is reporting the data.)
2250     */
2251    public MeasureReport setReporterTarget(Resource value) { 
2252      this.reporterTarget = value;
2253      return this;
2254    }
2255
2256    /**
2257     * @return {@link #period} (The reporting period for which the report was calculated.)
2258     */
2259    public Period getPeriod() { 
2260      if (this.period == null)
2261        if (Configuration.errorOnAutoCreate())
2262          throw new Error("Attempt to auto-create MeasureReport.period");
2263        else if (Configuration.doAutoCreate())
2264          this.period = new Period(); // cc
2265      return this.period;
2266    }
2267
2268    public boolean hasPeriod() { 
2269      return this.period != null && !this.period.isEmpty();
2270    }
2271
2272    /**
2273     * @param value {@link #period} (The reporting period for which the report was calculated.)
2274     */
2275    public MeasureReport setPeriod(Period value) { 
2276      this.period = value;
2277      return this;
2278    }
2279
2280    /**
2281     * @return {@link #improvementNotation} (Whether improvement in the measure is noted by an increase or decrease in the measure score.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value
2282     */
2283    public Enumeration<MeasureImprovementNotation> getImprovementNotationElement() { 
2284      if (this.improvementNotation == null)
2285        if (Configuration.errorOnAutoCreate())
2286          throw new Error("Attempt to auto-create MeasureReport.improvementNotation");
2287        else if (Configuration.doAutoCreate())
2288          this.improvementNotation = new Enumeration<MeasureImprovementNotation>(new MeasureImprovementNotationEnumFactory()); // bb
2289      return this.improvementNotation;
2290    }
2291
2292    public boolean hasImprovementNotationElement() { 
2293      return this.improvementNotation != null && !this.improvementNotation.isEmpty();
2294    }
2295
2296    public boolean hasImprovementNotation() { 
2297      return this.improvementNotation != null && !this.improvementNotation.isEmpty();
2298    }
2299
2300    /**
2301     * @param value {@link #improvementNotation} (Whether improvement in the measure is noted by an increase or decrease in the measure score.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value
2302     */
2303    public MeasureReport setImprovementNotationElement(Enumeration<MeasureImprovementNotation> value) { 
2304      this.improvementNotation = value;
2305      return this;
2306    }
2307
2308    /**
2309     * @return Whether improvement in the measure is noted by an increase or decrease in the measure score.
2310     */
2311    public MeasureImprovementNotation getImprovementNotation() { 
2312      return this.improvementNotation == null ? null : this.improvementNotation.getValue();
2313    }
2314
2315    /**
2316     * @param value Whether improvement in the measure is noted by an increase or decrease in the measure score.
2317     */
2318    public MeasureReport setImprovementNotation(MeasureImprovementNotation value) { 
2319      if (value == null)
2320        this.improvementNotation = null;
2321      else {
2322        if (this.improvementNotation == null)
2323          this.improvementNotation = new Enumeration<MeasureImprovementNotation>(new MeasureImprovementNotationEnumFactory());
2324        this.improvementNotation.setValue(value);
2325      }
2326      return this;
2327    }
2328
2329    /**
2330     * @return {@link #group} (The results of the calculation, one for each population group in the measure.)
2331     */
2332    public List<MeasureReportGroupComponent> getGroup() { 
2333      if (this.group == null)
2334        this.group = new ArrayList<MeasureReportGroupComponent>();
2335      return this.group;
2336    }
2337
2338    /**
2339     * @return Returns a reference to <code>this</code> for easy method chaining
2340     */
2341    public MeasureReport setGroup(List<MeasureReportGroupComponent> theGroup) { 
2342      this.group = theGroup;
2343      return this;
2344    }
2345
2346    public boolean hasGroup() { 
2347      if (this.group == null)
2348        return false;
2349      for (MeasureReportGroupComponent item : this.group)
2350        if (!item.isEmpty())
2351          return true;
2352      return false;
2353    }
2354
2355    public MeasureReportGroupComponent addGroup() { //3
2356      MeasureReportGroupComponent t = new MeasureReportGroupComponent();
2357      if (this.group == null)
2358        this.group = new ArrayList<MeasureReportGroupComponent>();
2359      this.group.add(t);
2360      return t;
2361    }
2362
2363    public MeasureReport addGroup(MeasureReportGroupComponent t) { //3
2364      if (t == null)
2365        return this;
2366      if (this.group == null)
2367        this.group = new ArrayList<MeasureReportGroupComponent>();
2368      this.group.add(t);
2369      return this;
2370    }
2371
2372    /**
2373     * @return The first repetition of repeating field {@link #group}, creating it if it does not already exist
2374     */
2375    public MeasureReportGroupComponent getGroupFirstRep() { 
2376      if (getGroup().isEmpty()) {
2377        addGroup();
2378      }
2379      return getGroup().get(0);
2380    }
2381
2382    /**
2383     * @return {@link #evaluatedResource} (A reference to a Bundle containing the Resources that were used in the calculation of this measure.)
2384     */
2385    public List<Reference> getEvaluatedResource() { 
2386      if (this.evaluatedResource == null)
2387        this.evaluatedResource = new ArrayList<Reference>();
2388      return this.evaluatedResource;
2389    }
2390
2391    /**
2392     * @return Returns a reference to <code>this</code> for easy method chaining
2393     */
2394    public MeasureReport setEvaluatedResource(List<Reference> theEvaluatedResource) { 
2395      this.evaluatedResource = theEvaluatedResource;
2396      return this;
2397    }
2398
2399    public boolean hasEvaluatedResource() { 
2400      if (this.evaluatedResource == null)
2401        return false;
2402      for (Reference item : this.evaluatedResource)
2403        if (!item.isEmpty())
2404          return true;
2405      return false;
2406    }
2407
2408    public Reference addEvaluatedResource() { //3
2409      Reference t = new Reference();
2410      if (this.evaluatedResource == null)
2411        this.evaluatedResource = new ArrayList<Reference>();
2412      this.evaluatedResource.add(t);
2413      return t;
2414    }
2415
2416    public MeasureReport addEvaluatedResource(Reference t) { //3
2417      if (t == null)
2418        return this;
2419      if (this.evaluatedResource == null)
2420        this.evaluatedResource = new ArrayList<Reference>();
2421      this.evaluatedResource.add(t);
2422      return this;
2423    }
2424
2425    /**
2426     * @return The first repetition of repeating field {@link #evaluatedResource}, creating it if it does not already exist
2427     */
2428    public Reference getEvaluatedResourceFirstRep() { 
2429      if (getEvaluatedResource().isEmpty()) {
2430        addEvaluatedResource();
2431      }
2432      return getEvaluatedResource().get(0);
2433    }
2434
2435    /**
2436     * @deprecated Use Reference#setResource(IBaseResource) instead
2437     */
2438    @Deprecated
2439    public List<Resource> getEvaluatedResourceTarget() { 
2440      if (this.evaluatedResourceTarget == null)
2441        this.evaluatedResourceTarget = new ArrayList<Resource>();
2442      return this.evaluatedResourceTarget;
2443    }
2444
2445      protected void listChildren(List<Property> children) {
2446        super.listChildren(children);
2447        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
2448        children.add(new Property("status", "code", "The MeasureReport status. No data will be available until the MeasureReport status is complete.", 0, 1, status));
2449        children.add(new Property("type", "code", "The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.", 0, 1, type));
2450        children.add(new Property("measure", "canonical(Measure)", "A reference to the Measure that was calculated to produce this report.", 0, 1, measure));
2451        children.add(new Property("subject", "Reference(Patient|Practitioner|PractitionerRole|Location|Device|RelatedPerson|Group)", "Optional subject identifying the individual or individuals the report is for.", 0, 1, subject));
2452        children.add(new Property("date", "dateTime", "The date this measure report was generated.", 0, 1, date));
2453        children.add(new Property("reporter", "Reference(Practitioner|PractitionerRole|Location|Organization)", "The individual, location, or organization that is reporting the data.", 0, 1, reporter));
2454        children.add(new Property("period", "Period", "The reporting period for which the report was calculated.", 0, 1, period));
2455        children.add(new Property("improvementNotation", "code", "Whether improvement in the measure is noted by an increase or decrease in the measure score.", 0, 1, improvementNotation));
2456        children.add(new Property("group", "", "The results of the calculation, one for each population group in the measure.", 0, java.lang.Integer.MAX_VALUE, group));
2457        children.add(new Property("evaluatedResource", "Reference(Any)", "A reference to a Bundle containing the Resources that were used in the calculation of this measure.", 0, java.lang.Integer.MAX_VALUE, evaluatedResource));
2458      }
2459
2460      @Override
2461      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2462        switch (_hash) {
2463        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
2464        case -892481550: /*status*/  return new Property("status", "code", "The MeasureReport status. No data will be available until the MeasureReport status is complete.", 0, 1, status);
2465        case 3575610: /*type*/  return new Property("type", "code", "The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.", 0, 1, type);
2466        case 938321246: /*measure*/  return new Property("measure", "canonical(Measure)", "A reference to the Measure that was calculated to produce this report.", 0, 1, measure);
2467        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Practitioner|PractitionerRole|Location|Device|RelatedPerson|Group)", "Optional subject identifying the individual or individuals the report is for.", 0, 1, subject);
2468        case 3076014: /*date*/  return new Property("date", "dateTime", "The date this measure report was generated.", 0, 1, date);
2469        case -427039519: /*reporter*/  return new Property("reporter", "Reference(Practitioner|PractitionerRole|Location|Organization)", "The individual, location, or organization that is reporting the data.", 0, 1, reporter);
2470        case -991726143: /*period*/  return new Property("period", "Period", "The reporting period for which the report was calculated.", 0, 1, period);
2471        case -2085456136: /*improvementNotation*/  return new Property("improvementNotation", "code", "Whether improvement in the measure is noted by an increase or decrease in the measure score.", 0, 1, improvementNotation);
2472        case 98629247: /*group*/  return new Property("group", "", "The results of the calculation, one for each population group in the measure.", 0, java.lang.Integer.MAX_VALUE, group);
2473        case -1056771047: /*evaluatedResource*/  return new Property("evaluatedResource", "Reference(Any)", "A reference to a Bundle containing the Resources that were used in the calculation of this measure.", 0, java.lang.Integer.MAX_VALUE, evaluatedResource);
2474        default: return super.getNamedProperty(_hash, _name, _checkValid);
2475        }
2476
2477      }
2478
2479      @Override
2480      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2481        switch (hash) {
2482        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2483        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<MeasureReportStatus>
2484        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<MeasureReportType>
2485        case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CanonicalType
2486        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
2487        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2488        case -427039519: /*reporter*/ return this.reporter == null ? new Base[0] : new Base[] {this.reporter}; // Reference
2489        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
2490        case -2085456136: /*improvementNotation*/ return this.improvementNotation == null ? new Base[0] : new Base[] {this.improvementNotation}; // Enumeration<MeasureImprovementNotation>
2491        case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // MeasureReportGroupComponent
2492        case -1056771047: /*evaluatedResource*/ return this.evaluatedResource == null ? new Base[0] : this.evaluatedResource.toArray(new Base[this.evaluatedResource.size()]); // Reference
2493        default: return super.getProperty(hash, name, checkValid);
2494        }
2495
2496      }
2497
2498      @Override
2499      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2500        switch (hash) {
2501        case -1618432855: // identifier
2502          this.getIdentifier().add(castToIdentifier(value)); // Identifier
2503          return value;
2504        case -892481550: // status
2505          value = new MeasureReportStatusEnumFactory().fromType(castToCode(value));
2506          this.status = (Enumeration) value; // Enumeration<MeasureReportStatus>
2507          return value;
2508        case 3575610: // type
2509          value = new MeasureReportTypeEnumFactory().fromType(castToCode(value));
2510          this.type = (Enumeration) value; // Enumeration<MeasureReportType>
2511          return value;
2512        case 938321246: // measure
2513          this.measure = castToCanonical(value); // CanonicalType
2514          return value;
2515        case -1867885268: // subject
2516          this.subject = castToReference(value); // Reference
2517          return value;
2518        case 3076014: // date
2519          this.date = castToDateTime(value); // DateTimeType
2520          return value;
2521        case -427039519: // reporter
2522          this.reporter = castToReference(value); // Reference
2523          return value;
2524        case -991726143: // period
2525          this.period = castToPeriod(value); // Period
2526          return value;
2527        case -2085456136: // improvementNotation
2528          value = new MeasureImprovementNotationEnumFactory().fromType(castToCode(value));
2529          this.improvementNotation = (Enumeration) value; // Enumeration<MeasureImprovementNotation>
2530          return value;
2531        case 98629247: // group
2532          this.getGroup().add((MeasureReportGroupComponent) value); // MeasureReportGroupComponent
2533          return value;
2534        case -1056771047: // evaluatedResource
2535          this.getEvaluatedResource().add(castToReference(value)); // Reference
2536          return value;
2537        default: return super.setProperty(hash, name, value);
2538        }
2539
2540      }
2541
2542      @Override
2543      public Base setProperty(String name, Base value) throws FHIRException {
2544        if (name.equals("identifier")) {
2545          this.getIdentifier().add(castToIdentifier(value));
2546        } else if (name.equals("status")) {
2547          value = new MeasureReportStatusEnumFactory().fromType(castToCode(value));
2548          this.status = (Enumeration) value; // Enumeration<MeasureReportStatus>
2549        } else if (name.equals("type")) {
2550          value = new MeasureReportTypeEnumFactory().fromType(castToCode(value));
2551          this.type = (Enumeration) value; // Enumeration<MeasureReportType>
2552        } else if (name.equals("measure")) {
2553          this.measure = castToCanonical(value); // CanonicalType
2554        } else if (name.equals("subject")) {
2555          this.subject = castToReference(value); // Reference
2556        } else if (name.equals("date")) {
2557          this.date = castToDateTime(value); // DateTimeType
2558        } else if (name.equals("reporter")) {
2559          this.reporter = castToReference(value); // Reference
2560        } else if (name.equals("period")) {
2561          this.period = castToPeriod(value); // Period
2562        } else if (name.equals("improvementNotation")) {
2563          value = new MeasureImprovementNotationEnumFactory().fromType(castToCode(value));
2564          this.improvementNotation = (Enumeration) value; // Enumeration<MeasureImprovementNotation>
2565        } else if (name.equals("group")) {
2566          this.getGroup().add((MeasureReportGroupComponent) value);
2567        } else if (name.equals("evaluatedResource")) {
2568          this.getEvaluatedResource().add(castToReference(value));
2569        } else
2570          return super.setProperty(name, value);
2571        return value;
2572      }
2573
2574      @Override
2575      public Base makeProperty(int hash, String name) throws FHIRException {
2576        switch (hash) {
2577        case -1618432855:  return addIdentifier(); 
2578        case -892481550:  return getStatusElement();
2579        case 3575610:  return getTypeElement();
2580        case 938321246:  return getMeasureElement();
2581        case -1867885268:  return getSubject(); 
2582        case 3076014:  return getDateElement();
2583        case -427039519:  return getReporter(); 
2584        case -991726143:  return getPeriod(); 
2585        case -2085456136:  return getImprovementNotationElement();
2586        case 98629247:  return addGroup(); 
2587        case -1056771047:  return addEvaluatedResource(); 
2588        default: return super.makeProperty(hash, name);
2589        }
2590
2591      }
2592
2593      @Override
2594      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2595        switch (hash) {
2596        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2597        case -892481550: /*status*/ return new String[] {"code"};
2598        case 3575610: /*type*/ return new String[] {"code"};
2599        case 938321246: /*measure*/ return new String[] {"canonical"};
2600        case -1867885268: /*subject*/ return new String[] {"Reference"};
2601        case 3076014: /*date*/ return new String[] {"dateTime"};
2602        case -427039519: /*reporter*/ return new String[] {"Reference"};
2603        case -991726143: /*period*/ return new String[] {"Period"};
2604        case -2085456136: /*improvementNotation*/ return new String[] {"code"};
2605        case 98629247: /*group*/ return new String[] {};
2606        case -1056771047: /*evaluatedResource*/ return new String[] {"Reference"};
2607        default: return super.getTypesForProperty(hash, name);
2608        }
2609
2610      }
2611
2612      @Override
2613      public Base addChild(String name) throws FHIRException {
2614        if (name.equals("identifier")) {
2615          return addIdentifier();
2616        }
2617        else if (name.equals("status")) {
2618          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.status");
2619        }
2620        else if (name.equals("type")) {
2621          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.type");
2622        }
2623        else if (name.equals("measure")) {
2624          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.measure");
2625        }
2626        else if (name.equals("subject")) {
2627          this.subject = new Reference();
2628          return this.subject;
2629        }
2630        else if (name.equals("date")) {
2631          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.date");
2632        }
2633        else if (name.equals("reporter")) {
2634          this.reporter = new Reference();
2635          return this.reporter;
2636        }
2637        else if (name.equals("period")) {
2638          this.period = new Period();
2639          return this.period;
2640        }
2641        else if (name.equals("improvementNotation")) {
2642          throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.improvementNotation");
2643        }
2644        else if (name.equals("group")) {
2645          return addGroup();
2646        }
2647        else if (name.equals("evaluatedResource")) {
2648          return addEvaluatedResource();
2649        }
2650        else
2651          return super.addChild(name);
2652      }
2653
2654  public String fhirType() {
2655    return "MeasureReport";
2656
2657  }
2658
2659      public MeasureReport copy() {
2660        MeasureReport dst = new MeasureReport();
2661        copyValues(dst);
2662        if (identifier != null) {
2663          dst.identifier = new ArrayList<Identifier>();
2664          for (Identifier i : identifier)
2665            dst.identifier.add(i.copy());
2666        };
2667        dst.status = status == null ? null : status.copy();
2668        dst.type = type == null ? null : type.copy();
2669        dst.measure = measure == null ? null : measure.copy();
2670        dst.subject = subject == null ? null : subject.copy();
2671        dst.date = date == null ? null : date.copy();
2672        dst.reporter = reporter == null ? null : reporter.copy();
2673        dst.period = period == null ? null : period.copy();
2674        dst.improvementNotation = improvementNotation == null ? null : improvementNotation.copy();
2675        if (group != null) {
2676          dst.group = new ArrayList<MeasureReportGroupComponent>();
2677          for (MeasureReportGroupComponent i : group)
2678            dst.group.add(i.copy());
2679        };
2680        if (evaluatedResource != null) {
2681          dst.evaluatedResource = new ArrayList<Reference>();
2682          for (Reference i : evaluatedResource)
2683            dst.evaluatedResource.add(i.copy());
2684        };
2685        return dst;
2686      }
2687
2688      protected MeasureReport typedCopy() {
2689        return copy();
2690      }
2691
2692      @Override
2693      public boolean equalsDeep(Base other_) {
2694        if (!super.equalsDeep(other_))
2695          return false;
2696        if (!(other_ instanceof MeasureReport))
2697          return false;
2698        MeasureReport o = (MeasureReport) other_;
2699        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true)
2700           && compareDeep(measure, o.measure, true) && compareDeep(subject, o.subject, true) && compareDeep(date, o.date, true)
2701           && compareDeep(reporter, o.reporter, true) && compareDeep(period, o.period, true) && compareDeep(improvementNotation, o.improvementNotation, true)
2702           && compareDeep(group, o.group, true) && compareDeep(evaluatedResource, o.evaluatedResource, true)
2703          ;
2704      }
2705
2706      @Override
2707      public boolean equalsShallow(Base other_) {
2708        if (!super.equalsShallow(other_))
2709          return false;
2710        if (!(other_ instanceof MeasureReport))
2711          return false;
2712        MeasureReport o = (MeasureReport) other_;
2713        return compareValues(status, o.status, true) && compareValues(type, o.type, true) && compareValues(date, o.date, true)
2714           && compareValues(improvementNotation, o.improvementNotation, true);
2715      }
2716
2717      public boolean isEmpty() {
2718        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type
2719          , measure, subject, date, reporter, period, improvementNotation, group, evaluatedResource
2720          );
2721      }
2722
2723  @Override
2724  public ResourceType getResourceType() {
2725    return ResourceType.MeasureReport;
2726   }
2727
2728 /**
2729   * Search parameter: <b>date</b>
2730   * <p>
2731   * Description: <b>The date of the measure report</b><br>
2732   * Type: <b>date</b><br>
2733   * Path: <b>MeasureReport.date</b><br>
2734   * </p>
2735   */
2736  @SearchParamDefinition(name="date", path="MeasureReport.date", description="The date of the measure report", type="date" )
2737  public static final String SP_DATE = "date";
2738 /**
2739   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2740   * <p>
2741   * Description: <b>The date of the measure report</b><br>
2742   * Type: <b>date</b><br>
2743   * Path: <b>MeasureReport.date</b><br>
2744   * </p>
2745   */
2746  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2747
2748 /**
2749   * Search parameter: <b>identifier</b>
2750   * <p>
2751   * Description: <b>External identifier of the measure report to be returned</b><br>
2752   * Type: <b>token</b><br>
2753   * Path: <b>MeasureReport.identifier</b><br>
2754   * </p>
2755   */
2756  @SearchParamDefinition(name="identifier", path="MeasureReport.identifier", description="External identifier of the measure report to be returned", type="token" )
2757  public static final String SP_IDENTIFIER = "identifier";
2758 /**
2759   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2760   * <p>
2761   * Description: <b>External identifier of the measure report to be returned</b><br>
2762   * Type: <b>token</b><br>
2763   * Path: <b>MeasureReport.identifier</b><br>
2764   * </p>
2765   */
2766  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2767
2768 /**
2769   * Search parameter: <b>period</b>
2770   * <p>
2771   * Description: <b>The period of the measure report</b><br>
2772   * Type: <b>date</b><br>
2773   * Path: <b>MeasureReport.period</b><br>
2774   * </p>
2775   */
2776  @SearchParamDefinition(name="period", path="MeasureReport.period", description="The period of the measure report", type="date" )
2777  public static final String SP_PERIOD = "period";
2778 /**
2779   * <b>Fluent Client</b> search parameter constant for <b>period</b>
2780   * <p>
2781   * Description: <b>The period of the measure report</b><br>
2782   * Type: <b>date</b><br>
2783   * Path: <b>MeasureReport.period</b><br>
2784   * </p>
2785   */
2786  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
2787
2788 /**
2789   * Search parameter: <b>measure</b>
2790   * <p>
2791   * Description: <b>The measure to return measure report results for</b><br>
2792   * Type: <b>reference</b><br>
2793   * Path: <b>MeasureReport.measure</b><br>
2794   * </p>
2795   */
2796  @SearchParamDefinition(name="measure", path="MeasureReport.measure", description="The measure to return measure report results for", type="reference", target={Measure.class } )
2797  public static final String SP_MEASURE = "measure";
2798 /**
2799   * <b>Fluent Client</b> search parameter constant for <b>measure</b>
2800   * <p>
2801   * Description: <b>The measure to return measure report results for</b><br>
2802   * Type: <b>reference</b><br>
2803   * Path: <b>MeasureReport.measure</b><br>
2804   * </p>
2805   */
2806  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEASURE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEASURE);
2807
2808/**
2809   * Constant for fluent queries to be used to add include statements. Specifies
2810   * the path value of "<b>MeasureReport:measure</b>".
2811   */
2812  public static final ca.uhn.fhir.model.api.Include INCLUDE_MEASURE = new ca.uhn.fhir.model.api.Include("MeasureReport:measure").toLocked();
2813
2814 /**
2815   * Search parameter: <b>patient</b>
2816   * <p>
2817   * Description: <b>The identity of a patient to search for individual measure report results for</b><br>
2818   * Type: <b>reference</b><br>
2819   * Path: <b>MeasureReport.subject</b><br>
2820   * </p>
2821   */
2822  @SearchParamDefinition(name="patient", path="MeasureReport.subject.where(resolve() is Patient)", description="The identity of a patient to search for individual measure report results for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
2823  public static final String SP_PATIENT = "patient";
2824 /**
2825   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2826   * <p>
2827   * Description: <b>The identity of a patient to search for individual measure report results for</b><br>
2828   * Type: <b>reference</b><br>
2829   * Path: <b>MeasureReport.subject</b><br>
2830   * </p>
2831   */
2832  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2833
2834/**
2835   * Constant for fluent queries to be used to add include statements. Specifies
2836   * the path value of "<b>MeasureReport:patient</b>".
2837   */
2838  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MeasureReport:patient").toLocked();
2839
2840 /**
2841   * Search parameter: <b>subject</b>
2842   * <p>
2843   * Description: <b>The identity of a subject to search for individual measure report results for</b><br>
2844   * Type: <b>reference</b><br>
2845   * Path: <b>MeasureReport.subject</b><br>
2846   * </p>
2847   */
2848  @SearchParamDefinition(name="subject", path="MeasureReport.subject", description="The identity of a subject to search for individual measure report results for", type="reference", target={Device.class, Group.class, Location.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2849  public static final String SP_SUBJECT = "subject";
2850 /**
2851   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2852   * <p>
2853   * Description: <b>The identity of a subject to search for individual measure report results for</b><br>
2854   * Type: <b>reference</b><br>
2855   * Path: <b>MeasureReport.subject</b><br>
2856   * </p>
2857   */
2858  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2859
2860/**
2861   * Constant for fluent queries to be used to add include statements. Specifies
2862   * the path value of "<b>MeasureReport:subject</b>".
2863   */
2864  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MeasureReport:subject").toLocked();
2865
2866 /**
2867   * Search parameter: <b>reporter</b>
2868   * <p>
2869   * Description: <b>The reporter to return measure report results for</b><br>
2870   * Type: <b>reference</b><br>
2871   * Path: <b>MeasureReport.reporter</b><br>
2872   * </p>
2873   */
2874  @SearchParamDefinition(name="reporter", path="MeasureReport.reporter", description="The reporter to return measure report results for", type="reference", target={Location.class, Organization.class, Practitioner.class, PractitionerRole.class } )
2875  public static final String SP_REPORTER = "reporter";
2876 /**
2877   * <b>Fluent Client</b> search parameter constant for <b>reporter</b>
2878   * <p>
2879   * Description: <b>The reporter to return measure report results for</b><br>
2880   * Type: <b>reference</b><br>
2881   * Path: <b>MeasureReport.reporter</b><br>
2882   * </p>
2883   */
2884  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPORTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPORTER);
2885
2886/**
2887   * Constant for fluent queries to be used to add include statements. Specifies
2888   * the path value of "<b>MeasureReport:reporter</b>".
2889   */
2890  public static final ca.uhn.fhir.model.api.Include INCLUDE_REPORTER = new ca.uhn.fhir.model.api.Include("MeasureReport:reporter").toLocked();
2891
2892 /**
2893   * Search parameter: <b>status</b>
2894   * <p>
2895   * Description: <b>The status of the measure report</b><br>
2896   * Type: <b>token</b><br>
2897   * Path: <b>MeasureReport.status</b><br>
2898   * </p>
2899   */
2900  @SearchParamDefinition(name="status", path="MeasureReport.status", description="The status of the measure report", type="token" )
2901  public static final String SP_STATUS = "status";
2902 /**
2903   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2904   * <p>
2905   * Description: <b>The status of the measure report</b><br>
2906   * Type: <b>token</b><br>
2907   * Path: <b>MeasureReport.status</b><br>
2908   * </p>
2909   */
2910  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2911
2912 /**
2913   * Search parameter: <b>evaluated-resource</b>
2914   * <p>
2915   * Description: <b>An evaluated resource referenced by the measure report</b><br>
2916   * Type: <b>reference</b><br>
2917   * Path: <b>MeasureReport.evaluatedResource</b><br>
2918   * </p>
2919   */
2920  @SearchParamDefinition(name="evaluated-resource", path="MeasureReport.evaluatedResource", description="An evaluated resource referenced by the measure report", type="reference" )
2921  public static final String SP_EVALUATED_RESOURCE = "evaluated-resource";
2922 /**
2923   * <b>Fluent Client</b> search parameter constant for <b>evaluated-resource</b>
2924   * <p>
2925   * Description: <b>An evaluated resource referenced by the measure report</b><br>
2926   * Type: <b>reference</b><br>
2927   * Path: <b>MeasureReport.evaluatedResource</b><br>
2928   * </p>
2929   */
2930  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EVALUATED_RESOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EVALUATED_RESOURCE);
2931
2932/**
2933   * Constant for fluent queries to be used to add include statements. Specifies
2934   * the path value of "<b>MeasureReport:evaluated-resource</b>".
2935   */
2936  public static final ca.uhn.fhir.model.api.Include INCLUDE_EVALUATED_RESOURCE = new ca.uhn.fhir.model.api.Include("MeasureReport:evaluated-resource").toLocked();
2937
2938
2939}
2940